Repository navigation
Releases
speccheck 1.26.1
A patch release of speccheck 1.26. It brings the two formal models up to SPEC.md v1.26 and closes known anomaly KA-04. No spec row and no kernel code changed.
Package tree SHA-256 (for installation qualification)
package_tree_sha256 3469a9ea6058bda94d128bea9f8582f78ff6d8bfbcbed1a4be82a63f5f7415d6 (64 files)
Three computations of this value agree:
shasum -a 256over the files ofgit archive v1.26.1 src/speccheck;speccheck qualifyon the attached wheel, installed into a fresh environment:qualify: QUALIFIED - IQ 64 files, tree 3469a9ea6058; OQ 5/5 cases;- the value recorded in
SPEC_BUILD_REPORT.md§0q.
The wheel and sdist were built from a clean export of the tag; their sums are in SHA256SUMS.
What changed
-
Formal models at v1.26.
proof_from_spec/(the spec's own model): 144 kernel-checked theorems; 79 requirement IDs proven; every other ID mapped to its §9 tests.proof/(the model of the code): 124 theorems; 75 IDs proven; every other ID mapped to the test file that carries it.- Both build with zero warnings from a clean
.lakeon Lean 4.34.0. - New for-all-inputs results include:
UNPROVENnever appears under--strict;- the hazard roll-up's properties, including that the downgrade-only judge can never turn a hazard
VERIFIED; verifyreads no file before failing with exit 2 or 3;qualify's verdict, derived in code fromfirst_failure, matches the verdict sentence of C-29 on every input;- the known-anomaly selection keeps unfixed entries and file order.
-
KA-04 fixed. The models now cover the v1.25 exit rule.
qualifylists KA-01, KA-02, KA-03 and KA-05 for 1.26.1 and later. -
Two spec findings, open. Both have kernel-checked witnesses in
docs/reviews/SPEC_MODEL_FINDINGS.md.- F-904: E-19 says a run with every ID
UNCITEDexits1, while §5.4 and R-15 give0to a non-strict run with nothingFAILING. - F-905: D-45 makes a failed proof fail
--strict, while R-15 says status and hazard status are its only inputs.
In both cases the shipped code follows E-19 and D-45. A v1.27 proposal (not yet published) folds them into R-15 and §5.4, so no exit code changes.
- F-904: E-19 says a run with every ID
Gates
speccheck (mock): CONFORMING - 356/356 passing (100.0%), 0 failing, 0 skipped, 0 weak, 0 unverified, 0 untested, 0 uncited; 0 dangling, 0 stale; judge=mock; hazards: 10/10 verified
The test suite has 225 passing tests.
Phase A also runs on GitHub Actions:
- The run for
mainat this commit passed first time. - The run for the tag first failed in
test_verbosity_levels, a pre-existing timing flake: the test compares two runs'--verboseoutput, which includes elapsed milliseconds (ms=0againstms=1). Its re-run passed with 225 tests andCONFORMING - 356/356. Nothing in 1.26.1 touches that test.
Phase B (the LLM judge) was not re-run, because no kernel code changed; 1.26.0's four recorded runs stand. The verdict is unchanged from 1.26.0: PASS WITH NOTES.
Validation impact (since v1.26.0), from tools/validation_impact.py v1.26.0
Validation impact (since v1.26.0)
Package tree SHA-256 of this release: 3469a9ea6058bda94d128bea9f8582f78ff6d8bfbcbed1a4be82a63f5f7415d6 (64 files).
Spec ids changed since v1.26.0: 0.
Tool hazards whose controls changed:
None.
Operational-qualification cases whose fixture, goldens or catalog changed:
None.
Re-run speccheck qualify after upgrading, whatever this section lists.
No spec ID, tool-hazard control or OQ case changed. Re-run speccheck qualify after upgrading and compare the tree hash above.
Upgrading
Install from the attached wheel, or from a clean checkout of the tag. Then run speccheck qualify and compare its tree hash with the value above.
speccheck 1.26.0
speccheck checks a spec-driven build mechanically: it maps every spec ID to the code and tests that cite it. This release ships with the spec-writing, spec-review, spec-plan, spec-model, spec-proof, spec-build and spec-proposal skills, spec2pdf.sh, and install.sh. The code is MIT-licensed and the documents are CC BY 4.0.
This release implements all of SPEC.md v1.26: 356 spec IDs, 225 tests.
speccheck (mock): CONFORMING - 356/356 passing (100.0%), 0 failing, 0 skipped, 0 weak, 0 unverified, 0 untested, 0 uncited; 0 dangling, 0 stale; judge=mock; hazards: 10/10 verified
speccheck (llm): NOT CONFORMING - 355/356 passing (99.7%), 0 failing, 0 skipped, 1 weak, 0 unverified, 0 untested, 0 uncited; 0 dangling, 0 stale; judge=llm; hazards: 10/10 verified
Phase A, the deterministic gate, is clean. It now also runs with speccheck's own tool risk file, so the summary line ends hazards: 10/10 verified.
Phase B, the LLM judge, ran four times with openai/gpt-6-luna-pro via OpenRouter at --judge-concurrency 16. Each run downgraded a different single ID:
- Two were real test gaps, both fixed in this release.
- R-115: nothing exercised the known-anomaly filter.
- I-020: the v1.25 manifest-determinism test never compared identical inputs.
- Two were judge errors.
- E-13: a malformed response.
- E-46: a wrong verdict on an unchanged test that asserts every clause of E-46. Other runs rated the same test
ASSERTS.
The final run's E-46 downgrade was reviewed by hand, and the adjudication was approved. Its unknown_rate was 0.0104 over 1,154 judged edges. All four runs, and the run-to-run agreement (91.7% and 92.9% of verdicts on identical edges), are recorded in SPEC_BUILD_REPORT.md §0q. Re-running until a run came back clean would have been choosing evidence.
This release completes §3.1 of docs/plans/ISO13485_READINESS_PLAN.md, the validation pack. It also delivers §3.5, the development process document, and §3.6, the IEC 62304 templates, and writes up §3.4, what controlling the LLM judge would take.
Package tree SHA-256 (for installation qualification)
package_tree_sha256 d1272546bd055dce34e40e0a61e73a266ff895e0bd241b524547b6da9f9a1748 (64 files)
Three computations of this value agree:
shasum -a 256over the files ofgit archive v1.26.0 src/speccheck;- the value
speccheck qualifyreports for the attached wheel, installed into a fresh environment:qualify: QUALIFIED - IQ 64 files, tree d1272546bd05; OQ 5/5 cases; - the value recorded in
SPEC_BUILD_REPORT.md§0q.
The attached wheel and sdist were built from a clean export of the tag; their SHA-256 sums are in SHA256SUMS.
What is new in 1.26.0 (SPEC.md v1.25 → v1.26)
The intended use (R-110)
SPEC.md §0 now states what a regulated user may rely on:
- Validated function:
check,verifyandimpactwith--judge noneor--judge mock, plus--self-checkandqualify. - Advisory only:
--judge llm,--jev-pre-triageandexplain. They may be used, but their output is not verification evidence.
The same text is packaged in the tool and printed in every qualification record.
speccheck qualify — installation and operational qualification (R-111..R-113)
speccheck qualify --out qualification
# qualify: QUALIFIED - IQ 64 files, tree d1272546bd05; OQ 5/5 cases-
IQ: hashes the installed package into the tree hash above, and checks every hash in the distribution's
RECORD. It readsRECORDdirectly, becauseimportlib.metadatasilently drops entries for deleted files on Python 3.12+. It also records the Python version, the platform and the installed dependency versions. -
OQ: runs five packaged cases, each in a temporary copy of a packaged fixture, under a socket guard:
- the golden fixture (every status);
- the Swift fixture;
--manifest, thenverifybefore and after a one-byte edit;--risk-file, with one hazard eachVERIFIED,NOT_VERIFIEDandUNCONTROLLED;impact.
Each case names the tool hazards it challenges.
-
The record:
qualification.jsonandQUALIFICATION_REPORT.md. They contain the intended use, the environment, the IQ and OQ results, the ten tool hazards, this version's known anomalies, the verdict, and an empty Executed by / Reviewed by signature table. -
Under
uv runin a checkout,qualifyexits1withnot an installed wheel (no hashed RECORD): an editable install cannot be qualified.
speccheck checks its own risk assessment (R-114)
The ten ways the validated function could report a false PASSING, or let a change escape revalidation (TH-01..TH-10), are a v1.25 risk file packaged as speccheck/_qualify/tool_risk.json. The 31 requirements that control them carry *(controls: TH-nn)* markers in SPEC.md, and the build gate runs with --risk-file. A retired or failing control turns the build red.
Known anomalies ship with the code (R-115)
speccheck/_qualify/known_anomalies.json is append-only, and qualify prints every anomaly not yet fixed in the running version. The five open anomalies at 1.26.0:
- KA-01: a row cut by an unescaped
|that keeps its cell count is silent. - KA-02: citation is literal.
- KA-03: the manifest proves which results file was read, not where it came from.
- KA-04: the Lean model predates the v1.25
UNCONTROLLEDexit rule. - KA-05: no OQ case covers the JS/TS adapter.
Documents
docs/validation/: the intended use, the tool risk assessment, the IQ/OQ protocol, the change-control rule and the development process (including its known gaps).docs/templates/: aSPEC.mdprofile for IEC 62304 (safety-class header, SOUP table, the 5.2.2 content map), a traceability matrix generated fromspeccheck.json, and a verification report.docs/plans/JUDGE_CONTROL_ANALYSIS.md: what controlling the LLM judge would take, measured on this build.
Also in this release
- Unchanged commands.
check,impact,explain,verifyand--self-checkwrite and print exactly what 1.25.0 did (I-023). - CI.
.github/workflows/phase-a.ymlruns the Phase A gate on every push and pull request. Phase B stays a manual release step. - PDF links.
spec2pdf.shnow links a label outside the spec's ID families (TH-01,KA-01) to its own definition row, instead of to the start of the section the row sits in. - Spec fixes. Three spec defects found while building were fixed: F-901, F-902 and F-903.
Validation impact (since v1.25.0), from tools/validation_impact.py v1.25.0
Validation impact (since v1.25.0)
Package tree SHA-256 of this release: d1272546bd055dce34e40e0a61e73a266ff895e0bd241b524547b6da9f9a1748 (64 files).
Spec ids changed since v1.25.0: 33.
Tool hazards whose controls changed:
None.
Operational-qualification cases whose fixture, goldens or catalog changed:
| Case | Changed files |
|---|---|
| OQ-01 | src/speccheck/_qualify/cases.json |
| OQ-02 | src/speccheck/_qualify/swift/Package.swift, src/speccheck/_qualify/swift/SPEC.md, src/speccheck/_qualify/swift/Sources/Calc/Calc.swift, src/speccheck/_qualify/swift/Tests/CalcTests/CalcTests.swift, src/speccheck/_qualify/swift/Tests/CalcTests/LegacyTests.swift, src/speccheck/_qualify/swift/golden/SPEC_CONFORMANCE_REPORT.md, src/speccheck/_qualify/swift/golden/speccheck.json, src/speccheck/_qualify/swift/golden/summary.txt, src/speccheck/_qualify/swift/junit.xml, src/speccheck/_qualify/cases.json |
| OQ-03 | src/speccheck/_qualify/cases.json |
| OQ-04 | src/speccheck/_qualify/hazards/SPEC.md, src/speccheck/_qualify/hazards/golden/SPEC_CONFORMANCE_REPORT.md, src/speccheck/_qualify/hazards/golden/speccheck.json, src/speccheck/_qualify/hazards/junit.xml, src/speccheck/_qualify/hazards/proof-results.json, src/speccheck/_qualify/hazards/proof/Fixture.lean, src/speccheck/_qualify/hazards/risk.json, src/speccheck/_qualify/hazards/src/calc/__init__.py, src/speccheck/_qualify/hazards/src/calc/core.py, src/speccheck/_qualify/hazards/src/calc/legacy.py, src/speccheck/_qualify/hazards/src/calc/summary.py, src/speccheck/_qualify/hazards/tests/__init__.py, src/speccheck/_qualify/hazards/tests/test_core.py, src/speccheck/_qualify/hazards/tests/test_summary.py, src/speccheck/_qualify/cases.json |
| OQ-05 | src/speccheck/_qualify/cases.json |
Re-run speccheck qualify after upgrading, whatever this section lists.
In short: no tool hazard's controls changed. v1.26 only added CONTROLS markers, and a marker change is not a spec change (C-27). Every OQ case is listed because the catalog is new in this release. Re-run speccheck qualify after upgrading.
Not yet
- The LLM judge in validated use. See
docs/plans/JUDGE_CONTROL_ANALYSIS.mdfor what it would take. - IEC 62304 software safety classes in the tool. The templates carry the class as a header for reviewers.
- Signed releases. A release is identified by its tag and its tree hash.
Upgrading
Install from the attached wheel, or from a clean checkout of the tag: uv tool install ./speccheck-1.26.0. Then run speccheck qualify and compare its tree hash with the one above.
For a development checkout, git pull and re-run ./install.sh.
speccheck 1.25.0
speccheck checks a spec-driven build mechanically: it maps every spec ID to the code and tests that cite it. This release ships with the spec-writing, spec-review, spec-plan, spec-model, spec-proof, spec-build and spec-proposal skills, spec2pdf.sh, and install.sh. The code is MIT-licensed and the documents are CC BY 4.0.
This release implements all of SPEC.md v1.25: 334 spec IDs, 213 tests, and both checker phases conforming.
speccheck (mock): CONFORMING - 334/334 passing (100.0%), 0 failing, 0 skipped, 0 weak, 0 unverified, 0 untested, 0 uncited; 0 dangling, 0 stale; judge=mock
speccheck (llm): CONFORMING - 334/334 passing (100.0%), 0 failing, 0 skipped, 0 weak, 0 unverified, 0 untested, 0 uncited; 0 dangling, 0 stale; judge=llm
Phase B ran with openai/gpt-6-luna-pro via OpenRouter (--judge-concurrency 16) and judged 1,110 edges:
judge_strength: 1.0 (324/324).unknown_rate: 0.0117 (13/1,110).- No ID was downgraded.
The first probe returned HTTP 401 because no valid key was in the environment, so the full run waited until one was. Details are in SPEC_BUILD_REPORT.md §0p.
v1.25 is the first step of docs/plans/ISO13485_READINESS_PLAN.md. It adds two things a team building medical-device software needs from a conformance report filed as a quality record:
- the report can be tied to the exact bytes it was computed from;
- each hazard can be traced to the tests that verify its risk controls.
The design is in docs/proposals/PROPOSAL_v1.25_provenance_manifest_and_risk_controls.md (decisions D-61..D-65).
What is new in 1.25.0 (SPEC.md v1.24 → v1.25)
The provenance manifest: check --manifest (R-106, C-25, I-020)
The two reports are byte-identical for identical inputs, and they carry no version or timestamp. So a line added to a source file after the test run left both reports unchanged. A report filed under ISO 13485 4.2.5 could not say which code it had verified.
check --manifest writes a third file, speccheck.manifest.json, in the same all-or-nothing write as the two reports. It records:
- the tool version and the options;
- the SHA-256 and length of every file the run read, by role (
spec,src,tests,proof,results,citation_map,proof_results,risk_file); - one
tree_sha256over those files, in theshasum -a 256line format; - the hashes of both reports.
Like the reports, the manifest is deterministic: it records no clock, host, or absolute path. Set SOURCE_DATE_EPOCH to record a generated_at time.
speccheck verify (R-107, C-26)
uv run speccheck check --spec SPEC.md --src src --tests tests --results junit.xml --judge mock --manifest --out build/rec
uv run speccheck verify --manifest build/rec/speccheck.manifest.json
# verify: ok - 74 files match, tree 3be076240f44 exit 0 (this repository at v1.25)
# after an edit to src/speccheck/report.py:
# verify: mismatch src/speccheck/report.py
# verify: FAILED - 1 of 74 files differ exit 1verify only re-hashes files. It never re-runs check, writes nothing, and opens no socket. Exit codes:
0: every file matches.1: a file differs or is missing.2:--manifestis missing or outside--root.3: the manifest is malformed or names a path outside--root. This exits before any file is read.
Hazard traceability: the *(controls: …)* marker and --risk-file (R-108, R-109, C-27, C-28)
A requirement that serves as a risk control for an ISO 14971 hazard says so on its own row:
| **R-12** *(controls: HAZ-003, HAZ-007)* | The viewer MUST NOT display a measurement whose sign check fails. |Each hazard rolls up to one status:
VERIFIED: every control isPASSING.NOT_VERIFIED: at least one control is notPASSING.UNCONTROLLED: nothing controls the hazard.
The roll-up appears in four places:
controlson each marked ID, plus a top-levelhazardslist, inspeccheck.json;- a
## 10. Hazardstable in the Markdown report; - a
controls:line inexplain; ; hazards: <V>/<H> verifiedat the end of the summary line.
--risk-file FILE (check only) lists the hazards whose control is allocated to this software. A listed hazard that no row controls is UNCONTROLLED. It fails --strict (R-15 amended), and a run without --strict prints UNPROVEN. A marker naming a hazard the file does not list gets a Note, never a failure.
VERIFIED means the software controls passed their tests. It does not mean the risk is acceptable; that judgment stays in the risk file.
Unchanged unless used (I-021)
A run that uses neither new flag and has no marker in its spec is byte-identical to 1.24.0. Both fixture goldens are unchanged.
A fix found during the build
The spec's C-27 said each marker Note appears at most once per run, but E-78 and E-80 emit one Note per marked ID. Separately, the marker Notes were reaching impact.json, although impact ignores the marker. Both the spec text and the code are fixed (F-801).
Not yet
- Signatures and the identity of whoever ran the check: the manifest proves which bytes a report came from, not who produced it or whether the results file came from that tree. Both belong to your quality system or CI.
- Risk management itself: speccheck does not estimate, evaluate, or accept risk.
- The rest of
docs/plans/ISO13485_READINESS_PLAN.md: the tool validation pack (§3.1), a policy for the LLM judge in regulated use (§3.4), our own development process (§3.5) and procedure templates (§3.6). IEC 62304 safety classes are not modelled.
Upgrading
git pull and re-run ./install.sh. A run that uses none of the new features produces the same reports as 1.24.0. A log parser matching the summary line may see the new ; hazards: … suffix, but only on runs whose spec has a marker or that pass --risk-file.
speccheck 1.24.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-model, spec-proof, 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.24 in full: 307 spec IDs, 189 tests, both gate phases green.
speccheck (mock): CONFORMING - 307/307 passing (100.0%), 0 failing, 0 skipped, 0 weak, 0 unverified, 0 untested, 0 uncited; 0 dangling, 0 stale; judge=mock
speccheck (llm): CONFORMING - 307/307 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 openai/gpt-6-luna-pro via OpenRouter (--judge-concurrency 16) over 1,025
judged edges: judge_available true, judge_strength 1.0 (297/297), unknown_rate 0.0107, no
ID downgraded. A first attempt hit HTTP 402 (account credit exhausted) on 385 calls and is recorded
as invalid; the re-run on identical inputs is the result above — see SPEC_BUILD_REPORT.md §0o.
Most of this release answers a written debrief from a team that ran the whole method against
medical-device software in a regulated setting: eight of their ten suggestions are in, and the
other two are partly in (see Not yet below).
What is new since 1.20.0 (SPEC.md v1.20 → v1.24)
v1.24 — say UNPROVEN, stop cutting table rows, name disconnected ids
UNPROVENinstead of a falseCONFORMING(R-105). Without--stricta run exits0unless
something isFAILING, which is right for watching a trend — but it used to printCONFORMING
over a tree with 0 % passing. Now, on exit0, the summary line saysCONFORMINGonly when every
in-scope ID isPASSINGand nothing is dangling or stale (what--strictchecks), and
UNPROVENotherwise. The exit code and the JSON are unchanged; a log parser matching the first
word gains one alternative.- Backtick spans follow CommonMark (C-01). The table-row splitter paired single backticks, so an
inline span like` ``` `flipped it "outside" for the rest of the row: a later|inside
code split the row and cut the statement, or the row's closing|leaked into the last cell.
Measured over 14 real specs: one statement cut in half (in ten copies), 32 rows with a stray
|. A run of N backticks now closes only at the next run of exactly N. - A cut row gets a Note (E-66). Besides the
$..$case of v1.21, any declared row with more
cells than its table's header now getsstatement may be cut at an unescaped '|': <ID>. - One Note names the IDs nothing references (E-77):
<N> declared id(s) touch no edge: …—
declared, non-retired IDs that no statement names and that name none, soimpactcan never reach
them. Deliberately narrower than "rows that name no other ID", which flagged one correct row in six. - Fix for 1.23.1: this repository's own C-03 had grown past the 16,384-byte statement cap, so
1.23.1 truncated its statement inspeccheck.jsonand in what the judge saw. The JS/TS adapter's
text moved verbatim into a new contract, C-24. (This affected speccheck's own spec, not yours —
but if your contracts are long, the K-14 Note in your reports is worth a look.)
Both fixture goldens gain the one E-77 Note line; nothing else in them moves.
v1.23 / v1.23.1 — other projects' IDs, and citations you cannot write into the code
- Foreign references (R-101, C-22): a token written
<ns>:R-07—platform:C-03— is another
spec's ID. It no longer counts as a citation of your ownR-07, is never dangling, and is listed
inspeccheck.json'sforeignarray with one Note naming the first three. Pass--namespace NS
so your ownNS:R-07counts as local; a bareR-07is always local. --citation-map FILE(R-103, C-23): a JSON map from IDs to existing test cases, for teams
that own the specs but not the test repositories. Each resolving entry is a citation — it counts
toward status like a literal one — but is labelledmappedeverywhere: the JSON,(map)in the
Markdown,(mapped)inexplain, and; citations: <M> mappedon the summary line. An entry that
matches nothing is a Note, not an error. The map file is never scanned for citations.- Both flags work on
check,impactandexplain; a run using neither, with no<ns>:token, is
byte-identical to before. - v1.23.1 folded a full independent review of the spec (17 findings). User-visible: the mock
judge recognises vitest/jestexpect(; the JS tokenizer decides regex-versus-division by a pinned
rule;explain's status reasons name C-05's real step numbers; jest-junit needs
ancestorSeparator: " > "(measured against a real jest 30 run), and a test outside every
describenow joins.
v1.22 — JavaScript and TypeScript tests
.ts .tsx .mts .cts .js .jsx .mjs .cjsfiles under--testsare split into test cases:it/test
calls, named by theirdescribechain, joined to JUnit by file path (R-104). vitest works with
vitest run --reporter=junit; jest needsjest-junitwithclassNameTemplate: "{filepath}",
titleTemplate: "{classname} > {title}"andancestorSeparator: " > ".it.eachrows join one
case as variants. Token-based, so no Node toolchain is needed where the checker runs.
v1.21 — four extractor and CLI gaps
- Ranges (
R-07..R-10,R-07 to R-10,through, dashes) name every declared ID between the
endpoints, soimpactfollows them. - Every cell of a declared row feeds edges, so an edge-case table's outcome column reaches
impact; the judge still sees only the statement cell. - A Note for a row cut inside
$..$by an unescaped|. path outside --rootnames the resolved target of a symlinked path.
Not yet
- Cross-spec traceability:
platform:C-03is recognised and set aside, not followed into the other
spec — a run still checks one spec. - A row cut by
|that leaves its cell count equal to the header's is still silent.
Upgrading
git pull and re-run ./install.sh. Existing reports change only by the new Notes and, on
non-strict runs, the UNPROVEN word.
speccheck 1.20.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-model, spec-proof, 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.20 in full: 267 spec IDs, 153 tests, both gate phases green.
speccheck (mock): CONFORMING - 267/267 passing (100.0%), 0 failing, 0 skipped, 0 weak, 0 unverified, 0 untested, 0 uncited; 0 dangling, 0 stale; judge=mock
speccheck (llm): CONFORMING - 267/267 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 openai/gpt-6-luna-pro via OpenRouter (--judge-concurrency 16):
judge_available true, judge_strength 1.0 (259/259), unknown_rate 0.0202 — no ID downgraded.
Four passes were needed; two of them found a genuinely weak assertion (E-34, R-16), both
strengthened — see SPEC_BUILD_REPORT.md §0l for the round-by-round record.
What is new since 1.18.0 (SPEC.md v1.18 → v1.20)
v1.19 — a --proof/--proof-results parameter pair (R-100, C-20, C-21, I-018, K-17, E-62, E-63, E-65)
--proof PATHS(R-100, C-20): repeatable, comma-separated Lean source files/directories,
scanned by a new adapter besideswift.pythat splits a file on declaration heads
(theorem/lemma/def/abbrev/instance) and reads spec ids from the bold span of the
doc comment ending within one line above the head — the same tag disciplinespec-modeland
spec-proofalready use, so a project's existing Lean sources need no reformatting.--proof-results FILE(C-21, K-17): a JSON proof manifest (build,theorems[], optional
deferred_to_pytest) read and joined to the--proofcitations by declaration name and file
(line where present). A citation the manifest does not mention isunknown; a manifest entry no
citation claims is a Note; a name match at a different file/line isstale. The checker never
runs a prover.- A conditional report extension (I-018):
speccheck.jsongains a top-levelproofobject and
each id aproofarray only when the corresponding flag was given; absent flags leave both
byte-identical to a pre-v1.19 run. v1.19.1 gated the top-level key on--proofor
--proof-resultsafter the spec's own formal model (proof_from_spec/, viaspec-model) found
F-504 — a run given only--proof-resultsread the manifest and reported nothing. tools/proof_evidence.py: a standalone sidecar that produces a manifest for any tagged Lean
project, so the contract is usable outside this repository.
v1.20 — determinacy of three under-specified behaviours (K-18, E-64; C-07 and E-32 amended)
The spec's formal model could not be made total over the input space the spec enumerates: three
enumerated inputs had no stated outcome, each closed in Lean only by returning "the spec says
nothing" (findings F-501/F-502/F-503, kernel-checked witnesses). Each is now pinned.
judge_availableis boolean and total (C-07/E-32, D-46): with--judge mock/llmit is
falsewhenever at least one edge was judge-eligible and no judge call succeeded — whether every
call failed (E-14) or none was issued at all (E-35: a0%budget, or a deadline reached before
the first request) — andtrueotherwise; nevernullunder those modes. E-32's reason selection
therefore recordsunavailable(notnull) for a budget-skipped run that trips--strict.
This is the one behavioural change in the release: a--strict --judge llmrun whose eligible
edges are all budget-skipped goes from exit1with no recorded reason to exit1with
strict_judge_failure"unavailable". Both golden fixtures are unaffected.explainrequires--spec, and says so (E-64, D-47):speccheck explain R-01with no spec
flag exits2withexplain: --spec is requiredand writes no trace; the synopsis is
unbracketed. The flag was already required — the change states the behaviour the flag table
already asserted and gives the missing flag its own message instead of argparse's generic text.- Exit-code precedence (K-18, D-48): when one invocation carries both a usage fault (
2) and an
input-contract violation (3), the usage fault wins — flag, value and--root-containment
validation completes beforeSPEC.md, the results file, the output directory or--againstis
read, so the run never reaches the contract check that would have failed.
Fixed
- Two assertions Phase B found weaker than they claimed (E-34, R-16): the killed-run-leftover
tests planted the artifacts but never asserted they existed before the run, and the determinism
test compared runs' stdout and the golden fixture but never the two runs' own report files. Both
now assert the clause they cite. - Two pre-existing lint errors that failed
ruff check src tests toolson the tree as received
(tools/lean_doc.pyW292,tools/proof_evidence.pyE741).
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.20, with every decision it made on the author's
behalf in §12, including D-46..D-48 that this release pins.docs/introducing-speccheck.md— the short article (HTML in the tree).SPEC_BUILD_REPORT.md— the per-ID evidence table this tool exists to produce, with §0l for
this increment: the wave ledger, both gate summary lines and the Phase B rounds.docs/proposals/PROPOSAL_v1.20_spec_determinacy.md— the argument behind v1.20, with the
three Lean witnesses.
Install
uv tool install "speccheck[llm] @ https://github.com/rioffe/speccheck/releases/download/v1.20.0/speccheck-1.20.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, so --self-check works
from an empty directory with no repository present.
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.
speccheck 1.5.0
First tagged release of speccheck, the specification conformance checker, together with the
spec-writing / spec-review / spec-build skills, spec2pdf.sh, and install.sh.
Implements SPEC.md v1.5 in full: 170 spec IDs, 74 tests, both gate phases green.
speccheck (mock): CONFORMING - 170/170 passing (100.0%), 0 failing, 0 skipped, 0 weak, 0 unverified, 0 untested, 0 uncited; 0 dangling, 0 stale; judge=mock
speccheck (llm): CONFORMING - 170/170 passing (100.0%), ... 0 weak ...; judge=llm (openai/gpt-4o-mini via OpenRouter, unknown_rate 0.0000)
speccheck 1.5.0 (SPEC.md v1.2 → v1.5)
- Progress indicator for
--judge llm(SPEC v1.3, R-30 / C-11 / K-13): one in-place line on
stderr —judge: [########------------] 132/331 edges 2:14 elapsed ~3:23 left— shown when
stderr is a terminal (--progress auto|always|never), pure ASCII, no terminal escapes, erased
when the stage ends; stdout, both reports, and the exit code are untouched. - Ctrl-C works, once (SPEC v1.5, E-41): an interrupt exits
3withinterrupted, erases the
indicator, removes temporaries and any half-renamed report, abandons in-flight judge requests,
and never starts queued ones. Measured against a server holding requests for 15 s: 0.2 s to exit
(previously the first Ctrl-C was invisible until a request finished, then waited for the rest). - Spec review applied (SPEC v1.4, F-201..F-210): the indicator owns stderr while displayed,
one clock origin, coalesced redraw cadence with atomic writes,max_unknownemitted with four
decimals, C-08 header for--judge none, T-46/T-60 traced, I-005 tidied, T-49 names its labels. - Tests strengthened by the LLM judge itself: R-20, K-02, K-03, K-08, E-29 were proved only by
implication; each now asserts its behavior outright. - Judge endpoints: Ollama, OpenRouter, Anthropic's OpenAI-compatible endpoint, or anything else
speakingchat/completions— three environment variables, no code change.
spec2pdf.sh
D-nndecision ids are clickable;sec-contractsanchors only §4 (no duplicate-identifier warning).- No more silent exit 1: xelatex errors are reported (warning if the PDF was still written, error
if not) instead of trippingset -ebefore the PDF check. - Markdown is read without pandoc's
raw_tex, so a backslash in prose (e.g. a judge rationale
quoting'\n') is text, not a TeX command. - Options summary line replaces the per-argument debug echo;
--margin=VALUEaccepted.
Documentation and licensing
- README opens with an introduction to specification engineering: what a
SPEC.mdlooks like, the
three skills and what each produces, and the write → review → apply → build workflow. ARCHITECTURE.mddescribes the 1.5.0 build;SPEC_REVIEW_REPORT.md(v1.3 review) and
SPEC_BUILD_REPORT.md(v1.4/v1.5 increments) carry the evidence.- Dual license: documents (spec, skills, README, reports) CC BY 4.0; code MIT (
LICENSE-CODE).
Install
uv tool install "speccheck[llm] @ https://github.com/rioffe/speccheck/releases/download/v1.5.0/speccheck-1.5.0-py3-none-any.whl"
speccheck --self-check # self-check: okor ./install.sh from a checkout for the skills, spec2pdf.sh, and the local-judge environment.