What is a stage contract?
Each stage has a triggering event, revisioned inputs, bounded execution, an output a person can see, objective validation and a controlled transition to the next state.
Because every stage declares the same six parts, a stage can be run by a person today and by an agent next quarter without its meaning changing.
- 01
Event
Trigger and accountable owner
Example: Requirement ready, approval, failure, alert
- 02
Input
Revisioned sources and access
Example: Specification, repository, constraints, prior evidence
- 03
Execution
Bounded objective and tools
Example: What the agent does, and explicit stop rules
- 04
Output
A human-visible artifact or action
Example: Work item, specification, commit, pull request, test run, report
- 05
Validation
Evidence and acceptance criteria
Example: Automated checks plus a designated reviewer
- 06
Transition
Next state and branch conditions
Example: Advance, revise, rerun, block, escalate
What must each field contain?
| Field | Mandatory properties |
|---|---|
| Event | The trigger, stage and work-item ID, responsible actor, source and prior state. |
| Input | References and revisions of the requirement, specification, code, plan and tasks; permission scope, constraints and prerequisites. |
| Execution | A specific goal, allowed tools, stop conditions, timeout, retry policy and forbidden operations. |
| Output | Artifact type, link or identifier, content revision, author, status and timestamp. |
| Validation | Acceptance criteria, machine evidence, reviewer, approved version and failure details. |
| Transition | Next state and actor; the permitted advance, revise, rerun, block, escalate, archive or remediate paths. |
What states can a stage be in?
A stage moves through a small set of standard states. Each transition stores the artifact revisions and approvals that justified it.
- CREATED
- READY
- RUNNING
- VALIDATING
- REVIEW_REQUIRED
- APPROVED
- COMPLETED
Exception states
- FAILED
- BLOCKED
- NEEDS_REVISION
- RETRY_PENDING
- CANCELED
- REMEDIATION_REQUIRED
What does a filled-in contract look like?
Here is the contract for one implementation task:
| Field | Implementation-stage example |
|---|---|
| Event | An approved implementation task becomes READY. |
| Input | Specification v3, plan v2, task TASK-412, the target trunk commit, repository rules and scoped source-control access. |
| Execution | Make bounded code changes and add unit tests. Direct merges and production deploys are prohibited. |
| Output | Task branch, commits, a draft pull request, a linked work-item comment and the test command results. |
| Validation | Changed behavior matches the specification, local checks were run, the secret scan is clean and nothing is out of scope. |
| Transition | PASS goes to Run and verify; FAIL returns to implementation; BLOCKED goes to a named owner and the review queue. |
The output is an artifact or action someone can verify. A chat reply from the agent does not count.
From AI-Enabled Software Delivery, version 9.3, October 31, 2026. Brandon Zweifel, Zweifel Tech LLC.