An in-code, AI-native annotation system + multi-language toolchain: markers like
@spec/@rule/@linklive right on the code, distilled by per-language tools into a machine-readable asset for AI to consume. It is the shared source-of-truth for spec/case assets bound to code, used white-box by case-code-review (ccr) and black-box by test/eval/perf harnesses. | 中文: README.zh-CN.md
A spec states the intent/contract of a code symbol (a function). A case is one reusable stimulus + per-face judgment criteria hanging off that spec. spec-case's distinct contribution is a stable code↔spec/case binding — the symbol-id — so the same asset can be:
- run black-box by a harness (
case → verdict), and - attached white-box by
ccrto the changed review unit (spec/case as a per-function checklist).
A review unit is the review-side twin of a case: same "requirement/contract" asset, two consumers.
docs/—concepts.md,glossary.mdspecs/— normative specs in OpenSpec'sRequirement / Scenariostyle;specs/symbol-id/is the core contractlanguages/— per-language expression (go.mdmarkers,python.mddecorators) + examplesschemas/—case.schema.json,spec-json.schema.json(the generated artifactccringests)python/— the pip package: markers +specgen(dependency-free core), plus the canonical Case model (spec_case.model/spec_case.facets, install with the[model]extra) — the singleCase/CaseSettype black-box runners such as case-harness load, validate and hash
pip install spec-case # markers + specgen only, zero deps
pip install 'spec-case[model]' # + canonical Case model (pydantic, pyyaml)Early WIP. The case model and vocabulary are standard test/eval terms; the symbol-id binding is the new piece this project owns.