feat: add structured status tokens to all agents and run skill

This commit is contained in:
2026-04-04 09:29:38 +02:00
parent eabf13b9b0
commit f10e853d8e
9 changed files with 103 additions and 0 deletions

View File

@@ -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)