Orchestrator
State machine management for single-orchestrator architecture.
Instructions
- Check current state:
scripts/check-state.sh - Validate transition allowed:
scripts/validate-transition.sh FROM TO - Load skill for current state
- Execute until exit conditions (code verified, not judged)
- Compress when
scripts/check-context.shreturns threshold exceeded
State → Skill Mapping
| State | Load Skill | |-------|------------| | INIT | initialization/ | | IMPLEMENT | implementation/ | | TEST | testing/ | | COMPLETE | context-graph/ |
References
| File | Load When | |------|-----------| | references/state-machine.md | Designing state transitions | | references/compression.md | Context exceeds 50% (progressive checkpoints) | | references/session-management.md | Session start/recovery | | references/session-resumption.md | Resuming with fresh context + summary |
Scripts
| Script | Purpose | Output | |--------|---------|--------| | scripts/check-state.sh | Get current state | JSON state | | scripts/validate-transition.sh | Check if transition valid | exit 0/1 | | scripts/check-context.sh | Check context usage | threshold level | | scripts/enter-state.sh | Transition to new state | Updated state.json |