agent-bios 0.9.9 → 0.10.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.md +9 -1
- package/claude/CLAUDE.md +4 -41
- package/claude/guides/cli-multi-model-workflow.md +3 -3
- package/claude/guides/coding-staged-workflow.md +50 -48
- package/claude/guides/concept-economy.md +187 -0
- package/claude/guides/documentation-hygiene.md +112 -0
- package/claude/guides/review-request.md +9 -7
- package/claude/guides/tooling-gotchas.md +10 -0
- package/claude/guides/verification-discipline.md +166 -0
- package/claude/hooks/tooling-gotchas-hook.py +323 -13
- package/codex/AGENTS.md +4 -41
- package/codex/guides/cli-multi-model-workflow.md +3 -3
- package/codex/guides/coding-staged-workflow.md +50 -48
- package/codex/guides/concept-economy.md +187 -0
- package/codex/guides/documentation-hygiene.md +112 -0
- package/codex/guides/review-request.md +9 -7
- package/codex/guides/tooling-gotchas.md +10 -0
- package/codex/guides/verification-discipline.md +166 -0
- package/compose/assemble.py +10 -1
- package/compose/check-domains.py +882 -6
- package/compose/domains.json +10 -44
- package/install.sh +129 -12
- package/package.json +8 -4
- package/provenance.json +1 -0
- package/claude/hooks/__pycache__/tooling-gotchas-hook.cpython-314.pyc +0 -0
package/README.md
CHANGED
|
@@ -49,6 +49,7 @@ Two layers:
|
|
|
49
49
|
| `SURFACES.md` | where knowledge and tools reach a model, and what each place admits — every entry names the code that realizes it |
|
|
50
50
|
| `FINDINGS.md` | open implementation defects, live; closing one deletes its entry |
|
|
51
51
|
| `design/`, `benchmarks/` | design records and the instruction-behavior benchmark |
|
|
52
|
+
| `research/` | corpus research (the 12,749-file AGENTS.md/CLAUDE.md classification): reports, scripts, labeling record; bulk data stays local by `.gitignore` rule |
|
|
52
53
|
| `DEPENDENCIES.md` | external tools / host CLIs / model providers + verified versions |
|
|
53
54
|
|
|
54
55
|
`config.toml` and `settings.json` are machine-specific (trust lists, hook paths, secrets) and intentionally untracked.
|
|
@@ -58,12 +59,19 @@ Two layers:
|
|
|
58
59
|
| Guide | Scope |
|
|
59
60
|
| --- | --- |
|
|
60
61
|
| `cli-multi-model-workflow` | multi-model CLI workflow: Default Frame, role slots/tiers, delegation mechanics, driving Codex CLI directly, cache economy, unattended-batch safety, halt/resume, handoff contract, Environment Binding |
|
|
61
|
-
| `coding-staged-workflow` | staged development: design → process → implement, review loop, severity contract,
|
|
62
|
+
| `coding-staged-workflow` | staged development: design → process → implement, lightweight path, review loop, severity contract, stop conditions |
|
|
63
|
+
| `verification-discipline` | verification depth and per-domain mix (owns the Verification Menus), case space, what a green result is worth |
|
|
64
|
+
| `concept-economy` | concept-surface economy: reuse / extend / rename / split, split triggers, migration compatibility |
|
|
65
|
+
| `documentation-hygiene` | where comments, history, and handoffs belong; how to phrase rules others follow |
|
|
62
66
|
| `llm-capability-boundary` (+ `-patterns`, `-examples`) | LLM/tool/code authority boundary: field authority, accepted output channels, structural enforcement, worked examples |
|
|
63
67
|
| `mock-realization-boundary` | mock/fixture realization vs product semantic path |
|
|
64
68
|
| `svg-visualization-guide` | SVG diagram / service-blueprint spec |
|
|
65
69
|
| `implementation-map` | IMPLEMENTATION_MAP.html current-state dashboard |
|
|
66
70
|
|
|
71
|
+
The table names the load-bearing guides; the full inventory and its per-domain
|
|
72
|
+
classification live in `compose/domains.json`, which the domains gate holds against the
|
|
73
|
+
tree.
|
|
74
|
+
|
|
67
75
|
## Edit workflow
|
|
68
76
|
|
|
69
77
|
1. Edit the English canonical (`claude/`), and the Korean canonical (`ko/claude/`) when the change is user-facing.
|
package/claude/CLAUDE.md
CHANGED
|
@@ -52,57 +52,25 @@
|
|
|
52
52
|
|
|
53
53
|
## Concept Economy
|
|
54
54
|
|
|
55
|
-
-
|
|
56
|
-
- Treat lasting or shared names as concept candidates: features, entities, variables, types, helper modules, artifacts, config keys, CLI flags, MCP/tool fields, public response fields, artifact fields, enum values, failure kinds, retry/recovery tokens, process names, and documentation terms.
|
|
57
|
-
- Before adding or changing a concept, find the nearest existing concept and choose one path explicitly: reuse, extend, rename, or split.
|
|
58
|
-
- Prefer broad, stable concepts with precise properties over narrow near-duplicates.
|
|
55
|
+
- When adding, changing, renaming, splitting, or exposing anything lasting or shared — a feature, entity, type, field, config key, CLI flag, enum value, failure kind, artifact, or documentation term — read and use `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/concept-economy.md` as a scoped extension of this section.
|
|
59
56
|
- Before fixing a review finding or test failure, classify the fix as reducing, preserving, or increasing the active concept surface.
|
|
60
|
-
- Split or promote a concept when it changes runtime behavior, ownership, lifecycle, validation, failure mode, user-visible behavior, audit/replay requirements, authority, persistence, user control, or failure handling.
|
|
61
|
-
- Keep derived values as properties or projections of their source concept when tools/code can derive them from the source authority.
|
|
62
|
-
- Keep internal projections and helper outputs internal unless public exposure is required for user behavior, product contract, or artifact truth.
|
|
63
|
-
- Distinguish authority from visibility: public responses may expose bounded views, while the source concept or artifact remains the truth location.
|
|
64
|
-
- Reuse existing enum values, failure kinds, retry/recovery tokens, and result/failure surfaces before introducing new vocabulary.
|
|
65
|
-
- Use fallback paths, compatibility shims, and deprecated alias normalization when explicit migration compatibility is required.
|
|
66
|
-
- Keep comments and active docs aligned with runtime behavior, failure semantics, retry policy, ownership, and authority.
|
|
67
|
-
- When a split is necessary, name the parent concept, explain the reason for the split, and map aliases or variants back to the canonical concept.
|
|
68
|
-
- In ontology work, check existing entities and relations first, then keep the concept graph compact.
|
|
69
|
-
- In code work, follow existing naming patterns and consolidate variations introduced by the current change.
|
|
70
|
-
- Let the repository's shape mirror its concept graph: keep each shared, lasting concept's canonical name traceable across the layers it appears in — path, module, type/interface, field, and public API — so the structure is navigable by name (grep-findable, path-guessable) without a translation table. This binds shared concepts only; transient locals, generic containers, and framework- or tooling-imposed layout may diverge.
|
|
71
57
|
|
|
72
58
|
## Coding Guidelines
|
|
73
59
|
|
|
74
60
|
- For `.xlsx` editing, generation, reconciliation, validation, or connected spreadsheet processing, use the installed `spreadsheet-processing` skill when present — with plain tools/code as the fallback — and validate formula-dependent Excel results with the real Microsoft Excel engine.
|
|
75
|
-
- For
|
|
61
|
+
- For development work, read and use `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/coding-staged-workflow.md` as a scoped extension of these Coding Guidelines — a change too narrow to need it is what its lightweight path decides, not a reason to skip the read.
|
|
76
62
|
- For mock, fixture, fake, stub, simulated-provider, or test-realization design, read and use `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/mock-realization-boundary.md` as a scoped extension of these Coding Guidelines.
|
|
77
|
-
- When the user asks to "설계" or design, read the coding-staged-workflow guide and focus on high-level design and implementation-process design; move to implementation only after the user asks to implement or approves the plan.
|
|
78
|
-
- Think before coding: state key assumptions and surface ambiguity early.
|
|
79
|
-
- Build the smallest viable functional path that satisfies the qualitative completion criteria. Minimum limits surface area, configuration, abstractions, optional scope, and implementation spread; it must not reduce required behavior, runtime authority, evidence quality, or verification depth.
|
|
80
|
-
- Treat viability as real behavior against real inputs, real authority, and the intended runtime path. Use mocks only for tests, fixtures, or explicitly requested simulations; mock-backed paths support verification but do not count as product completion.
|
|
81
|
-
- Make surgical changes. Touch only what the request requires, preserve existing style, and avoid casual adjacent refactors.
|
|
82
|
-
- Clean up issues introduced by the current change. Mention unrelated dead code separately.
|
|
83
63
|
- Own the full lifecycle of what you create — spawned processes and handles through teardown, artifacts out of tool-managed temp locations into a durable home — and keep differently-owned state separate: never colocate deploy-managed and user-owned data in one overwrite-managed file.
|
|
84
|
-
- Define success criteria before multi-step coding work, then verify against them.
|
|
85
|
-
- For bugs, prefer a reproducing test before the fix when practical.
|
|
86
|
-
- Every changed line should trace back to the user's request.
|
|
87
|
-
- Fix the root cause at its authority rather than the visible symptom: when downstream patches keep compensating for bad inputs, fix upstream at the source; when each fix only exposes another instance of the same defect, single-source the value and fix the whole class instead of patching instances.
|
|
88
64
|
- Land risky or behavior-changing work behind a default-off path that preserves current behavior when off (proven by diff) and is enabled by an explicit opt-in, so the change stays reversible and the on/off difference is isolated. When a request would weaken a security or authority posture — removing or loosening an authentication/authorization check or access scope, or lowering a protective value such as session/token lifetime, password/crypto strength, rate limit, lockout threshold, or audit retention — treat it as a decision, not a rote edit, even when it is a one-line change and nothing in the code labels the value as security-relevant: state the consequence and at least one safer path to the real goal, and do not apply the weakening in the same turn — proceed only after the user confirms they accept the tradeoff.
|
|
89
65
|
|
|
90
66
|
## Verification Discipline
|
|
91
67
|
|
|
92
68
|
- For composing a review request, packet, or reviewer role — the evidence bar, the verdict shape, and why a review returned noise, nothing, or a clean bill of health — read and use `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/review-request.md` as a scoped extension of this section.
|
|
93
69
|
- After every meaningful code, ontology, config, data, spreadsheet, or documentation change, run a verification loop regardless of commit or handoff status.
|
|
94
|
-
-
|
|
95
|
-
- Add the narrowest reliable runtime or semantic test that proves the changed behavior, meaning, or contract.
|
|
96
|
-
- Pick each domain's verification mix (code, ontology, config/data, spreadsheets, docs) from the Verification Menus in the coding-staged-workflow guide.
|
|
97
|
-
- Let the LLM derive scenarios from the diff, user impact, concept impact, and failure modes; let tools/code execute and verify them. Where an artifact already defines the case space — a config, a schema, a route table — enumerate the cases from it rather than from judgment, and record real output as the expectation instead of typing one: a hand-listed set of cases silently stops covering as the artifact grows past it.
|
|
98
|
-
- Keep E2E stable with deterministic data, resilient selectors, isolated external dependencies, and explicit waits.
|
|
70
|
+
- For choosing verification depth, the per-domain mix, the case space, what makes a completion criterion falsifiable, how to keep an E2E stable, or what a green result is worth, read and use `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/verification-discipline.md` as a scoped extension of this section — its Verification Menus carry the per-domain mixes.
|
|
99
71
|
- Report the checks run, results, and any unverified risk before calling the work done.
|
|
100
72
|
- Trust a green check only when it traversed the actual changed code through the real dispatch and real calls (not a mock, dry-run, or bypass), and remember that "it ran" is not "quality met" — a fallback, floor, or mock run is not done; treat a zero-findings verdict as suspect until you confirm the harness ran rather than silently crashed, and make PASS mean concrete assertions on real output from the real path.
|
|
101
|
-
- Make completion criteria falsifiable: prefer signals that fail when the mechanism is wrong (negative or contrast controls), and if no existing gate can judge a criterion, build the executable judge or do not claim the criterion met.
|
|
102
73
|
- Before comparing two of anything (cost, performance, quality, frequency), fix a common basis — units, denominators, population, measurement surface — compare on equivalent output, and exclude or flag non-representative data (promotions, outages, smoke slices).
|
|
103
|
-
- For non-trivial designs or high-risk changes, run independent adversarial review across distinct lenses, ideally on the design before implementation, and re-verify each finding against real code before acting on it. Apply the convergence heuristic by reviewer kind (detailed in the multi-model guide): same-kind convergence is high confidence but same-kind reviewers share blind spots — their shared "clean" is not verification; different-kind divergence is the expected signal — act on the union. Never accept an orchestrated workflow's self-reported all-green as sufficient; independently re-run the diff inspection and verification suite yourself.
|
|
104
|
-
- Proportion verification to cost, risk, and information gain: before expensive or slow live runs, diagnose in code and replay the changed deterministic logic over persisted real artifacts, probe at N=1 with inputs precondition-checked, and reserve full design-review-plus-live verification for first-of-kind or authority-changing work; proportion assurance to the deployment context — a single-user, own-data tool does not warrant production-grade assurance; prefer delivery.
|
|
105
|
-
- Trust a green / zero-findings verdict only if the check could have failed over a real, non-empty subject: assert the entity-under-test set has cardinality > 0 before any "no bad X" or "all X satisfy P" claim (an empty subject set passes vacuously and proves nothing), and for any test touching a branch you add or delete, confirm its inputs satisfy the live branch's entry guard — a copied fixture that fails the new guard silently routes into the about-to-be-deleted dead branch and stays green even after the real behavior breaks. When a check goes green unexpectedly fast or empty, dump what it actually ran over. Checker code itself must assert the expected shape and fail loud — a permissive fallback (`a || b`) inside a gate absorbs wrong assumptions and keeps passing.
|
|
106
74
|
|
|
107
75
|
## Tooling and Operational Safety
|
|
108
76
|
|
|
@@ -113,7 +81,6 @@
|
|
|
113
81
|
- Never accept secrets through transcript- or history-logged channels.
|
|
114
82
|
- When a secret must be supplied, provide a gitignored env slot, read the value only from the environment, verify its presence and format without echoing it, and advise rotating anything already pasted; assume a resource-creating call may echo the secret back in its success output — suppress or discard the response body, and treat an echoed secret as pasted (rotate).
|
|
115
83
|
- Treat a coarse runtime signal — a failure label, a `ps`/process-inspection result, idle CPU with no output — as a hypothesis, and confirm the cause against the authoritative low-level evidence the mechanism emits before attributing blame or intervening: read the raw provider/skill log payload (e.g. `input_tokens:0` proves a pre-dispatch rejection that exonerates your content and your change), and confirm a config/env toggle reached a subprocess via a cheap artifact the gated branch emits rather than an unreliable `ps` env read. A multi-minute LLM or subprocess call at ~0% CPU with an output gap is the normal signature of I/O wait, not a hang — check process state and the call trace's in-flight duration before acting, so you do not abort healthy long-running work.
|
|
116
|
-
- Before reasoning about what a branch contains or opening a PR, run `git fetch` and compute the range as `origin/<base>..HEAD`, never `<base>..HEAD` against the local tracking ref — on a shared repo the local base drifts behind the remote until you pull, silently inflating the diff with already-merged work; if the range is surprisingly large, suspect a stale base before suspecting the branch. Platform "mergeable" flags are computed against the base only — sibling PRs can each look clean yet conflict; before picking a merge order, diff their changed-file sets and simulate the sequence.
|
|
117
84
|
|
|
118
85
|
## Multi-Model Workflow
|
|
119
86
|
|
|
@@ -130,11 +97,7 @@
|
|
|
130
97
|
## Documentation Hygiene
|
|
131
98
|
|
|
132
99
|
- Keep runtime code, active docs, and execution-facing docs focused on current behavior, current decisions, current contracts, current authority, and current failure handling.
|
|
133
|
-
-
|
|
134
|
-
- Put backward-compatibility notes, deprecated behavior, migration rationale, historical alternatives, change narratives, and handoff logs in isolated documentation paths such as `docs/`, `design/`, `archive/`, or `deprecated/`.
|
|
135
|
-
- Link from active docs or code to isolated notes only when the current task needs that history or the reference helps future maintainers.
|
|
136
|
-
- Phrase guidelines as desired behavior and preferred patterns.
|
|
137
|
-
- Prefer established docs such as `CHANGELOG.md`, `IMPLEMENTATION_MAP.html`, or handoff notes for change history and implementation context.
|
|
100
|
+
- For where a comment, a compatibility note, deprecated behavior, a rejected alternative, a migration rationale, a change narrative, or a handoff log belongs — how to phrase a rule others will follow, and whether active docs should link to history — read and use `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/documentation-hygiene.md` as a scoped extension of this section.
|
|
138
101
|
|
|
139
102
|
## Visual Explanations
|
|
140
103
|
|
|
@@ -57,7 +57,7 @@ Delegate execution, not decisions. A unit is delegable only when it is decision-
|
|
|
57
57
|
- Use a resident teammate only for dependent slices in one burst. Verify that the CLI preserves its model and context; resume-after-completion may silently change both. Retire after the burst or cache TTL, and persist durable knowledge in files.
|
|
58
58
|
- After a discard or direction change, respawn once a routine round costs about as much as a fresh slice. Recover unique in-flight state to files first.
|
|
59
59
|
- Redirects to busy workers may queue rather than preempt. Check artifacts before destructive redirects, phrase them conditionally, and stop an actively harmful worker by scoped PID/worktree authority.
|
|
60
|
-
- Idle/progress notifications are hypotheses; verify repo artifacts before re-dispatch. Cross-reset state belongs in files, not task boards or transcripts. When polling concurrent async jobs, pin the exact id/handle received at dispatch — a "latest" convenience selector can silently point at a sibling job and return plausible-but-wrong results.
|
|
60
|
+
- Idle/progress notifications are hypotheses; verify repo artifacts before re-dispatch. An idle signal is liveness decoupled from the report: a subagent can go idle without ever delivering its result, so idle-without-report is not done — request the report explicitly rather than waiting. Cross-reset state belongs in files, not task boards or transcripts. When polling concurrent async jobs, pin the exact id/handle received at dispatch — a "latest" convenience selector can silently point at a sibling job and return plausible-but-wrong results.
|
|
61
61
|
- Give reviewers/subagents a read-only diff, snapshot, or isolated worktree — not the live tree the main is editing — and forbid destructive git ops (checkout --, reset --hard, stash, clean) on any tree with uncommitted work; re-verify tree integrity before trusting results produced mid-edit.
|
|
62
62
|
- Review cost scales with the diff, so layered review preserves delegation savings. Lower reviewer tier before dropping a review kind.
|
|
63
63
|
|
|
@@ -127,9 +127,9 @@ How much independence a review actually bought, as an ordinal grade per reviewer
|
|
|
127
127
|
|
|
128
128
|
## Dual-Provider Design Drafts
|
|
129
129
|
|
|
130
|
-
- Trigger: the task is design
|
|
130
|
+
- Trigger: the task is design — high-level shape and implementation process, before any code — AND two or more providers are reachable at frontier tier. Reachability via an OAuth session is subscription-covered — no marginal spend, so no approval and no question: if a non-main-context OAuth frontier provider exists, proceed with the dual-provider design directly. The consent gate applies ONLY to a provider reachable solely via a metered API key: dispatching to it needs the user's explicit per-request approval of that spend (per-request, not standing — an old approval does not carry to the next design). If the only way to reach a second provider is un-approved metered API spend, stay single-provider rather than blocking the design.
|
|
131
131
|
- Mechanics: compose ONE blind packet (evidence, constraints, rubric, neutral alternatives — the escalation-gate packet shape) and dispatch it unchanged to one frontier-tier model per provider; drafts stay independent — neither sees the other's output. Then adjudicate: compare the two dual-provider frontier design drafts against the rubric, take the winner as the skeleton, graft the loser's superior parts, and record what differed and why the synthesis chose as it did (FRONTIER disposition line).
|
|
132
|
-
- Packet injection: a dispatched designer is hermetic — it reads only its packet and never loads this corpus. Inject the design principles the corpus would have supplied: concept economy (reuse/extend/rename/split, compact concept graph), the LLM/tools-code capability boundary, the staged
|
|
132
|
+
- Packet injection: a dispatched designer is hermetic — it reads only its packet and never loads this corpus. Inject the design principles the corpus would have supplied: concept economy (reuse/extend/rename/split, compact concept graph), the LLM/tools-code capability boundary, the staged design rules (smallest viable path, falsifiable done-when), and any domain-specific principles the design touches. A draft produced without the principles is not comparable to one produced with them.
|
|
133
133
|
|
|
134
134
|
## Unattended Batch Safety
|
|
135
135
|
|
|
@@ -7,7 +7,7 @@ use_when:
|
|
|
7
7
|
- architecture changes, new features, cross-module or ontology changes, review-driven fixes
|
|
8
8
|
- the user asks to design ("설계") before implementation
|
|
9
9
|
- judging materiality of review findings and deciding when to stop or redesign
|
|
10
|
-
-
|
|
10
|
+
- deciding where a stage's verification points and review gates belong in the work plan
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
# Coding Guidelines: Staged Workflow
|
|
@@ -16,7 +16,12 @@ This guide is a scoped extension of the global Coding Guidelines. Use it for mea
|
|
|
16
16
|
|
|
17
17
|
It operates inside the existing global rules for requested scope, concept economy, LLM/tools/code boundary, verification discipline, and documentation hygiene.
|
|
18
18
|
|
|
19
|
-
For trivial edits, use the lightweight inspect-edit-verify path
|
|
19
|
+
For trivial edits, use the lightweight inspect-edit-verify path, defined here in full:
|
|
20
|
+
read the surface you are about to touch before changing it; if the request admits more
|
|
21
|
+
than one reading, state the reading you act on; make the surgical edit — every changed
|
|
22
|
+
line traceable to the request, adjacent code left alone; verify with the narrowest
|
|
23
|
+
reliable check that would fail if the edit were wrong; clean up only what your own
|
|
24
|
+
change introduced. The stages below are for work that outgrows that sentence.
|
|
20
25
|
|
|
21
26
|
When the user asks to "설계" or design, stay in design mode. Focus on high-level design and implementation-process design, then present the plan, tradeoffs, review gates, and implementation trigger. Move to implementation after the user asks to implement or approves the plan.
|
|
22
27
|
|
|
@@ -32,8 +37,45 @@ When the user asks to "설계" or design, stay in design mode. Focus on high-lev
|
|
|
32
37
|
2. Implementation-process design: turn the design into an ordered work plan with dependencies, verification points, review gates, and redesign triggers.
|
|
33
38
|
3. Implementation: make the smallest viable functional changes that satisfy the approved design and process plan.
|
|
34
39
|
|
|
40
|
+
**Minimum** limits surface area, configuration, abstractions, optional scope, and implementation spread. It must not reduce required behavior, runtime authority, evidence quality, or verification depth — a change that ships less of those is not smaller, it is less finished, and "smallest viable" becomes the excuse rather than the discipline.
|
|
41
|
+
|
|
42
|
+
**Viable** means real behavior: the change runs against real inputs, real authority, and the intended runtime path. Mocks belong to tests, fixtures, and explicitly requested simulations — a mock-backed path supports verification but does not count as product completion, even when nothing labels it a mock; the full boundary lives in `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/mock-realization-boundary.md`.
|
|
43
|
+
|
|
44
|
+
Define the success criteria before multi-step work starts, then verify against those criteria rather than against what you ended up building. Criteria written afterwards describe the implementation, so they cannot fail it.
|
|
45
|
+
|
|
35
46
|
When simplifying a pipeline, moving processing downstream and dropping captured source fields are separate decisions: relocation is free simplification, but reducing captured information is riskier and needs explicit confirmation — "no current consumer" is not evidence of no future value.
|
|
36
47
|
|
|
48
|
+
## Making the change
|
|
49
|
+
|
|
50
|
+
Deciding what to build and building it are different disciplines. This one is about leaving a
|
|
51
|
+
change that reads as the change that was asked for.
|
|
52
|
+
|
|
53
|
+
**State the assumption before you act on it.** Most wasted implementation is not a wrong answer to
|
|
54
|
+
the question; it is a right answer to a question nobody asked. Where the request admits more than
|
|
55
|
+
one reading, say which one you took and keep going — surfacing it early costs a sentence, and
|
|
56
|
+
surfacing it after the work costs the work.
|
|
57
|
+
|
|
58
|
+
**Surgical means legible, not minimal.** Touch what the request requires, follow the file's
|
|
59
|
+
existing style rather than your preferred one, and leave adjacent code alone even when it is
|
|
60
|
+
worse than what you are adding. A diff carrying an unrequested refactor forces the reviewer to
|
|
61
|
+
separate the two by hand, and the improvement is the part that gets dropped when they run out of
|
|
62
|
+
patience.
|
|
63
|
+
|
|
64
|
+
**Clean up what this change introduced, and only that.** Dead code, unused imports, and debris
|
|
65
|
+
your own edit created belong in the same change. Debris you found belongs in a sentence: name it
|
|
66
|
+
so it is visible, and leave it where the person who owns it can decide.
|
|
67
|
+
|
|
68
|
+
**For a bug, reproduce before you fix, when that is practical.** A test written after the fix
|
|
69
|
+
proves the code does what it now does. A test written before proves you understood the failure —
|
|
70
|
+
and it is the only version that can tell you the fix was unnecessary, or that it addressed a
|
|
71
|
+
different bug than the one reported.
|
|
72
|
+
|
|
73
|
+
**Fix the cause at its authority, not the symptom where it shows.** Two signals say you are
|
|
74
|
+
patching downstream: compensating code keeps accumulating around bad inputs, and each fix reveals
|
|
75
|
+
another instance of the same defect. The first says go upstream to where the value is produced.
|
|
76
|
+
The second says the instances are a class — single-source the value and fix the class, because
|
|
77
|
+
patching them one at a time is a queue that refills.
|
|
78
|
+
|
|
37
79
|
## Review Loop
|
|
38
80
|
|
|
39
81
|
- At each stage, run review loops as appropriate: self review, subagent review when available, and structured multi-lens review when the repository or domain supports one (concrete tool: Environment Binding below).
|
|
@@ -45,57 +87,17 @@ When simplifying a pipeline, moving processing downstream and dropping captured
|
|
|
45
87
|
- Treat low and info as non-blocking unless requested or promoted by new evidence.
|
|
46
88
|
- When a document declares sections co-authoritative for a rule (fixture blocks, conformance appendices), treat every occurrence as one replicated value: propagate edits to all declared locations in the same pass and check propagation completeness explicitly in review.
|
|
47
89
|
|
|
48
|
-
## Verification
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- Ontology: static graph checks, concept economy gates, changed-path integration checks, and competency-question E2E checks.
|
|
54
|
-
- Config or data: real parsers, schema checks, fixture validation, and sample transformations.
|
|
55
|
-
- Spreadsheets: static workbook checks, fixture-based output checks, cross-sheet flow checks, visual/layout checks, and real Microsoft Excel engine recalculation for formula-dependent results.
|
|
56
|
-
- Docs: links, terminology, current behavior alignment, and references to isolated historical notes.
|
|
57
|
-
- Release or distribution: after publishing to multiple independently writable channels (signed manifest, object storage, release host, embedded updater), digest-verify every referenced object against the staging original per channel — publish success and upload order are not evidence — and run the real installer/updater through its default path.
|
|
58
|
-
- A/B or on/off measurements: before accepting a null result, verify the arms actually received different treatment in the mechanism under test — a shared default or unconditional upstream step can silently apply the treatment to both arms.
|
|
59
|
-
- Model-behavior guardrails: verify by changed behavior, not recitation — a staged battery from named-trigger cases through disguised, deconfounded, category-wide, and single-variable framings; a clean pass means "no known defect", so re-run the battery when the model changes.
|
|
60
|
-
- Branch/version test builds against real data: explicitly separate every state sink the app touches (files, DB, OS-level stores that ignore env overrides), confirm the launch path propagates the isolation to child processes, and back up live data before the first run — a mismatched schema that drops unknown fields on write is data loss, not a no-op.
|
|
61
|
-
- Irreversible capture switches: when activation itself has unreproducible cost (a capture window that cannot be replayed), prove the downstream consumption path against existing samples before enabling — reversibility of the code path alone is not enough.
|
|
62
|
-
|
|
63
|
-
### Deriving the case space
|
|
64
|
-
|
|
65
|
-
A check has two authored halves, and they rot differently. The **verdict** — what the
|
|
66
|
-
answer should be — rots by encoding a belief that was wrong from the start. The
|
|
67
|
-
**space** — which cases exist — rots by staying still while the thing it covers grows.
|
|
68
|
-
Recording the verdict is common practice; deriving the space is the half usually left
|
|
69
|
-
hand-written, and a suite can have every expectation derived and still cover a set
|
|
70
|
-
someone typed once.
|
|
71
|
-
|
|
72
|
-
- Record the verdict, do not type it. Run the real path and store what came back;
|
|
73
|
-
drift then shows as a diff instead of as a belief someone has to re-justify.
|
|
74
|
-
- Enumerate the space from the artifact that defines it — the config's entries, the
|
|
75
|
-
schema's fields, the router's routes, the installer's call sites. Adding one there
|
|
76
|
-
should widen coverage with no edit here.
|
|
77
|
-
- Derive the exemption rule too. If some cases legitimately have no answer, decide that
|
|
78
|
-
from a property the artifact carries, never from a list of names: the list is the
|
|
79
|
-
authored space coming back through a side door, and it absorbs the regression where
|
|
80
|
-
a case that should have an answer stops having one.
|
|
81
|
-
- Dedupe on the tuple that actually determines the outcome, and report how many
|
|
82
|
-
collapsed. A coverage count that hides its own truncation reads as more than it is.
|
|
83
|
-
- Split by cost, not by space. When the real path needs money, credentials, or a
|
|
84
|
-
network, run a cheap stand-in on every commit and the real one on demand — both from
|
|
85
|
-
the **same enumeration**, so the two can never disagree about which cases exist.
|
|
86
|
-
- Derivation moves authorship rather than removing it: the extractor and the invariants
|
|
87
|
-
are still written by hand. Give them a negative control, or the derived suite is just
|
|
88
|
-
a larger unfalsifiable one.
|
|
89
|
-
- Planting a violation to prove a control fires is a write into the working tree, and
|
|
90
|
-
the restore is not atomic with it: if the probe can time out, abort, or be
|
|
91
|
-
interrupted, a restore sitting after it never runs and the plant survives into a
|
|
92
|
-
commit. Plant in a copy where the shape allows it, and when it must be in place, snapshot
|
|
93
|
-
first and restore from the snapshot as its own step rather than trusting the probe to finish.
|
|
90
|
+
## Verification
|
|
91
|
+
|
|
92
|
+
Verification is a subject of its own — depth, per-domain menus, deriving the case space, and what
|
|
93
|
+
a green is worth. It lives in `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/verification-discipline.md`.
|
|
94
|
+
Run it at each stage's verification points, and use its Verification Menus to pick the mix.
|
|
94
95
|
|
|
95
96
|
## Stop Conditions
|
|
96
97
|
|
|
97
98
|
- If the issue boundary expands compared with the previous review, stop and ask the user to choose redesign/rework or continuing the current iteration.
|
|
98
99
|
- Consider the boundary expanded when review reveals a broader affected purpose, failure condition, impact area, concept boundary, architecture boundary, or severity class.
|
|
100
|
+
- When review rounds keep producing material findings, classify each before fixing: a regression the previous round's own fix introduced, or a fresh instance of one pre-existing root cause. Regressions say tighten the increment and continue; recurring instances with zero regressions say instance-patching is a refilling queue — trigger the redesign-versus-continue stop above.
|
|
99
101
|
- Before calling the work done, report the current stage, review results, remaining material issues, verification results, and any stop reason.
|
|
100
102
|
|
|
101
103
|
## Environment Binding (edit per environment)
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
---
|
|
2
|
+
guide_id: concept-economy
|
|
3
|
+
language: en
|
|
4
|
+
status: active
|
|
5
|
+
use_when:
|
|
6
|
+
- naming anything lasting or shared — a feature, entity, type, field, flag, enum value, failure kind, artifact, or documentation term
|
|
7
|
+
- a review finding or test failure tempts you to add a name to make it go away
|
|
8
|
+
- deciding whether a value is its own concept or a property of an existing one
|
|
9
|
+
- deciding what a public surface exposes versus where the truth actually lives
|
|
10
|
+
- laying out a repository, or judging whether its shape still matches its concept graph
|
|
11
|
+
core_rules:
|
|
12
|
+
- name the nearest existing concept before adding one, then choose reuse / extend / rename / split out loud
|
|
13
|
+
- every fix has a concept-surface sign — reducing, preserving, or increasing; say which before making it
|
|
14
|
+
- one value has one owner, and every other surface is generated from it rather than restated
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Concept Economy
|
|
18
|
+
|
|
19
|
+
A scoped extension of the global Concept Economy section. Use it when you are about to introduce
|
|
20
|
+
or change a name that will outlive the change that created it.
|
|
21
|
+
|
|
22
|
+
The cost this guide manages is not disk or tokens. It is the reader's working set: every distinct
|
|
23
|
+
name in a system is something a person or a model must hold, disambiguate, and keep aligned with
|
|
24
|
+
its siblings. Two names for one behavior is not redundancy — it is a standing invitation to edit
|
|
25
|
+
one and not the other, and that divergence is silent until something breaks in production.
|
|
26
|
+
|
|
27
|
+
## What Counts As A Concept
|
|
28
|
+
|
|
29
|
+
Anything **lasting or shared**. The list is deliberately long because the expensive additions are
|
|
30
|
+
rarely the ones that feel like architecture:
|
|
31
|
+
|
|
32
|
+
features, entities, variables, types, helper modules, artifacts, config keys, CLI flags, MCP/tool
|
|
33
|
+
fields, public response fields, artifact fields, enum values, failure kinds, retry/recovery
|
|
34
|
+
tokens, process names, documentation terms.
|
|
35
|
+
|
|
36
|
+
What is *not* a concept: transient locals, generic containers (`items`, `result`, `tmp`), and
|
|
37
|
+
layout a framework or tool imposes on you. The binding test is whether a second person has to
|
|
38
|
+
learn the name to work here. A loop variable never crosses that line; a new failure kind always
|
|
39
|
+
does, even when it is one string in one enum.
|
|
40
|
+
|
|
41
|
+
The trap is scale-blindness. A field added to a response is one line of diff and a permanent
|
|
42
|
+
addition to every consumer's mental model — including consumers you have not met.
|
|
43
|
+
|
|
44
|
+
## The Four Paths
|
|
45
|
+
|
|
46
|
+
Before adding or changing a concept, find the nearest existing one and choose a path **explicitly**.
|
|
47
|
+
Choosing silently is how near-duplicates arrive: nobody decided to add a second name, they just
|
|
48
|
+
did not look for the first.
|
|
49
|
+
|
|
50
|
+
| Path | Choose it when | What you owe |
|
|
51
|
+
| --- | --- | --- |
|
|
52
|
+
| **Reuse** | an existing concept already covers this behavior | nothing — this is the default and needs no justification |
|
|
53
|
+
| **Extend** | the existing concept covers it once you add a property | the property, and a check that existing readers tolerate its absence |
|
|
54
|
+
| **Rename** | the behavior is right and the name has drifted from it | every site, in one change — a half-rename is strictly worse than either name |
|
|
55
|
+
| **Split** | one of the split triggers below actually fired | the parent named, the reason stated, aliases mapped back |
|
|
56
|
+
|
|
57
|
+
Prefer broad, stable concepts with precise properties over narrow near-duplicates. `Job` with a
|
|
58
|
+
`kind` property beats `ImportJob` / `ExportJob` / `CleanupJob` as long as they share a lifecycle;
|
|
59
|
+
the moment they stop sharing one, that is a split trigger, not a naming preference.
|
|
60
|
+
|
|
61
|
+
### Finding the nearest concept
|
|
62
|
+
|
|
63
|
+
The instruction to "find the nearest existing concept" fails when you search for the name you
|
|
64
|
+
already have in mind — the name you invented will not be there, and its absence reads as
|
|
65
|
+
permission. Search for the **behavior** instead:
|
|
66
|
+
|
|
67
|
+
- Grep the vocabulary the concept would produce, not the concept: the enum values, the failure
|
|
68
|
+
strings, the field names, the log messages.
|
|
69
|
+
- Read the nearest sibling's full definition, not its name. Names understate coverage; a type
|
|
70
|
+
called `Session` often already carries the lifecycle you were about to name separately.
|
|
71
|
+
- Ask what would have to be true for the existing concept to be wrong here. If you cannot state
|
|
72
|
+
it as a behavioral difference, you are adding a synonym.
|
|
73
|
+
- Check the terminology surface the repo already operates — a lexicon, a glossary, a domain
|
|
74
|
+
manifest — before the code. It is shorter and it is where the deliberate decisions live.
|
|
75
|
+
|
|
76
|
+
If that search returns nothing, the addition is probably real. Record what you searched, because
|
|
77
|
+
the next person will otherwise repeat it.
|
|
78
|
+
|
|
79
|
+
## When To Split
|
|
80
|
+
|
|
81
|
+
A split is warranted when the two things differ in something a caller can observe or must handle.
|
|
82
|
+
These are the triggers; anything else is a preference:
|
|
83
|
+
|
|
84
|
+
runtime behavior · ownership · lifecycle · validation · failure mode · user-visible behavior ·
|
|
85
|
+
audit/replay requirements · authority · persistence · user control · failure handling
|
|
86
|
+
|
|
87
|
+
Not triggers: a different call site, a different caller, a longer function, or a reviewer's
|
|
88
|
+
discomfort. Those are reasons to add a property, a parameter, or a comment.
|
|
89
|
+
|
|
90
|
+
When a split is necessary, three things ship with it or the split leaves debt:
|
|
91
|
+
|
|
92
|
+
1. **Name the parent.** The concept being split from, explicitly, in the change.
|
|
93
|
+
2. **State the reason.** Which trigger fired, in one sentence, where a maintainer will find it.
|
|
94
|
+
3. **Map the variants back.** Aliases, deprecated spellings, and old values resolve to the
|
|
95
|
+
canonical concept — otherwise the old name lives on as a second concept nobody declared.
|
|
96
|
+
|
|
97
|
+
## Derived Values Stay Derived
|
|
98
|
+
|
|
99
|
+
A value that tools or code can compute from its source is a **property or projection** of that
|
|
100
|
+
source, not a concept of its own. Persisting it creates a second authority that can disagree with
|
|
101
|
+
the first, and it will: the source moves and the copy does not.
|
|
102
|
+
|
|
103
|
+
The test is whether anything reads the stored value that could not have derived it. If the answer
|
|
104
|
+
is no, the value is a cache at best and a contradiction at worst.
|
|
105
|
+
|
|
106
|
+
**Authority is not visibility.** These are separate questions and conflating them produces both
|
|
107
|
+
failure modes at once:
|
|
108
|
+
|
|
109
|
+
| | Question | Wrong answer looks like |
|
|
110
|
+
| --- | --- | --- |
|
|
111
|
+
| Authority | where does the truth live, and who may change it | two writers, or a derived copy that outranks its source |
|
|
112
|
+
| Visibility | what may a given surface see | an internal projection leaked into a public contract, now unchangeable |
|
|
113
|
+
|
|
114
|
+
A public response may expose a bounded view — fewer fields, coarser precision, a rendered form —
|
|
115
|
+
while the source concept or artifact remains the one truth location. That is a projection, and it
|
|
116
|
+
is correct. What is not correct is treating the projection as the place to fix a wrong value.
|
|
117
|
+
|
|
118
|
+
Keep internal projections and helper outputs internal unless public exposure is genuinely required
|
|
119
|
+
by user behavior, a product contract, or artifact truth. An exposed field cannot be withdrawn on
|
|
120
|
+
your schedule.
|
|
121
|
+
|
|
122
|
+
## Reuse The Vocabulary Before Adding To It
|
|
123
|
+
|
|
124
|
+
Enum values, failure kinds, retry/recovery tokens, and result/failure surfaces are concepts with
|
|
125
|
+
unusually high blast radius: every consumer's branch coverage depends on the set being stable.
|
|
126
|
+
Adding a value obliges every exhaustive reader to handle it; adding a near-synonym obliges them to
|
|
127
|
+
handle it *and* to guess which one they will actually receive.
|
|
128
|
+
|
|
129
|
+
Check the existing set first, and prefer an existing value whose meaning genuinely covers the case
|
|
130
|
+
over a new one that describes it more precisely. Precision that fragments the set costs more than
|
|
131
|
+
it buys.
|
|
132
|
+
|
|
133
|
+
## Classifying A Fix
|
|
134
|
+
|
|
135
|
+
Before fixing a review finding or a test failure, say which way the fix moves the active concept
|
|
136
|
+
surface:
|
|
137
|
+
|
|
138
|
+
- **Reducing** — the fix removes a name, merges a duplicate, or deletes a branch. Cheapest, and
|
|
139
|
+
usually available when the finding is "these two do the same thing".
|
|
140
|
+
- **Preserving** — the fix changes behavior inside existing names. The normal case.
|
|
141
|
+
- **Increasing** — the fix adds a name. Legitimate, but it must survive the four-paths question,
|
|
142
|
+
and a review finding is not by itself a reason to add a concept.
|
|
143
|
+
|
|
144
|
+
This matters because review findings create pressure toward the increasing path: adding a flag, a
|
|
145
|
+
kind, or a special case makes a finding disappear locally while widening the surface everyone else
|
|
146
|
+
carries. Naming the direction before making the change is what keeps that trade deliberate.
|
|
147
|
+
|
|
148
|
+
## Migration Compatibility
|
|
149
|
+
|
|
150
|
+
**Use** fallback paths, compatibility shims, and deprecated alias normalization **when explicit
|
|
151
|
+
migration compatibility is required** — the obligation runs both ways: required compatibility gets
|
|
152
|
+
a shim, and nothing gets one as a default hedge. Each one is a second
|
|
153
|
+
concept surface that must be maintained and eventually removed.
|
|
154
|
+
|
|
155
|
+
When you add one, the removal condition ships with it: what has to be true for the shim to go, and
|
|
156
|
+
where that is recorded. A compatibility path with no stated end becomes permanent architecture by
|
|
157
|
+
attrition.
|
|
158
|
+
|
|
159
|
+
## Keeping The Shape Navigable
|
|
160
|
+
|
|
161
|
+
Let the repository's shape mirror its concept graph. A shared, lasting concept's canonical name
|
|
162
|
+
should be traceable across every layer it appears in — path, module, type/interface, field, public
|
|
163
|
+
API — so the structure is guessable from the concept name instead of from a translation table you
|
|
164
|
+
have to already know.
|
|
165
|
+
|
|
166
|
+
The working test: someone who knows the concept's name but not this repo should be able to guess
|
|
167
|
+
the path, or find it with one grep. If finding it requires knowing that the concept is called one
|
|
168
|
+
thing in the schema, another in the module, and a third in the URL, the layout has stopped being
|
|
169
|
+
navigable and the names are doing damage rather than work.
|
|
170
|
+
|
|
171
|
+
This binds shared concepts only. Transient locals, generic containers, and framework- or
|
|
172
|
+
tooling-imposed layout may diverge, and forcing them to conform is its own kind of waste.
|
|
173
|
+
|
|
174
|
+
## Domain Notes
|
|
175
|
+
|
|
176
|
+
- **Ontology work.** Check existing entities and relations first — before adding, modifying,
|
|
177
|
+
removing, or relinking either; the graph is the
|
|
178
|
+
artifact whose value degrades fastest under duplication, because every added node multiplies the
|
|
179
|
+
edges a reader must consider.
|
|
180
|
+
- **Code work.** Follow the naming patterns the repository already uses — the file first, then
|
|
181
|
+
its neighbors — and consolidate the variations
|
|
182
|
+
your own change introduced before calling it done. A change that leaves three spellings of one
|
|
183
|
+
idea has added two concepts regardless of intent.
|
|
184
|
+
- **Comments and active docs.** Keep them aligned with current runtime behavior, failure
|
|
185
|
+
semantics, retry policy, ownership, and authority. A comment describing a superseded contract is
|
|
186
|
+
not stale documentation — it is a second, false authority, and it reads as current to anyone who
|
|
187
|
+
finds it first.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
guide_id: documentation-hygiene
|
|
3
|
+
language: en
|
|
4
|
+
status: active
|
|
5
|
+
use_when:
|
|
6
|
+
- writing a comment, and deciding whether it earns its place
|
|
7
|
+
- recording why something changed, an alternative that was rejected, or a migration's rationale
|
|
8
|
+
- deciding whether an active document should link to a historical note
|
|
9
|
+
- authoring a rule, guideline, or instruction others will follow
|
|
10
|
+
- choosing where change history and implementation context belong
|
|
11
|
+
core_rules:
|
|
12
|
+
- prose about the past and prose about the present need different addresses, not different tenses
|
|
13
|
+
- a comment earns its place by carrying what the code cannot say about itself
|
|
14
|
+
- phrase a rule as the behavior you want, because a prohibition describes everything except what to do
|
|
15
|
+
- a continuously overwritten "current state" file claims to be now and is no particular time
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Documentation Hygiene
|
|
19
|
+
|
|
20
|
+
A scoped extension of the global Documentation Hygiene section. The subject is placement: **prose
|
|
21
|
+
about the past and prose about the present need different addresses.**
|
|
22
|
+
|
|
23
|
+
The cost this manages is misreading, not tidiness. A sentence describing how something used to
|
|
24
|
+
work, sitting beside code that works differently now, reads as a present fact — to a person
|
|
25
|
+
skimming and to a model retrieving. Nothing marks it as history except a tense, and a tense is not
|
|
26
|
+
a signal anyone checks. Moving it is cheaper than maintaining the reader's suspicion.
|
|
27
|
+
|
|
28
|
+
## The two addresses
|
|
29
|
+
|
|
30
|
+
**Active surfaces** — runtime code, comments, the docs someone reads to operate the thing — carry
|
|
31
|
+
current behavior, current decisions, current contracts, current authority, current failure
|
|
32
|
+
handling. Nothing else.
|
|
33
|
+
|
|
34
|
+
**Isolated paths** — `docs/`, `design/`, `archive/`, `deprecated/` or whatever the repository uses
|
|
35
|
+
— carry backward-compatibility notes, deprecated behavior, migration rationale, historical
|
|
36
|
+
alternatives, change narratives, and handoff logs.
|
|
37
|
+
|
|
38
|
+
The test for any sentence: *if this stopped being true, would anyone notice?* Active surfaces are
|
|
39
|
+
where the answer must be yes, because something breaks. History is where the answer is no, which
|
|
40
|
+
is exactly why it must not sit in the first place.
|
|
41
|
+
|
|
42
|
+
## Comments carry what the code cannot
|
|
43
|
+
|
|
44
|
+
A comment earns its place by saying something the code cannot say about itself:
|
|
45
|
+
|
|
46
|
+
- Non-obvious current behavior — why this looks wrong and is right.
|
|
47
|
+
- An invariant a reader could break without noticing they broke it.
|
|
48
|
+
- A constraint that comes from outside the file: a protocol, a rate limit, an ordering another
|
|
49
|
+
system depends on.
|
|
50
|
+
- A risk that still applies. Not one that used to.
|
|
51
|
+
|
|
52
|
+
What does not earn its place: restating the line below it, narrating the change that introduced it
|
|
53
|
+
("changed this to fix the bug"), or describing a contract that has since moved. That last one is
|
|
54
|
+
not stale documentation — it is a **second, false authority**, and to whoever reads it first it is
|
|
55
|
+
simply the answer.
|
|
56
|
+
|
|
57
|
+
Comments describing superseded behavior are the highest-yield deletion in most files. They are
|
|
58
|
+
also the hardest to find, because nothing fails when they are wrong.
|
|
59
|
+
|
|
60
|
+
## History has its own address
|
|
61
|
+
|
|
62
|
+
When you have something worth recording that is not current behavior — why an alternative was
|
|
63
|
+
rejected, what a migration was compensating for, what a session handed off — write it in an
|
|
64
|
+
isolated path rather than beside the code.
|
|
65
|
+
|
|
66
|
+
Two properties make such a record useful:
|
|
67
|
+
|
|
68
|
+
- **It is written once.** A record that is edited whenever things change stops describing any
|
|
69
|
+
particular moment. If it must be updated, the honest move is a new record that supersedes the
|
|
70
|
+
old one, not an overwrite.
|
|
71
|
+
- **It carries its own point in time.** A timestamp in the filename cannot rot, because the age is
|
|
72
|
+
on the label. A file called "current state" makes a claim it cannot keep.
|
|
73
|
+
|
|
74
|
+
That second point generalizes past records. Any continuously overwritten "the state of things"
|
|
75
|
+
document claims to be now and is, in practice, no particular time — the last person to touch it
|
|
76
|
+
decided how current it is, and nobody else can tell. Where the underlying facts are derivable,
|
|
77
|
+
give the reader the command that re-derives them instead of a number someone typed.
|
|
78
|
+
|
|
79
|
+
## Linking back
|
|
80
|
+
|
|
81
|
+
Link from active material to a historical note only when the current task needs that history, or
|
|
82
|
+
when the reference genuinely helps a future maintainer — usually because the present design looks
|
|
83
|
+
arbitrary without it.
|
|
84
|
+
|
|
85
|
+
A link is a small permanent cost: it invites the reader to leave, and it must stay resolvable. An
|
|
86
|
+
active document that links to five historical notes has partly become one.
|
|
87
|
+
|
|
88
|
+
## Writing rules people follow
|
|
89
|
+
|
|
90
|
+
Phrase a rule as the behavior you want, not as the thing you are afraid of. A prohibition
|
|
91
|
+
describes everything except what to do, and leaves the reader to invent the positive form —
|
|
92
|
+
usually at the moment they have the least attention to spare.
|
|
93
|
+
|
|
94
|
+
- "Pin the interpreter when a bash-specific feature is needed" beats "don't rely on the default
|
|
95
|
+
shell".
|
|
96
|
+
- "State the assumption you are proceeding under" beats "don't guess".
|
|
97
|
+
|
|
98
|
+
Two more properties of a rule that survives contact:
|
|
99
|
+
|
|
100
|
+
- **It says when it fires.** A rule with no trigger is advice, and advice is followed when
|
|
101
|
+
convenient.
|
|
102
|
+
- **It says what it costs.** A rule whose expense is hidden gets quietly dropped the first time
|
|
103
|
+
someone is in a hurry, and nobody records that it was dropped.
|
|
104
|
+
|
|
105
|
+
## Where change history belongs
|
|
106
|
+
|
|
107
|
+
Prefer the established homes over inventing one per change: a changelog for released behavior, a
|
|
108
|
+
current-state dashboard for architecture and risk, handoff notes for what a session left unfinished.
|
|
109
|
+
|
|
110
|
+
Keep their jobs distinct. A changelog that accumulates design rationale becomes unreadable as a
|
|
111
|
+
changelog; a dashboard that accumulates history stops being current. When a document starts
|
|
112
|
+
answering a question it was not built for, that is a signal to split it, not to add a section.
|
|
@@ -26,10 +26,11 @@ verification_focus:
|
|
|
26
26
|
This guide is a scoped extension of the global Coding Guidelines. Use it when
|
|
27
27
|
composing what you ask a reviewer for — the request, the evidence bar, the
|
|
28
28
|
verdict shape. It does not cover when to review, how deep, or what counts as
|
|
29
|
-
material (the
|
|
30
|
-
which reviewer kind to route to
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
material (the severity ladder and review loop in `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/coding-staged-workflow.md` own that),
|
|
30
|
+
which reviewer kind to route to — the convergence heuristic in
|
|
31
|
+
`${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/verification-discipline.md` owns that. Phrasing a prompt for a specific model
|
|
32
|
+
family is out of scope here; where that guidance ships, the rule that needs it
|
|
33
|
+
points at it.
|
|
33
34
|
|
|
34
35
|
The rules below are derived from ~330 real multi-lens review sessions run in
|
|
35
36
|
this environment. That corpus is one model family in practice, so nothing here
|
|
@@ -80,8 +81,9 @@ So state the floor in the request: **do not report a finding you would rate low.
|
|
|
80
81
|
It will be discarded; spend the effort on a medium-or-above finding instead.**
|
|
81
82
|
This is not a quality bar on the reviewer, it is a cost decision — the corpus
|
|
82
83
|
shows the discard happens regardless, so the only question is whether you pay to
|
|
83
|
-
generate it first. (What counts as each severity is the
|
|
84
|
-
|
|
84
|
+
generate it first. (What counts as each severity is the ladder in
|
|
85
|
+
`${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/coding-staged-workflow.md`, not
|
|
86
|
+
this guide's.)
|
|
85
87
|
|
|
86
88
|
## Forbid carry-forward findings
|
|
87
89
|
|
|
@@ -128,7 +130,7 @@ nicely: the submit schema refuses output without them. The result is a corpus
|
|
|
128
130
|
where reviewers are right about existence (0.3% of issues end unresolved after
|
|
129
131
|
argument) and where "found nothing" is a verified statement rather than silence.
|
|
130
132
|
|
|
131
|
-
This is the general
|
|
133
|
+
This is the general capability-boundary rule applied to review:
|
|
132
134
|
when output must have a property, make it unavailable without it. If your review
|
|
133
135
|
route has a schema, put the anchor there. If it does not, the demand belongs in
|
|
134
136
|
the request — but expect the weaker result that a request-only rule gives you.
|