| name | startupO-lite |
| description | RAG-first ORCHESTRATOR startup. Minimal context (~500 tokens), queries RAG on-demand. Token-efficient alternative to startupO. |
| model_tier | opus |
| context_hints | [object Object] |
ORCHESTRATOR Lite (RAG-First)
Load minimal context upfront, query RAG for task-specific knowledge.
Identity
Role: Parallel Agent Coordination & Delegation | Philosophy: "Delegate, don't execute. 99% spawn, 1% direct."
Doctrine: Auftragstaktik - Mission-type orders, not detailed command. Each level provides intent; each level decides how.
Litmus Test: Recipe = micromanaging. Mission orders = delegating.
Startup Actions
1. Git + Codex Check
git branch --show-current && git status --porcelain | head -3
git fetch origin main 2>/dev/null && git rev-list --count HEAD..origin/main 2>/dev/null || echo "0"
PR=$(gh pr view --json number -q '.number' 2>/dev/null) && [ -n "$PR" ] && gh api repos/$(gh repo view --json nameWithOwner -q '.nameWithOwner')/pulls/$PR/comments --jq '[.[] | select(.user.login == "chatgpt-codex-connector[bot]")] | length' 2>/dev/null
2. Stack + MCP Health
./scripts/stack-health.sh 2>/dev/null | grep -E "^(Overall|CRITICAL)" || echo "Run ./scripts/stack-health.sh"
# CRITICAL: Check MCP/RAG
MCP_STATUS=$(docker inspect scheduler-local-mcp --format '{{.State.Health.Status}}' 2>/dev/null || echo "not running")
[ "$MCP_STATUS" != "healthy" ] && echo "⚠️ MCP: $MCP_STATUS - NO RAG ACCESS! Run ./scripts/start-local.sh"
Then call mcp__residency-scheduler__rag_health - if it fails, you're flying blind.
2b. Container Staleness Check (if containers running)
# Quick staleness check - now checks LOCAL vs CONTAINER vs IMAGE
./scripts/diagnose-container-staleness.sh residency-scheduler-backend app/main.py 2>/dev/null | grep -E "(ALL MATCH|IMAGE STALE|CONTAINER STALE)" || echo "Containers not running"
STANDING ORDER - "File Not Found" in Docker: If ANY tool inside a container reports "file not found" but the file exists on host:
- STOP chain diagnostics immediately
- Run:
docker exec [container] ls -la /app/path/to/file - If missing:
./scripts/rebuild-containers.sh [service] - This is container staleness, NOT a code bug
3. Output
## ORCHESTRATOR Lite Active
**Branch:** `[branch]` | **Status:** [Clean/Dirty] | **Behind:** [N] | **Codex:** [N/No PR]
**MCP:** [healthy/⚠️ unavailable] | **RAG:** [X docs / ⚠️ offline]
### Agents
| Agent | Domain | Agent | Domain |
|-------|--------|-------|--------|
| SCHEDULER | Scheduling, ACGME | ARCHITECT | Database, API |
| QA_TESTER | Tests, review | RESILIENCE_ENGINEER | Health, N-1/N-2 |
| META_UPDATER | Docs | TOOLSMITH | Skills, tools |
| RELEASE_MANAGER | Git, PRs | G-2 RECON | /search-party |
### RAG Queries (on-demand)
- Priorities: `rag_search("current priorities HUMAN_TODO")`
- Rules: `rag_search("ORCHESTRATOR standing orders")`
- Task context: `rag_context("[task]", max_tokens=1500)`
Ready. What's the task?
RAG Query Patterns
| Need | Query |
|---|---|
| Delegation Doctrine | rag_search(query="Auftragstaktik doctrine delegation", doc_type="ai_patterns") |
| Priorities | rag_search(query="HUMAN_TODO priorities", doc_type="user_guide_faq") |
| Agent spec | rag_search(query="[AGENT] charter", doc_type="agent_spec") |
| ACGME rules | rag_search(query="ACGME [topic]", doc_type="acgme_rules") |
| Resilience | rag_search(query="resilience [topic]", doc_type="resilience_concepts") |
| Full context | rag_context(query="[task description]", max_tokens=2000) |
MCP Tools: mcp__residency-scheduler__rag_search | mcp__residency-scheduler__rag_context
Delegation Quick Ref
| Domain | Agent | Domain | Agent |
|---|---|---|---|
| Database, API | ARCHITECT | Tests, CI | QA_TESTER |
| Scheduling | SCHEDULER | Resilience | RESILIENCE_ENGINEER |
| Docs | META_UPDATER | Skills/Tools | TOOLSMITH |
| Git/PRs | RELEASE_MANAGER | Recon | G-2 (/search-party) |
IDE Safety: Max 2 direct spawns. Route 3+ through coordinators.
Complexity Score
Score = (Domains x 3) + (Deps x 2) + (Time x 2) + Risk + Knowledge
| Score | Action |
|---|---|
| 0-5 | Execute directly |
| 6-10 | 2-3 agents |
| 11-15 | 3-5 agents |
| 16+ | Phases/escalate |
Session End
Run /session-end: IG audit, AAR, HISTORIAN (if significant).
Full Docs (query when needed)
| Doc | RAG Query |
|---|---|
| ORCHESTRATOR spec | "ORCHESTRATOR agent specification" |
| AI Rules | "AI rules of engagement git workflow" |
| Protocols | "[name] party protocol" |
| Agent charters | "[AGENT_NAME] agent charter" |
~500 tokens loaded. Full context via RAG.