ticket:execute
Implement one ticket test-first from the spec’s implementation plan.
Inputs
Section titled “Inputs”| Name | Type | Required | Description |
|---|---|---|---|
ticket-id |
string | yes | Ticket ID from the spec’s implementation plan |
Outputs
Section titled “Outputs”- The ticket’s changes, uncommitted, with RED and GREEN evidence recorded under the git directory
How it runs
Section titled “How it runs”- Finds the ticket in the spec’s plan. It never needs the tracker, so a run can resume offline. A Done or Blocked row stops it, and a Blocked dependency blocks the ticket. When the section lacks its acceptance criteria, RED check or
Skill:line, an attended run offers a draft for your approval; a goal run blocks the ticket withguard block --question. - Starts clean. The working tree must be clean, except for the spec’s own
implementation-plan.md.guard marker startrecords the mode and the start commit. - Loads the guard. It invokes the
ticket-guardskill, checks that its hooks registered, then loads the skill on the ticket’sSkill:line. Attended, it summarizes the ticket, the files it expects to touch and the RED check, and waits for your confirmation before any work. - RED. It writes the failing test first and records it with
guard run red. The test imports the code under test inside its body, so an import error never passes as RED. Any script a RED or GREEN command runs is committed in the repo with the ticket’s tests, never left in/tmpor a scratchpad. From then on the test files are frozen. A docs or configuration ticket records RED with--type stand-inand the plan’s check. A refactor fix ticket uses--type refactorwith the full suite, which must pass; it is refused whenreview/metrics.mdshows its metric tool did not run. - Implements and records GREEN with
guard run green, then runs the project’sverifycommands. When the plan’s steps must change, an attended run stops and asks before deviating. - Updates the docs.
guard docs-affectedlists every doc that cites code the ticket changed, plus the docs those link to in theirrelated:frontmatter, and every doc the ticket adds or changes. The docs on the ticket’sDocs:line join the list. Each one gets updated in the ticket’s work, or recorded as needing no change withguard docs-checkedand a reason. The ticket isn’t done until every doc is one or the other.
In a goal run it never asks a question. A stuck ticket goes through guard block, which saves the work as a patch and restores the tree, and the run moves on.
Next Steps
Section titled “Next Steps”Run ticket:complete to check the evidence and commit.