mk:sprint-contract
File-based protocol in which the developer and evaluator agree on testable acceptance criteria and sign them in git before code is written.
| Source | .claude/skills/sprint-contract/SKILL.md |
| Owner | lifecycle |
| Runtime | claude-code |
| Risk | high |
What it does
mk:sprint-contract produces a contract at tasks/contracts/{YYMMDD-HHMM}-{slug}-sprint-{N}.md so the generator (the developer agent) and the evaluator grade the same scope. It is a shared document, not a checkpoint. The developer reads the signed contract before editing source, and no hook checks that or blocks an edit while the contract is unsigned.
It serves product-level specs that feed mk:autobuild.
When not to use it
| Case | Use instead |
|---|---|
| Validating one task's plan in a cook flow | mk:validate-plan |
MEOWKIT_AUTOBUILD_MODE=LEAN, where the model derives criteria from the spec | skip the contract |
A --fast plan or a simple /mk:fix | skip the contract |
Usage
/mk:sprint-contract propose <task-slug>| Subcommand | Owner | Effect |
|---|---|---|
propose | developer | Drafts the contract from the newest plan and a rubric preset. Status goes draft to negotiating. |
review | evaluator | Checks each criterion for testability, rubric fit and clear scope, and adds clarification requests. |
amend | developer | Revises the criteria in response and adds a round. |
sign | both | Each agent commits to the contract in git. Status becomes signed. |
sprint-goal | user | Sets, shows or aligns a sprint-level goal. |
The harness runs propose, review, amend and sign automatically between the test and build phases.
Steps
proposereads the newesttasks/plans/*/plan.md, loads a preset withmk:rubric/scripts/load-rubric.sh --preset, and copiesassets/contract-template.md. It fills 5 to 15 criteria in Given/When/Then form, each bound to one rubric and given a verification line. Every rubric in the preset should have at least one criterion.reviewappendsRound N (reviewer)notes to the negotiation log, oracceptedwhen the contract is clean.amendaddresses each note by replacing the criterion and appendsRound N (proposer).- After two rounds the next round asks the user.
signtakes two commits per agent. The first commits the file, the second records that commit's SHA ingenerator_signedorevaluator_signed. For the evaluator the second commit also setsstatus: signed.git log --onelineon the file is the audit trail.
A placeholder such as null, pending, todo or empty in a signature field means that agent has not signed. Nothing checks the field for you.
Amending after signing
Set status: amended and null both signature fields first, then append ### Amendment N under ## Amendments and commit. Do not edit the signed criteria. Add a revised criterion or an override note. Both agents then sign again. Until they do, hold off on source edits.
Sprint goal
| Action | Form | Effect |
|---|---|---|
set | sprint-goal set "<text>" --sprint N | Writes sprint_goal: (120 characters or fewer) to tasks/contracts/sprint-state-{YYMMDD}-sprint-{N}.md, created from assets/sprint-state-template.md. It takes a flock first. |
show | sprint-goal show --sprint N | Prints the goal from the newest matching file. |
align | sprint-goal align --plan <path> | Compares the plan goal with the sprint goal. Advisory only. |
Gotchas
- Do not edit signed criteria in place. Revise through the Amendments section.
- Escalate to the user on round 3. Agents that fail to converge in two rounds will not in five.
- Bind every criterion to one rubric in the active preset, or the evaluator has nothing to grade against.
- Sign with real git commits. The fields hold SHAs, not "yes".