CertSafari
    Anthropic Claude Certified Architect – Professional (CCAR-P)· Lessons

    Domain 6 · Lesson 34/38

    Writing Implementation Guidance with CLAUDE.md

    Document architectures and provide implementation guidance

    9 min read
    2.8% of exam
    4 sources
    Published 4 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Decide what belongs in implementation guidance and what to leave out
    • Place guidance at the right scope, from organization to subdirectory
    • Keep guidance accurate as the code, the team and the models change

    1.What implementation guidance should contain

    When Claude Code helps build a solution, the implementation guidance has two readers: the engineering team and Claude itself. In Claude Code, that guidance lives in CLAUDE.md, a plain markdown file that Claude reads automatically at the start of every session in its directory. This lesson covers that one mechanism. Guidance written for human engineering teams in other forms is a separate concern. The support documentation calls CLAUDE.md the briefing you would give a capable new teammate on their first morning: how the team works, what to avoid, and where the important pieces are.

    The support article's content guidance is specific. Include commands for building, testing, linting and running locally, because Claude will run them and they have to be accurate. Include conventions, hard constraints such as "do not edit generated/", and the known gotchas that every new engineer runs into. The architecture itself should be described in three sentences: what the major pieces are and how they communicate. Leave out full API documentation, changelogs, anything obvious from the file tree, and aspirational rules the team doesn't actually follow. The table below is a separate list, taken from the Claude Code best-practices page, and the two lists overlap but are not identical.

    Include versus exclude in implementation guidance for Claude Code (from the best-practices page)
    IncludeExclude
    Bash commands Claude can't guessAnything Claude can figure out by reading code
    Architectural decisions specific to your projectFile-by-file descriptions of the codebase
    Testing instructions and preferred test runnersDetailed API documentation (link to docs instead)
    Common gotchas or non-obvious behaviorsSelf-evident practices like "write clean code"

    Each instruction should be specific enough to check. "Run npm test before committing" works; "Test your changes" doesn't. Group related instructions under markdown headers and bullets, because organized sections are easier to follow than dense paragraphs. Keep each file under about 200 lines. Longer files use more context and reduce adherence, and importing other files doesn't help, since imported files also load at launch.

    Grouped, specific guidance from the best-practices examplemarkdown
    # Code style
    - Use ES modules (import/export) syntax, not CommonJS (require)
    - Destructure imports when possible (eg. import { foo } from 'bar')
    
    # Workflow
    - Be sure to typecheck when you're done making a series of code changes
    - Prefer running single tests, and not the whole test suite, for performance

    Checkpoint 1 of 6· Check yourself

    You're drafting the CLAUDE.md that hands a new AI solution over to engineering. Which item belongs in it?

    Sources12

    2.Putting guidance at the right scope

    Guidance works better when each piece sits at the level where it applies. Claude merges instructions from several locations, from broadest to most specific. Most teams only need the project-root file, committed to git so that the whole team benefits.

    CLAUDE.md scopes and who each one reaches
    ScopeLocationUse forShared with
    Managed policymacOS: /Library/Application Support/ClaudeCode/CLAUDE.md; Linux and WSL: /etc/claude-code/CLAUDE.md; Windows: C:\Program Files\ClaudeCode\CLAUDE.mdCompany coding standards, security policies, compliance requirementsAll users in organization
    User instructions~/.claude/CLAUDE.mdPersonal preferences for all projectsJust you (all projects)
    Project instructions./CLAUDE.md or ./.claude/CLAUDE.mdProject architecture, coding standards, common workflowsTeam members via source control
    Local instructions./CLAUDE.local.mdSandbox URLs, preferred test dataJust you (current project)

    In larger systems, divide the guidance the way the architecture is divided. The root CLAUDE.md holds instructions that apply everywhere, such as coding standards and commit conventions. A per-subdirectory CLAUDE.md holds conventions for that area's stack: one per package in a monorepo, or one per subsystem such as src/db/ or src/api/ in a large single tree. With this layout, directory owners maintain their own conventions, and the instructions are versioned alongside the code they describe. The alternative is a path-scoped rule in the central .claude/rules/ directory, which loads when Claude works with a file matching the rule's paths: glob. Choose it when you want all conventions in one place, or when the same rule applies to many scattered paths.

    Root-level guidance that applies across every packagemarkdown
    Run package scripts from the package directory, not the monorepo root.
    Prefix commit subjects with the package name, for example `api: add rate limiting`.
    Never edit files under packages/*/generated/. Run `npm run codegen` in the package instead.

    Checkpoint 2 of 6· Match them up

    Match each piece of guidance to the scope where it belongs

    Tap a term, then the definition that fits it.

    Checkpoint 3 of 6· Exam question

    An implementation guide must describe how to let Claude Code browse a company's Confluence and Jira instances using an existing open-source connector, launched locally by the agent process rather than hosted as a network service. Which pattern should the guide document?

    Sources32

    3.Keeping guidance accurate over time

    Implementation guidance goes out of date as the code changes, and stale guidance does active harm. The support article says outdated instructions are worse than none. Upkeep starts with the first draft. Run /init and Claude explores the codebase and drafts a CLAUDE.md covering build commands, test commands, a structure overview and the conventions it detects. You then review the draft, remove anything inaccurate, and commit it.

    After the first draft, update the file when something specific happens. If Claude gets something wrong twice, a rule is missing, so add one line. When conventions change, for example a new framework, test runner or set of lint rules, update the file to match. Do a quarterly skim to delete stale content. Watch for contradictions as well: when two instructions conflict, Claude may pick one arbitrarily, so periodically review the root file, nested files and .claude/rules/ together.

    Checkpoint 4 of 6· Check yourself

    Claude has made the same mistake about your test setup in two separate sessions. What does the support article say to do?

    The large-codebase guide adds team-level habits. Review CLAUDE.md edits in pull requests like any other documentation change, so the conventions keep pace with the code. Revisit the file after major model releases, because a rule written to work around an older model's limitation can become overhead once a newer model handles the case on its own. A Stop hook can also review the session transcript and propose CLAUDE.md updates while the gap it found is still fresh.

    Checkpoint 5 of 6· Check yourself

    Your guidance includes a rule forcing single-file refactors, added because an older model struggled with larger ones. A new model release handles the case well. What should you do?

    Checkpoint 6 of 6· Exam question

    A support-tooling architect is writing implementation guidance for a high-volume ticket triage service that classifies incoming tickets, needs strong reasoning, and must stay within a tight latency and cost budget. Which model recommendation should the guidance document?

    Sources123

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.Splitting a long CLAUDE.md into imported files reduces how much context it uses.Why is that wrong?

      Imports make a long file easier to organize, but imported files also load at launch. To load part of the guidance only when it's needed, move it into path-scoped rules or subdirectory files.

      Covered in What implementation guidance should contain

    2. 2.Every CLAUDE.md in the repository is read at session start, so subdirectory guidance is always in context.Why is that wrong?

      Subdirectory CLAUDE.md files load on demand, when Claude reads files in that directory, not at session start.

      Covered in Putting guidance at the right scope

    3. 3.Outdated guidance is harmless, so stale rules can stay until someone gets around to cleaning up.Why is that wrong?

      Stale instructions actively mislead, and the vendor says they are worse than having none. Delete them during regular reviews.

      Covered in Keeping guidance accurate over time

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Think of it as the briefing you would give a capable new teammate on their first morning”
      ↩︎ What implementation guidance should contain
      “Architecture in three sentences — what the major pieces are and how they communicate.”
      ↩︎ What implementation guidance should contain
      “When Claude gets something wrong twice — that is the signal a rule is missing.”
      ↩︎ Keeping guidance accurate over time
      “loaded on demand when Claude reads files in that directory, not at session start”
      ↩︎ Exam trap 2
      “delete anything stale, since outdated instructions are worse than none.”
      ↩︎ Exam trap 3
      “Most teams only need the project-root file. Commit it to git so the whole team benefits.”
      ↩︎ Checkpoint
    2. 2.
      “Size: target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce adherence.”
      ↩︎ What implementation guidance should contain
      “Team-shared instructions for the project”
      ↩︎ Putting guidance at the right scope
      “if two instructions contradict each other, Claude may pick one arbitrarily.”
      ↩︎ Keeping guidance accurate over time
      “Imports help you organize a long file but don’t reduce its context cost”
      ↩︎ Exam trap 1
    3. 3.
      “Directory owners maintain their own conventions; instructions are versioned with the code”
      ↩︎ Putting guidance at the right scope
      “You want all conventions in one place, or the same rule applies to many scattered paths”
      ↩︎ Putting guidance at the right scope
      “treat CLAUDE.md edits like any other documentation change so conventions track the code”
      ↩︎ Keeping guidance accurate over time
      “Root only; subdirectory files load on demand when Claude reads there”
      ↩︎ Prediction
      “a rule that forces single-file refactors can be deleted once the limitation is gone”
      ↩︎ Checkpoint

    Also cited

    Ready to test yourself?

    Practise the 12 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.