Repository navigation
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.