docs(agents): bound what documentation holds #264

Merged
claudiomaradonna merged 1 commit from docs/lean-documentation-rules into main 2026-11-30 12:24:53 +01:00
Collaborator

Why

AGENTS.md § Documentation tells agents in every adopting repository
what to document when a change lands. Its first rule, "Update
documentation when behavior or operational procedures change", set no
bound on what or how much. Agents documented every behavior they
touched, at length, together with what existed before and steps for
readers still in an earlier state, and change-reviewer asked that the
documentation describe each new behavior. Over time the documentation
grows until it is hard to read.

What changed

§ Documentation's first rule now says what tracked documentation holds:
the software's architecture, the external dependencies it needs, and
what else its reader needs to act and cannot easily find elsewhere, all
as they stand now. History, earlier states, and migration steps belong
only in a changelog or another file dedicated to them, and a change
updates tracked documentation only where it makes it wrong or brings a
new fact of these kinds. The non-obvious clause reuses § Writing for
readers' own words, so the two cannot drift apart. "Tracked" keeps work
folders, commit bodies, and pull request bodies outside the rule.

change-reviewer's feature check, for a pull request someone else
opened, now judges the documentation by § Documentation instead of
asking that it describe the new behavior.

How to verify

Base main at a399533, branch docs/lean-documentation-rules at
f85d322.

AGENTS.md § Documentation, before:

  • Update documentation when behavior or operational procedures change.

After:

  • Tracked documentation holds only the software's architecture, the
    external dependencies it needs, and what else its reader needs to
    act and cannot easily find elsewhere, all as they stand now;
    history, earlier states, and migration steps belong only in a
    changelog or another file dedicated to them. Update tracked
    documentation only where a change makes it wrong or brings a new
    fact of these kinds.

.agents/agents/change-reviewer.md, before: "the change stays within
the stated scope, and the documentation describes the new behavior."
After: "the change stays within the stated scope, and its documentation
is as AGENTS.md § Documentation asks."

Untested: the behavioral evals, which docs/MAINTENANCE.md leaves to
the maintainer before merging. From the branch's worktree:

base=$(evals/run.sh --policy main)
tip=$(evals/run.sh --policy HEAD)
evals/report.sh "$tip" "$base"

The document-feature case, which asks to document bin/tally's
options in the README, is expected to pass on both policies, since
those options are what the README's reader cannot easily find
elsewhere.

Run on the tree of f85d322, as a non-root user, outside Claude Code's
sandbox: bash tests/verify-agent-config.sh (361 tests, none skipped),
bash tests/check-work-folder.sh (46 tests),
.agents/hooks/shellcheck.sh repo, prettier --check '**/*.md',
scripts/verify-agent-config.sh, and git diff --check main, all
passing. No test reads either passage.

Considerations

  • § Writing for readers' size limits stay as they are: they already act
    as ceilings, and this change acts on what documentation holds.
  • The work template's "finishes what it starts, with its code, tests,
    and documentation" stays: under the new rule it asks only for the
    documentation the rule admits.
  • UPGRADING.md needs no entry, since its Migrations cover layout
    changes only.
## Why `AGENTS.md` § Documentation tells agents in every adopting repository what to document when a change lands. Its first rule, "Update documentation when behavior or operational procedures change", set no bound on what or how much. Agents documented every behavior they touched, at length, together with what existed before and steps for readers still in an earlier state, and `change-reviewer` asked that the documentation describe each new behavior. Over time the documentation grows until it is hard to read. ## What changed § Documentation's first rule now says what tracked documentation holds: the software's architecture, the external dependencies it needs, and what else its reader needs to act and cannot easily find elsewhere, all as they stand now. History, earlier states, and migration steps belong only in a changelog or another file dedicated to them, and a change updates tracked documentation only where it makes it wrong or brings a new fact of these kinds. The non-obvious clause reuses § Writing for readers' own words, so the two cannot drift apart. "Tracked" keeps work folders, commit bodies, and pull request bodies outside the rule. `change-reviewer`'s feature check, for a pull request someone else opened, now judges the documentation by § Documentation instead of asking that it describe the new behavior. ## How to verify Base `main` at a399533, branch `docs/lean-documentation-rules` at f85d322. `AGENTS.md` § Documentation, before: > - Update documentation when behavior or operational procedures change. After: > - Tracked documentation holds only the software's architecture, the > external dependencies it needs, and what else its reader needs to > act and cannot easily find elsewhere, all as they stand now; > history, earlier states, and migration steps belong only in a > changelog or another file dedicated to them. Update tracked > documentation only where a change makes it wrong or brings a new > fact of these kinds. `.agents/agents/change-reviewer.md`, before: "the change stays within the stated scope, and the documentation describes the new behavior." After: "the change stays within the stated scope, and its documentation is as `AGENTS.md` § Documentation asks." Untested: the behavioral evals, which `docs/MAINTENANCE.md` leaves to the maintainer before merging. From the branch's worktree: ```bash base=$(evals/run.sh --policy main) tip=$(evals/run.sh --policy HEAD) evals/report.sh "$tip" "$base" ``` The `document-feature` case, which asks to document `bin/tally`'s options in the README, is expected to pass on both policies, since those options are what the README's reader cannot easily find elsewhere. Run on the tree of f85d322, as a non-root user, outside Claude Code's sandbox: `bash tests/verify-agent-config.sh` (361 tests, none skipped), `bash tests/check-work-folder.sh` (46 tests), `.agents/hooks/shellcheck.sh repo`, `prettier --check '**/*.md'`, `scripts/verify-agent-config.sh`, and `git diff --check main`, all passing. No test reads either passage. ## Considerations - § Writing for readers' size limits stay as they are: they already act as ceilings, and this change acts on what documentation holds. - The work template's "finishes what it starts, with its code, tests, and documentation" stays: under the new rule it asks only for the documentation the rule admits. - `UPGRADING.md` needs no entry, since its Migrations cover layout changes only.
docs(agents): bound what documentation holds
All checks were successful
Maintenance / checks (pull_request) Successful in 6m45s
Maintenance / checks (push) Successful in 6m38s
f85d32215f
"Update documentation when behavior or operational procedures change"
set no limit, so agents documented every behavior they touched, at
length, with what came before and steps for readers in an earlier
state, and change-reviewer asked that the documentation describe each
new behavior. Over time the documentation grew hard to read.
claudiomaradonna deleted branch docs/lean-documentation-rules 2026-11-30 12:24:59 +01:00
Sign in to join this conversation.
No description provided.