Rewrite the README around the reader's first hour #70
Annotations
3 errors and 1 warning
|
check
Process completed with exit code 1.
|
|
tests/file-scoped-ids.test.ts > documentation (REQ-011.8) > states that renaming a SPEC FILE invalidates its recorded VERDICTS and requires re-review — bounded to one coherent paragraph, not keyword proximity anywhere in the doc:
tests/file-scoped-ids.test.ts#L1339
AssertionError: README has no paragraph mentioning renaming a spec file: expected undefined to be truthy
- Expected:
true
+ Received:
undefined
❯ tests/file-scoped-ids.test.ts:1339:88
|
|
tests/file-scoped-ids.test.ts > documentation (REQ-011.8) > documents both grammars with a concrete example: legacy REQ-NNN.M.K alongside bare ### N: Title, canonical <stem>.N.M, and the import/bare sugar relationship:
tests/file-scoped-ids.test.ts#L1319
AssertionError: expected '# 2119\n\n**Spec-driven test enforcem…' to match /### N: Title[\s\S]{0,400}canonical[\…/i
- Expected:
/### N: Title[\s\S]{0,400}canonical[\s\S]{0,100}<stem>\.N\.M|<stem>\.N\.M[\s\S]{0,100}canonical[\s\S]{0,400}### N: Title/i
+ Received:
"# 2119
**Spec-driven test enforcement for coding agents.** Named for
[RFC 2119](https://www.rfc-editor.org/rfc/rfc2119) · [unsupervised.com/2119](https://unsupervised.com/2119)
2119 makes the planning → building → testing loop hard to cheat:
1. **Plans become requirements.** Features start as specs in `specs/` — RFC 2119
documents where every requirement is a numbered, individually addressable
statement with exactly one normative keyword. `2119 lint` enforces the format.
2. **Requirements become tests.** Every MUST-level requirement needs at least one
test annotated with its ID (`// 2119: REQ-001.2.3` — a comment, so it works in
any language). `2119 cover` fails on any gap, in either direction.
3. **Tests get judged.** `2119 review` generates one instruction file per
requirement asking a *fresh-context* reviewer — one that did not write the
code — a single question: **would these tests fail if this requirement were
violated?** Verdicts are recorded with `2119 pass` / `2119 fail`.
4. **One gate.** `2119 check` = lint + coverage + verdict freshness (a verdict
counts only while its hash still matches the content it vouched for). Exit
code 0 or it isn't done. Agent hooks, git, and CI all call the same command.
Here is the gate catching an untested requirement and a stale review:
```console
$ npx rfc2119 check
specs/session-handling.md:12 [REQ-002.2.4] session-handling.1.2 (MUST NOT) has no covering test annotation: \"Expired sessions MUST NOT be resumable with a stale token.\"
.2119/verdicts/session-handling.1.1--55e7c65a2f4f.json:1 [REQ-003.3.1] session-handling.1.1 has no current review verdict (review ID session-handling.1.1--55e7c65a2f4f); run `2119 review`
check: FAIL — 2 violation(s), 1 uncovered, 0 failing review(s), 1 stale review(s)
$ echo $?
1
```
This repo practices what it enforces: 2119's own requirements live in
[`specs/`](specs/), every MUST has an annotated test, and
[`.2119/verdicts/`](.2119/verdicts/) holds the committed review verdicts. To
see the full gate running in another codebase — specs, committed verdicts,
and the CI check on every PR —
browse [panopticon](https://github.com/tylerwillis/panopticon).
Three things 2119 is deliberately **not**: a test runner (`check` never
executes your suite — compose them: `npm test && npx rfc2119 check`), a CI
replacement (it's one exit code your CI calls), and a security boundary (a
deliberate cheater is made *conspicuous*, not impossible — see
[Risks](#risks)). These boundaries are
[enforced as reviewed requirements](specs/REQ-008-honest-boundaries.md); the
reasoning lives in [docs/design.md](docs/design.md), and
[docs/scaling.md](docs/scaling.md) covers hardening for larger or more formal
projects.
## Use it in your repo
From your project root:
```bash
npx rfc2119 init # the core: specs/, .2119.yml, AGENTS.md section
npx rfc2119 init --agent claude # + hooks and a reviewer subagent (also: codex, gemini)
npx rfc2119 init --git-hook --ci # + pre-commit gate and GitHub Actions backstop
```
(`npx` works in any repo with Node available, whatever language the project is.
Node projects can pin the version with `npm install -D rfc2119`.)
Then, to work:
1. Have your agent plan each feature **as a spec** in `specs/` — `2119 lint`
keeps the format honest.
2. Build. Every MUST-level requirement needs a test annotated with its ID
(`// 2119: REQ-001.2.3`).
3. Run `npx rfc2119 check` (alongside your test runner — `npm test && npx
rfc2119 check`, both, always). Fix lint/coverage failures directly; for
pending judgment reviews, run `npx rfc2119 review --dispatch` — it emits a
prompt you paste into your agent session, and the agent sends each
instruction file to a fresh-context subagent (a clean session that di
|
|
check
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4, actions/setup-node@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|