Repository navigation
Releases
Releases · lazy9sascha/contract-as-a-code
v0.15.0
Feature map
- Command evidence adapter. Set
targetto"command"to run Python, Node.js, or another test command. CAAC passes the argument list directly in a private checkout copy without shell expansion. Command adapter - Zero-trust execution and replay. Add
--zero-trusttocaac evidence runorcaac evidence check. CAAC rejects dirty checkouts and clears the inherited environment withenv_clear()before setting a freshHOMEandTMPDIR. The check replays the case from a clean snapshot. Isolated verification - Negative control. Declare
negative_controlto require a passing baseline and a test that detects a controlled change. A test that still passes after the change fails withfalse-green-test. Negative controls - Independent review follow-up. Read
verification_modeto distinguishreceipt-onlychecks fromreverifiedchecks. Seeverified_casesandtotal_casesincaac map. Usecaac initto generate a runnable Python example from contract to evidence and map. Feature map · Runnable starter
Workflow
flowchart LR
Bind["Bind the case to a test command"] --> Baseline["Run the baseline"]
Baseline -->|Passes| Mutation["Run the declared mutation in a separate copy"]
Baseline -->|Fails| Blocked["Block the run"]
Mutation -->|Test detects the change| Detected["Record detected-regression"]
Mutation -->|Test still passes| FalseGreen["Block false-green-test"]v0.14.0
Feature map
- Feature map. Use
caac mapto render a contract and selected execution receipts and acceptance gates. Choose offline HTML, Markdown with Mermaid, orcaac-feature-map-v1JSON. Feature map guide - Five-minute onboarding. Use
caac initto createCONTRACT.mdandcaac-evidence.example.jsonin one command. Add--cito include a GitHub Actions workflow. The draft starts with one open decision. Init guide - GitHub Pages. Read the quickstart on the project homepage and inspect the feature map from the recorded BATCH-006 run. Project homepage · Batch feature map
Workflow
flowchart LR
Init["Create a starter contract"] --> Lint["Lint the draft and resolve the open decision"]
Lint --> Evidence["Run the bound case"]
Evidence --> Map["Render the contract with selected receipts and gates"]v0.13.0
Feature map
- Local MCP verification. Use
caac_evidence_check,caac_gate_check, andcaac_admit_checkalongsidecaac_lint. The three new read-only tools return the same decisions as the CLI, including stale evidence and blocked admission. MCP guide - Trusted execution. Use
caac admit execto run a trusted command only after recording admission. Child exit code zero recordscompleted. A nonzero exit, signal, or process error recordsuncertain. The shared journal blocks repeated execution for the same action ID. Admission and recovery - CAAC-27. Pin the three CI jobs to Rust 1.100.1 with rustfmt and Clippy.
Workflow
flowchart LR
Verify["Inspect verification results over local MCP"] --> Admit["Check and record admission"]
Admit --> Execute["Start the trusted command"]
Execute -->|Exit 0| Complete["Record completed"]
Execute -->|Failure| Reconcile["Record uncertain for reconciliation"]v0.12.0
Feature map
- CAAC-14. Use
caac gate checkto check syntax and binding, independent review, current execution evidence, and owner acceptance for an exact contract revision. Store the approval and receipt outside the source snapshot. Acceptance gate - CAAC-15. Use
caac admit checkto inspect an action,caac admit enterto record admission before its effect, andcaac admit journalto record recovery. The owner manifest defines the paths and scope. Requests cannot assign their own permissions or expand a delegation. A shared journal admits only one caller per action ID and blocks retries while the effect is uncertain. Admission and recovery - CAAC-35. Use the shared
clapparser incollect,review-packet,review-findings, and evidence-backedcandidate apply. Both--flag valueand--flag=valuework. The same inputs produced matching artifact bytes before and after the change.
Compatibility
- Add
allowed_targetsandaccepted_scopeto the owner manifest'sacceptanceblock. Remove those fields from admission requests.
Workflow
flowchart LR
Review["Collect and review evidence"] --> Gate["Check exact revision acceptance"]
Gate --> Enter["Check owner policy and record admission"]
Enter --> Recover["Confirm or reconcile the effect"]v0.11.0
- Check clause references, case bindings, and compact layouts with
caac lint. Usecaac mcpto lint supplied Markdown through a local MCP connection. - Use
review-checkto check a saved case and its artifact hashes. Record observed results withevidenceand block receipts from counting as current when their inputs change. - Replay continuation after an item error (
BATCH-006) and negative integer division (DIV-002). Check the PigeonMQ resend case against a pinned source revision and detect the loss of the original message in a regression run. - Inventory a complete Git tree and report changed paths without declared clause links. Use the shared CLI usage in help and argument errors. List
synconce and includecompare-observationsin both outputs.
On 2026-11-30, local verification passed 342 Rust tests and 10 batch replay checks. Remote CI passed check, contract-impact, and pigeonmq-contract for the merged feature set. Exact revision approval and general dependency tracing remain follow-up work. Verification scope · CI run
CAAC v0.10.1
- Tag the checked commit only after its version and release checks pass. Keep staged and untracked files intact when release checks fail.
- Correct the draft-sizing instructions and release status. Add a public replay for a pinned itoa formatting example.
- Keep candidate fixture hashes stable when Git converts line endings on checkout.
CAAC v0.10.0
- Create a typed contract draft from structured answers with
caac candidate apply. Verify the generated review, trace clause and case references, and revise a draft while retaining its provenance. - Render XS through XL drafts, including typed expression cases in XS and flat S, and write each XL module to its own review file.
- Collect source observations at pinned revisions and keep unresolved requirements visible for review.
CAAC 0.9.0
Contract as a Code (CAAC) 0.9.0
What is CAAC?
CAAC treats a contract as a program. The contract sits above the implementation harness.
Key features
- Syntax checker: machine-checkable clause validation (IDs, 20-word limit, references)
- Contract schema (JSON): machine-readable contract format
- Code generation:
caac gengenerates Rust traits from schema - Markdown generation:
caac mdgenerates Markdown contracts from schema - Bidirectional conversion:
caac parse(md→json) andcaac extract(rust→json) - Repair watch:
caac watchre-runs checks on file changes - Interview:
caac interviewwalks through open decisions - Resume:
caac resumecontinues previous interviews - Suggest:
caac interview --suggestgenerates heuristic suggestions - Harness:
caac runexecutes the completion loop - Pattern library: 34 prepared patterns with slot filling
- Sync:
caac syncbidirectional regeneration
Commands
caac check, scratch, plugin, migration, watch, interview, resume, run,
gen, md, parse, extract, sync, pattern list, pattern gen
Verification
- 23 tests passing
- CI: GitHub Actions (fmt/test/clippy/check)
- Broken links: 0