feat: add structured status tokens to all agents and run skill
This commit is contained in:
@@ -166,6 +166,31 @@ Use `resolve_model` when spawning each agent to pass the correct model. The reso
|
||||
|
||||
---
|
||||
|
||||
### Status Token Protocol
|
||||
|
||||
Every agent ends its output with a `STATUS:` line. The orchestrator parses this to decide the next action.
|
||||
|
||||
**Parsing:**
|
||||
|
||||
```bash
|
||||
STATUS=$(tail -20 "$AGENT_OUTPUT" | grep -oE 'STATUS: (DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED)' | head -1)
|
||||
STATUS="${STATUS#STATUS: }"
|
||||
if [[ -z "$STATUS" ]]; then STATUS="DONE"; fi
|
||||
```
|
||||
|
||||
**Status to action mapping:**
|
||||
|
||||
| Status | Action |
|
||||
|--------|--------|
|
||||
| `DONE` | Proceed to next phase or agent |
|
||||
| `DONE_WITH_CONCERNS` | Log concerns in event data, proceed |
|
||||
| `NEEDS_CONTEXT` | Pause run, request missing information from user |
|
||||
| `BLOCKED` | Abort phase, report blocker to user |
|
||||
|
||||
Include the parsed status in the `agent.complete` event data: `"status":"<STATUS>"`.
|
||||
|
||||
---
|
||||
|
||||
### 1. Plan Phase
|
||||
|
||||
#### 1a. Explorer (if standard or thorough)
|
||||
|
||||
Reference in New Issue
Block a user