agentleFS
QuantConnectQuantConnect/Documentation/CLAUDE.md

Documentation

CLAUDE.md268 starsChanged 48 days agoApache-2.0View on GitHub

All pull requests must follow these rules: All new or edited prose in documentation pages (.html and .php fragments under the numbered folders) must follow the docs-style skill in .claude/skills/docs-style/SKILL.md. Run its linter on the page folder before you push. All changes under project-templates/ must follow these rules: 1. Observe Pull Request Rules 2. Run the syntax check on any new or modified Python template before pushing — python project-templates/python/run_syntax_check.py <name> (pass the template folder name to check just that…

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

30 rules. About 0 are common, 23 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈23

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    All pull requests must follow these rules:

    line 5
  2. Distinctive:

    Before committing, check for any staged files and unstage them (git reset HEAD) so nothing is accidentally included.

    line 10
  3. Distinctive:

    Start with a verb in present tense (e.g.

    line 14
  4. Distinctive:

    Do not include the "Generated with Claude Code" line in the PR body

    line 21
  5. Very specific:

    All new or edited prose in documentation pages (.html and .php fragments under the numbered folders) must follow the docs-style skill in …

    line 25
  6. Very specific:

    All changes under project-templates/ must follow these rules:

    line 29
  7. Distinctive:

    All requests to create a skill for Writing Algorithm topics must follow these rules:

    line 39
  8. Very specific:

    Create the skill in skill-templates, and save the SKILL.md observing the location of the problem the skill will solve and the proposed name.

    line 42
  9. Very specific:

    Use positive, simpler, better English.

    line 43
  10. Very specific:

    Use py..cs.. for inline code.

    line 45
  11. Distinctive:

    Avoid duplicate content. Skills must be as short as possible.

    line 48
  12. Distinctive:

    Do not add Check list when it is coverted by Common Mistakes

    line 50
  13. Distinctive:

    Do not add negative explaination when listing common mistakes.

    line 51
  14. Very specific:

    Run python3 skill-templates/bundle-skills.py to validate the skill.

    line 52
  15. Distinctive:

    Do not add skill/ to the pull request.

    line 53
  16. Distinctive:

    If multiple interpretations exist, present them - don't pick silently.

    line 67
  17. Distinctive:

    If a simpler approach exists, say so.

    line 68
  18. Distinctive:

    If something is unclear, stop.

    line 69
  19. Distinctive:

    No features beyond what was asked.

    line 75
  20. Distinctive:

    No abstractions for single-use code.

    line 76
  21. Distinctive:

    No error handling for impossible scenarios.

    line 78
  22. Distinctive:

    If you write 200 lines and it could be 50, rewrite it.

    line 79
  23. Distinctive:

    Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.

    line 81
  24. Distinctive:

    When editing existing code:

    line 87
  25. Distinctive:

    Don't "improve" adjacent code, comments, or formatting.

    line 88
  26. Distinctive:

    Don't refactor things that aren't broken.

    line 89
  27. Distinctive:

    If you notice unrelated dead code, mention it - don't delete it.

    line 91
  28. Distinctive:

    When your changes create orphans:

    line 93
  29. Very specific:

    Remove imports/variables/functions that YOUR changes made unused.

    line 94
  30. Distinctive:

    Don't remove pre-existing dead code unless asked.

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

Pull Request Rules

All pull requests must follow these rules:

  1. Create a new branch — never work directly on master. Create a descriptive branch name for the change.
  2. Rebase with upstream master — run git fetch upstream && git rebase upstream/master before pushing to ensure the branch is up to date.
  3. Only include intended files — the PR must only contain files relevant to the change.
    • Before committing, check for any staged files and unstage them (git reset HEAD) so nothing is accidentally included.
    • Re-stage only the files that belong in the PR.
    • Flag any unrelated files before pushing.
  4. Commit message style:
    • Start with a verb in present tense (e.g. "Fix", "Add", "Update", "Remove")
    • Reference the issue number if applicable
    • Match the style of recent commits in the repo
    • Example: Fix broken link in Delay indicator docs (#1234)
  5. PR format:
    • Title: short, imperative, under 70 characters
    • Body: include a brief summary and a test plan
    • Do not include the "Generated with Claude Code" line in the PR body

Documentation Writing Rules

All new or edited prose in documentation pages (.html and .php fragments under the numbered folders) must follow the docs-style skill in .claude/skills/docs-style/SKILL.md. Run its linter on the page folder before you push.

Project Template Rules

All changes under project-templates/ must follow these rules:

  1. Observe Pull Request Rules
  2. Run the syntax check on any new or modified Python template before pushing — python project-templates/python/run_syntax_check.py <name> (pass the template folder name to check just that file, or omit it to check all). This is the same check the Syntax Tests workflow runs on PRs that touch project-templates/python/**.

Skill Developement Rules

All requests to create a skill for Writing Algorithm topics must follow these rules:

  1. Observe Pull Request Rules
  2. Create the skill in skill-templates, and save the SKILL.md observing the location of the problem the skill will solve and the proposed name. For example, the SKILL.md for chained-universes-options from 03 Writing Algorithms\12 Universes\03 Equity\04 Chained Universes should be saved in skill-templates\universes\equity\chained-universes-options\SKILL.md. We drop the writing-algorithms part.
  3. Use positive, simpler, better English. Follow the voice and wording rules in the docs-style skill.
  4. A good description packs three things into those words: what the skill does, when to trigger it (concrete user phrases and contexts), and when not to. The when-to-trigger part is the load-bearing one — that's literally how Claude decides whether to consult the skill, so trigger phrases earn their keep more than prose about what's inside.
  5. Use py..cs.. for inline code. For exclusive sections, use
  • <!--\s*python-only\s*-->\n?(.*?)<!--\s*/python-only\s*-->\n?
  • <!--\s*csharp-only\s*-->\n?(.*?)<!--\s*/csharp-only\s*-->\n?
  1. Avoid duplicate content. Skills must be as short as possible.
  2. Code blocks as guides. Add minimum implementation. E.g., we don't see to set the start and end dates.
  3. Do not add Check list when it is coverted by Common Mistakes
  4. Do not add negative explaination when listing common mistakes.
  5. Run python3 skill-templates/bundle-skills.py to validate the skill.
  6. Do not add skill/** to the pull request.

CLAUDE.md

Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed.

Tradeoff: These guidelines bias toward caution over speed. For trivial tasks, use judgment.

1. Think Before Coding

Don't assume. Don't hide confusion. Surface tradeoffs.

Before implementing:

  • State your assumptions explicitly. If uncertain, ask.
  • If multiple interpretations exist, present them - don't pick silently.
  • If a simpler approach exists, say so. Push back when warranted.
  • If something is unclear, stop. Name what's confusing. Ask.

2. Simplicity First

Minimum code that solves the problem. Nothing speculative.

  • No features beyond what was asked.
  • No abstractions for single-use code.
  • No "flexibility" or "configurability" that wasn't requested.
  • No error handling for impossible scenarios.
  • If you write 200 lines and it could be 50, rewrite it.

Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.

3. Surgical Changes

Touch only what you must. Clean up only your own mess.

When editing existing code:

  • Don't "improve" adjacent code, comments, or formatting.
  • Don't refactor things that aren't broken.
  • Match existing style, even if you'd do it differently.
  • If you notice unrelated dead code, mention it - don't delete it.

When your changes create orphans:

  • Remove imports/variables/functions that YOUR changes made unused.
  • Don't remove pre-existing dead code unless asked.

The test: Every changed line should trace directly to the user's request.

4. Goal-Driven Execution

Define success criteria. Loop until verified.

Transform tasks into verifiable goals:

  • "Add validation" → "Write tests for invalid inputs, then make them pass"
  • "Fix the bug" → "Write a test that reproduces it, then make it pass"
  • "Refactor X" → "Ensure tests pass before and after"

For multi-step tasks, state a brief plan:

1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]

Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.


These guidelines are working if: fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.