| name | decide |
| description | Use when Orient has generated plan options and you need to select one. Triggers: receiving plans from Orient, "decide", "choose", "which option", "pick a plan", "auto-decide or ask". Called by Orient after planning. |
Decide
Gate between Orient's plans and execution. Assess stakes and confidence, then auto-decide or ask human.
Decision Matrix
flowchart TD
A[Plans from 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 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 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 Orient
- If ask human: present structured report, await choice
Human Presentation
When asking human, show:
- Goal and stakes assessment
- 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 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 (Orient does that)
- No gathering info (Observe does that)
- No execution (Act does that)
- Just assess, decide, route back