A business puts prices, client status, shell commands, style rules, and private exclusions into one CLAUDE.md. Every coding session loads the file. Prices go stale beside stable tool rules. Client details cross into tasks that never needed them. A written warning looks like an enforced permission, and nothing enforces it.
Split the work four ways. CLAUDE.md holds short standing instructions about how Claude works in a scope. Context files hold the current business facts a job may need. A task brief holds the job, the source order, the output, the test, and the stop. Permissions and operating-system controls hold the denials that must actually hold.
CLAUDE.md tells the agent how to work
Claude Code's documentation describes CLAUDE.md files as persistent instructions that you write. They work at organization, user, project, and nested scopes. The documentation also says this content is context, not enforced configuration. Claude Code: Memory
Good standing instructions include:
- repository layout and build command;
- naming and formatting conventions;
- required tests before handoff;
- canonical source directories;
- output and receipt locations;
- broad approval and stopping rules;
- pointers to narrower job briefs.
Do not turn the file into a company encyclopedia. Every standing line competes for attention, and it applies to tasks that never needed it.
The business CLAUDE.md template gives a full example with sources, exclusions, outputs, approval, and verification.
Context files tell the agent what is true
A context file holds maintained facts for one business, client, project, or job. Examples: the current offer, the approved client state, an active decision, a glossary, a service boundary.
My context files follow one fixed shape: what is true now in at most ten dated lines, standing rules with their ruling dates, at most five open items with owners, and a table that points to deeper files. A context file is not a log.
Each consequential file needs an owner, an effective date, a source role, and a correction path. The file should say whether it is current, reference-only, superseded, or synthetic.
Load context only when the job needs it. A global instruction file does not need every client's current price or every project's open blocker.
The context manifest template lets several agents share one structured inventory of sources, roles, scope, load conditions, and exclusions.
Use a task brief for the recurring job
Neither CLAUDE.md nor a general context file defines a recurring result on its own.
The task brief names the job, the reader, the inputs, the source order, the output, the acceptance checks, the approval owner, the stopping point, and the receipt. It can point to the standing instructions and the current context without copying them.
For example, CLAUDE.md may require draft-only outside communication. clients/ACME/current.md holds the approved client state. jobs/weekly-update.md tells the agent to prepare this week's draft from that state and names the exact acceptance list.
When a current fact changes, edit the context record. When the job changes, edit the brief. When a workspace-wide work rule changes, edit CLAUDE.md.
Keep a change receipt for each class. An instruction change names the repositories and workflows it affects. A context correction names the fact it replaced and the outputs downstream of it. A brief change names the acceptance behavior that changed. Then one edit cannot quietly change unrelated work.
Inspect context-vs-instructions-map.csv
Route each item by responsibility.
item,class,scope,authority,load_condition,owner,update_trigger,destination
run_npm_test,work_rule,repository,standing,every_code_change,engineering,toolchain_change,CLAUDE.md
current_offer_price,business_fact,offer,current,quote_job,offer_owner,approved_price_change,context/offers/current.md
client_approval_status,business_fact,client_job,current,active_client_only,account_owner,status_change,clients/CLIENT-ID/current.md
prepare_weekly_update,job_contract,client_job,approved,weekly_update_run,account_owner,workflow_change,jobs/weekly-update.md
deny_production_write,enforced_control,system,policy,all_runs,system_admin,permission_change,.claude/settings.json
The last row matters most. A sentence in CLAUDE.md can tell the agent to avoid production writes. The actual denial belongs in permission settings, sandboxing, credentials, or tool design.
Do not place secrets in any of these files. Point to an approved secret store without printing the value.
Keep volatile facts out of standing instructions
Volatile facts make global context go stale. Prices, availability, owners, campaign status, and client decisions change on their own schedules.
Move them into current records. Let CLAUDE.md say, "Use the current approved offer from context/offers/current.md." The standing rule stays still while the owned source changes through review.
This makes errors easy to trace. If a quote uses an old price, inspect retrieval and the offer record. If the agent skipped the test, inspect the instructions and the harness. If a denied tool ran, inspect the enforced control.
Do not copy the same fact into several instruction files. Copies create hidden precedence disputes.
Route global, project, task, and client scope
Use the narrowest scope that serves every intended reader.
Organization instructions cover required company conventions. User instructions cover personal preferences that do not weaken organization policy. Project instructions cover one repository. Nested rules cover one subdirectory. Task briefs cover one job. Client context covers one resolved client identity.
Claude Code documents recursive discovery for CLAUDE.md and path-scoped rules. When you diagnose scope, run /memory to list the instruction files that loaded. Keep each file short and specific.
Resolve the active business and client before you read their context. Do not search every client directory and ask the model to pick.
Treat examples as their own source class. Label them format_only, synthetic, or approved. A polished old example should not supply current facts. If the agent cannot tell whether an example's contents are reusable, the task brief should require a stop.
The minimum-context guide shows how to load required sources first and widen only after a grounded miss.
Run the routing test list
- Create synthetic global, project, task, and client files. Put a 47-dollar offer in
context/offers/current.md, standing rules inCLAUDE.md, and the quote job injobs/quote.md. - Map every item to one responsibility.
- Start a fresh session at the repository root.
- Inspect which instruction files loaded.
- Run the task and cite the current context file.
- Change the approved price to 52 dollars without editing
CLAUDE.md. - Apply a correction and rerun.
- Add an archived 47-dollar price. Require the 52-dollar current value, the source path, and the correction ID.
- Request a production write that the test permission settings deny. Confirm zero writes, not just refusal text.
- Start from a nested directory and inspect scope.
- Remove one required context file and expect a blocked receipt.
- Give the task brief and context to another agent.
The test passes when the changed fact shows up, the standing rules stay the same, the archive is rejected, the denial holds, the missing source stops the run, and the second agent produces the same result.
Approval and stopping boundary: context file vs CLAUDE.md for business facts
The setup may create synthetic instruction files, context records, task briefs, test permissions, local drafts, corrections, and receipts.
It stops before granting production access, weakening permissions, loading broad client folders, storing secrets, changing organization-managed policy, or applying the template across repositories. The repository owner approves instructions. The business owner approves current facts. The system administrator approves enforced controls.
Some items fit none of the four classes: work rule, current fact, job contract, or enforced control. Leave those items out until their owner and scope are resolved.
