Single source of truth for agentic development work, model orchestration, project management, and context automation.
update_plan for anything beyond one editorchestrator_set_context before project work to enable automation hooks.All user data lives in orchestrator-data/ (set ORCHESTRATOR_DATA_DIR to override).
text
orchestrator-data/
├── models.json — model inventory
├── dashboard-config.json — routing config (free-only, disabled, project allowlists)
├── session_log.md — session history table
├── price_changes.log — price tracking
├── MODEL_CATALOG.md — generated catalog
├── logs/ — structured JSONL logs
├── adrs/ — architecture decision records
├── projects/ — per-project data (CONTEXT, STATE, ROADMAP, BACKLOG, RECOVERY, sessions)
│ └── <name>/
│ ├── CONTEXT.md
│ ├── KEY_FILES.md
│ ├── RECOVERY.md
│ ├── BACKLOG.json
│ ├── sessions.json
│ └── ...
└── sessions/ — detailed session state files
The orchestrator has two components that work together:
Runs inside OpenClaw's plugin system — no separate process needed. Provides:
Tools (12):
ToolPurposeorchestrator_set_contextMANDATORY before project work — sets project + task, returns context doc with location, ToC, backlog, ADRs, recent sessionsorchestrator_clear_contextClears active project context, disables auto-routing/loggingorchestrator_get_statusQuick overview: model counts, sessions, projects, current contextorchestrator_get_modelsList models with filters (status, provider, search, project routing)orchestrator_check_modelsCheck eligible models for a project (routing filter inspection)orchestrator_auto_populateAuto-populate models from OpenClaw gateway configorchestrator_log_sessionLog a session (auto-logged by hooks, use for manual/retro entries)orchestrator_log_decisionLog an architecture decision (creates auto-numbered ADR)orchestrator_get_logsQuery structured JSONL logsorchestrator_sync_projectSync project from disk (generates CONTEXT.md, KEY_FILES.md)orchestrator_get_project_docsList all orchestrator-managed documents for a project
Hooks (8) — auto-registered, no manual calls:
HookAutomatessession_startTrack start time, reset sub-agent depthsession_endAuto-log session to session_log.md, sessions.json, generate recovery docsubagent_spawned/endedTrack sub-agent tree depth for context injectionbefore_model_resolveApply project routing filters (free-only, disabled, allowlists)before_prompt_buildInject project context into prompts (tasks, location, recent sessions)agent_endObserve session stategateway_stopClean up maintenance timers
The dashboard is a standalone Python HTTP server running as a PM2 process:
Start: pm2 start {baseDir}/dashboard/server.py --name orchestration-dashboard --interpreter python3 -- 8766
Provides:
The dashboard runs independently of the plugin — restarting it does NOT affect OpenClaw or any running sessions.
When orchestrator_set_context(project="my-project", task="fix-bug") is called:
All data in orchestrator-data/ survives OpenClaw session wipes — it's on the filesystem, not in session storage.
Models are automatically populated from OpenClaw's own gateway configuration. The script reads openclaw.json and extracts all configured model entries from providers, agent defaults, and routing chains. It merges into orchestrator-data/models.json, preserving all manually-curated fields (tier, speed_rating, capabilities, notes, research). Models in the catalog not found in the config are kept as-is (never deleted).
Auto-population runs nightly via cron. Manual edits (tier, speed, pricing, routing rules) are done through the Dashboard WebUI.
Task TypePrimaryFallback 1Fallback 2Heavy codingBest availableACP agentFast cloudQuick editsFast cloudFree tierLocalResearchBest reasoningFree tierLocalVisionCloud visionLocalDescribePlanning / designBest reasoningFree tierFast cloudDocs / summariesFree tierFast cloudLocal
Before selecting any model or spawning a sub-agent:
dashboard-config.json (or call GET /api/config)free_only_mode: true, eliminate all paid modelsdisabled_models listmodel_allowlist, ONLY those models are eligiblefree_only: true, eliminate paid models from the allowlistCLI shortcut: bash scripts/check-models.sh my-project-name
GET /api/config — read configPOST /api/config — update configGET /api/models — filtered model listGET /api/models?project=<name> — filtered for specific projectGET /api/models?all=1 — full unfiltered listGET /api/models?id=<id> — single model with disabled flagPOST /api/models — create or update modelDELETE /api/models?id=<id> — delete modelGET /api/status — quick statusGET /api/all — everythingCall orchestrator_set_context(project="my-project", task="fix-bug") before spawning any sub-agent.
This enables auto-routing, auto-logging, context injection, and background maintenance.
bash
bash scripts/check-models.sh my-project-name
Every spawned sub-agent prompt MUST include:
text
IMPORTANT: Follow orchestration conventions:
- BEFORE selecting any model: read dashboard-config.json, apply routing filters for the project. Run: bash scripts/check-models.sh <project-name>
- Understand the codebase first (exec find as fallback)
- Plan before coding (update_plan or mental plan)
- Verify before claiming (build, test, screenshot)
- Self-review output before returning
- Use fallback chains when tools are unavailable
Understand the codebase, search memory, research.
Call update_plan. Size the work: small (1-3 files), medium (3-8), large (8+ → decompose with workboard).
ScenarioPrimaryFallbackSingle-line editedit toolexec sedMulti-file changeACP coding agentManual editResearchSub-agentWeb searchDebuggingPhase 5 protocolMental traceTestingTest frameworkManualBrowser testingBrowser toolcurl
Build → Test → Lint → Screenshot (if UI). No claim without evidence.
Update CONTEXT.md, STATE.md, BACKLOG.json after every session.
Reproduce → Hypothesise (3-5 causes) → Instrument one variable → Fix → Regression test.
ToolFallback chainCodebase discoveryexec find → exec ls -R → read key filesupdate_planmental plan → STATE.md noteACP coding agentCLI variant → sub-agent → manual editedit toolexec sed → write full fileBuildtsc --noEmit → node --checkTestspecific test file → manualVisioncloud → local → describeMemory searchlcm_grep → exec grep
ScriptPurposebash {baseDir}/scripts/onboard.shFirst-time setupbash {baseDir}/scripts/init-project.sh <path> <name>Scaffold projectbash {baseDir}/scripts/log-session.sh ...Log session (legacy, plugin hooks preferred)bash {baseDir}/scripts/log-decision.sh ...Log ADR (legacy, plugin tool preferred)bash {baseDir}/scripts/check-prices.shPrice checkbash {baseDir}/scripts/discover-models.shProbe providersbash {baseDir}/scripts/test-model.sh <id>Test connectivitybash {baseDir}/dashboard/serve.shStart dashboardbash {baseDir}/scripts/check-models.sh [project]MANDATORY: Check eligible models before routingpython3 {baseDir}/scripts/auto-populate-models.pyAuto-populate models from OpenClaw gateway configbash {baseDir}/scripts/run-model-discovery.shWrapper for cron-based auto-population
bash dashboard/serve.sh or pm2 start ...bash scripts/init-project.sh <path> <name>bash scripts/check-prices.shBefore significant architectural work, conduct a structured interview:
Generate: CONTEXT.md (glossary), ADRs (decisions), summary.
ADR criteria (all three must be true): hard to reverse, surprising without context, real trade-off.
ResourcePathFull documentation{baseDir}/references/README.mdOnboarding guide{baseDir}/references/ONBOARDING.mdExecution reference{baseDir}/references/EXECUTION.mdDebugging guide{baseDir}/references/DEBUGGING.mdFallback tables{baseDir}/references/FALLBACKS.mdRouting table{baseDir}/ROUTING.mdModel catalogorchestrator-data/MODEL_CATALOG.mdDashboardhttp://localhost:8766 (when running)