@matt82198/aesop 0.1.0-beta.5 → 0.1.0
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.
- package/CHANGELOG.md +158 -5
- package/LICENSE +66 -21
- package/README.md +97 -33
- package/aesop.config.example.json +6 -0
- package/bin/CLAUDE.md +12 -3
- package/bin/cli.js +211 -40
- package/daemons/CLAUDE.md +1 -1
- package/daemons/backup-fleet.sh +209 -51
- package/daemons/run-watchdog.sh +208 -62
- package/dash/dash-extra.mjs +73 -4
- package/dash/watchdog-gui.sh +41 -35
- package/docs/ARCHITECTURE.md +296 -0
- package/docs/CONCEPTS.md +254 -0
- package/docs/CONFIGURE.md +256 -0
- package/docs/FIRST-WAVE.md +276 -0
- package/docs/INSTALL.md +224 -0
- package/docs/README.md +176 -27
- package/docs/autonomous-swe.md +149 -0
- package/docs/reproduce.md +121 -0
- package/hooks/CLAUDE.md +28 -0
- package/hooks/install-waveguard.sh +68 -0
- package/hooks/pre-commit-waveguard.sh +26 -0
- package/hooks/pre-push-policy.sh +253 -15
- package/monitor/CLAUDE.md +3 -3
- package/monitor/collect-signals.mjs +133 -20
- package/package.json +15 -7
- package/scan/CLAUDE.md +30 -0
- package/skills/CLAUDE.md +1 -0
- package/state_store/ingest.py +18 -1
- package/state_store/projections.py +78 -4
- package/state_store/store.py +102 -7
- package/tools/CLAUDE.md +25 -18
- package/tools/alert_bridge.py +14 -10
- package/tools/bench_runner.py +438 -0
- package/tools/buildlog.py +4 -7
- package/tools/ci_merge_wait.py +215 -34
- package/tools/common.py +62 -0
- package/tools/cost_ceiling.py +191 -0
- package/tools/dash.js +102 -0
- package/tools/doctor.js +220 -0
- package/tools/fleet_ledger.py +189 -17
- package/tools/halt.py +172 -0
- package/tools/healthcheck.py +24 -21
- package/tools/heartbeat.py +4 -7
- package/tools/metrics_gate.py +8 -2
- package/tools/orchestrator_status.py +4 -9
- package/tools/reconcile.py +277 -0
- package/tools/rotate_logs.py +152 -62
- package/tools/scanner_selftest.py +28 -3
- package/tools/secret_scan.py +359 -90
- package/tools/self_stats.py +292 -4
- package/tools/status.js +187 -0
- package/tools/verify_agent_inspector.py +289 -0
- package/tools/verify_prboard.py +344 -0
- package/tools/watch.js +49 -0
- package/ui/CLAUDE.md +2 -0
- package/ui/agents.py +332 -33
- package/ui/api/tracker.py +15 -7
- package/ui/collectors.py +125 -32
- package/ui/config.py +22 -2
- package/ui/cost.py +98 -3
- package/ui/csrf.py +2 -1
- package/ui/handler.py +209 -21
- package/ui/sse.py +102 -16
- package/ui/wave_prs.py +230 -0
- package/ui/web/dist/assets/index-0qQYnvMC.js +9 -0
- package/ui/web/dist/assets/index-BdIlFieV.css +1 -0
- package/ui/web/dist/index.html +2 -2
- package/monitor/.signal-state.json +0 -3
- package/monitor/ACTIONS.log +0 -1
- package/monitor/BRIEF.md +0 -24
- package/monitor/SIGNALS.json +0 -54
- package/state_store/__pycache__/__init__.cpython-314.pyc +0 -0
- package/state_store/__pycache__/api.cpython-314.pyc +0 -0
- package/state_store/__pycache__/export.cpython-314.pyc +0 -0
- package/state_store/__pycache__/ingest.cpython-314.pyc +0 -0
- package/state_store/__pycache__/projections.cpython-314.pyc +0 -0
- package/state_store/__pycache__/store.cpython-314.pyc +0 -0
- package/tools/__pycache__/alert_bridge.cpython-314.pyc +0 -0
- package/tools/__pycache__/buildlog.cpython-314.pyc +0 -0
- package/tools/__pycache__/ci_merge_wait.cpython-314.pyc +0 -0
- package/tools/__pycache__/ensure_state.cpython-314.pyc +0 -0
- package/tools/__pycache__/eod_sweep.cpython-314.pyc +0 -0
- package/tools/__pycache__/fleet_ledger.cpython-314.pyc +0 -0
- package/tools/__pycache__/fleet_prompt_extractor.cpython-314.pyc +0 -0
- package/tools/__pycache__/healthcheck.cpython-314.pyc +0 -0
- package/tools/__pycache__/heartbeat.cpython-314.pyc +0 -0
- package/tools/__pycache__/inbox_drain.cpython-314.pyc +0 -0
- package/tools/__pycache__/launch_tui.cpython-314.pyc +0 -0
- package/tools/__pycache__/metrics_gate.cpython-314.pyc +0 -0
- package/tools/__pycache__/orchestrator_status.cpython-314.pyc +0 -0
- package/tools/__pycache__/power_selftest.cpython-314.pyc +0 -0
- package/tools/__pycache__/prepublish_scan.cpython-314.pyc +0 -0
- package/tools/__pycache__/rotate_logs.cpython-314.pyc +0 -0
- package/tools/__pycache__/scanner_selftest.cpython-314.pyc +0 -0
- package/tools/__pycache__/secret_scan.cpython-314.pyc +0 -0
- package/tools/__pycache__/self_stats.cpython-314.pyc +0 -0
- package/tools/__pycache__/session_usage_summary.cpython-314.pyc +0 -0
- package/tools/__pycache__/stall_check.cpython-314.pyc +0 -0
- package/tools/__pycache__/transcript_replay.cpython-314.pyc +0 -0
- package/tools/__pycache__/transcript_timeline.cpython-314.pyc +0 -0
- package/tools/__pycache__/verify_dash.cpython-314.pyc +0 -0
- package/tools/__pycache__/verify_submit_encoding.cpython-314.pyc +0 -0
- package/ui/__pycache__/agents.cpython-314.pyc +0 -0
- package/ui/__pycache__/collectors.cpython-314.pyc +0 -0
- package/ui/__pycache__/config.cpython-314.pyc +0 -0
- package/ui/__pycache__/cost.cpython-314.pyc +0 -0
- package/ui/__pycache__/csrf.cpython-314.pyc +0 -0
- package/ui/__pycache__/handler.cpython-314.pyc +0 -0
- package/ui/__pycache__/render.cpython-314.pyc +0 -0
- package/ui/__pycache__/serve.cpython-314.pyc +0 -0
- package/ui/__pycache__/sse.cpython-314.pyc +0 -0
- package/ui/api/__pycache__/__init__.cpython-314.pyc +0 -0
- package/ui/api/__pycache__/submit.cpython-314.pyc +0 -0
- package/ui/api/__pycache__/tracker.cpython-314.pyc +0 -0
- package/ui/web/.gitattributes +0 -13
- package/ui/web/dist/assets/index-2LZDQirC.js +0 -9
- package/ui/web/dist/assets/index-D4M1qyOv.css +0 -1
- package/ui/web/index.html +0 -13
- package/ui/web/package-lock.json +0 -2225
- package/ui/web/package.json +0 -26
- package/ui/web/src/App.test.tsx +0 -74
- package/ui/web/src/App.tsx +0 -142
- package/ui/web/src/CONTRIBUTING-UI.md +0 -49
- package/ui/web/src/components/AgentRow.css +0 -187
- package/ui/web/src/components/AgentRow.test.tsx +0 -209
- package/ui/web/src/components/AgentRow.tsx +0 -207
- package/ui/web/src/components/AgentsPanel.css +0 -108
- package/ui/web/src/components/AgentsPanel.test.tsx +0 -41
- package/ui/web/src/components/AgentsPanel.tsx +0 -58
- package/ui/web/src/components/AlertsPanel.css +0 -88
- package/ui/web/src/components/AlertsPanel.test.tsx +0 -51
- package/ui/web/src/components/AlertsPanel.tsx +0 -67
- package/ui/web/src/components/BacklogPanel.test.tsx +0 -126
- package/ui/web/src/components/BacklogPanel.tsx +0 -122
- package/ui/web/src/components/CostChart.css +0 -110
- package/ui/web/src/components/CostChart.test.tsx +0 -144
- package/ui/web/src/components/CostChart.tsx +0 -152
- package/ui/web/src/components/CostTable.css +0 -93
- package/ui/web/src/components/CostTable.test.tsx +0 -165
- package/ui/web/src/components/CostTable.tsx +0 -94
- package/ui/web/src/components/EventsFeed.css +0 -68
- package/ui/web/src/components/EventsFeed.test.tsx +0 -36
- package/ui/web/src/components/EventsFeed.tsx +0 -31
- package/ui/web/src/components/HealthHeader.css +0 -137
- package/ui/web/src/components/HealthHeader.test.tsx +0 -278
- package/ui/web/src/components/HealthHeader.tsx +0 -281
- package/ui/web/src/components/InboxForm.css +0 -135
- package/ui/web/src/components/InboxForm.test.tsx +0 -208
- package/ui/web/src/components/InboxForm.tsx +0 -116
- package/ui/web/src/components/MessagesTail.module.css +0 -144
- package/ui/web/src/components/MessagesTail.test.tsx +0 -176
- package/ui/web/src/components/MessagesTail.tsx +0 -94
- package/ui/web/src/components/ReposPanel.css +0 -90
- package/ui/web/src/components/ReposPanel.test.tsx +0 -45
- package/ui/web/src/components/ReposPanel.tsx +0 -67
- package/ui/web/src/components/Scorecard.css +0 -106
- package/ui/web/src/components/Scorecard.test.tsx +0 -117
- package/ui/web/src/components/Scorecard.tsx +0 -85
- package/ui/web/src/components/Timeline.module.css +0 -151
- package/ui/web/src/components/Timeline.test.tsx +0 -215
- package/ui/web/src/components/Timeline.tsx +0 -99
- package/ui/web/src/components/TrackerBoard.test.tsx +0 -121
- package/ui/web/src/components/TrackerBoard.tsx +0 -107
- package/ui/web/src/components/TrackerCard.test.tsx +0 -180
- package/ui/web/src/components/TrackerCard.tsx +0 -160
- package/ui/web/src/components/TrackerForm.test.tsx +0 -189
- package/ui/web/src/components/TrackerForm.tsx +0 -144
- package/ui/web/src/lib/api.ts +0 -218
- package/ui/web/src/lib/format.test.ts +0 -89
- package/ui/web/src/lib/format.ts +0 -103
- package/ui/web/src/lib/sanitizeUrl.test.ts +0 -84
- package/ui/web/src/lib/sanitizeUrl.ts +0 -38
- package/ui/web/src/lib/types.ts +0 -230
- package/ui/web/src/lib/useHashRoute.test.ts +0 -60
- package/ui/web/src/lib/useHashRoute.ts +0 -23
- package/ui/web/src/lib/useSSE.ts +0 -175
- package/ui/web/src/main.tsx +0 -10
- package/ui/web/src/styles/global.css +0 -179
- package/ui/web/src/styles/theme.css +0 -184
- package/ui/web/src/styles/work.css +0 -572
- package/ui/web/src/test/fixtures.ts +0 -385
- package/ui/web/src/test/setup.ts +0 -49
- package/ui/web/src/views/Activity.module.css +0 -43
- package/ui/web/src/views/Activity.test.tsx +0 -89
- package/ui/web/src/views/Activity.tsx +0 -31
- package/ui/web/src/views/Cost.css +0 -87
- package/ui/web/src/views/Cost.test.tsx +0 -142
- package/ui/web/src/views/Cost.tsx +0 -54
- package/ui/web/src/views/Overview.css +0 -51
- package/ui/web/src/views/Overview.test.tsx +0 -76
- package/ui/web/src/views/Overview.tsx +0 -46
- package/ui/web/src/views/Work.test.tsx +0 -82
- package/ui/web/src/views/Work.tsx +0 -79
- package/ui/web/src/vite-env.d.ts +0 -10
- package/ui/web/tsconfig.json +0 -22
- package/ui/web/vite.config.ts +0 -25
- package/ui/web/vitest.config.ts +0 -12
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# Your First Wave
|
|
2
|
+
|
|
3
|
+
**TL;DR**: Run `/power` to prime your orchestrator brain, then `/buildsystem` to run a complete wave cycle. This guide walks you through what to expect.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Before You Start
|
|
8
|
+
|
|
9
|
+
Make sure you've completed:
|
|
10
|
+
|
|
11
|
+
1. **[INSTALL.md](INSTALL.md)** — Installed Aesop and verified with `bash daemons/run-watchdog.sh --once`
|
|
12
|
+
2. **[CONFIGURE.md](CONFIGURE.md)** — Created and validated `aesop.config.json`
|
|
13
|
+
3. **Skills installed** — Copied `skills/power/` and `skills/buildsystem/` to `~/.claude/skills/`
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Step 1: Prime Your Orchestrator Brain (/power)
|
|
18
|
+
|
|
19
|
+
Open Claude Code and type:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
/power
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The `/power` skill reads your orchestrator brain files from disk:
|
|
26
|
+
|
|
27
|
+
- `~/.claude/CLAUDE.md` — Your global rules (cardinal rules, dispatch model, reliability principles)
|
|
28
|
+
- `~/.claude/MEMORY.md` — Team facts, learnings, project context
|
|
29
|
+
- `aesop.config.json` — Your configuration
|
|
30
|
+
- `state/STATE.md` — Current phase and NEXT STEPS
|
|
31
|
+
- `state/BUILDLOG.md` — Recent progress
|
|
32
|
+
|
|
33
|
+
**Output**: A **health brief** telling you:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
✓ Orchestrator brain loaded
|
|
37
|
+
✓ Repos configured: my-api (clean), my-frontend (clean)
|
|
38
|
+
✓ Fleet daemons healthy (watchdog heartbeat ~10s old)
|
|
39
|
+
✓ STATE.md: Phase 1 (setup), NEXT STEPS: (1) create initial backlog
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This tells you the orchestrator is ready.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Step 2: Prepare a Backlog
|
|
47
|
+
|
|
48
|
+
Before running a wave, you need ranked work. The orchestrator needs to know what to build.
|
|
49
|
+
|
|
50
|
+
### Create an initial backlog
|
|
51
|
+
|
|
52
|
+
In your orchestrator (Claude Code) or in a scratch file, write down 2–5 small tasks:
|
|
53
|
+
|
|
54
|
+
**Example backlog**:
|
|
55
|
+
```
|
|
56
|
+
P1: Add README docs for orchestration
|
|
57
|
+
P2: Fix typo in dashboard title
|
|
58
|
+
P2: Add unit test coverage for config loader
|
|
59
|
+
P3: Document the watchdog daemon
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Backlog principles**:
|
|
63
|
+
|
|
64
|
+
- **Sized for Haiku**: Each task should take 1 Haiku agent 3–10 minutes (not 30 minutes)
|
|
65
|
+
- **Scoped**: "Fix auth timeout" is better than "Refactor auth system"
|
|
66
|
+
- **Ranked**: P1 (blockers/critical), P2 (quality/features), P3 (tech debt/docs)
|
|
67
|
+
- **Typed**: Assign each to an agent type (backend-dev, frontend-dev, test-bot, docs-agent)
|
|
68
|
+
|
|
69
|
+
If your backlog items are too big, split them. If too many, rank and pick the top 3–4 for this wave.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Step 3: Run the Wave (/buildsystem)
|
|
74
|
+
|
|
75
|
+
Type:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
/buildsystem
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The `/buildsystem` skill runs the complete wave cycle. Here's what happens:
|
|
82
|
+
|
|
83
|
+
### Phase 1: Rank & Assign (~5 min)
|
|
84
|
+
|
|
85
|
+
The orchestrator reads your backlog and assigns agents to each item. You'll see:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
Wave 23 backlog:
|
|
89
|
+
✓ Task 1: Add README docs (docs-agent)
|
|
90
|
+
✓ Task 2: Fix typo (frontend-dev)
|
|
91
|
+
✓ Task 3: Unit tests (test-bot)
|
|
92
|
+
→ Dispatching 3 Haiku agents in parallel...
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Phase 2: Agent Fleet (60–90 min)
|
|
96
|
+
|
|
97
|
+
The orchestrator spawns 3–8 Haiku agents in parallel. Each works in its own worktree (no conflicts).
|
|
98
|
+
|
|
99
|
+
**What you see**:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
[Haiku-1] Docs agent: writing README...
|
|
103
|
+
[Haiku-2] Frontend: fixing typo...
|
|
104
|
+
[Haiku-3] Test: adding coverage...
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Meanwhile**: The orchestrator doesn't idle. It reads the monitor for health signals, gathers fleet status for next phase, or extends the backlog with ideas.
|
|
108
|
+
|
|
109
|
+
**Watchdog**: Runs every 10s in the background, checking heartbeats and respawning any hung agents (max 3 retries).
|
|
110
|
+
|
|
111
|
+
### Phase 3: Verify & Merge (~30 min)
|
|
112
|
+
|
|
113
|
+
Once agents finish (or hit retry cap), the orchestrator:
|
|
114
|
+
|
|
115
|
+
1. Reviews each PR
|
|
116
|
+
2. Runs tests
|
|
117
|
+
3. Approves + merges
|
|
118
|
+
4. Updates main
|
|
119
|
+
|
|
120
|
+
**Output**:
|
|
121
|
+
```
|
|
122
|
+
✓ PR #101: Add README docs (MERGED)
|
|
123
|
+
✓ PR #102: Fix typo (MERGED)
|
|
124
|
+
✓ PR #103: Unit tests (MERGED)
|
|
125
|
+
→ All 3 PRs merged to main
|
|
126
|
+
→ Integration tests: PASSED ✓
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Phase 4: Close & Audit (~15 min)
|
|
130
|
+
|
|
131
|
+
The orchestrator wraps up:
|
|
132
|
+
|
|
133
|
+
1. **Audit**: Did agents follow rules? (branch discipline, secret-scan, test coverage)
|
|
134
|
+
2. **Findings**: What went well? What bottlenecked?
|
|
135
|
+
3. **Backlog for next wave**: Any learnings to feed the next cycle?
|
|
136
|
+
|
|
137
|
+
**Output**:
|
|
138
|
+
```
|
|
139
|
+
Wave 23 complete:
|
|
140
|
+
✓ 3/3 agents finished (avg 45 min each)
|
|
141
|
+
✓ All PRs merged and tests green
|
|
142
|
+
✓ Findings: (1) docs task took 12 min, consider breaking smaller
|
|
143
|
+
(2) test coverage suggestion: add integration tests
|
|
144
|
+
→ Next wave backlog suggestions: (1) expand dashboard tests (2) cache refactor
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## What Happens If an Agent Hangs
|
|
150
|
+
|
|
151
|
+
**Watchdog protocol** (no human intervention needed):
|
|
152
|
+
|
|
153
|
+
1. **First hang** (>200s idle): Watchdog auto-restarts the agent
|
|
154
|
+
2. **Second hang**: Watchdog auto-restarts again
|
|
155
|
+
3. **Third hang**: Watchdog auto-restarts (last automatic attempt)
|
|
156
|
+
4. **Fourth hang**: Mark BLOCKED in BUILDLOG.md and surface to you
|
|
157
|
+
|
|
158
|
+
You then decide: break the task smaller, escalate to Sonnet, or park it and move on.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Monitoring the Wave
|
|
163
|
+
|
|
164
|
+
### Watch the dashboard
|
|
165
|
+
|
|
166
|
+
While agents work, open the dashboard:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
python ui/serve.py
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Then open http://localhost:8770 in your browser. You'll see:
|
|
173
|
+
|
|
174
|
+
- **Overview**: Fleet agents (running/done), recent events
|
|
175
|
+
- **Work** (#/work): Task kanban (proposed → ranked → in-progress → done)
|
|
176
|
+
- **Activity** (#/activity): Agent timeline, main-thread reasoning
|
|
177
|
+
- **Cost** (#/cost): Token spend, cost breakdown by model
|
|
178
|
+
|
|
179
|
+
### Watch the TUI (Optional)
|
|
180
|
+
|
|
181
|
+
If you have `jq` installed, open the watchdog dashboard in another terminal:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
bash dash/watchdog-gui.sh
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
This shows real-time fleet health: agents, worktrees, heartbeats, cost (refreshes every 3s, Ctrl-C to exit).
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## After the Wave: Review & Learn
|
|
192
|
+
|
|
193
|
+
Once all phases complete:
|
|
194
|
+
|
|
195
|
+
1. **Check the BUILDLOG** — Read `state/BUILDLOG.md` for timestamped progress
|
|
196
|
+
2. **Review findings** — What went well? What slowed us down?
|
|
197
|
+
3. **Plan the next wave** — Use audit findings to rank next backlog
|
|
198
|
+
|
|
199
|
+
**Example learnings**:
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
✓ Fast: docs agent (12 min) — tasks are right-sized
|
|
203
|
+
⚠ Slow: test coverage took 35 min — consider pre-writing test scaffold
|
|
204
|
+
→ Next wave: prioritize cache refactor (high-value, good for Haiku scoping)
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Common Questions
|
|
210
|
+
|
|
211
|
+
### "How long does a wave take?"
|
|
212
|
+
|
|
213
|
+
**Typical**: 2–3 hours wall-clock (agents run in parallel).
|
|
214
|
+
|
|
215
|
+
- Phase 1 (rank): 5–10 min
|
|
216
|
+
- Phase 2 (agents): 60–90 min
|
|
217
|
+
- Phase 3 (verify): 20–30 min
|
|
218
|
+
- Phase 4 (close): 10–20 min
|
|
219
|
+
|
|
220
|
+
If you have 8 agents, you might see 2–4 hours. If 3 agents, closer to 1.5–2 hours.
|
|
221
|
+
|
|
222
|
+
### "What if I'm not ready for a wave?"
|
|
223
|
+
|
|
224
|
+
No problem! Run `/power` to check your health, then come back when you have a ranked backlog. Waves are optional — only run `/buildsystem` when you have work to ship.
|
|
225
|
+
|
|
226
|
+
### "Can I cancel a wave in progress?"
|
|
227
|
+
|
|
228
|
+
Yes, type `/stop` in Claude Code to halt the orchestrator. Any agents still running will be TaskStop'd. Work in progress (open PRs) will remain on the branch for you to handle manually.
|
|
229
|
+
|
|
230
|
+
### "How much does this cost?"
|
|
231
|
+
|
|
232
|
+
**Typical wave cost**: ~$0.03–$0.05 USD.
|
|
233
|
+
|
|
234
|
+
- 1 Opus orchestrator + 5 Haiku agents
|
|
235
|
+
- Haiku is ~1/5 the per-token cost of Opus
|
|
236
|
+
- Result: much cheaper than an all-Opus fleet
|
|
237
|
+
|
|
238
|
+
See [CONCEPTS.md](CONCEPTS.md) for the full cost model.
|
|
239
|
+
|
|
240
|
+
### "What if an agent fails?"
|
|
241
|
+
|
|
242
|
+
The watchdog handles it:
|
|
243
|
+
|
|
244
|
+
1. Agent task fails → watchdog detects (heartbeat stale)
|
|
245
|
+
2. Watchdog TaskStop's agent and relaunches (up to 3 times)
|
|
246
|
+
3. After 3 retries → mark BLOCKED and surface to you
|
|
247
|
+
|
|
248
|
+
You can then:
|
|
249
|
+
- Break the task smaller
|
|
250
|
+
- Escalate to Sonnet (rare)
|
|
251
|
+
- Park it and move on
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Next Steps
|
|
256
|
+
|
|
257
|
+
1. **Refine your backlog** — Add 3–4 tasks sized for Haiku
|
|
258
|
+
2. **Run your first wave** — Type `/buildsystem`
|
|
259
|
+
3. **Review the findings** — Check `state/BUILDLOG.md` and audit output
|
|
260
|
+
4. **Plan wave 2** — Use learnings to rank next backlog
|
|
261
|
+
|
|
262
|
+
For deeper understanding of the concepts, see [CONCEPTS.md](CONCEPTS.md). For governance and operational principles, see [GOVERNANCE.md](GOVERNANCE.md).
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Troubleshooting
|
|
267
|
+
|
|
268
|
+
| Issue | Fix |
|
|
269
|
+
|-------|-----|
|
|
270
|
+
| `/power` returns "brain not found" | Check `~/.claude/CLAUDE.md` exists; copy the skills with `cp -r skills/power/ ~/.claude/skills/power/` |
|
|
271
|
+
| `/buildsystem` says "no backlog" | Create a ranked backlog before running; orchestrator needs work items |
|
|
272
|
+
| Watchdog doesn't start | Check `AESOP_ROOT` env var is set; verify `daemons/run-watchdog.sh` is executable |
|
|
273
|
+
| Agents stuck at "initializing" | Check agent model exists (Haiku); monitor `/events` endpoint in dashboard for errors |
|
|
274
|
+
| Dashboard shows "unavailable" | Install Node.js v18+; check `dash-extra.mjs` exists in root |
|
|
275
|
+
|
|
276
|
+
For more help, see [../README.md#troubleshooting](../README.md#troubleshooting).
|
package/docs/INSTALL.md
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# Installation & Setup
|
|
2
|
+
|
|
3
|
+
**TL;DR**: Install Aesop in ~5 minutes using `npx`, set your repos, then verify with a single watchdog test run.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
Before you start, make sure you have:
|
|
10
|
+
|
|
11
|
+
- **Claude Code CLI** (v0.1+) — the orchestration harness integration
|
|
12
|
+
- **Git** (v2.40+) — version control and worktree support
|
|
13
|
+
- **Bash** (v4+) or Git Bash on Windows — shell scripting support
|
|
14
|
+
- **Node.js** (v18+) — for dashboard and monitor signals
|
|
15
|
+
- **Python** (v3.10+) — for secret-scan and log rotation
|
|
16
|
+
- **jq** (optional) — for TUI dashboard parsing
|
|
17
|
+
|
|
18
|
+
Check your versions:
|
|
19
|
+
```bash
|
|
20
|
+
claude --version
|
|
21
|
+
git --version
|
|
22
|
+
bash --version
|
|
23
|
+
node --version
|
|
24
|
+
python3 --version
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Quick Start: npx Scaffold (Recommended)
|
|
30
|
+
|
|
31
|
+
The fastest way to get started is to use the Aesop template scaffolder. It creates a preconfigured aesop harness in a new directory.
|
|
32
|
+
|
|
33
|
+
### Step 1: Scaffold the harness
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx @matt82198/aesop@beta my-fleet \
|
|
37
|
+
--name "my-api" \
|
|
38
|
+
--repos "/path/to/repo1,/path/to/repo2"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This creates a `my-fleet/` directory with:
|
|
42
|
+
- `daemons/` — watchdog, backup, secret-scan
|
|
43
|
+
- `skills/` — /power and /buildsystem skill templates
|
|
44
|
+
- `monitor/` — signal collectors
|
|
45
|
+
- `ui/` — web dashboard
|
|
46
|
+
- `aesop.config.json` — your configuration
|
|
47
|
+
- `state/` — runtime checkpoints (git-ignored)
|
|
48
|
+
- Pre-installed pre-push hook in `.git/hooks/`
|
|
49
|
+
|
|
50
|
+
### Step 2: Install orchestrator skills
|
|
51
|
+
|
|
52
|
+
Copy the skill definitions to your Claude Code home directory:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
cd my-fleet
|
|
56
|
+
|
|
57
|
+
# Copy /power skill (orchestrator brain)
|
|
58
|
+
cp -r skills/power/ ~/.claude/skills/power/
|
|
59
|
+
|
|
60
|
+
# Copy /buildsystem skill (wave cycle automation)
|
|
61
|
+
cp -r skills/buildsystem/ ~/.claude/skills/buildsystem/
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Step 3: Verify the installation
|
|
65
|
+
|
|
66
|
+
Run the watchdog once to test everything:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
bash daemons/run-watchdog.sh --once
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Expected output:
|
|
73
|
+
```
|
|
74
|
+
[watchdog] backing up fleet state...
|
|
75
|
+
[watchdog] scanning for secrets...
|
|
76
|
+
[watchdog] drift check: (files checked) ✓
|
|
77
|
+
[watchdog] all clear
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
If you see errors, check the logs in `state/FLEET-BACKUP.log`.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Manual Setup: Git Clone (For Development)
|
|
85
|
+
|
|
86
|
+
If you're hacking on Aesop itself, clone the repo and set up manually:
|
|
87
|
+
|
|
88
|
+
### Step 1: Clone and configure
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
git clone https://github.com/matt82198/aesop ~/my-aesop
|
|
92
|
+
cd ~/my-aesop
|
|
93
|
+
|
|
94
|
+
# Create your configuration
|
|
95
|
+
cp aesop.config.example.json aesop.config.json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Step 2: Edit aesop.config.json
|
|
99
|
+
|
|
100
|
+
Open `aesop.config.json` and customize for your repos (see [CONFIGURE.md](CONFIGURE.md) for full details):
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"aesopRoot": "/home/user/my-aesop",
|
|
105
|
+
"braindRoot": "/home/user/.claude",
|
|
106
|
+
"repos": [
|
|
107
|
+
{
|
|
108
|
+
"path": "/home/user/my-repo1",
|
|
109
|
+
"name": "my-api"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"path": "/home/user/my-repo2",
|
|
113
|
+
"name": "my-frontend"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"dashboardPort": 8770,
|
|
117
|
+
"dashboardOrigin": "http://localhost:8770"
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Step 3: Install skills and test
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Copy skills to Claude Code
|
|
125
|
+
cp -r skills/power/ ~/.claude/skills/power/
|
|
126
|
+
cp -r skills/buildsystem/ ~/.claude/skills/buildsystem/
|
|
127
|
+
|
|
128
|
+
# Set environment variable (add to ~/.bashrc or ~/.zprofile)
|
|
129
|
+
export AESOP_ROOT=/home/user/my-aesop
|
|
130
|
+
|
|
131
|
+
# Verify
|
|
132
|
+
bash $AESOP_ROOT/daemons/run-watchdog.sh --once
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## What Gets Created
|
|
138
|
+
|
|
139
|
+
After setup, you'll have:
|
|
140
|
+
|
|
141
|
+
### Main directories
|
|
142
|
+
|
|
143
|
+
- **daemons/** — Background watchdog (runs every 150s)
|
|
144
|
+
- `run-watchdog.sh` — main daemon loop
|
|
145
|
+
- `backup-fleet.sh` — backs up work to a safe branch
|
|
146
|
+
- `secret-scan.py` — blocks pushes with detected credentials
|
|
147
|
+
|
|
148
|
+
- **state/** — Runtime checkpoints (git-ignored)
|
|
149
|
+
- `STATE.md` — current phase and NEXT STEPS
|
|
150
|
+
- `BUILDLOG.md` — append-only progress log
|
|
151
|
+
- `.watchdog-heartbeat` — daemon liveness marker
|
|
152
|
+
|
|
153
|
+
- **skills/** — Claude Code orchestration skills
|
|
154
|
+
- `power/` — /power skill template (prime orchestrator brain)
|
|
155
|
+
- `buildsystem/` — /buildsystem skill template (wave cycle automation)
|
|
156
|
+
|
|
157
|
+
- **monitor/** — Signal collectors
|
|
158
|
+
- `collect-signals.mjs` — health checks (extensible)
|
|
159
|
+
|
|
160
|
+
- **ui/** — Web dashboard
|
|
161
|
+
- `serve.py` — Python backend (JSON/SSE APIs)
|
|
162
|
+
- `web/` — React frontend (hash-routed SPA)
|
|
163
|
+
|
|
164
|
+
- **hooks/** — Git pre-push policies
|
|
165
|
+
- `pre-push-policy.sh` — branch discipline + secret-scan enforcement
|
|
166
|
+
|
|
167
|
+
- **.git/hooks/pre-push** — Auto-installed pre-push hook (configured during setup)
|
|
168
|
+
|
|
169
|
+
### Configuration files
|
|
170
|
+
|
|
171
|
+
- **aesop.config.json** — Main configuration (git-ignored, never commit credentials)
|
|
172
|
+
- `aesopRoot` — path to this harness directory
|
|
173
|
+
- `braindRoot` — path to Claude Code home (`~/.claude`)
|
|
174
|
+
- `repos` — list of monitored repositories
|
|
175
|
+
- `dashboardPort` — web dashboard port (default: 8770)
|
|
176
|
+
- `dashboardOrigin` — CORS origin validation
|
|
177
|
+
|
|
178
|
+
- **aesop.config.example.json** — Template with defaults (commit this, use as reference)
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Environment Variables
|
|
183
|
+
|
|
184
|
+
Optional environment variables you can set in your shell:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Point to the Aesop harness root (used by daemons)
|
|
188
|
+
export AESOP_ROOT=/home/user/my-aesop
|
|
189
|
+
|
|
190
|
+
# Optional: custom location for Claude Code home
|
|
191
|
+
export CLAUDE_CODE_HOME=/home/user/.claude
|
|
192
|
+
|
|
193
|
+
# Optional: enable debug output in daemons
|
|
194
|
+
export DEBUG=1
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Pre-push Hook Installation
|
|
200
|
+
|
|
201
|
+
The `npx` scaffold installs the pre-push hook automatically. If you cloned the repo manually, install it:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
mkdir -p .git/hooks
|
|
205
|
+
cp hooks/pre-push-policy.sh .git/hooks/pre-push
|
|
206
|
+
chmod +x .git/hooks/pre-push
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
The hook enforces:
|
|
210
|
+
- Feature branches only (never direct pushes to `main`/`master`)
|
|
211
|
+
- Secret scanning (blocks commits with detected credentials)
|
|
212
|
+
|
|
213
|
+
To bypass during testing: `git push --no-verify` (not recommended for production).
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Next Steps
|
|
218
|
+
|
|
219
|
+
1. **Read [CONFIGURE.md](CONFIGURE.md)** — Customize repos, ports, and brain root
|
|
220
|
+
2. **Run [FIRST-WAVE.md](FIRST-WAVE.md)** — Test a full `/power` → `/buildsystem` cycle
|
|
221
|
+
3. **Understand [CONCEPTS.md](CONCEPTS.md)** — Learn the dispatch model and state model
|
|
222
|
+
4. **Explore the dashboard** — `python3 ui/serve.py` then open http://localhost:8770
|
|
223
|
+
|
|
224
|
+
For troubleshooting, see the [Aesop README](../README.md#troubleshooting) or [GOVERNANCE.md](GOVERNANCE.md) for operational policies.
|