get-shit-done/references/gates.md
Canonical gate types used across GSD workflows. Every validation checkpoint maps to one of these four types.
Purpose: Validates preconditions before starting an operation. Behavior: Blocks entry if conditions unmet. No partial work created. Recovery: Fix the missing precondition, then retry. Examples:
Purpose: Evaluates output quality and routes to revision if insufficient. Behavior: Loops back to producer with specific feedback. Bounded by iteration cap. Recovery: Producer addresses feedback; checker re-evaluates. The loop also escalates early if issue count does not decrease between consecutive iterations (stall detection). After max iterations, escalates unconditionally. Examples:
Purpose: Surfaces unresolvable issues to the developer for a decision. Behavior: Pauses workflow, presents options, waits for human input. Recovery: Developer chooses action; workflow resumes on selected path. Examples:
Purpose: Terminates the operation to prevent damage or waste. Behavior: Stops immediately, preserves state, reports reason. Recovery: Developer investigates root cause, fixes, restarts from checkpoint. Examples:
| Workflow | Phase | Gate Type | Artifacts Checked | Failure Behavior |
|---|---|---|---|---|
| plan-phase | Entry | Pre-flight | REQUIREMENTS.md, ROADMAP.md | Block with missing-file message |
| plan-phase | Step 12 | Revision | PLAN.md quality | Loop to planner (max 3) |
| plan-phase | Post-revision | Escalation | Unresolved issues | Surface to developer |
| execute-phase | Entry | Pre-flight | PLAN.md | Block with missing-plan message |
| execute-phase | Completion | Revision | SUMMARY.md completeness | Re-run incomplete tasks |
| verify-work | Entry | Pre-flight | SUMMARY.md | Block with missing-summary |
| verify-work | Evaluation | Escalation | Failed criteria | Surface gaps to developer |
| next | Entry | Abort | Error state, checkpoints | Stop with diagnostic |
Use this taxonomy when designing or auditing workflow validation points:
Selection heuristic: Start with pre-flight. If the check happens after work is produced, it is a revision gate. If the revision loop cannot resolve the issue, escalate. If continuing is dangerous, abort.