| name | ant-decide |
| description | Use when ant-orient has generated options and you need to select one. Triggers: have multiple plans, need to choose, "which option", "pick", "decide between", "auto-decide or ask human". Do NOT generate options here - that's ant-orient. |
Ant-Decide
Gate between Ant-Orient's plans and execution. Assess stakes and confidence, then auto-decide or ask human.
Decision Matrix
flowchart TD
A[Plans from Ant-Orient] --> B{Stakes?}
B -->|Low| C[Auto-decide]
B -->|Medium| D{Confidence?}
B -->|High| E[Ask human]
D -->|High/Extra-High| C
D -->|Medium/Low| E
Stakes Inference
Derive stakes from Ant-Orient's plan metadata:
| Signal | Low | Medium | High |
|---|---|---|---|
| Effort | S | M | L, XL |
| Risk count | 0 | 1-2 | 3+ |
| Files affected | 1-3 | 4-10 | 10+ |
| Path keywords | tests/, docs/ | src/, lib/ | auth/, payments/, security/, migrations/ |
Rule: Highest category with 2+ signals wins. Ambiguous signals = reject to Ant-Orient.
Confidence Levels
- extra-high - Known pattern, done this exact thing before
- high - Well-understood approach, few unknowns
- medium - Reasonable approach, some unknowns
- low - Uncertain, multiple unknowns, novel territory
Execution
- Read plans from
.antmachine/orient/artifacts/plans/ - Assess stakes from metadata signals
- Apply decision matrix
- If auto-decide: select best plan, hook to Ant-Orient
- If ask human: present structured report, await choice
Human Presentation
When asking human, show:
- Goal and stakes assessment
- Ant-Orient's recommendation with reasoning
- Each plan: approach, effort, confidence, steps, pros/cons/risks
- Prompt: "Your choice? (A/B/C, or ask questions)"
Hook to Ant-Orient
{
"from": "decide",
"outcome": "selected | rejected | needs_info",
"plan_id": "plan-a",
"reason": "Why chosen",
"decided_by": "auto | human",
"gaps": ["Only if rejected - what was missing"],
"info_needed": ["Only if needs_info - what to observe"]
}
State
Write to .antmachine/decide/state.json:
{
"status": "pending | decided | rejected | awaiting_human",
"plans_evaluated": ".antmachine/orient/artifacts/plans/...",
"attempt": 1,
"stakes_assessment": { "level": "low | medium | high", "signals": [] },
"decision": { "chosen_plan": null, "reason": null, "decided_by": null },
"rejection_history": []
}
Rejection Loop
After 2 rejections with weak plans, escalate to human with honest context about uncertainty.
Boundaries
- No generating options (Ant-Orient does that)
- No gathering info (Ant-Observe does that)
- No execution (Ant-Act does that)
- Just assess, decide, route back
Red Flags - STOP If You Think These
| Thought | Reality |
|---|---|
| "So we're adding X" | Implied decision ≠ verified decision. Check for plan artifact. |
| "Start the implementation" | Where's the plan? No artifact = no decision made. |
| "We already decided" | Who decided? When? Show me the artifact. |
| "Tech lead says use X" | Authority is not a substitute for process. Assess stakes. |
| "Team voted for X" | Votes need documented tradeoffs. Did Ant-Orient run? |
| "This is a minor change" | Verify stakes. "Minor" framing often hides complexity. |
Critical Rules
1. No plan artifact = No decision to make.
If you can't find .antmachine/orient/artifacts/plans/{something}.json, there is no decision.
Return to Ant-Orient:
{
"from": "decide",
"outcome": "rejected",
"reason": "No plan artifact found. Need Ant-Orient to generate options.",
"gaps": ["Requires planning phase"]
}
2. Always assess stakes before proceeding.
Even if confident, check:
- How many files affected?
- Any high-risk paths (auth, payments, migrations)?
- What's the effort level?
If 2+ signals point to "high", ask human.
3. Implied language is not a decision.
These phrases trigger verification, not execution:
- "So we're going with..."
- "Let's do X"
- "We've decided to..."
- "Start implementing..."
All of these mean: Check for the plan artifact first.