Repository navigation
docs(readme): methodology, evidence and incident narrative move to docs/ - #433
Conversation
The README carried user docs, the flag reference, per-bench methodology, regeneration recipes and incident narratives in one 437-line file, with paragraphs over 150 words. The last three move out: docs/auto-capture-evidence.md what is established, by which kind of evidence docs/injection-cost.md epoch mechanics, the byte workload, a provider audit docs/store-concurrency.md lock scope, publication, permissions docs/repo-scoping.md identity derivation and write refusal detail docs/import-quarantine.md what the prose screen catches and misses docs/contradiction-authority.md the code check and its accepted residual docs/pre-release-ritual.md the mutation sweep and the artifact policy docs/flags.md the three research flags in full docs/write-gates.md what promotion evidence samples docs/development.md what the smoke suite boots, the npm surface Moved prose is copied byte for byte - a substring check asserts each moved range appears in its new file unchanged. The README keeps a summary and a link, and keeps every user-visible rule, the flag table, the effectiveness section and the troubleshooting table. 437 lines to 374, 8,200 words to 6,656; the drop in lines is smaller than the drop in words because a summary costs words back. The guard follows the prose. The prohibition scans (no dollar figure, no token-saving sentence, a percentage never attached to tokens without saying bytes, cheaper only with an n, a seat and a metric, and the retracted figures) walked README.md alone, so moving text to docs/ would have created an unguarded place to publish a number. They now walk README.md plus every markdown file under docs/, and a coverage check fails if that walk stops finding them. Proven by planting each violation in a docs file rather than the README: four plants, four red, and a fifth for deleting docs/ outright. The rules-block exemption for the word cheaper applies only to a document that actually carries the rules.
…indows relative() yields backslash-separated names on Windows, so the coverage check counted zero docs files and every prohibition scanned one file again - the exact failure the check exists to catch, caught by the check. Normalise separators to forward slashes before comparing or reporting a name.
WhollyMindless
left a comment
There was a problem hiding this comment.
Two documentation follow-ups on c245830:
- The installed README now sends readers to nine relative
docs/*.mdtargets, butpackage.json.filesexcludesdocs/.npm pack --dry-run --ignore-scripts --jsonlists 122 files, including README.md and zero docs files. The detailed material previously shipped inside the README; after this move those links cannot resolve inside an installed package. Please consider including these docs in the package, or using repository URLs if the detail is intentionally hosted only on GitHub. docs/flags.mdhas no link from the README, unlike the other nine moved documents. The option rows lost details such as invalid DEDUP values disabling the pass and SYMPTOM's metadata-only exemption, so a link from that table would keep the full behavior discoverable.
The broader claims scan works in my focused check: 22 tests / 36 assertions pass on Windows (Bun 1.4.4), and a temporary dollar-figure plant in docs/injection-cost.md fails the intended assertion. Probe reverted; no production change or full-suite rerun.
The README is shipped and the repository is not, so nine relative docs/*.md links sent an installed reader to paths that do not exist next to the package. npm pack listed 122 files and zero of them were docs. docs/ joins files: 122 files to 140, unpacked 954 KB. test/doc-links.test.ts keeps the two halves from drifting apart again: every relative link in README.md and docs/*.md resolves in the checkout, and every target it resolves to is inside files. Verified by removing docs from files - both the coverage test and the unshipped-link test go red, naming all nine links - then restoring. docs is also asserted by name, so deleting it from the packaging list cannot pass by leaving no links behind. docs/flags.md gains the README link the other moved documents have: the option rows there lost the invalid-value rules (an out-of-range DEDUP turns the pass off rather than clamping) and SYMPTOM's metadata-only exemption.
|
Fixed in bbd25c9, taking the "include them in the package" option.
Chose packaging over repository URLs because a URL resolves against a branch that moves: the README a reader has in Added The Gate on |
|
🎉 This PR is included in version 0.30.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What
Phase 5 of the hygiene plan. The README carried user docs, the flag reference, per-bench methodology, regeneration recipes and incident narratives in one 437-line file with paragraphs over 150 words. Methodology, evidence history and artifact policy move to
docs/:docs/auto-capture-evidence.mddocs/injection-cost.mddocs/store-concurrency.mddocs/repo-scoping.mddocs/import-quarantine.mddocs/contradiction-authority.mddocs/pre-release-ritual.mddocs/flags.mddocs/write-gates.mddocs/development.md437 lines → 374. 8,200 words → 6,656. The line drop is smaller than the word drop on purpose: a summary costs words back, and cutting the summaries to make the line count look better would leave links with no content. Everything user-visible stays — the flag table, the effectiveness section, the troubleshooting table, the install path.
Nothing lost
Moved prose is copied byte for byte. A substring check asserts each moved range appears in its new file unchanged: ten files, all
VERBATIM. The README keeps a summary and a link; nine links, none broken, and every internal anchor the file referenced (#auto-capture-is-experimental,#surfaces,#secret-redaction,#export-and-move-between-machines,#contradiction-authority-policy-experimental-349--351) still exists.The guard follows the prose
This is the part that mattered more than the word count. The prohibition scans — no dollar figure, no token-saving sentence, a percentage never attached to tokens without saying bytes,
cheaperonly where an n, a seat and a metric share the line, and the retracted figures never returning — walkedREADME.mdalone. Moving prose todocs/would therefore have created an unguarded place to publish a number: the diet would have weakened the check sitting next to it, silently.They now walk
README.mdplus every markdown file underdocs/, recursively, and a coverage check fails if that walk stops finding them. Proven by planting violations indocs/rather than the README:docs/injection-cost.mddocs/auto-capture-evidence.mdcheaperindocs/repo-scoping.mddocs/flags.mddocs/deleted outrightThe
cheaperrules-block exemption now applies only to a document that actually carries the rules block, instead of a line-offset window that a moved file would inherit by accident.Test plan — every line run on
e544f73bun run gategreen: comment policy (21 added comment lines), tsc, biome, 1,475 unit, 34 e2e on the real hosttest/claims.test.ts: 22 tests, 36 assertions — the 21 from the previous commit plus the scan-coverage checkdocs/files, plants reverteddocs/linksNo production code changes.
src/is untouched; the only code edit is the scan scope intest/claims.test.ts.One comment of my own tripped the comment-policy lint (
reported byreads as narrative history). I reworded the comment rather than reaching forSKIP_COMMENT_LINT.