@adaptic/maestro 1.1.7 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/.claude/commands/init-maestro.md +502 -260
  2. package/README.md +47 -2
  3. package/bin/maestro.mjs +1 -1
  4. package/docs/guides/agents-observe-setup.md +64 -0
  5. package/docs/guides/ccxray-diagnostics.md +65 -0
  6. package/docs/guides/claude-mem-setup.md +79 -0
  7. package/docs/guides/claude-pace-setup.md +56 -0
  8. package/docs/guides/claudraband-sessions.md +98 -0
  9. package/docs/guides/clawteam-swarm.md +116 -0
  10. package/docs/guides/code-review-graph-setup.md +86 -0
  11. package/docs/guides/email-setup.md +399 -0
  12. package/docs/guides/media-generation-setup.md +349 -0
  13. package/docs/guides/outbound-governance-setup.md +438 -0
  14. package/docs/guides/pdf-generation-setup.md +315 -0
  15. package/docs/guides/poller-daemon-setup.md +550 -0
  16. package/docs/guides/rag-context-setup.md +459 -0
  17. package/docs/guides/self-optimization-pattern.md +82 -0
  18. package/docs/guides/slack-setup.md +350 -0
  19. package/docs/guides/twilio-subaccounts-setup.md +223 -0
  20. package/docs/guides/voice-sms-setup.md +698 -0
  21. package/docs/guides/webhook-relay-setup.md +349 -0
  22. package/docs/guides/whatsapp-setup.md +282 -0
  23. package/docs/runbooks/mac-mini-bootstrap.md +21 -0
  24. package/package.json +2 -1
  25. package/plugins/maestro-skills/plugin.json +16 -0
  26. package/plugins/maestro-skills/skills/agents-observe.md +110 -0
  27. package/plugins/maestro-skills/skills/ccxray-diagnostics.md +91 -0
  28. package/plugins/maestro-skills/skills/claude-pace.md +61 -0
  29. package/plugins/maestro-skills/skills/code-review-graph.md +99 -0
  30. package/scaffold/CLAUDE.md +64 -0
  31. package/scaffold/config/agent.ts.example +2 -1
  32. package/scaffold/config/caller-id-map.yaml +46 -0
  33. package/scaffold/config/known-agents.json +35 -0
  34. package/scripts/daemon/classifier.mjs +264 -50
  35. package/scripts/daemon/dispatcher.mjs +109 -5
  36. package/scripts/daemon/launchd-wrapper-generic.sh +96 -0
  37. package/scripts/daemon/launchd-wrapper-slack-events.sh +37 -0
  38. package/scripts/daemon/launchd-wrapper.sh +91 -0
  39. package/scripts/daemon/lib/session-router.mjs +274 -0
  40. package/scripts/daemon/lib/session-router.test.mjs +295 -0
  41. package/scripts/daemon/prompt-builder.mjs +51 -11
  42. package/scripts/daemon/responder.mjs +234 -19
  43. package/scripts/daemon/session-lock.mjs +194 -0
  44. package/scripts/daemon/sophie-daemon.mjs +16 -2
  45. package/scripts/email-signature.html +20 -4
  46. package/scripts/local-triggers/generate-plists.sh +62 -10
  47. package/scripts/media-generation/README.md +2 -0
  48. package/scripts/pdf-generation/README.md +2 -0
  49. package/scripts/poller/imap-client.mjs +4 -2
  50. package/scripts/poller/slack-poller.mjs +126 -59
  51. package/scripts/poller/trigger.mjs +12 -1
  52. package/scripts/setup/init-agent.sh +91 -1
  53. package/scripts/setup/install-dev-tools.sh +150 -0
  54. package/scripts/spawn-session.sh +21 -6
  55. package/workflows/continuous/backlog-executor.yaml +141 -0
  56. package/workflows/daily/evening-wrap.yaml +41 -1
  57. package/workflows/daily/morning-brief.yaml +17 -0
  58. package/workflows/event-driven/agent-failure-investigation.yaml +137 -0
  59. package/workflows/event-driven/pr-review.yaml +104 -0
  60. package/workflows/weekly/engineering-health.yaml +154 -0
package/README.md CHANGED
@@ -152,7 +152,7 @@ After scaffolding, run `claude "/init-maestro"` to configure your agent. This is
152
152
  | **1. Identity Gathering** | Prompts for agent name, surname, title, archetype, email, phone, Mac mini hostname, principal (reporting line), responsibilities, communication style, operating principles |
153
153
  | **2. Parallel Rewrite** | 8 sub-agents rewrite the repo in parallel: `config/agent.ts`, `CLAUDE.md`, config files, `package.json`, scripts, agent definitions, triggers/workflows, and agent-specific tools/skills |
154
154
  | **3. Machine Config** | Generates launchd plists with the correct agent name, installs them, optionally configures macOS for headless 24/7 operation |
155
- | **4. Service Setup** | Walks through Slack, Gmail, Twilio, Cloudflare, voice integration -- writing credentials to `.env` |
155
+ | **4. Service Setup** | Walks through Slack, Gmail, Twilio, Cloudflare, voice integration -- writing credentials to `.env`. See [Voice & SMS Setup Guide](docs/guides/voice-sms-setup.md) for detailed telephony instructions |
156
156
  | **5. README** | Generates an agent-specific README.md |
157
157
  | **6. GitHub Repo** | Optionally creates a GitHub repository and pushes the initial commit |
158
158
  | **7. Verification** | Greps for stale references, validates `config/agent.ts`, runs healthcheck, prints summary |
@@ -361,11 +361,56 @@ Security policies are defined in `policies/` and `docs/governance/`.
361
361
 
362
362
  ## Key Documentation
363
363
 
364
- - [Agent Persona Setup Guide](docs/guides/agent-persona-setup.md) -- Detailed guide for configuring identity, operating charter, and behavioural policies
364
+ ### Setup Guides
365
+
366
+ - [Agent Persona Setup](docs/guides/agent-persona-setup.md) -- Identity, operating charter, and behavioural policies
367
+ - [Email Setup](docs/guides/email-setup.md) -- Gmail IMAP polling, SMTP sending, thread dedup, signatures
368
+ - [Slack Setup](docs/guides/slack-setup.md) -- Slack app, tokens, sending, typing indicators, events, CDP
369
+ - [WhatsApp Setup](docs/guides/whatsapp-setup.md) -- Twilio WhatsApp sandbox/production, webhook handler
370
+ - [Voice & SMS Setup](docs/guides/voice-sms-setup.md) -- Twilio SMS, Slack huddle voice, Deepgram STT, ElevenLabs TTS
371
+ - [Poller & Daemon Setup](docs/guides/poller-daemon-setup.md) -- Event polling, reactive daemon, triggers, watchdog
372
+ - [Outbound Governance Setup](docs/guides/outbound-governance-setup.md) -- Hooks, dedup, information barriers, disclosure
373
+ - [RAG & Context Setup](docs/guides/rag-context-setup.md) -- SQLite FTS5 search, pre-draft context, entity indexing
374
+ - [PDF Generation Setup](docs/guides/pdf-generation-setup.md) -- Pandoc + XeLaTeX branded document generation
375
+ - [Media Generation Setup](docs/guides/media-generation-setup.md) -- Gemini/Veo image and video generation
376
+ - [Claude-Mem Setup](docs/guides/claude-mem-setup.md) -- Persistent session memory with semantic recall
377
+ - [Claude-Pace Setup](docs/guides/claude-pace-setup.md) -- Real-time rate limit tracking and burn rate awareness
378
+ - [ccxray Diagnostics](docs/guides/ccxray-diagnostics.md) -- Token/cost analysis and session debugging
379
+ - [Claudraband Sessions](docs/guides/claudraband-sessions.md) -- Persistent sessions, daemon mode, HTTP API
380
+ - [ClawTeam Swarm](docs/guides/clawteam-swarm.md) -- Multi-agent coding swarm orchestration via git worktrees
381
+ - [Agents Observe](docs/guides/agents-observe-setup.md) -- Real-time multi-agent observability dashboard
382
+ - [Code-Review-Graph](docs/guides/code-review-graph-setup.md) -- Tree-sitter structural knowledge graph for codebases
383
+ - [Self-Optimization Pattern](docs/guides/self-optimization-pattern.md) -- AutoAgent-inspired benchmark-driven self-improvement
384
+
385
+ ### Architecture & Governance
386
+
365
387
  - [System Architecture](docs/architecture/system-architecture.md) -- Full system design and component overview
366
388
  - [Agent Topology](docs/architecture/agent-topology.md) -- Sub-agent hierarchy and delegation model
367
389
  - [Action Approval Model](docs/governance/action-approval-model.md) -- Communication governance and approval levels
368
390
  - [Communications Policy](docs/governance/communications-policy.md) -- Voice modes, autonomy model, escalation rules
391
+
392
+ ### Dev Tooling
393
+
394
+ Approved third-party tools for agent development and observability. Install with:
395
+
396
+ ```bash
397
+ ./scripts/setup/install-dev-tools.sh --all
398
+ ```
399
+
400
+ | Tool | Purpose | Install |
401
+ |------|---------|---------|
402
+ | **claude-pace** | Rate limit status line tracker | `--tool claude-pace` |
403
+ | **agents-observe** | Multi-agent observability dashboard | `--tool agents-observe` |
404
+ | **ccxray** | Token/cost observability proxy | `--tool ccxray` |
405
+ | **ClawTeam** | Git worktree swarm orchestrator | `--tool clawteam` |
406
+ | **code-review-graph** | Tree-sitter codebase knowledge graph | `--tool code-review-graph` |
407
+
408
+ ### Cross-Agent Message Routing
409
+
410
+ When multiple agents monitor the same Slack channels, the daemon classifier uses `config/known-agents.json` to prevent cross-agent message interception. If a message @-mentions a specific agent, only that agent's daemon will respond. Update this file when agents are added or removed.
411
+
412
+ ### Runbooks
413
+
369
414
  - [Mac Mini Bootstrap](docs/runbooks/mac-mini-bootstrap.md) -- Hardware setup and initial configuration
370
415
  - [Perpetual Operations](docs/runbooks/perpetual-operations.md) -- Keeping the agent running 24/7
371
416
  - [Recovery and Failover](docs/runbooks/recovery-and-failover.md) -- Disaster recovery procedures
package/bin/maestro.mjs CHANGED
@@ -81,6 +81,7 @@ function create(targetName) {
81
81
  "desktop-control",
82
82
  "ingest",
83
83
  "mcp",
84
+ "services",
84
85
  ];
85
86
 
86
87
  for (const dir of frameworkDirs) {
@@ -595,7 +596,6 @@ rubrics: []
595
596
  upgrade: "npx @adaptic/maestro upgrade",
596
597
  },
597
598
  dependencies: {
598
- "@anthropic-ai/sdk": "^0.82.0",
599
599
  "@google/genai": "^1.42.0",
600
600
  dotenv: "^16.4.5",
601
601
  execa: "^9.6.1",
@@ -0,0 +1,64 @@
1
+ # Agents Observe — Multi-Agent Observability Dashboard
2
+
3
+ Real-time dashboard for monitoring Claude Code agent teams. Captures tool calls, agent hierarchy, and session state via background hooks with SQLite storage.
4
+
5
+ ## Why It Matters
6
+
7
+ Maestro agents run parallel backlog execution with multiple subagents. Currently debugging relies on post-hoc JSONL log scanning. Agents Observe provides real-time visibility into:
8
+
9
+ - **Live tool calls** across all active agents
10
+ - **Agent hierarchy trees** showing parent/child relationships
11
+ - **Search and filter** across sessions and tool invocations
12
+ - **WebSocket-streamed UI** with 3-5ms latency
13
+
14
+ ## Installation
15
+
16
+ ### Via install-dev-tools (recommended)
17
+
18
+ ```bash
19
+ ./scripts/setup/install-dev-tools.sh --tool agents-observe
20
+ ```
21
+
22
+ ### Manual
23
+
24
+ ```bash
25
+ # As Claude Code plugin
26
+ claude plugin install agents-observe
27
+
28
+ # Or global npm
29
+ npm install -g agents-observe
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ ### Start the dashboard
35
+
36
+ ```bash
37
+ agents-observe serve
38
+ # Opens dashboard at http://localhost:3847
39
+ ```
40
+
41
+ ### View active agent sessions
42
+
43
+ Navigate to the dashboard URL. Active sessions appear automatically when Claude Code agents run with the plugin enabled.
44
+
45
+ ### Query session history
46
+
47
+ ```bash
48
+ agents-observe query --session <id>
49
+ agents-observe query --tool Write --last 1h
50
+ ```
51
+
52
+ ## Integration with Maestro
53
+
54
+ Best used during:
55
+ - **Backlog executor cycles** — monitor parallel agent performance
56
+ - **Debugging agent failures** — trace tool call sequences leading to errors
57
+ - **Performance profiling** — identify slow or redundant tool calls
58
+
59
+ Not recommended as always-on in production (SQLite write overhead). Enable on-demand for debugging and profiling sessions.
60
+
61
+ ## Repository
62
+
63
+ - GitHub: https://github.com/simple10/agents-observe
64
+ - License: MIT
@@ -0,0 +1,65 @@
1
+ # ccxray Diagnostics Guide
2
+
3
+ ccxray provides X-ray vision into Claude Code sessions via a transparent HTTP proxy and live dashboard. It intercepts all API calls between Claude Code and Anthropic, giving you detailed token/cost analysis, timing breakdowns, and system prompt visibility.
4
+
5
+ ## When to Use
6
+
7
+ - Debugging expensive sessions (high token burn, unexpectedly long runs)
8
+ - Understanding which tool calls consumed the most tokens
9
+ - Comparing system prompts across main agent and sub-agents
10
+ - Investigating context window utilisation and heatmaps
11
+ - Post-incident analysis of failed or timed-out sessions
12
+
13
+ ## What It Shows
14
+
15
+ - Real-time timeline of agent turns with thinking durations
16
+ - Per-turn token and cost breakdown with burn rate tracking
17
+ - Context window heatmaps showing what's consuming space
18
+ - System prompt diffs across main agent and sub-agents
19
+ - Multi-project hub: multiple terminals share one dashboard
20
+ - Full JSON logging of every request/response to `~/.ccxray/logs/`
21
+
22
+ ## Technical Details
23
+
24
+ - Zero-config transparent HTTP proxy
25
+ - Launches Claude Code through the proxy automatically
26
+ - Web dashboard for live monitoring
27
+ - JSON log files for post-hoc analysis
28
+ - npx-based — no permanent installation required
29
+
30
+ ## Usage
31
+
32
+ ### Quick start
33
+
34
+ ```bash
35
+ # Launch Claude Code through the ccxray proxy
36
+ npx ccxray claude
37
+ ```
38
+
39
+ This starts the proxy, opens the dashboard, and launches Claude Code. All API traffic flows through ccxray for inspection.
40
+
41
+ ### With an existing session
42
+
43
+ ```bash
44
+ # Start the proxy on a specific port
45
+ npx ccxray --port 8080
46
+ ```
47
+
48
+ ### Viewing logs
49
+
50
+ Logs are stored at `~/.ccxray/logs/` as JSON files, one per session. These can be analysed post-hoc for cost attribution.
51
+
52
+ ## Repository
53
+
54
+ - GitHub: https://github.com/lis186/ccxray
55
+ - License: MIT
56
+
57
+ ## Integration with Maestro
58
+
59
+ ccxray is a diagnostic tool, not a runtime dependency. It is not installed by default via `init-agent.sh` but is available on-demand via npx.
60
+
61
+ Use cases for Maestro operators:
62
+ - **Token budget audit**: Run a backlog cycle through ccxray to see per-task token costs
63
+ - **Sub-agent analysis**: Compare token usage across spawned background agents
64
+ - **Prompt debugging**: Inspect what system prompts sub-agents actually receive
65
+ - **Cost optimisation**: Identify which tool calls are disproportionately expensive
@@ -0,0 +1,79 @@
1
+ # Claude-Mem Setup Guide
2
+
3
+ Claude-Mem is a persistent session memory plugin for Claude Code. It automatically captures tool usage, generates semantic summaries, and injects relevant context into future sessions — giving your agent continuity of knowledge across session boundaries.
4
+
5
+ ## What Claude-Mem Does
6
+
7
+ - **Automatic capture**: 6 lifecycle hooks (SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd, PreCompact) record agent activity without manual intervention
8
+ - **AI-powered compression**: Captured actions are summarised via Claude's agent-sdk into semantic memory
9
+ - **Vector search**: Relevant past context is retrieved and injected at session start using Chroma vector search
10
+ - **Local storage**: All data stays on-machine in `~/.claude-mem/` (SQLite + Chroma)
11
+
12
+ ## Installation
13
+
14
+ ### Via init-agent (recommended)
15
+
16
+ If you ran `scripts/setup/init-agent.sh`, Claude-Mem was installed automatically. Verify:
17
+
18
+ ```bash
19
+ npx claude-mem status
20
+ ```
21
+
22
+ ### Manual installation
23
+
24
+ ```bash
25
+ npx claude-mem install
26
+ ```
27
+
28
+ This registers the plugin hooks and starts the worker service (port 37777).
29
+
30
+ ### Via Claude Code plugin commands
31
+
32
+ ```bash
33
+ claude plugin marketplace add thedotmack/claude-mem
34
+ claude plugin install claude-mem
35
+ # Restart Claude Code
36
+ ```
37
+
38
+ ## Configuration
39
+
40
+ Settings live at `~/.claude-mem/settings.json` (auto-created with defaults on first run):
41
+
42
+ - **AI model**: Which model compresses captured data
43
+ - **Worker port**: Default 37777
44
+ - **Data directory**: Where SQLite and vector indices are stored
45
+ - **Context injection**: How much past context to inject per session
46
+ - **Log level**: Verbosity of worker logs
47
+
48
+ ## Verification
49
+
50
+ ```bash
51
+ # Check worker is running
52
+ npx claude-mem status
53
+
54
+ # View captured sessions
55
+ npx claude-mem sessions list
56
+
57
+ # View memory stats
58
+ npx claude-mem stats
59
+ ```
60
+
61
+ ## How It Complements Maestro's Memory
62
+
63
+ Maestro already has:
64
+ - **Interaction memory** (`memory/interactions/`) — conversation transcripts by channel/date
65
+ - **User profiles** (`memory/profiles/`) — per-person preferences and standing instructions
66
+ - **Knowledge base** (`knowledge/`) — entities, decisions, syntheses
67
+
68
+ Claude-Mem adds:
69
+ - **Session-level recall** — what tools were used, what worked, what failed
70
+ - **Semantic search across sessions** — find past sessions where similar tasks were done
71
+ - **Automatic context injection** — no manual "read the last session" needed
72
+
73
+ Together they provide comprehensive memory: Maestro handles *what was communicated*, Claude-Mem handles *what was done*.
74
+
75
+ ## Troubleshooting
76
+
77
+ - **Worker not starting**: Check `~/.claude-mem/logs/` for errors. Ensure port 37777 is free.
78
+ - **No context injected**: Verify hooks are registered: check `~/.claude/settings.json` for claude-mem entries
79
+ - **High memory usage**: Claude-Mem's Chroma index grows over time. Run `npx claude-mem compact` to optimise.
@@ -0,0 +1,56 @@
1
+ # Claude-Pace Setup Guide
2
+
3
+ Claude-Pace is a real-time rate limit tracker for Claude Code. It displays a status line showing your 5-hour and 7-day quota usage, reset countdowns, and a pace delta indicator (green = headroom, red = burning too fast).
4
+
5
+ ## Why It Matters
6
+
7
+ Maestro agents run continuously on 10-minute backlog cycles. Without rate limit visibility, sessions hit quota walls mid-task — the backlog executor stalls, scheduled workflows fail silently, and recovery requires manual intervention. Claude-Pace makes quota state visible so agents (and operators) can pace work intelligently.
8
+
9
+ ## What It Shows
10
+
11
+ - 5-hour and 7-day quota usage percentages
12
+ - Reset countdown timers
13
+ - Pace delta: whether current burn rate will exhaust quota before reset
14
+ - Current model, effort level, git branch, diff stats
15
+
16
+ ## Technical Details
17
+
18
+ - Pure Bash + jq — no npm, no Node, no network calls
19
+ - ~10ms runtime per status line refresh
20
+ - Single file: `claude-pace.sh`
21
+ - Reads Claude Code's local quota cache
22
+
23
+ ## Installation
24
+
25
+ ### Via init-agent (recommended)
26
+
27
+ If you ran `scripts/setup/init-agent.sh`, Claude-Pace was installed automatically. Verify:
28
+
29
+ ```bash
30
+ # Check if the plugin is installed
31
+ claude plugin list | grep claude-pace
32
+ ```
33
+
34
+ ### Via Claude Code plugin system
35
+
36
+ ```bash
37
+ claude plugin marketplace add Astro-Han/claude-pace
38
+ claude plugin install claude-pace
39
+ # Restart Claude Code or run /reload-plugins
40
+ claude-pace:setup
41
+ ```
42
+
43
+ ### Manual installation
44
+
45
+ Download `claude-pace.sh` from the repository and add to `~/.claude/settings.json` under `statusLine`.
46
+
47
+ ## Repository
48
+
49
+ - GitHub: https://github.com/Astro-Han/claude-pace
50
+ - License: MIT
51
+
52
+ ## Integration with Maestro
53
+
54
+ Claude-Pace complements Maestro's existing rate-limit detection (see `project_rate_limit_detection` memory). While Maestro detects rate limits reactively via workflow log analysis ("started" without "completed"), Claude-Pace provides proactive visibility — operators see quota state before it becomes a problem.
55
+
56
+ For agents running heavy backlog cycles, the pace delta indicator is the key signal: if it's red, defer non-urgent queue items to the next cycle rather than risk a mid-task stall.
@@ -0,0 +1,98 @@
1
+ # Claudraband Persistent Sessions Guide
2
+
3
+ Claudraband wraps Claude Code to add persistent sessions, daemon mode with an HTTP API, and programmatic session control. It turns Claude Code from an interactive TUI into a controllable backend service.
4
+
5
+ ## Why It Matters
6
+
7
+ Maestro agents spawn background sessions via `scripts/spawn-session.sh` for complex tasks. The current spawner uses `claude -p` with a timeout — fire-and-forget, no resumption, no mid-flight control. Claudraband adds:
8
+
9
+ - **Persistent sessions**: Run headless, disconnect, reconnect later
10
+ - **Daemon mode**: HTTP API for spawning and managing sessions programmatically
11
+ - **Prompt injection**: Send follow-up prompts to running sessions without restarting
12
+ - **Session lifecycle management**: List, pause, resume, and terminate sessions
13
+
14
+ This is particularly valuable for the backlog executor pattern, where long-running tasks may need mid-flight adjustments.
15
+
16
+ ## Technical Details
17
+
18
+ - TypeScript wrapper around Claude Code
19
+ - HTTP API in daemon mode (default port 7842)
20
+ - ACP server for editor integration
21
+ - Exposes a TypeScript library for custom tooling
22
+ - npx-based — zero permanent installation
23
+
24
+ ## Installation
25
+
26
+ ### Via init-agent (recommended)
27
+
28
+ If you ran `scripts/setup/init-agent.sh`, claudraband is pre-installed globally. Verify:
29
+
30
+ ```bash
31
+ npx @halfwhey/claudraband --version
32
+ ```
33
+
34
+ ### Manual
35
+
36
+ ```bash
37
+ # One-shot usage
38
+ npx @halfwhey/claudraband "your prompt here"
39
+
40
+ # Start daemon
41
+ npx @halfwhey/claudraband serve --port 7842
42
+ ```
43
+
44
+ ## Usage Patterns
45
+
46
+ ### Daemon mode (recommended for Maestro)
47
+
48
+ ```bash
49
+ # Start the daemon
50
+ npx @halfwhey/claudraband serve --port 7842
51
+
52
+ # Create a session
53
+ curl -X POST http://localhost:7842/sessions \
54
+ -H "Content-Type: application/json" \
55
+ -d '{"prompt": "Research competitor X and write a brief"}'
56
+
57
+ # List active sessions
58
+ curl http://localhost:7842/sessions
59
+
60
+ # Inject a follow-up prompt
61
+ npx @halfwhey/claudraband prompt --session <id> "also check their latest SEC filing"
62
+
63
+ # Terminate a session
64
+ curl -X DELETE http://localhost:7842/sessions/<id>
65
+ ```
66
+
67
+ ### Direct usage (quick tasks)
68
+
69
+ ```bash
70
+ npx @halfwhey/claudraband "Draft an email to the board about Q1 results"
71
+ ```
72
+
73
+ ### Integration with spawn-session.sh
74
+
75
+ `scripts/spawn-session.sh` supports an optional `MAESTRO_SESSION_BACKEND` environment variable:
76
+
77
+ - `MAESTRO_SESSION_BACKEND=claude` (default) — uses `claude -p` directly
78
+ - `MAESTRO_SESSION_BACKEND=claudraband` — uses claudraband for persistent, resumable sessions
79
+
80
+ When using the claudraband backend, sessions are registered with the daemon and can be listed, inspected, and controlled via the HTTP API.
81
+
82
+ ## Repository
83
+
84
+ - GitHub: https://github.com/halfwhey/claudraband
85
+ - License: MIT
86
+
87
+ ## Integration with Maestro
88
+
89
+ Claudraband is installed as an optional session backend. The default behaviour (`claude -p`) is unchanged. To enable claudraband:
90
+
91
+ 1. Set `MAESTRO_SESSION_BACKEND=claudraband` in your `.env`
92
+ 2. Ensure the claudraband daemon is running (started automatically by launchd if configured via init-agent)
93
+ 3. Sessions spawned by the backlog executor will use claudraband automatically
94
+
95
+ Benefits for the backlog executor:
96
+ - **Resumable tasks**: If a session times out, it can be resumed rather than restarted
97
+ - **Mid-flight control**: The orchestrator can inject follow-up prompts into running sessions
98
+ - **Session inventory**: HTTP API provides visibility into all active sessions
@@ -0,0 +1,116 @@
1
+ # ClawTeam Swarm Orchestration Guide
2
+
3
+ ClawTeam is a CLI-native swarm orchestrator that uses git worktrees, tmux, and filesystem-based messaging to run multiple coding agents in parallel. It implements a leader/worker pattern where a leader agent manages task creation, dependency chains, spawning, monitoring, and merge.
4
+
5
+ ## Why It Matters
6
+
7
+ When a coding task involves 2+ independent workstreams (e.g., frontend + backend, or multiple microservices), running agents sequentially is slow and wasteful. ClawTeam gives each agent its own git worktree — isolated branch, files, staging area, and process space — eliminating conflicts, corruption, and dependency collisions.
8
+
9
+ ## Key Capabilities
10
+
11
+ - **Leader/worker pattern**: Leader agent manages task graph; workers execute independently
12
+ - **Git worktree isolation**: Each worker gets its own worktree branch
13
+ - **Filesystem messaging**: Point-to-point and broadcast messaging between agents
14
+ - **Task dependencies**: Auto-unblocking when upstream tasks complete
15
+ - **Kanban board**: Terminal and web dashboard for monitoring
16
+ - **Multi-agent support**: Claude Code, Codex, Hermes, nanobot, OpenClaw
17
+
18
+ ## Technical Details
19
+
20
+ - CLI-native and fully automatable (no GUI required)
21
+ - tmux-based worker management
22
+ - MIT licensed
23
+ - Known gaps: task status sync can lag (needs leader-side verification), requires explicit model pinning
24
+
25
+ ## Installation
26
+
27
+ ### Via init-agent
28
+
29
+ If you ran `scripts/setup/init-agent.sh` with `MAESTRO_ENABLE_SWARM=1`, ClawTeam was cloned and configured. Verify:
30
+
31
+ ```bash
32
+ # Check ClawTeam is available
33
+ which clawteam || ls ~/ClawTeam-OpenClaw/clawteam
34
+ ```
35
+
36
+ ### Manual
37
+
38
+ ```bash
39
+ # Clone the repository
40
+ git clone https://github.com/win4r/ClawTeam-OpenClaw.git ~/ClawTeam-OpenClaw
41
+
42
+ # Ensure tmux is installed
43
+ brew install tmux # macOS
44
+ ```
45
+
46
+ ## Usage
47
+
48
+ ### Basic swarm launch
49
+
50
+ ```bash
51
+ cd ~/your-repo
52
+ clawteam start --leader claude --workers 3 --task "Implement user authentication"
53
+ ```
54
+
55
+ ### With task dependencies
56
+
57
+ ```bash
58
+ clawteam start \
59
+ --leader claude \
60
+ --task-file tasks.yaml \
61
+ --workers 4 \
62
+ --model claude-opus-4-6
63
+ ```
64
+
65
+ ### Monitoring
66
+
67
+ ```bash
68
+ # Terminal kanban
69
+ clawteam board
70
+
71
+ # Web dashboard
72
+ clawteam dashboard --port 8080
73
+ ```
74
+
75
+ ### Filesystem messaging
76
+
77
+ Workers communicate via an inbox system in the worktree root:
78
+
79
+ ```bash
80
+ # Leader sends to worker-2
81
+ echo "Priority change: focus on API endpoints first" > .clawteam/inbox/worker-2/msg-001.txt
82
+
83
+ # Worker reads inbox
84
+ cat .clawteam/inbox/self/*.txt
85
+ ```
86
+
87
+ ## Repository
88
+
89
+ - GitHub: https://github.com/win4r/ClawTeam-OpenClaw
90
+ - License: MIT
91
+
92
+ ## Integration with Maestro
93
+
94
+ ClawTeam is an optional module for coding-heavy agents. It is not required for operational agents (Chief of Staff, Legal, Communications) but is valuable for:
95
+
96
+ - **Engineering coordination agents** running parallel coding tasks
97
+ - **Platform architecture agents** implementing across multiple packages
98
+ - **Any agent** where a backlog item involves 2+ independent code changes
99
+
100
+ ### Routing rules
101
+
102
+ The backlog executor can route items to ClawTeam when:
103
+ 1. The task involves code changes to 2+ independent files/packages
104
+ 2. The task is explicitly tagged as `swarm-eligible` in the queue
105
+ 3. The agent's config has `MAESTRO_ENABLE_SWARM=1`
106
+
107
+ ### Post-merge workflow
108
+
109
+ After ClawTeam workers complete, the leader agent:
110
+ 1. Reviews all worker diffs
111
+ 2. Runs tests on each worktree branch
112
+ 3. Merges clean branches to the integration branch
113
+ 4. Produces a structured summary of changes
114
+ 5. Cleans up worktrees
115
+
116
+ This maps naturally to Maestro's session output pattern (`outputs/sessions/{id}/output.md`).
@@ -0,0 +1,86 @@
1
+ # Code-Review-Graph — Structural Knowledge Graph for Codebases
2
+
3
+ Tree-sitter-based knowledge graph mapping functions, classes, imports, and call relationships. Provides MCP tools for blast-radius analysis, review context, architecture overview, and refactor planning.
4
+
5
+ ## Why It Matters
6
+
7
+ When agents review PRs, plan refactors, or assess engineering health, they need structural understanding of the codebase — not just text search. Code-review-graph builds a persistent knowledge graph that auto-updates on file changes, providing:
8
+
9
+ - **Blast-radius analysis** — What breaks if this function changes?
10
+ - **Review context** — What other code depends on this change?
11
+ - **Architecture overview** — How do modules connect?
12
+ - **Semantic search** — Find related functions by call graph, not just name
13
+ - **Refactor planning** — Map dependencies before restructuring
14
+
15
+ ## Installation
16
+
17
+ ### Via install-dev-tools (recommended)
18
+
19
+ ```bash
20
+ ./scripts/setup/install-dev-tools.sh --tool code-review-graph
21
+ ```
22
+
23
+ ### Manual
24
+
25
+ ```bash
26
+ # Global install
27
+ npm install -g code-review-graph
28
+
29
+ # Or via npx (zero-install)
30
+ npx code-review-graph
31
+ ```
32
+
33
+ ## MCP Server Configuration
34
+
35
+ Add to your Claude Code MCP settings (`.claude/settings.json` or project-level):
36
+
37
+ ```json
38
+ {
39
+ "mcpServers": {
40
+ "code-review-graph": {
41
+ "command": "npx",
42
+ "args": ["code-review-graph", "serve", "--port", "3848"],
43
+ "env": {
44
+ "CRG_REPO_PATH": "/path/to/your/repo"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ ```
50
+
51
+ ## Usage
52
+
53
+ ### Build the graph for a repo
54
+
55
+ ```bash
56
+ npx code-review-graph index /path/to/repo
57
+ ```
58
+
59
+ ### Query via MCP tools (from Claude Code)
60
+
61
+ Once configured as an MCP server, Claude Code gains these tools:
62
+ - `blast_radius(file, function)` — Trace all callers and dependents
63
+ - `review_context(diff)` — Generate review context from a diff
64
+ - `architecture_overview()` — High-level module map
65
+ - `semantic_search(query)` — Find related code by structural relationships
66
+
67
+ ### Standalone CLI
68
+
69
+ ```bash
70
+ npx code-review-graph blast-radius --file src/lib/executor.js --function executeAction
71
+ npx code-review-graph overview --repo ~/maestro
72
+ ```
73
+
74
+ ## Integration with Maestro
75
+
76
+ Recommended for coding-oriented agents and workflows:
77
+ - **Engineering health checks** — Use architecture overview to assess repo structure
78
+ - **PR review agents** — Enrich review context with dependency information
79
+ - **Refactoring tasks** — Plan changes with blast-radius awareness
80
+
81
+ Optional for non-coding agents (operational, hiring, comms). Enable per-repo as needed.
82
+
83
+ ## Repository
84
+
85
+ - License: Open source
86
+ - Requires: Tree-sitter (bundled)