Utility commands
Utility commands handle recovery, cleanup, and lifecycle operations. They work independently of the main pipeline.
| Command | Type | What it does |
|---|---|---|
/agents fix | LLM | Retries a failed task using failure context from prior attempts |
/agents revert | Bash | Undoes tactical planning, restores the feature issue to its pre-plan state |
/agents close | Bash | Full cleanup: closes issues, PRs, and deletes branches |
/agents fix
Section titled “/agents fix”
flowchart LR
Triggers@{ shape: bolt, label: "Triggers" }
FixAgent["Fix agent"]
Triggers --triggers--> FixAgent
class Triggers triggersOrange
class FixAgent fixRed
classDef triggersOrange fill:#ffe8d4,stroke:#d66a28,color:#d66a28
classDef fixRed fill:#ffd4d4,stroke:#d62828,color:#d62828
The Fix agent recovers from failed execution attempts. It reads the task spec, inspects the failure context from recent comments, and resumes or replaces the prior implementation.
Script: .autoducks/agents/fix/pre.sh + post.sh
Trigger: Issue comment /agents fix on any task issue
Behavior
Section titled “Behavior”- Reacts to the trigger comment with 👀.
- Searches for an existing partial branch from a prior failed attempt.
- If found: checks out that branch to continue where the previous attempt left off.
- If not found: creates a new fix branch
feature/{feature_num}-issue-{issue_num}-fix-{timestamp}.
- Prepares the task spec and failure context from the last 10 comments.
- The LLM reads both, then fixes or completes the implementation.
- Commits and pushes. Reuses an existing PR if present; otherwise creates
Fix: {title}. - If feature-parented: auto-merges and triggers the wave orchestrator.
- Reacts with 👍 and confirms the fix.
/agents revert
Section titled “/agents revert”
flowchart LR
Triggers@{ shape: bolt, label: "Triggers" }
RevertAgent["Revert agent"]
Triggers --triggers--> RevertAgent
class Triggers triggersOrange
class RevertAgent revertYellow
classDef triggersOrange fill:#ffe8d4,stroke:#d66a28,color:#d66a28
classDef revertYellow fill:#fff3cd,stroke:#856d00,color:#856d00
Undoes the work of the Tactical agent: closes all task issues and restores the feature issue body to how it looked before /agents devise was run.
Script: .autoducks/agents/revert/run.sh
Type: Bash — no LLM
Trigger: Issue comment /agents revert on a Feature issue
Behavior
Section titled “Behavior”- Reacts with 👀.
- Extracts task numbers from the YAML
waves:block in the feature issue body. - Closes all task issues with a comment referencing the revert.
- Removes
Readyanddraftlabels from the feature issue. - Restores the original issue body from edit history (last non-bot edit).
- Deletes all bot comments on the feature issue.
- Reacts with 👍.
Does not delete branches or close PRs — use /agents close for that.
Use this when the tactical plan needs to be completely redone. After reverting, run /agents devise again.
/agents close
Section titled “/agents close”
flowchart LR
Triggers@{ shape: bolt, label: "Triggers" }
CloseAgent["Close agent"]
Triggers --triggers--> CloseAgent
class Triggers triggersOrange
class CloseAgent closeGray
classDef triggersOrange fill:#ffe8d4,stroke:#d66a28,color:#d66a28
classDef closeGray fill:#e8e8e8,stroke:#586069,color:#586069
Full teardown of a feature and all associated work.
Script: .autoducks/agents/close/run.sh
Type: Bash — no LLM
Trigger: Issue comment /agents close on a Feature issue
Behavior
Section titled “Behavior”- Reacts with 👀.
- Extracts task numbers from the YAML
waves:block. - For each task: finds branches, closes open PRs, deletes branches, closes the task issue.
- Closes the feature PR (if open) and deletes the feature branch.
- Closes the feature issue with a cleanup summary.
- Reacts with 👍.
What gets removed
Section titled “What gets removed”| Object | Action |
|---|---|
| Task issues | Closed |
| Task PRs | Closed |
| Task branches | Deleted |
| Feature branch | Deleted |
| Feature PR | Closed |
| Feature issue | Closed |