Repository navigation
speccheck 1.18.0
speccheck — the checker that makes the audit phase of building from a spec mechanical — together
with the spec-writing, spec-review, spec-plan, spec-build and spec-proposal skills,
spec2pdf.sh, and install.sh. MIT for the code, CC BY 4.0 for the documents.
Implements SPEC.md v1.18 in full: 252 spec IDs, 136 tests, both gate phases green.
speccheck (mock): CONFORMING - 252/252 passing (100.0%), 0 failing, 0 skipped, 0 weak, 0 unverified, 0 untested, 0 uncited; 0 dangling, 0 stale; judge=mock
speccheck (llm): CONFORMING - 252/252 passing (100.0%), 0 failing, 0 skipped, 0 weak, 0 unverified, 0 untested, 0 uncited; 0 dangling, 0 stale; judge=llm
Phase B was run with google/gemini-3.8-flash via OpenRouter (--judge-concurrency 8):
judge_available true, judge_strength 1.0 (244/244), unknown_rate 0.0103 — no ID downgraded.
What is new since 1.5.0 (SPEC.md v1.5 → v1.18)
- Swift projects (v1.6, R-31/D-17/D-18): Swift Testing
@Testfunctions and XCTesttest*
methods are delimited by lines with doc-comment and attribute spans included, joined to SwiftPM's
xUnit output by function identifier;/** */doc-comment citations count as DECLARED. - A contract's whole body is its statement (v1.7/v1.8, R-33/R-34): a heading-declared ID's
statement is its title plus the section body (fenced code blocks included, 16 KiB cap), so the
judge sees the pinned shape and not a title. - Clause-grounded verdicts (v1.9, R-34/K-15): every
ASSERTS/EXECUTES_ONLYmust quote the
clause it judged against, and a clause the kernel cannot locate in the statement is discarded as
UNKNOWN— the statement-side mirror of the evidence-line rule. - Recorded tests (v1.10/v1.11, R-35/D-22): a
*(recorded)*T row keeps its citing test and its
status but sends no edge to the judge, so a presence check is never graded as an assertion. - Spec-internal edges and
impact(v1.13, C-12/C-13/R-36/R-37): every statement's id tokens
become typeddepends_on/verifiesedges and every §12 decision row anaffectsedge, recorded
inspeccheck.json; a second subcommand,impact, walks them from a changed set (--changed, or
--againsta prior spec) and reports what a change might touch, at the depth you ask for. - DECLARED vs INCIDENTAL citations (v1.14, R-39/C-14–C-16): a citation inside the test's own
docstring or a whole-line comment is DECLARED, anything else INCIDENTAL — computed under every
judge mode, reported per edge and asdeclared_ratio, and handed to the judge as context. - Jev pre-triage (v1.15, K-16/C-17):
--jev-pre-triageasks a second, much cheaper model
(OpenRouter's typed decisions API) for one confidence per judge-eligible edge before any
real-judge request, and issues the queue least-confident first;--judge-budget N%then spends a
truncated run on the edges that need the real judge. Measured on this repository's own tree: 94 %
agreement with the recorded verdicts at p ≥ 0.95, 48 % below 0.60. - The obligation-aware judge (v1.16, R-38/D-28): the request carries
related— the titles of
the C-12depends_onneighbourhood of the edge, both directions, capped at eight — so a test that
asserts a neighbouring obligation's fact while citing this one is not mistaken for a test that
proves it. The same list rides the triagestate. explain <ID>(v1.17, R-40/C-18): a third subcommand that renders one id's whole evidence
trail to stdout — statement, status with the C-05 step that set it, citations, each citing case
with its outcome and the judge's verdict (clause and rationale), and the C-12 blast radius. It
writes no file, issues no judge callcheckwould not, and computes nothing new.- The CLI documents itself (v1.18, R-41/C-19): every flag of all four parsers carries an entry
naming its purpose, accepted values as literal tokens, its default and its preconditions; every
--helpscreen ends with the environment the kernel reads and the exit-code contract. The value
tokens are checked against the validators that reject them, and the environment block against the
code's ownSPECCHECK_*literals. - A fifth skill,
spec-proposal: an evidence-grounded case for a change to a spec that is
already built, argued and decided beforespec-writingtouches a row.
Checked by itself
The tool is written to its own SPEC.md, and this release's increments were built, gated and
audited by it — including four defects it found in its own prose and fixtures:
- F-1 — the golden fixture's adjacent-edge labels contradicted the judge's vocabulary (a test
that runs the cited id's code and asserts a neighbour's fact isEXECUTES_ONLY, not
UNRELATED); the first T-49 run scored 0.7949 and failed its own bar because of it. - F-2 — Phase B flagged one ID
WEAKLY_PASSINGwhose only judged edge was a presence check; the
fix was the test, not the threshold. - F-3 — the README's introduction and this report's title still claimed v1.15/1.15.0 three
increments later; now guarded by a test that asserts the spec's status line, the package version
and the prose agree. - F-4 — the article quoted a stale summary line and a spec row it had lost a sentence from, and
its rendered HTML was older than its source; fixed, and now guarded (the quoted rows must be
verbatim inSPEC.md, and the quoted numbers must match the tree).
Both gate phases are recorded with their model, date and judge_prompt_sha256 in
SPEC_BUILD_REPORT.md (§0h–§0j), which is the per-ID evidence table this tool exists to produce.
Documentation
README.md— the method, the tool, and a quick start that runs against the golden fixture
that ships in the repository.ARCHITECTURE.md— the module-by-module design with data-flow and data-model diagrams (noted
as behind the code, since v1.5).SPEC.md— the specification itself, v1.18, with all 42 decisions it made on the author's
behalf in §12.docs/introducing-speccheck.md— the short article (HTML in the tree).SPEC_REVIEW_REPORT.md,SPEC_BUILD_REPORT.md,JUDGE_CROSSCHECK_REPORT.md,
CENSUS_REPORT.md— the reviews and the recorded measurements behind the numbers above.
Install
uv tool install "speccheck[llm] @ https://github.com/rioffe/speccheck/releases/download/v1.18.0/speccheck-1.18.0-py3-none-any.whl"
speccheck --self-check # runs the packaged golden fixture and compares byte for byteOr from a clone, with the skills, spec2pdf.sh and everything else:
git clone https://github.com/rioffe/speccheck && cd speccheck
./install.sh --interactive
uv sync --extra dev --extra llm
uv run python -m pytest tests -q --junitxml=junit.xml
uv run speccheck check --spec SPEC.md --src src --tests tests --results junit.xml --judge mock --strictThe wheel ships judge_prompt.md and the golden fixture as package data (14 files), so
--self-check works from an empty directory with no repository present.