Implement the following plan:
Plan: Drop ov, use native Claude Code agents with fleet.db
Context
Overstory (ov) wraps Claude Code's native agent system with mail, worktrees,
merge queues, and structured logging. The m2 project already has:
.claude/agents/ with 4 Claude Code-native agent defs (lead, builder, scout, reviewer)
fleet.db as the governance layer (10-state task machine, invariants, failures)
.claude/bin/fleet-event-hook for tool-call recording
.claude/settings.json with clean hooks (entire, fleet-event-hook)
The ov dependency lives almost entirely in .claude/settings.local.json (307
lines of ov-specific hooks). The source code has 3 trivial text references.
What to do
1. Add merger.md and monitor.md to .claude/agents/
Port the valuable patterns from ov agent-defs, adapted for native Claude Code:
merger.md — Branch integration specialist
- 4-tier escalation: clean merge → auto-resolve → AI-resolve → reimagine
- Tools: Read, Glob, Grep, Bash, Edit, Write
- Model: sonnet
- Named failure modes: TIER_SKIP, UNVERIFIED_MERGE, SCOPE_CREEP
- Uses fleet CLI (
fleet status, fleet failure record) not ov commands
- Merge-order rules (dependency order, verify after each)
monitor.md — On-demand fleet diagnostic agent
- NOT a long-running patrol (that was ov's pattern). Instead: spawned to assess
fleet health and report findings.
- Tools: Read, Glob, Grep, Bash (read-only)
- Model: haiku (cheap, read-only)
- Checks:
fleet status, fleet check, fleet failure check, fleet event list
- Surfaces: stalled tasks, invariant violations, Rule of Three, blind spots
- Named failure modes: STALE_MODEL, SILENT_ANOMALY, SPAWN_ATTEMPT
2. Replace .claude/settings.local.json
The current file has 307 lines of ov hooks. Replace with a minimal file that:
Keeps:
- git push block (safety — prevents accidental pushes from agents)
- git reset --hard block (safety)
Drops:
- All
OVERSTORY_AGENT_NAME / OVERSTORY_WORKTREE_PATH guards
- All
ov prime, ov mail check, ov log commands
- All blocks on Claude Code native tools (Task*, TeamCreate, SendMessage)
- All blocks on AskUserQuestion, EnterPlanMode, EnterWorktree
- All coordinator Write/Edit blocks (tool field in frontmatter handles this)
- All Bash command allowlists (agents run via Agent tool with tool restrictions)
- Worktree path enforcement (native
isolation: "worktree" handles this)
Result: ~20 lines replacing 307.
3. Clean up ov text references (3 files)
| File | Line | Change |
|---|
src/index.ts | 3 | Comment: remove "overstory stack" |
src/index.ts | 22 | CLI description: remove "overstory stack" |
package.json | 4 | Description: remove "overstory stack" |
src/schema/fleet.sql | 4 | Comment: "ov runs the agents" → "Claude Code runs the agents" |
4. Enrich existing agent-defs with ov wisdom
The ov agent-defs have patterns worth backporting to the existing 4 agents.
Apply surgically — don't bloat what's already clean:
- lead.md: Add cost-awareness section (right-size the agent count, batch
communications, trust your builders). Add task complexity assessment
(simple/moderate/complex → decides whether to use scout).
- builder.md: Add cost-awareness one-liner. Already solid.
- scout.md: Already solid. No changes needed.
- reviewer.md: Already solid. No changes needed.
5. Remove .overstory/ from the project
Already gitignored per commit 038eb71. Delete the directory.
Files to create/modify
| File | Action |
|---|
.claude/agents/merger.md | Create |
.claude/agents/monitor.md | Create |
.claude/settings.local.json | Replace (307 → ~20 lines) |
.claude/agents/lead.md | Edit (add cost-awareness, complexity assessment) |
src/index.ts | Edit 2 strings |
package.json | Edit 1 string |
src/schema/fleet.sql | Edit 1 comment |
.overstory/ | Delete directory |
What NOT to do
- Do not rewrite the existing 4 agent-defs from scratch. They work.
- Do not add hooks to replace ov mail — SendMessage is the native equivalent.
- Do not add hooks to replace ov sling — Agent tool with team_name handles this.
- Do not add a hooks-based worktree enforcement — trust
isolation: "worktree".
Verification
bun test — all 27+ tests still pass (no source logic changed)
bun run lint — clean
bun run typecheck — clean
.overstory/ directory gone
grep -r "overstory\|ov " src/ returns nothing
grep -r "OVERSTORY" .claude/ returns nothing
- All 6 agent-defs in
.claude/agents/ (lead, builder, scout, reviewer, merger, monitor)
If you need specific details from before exiting plan mode (like exact code snippets, error messages, or content you generated), read the full transcript at: /Users/tslater/.claude/projects/-Users-tslater-dev-fleets-m2/baaf0f46-6eaa-4bb3-bea0-209ed86465da.jsonl
If this plan can be broken down into multiple independent tasks, consider using the TeamCreate tool to create a team and parallelize the work.