@@ -27,7 +27,8 @@ docs/ # Documentation
2727- Database: src/core/database/sqlite-adapter.ts
2828- Snapshot: src/core/worktree/capture.ts
2929- Preflight: src/core/worktree/preflight.ts
30- - Conductor: src/cli/commands/orchestrator.ts
30+ - Conductor: src/cli/commands/orchestrator.ts (core) + orchestrate.ts (CLI)
31+ - Process Utils: src/utils/process-cleanup.ts
3132- Shared Utils: src/core/utils/{git,text,fs}.ts
3233
3334## Detailed Guides
@@ -62,7 +63,12 @@ stackmemory restore # Restore from captured state
6263stackmemory snapshot save # Post-run context snapshot (alias: snap)
6364stackmemory snapshot list # List recent snapshots
6465stackmemory preflight # File overlap check for parallel tasks (alias: pf)
65- stackmemory conductor start # Autonomous Linear→worktree→agent orchestrator
66+ stackmemory conductor start # Autonomous Linear→worktree→agent orchestrator
67+ stackmemory conductor learn # Analyze agent outcomes (success rate, failure phases, error patterns)
68+ stackmemory conductor learn --evolve # Auto-mutate prompt template from failure data (GEPA)
69+ stackmemory conductor status # Live agent status dashboard
70+ stackmemory conductor monitor # Real-time TUI with phase tracking
71+ stackmemory conductor finalize # Clean up dead/stale agents
6672stackmemory loop "<cmd>" --until "<pattern>" # Poll until condition met (alias: watch)
6773```
6874
@@ -145,6 +151,25 @@ railway up
145151# Pre-publish checks require clean git status — stash GEPA files first
146152```
147153
154+ ## Conductor (Autonomous Agent Orchestration)
155+
156+ The conductor manages autonomous coding agents via Linear issues:
157+
158+ **Data files** (all under `~/.stackmemory/conductor/`):
159+ - `prompt-template.md` — Agent prompt template with `{{VARIABLE}}` substitution (auto-created on first `conductor start`)
160+ - `outcomes.jsonl` — JSONL log of agent outcomes (success/failure, phase, tokens, errors)
161+ - `evolution-log.jsonl` — History of `--evolve` mutations applied to the prompt template
162+ - `agents/<issue-id>/status.json` — Per-agent status files
163+ - `agents/<issue-id>/output.log` — Agent stdout/stderr
164+
165+ **Learning loop**:
166+ 1. Agents run → outcomes logged to `outcomes.jsonl`
167+ 2. `conductor learn` analyzes patterns (success rate, failure phases, error types)
168+ 3. `conductor learn --evolve` calls Claude to mutate `prompt-template.md` based on failure data
169+ 4. Next agent run uses the improved template → repeat
170+
171+ **Template variables**: `{{ISSUE_ID}}`, `{{TITLE}}`, `{{DESCRIPTION}}`, `{{LABELS}}`, `{{PRIORITY}}`, `{{ATTEMPT}}`, `{{PRIOR_CONTEXT}}`
172+
148173## Task Delegation Model
149174
150175Route effort by task complexity — not all code changes deserve equal scrutiny:
0 commit comments