Build One
Purpose
Implement exactly one planned slice without expanding the behavioral contract or building through a known stale/required analysis checkpoint.
When to use
Use after a task is selected and scope is frozen.
Inputs
SPEC.mdPLAN.mdTODO.mdSCOPE.mdor the active scope boundary- Current repo status and frozen Git base
- Analysis checkpoint when present in
HANDOFF.mdor other current state
Workflow
Read
SPEC.md,PLAN.md, andTODO.md.Select one task.
Confirm the scope boundary. When
SCOPE.mdandscripts/scope_gate.pyexist, run the scope gate against the frozen base before the first new implementation write. ExistingFAILor unresolvedREVIEW_REQUIREDstate blocks further edits.Perform the cheap
analyze-minieligibility check using artifacts already loaded for this build:REQUIREDorSTALEcheckpoint -> invokeanalyze-minibefore editing.FRESHcheckpoint -> confirm its task-defining inputs still match current state; if not, mark itSTALEand invokeanalyze-mini.- missing checkpoint or
NOT_NEEDED-> invokeanalyze-minionly when a current trigger exists. - Missing prior analysis alone does not require
analyze-mini. - Do not broaden discovery merely to prove that analysis is unnecessary.
If full analysis returns
BLOCKED, stop before implementation and resolve the contradiction or decision.Confirm the spec ceiling: each intended behavior change must satisfy an acceptance criterion or be necessary support for one. Explicit non-goals remain out of scope.
If the implementation needs behavior outside that ceiling, stop and renegotiate or update the spec before making that expansion.
Make the minimum useful change.
Run relevant verification.
Run the scope gate before declaring the slice complete when
SCOPE.mdand the helper exist:python scripts/scope_gate.py --base <frozen-base>A scope-gate
FAILblocks completion and requires a revert or pre-write scope renegotiation.REVIEW_REQUIREDmust be surfaced and resolved; it is not permission to continue silently.Update
VERIFY.mdorHANDOFF.mdwith a compact build note:- Selected slice
- Files touched
- Why each file was touched
- Compatibility seams preserved
- Analysis checkpoint:
FRESH | NOT_NEEDED - Scope gate:
PASS | FAIL | REVIEW_REQUIRED - Spec ceiling respected: yes/no
- Unexpected behavior added: none | describe
- Tests changed: yes/no
- Verification run
- Stop reason
Update task status.
Stop after one task.
Summarize changed files and result.
Outputs
- One implemented slice
- Changed file summary
- Verification result
- Scope-gate result when a persisted scope contract exists
- Build note
- Updated
TODO.mdif appropriate
Stop conditions
- The selected task is complete, verified, and inside the frozen write boundary.
- The task needs a scope or spec change.
- Scope gate returns
FAILor unresolvedREVIEW_REQUIRED. - Analysis is
REQUIRED,STALE, orBLOCKEDand must be resolved before editing. - Verification fails and diagnosis is needed.
- A useful adjacent improvement is discovered but is not required by the current acceptance criteria.
Anti-patterns
- Running
analyze-minibefore every build as a ritual. - Treating absence of an analysis checkpoint as a blocker by itself.
- Changing
SCOPE.mdafter an out-of-scope edit to make the final diff look compliant. - Continuing after a scope-gate failure because the changed code appears useful.
- Continuing into the next task without approval.
- Refactoring unrelated code.
- Adding "helpful" behavior beyond the acceptance criteria because it is nearby or easy.
- Treating partial infrastructure as a completed slice.