CCA-F › D3 Lab › Start Here

Start Here — what this lab is and how to run it

Read this once (10 minutes), then do the lab (60–90 minutes)

The short version

Domain 3 of the exam asks: where do you put an instruction so that Claude Code actually follows it, and who else gets it? There are about seven different places you can put one, they behave differently, and the exam questions are almost entirely about choosing between them.

You scored 11 out of 12 on those questions — but you told me you don't have a grip on them, and I believe you, because your machine has never had a single one of these files on it. You recognised the right answers. That's fragile. This lab makes you create each one and watch what it does, which takes about an hour and makes the whole domain concrete.

1. The one mental model

Everything in Domain 3 sorts along three questions. If you can fill in this table from memory, you can answer almost any D3 exam item — because the questions are always a scenario that fixes two columns and asks you to pick the row.

MechanismWhere it lives Does a teammate get it on git clone? When is it loaded? Can it restrict tools?
User memory
~/.claude/CLAUDE.md
Your home folder — outside any repo No — never in version control Always, in every projectNo
Project memory
CLAUDE.md in the repo root
The repository Yes Always, in this projectNo
Directory memory
subdir/CLAUDE.md
A subfolder of the repository Yes Always, when working in that subtreeNo
Path rules
.claude/rules/*.md
The repository Yes Only when the file you're editing matches a path patternNo
Slash command
.claude/commands/name.md
Repo (shared) or ~/.claude/commands/ (personal) Yes, if in the repo Only when you type /nameNo
Skill
.claude/skills/name/SKILL.md
Repo (shared) or personal Yes, if in the repo Only when invoked Yes — allowed-tools
Permissions
settings.json
Repo or your home folder Yes, if in the repo Always — and enforced, not merely followed Yes — this is the control
The single most important distinction on this table. The first six rows are guidance — Claude reads them and usually complies. The last row is enforcement — the tool call is blocked whether or not Claude wants to make it. Any exam question containing the words "must never", "guarantees", or "every time" is asking for enforcement, and every option that offers a better-worded instruction is wrong, however sensible it sounds. Exercise 8 makes you watch this happen.

The second distinction: always vs on-demand

Memory files load on every single turn, so anything you put there is a permanent tax on context. Commands and skills load only when invoked. Path rules load only when a matching file is touched. A question that complains "our CLAUDE.md is 900 lines and Claude cites React rules while editing Go" is complaining about exactly this.

The third: shared vs personal

Anything inside the repository is shared through git. Anything in ~/.claude/ is yours alone and version control will never distribute it. A question saying "every developer must have this on clone" has one answer; "one engineer is trialling this" has the other.

2. Words the lab uses, in plain language

Session
One continuous conversation with Claude Code. Everything you've said, everything it has read, and every tool result — all of it accumulates in the session. In VS Code, a session is what's in the Claude Code panel. Closing it and opening a new one starts fresh with no memory of the last one.
Context / context window
The total amount of text the model can hold at once — your messages, its replies, file contents it read, tool outputs. It's finite. When people say "context is filling up", they mean the session is approaching that limit, and things start getting missed. This is why "just read all 120 files first" is a bad idea, and it's the root of most of Domain 5 too.
CLAUDE.md
A plain Markdown file whose contents get loaded into every conversation automatically. It's how you tell Claude "in this project, we always do X". Nothing magic — it's just a file with a special name in a place Claude Code knows to look.
Frontmatter
A block of settings at the very top of a Markdown file, fenced by three dashes above and below. It's how a file carries configuration alongside its text. The format inside is YAML — a simple key: value notation where indentation creates nesting and a leading dash makes a list item. You'll write about four lines of it in this lab.
---
paths:
  - "**/*_test.go"
---

Everything below the dashes is the actual content.
Glob (path pattern)
A shorthand for matching file paths. * matches anything within one folder level; ** matches across any number of folder levels. So **/*.test.tsx means "any file ending in .test.tsx, anywhere in the project, however deeply nested." That "anywhere" is the whole point — it's why a glob can express a rule that no single folder could.
Slash command
A shortcut you type as /something. Two kinds, and the exam cares about the difference: built-in ones that ship with Claude Code (/memory, /compact, /config), and custom ones you create yourself by dropping a Markdown file into a commands/ folder. A custom command is just a saved prompt.
Skill
A saved multi-step procedure that, unlike a command, can carry configuration in its frontmatter — most importantly which tools it's allowed to use, and whether it runs in its own isolated context. Rule of thumb: if it's a saved prompt, it's a command. If it needs tool restrictions or needs to keep its noisy output out of your conversation, it's a skill.
Plan mode
A working mode where Claude explores and proposes an approach, and doesn't change any files until you approve. Not a security feature — you can leave it at any time. It exists so architectural decisions get made deliberately instead of by whatever the model typed first.
Permissions
Rules in settings.json saying which tools Claude may use and on which paths. Enforced by the program itself, not by Claude's cooperation. This is the only mechanism on the table that can actually guarantee something.
Headless / print mode
Running Claude Code from a script instead of from a chat window — you pass the prompt on the command line with -p and it prints an answer and exits, with no interactive prompting. This is how it runs inside CI. CI = the automated system that runs checks on every pull request. There's no human at a keyboard, so anything that waits for input hangs forever. That's a whole exam question.
Subagent
A separate Claude instance your main session delegates a job to. It has its own fresh context, does the work, and returns a summary — so a task that would generate thousands of lines of output doesn't flood your conversation. Critically, it inherits nothing automatically. Whatever it needs to know must be written into the instructions you spawn it with. That misconception is worth several exam items.

3. Your first five minutes, precisely

You've used Claude Code only through the VS Code panel, so here is exactly what to do — no assumed steps.

  1. The lab folder already exists. I created it at ~/cca-f-lab when we set this up. It's a throwaway with a few fake Go and TypeScript files — nothing real, nothing connected to any of your projects, and it is not pushed anywhere.
  2. Open it as its own window. In VS Code: File → Open Folder… → your home folder → cca-f-lab. Open it in a new window, not added to your current workspace.
    This matters more than it sounds. Claude Code decides which CLAUDE.md files to load based on the folder you have open. If cca-f-lab is a sub-folder of a bigger workspace, you'll be observing the wrong thing all the way through.
  3. Start a Claude Code session in that window — the same panel you're using right now.
  4. Sanity check before you begin. Type /memory and press enter. You should see very little: no project memory, because you haven't created it yet. That empty result is your baseline — Exercise 1 is about watching it change.
  5. One thing you will notice, and it is a free lesson. You already have a CLAUDE.md in your home folder (~/CLAUDE.md — the one describing CostIntelligence1 and your other projects). Because cca-f-lab sits inside your home folder, /memory may well list that file too.
    Don't delete it and don't be thrown by it. It is a live demonstration of the hierarchy: memory files found in parent folders apply to work done underneath them. Just note which entries come from it, so that when Exercise 1 adds a project-level file you can see which one wins where they disagree.
  6. Now open the lab and work through it in order. Later exercises use files that earlier ones create, and some are written to deliberately contradict each other so you can see which one wins.

4. How to actually "observe" an invisible mechanism

Each exercise has a green What to look for box, and the honest difficulty is that most of these mechanisms are invisible — nothing announces "I have loaded a rule." So the lab uses three tricks, and it's worth knowing them up front:

Ask the program, not yourself. /memory lists what is actually loaded right now. When you are unsure whether a file took effect, this settles it in two seconds. In the exam, "run /memory" being the correct answer to a confusion about conflicting conventions is exactly this reflex.

Set up a contradiction, then see which side wins. If two files give opposite instructions and Claude follows one of them, you have directly observed precedence. This is why Exercise 1 has you write conflicting rules on purpose — a single rule that gets followed teaches you nothing, because it might have done that anyway.

Test the negative case. Every rule test needs two trials: a file that should trigger it, and one that shouldn't. If the convention shows up in both, the scoping isn't doing anything and you've learnt something more useful than if it had worked.

Expect at least one thing not to behave as described, and don't let it derail you. The exam tests the behaviour documented in the official exam guide; your particular build may differ in details. If something doesn't match, note it and move on — the reasoning is what's being assessed, not your local version's quirks. I've flagged the most likely one (path rules) inside the lab.

5. What to do with 90 minutes

PartExercisesTimeWhat it settles
A — Memory1, 2, 3~30 min Where instructions live, who receives them, and when they load. The largest slice of D3.
B — Invocable things4, 5~25 min Commands vs skills, and the two frontmatter fields that separate them.
C — How work proceeds6, 7, 8~35 min Plan mode, headless CI, and guidance vs enforcement.

If you only have time for three: do 2, 5 and 8. Path globs, skill frontmatter, and permissions-versus-instruction are the three ideas that carry the most exam weight and are hardest to absorb by reading.

When you're done, re-sit the twelve D3 items in Mock Exam #4 — Q11–Q16, Q38–Q39, Q41–Q44. The test isn't whether you get them right again; you already did. It's whether you can now say why each wrong option is wrong. That's the difference between recognising an answer and knowing one.

6. Cleaning up afterwards

The lab has you add a few things to your real home folder — that's deliberate, since seeing the user-level layer behave differently from the project level is half the point. Remove them when you finish:

rm -rf ~/cca-f-lab
rm -f ~/.claude/commands/rfc-mine.md
# then edit ~/.claude/CLAUDE.md and delete the block marked "CCA-F LAB"

Your existing ~/CLAUDE.md and ~/.claude/settings.json are untouched by all of this.