Skip to content

docs(readme): plain-language leads, concrete examples, reference material to docs/ - #434

Merged
abogartz merged 3 commits into
hygiene/readme-dietfrom
hygiene/docs-voice
Nov 18, 2026
Merged

abogartz merged 3 commits into
hygiene/readme-dietfrom
hygiene/docs-voice

Conversation

@abogartz

Copy link
Copy Markdown
Owner

What

A readability pass over README.md and docs/, following one rule: explain the concept first, the jargon second, always with a concrete example — and do not keep a detail just because it is known.

Each section now leads with what the thing is for:

concept the plain anchor
injected block a cached HTTP response, keyed by its body, not by how often the database was touched
write gates a CI check, but for facts about your code — a stale reference is refused before storage, not after a session trusts it
store publication a book swap, not a page rewrite: a reader sees the old file or the new one, never half
use ledger a library due-date card per row
quarantine a spam folder, not a virus scanner
mutation sweep a fire drill for the test suite
repo scoping reads permissive, writes strict — reading one extra project is a nuisance, writing your note into the wrong project is damage
symptom flag "in this session we fixed the flake" shares no words with the query a future session types: 0/8 surfaced as diary, ranks 1–7 symptom-first

Longest single paragraph or bullet in the README is 106 words (median 28, across 110 prose units), and the file opens with "you say X on Monday, Tuesday's session knows it" instead of a feature list.

Auto-capture is described as merged

Checked before rewriting: e12c8a3 (the teardown fix), 66dfdaa and b5df1fa (the real-host scenario) are all on main. So ## Auto-capture is experimental is now ## Auto-capture, and "not working yet" is gone from the feature bullet, the options table and the troubleshooting row.

One honest line stays, stated as a fact rather than a label: the trigger fires and the write survives on a real host (12 of 12 runs), no live store has been observed completing a pass, and quality and cost are unmeasured. docs/auto-capture-evidence.md is unchanged in substance and now separates the three claims that get confused — the event fires, the write survives, a live model completes a pass.

Moves, not deletions

destination what left the README
docs/options.md every option and environment variable, with what an invalid value does
docs/recall-quality.md the kw permutation control, the limit-5 audit in full, the eval's caveats
docs/use-ledger.md the credit rule and its throttle, the consolidation tie-break, capture lag
docs/troubleshooting.md the rarer rows, plus a pointer back to the common ones
docs/development.md absorbs the local-command-to-CI-job mapping
docs/write-gates.md absorbs the update contract (query selection, what carries forward, PARTIAL)
docs/import-quarantine.md absorbs the export path-confinement rules and the file format
docs/store-concurrency.md the permission limits, restated as three numbered privacy limits
docs/contradiction-authority.md, docs/repo-scoping.md, docs/pre-release-ritual.md, docs/flags.md, docs/injection-cost.md plain lead, subheads, duplicated sentences removed

Capture options moved sideways — out of the generic options table and into the section that explains the feature.

README: 374 → 343 lines, 6,656 → 5,197 words. The line drop is small because plain prose costs words to buy clarity; the cut bulk went to docs/, which is now 22 markdown files.

What did not change

The effectiveness section is byte-identical (473 words, asserted by comparing against origin/hygiene/readme-diet). test/claims.test.ts pins its labels, n, seats, mustAppear tokens, table shape, resolution labels and the metric definition, so that section is deliberately literal rather than conversational — rewriting it into coffee prose would break the guard on purpose.

No production code changes. src/ is untouched.

Test plan — every line run on 80e0fa7

  • bun run gate green: comment policy (24 added comment lines), tsc, biome, 1,475 unit, 34 e2e on the real host
  • test/claims.test.ts: 22 pass, 36 assertions — the scan now walks 22 markdown files under docs/, up from 18
  • effectiveness section byte-identical to the base branch
  • zero broken links: in-page anchors, README → docs, and docs → README#anchor all resolve
  • git diff shows no change under src/

Stacked

Base is hygiene/readme-diet (#433), because this pass rewrites files that PR creates. GitHub retargets this PR to main when #433 merges; until then the diff here is the voice pass only.

The README and the docs it points at were written as reference records, so
they led with the mechanism and buried the reason. Each section now leads with
what the thing is for, in plain language and with a concrete example, and the
mechanism follows.

  injected block   a cached HTTP response, keyed by its body
  write gates      a CI check, but for facts about your code
  store publish    a book swap, not a page rewrite
  use ledger       a library due-date card per row
  quarantine       a spam folder, not a virus scanner
  mutation sweep   a fire drill for the test suite

Auto-capture is described as the merged feature it is: the trigger and the
write are shown working on a real host. One caveat stays, stated as a fact -
no live store has been observed completing a pass, and quality is unmeasured -
and the section heading drops 'experimental' accordingly.

Reference material moves to docs/ rather than being deleted:

  docs/options.md        every option and environment variable
  docs/recall-quality.md the kw permutation control, the limit-5 audit, caveats
  docs/use-ledger.md     credit rules, consolidation tie-break, capture lag
  docs/troubleshooting.md the rarer rows, plus a pointer to the common ones
  docs/development.md    absorbs the local-command-to-CI-job mapping
  docs/write-gates.md    absorbs the update contract
  docs/import-quarantine.md absorbs the export path-confinement rules and format

The effectiveness section is byte-identical: test/claims.test.ts pins its
labels, n, seats, mustAppear tokens and table shape, so it is deliberately
literal rather than conversational. The prohibition scans now walk 22 markdown
files under docs/, and every moved number keeps its label.

@WhollyMindless WhollyMindless left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One verified documentation regression on 80e0fa7: README.md:257 now says a recognized credential cannot persist in deletions.logfmt, whichever path carried it. The audit intentionally preserves the deleted row's content; only its reason is redacted (src/store/files/deletions.ts:25,41).

I seeded a throwaway store with a legacy row containing a synthetic GitHub-token-shaped value, confirmed redactSecrets recognizes it, then called the normal store prune path. One row was deleted; the newly appended audit retained the token in content and scrubbed it from reason. This is new audit output, so the later caveat about not scrubbing existing files does not fully qualify the promise.

Please narrow that sentence to the fields actually scrubbed and retain the deleted-content/snapshot exception. This is a wording correction, not a request to change the deliberate retention policy already explained in #292's closure.

Focused claims suite: 22 pass / 36 assertions on Windows, Bun 1.4.4. No production edits; no real credentials or live store used. The packaging finding remains on parent #433 rather than being duplicated here.

The sentence claimed a recognized credential cannot persist in
deletions.logfmt. The audit preserves the deleted row's content, tags, kw and
issue verbatim so a restore-entry can rebuild the row exactly, and redacts only
the reason (src/store/files/deletions.ts). A row that predates redaction
therefore carries its credential into the audit when it is deleted, and a
snapshot carries whatever the stored row held.

Naming the scrubbed fields and stating the retention as deliberate is accurate;
the previous wording promised a guarantee the code does not implement.
Conflicts in README.md: the base added a flags paragraph above the old
'Auto-capture is experimental' heading, and this branch reframed that section
and moved the option tables to docs/options.md. Kept the reframed section and
folded the base's invalid-value rules into the Options pointer, so the flags
link and both rules survive here.
@abogartz

Copy link
Copy Markdown
Owner Author

Narrowed in ea6ef10. Your read of the code is right: src/store/files/deletions.ts passes content, tags, kw and issue through untouched and calls redactSecrets only on reason.

The summary sentence now names only what is actually scrubbed — a new evidence/ line, a deletion-audit reason, a supersede field written into a retired row — and points at the limits instead of asserting a blanket guarantee. A new limit states the exception outright: the audit preserves the deleted row's content, tags, kw and issue exactly as held because a restore-entry built from that line has to re-stamp and re-attach precisely what was there; deleting a row that predates redaction therefore writes its credential into deletions.logfmt; snapshots carry whatever a stored row holds; and the retention is named deliberate with the #292 link.

Worth recording: the overclaim is pre-existing, not introduced here. origin/main says "every deletion-audit reason — so a recognized credential cannot persist in evidence/ or deletions.logfmt or a tombstoned row regardless of which path carried it". The diet split that sentence into bullets, which made the same leap easier to read and therefore more misleading. Fixed on this branch because the wording you quoted lives in this branch's file.

Merged the parent (7f85cad) to pick up the packaging fix. One README conflict: the parent added a flags paragraph above the old ## Auto-capture is experimental heading while this branch reframed that section and moved the option tables to docs/options.md. Resolved by keeping the reframed section and folding the parent's invalid-value rules into the Options pointer, so the flags link and both rules survive.

Gate on the merge: comment policy, tsc, biome, 1,479 unit / 21 skip across 132 files, 34 e2e on the real host. test/claims.test.ts and test/doc-links.test.ts together: 26 pass / 42 assertions.

@abogartz
abogartz merged commit 4a70c54 into hygiene/readme-diet Nov 18, 2026
4 checks passed
abogartz added a commit that referenced this pull request Nov 18, 2026
docs(readme): recover PR #434 onto main (it merged into an already-merged base)
@WhollyMindless

Copy link
Copy Markdown
Contributor

Confirmed on the recovered tree in #435 (769f001): the guarantee now names the scrubbed fields and explicitly documents retained deletion-audit content and snapshots. This resolves the wording finding. I also checked eec17ec's README: the same overclaim was already present before this rewrite. My earlier description of it as a "documentation regression" was incorrect; it was a pre-existing documentation defect. Thank you for identifying and correcting both points.

Independent focused verification on Windows: 26 claims/doc-link tests pass (42 assertions); npm pack --dry-run --ignore-scripts includes all 22 docs files. The recovered tree matches #434's final tree except for the preserved package version, and matches the fetched main tree. No production changes or full-suite rerun.

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.

2 participants