This skill should be used when the user asks to "implement a contract", "implement contract X", "fulfill this change contract", "execute contract at path", "implement the definition of done", or wants to autonomously implement requirements from a Change Contract file. Produces working implementations with proof of compliance through tests and verification reports.
This skill inherits all available tools. When active, it can use any tool Claude has access to.
Autonomously implement a Change Contract by translating its behavioral specifications into working code. Produce proof of compliance through automated tests and a compliance report. Operate idempotently—running against an already-implemented contract generates a compliance status report and offers to fill any gaps.
If a specific contract path is provided, use it. Otherwise:
docs/change-contracts/ for contract files (.md files, excluding *-compliance.md)Before any implementation, validate the contract is implementable.
If gaps detected in contract:
"The contract has gaps that prevent implementation:
- [Gap 1]: [Why it's problematic]
- [Gap 2]: [Why it's problematic]
Please update the contract to address these gaps before proceeding."
Stop and wait for contract correction. Do not proceed with partial implementation of an invalid contract.
Check what already exists before implementing anything.
Map contract requirements to codebase:
Assess compliance status for each requirement:
Generate compliance status report (see Reporting Phase format)
If fully compliant:
"This contract is fully implemented. See compliance report at [path]."
Stop. No implementation needed.
If gaps exist:
"This contract is partially implemented. Gaps identified:
- [Gap 1]
- [Gap 2]
Would you like me to implement these gaps?"
Wait for user confirmation before proceeding.
Implement changes that fulfill contract invariants. Full leeway on HOW—the contract defines WHAT must be true, not how to achieve it.
If implementation encounters an unforeseen obstacle:
Do not stop entirely. Maximize implemented compliance and report what remains.
Create proof of compliance through automated tests.
Map Acceptance Checks to tests:
Test categories:
Run tests and capture results
If tests fail:
Generate a compliance report documenting implementation status.
Report location: Create at docs/change-contracts/[contract-name]-compliance.md
Report structure:
# Compliance Report: [Contract Name]
**Contract**: [path to contract file]
**Generated**: [timestamp]
**Status**: [Compliant | Partial | Blocked]
## Summary
[1-2 sentence summary of compliance status]
## Implementation Status
### Behavioral Contract
#### Inputs
| Requirement | Status | Implementation |
|-------------|--------|----------------|
| [Input 1] | [status] | [file:line or description] |
#### Outputs
| Requirement | Status | Implementation |
|-------------|--------|----------------|
| [Output 1] | [status] | [file:line or description] |
#### Invariants
| Invariant | Status | Enforcement |
|-----------|--------|-------------|
| [Invariant 1] | [status] | [how enforced] |
#### Failure Modes
| Failure Mode | Status | Handler |
|--------------|--------|---------|
| [Mode 1] | [status] | [file:line] |
### Operability Contract
#### Logs
| Requirement | Status | Location |
|-------------|--------|----------|
| [Log 1] | [status] | [file:line] |
#### Metrics
| Metric | Status | Implementation |
|--------|--------|----------------|
| [Metric 1] | [status] | [description] |
#### Load Behavior
| Behavior | Status | Implementation |
|----------|--------|----------------|
| [Behavior 1] | [status] | [description] |
## Test Coverage
| Acceptance Check | Test | Result |
|------------------|------|--------|
| [Check 1] | [test file:name] | [Pass/Fail] |
## Blockers
[If any blockers were encountered, list them here with details]
### [Blocker Title]
- **What**: [What couldn't be implemented]
- **Why**: [Why it was blocked]
- **Resolution**: [Suggested path forward]
Running this skill multiple times on the same contract produces convergent results:
Each run should leave the codebase in an equal or better state of compliance.
Clearly distinguish operational modes:
Announce transitions between modes to maintain clarity.
This skill complements the change-contract-generator:
Generator (interview) → Change Contract → Implementer (this skill) → Working Code + Proof
The contract serves as the sole specification. Do not reference conversations, assumptions, or context outside the contract document. If something is not in the contract, it is not a requirement.