@uzysjung/agent-harness 26.149.0 → 26.151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/dist/{chunk-YSW3OLH4.js → chunk-3QBHZUVB.js} +164 -66
- package/dist/chunk-3QBHZUVB.js.map +1 -0
- package/dist/index.js +397 -293
- package/dist/index.js.map +1 -1
- package/dist/trust-tier-drift.js +5 -1
- package/dist/trust-tier-drift.js.map +1 -1
- package/package.json +1 -1
- package/templates/CLAUDE.md +145 -164
- package/templates/agents/build-error-resolver.md +1 -1
- package/templates/agents/plan-checker.md +1 -1
- package/templates/agents/reviewer.md +4 -5
- package/templates/antigravity/AGENTS.md.template +3 -23
- package/templates/codex/AGENTS.md.template +5 -56
- package/templates/hooks/protect-files.sh +4 -0
- package/templates/hooks/session-start.sh +57 -3
- package/templates/opencode/AGENTS.md.template +4 -52
- package/templates/opencode/opencode.json.template +0 -8
- package/templates/rules/change-management.md +0 -1
- package/templates/rules/cli-development.md +1 -1
- package/templates/rules/doc-governance.md +2 -0
- package/templates/rules/git-policy.md +1 -1
- package/templates/rules/ship-checklist.md +3 -3
- package/templates/rules/test-policy.md +3 -8
- package/templates/settings.json +1 -16
- package/templates/skills/agent-introspection-debugging/SKILL.md +1 -1
- package/templates/skills/audit-harness-fit/README.md +113 -0
- package/templates/skills/audit-harness-fit/SKILL.md +64 -433
- package/templates/skills/audit-harness-fit/evals/scenarios.yaml +222 -0
- package/templates/skills/audit-harness-fit/references/apply.md +66 -0
- package/templates/skills/audit-harness-fit/references/audit.md +160 -0
- package/templates/skills/audit-harness-fit/references/populate.md +74 -0
- package/templates/skills/audit-harness-fit/references/verification.md +123 -0
- package/templates/skills/audit-service-gaps/SKILL.md +6 -7
- package/templates/skills/clear-korean-communication/SKILL.md +8 -13
- package/templates/skills/compaction-handoff/SKILL.md +29 -12
- package/templates/skills/external-model-consult/SKILL.md +13 -24
- package/templates/skills/model-orchestration/SKILL.md +18 -15
- package/templates/skills/natural-korean/SKILL.md +45 -0
- package/templates/skills/north-star/SKILL.md +4 -6
- package/templates/skills/north-star/references/roadmap-method.md +2 -2
- package/templates/skills/{task-brief → objective-brief}/SKILL.md +17 -18
- package/templates/skills/recurrence-prevention/SKILL.md +16 -16
- package/dist/chunk-YSW3OLH4.js.map +0 -1
- package/templates/agents/code-reviewer.md +0 -237
- package/templates/agents/security-reviewer.md +0 -108
- package/templates/hooks/task-brief-nudge.sh +0 -57
- package/templates/skills/audit-harness-fit/references/official-criteria.md +0 -367
- package/templates/skills/continuous-learning-v2/SKILL.md +0 -361
- package/templates/skills/continuous-learning-v2/agents/observer-loop.sh +0 -362
- package/templates/skills/continuous-learning-v2/agents/observer.md +0 -189
- package/templates/skills/continuous-learning-v2/agents/session-guardian.sh +0 -150
- package/templates/skills/continuous-learning-v2/agents/start-observer.sh +0 -252
- package/templates/skills/continuous-learning-v2/config.json +0 -8
- package/templates/skills/continuous-learning-v2/hooks/observe.sh +0 -585
- package/templates/skills/continuous-learning-v2/scripts/detect-project.sh +0 -322
- package/templates/skills/continuous-learning-v2/scripts/instinct-cli.py +0 -1956
- package/templates/skills/continuous-learning-v2/scripts/lib/homunculus-dir.sh +0 -31
- package/templates/skills/continuous-learning-v2/scripts/migrate-homunculus.sh +0 -68
- package/templates/skills/continuous-learning-v2/scripts/test_parse_instinct.py +0 -1420
- package/templates/skills/humanize-korean/SKILL.md +0 -228
- package/templates/skills/spec-scaling/SKILL.md +0 -89
- package/templates/skills/strategic-compact/SKILL.md +0 -145
- package/templates/skills/strategic-compact/suggest-compact.sh +0 -54
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
# Published criteria for the resident steering layer
|
|
2
|
-
|
|
3
|
-
Every judgment in `SKILL.md` traces to a quote here. Quotes are **verbatim English** from the
|
|
4
|
-
vendor documentation, each with its source URL. Anything summarized rather than quoted is labeled
|
|
5
|
-
`(summary)`. Where the documentation is silent, this file says so instead of inventing a rule —
|
|
6
|
-
"not stated" is itself a finding when someone claims a criterion that does not exist.
|
|
7
|
-
|
|
8
|
-
Sources (collected 2026-08; several original URLs redirect, the landing URL is what is cited):
|
|
9
|
-
|
|
10
|
-
| # | Document | URL |
|
|
11
|
-
|---|---|---|
|
|
12
|
-
| 1 | Give Claude context: CLAUDE.md and better prompts | `https://support.claude.com/en/articles/14553240-give-claude-context-claude-md-and-better-prompts` |
|
|
13
|
-
| 2 | Claude Code power user tips | `https://support.claude.com/en/articles/14554000` |
|
|
14
|
-
| 3 | Prompting Claude Opus 5 | `https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5` |
|
|
15
|
-
| 4 | How Claude remembers your project (memory) | `https://code.claude.com/docs/en/memory` |
|
|
16
|
-
| 5 | Best practices for Claude Code | `https://code.claude.com/docs/en/best-practices` |
|
|
17
|
-
| 6 | Skill authoring best practices | `https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices` |
|
|
18
|
-
| 7 | Hooks guide | `https://code.claude.com/docs/en/hooks-guide` |
|
|
19
|
-
| 8 | Hooks reference | `https://code.claude.com/docs/en/hooks` |
|
|
20
|
-
| 9 | Permissions | `https://code.claude.com/docs/en/permissions` |
|
|
21
|
-
| 10 | Features overview | `https://code.claude.com/docs/en/features-overview` |
|
|
22
|
-
|
|
23
|
-
**Evidence grade.** Sources (1) and (2) were captured through a fetch tool's extraction rather than
|
|
24
|
-
a read of the rendered page: their quotes are verbatim as the tool reported them, but they were not
|
|
25
|
-
compared against the full text. Carry that caveat when citing those two. The rest were taken from
|
|
26
|
-
the full page.
|
|
27
|
-
|
|
28
|
-
## Contents
|
|
29
|
-
|
|
30
|
-
- [ⓐ What belongs resident, and what does not](#ⓐ-what-belongs-resident-and-what-does-not)
|
|
31
|
-
- [ⓑ Size, and why length costs adherence](#ⓑ-size-and-why-length-costs-adherence)
|
|
32
|
-
- [ⓒ Resident vs on-demand: rules, path scoping, skills](#ⓒ-resident-vs-on-demand-rules-path-scoping-skills)
|
|
33
|
-
- [ⓓ Advisory vs enforcement: hooks and permissions](#ⓓ-advisory-vs-enforcement-hooks-and-permissions)
|
|
34
|
-
- [ⓔ Generation lint: instructions that are now a cost](#ⓔ-generation-lint-instructions-that-are-now-a-cost)
|
|
35
|
-
- [The growth loop the documentation prescribes](#the-growth-loop-the-documentation-prescribes)
|
|
36
|
-
- [What the documentation does not say](#what-the-documentation-does-not-say)
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## ⓐ What belongs resident, and what does not
|
|
41
|
-
|
|
42
|
-
The include/exclude table (5):
|
|
43
|
-
|
|
44
|
-
> "| ✅ Include | ❌ Exclude |
|
|
45
|
-
> | Bash commands Claude can't guess | Anything Claude can figure out by reading code |
|
|
46
|
-
> | Code style rules that differ from defaults | Standard language conventions Claude already knows |
|
|
47
|
-
> | Testing instructions and preferred test runners | Detailed API documentation (link to docs instead) |
|
|
48
|
-
> | Repository etiquette (branch naming, PR conventions) | Information that changes frequently |
|
|
49
|
-
> | Architectural decisions specific to your project | Long explanations or tutorials |
|
|
50
|
-
> | Developer environment quirks (required env vars) | File-by-file descriptions of the codebase |
|
|
51
|
-
> | Common gotchas or non-obvious behaviors | Self-evident practices like "write clean code" |"
|
|
52
|
-
|
|
53
|
-
Worth including / not worth including (1):
|
|
54
|
-
|
|
55
|
-
> "Commands — how to build, test, lint, and run locally"
|
|
56
|
-
> "Conventions — naming, error handling, file layout, and 'we use X, not Y'"
|
|
57
|
-
> "Architecture in three sentences — what the major pieces are"
|
|
58
|
-
> "Hard constraints — for example, 'never write to the production database'"
|
|
59
|
-
> "Known gotchas — the issues every new engineer trips on"
|
|
60
|
-
|
|
61
|
-
> "Full API documentation (Claude can read the code directly)"
|
|
62
|
-
> "Changelogs or history"
|
|
63
|
-
> "Anything that is already obvious from the file tree"
|
|
64
|
-
> "Aspirational rules the team does not actually follow"
|
|
65
|
-
|
|
66
|
-
The character of what stays (4):
|
|
67
|
-
|
|
68
|
-
> "Keep it to facts Claude should hold in every session: build commands, conventions, project
|
|
69
|
-
> layout, "always do X" rules. If an entry is a multi-step procedure or only matters for one part
|
|
70
|
-
> of the codebase, move it to a [skill] or a [path-scoped rule] instead."
|
|
71
|
-
|
|
72
|
-
The vendor's own trim heuristic (4):
|
|
73
|
-
|
|
74
|
-
> "The [`/doctor`] checkup proposes trims for a checked-in CLAUDE.md: it cuts content Claude can
|
|
75
|
-
> derive from the codebase, such as directory layouts, dependency lists, and architecture
|
|
76
|
-
> overviews, and keeps pitfalls, rationale, and conventions that differ from tool defaults."
|
|
77
|
-
|
|
78
|
-
Assume competence (6):
|
|
79
|
-
|
|
80
|
-
> "**Default assumption:** Claude is already very smart
|
|
81
|
-
>
|
|
82
|
-
> Only add context Claude doesn't already have. Challenge each piece of information:
|
|
83
|
-
>
|
|
84
|
-
> * "Does Claude really need this explanation?"
|
|
85
|
-
> * "Can I assume Claude knows this?"
|
|
86
|
-
> * "Does this paragraph justify its token cost?""
|
|
87
|
-
|
|
88
|
-
The pruning question, verbatim (5):
|
|
89
|
-
|
|
90
|
-
> "Keep it concise. For each line, ask: *"Would removing this cause Claude to make mistakes?"* If
|
|
91
|
-
> not, cut it. Bloated CLAUDE.md files cause Claude to ignore your actual instructions!"
|
|
92
|
-
|
|
93
|
-
## ⓑ Size, and why length costs adherence
|
|
94
|
-
|
|
95
|
-
Numeric targets (1, 4):
|
|
96
|
-
|
|
97
|
-
> "Aim for a file that is short and signal-dense — under roughly 200 lines"
|
|
98
|
-
|
|
99
|
-
> "Every line is loaded into context on every request, so each one should be worth its cost"
|
|
100
|
-
|
|
101
|
-
> "**Size**: target under 200 lines per CLAUDE.md file. Longer files consume more context and
|
|
102
|
-
> reduce adherence."
|
|
103
|
-
|
|
104
|
-
> "Files over 200 lines consume more context and may reduce adherence. Use [path-scoped rules] to
|
|
105
|
-
> load instructions only when Claude works with matching files, or trim content that isn't needed
|
|
106
|
-
> in every session."
|
|
107
|
-
|
|
108
|
-
> "This limit applies only to `MEMORY.md`. CLAUDE.md files are loaded in full regardless of
|
|
109
|
-
> length, though shorter files produce better adherence."
|
|
110
|
-
|
|
111
|
-
Why it matters at all (5):
|
|
112
|
-
|
|
113
|
-
> "Most best practices are based on one constraint: Claude's context window fills up fast, and
|
|
114
|
-
> performance degrades as it fills."
|
|
115
|
-
|
|
116
|
-
The named failure pattern, with its prescribed fix (5):
|
|
117
|
-
|
|
118
|
-
> "* **The over-specified CLAUDE.md.** If your CLAUDE.md is too long, Claude ignores half of it
|
|
119
|
-
> because important rules get lost in the noise.
|
|
120
|
-
> > **Fix**: Ruthlessly prune. If Claude already does something correctly without the
|
|
121
|
-
> > instruction, delete it or convert it to a hook."
|
|
122
|
-
|
|
123
|
-
The diagnostic to run when a rule is being ignored (5):
|
|
124
|
-
|
|
125
|
-
> "If Claude keeps doing something you don't want despite having a rule against it, the file is
|
|
126
|
-
> probably too long and the rule is getting lost. If Claude asks you questions that are answered in
|
|
127
|
-
> CLAUDE.md, the phrasing might be ambiguous. Treat CLAUDE.md like code: review it when things go
|
|
128
|
-
> wrong, prune it regularly, and test changes by observing whether Claude's behavior actually
|
|
129
|
-
> shifts."
|
|
130
|
-
|
|
131
|
-
Imports do not reduce the bill (4):
|
|
132
|
-
|
|
133
|
-
> "CLAUDE.md files can import additional files using `@path/to/import` syntax. Imported files are
|
|
134
|
-
> expanded and loaded into context at launch alongside the CLAUDE.md that references them."
|
|
135
|
-
|
|
136
|
-
> "Splitting into [`@path` imports] helps organization but doesn't reduce context, since imported
|
|
137
|
-
> files load at launch."
|
|
138
|
-
|
|
139
|
-
Skill budgets, for the same audit applied to skills (6):
|
|
140
|
-
|
|
141
|
-
> "At startup, only the metadata (name and description) from all Skills is pre-loaded. Claude reads
|
|
142
|
-
> SKILL.md only when the Skill becomes relevant, and reads additional files only as needed."
|
|
143
|
-
|
|
144
|
-
> "Keep SKILL.md body under 500 lines for optimal performance"
|
|
145
|
-
|
|
146
|
-
> "For reference files longer than 100 lines, include a table of contents at the top."
|
|
147
|
-
|
|
148
|
-
> "The [context window] is a public good. Your Skill shares the context window with everything else
|
|
149
|
-
> Claude needs to know"
|
|
150
|
-
|
|
151
|
-
Writing quality criteria that decide `rewrite` verdicts (4):
|
|
152
|
-
|
|
153
|
-
> "**Specificity**: write instructions that are concrete enough to verify. For example:
|
|
154
|
-
>
|
|
155
|
-
> * "Use 2-space indentation" instead of "Format code properly"
|
|
156
|
-
> * "Run `npm test` before committing" instead of "Test your changes"
|
|
157
|
-
> * "API handlers live in `src/api/handlers/`" instead of "Keep files organized""
|
|
158
|
-
|
|
159
|
-
> "**Consistency**: if two rules contradict each other, Claude may pick one arbitrarily. Review
|
|
160
|
-
> your CLAUDE.md files, nested CLAUDE.md files in subdirectories, and [`.claude/rules/`]
|
|
161
|
-
> periodically to remove outdated or conflicting instructions."
|
|
162
|
-
|
|
163
|
-
## ⓒ Resident vs on-demand: rules, path scoping, skills
|
|
164
|
-
|
|
165
|
-
Load timing is the whole distinction (4):
|
|
166
|
-
|
|
167
|
-
> "Rules load into context every session or when matching files are opened. For task-specific
|
|
168
|
-
> instructions that don't need to be in context all the time, use [skills] instead, which only load
|
|
169
|
-
> when you invoke them or when Claude determines they're relevant to your prompt."
|
|
170
|
-
|
|
171
|
-
> "Rules without [`paths` frontmatter] are loaded at launch with the same priority as
|
|
172
|
-
> `.claude/CLAUDE.md`."
|
|
173
|
-
|
|
174
|
-
> "Rules without a `paths` field are loaded unconditionally and apply to all files. Path-scoped
|
|
175
|
-
> rules trigger when Claude reads files matching the pattern, not on every tool use."
|
|
176
|
-
|
|
177
|
-
The three-way comparison (10):
|
|
178
|
-
|
|
179
|
-
> | Aspect | CLAUDE.md | `.claude/rules/` | Skill |
|
|
180
|
-
> | **Loads** | Every session | Every session, or when matching files are opened | On demand, when invoked or relevant |
|
|
181
|
-
> | **Scope** | Whole project | Can be scoped to file paths | Task-specific |
|
|
182
|
-
> | **Best for** | Core conventions and build commands | Language-specific or directory-specific guidelines | Reference material, repeatable workflows |
|
|
183
|
-
|
|
184
|
-
> "**Rule of thumb:** Keep CLAUDE.md under 200 lines. If it's growing, move reference content to
|
|
185
|
-
> skills or split into [`.claude/rules/`] files."
|
|
186
|
-
|
|
187
|
-
Broad-only in the anchor (5):
|
|
188
|
-
|
|
189
|
-
> "CLAUDE.md is loaded every session, so only include things that apply broadly. For domain
|
|
190
|
-
> knowledge or workflows that are only relevant sometimes, use [skills] instead. Claude loads them
|
|
191
|
-
> on demand without bloating every conversation."
|
|
192
|
-
|
|
193
|
-
Procedures are skills (10, blog linked from the docs' comparison section):
|
|
194
|
-
|
|
195
|
-
> "Procedures belong in skills. CLAUDE.md is for facts Claude should hold all the time"
|
|
196
|
-
|
|
197
|
-
## ⓓ Advisory vs enforcement: hooks and permissions
|
|
198
|
-
|
|
199
|
-
Prose is context, not configuration (4):
|
|
200
|
-
|
|
201
|
-
> "Both are loaded at the start of every conversation. Claude treats them as context, not enforced
|
|
202
|
-
> configuration. To block an action regardless of what Claude decides, use a [PreToolUse hook]
|
|
203
|
-
> instead. The more specific and concise your instructions, the more consistently Claude follows
|
|
204
|
-
> them."
|
|
205
|
-
|
|
206
|
-
> "CLAUDE.md content is delivered as a user message after the system prompt, not as part of the
|
|
207
|
-
> system prompt itself. Claude reads it and tries to follow it, but there's no guarantee of strict
|
|
208
|
-
> compliance, especially for vague or conflicting instructions."
|
|
209
|
-
|
|
210
|
-
Hooks are the guarantee (5, 7, 10):
|
|
211
|
-
|
|
212
|
-
> "Hooks are user-defined shell commands. Claude Code runs them at specific points in its
|
|
213
|
-
> lifecycle, which gives you deterministic control: certain actions always happen rather than
|
|
214
|
-
> relying on the LLM to choose to run them."
|
|
215
|
-
|
|
216
|
-
> "Use hooks for actions that must happen every time with zero exceptions."
|
|
217
|
-
|
|
218
|
-
> "Unlike CLAUDE.md instructions which are advisory, hooks are deterministic and guarantee the
|
|
219
|
-
> action happens."
|
|
220
|
-
|
|
221
|
-
> "**Put guardrails in hooks.** An instruction like "never edit `.env`" in CLAUDE.md or a skill is
|
|
222
|
-
> a request, not a guarantee. A `PreToolUse` hook that blocks the edit is enforcement. If a rule
|
|
223
|
-
> must hold every time, make it a hook rather than a prompt instruction."
|
|
224
|
-
|
|
225
|
-
> "**Use a hook** when the action must happen the same way every time and doesn't need Claude to
|
|
226
|
-
> think. For example: format on save, reject `rm -rf /`, post a Slack message when a session ends."
|
|
227
|
-
|
|
228
|
-
> "**Use a skill** when Claude should decide how to apply the steps, or when the content is
|
|
229
|
-
> knowledge rather than a script. For example: a `/release` checklist, your API style guide, a
|
|
230
|
-
> debugging playbook."
|
|
231
|
-
|
|
232
|
-
Boundaries are permission rules, not hooks (7, 9):
|
|
233
|
-
|
|
234
|
-
> "The filter also fails open, running your hook regardless of pattern, when the Bash command can't
|
|
235
|
-
> be parsed. Because the filter is best-effort, use the [permission system] rather than a hook to
|
|
236
|
-
> enforce a hard allow or deny."
|
|
237
|
-
|
|
238
|
-
> "Permission rules are enforced by Claude Code, not by the model. Instructions in your prompt or
|
|
239
|
-
> `CLAUDE.md` shape what Claude tries to do, but they don't change what Claude Code allows. To
|
|
240
|
-
> grant or revoke access, use `/permissions`, the rules described here, a [permission mode], or a
|
|
241
|
-
> [PreToolUse hook]."
|
|
242
|
-
|
|
243
|
-
> "* **Add CLAUDE.md guidance**: describe your allowed curl patterns in `CLAUDE.md`. This shapes
|
|
244
|
-
> what Claude tries but doesn't enforce a boundary, so pair it with one of the options above"
|
|
245
|
-
|
|
246
|
-
Direction is asymmetric — a hook can tighten, never loosen (7):
|
|
247
|
-
|
|
248
|
-
> "The reverse is not true: a hook returning `"allow"` doesn't bypass deny rules from settings, and
|
|
249
|
-
> it can't suppress the prompt for connector tools your organization set to `ask` or MCP tools
|
|
250
|
-
> marked `requiresUserInteraction`. Hooks can tighten restrictions but not loosen them past what
|
|
251
|
-
> permission rules allow."
|
|
252
|
-
|
|
253
|
-
Context cost of a hook is zero — until it speaks (10):
|
|
254
|
-
|
|
255
|
-
> "**What loads:** Nothing by default. Hooks execute outside the main conversation.
|
|
256
|
-
> **Context cost:** Zero, unless the hook returns output that gets added as messages to your
|
|
257
|
-
> conversation."
|
|
258
|
-
|
|
259
|
-
Static context does not justify a hook (8, 7):
|
|
260
|
-
|
|
261
|
-
> "Runs when Claude Code starts a new session or resumes an existing session. Useful for loading
|
|
262
|
-
> development context like existing issues or recent changes to your codebase, or setting up
|
|
263
|
-
> environment variables. For static context that doesn't require a script, use [CLAUDE.md]
|
|
264
|
-
> instead."
|
|
265
|
-
|
|
266
|
-
> "For injecting context on every session start, consider using [CLAUDE.md] instead."
|
|
267
|
-
|
|
268
|
-
Hook blind spots worth checking before trusting one (7):
|
|
269
|
-
|
|
270
|
-
> "Claude can also create or modify files by running shell commands through the `Bash` tool. If
|
|
271
|
-
> your hook must see every file change, such as for compliance scanning or audit logging, add a
|
|
272
|
-
> [`Stop`] hook that scans the working tree once per turn."
|
|
273
|
-
|
|
274
|
-
> "Exit code 0 with no output means the hook has no decision to report, so the tool call continues
|
|
275
|
-
> through the normal [permission flow]. The hook can deny the call, but staying silent doesn't
|
|
276
|
-
> approve it."
|
|
277
|
-
|
|
278
|
-
> "Keep the matcher as narrow as possible. Matching on `.*` or leaving the matcher empty would
|
|
279
|
-
> auto-approve every permission prompt, including file writes and shell commands."
|
|
280
|
-
|
|
281
|
-
## ⓔ Generation lint: instructions that are now a cost
|
|
282
|
-
|
|
283
|
-
All quotes in this section are from (3) and apply to current-generation models. They are the
|
|
284
|
-
reason a steering layer written for an older model needs re-reading rather than only trimming.
|
|
285
|
-
|
|
286
|
-
> "Claude Opus 5 verifies its own work without being told to. If your prompt contains explicit
|
|
287
|
-
> verification instructions ("include a final verification step for any non-trivial task," "use a
|
|
288
|
-
> subagent to verify"), remove them: instructions like these cause over-verification on Claude Opus
|
|
289
|
-
> 5, and removing them reduces wasted tokens with no loss in quality. The same applies to legacy
|
|
290
|
-
> harness scaffolding that adds separate verification steps."
|
|
291
|
-
|
|
292
|
-
> "Claude Opus 5 catches and fixes its own mistakes well without prompting. Avoid instructing
|
|
293
|
-
> re-checks it already performs ("double-check your answer," "re-verify before responding"); like
|
|
294
|
-
> verification instructions, these compound with the model's own behavior and add cost without
|
|
295
|
-
> improving results."
|
|
296
|
-
|
|
297
|
-
> "If your review prompt says "only report high-severity issues" or "be conservative," the model
|
|
298
|
-
> may follow that instruction literally and report less; ask it to report everything and filter in
|
|
299
|
-
> a separate pass instead."
|
|
300
|
-
|
|
301
|
-
> "If your system prompt contains a rule instructing the model not to think or not to reason,
|
|
302
|
-
> remove it; that kind of instruction increases tag leakage."
|
|
303
|
-
|
|
304
|
-
> "Instructions that call out thinking tags by name are less effective than the general form, so
|
|
305
|
-
> avoid naming them specifically."
|
|
306
|
-
|
|
307
|
-
> "Positive examples of the communication style you want tend to be more effective than
|
|
308
|
-
> instructions about what not to do."
|
|
309
|
-
|
|
310
|
-
Related, from (5) — the same over-asking failure on the review side:
|
|
311
|
-
|
|
312
|
-
> "A reviewer prompted to find gaps will usually report some, even when the work is sound, because
|
|
313
|
-
> that is what it was asked to do. Chasing every finding leads to over-engineering: extra
|
|
314
|
-
> abstraction layers, defensive code, and tests for cases that can't happen."
|
|
315
|
-
|
|
316
|
-
## The growth loop the documentation prescribes
|
|
317
|
-
|
|
318
|
-
This is what the audit is the counterweight to — the add-side loop is explicit and has no
|
|
319
|
-
documented reverse.
|
|
320
|
-
|
|
321
|
-
> "Treat CLAUDE.md as the place you write down what you'd otherwise re-explain. Add to it when:
|
|
322
|
-
>
|
|
323
|
-
> * Claude makes the same mistake a second time
|
|
324
|
-
> * A code review catches something Claude should have known about this codebase
|
|
325
|
-
> * You type the same correction or clarification into chat that you typed last session
|
|
326
|
-
> * A new teammate would need the same context to be productive" — (4)
|
|
327
|
-
|
|
328
|
-
> "anytime Claude does something incorrectly, add it to `CLAUDE.md` so it knows not to repeat the
|
|
329
|
-
> mistake." — (2)
|
|
330
|
-
|
|
331
|
-
> "If you do something more than once a day, turn it into a skill." — (2)
|
|
332
|
-
|
|
333
|
-
The trigger table that routes each addition to a layer, all eight rows — (10):
|
|
334
|
-
|
|
335
|
-
> | Trigger | Add |
|
|
336
|
-
> | Claude gets a convention or command wrong twice | Add it to [CLAUDE.md] |
|
|
337
|
-
> | You keep typing the same prompt to start a task | Save it as a user-invocable [skill] |
|
|
338
|
-
> | You paste the same playbook or multi-step procedure into chat for the third time | Capture it as a [skill] |
|
|
339
|
-
> | You keep copying data from a browser tab Claude can't see | Connect that system as an [MCP server] |
|
|
340
|
-
> | Claude reads many files to find where a symbol is defined or used | Install a [code intelligence plugin] for your language |
|
|
341
|
-
> | A side task floods your conversation with output you won't reference again | Route it through a [subagent] |
|
|
342
|
-
> | You want something to happen every time without asking | Write a [hook] |
|
|
343
|
-
> | A second repository needs the same setup | Package it as a [plugin] |
|
|
344
|
-
|
|
345
|
-
> "The same triggers tell you when to update what you already have. A repeated mistake or a
|
|
346
|
-
> recurring review comment is a CLAUDE.md edit, not a one-off correction in chat. A workflow you
|
|
347
|
-
> keep tweaking by hand is a skill that needs another revision." — (10)
|
|
348
|
-
|
|
349
|
-
(summary) Document (2) additionally groups hook usage by lifecycle event — session start for
|
|
350
|
-
dynamic context, pre-tool for logging and blocking, post-tool for formatting, permission-request
|
|
351
|
-
for routing, stop for deterministic checks, post-compaction for re-injection — and recommends
|
|
352
|
-
pre-allowing safe commands through `/permissions` and then committing the result to the team's
|
|
353
|
-
`settings.json`. Treated as a summary, not a quote.
|
|
354
|
-
|
|
355
|
-
## What the documentation does not say
|
|
356
|
-
|
|
357
|
-
Claiming one of these as a criterion is inventing a rule. Say "not stated" instead.
|
|
358
|
-
|
|
359
|
-
- **No line or file-count budget for `.claude/rules/`.** The 200-line target is stated for
|
|
360
|
-
CLAUDE.md only. There is no published cap on how many rule files a project may have.
|
|
361
|
-
- **No number for adherence loss per added instruction.** The published causal claim is about
|
|
362
|
-
*file length* ("longer files ... reduce adherence"), never about rule *count*.
|
|
363
|
-
- **No published rule for how many hooks are too many.** Only per-hook timeouts, the parallel/dedup
|
|
364
|
-
behavior, and administrative kill switches (`disableAllHooks`, managed-hooks-only settings).
|
|
365
|
-
- **Hook security guidance** was not located in the current hooks reference when these sources were
|
|
366
|
-
collected — the guide still links a `#security-considerations` anchor, but the section itself was
|
|
367
|
-
not found. Do not cite it from memory.
|