Prepare a repository-bound change contract before editing code, then verify the original persisted contract after the change.
The Change Safety Loop protects developers and AI coding agents from silent scope expansion, stale repository state, contract tampering, and cross-repository verification.
prepare → contract → change → verify
The workflow is deterministic. It does not authorize a change and it does not decide whether a change is good. It verifies whether the repository still matches the prepared change boundary.
From the repository you intend to change:
vericore prepare "add OAuth login"
Make the change, run your normal tests, then verify the persisted contract:
vericore verify
For an explicit repository and artifact path:
vericore verify \
--path /path/to/repository \
--plan output/engineering-plan.json \
--contract output/agent-change-contract.json \
--output output/verification.json
prepare creates three repository-scoped artifacts:
| Artifact | Purpose |
|---|---|
output/engineering-context.json |
Repository state, evidence, and context used by planning |
output/engineering-plan.json |
Deterministic, evidence-backed implementation plan |
output/agent-change-contract.json |
Persisted repository-bound verification contract |
The contract binds the planned change to repository identity and the Git HEAD observed during preparation when Git metadata is available.
Its SHA-256 fingerprint covers the meaningful persisted contract fields, including the change summary, repository identity, prepared HEAD, planned paths, expected components, verification commands, evidence IDs, architecture expectations, and schema information.
The plan and contract are deterministic artifacts. Preparation does not modify source code.
Use your normal development workflow or an AI coding agent.
Do not:
PASS result as a substitute for tests or code review.Verification loads the persisted contract and validates:
HEAD freshness;For a fast boundary check, vericore verify --contract-only validates the persisted contract, repository identity, prepared HEAD, plan binding, and current mutation scope without rebuilding the full dependency analysis graph.
A missing, tampered, mismatched, cross-repository, or stale contract produces FAIL. Verification does not silently reconstruct a replacement contract from a mutable plan.
| Status | Meaning |
|---|---|
PASS |
The persisted contract is valid and detected changes remain within the planned scope. |
REVIEW_REQUIRED |
The contract is valid, but the change contains a condition that needs explicit engineering review, such as a deleted file or critical deterministic finding. |
FAIL |
The contract is invalid or stale, or a detected change falls outside the prepared scope. |
These statuses are review signals, not proof of software correctness. Tests, review, and human engineering judgment remain required.
The release and E2E test suites exercise the safety boundary against:
HEAD;The goal is to fail closed when the prepared verification boundary is no longer trustworthy.
An MCP-compatible agent can use the same boundary:
Vericore evidence
↓
prepare
↓
persist Agent Change Contract
↓
agent changes repository
↓
verify original persisted contract
↓
agent runs tests / responds to findings
The MCP verification path uses the persisted output/agent-change-contract.json when no explicit contract object is supplied.
vericore_get_change_contract is a retrieval operation: it reads the persisted output/agent-change-contract.json and does not generate a replacement contract.
The workflow is local-first. Repository paths use Vericore’s path-safety boundary. The workflow does not upload repository contents to Vericore infrastructure.
AI is optional. The deterministic prepare/verify workflow does not require an external model.