Skip to content

docs(agents): describe the design, not the change to it - #357

Merged
m2ux merged 2 commits into
mainfrom
docs/agent-authoring-guidance
Jul 30, 2026
Merged

docs(agents): describe the design, not the change to it#357
m2ux merged 2 commits into
mainfrom
docs/agent-authoring-guidance

Conversation

@m2ux

@m2ux m2ux commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Three authoring rules, each earned during the #346 work, plus a reconciliation of two files that had silently diverged.

The rules

Describe the design, not the change to it. Definitions, code and doc comments, and commit subjects state the system as it is. A commit subject is a permanent log entry, so move usage accounting off the transition and onto the dispatch forces a future reader to learn the old model just to parse the sentence; account for token usage per dispatch needs nothing. PR and issue bodies are the explicit carve-out — a reviewer needs the before-state to judge a change, and those stop being read once merged.

It also carries the sweep habit: after a behaviour change, look for surviving descriptions of the old behaviour in doc comments, tool descriptions, technique ## Rules, resource prose and READMEs. In #354 two of those survived a first pass — projectUsage's doc comment and a render-token-usage protocol line — and only a deliberate grep found them. A stale claim reads as current fact.

Prefer removing the thing that needs a prohibition. Prose warning "do not also use X" usually means two paths now do one job. Retire one and the warning has nothing left to say. In #354 that removed a tool parameter, a validation warning and its test together, rather than documenting around all three.

Sync CLAUDE.md and AGENTS.md by merging, never copying.

Why that last rule is here

Because both files needed repairing, and this PR does it.

They had diverged. CLAUDE.md carried the #327 guard, worktree:provision and triage guidance; AGENTS.md carried the GitHub auth-and-shell section. At some point each had been overwritten by the other, so both were missing content the other still had — including the triage rule ("classify a new finding rather than suppressing it") that the whole #346 effort followed.

This commit is the union of the two prior versions plus the new rules, verified line-by-line against both: nothing from either is dropped. Every script the restored lines document — test:ci, check:all, check:delta, worktree:provision — is still present in package.json, so the removal was documentation loss rather than cleanup following a script deletion.

The single deletion in the diff is - **Tests:** npm test being restored to npm test (watch) / npm run test:ci (single run).

Each file keeps its own # CLAUDE.md / # AGENTS.md title rather than one claiming to be the other; they are otherwise identical.

Verification

Documentation only — no source, schema or corpus change. Independent of #351, #352 and #354; merges in any order.

🤖 Generated with Claude Code

m2ux and others added 2 commits July 30, 2026 07:53
Three authoring rules under Code and doc style, each earned during the #346 work:

- Definitions, code and doc comments, and commit subjects state the system as it
  is. A commit subject is a permanent log entry, so `move usage accounting off the
  transition and onto the dispatch` makes a future reader learn the old model just
  to parse it; `account for token usage per dispatch` needs nothing. PR and issue
  bodies are the carve-out — a reviewer needs the before-state, and those stop
  being read once merged. Includes the sweep habit, because two stale descriptions
  of replaced behaviour survived a first pass and only a deliberate grep found them.

- Prose warning "do not also use X" usually means two paths now do one job. Retire
  one and the warning has nothing to say, along with any validation that existed
  only to police the overlap — which is how a tool parameter, a validation warning
  and its test all left together rather than being documented around.

- Sync CLAUDE.md and AGENTS.md by merging, never copying.

That last one is why this commit also reconciles the two files. They had diverged:
CLAUDE.md carried the #327 guard, worktree-provision and triage guidance;
AGENTS.md carried the GitHub auth-and-shell section. Each had been overwritten by
the other at some point, so both were missing content the other still had. This is
the union — verified line-by-line against both prior versions, with nothing from
either dropped. Every script the restored lines document is still in package.json.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Under Testing and PR instructions: each change lands as its own commit with its
own message, pushed with plain git push. Where a push will not fast-forward, stop
and ask rather than rewriting.

Force-push has exactly one legitimate use — correcting a genuine error in an
earlier commit, on a branch with no other contributors. Not squashing, not
rewording, not folding a follow-up into the commit it fixes, never on a shared
branch.

The rule records why: repeated amending collapses distinct pieces of work into one
commit, and the intermediate states then exist only in a local reflog. That loss is
not recoverable, only reconstructable by hand — itself a rewrite.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@m2ux
m2ux merged commit 711f057 into main Jul 30, 2026
2 checks passed
m2ux added a commit that referenced this pull request Jul 30, 2026
Three files needed a decision; workflow-tools.ts, the state schema, the site tools page,
the walk snapshots and mcp-server.test.ts all auto-merged.

AGENTS.md held two versions of "Describe the design, not the change to it" — this branch
and #357 wrote it independently, with different carve-outs. The rule now carries both:
main's PR and issue bodies alongside this branch's commit body and provenance-bearing
measurement, plus the live-hazard-as-invariant guidance and the link to principle 17.
CLAUDE.md takes the same union, since this branch had only edited its twin and the two
are kept in sync by merging.

The worktree-naming rule rides in here too. It was committed to
docs/agent-authoring-guidance after #357 had already merged at 618d9ff, so it never
reached main and would have been lost with the branch.

The workflows pointer moves to 6bc46fa, the corpus tip carrying both #351 and #355, and
the stamp names the same commit.

binding-fidelity passes: main's detector predicate and reconciled triage arrive with this
merge, which is what the 17 stale entries on this branch were waiting for.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant