@matt82198/aesop 0.1.0 → 0.3.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.
- package/CHANGELOG.md +117 -2
- package/README.md +59 -218
- package/bin/cli.js +168 -41
- package/daemons/run-watchdog.sh +16 -4
- package/daemons/selfheal.sh +231 -0
- package/docs/ANY-REPO.md +427 -0
- package/docs/CONTRIBUTING.md +72 -0
- package/docs/DEMO.md +334 -0
- package/docs/HOOK-INSTALL.md +15 -56
- package/docs/INSTALL.md +74 -4
- package/docs/PORTING.md +166 -0
- package/docs/README.md +33 -3
- package/docs/TEAM-STATE.md +372 -0
- package/docs/reproduce.md +33 -3
- package/driver/CLAUDE.md +150 -0
- package/driver/README.md +383 -0
- package/driver/aesop.config.example.json +80 -0
- package/driver/agent_driver.py +355 -0
- package/driver/backend_config.py +253 -0
- package/driver/claude_code_driver.py +198 -0
- package/driver/codex_driver.py +673 -0
- package/driver/openai_compatible_driver.py +249 -0
- package/driver/openai_transport.py +179 -0
- package/driver/verification_policy.py +75 -0
- package/driver/wave_bridge.py +254 -0
- package/driver/wave_loop.py +1408 -0
- package/driver/wave_scheduler.py +890 -0
- package/hooks/pre-push-policy.sh +131 -33
- package/mcp/server.mjs +320 -4
- package/monitor/collect-signals.mjs +69 -0
- package/package.json +22 -14
- package/skills/CLAUDE.md +132 -2
- package/skills/buildsystem/SKILL.md +330 -0
- package/skills/buildsystem/wave-flat-dispatch.template.mjs +658 -0
- package/skills/fleet/SKILL.md +113 -0
- package/skills/power/SKILL.md +246 -131
- package/state_store/__init__.py +4 -2
- package/state_store/api.py +19 -4
- package/state_store/coordination.py +209 -0
- package/state_store/identity.py +51 -0
- package/state_store/projections.py +63 -0
- package/state_store/read_api.py +156 -0
- package/state_store/store.py +185 -73
- package/state_store/write_api.py +462 -0
- package/templates/wave-presets/data.json +65 -0
- package/templates/wave-presets/library.json +65 -0
- package/templates/wave-presets/saas.json +64 -0
- package/tools/audit_report.py +388 -0
- package/tools/bench_runner.py +100 -3
- package/tools/ci_merge_wait.py +256 -35
- package/tools/ci_workflow_lint.py +430 -0
- package/tools/claudemd_drift.py +394 -0
- package/tools/claudemd_lint.py +359 -0
- package/tools/common.py +39 -3
- package/tools/cost_ceiling.py +166 -43
- package/tools/cost_econ.py +480 -0
- package/tools/cost_projection.py +559 -0
- package/tools/crossos_drift.py +394 -0
- package/tools/defect_escape.py +252 -0
- package/tools/doctor.js +1 -1
- package/tools/eod_sweep.py +188 -26
- package/tools/fleet.js +260 -0
- package/tools/fleet_ledger.py +209 -7
- package/tools/git_identity_check.py +315 -0
- package/tools/health-score.js +40 -0
- package/tools/health_score.py +361 -0
- package/tools/metrics_gate.py +13 -4
- package/tools/mutation_test.py +523 -0
- package/tools/portability_check.py +206 -0
- package/tools/proposals.mjs +47 -2
- package/tools/reconcile.py +7 -4
- package/tools/reproduce.js +405 -0
- package/tools/secret_scan.py +207 -65
- package/tools/self_stats.py +20 -0
- package/tools/stall_check.py +247 -16
- package/tools/stateapi_lint.py +325 -0
- package/tools/test_battery.py +173 -0
- package/tools/transcript_digest.py +380 -0
- package/tools/verify_activity_filter.py +437 -0
- package/tools/verify_agent_inspector.py +2 -0
- package/tools/verify_cost_panel.py +345 -0
- package/tools/verify_dash.py +2 -0
- package/tools/verify_dispatch_panel.py +301 -0
- package/tools/verify_failure_drilldown.py +188 -0
- package/tools/verify_prboard.py +2 -0
- package/tools/verify_scorecards.py +281 -0
- package/tools/verify_submit_encoding.py +2 -0
- package/tools/verify_ui_trio.py +409 -0
- package/tools/verify_wave_telemetry.py +268 -0
- package/tools/wave_backlog_analyzer.py +490 -0
- package/tools/wave_ledger_hook.py +150 -0
- package/tools/wave_preflight.py +779 -0
- package/tools/wave_resume.py +215 -0
- package/tools/wave_templates.py +340 -0
- package/ui/agents.py +68 -14
- package/ui/collectors.py +81 -55
- package/ui/config.py +7 -2
- package/ui/cost.py +231 -12
- package/ui/handler.py +383 -55
- package/ui/quality_scorecard.py +232 -0
- package/ui/sse.py +3 -3
- package/ui/wave_audit_tail.py +213 -0
- package/ui/wave_dispatch.py +280 -0
- package/ui/wave_failure.py +288 -0
- package/ui/wave_gantt.py +152 -0
- package/ui/wave_reasoning_tail.py +176 -0
- package/ui/wave_telemetry.py +383 -0
- package/ui/web/dist/assets/index-CNQxaiOW.css +1 -0
- package/ui/web/dist/assets/index-CP68RIh3.js +9 -0
- package/ui/web/dist/index.html +2 -2
- package/bin/CLAUDE.md +0 -76
- package/daemons/CLAUDE.md +0 -36
- package/dash/CLAUDE.md +0 -32
- package/docs/archive/README.md +0 -3
- package/docs/archive/spikes/tiered-cognition/ACTIVATION.md +0 -125
- package/docs/archive/spikes/tiered-cognition/DESIGN.md +0 -287
- package/docs/archive/spikes/tiered-cognition/FINDINGS.md +0 -113
- package/docs/archive/spikes/tiered-cognition/README.md +0 -27
- package/docs/archive/spikes/tiered-cognition/aesop-cognition.example.md +0 -32
- package/docs/archive/spikes/tiered-cognition/force-model-policy.merged.mjs +0 -673
- package/docs/archive/spikes/tiered-cognition/strip-tools-hook.mjs +0 -434
- package/hooks/CLAUDE.md +0 -89
- package/mcp/CLAUDE.md +0 -213
- package/monitor/CLAUDE.md +0 -40
- package/scan/CLAUDE.md +0 -30
- package/state_store/CLAUDE.md +0 -39
- package/tools/CLAUDE.md +0 -79
- package/ui/CLAUDE.md +0 -127
- package/ui/web/dist/assets/index-0qQYnvMC.js +0 -9
- package/ui/web/dist/assets/index-BdIlFieV.css +0 -1
package/docs/ANY-REPO.md
ADDED
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
# Aesop in ANY Repository — Portability Walkthrough
|
|
2
|
+
|
|
3
|
+
**Aesop works in any Git repository**, no matter the stack, size, or language.
|
|
4
|
+
This guide walks you through initializing Aesop into a codebase you've just cloned,
|
|
5
|
+
then running a full orchestration cycle to see how the system works.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
Before starting, make sure you have:
|
|
12
|
+
|
|
13
|
+
- **Claude Code CLI** (v0.1+) with `/power` and `/buildsystem` skills installed
|
|
14
|
+
- **Git** (v2.40+)
|
|
15
|
+
- **Bash** (v4+) or Git Bash on Windows
|
|
16
|
+
- **Node.js** (v18+), **Python** (v3.10+) — for orchestration daemons
|
|
17
|
+
- A Git repository you want to orchestrate (can be your own repo, a fork, or a fresh clone of an existing project)
|
|
18
|
+
|
|
19
|
+
Check versions:
|
|
20
|
+
```bash
|
|
21
|
+
claude --version
|
|
22
|
+
git --version
|
|
23
|
+
bash --version
|
|
24
|
+
node --version
|
|
25
|
+
python3 --version
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Step 1: Clone or Navigate to Your Target Repo
|
|
31
|
+
|
|
32
|
+
Let's say you've just cloned a project you want to orchestrate:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
cd ~/my-target-repo
|
|
36
|
+
git status # confirm you're in a git repo
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If the repo **already has `CLAUDE.md` + `STATE.md`**, you can jump to [Step 3](#step-3-run-power-fast-path-already-primed).
|
|
40
|
+
|
|
41
|
+
If the repo has **no CLAUDE.md layer**, continue to [Step 2](#step-2-install-aesop-harness).
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Step 2: Install Aesop Harness
|
|
46
|
+
|
|
47
|
+
Scaffold the Aesop daemons, skills, and configuration templates into your target repo root:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Option 1: Scaffold into current directory (target repo already exists)
|
|
51
|
+
npx @matt82198/aesop .
|
|
52
|
+
|
|
53
|
+
# Option 2: Scaffold into a new aesop-fleet subdirectory
|
|
54
|
+
npx @matt82198/aesop
|
|
55
|
+
|
|
56
|
+
# Option 3: Scaffold with project name and repos (headless mode)
|
|
57
|
+
npx @matt82198/aesop orchestrator --name "my-project" --repos "/path/to/repo1"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This creates (or adds to) the following structure in your repo:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
.
|
|
64
|
+
├── .git/
|
|
65
|
+
├── .github/
|
|
66
|
+
│ └── workflows/ (optional CI examples)
|
|
67
|
+
├── daemons/
|
|
68
|
+
│ ├── run-watchdog.sh (background monitor: backup, secret-scan, heartbeat)
|
|
69
|
+
│ ├── backup-fleet.sh
|
|
70
|
+
│ └── ...
|
|
71
|
+
├── skills/
|
|
72
|
+
│ ├── power/ (orchestrator brain-priming skill)
|
|
73
|
+
│ └── buildsystem/ (wave automation skill)
|
|
74
|
+
├── monitor/
|
|
75
|
+
│ ├── collect-signals.mjs (extensible health signal collectors)
|
|
76
|
+
│ └── CHARTER.md
|
|
77
|
+
├── ui/
|
|
78
|
+
│ ├── serve.py (dashboard backend)
|
|
79
|
+
│ └── web/ (React frontend; optional)
|
|
80
|
+
├── hooks/
|
|
81
|
+
│ ├── pre-push-policy.sh (secret-scan + branch discipline enforcement)
|
|
82
|
+
│ ├── pre-commit-waveguard.sh (wave checkpoint guard)
|
|
83
|
+
│ └── install-waveguard.sh (hook installer script)
|
|
84
|
+
├── tools/
|
|
85
|
+
│ ├── secret_scan.py (block credentials before push)
|
|
86
|
+
│ ├── power_selftest.py (verify orchestration health)
|
|
87
|
+
│ └── ...
|
|
88
|
+
├── state/ (git-ignored; runtime checkpoints live here)
|
|
89
|
+
│ └── .gitkeep
|
|
90
|
+
├── aesop.config.example.json
|
|
91
|
+
└── aesop.config.json (your personalized config, git-ignored)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Automatic Hook Installation**: The scaffold process automatically installs git hooks in `.git/hooks/`:
|
|
95
|
+
- **pre-push** (auto-installed copy of `hooks/pre-push-policy.sh`): runs secret scanning and branch discipline checks before allowing pushes
|
|
96
|
+
- **pre-commit** (auto-installed waveguard hook): implements wave checkpointing guard (ensures consistent state)
|
|
97
|
+
|
|
98
|
+
These hooks are copied (not symlinked) to `.git/hooks/` to work reliably across all platforms (Windows, macOS, Linux). On re-scaffold with `--force`, hooks are replaced; without it, existing hooks are preserved (unless they differ from source, in which case a warning is shown).
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Step 3: Run `/power` (Init-Prime)
|
|
103
|
+
|
|
104
|
+
Now run the `/power` skill in the repository root:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
cd ~/my-target-repo
|
|
108
|
+
/power
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**What happens:**
|
|
112
|
+
|
|
113
|
+
Aesop detects that your repo has **no CLAUDE.md layer** and enters **init-prime mode**:
|
|
114
|
+
|
|
115
|
+
1. **Fan-out exploration** (4 parallel Haiku subagents, ~30s each):
|
|
116
|
+
- Haiku-A scans repository structure, build system, entry points
|
|
117
|
+
- Haiku-B catalogs key libraries, frameworks, dependencies
|
|
118
|
+
- Haiku-C explores testing, CI/CD, deployment
|
|
119
|
+
- Haiku-D identifies gotchas, non-obvious invariants
|
|
120
|
+
|
|
121
|
+
2. **Write CLAUDE.md layer**:
|
|
122
|
+
- **Project-root `CLAUDE.md`**: purpose, build/run commands, gotchas, domain map
|
|
123
|
+
- **Domain `CLAUDE.md` units**: e.g., `src/CLAUDE.md`, `api/CLAUDE.md`, `tests/CLAUDE.md`
|
|
124
|
+
- **`STATE.md` checkpoint seed**: intent, phase, next steps (durable across wipes)
|
|
125
|
+
|
|
126
|
+
3. **Commit + Push** (gated by secret-scan):
|
|
127
|
+
```
|
|
128
|
+
git add CLAUDE.md STATE.md src/CLAUDE.md ...
|
|
129
|
+
git commit -m "init: initialize aesop orchestration semantics"
|
|
130
|
+
python tools/secret_scan.py --staged
|
|
131
|
+
git push origin feat/aesop-init-prime
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
4. **Report completion**:
|
|
135
|
+
```
|
|
136
|
+
✓ Aesop init-prime complete
|
|
137
|
+
- Project-root CLAUDE.md written (purpose, commands, gotchas, 4 domains)
|
|
138
|
+
- Domain CLAUDE.md units: src/, api/, core/, tests/
|
|
139
|
+
- STATE.md checkpoint seed created
|
|
140
|
+
- Pushed to origin feat/aesop-init-prime (secret-scan: all clear)
|
|
141
|
+
|
|
142
|
+
NEXT: Review the `.md` layer, iterate on domains, then run /buildsystem for your first orchestration wave.
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Step 4: Review the Generated `.md` Layer
|
|
148
|
+
|
|
149
|
+
The init-prime step wrote several new files. Let's review them:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# View project-root CLAUDE.md (purpose, commands, gotchas)
|
|
153
|
+
cat CLAUDE.md
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Example output:
|
|
157
|
+
```markdown
|
|
158
|
+
# my-target-repo — Orchestration Brain
|
|
159
|
+
|
|
160
|
+
**What**: my-target-repo is a Node.js + TypeScript REST API with PostgreSQL,
|
|
161
|
+
orchestrated through cost-optimized multi-agent dispatch.
|
|
162
|
+
|
|
163
|
+
## Cardinal Rules
|
|
164
|
+
1. Subagents are always Haiku (cost optimization at scale)
|
|
165
|
+
2. Orchestrator (Opus) on main thread only
|
|
166
|
+
3. State gates everything (git commit + push)
|
|
167
|
+
4. Secret-scan gates every push (no credentials leak)
|
|
168
|
+
5. Idempotent + append-only (safe to restart mid-cycle)
|
|
169
|
+
6. Observable machinery (every action logged)
|
|
170
|
+
|
|
171
|
+
## Domain Map
|
|
172
|
+
- **API layer** (`src/api/`): HTTP routes, middleware, controllers
|
|
173
|
+
- **Core logic** (`src/core/`): business logic, state machine, data model
|
|
174
|
+
- **Infrastructure** (`src/infra/`): database, caching, external services
|
|
175
|
+
- **Tests** (`tests/`): fixtures, test harness, mocking
|
|
176
|
+
|
|
177
|
+
## Key Commands
|
|
178
|
+
- `npm run build` — TypeScript compilation
|
|
179
|
+
- `npm run test` — Run test suite
|
|
180
|
+
- `npm start` — Start the server (localhost:3000)
|
|
181
|
+
- `npm run migrate` — Database migrations
|
|
182
|
+
|
|
183
|
+
## Gotchas
|
|
184
|
+
- Tests must run in isolation (no shared DB state)
|
|
185
|
+
- Docker build takes 5 minutes; cache aggressively
|
|
186
|
+
- Postgres connection pool size = 10 (hardcoded, needed for high concurrency)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# View a domain CLAUDE.md (contracts, invariants)
|
|
191
|
+
cat src/api/CLAUDE.md
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Example output:
|
|
195
|
+
```markdown
|
|
196
|
+
# API Layer
|
|
197
|
+
|
|
198
|
+
## Module Layout
|
|
199
|
+
- `routes.ts` — Express route handlers
|
|
200
|
+
- `middleware.ts` — CORS, auth, logging
|
|
201
|
+
- `controllers/` — business logic per endpoint
|
|
202
|
+
- `types.ts` — TypeScript interfaces for requests/responses
|
|
203
|
+
|
|
204
|
+
## Key Contracts
|
|
205
|
+
- All endpoints return `{ data: T, error?: string }`
|
|
206
|
+
- Authentication: Bearer token in Authorization header
|
|
207
|
+
- Content-Type: application/json only
|
|
208
|
+
|
|
209
|
+
## Anti-Patterns
|
|
210
|
+
- Don't call database directly from routes (use Core layer)
|
|
211
|
+
- Don't mutate global state in middleware
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# View the state checkpoint
|
|
216
|
+
cat STATE.md
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Example output:
|
|
220
|
+
```markdown
|
|
221
|
+
# my-target-repo — State & Next Steps
|
|
222
|
+
|
|
223
|
+
**Phase**: init-prime (first CLAUDE.md layer written)
|
|
224
|
+
|
|
225
|
+
**Intent**: my-target-repo is now initialized with aesop orchestration semantics.
|
|
226
|
+
All domain rules live in scoped CLAUDE.md files. Ready to dispatch first work.
|
|
227
|
+
|
|
228
|
+
**NEXT STEPS**:
|
|
229
|
+
- [ ] Review + approve the written CLAUDE.md layer
|
|
230
|
+
- [ ] Adjust domains if needed (re-run init-prime or edit manually)
|
|
231
|
+
- [ ] Run `/buildsystem` to execute one example orchestration wave
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Step 5: Run `/buildsystem` (Orchestration Wave)
|
|
237
|
+
|
|
238
|
+
Now let's run a full orchestration cycle:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
cd ~/my-target-repo
|
|
242
|
+
/buildsystem
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**What happens:**
|
|
246
|
+
|
|
247
|
+
The `/buildsystem` skill reads your newly-written CLAUDE.md layer and orchestrates a full development wave:
|
|
248
|
+
|
|
249
|
+
1. **Phase 1: Backlog Review** (Opus orchestrator)
|
|
250
|
+
- Read your project's CLAUDE.md domains and current STATE.md
|
|
251
|
+
- Surface any open decisions, blockers, or proposed tasks
|
|
252
|
+
- Rank the backlog by priority and risk
|
|
253
|
+
|
|
254
|
+
2. **Phase 2: Parallel Haiku Fleets** (6-8 Haiku subagents in parallel)
|
|
255
|
+
- **One Haiku per domain** (API layer, core logic, tests, etc.)
|
|
256
|
+
- Each Haiku:
|
|
257
|
+
- Reads its domain CLAUDE.md (contracts, invariants, entry points)
|
|
258
|
+
- Writes minimal TDD-first test improvements
|
|
259
|
+
- Implements fixes or features
|
|
260
|
+
- Runs local compile + test checks
|
|
261
|
+
- **Pushes to a feature branch** (not main)
|
|
262
|
+
- **Continues until all are green or blocked**
|
|
263
|
+
|
|
264
|
+
3. **Phase 3: Merge Train** (Opus orchestrator)
|
|
265
|
+
- Collects all feature branches from Haiku fleets
|
|
266
|
+
- Runs full test suite (CI) on each
|
|
267
|
+
- Merges to main in order (if all green)
|
|
268
|
+
- Reports which features shipped + their costs
|
|
269
|
+
|
|
270
|
+
4. **Phase 4: Checkpoint** (git commit + push)
|
|
271
|
+
- Update `STATE.md` with new phase, completed work, next steps
|
|
272
|
+
- Append to `BUILDLOG.md` (append-only log of all dispatches, timestamps, costs)
|
|
273
|
+
- Commit + push (gated by secret-scan)
|
|
274
|
+
|
|
275
|
+
5. **Phase 5: Audit** (Haiku auditors, parallel)
|
|
276
|
+
- Security review of merged code
|
|
277
|
+
- Performance review of test times
|
|
278
|
+
- Documentation audit (ensure CLAUDE.md is still accurate)
|
|
279
|
+
- Report findings into the **next wave's backlog**
|
|
280
|
+
|
|
281
|
+
6. **Report Wave Summary**:
|
|
282
|
+
```
|
|
283
|
+
✓ Wave 1 complete
|
|
284
|
+
- Domains: API layer, Core logic, Tests, Infra (4 parallel Haikus)
|
|
285
|
+
- Work shipped: 3 feature branches merged to main
|
|
286
|
+
- fix/db-connection-pool (API layer) — 2 tests added, 1 bug fixed
|
|
287
|
+
- feat/cache-ttl (Core logic) — new cache invalidation strategy
|
|
288
|
+
- refactor/test-fixtures (Tests) — improved isolation, 5m faster suite
|
|
289
|
+
- Security audit: all clear (no new vulnerabilities)
|
|
290
|
+
- Cost: 2,847 tokens (Opus: 1,200 + 4x Haiku: 412 each)
|
|
291
|
+
- Duration: 4m 23s
|
|
292
|
+
|
|
293
|
+
STATE.md updated. Ready for Wave 2 when you are.
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## Step 6: Explore the New State Files
|
|
299
|
+
|
|
300
|
+
After the orchestration wave completes, several new files have appeared:
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
# State checkpoint — updated with new phase and next steps
|
|
304
|
+
cat STATE.md
|
|
305
|
+
|
|
306
|
+
# Append-only build log — every dispatch, cost, timestamp
|
|
307
|
+
tail -50 BUILDLOG.md
|
|
308
|
+
|
|
309
|
+
# Feature branches created by Haiku fleets (now merged to main)
|
|
310
|
+
git log --oneline main | head -5
|
|
311
|
+
|
|
312
|
+
# Watch the next wave begin (if autonomous)
|
|
313
|
+
tail -f state/POWER-SELFTEST.log
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
**Key files created/updated**:
|
|
317
|
+
|
|
318
|
+
| File | Purpose | Git-tracked? | Team-shareable? |
|
|
319
|
+
|------|---------|-------------|-----------------|
|
|
320
|
+
| `CLAUDE.md` | Project-root orchestration rules | ✓ Yes | ✓ Yes (team reference) |
|
|
321
|
+
| `src/CLAUDE.md`, etc. | Domain-scoped contracts + invariants | ✓ Yes | ✓ Yes (team reference) |
|
|
322
|
+
| `STATE.md` | Durable phase, locked decisions, next steps | ✓ Yes | ✓ Yes (team coordination) |
|
|
323
|
+
| `BUILDLOG.md` | Append-only log of every dispatch | ✓ Yes | ✓ Yes (audit trail, costs) |
|
|
324
|
+
| `aesop.config.json` | Personal paths, secrets (webhook URLs) | ✗ No (git-ignored) | ✗ No (per-developer) |
|
|
325
|
+
| `state/.watchdog-heartbeat` | Daemon liveness timestamp | ✗ No (git-ignored) | ✗ No (ephemeral) |
|
|
326
|
+
| `state/.power-selftest.log` | Orchestration health checks | ✗ No (git-ignored) | ✗ No (ephemeral) |
|
|
327
|
+
|
|
328
|
+
**Team-shareable files** (`CLAUDE.md`, `STATE.md`, `BUILDLOG.md`) are committed to git and shared across all developers.
|
|
329
|
+
They're the team's **persistent orchestration brain**.
|
|
330
|
+
|
|
331
|
+
**Personal files** (`aesop.config.json`, heartbeats, logs) are git-ignored and only live on each developer's machine.
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## Step 7: Running `/power` on Already-Primed Repo (Fast Path)
|
|
336
|
+
|
|
337
|
+
Now that your repo is primed (has CLAUDE.md + STATE.md), running `/power` again takes the **fast path**:
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
/power
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
**What happens (fast path)**:
|
|
344
|
+
|
|
345
|
+
1. **Detect priming**: Read project-root `CLAUDE.md` ✓
|
|
346
|
+
2. **Load rules**: Internalize dispatch model, cardinal rules
|
|
347
|
+
3. **Load memory**: Read team facts from `~/.claude/MEMORY.md`
|
|
348
|
+
4. **Load state**: Read `STATE.md` (current phase, locked decisions, next steps)
|
|
349
|
+
5. **Health check**: Run `tools/power_selftest.py` (hooks, secrets, heartbeats)
|
|
350
|
+
6. **Report compact brief**:
|
|
351
|
+
```
|
|
352
|
+
✓ Primed
|
|
353
|
+
- Project: my-target-repo (Node.js API, 4 domains)
|
|
354
|
+
- Dispatch model: Haiku subagents (one per domain), Opus orchestrator
|
|
355
|
+
- Phase: wave-1 complete; ready for wave-2
|
|
356
|
+
- Health: all clear (secret-scan: passing, hooks: installed, heartbeats: alive)
|
|
357
|
+
- Next steps: run /buildsystem for wave-2
|
|
358
|
+
```
|
|
359
|
+
7. **Continue**: Proceed autonomously under the loaded rules
|
|
360
|
+
|
|
361
|
+
**Fast path is 5-10x faster** than init-prime (no code scanning, no .md generation, just loading persisted state).
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## Customizing Your Domains
|
|
366
|
+
|
|
367
|
+
If init-prime identified domains incorrectly, or you want to refactor the domain map:
|
|
368
|
+
|
|
369
|
+
1. **Edit `CLAUDE.md`**: Update the domain map section
|
|
370
|
+
2. **Edit or add domain `CLAUDE.md` files**: Adjust contracts, invariants, entry points
|
|
371
|
+
3. **Update `STATE.md`** with a note: "Domains refactored in wave N"
|
|
372
|
+
4. **Commit + push**:
|
|
373
|
+
```bash
|
|
374
|
+
git add CLAUDE.md src/CLAUDE.md core/CLAUDE.md STATE.md
|
|
375
|
+
git commit -m "refactor: adjust domain map for clarity"
|
|
376
|
+
git push origin main
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
Next `/buildsystem` cycle will use the updated domain map to dispatch Haikus.
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## Troubleshooting
|
|
384
|
+
|
|
385
|
+
### "Init-prime didn't write files"
|
|
386
|
+
- Check that you're in the repo root: `pwd`
|
|
387
|
+
- Confirm the repo has no existing `CLAUDE.md`: `ls CLAUDE.md`
|
|
388
|
+
- Run `/power` with debug output: `DEBUG=1 /power`
|
|
389
|
+
|
|
390
|
+
### "Secret-scan blocked my commit"
|
|
391
|
+
- Review the leak: `git show --cached | grep -i "password\|secret\|key"`
|
|
392
|
+
- Fix the leaky file, re-stage, re-commit
|
|
393
|
+
- Never bypass the scan (`--no-verify` is not allowed)
|
|
394
|
+
|
|
395
|
+
### "Haikus didn't run; saw blank report"
|
|
396
|
+
- Check that `/buildsystem` skill is installed: `ls ~/.claude/skills/buildsystem/SKILL.md`
|
|
397
|
+
- Verify your domain `CLAUDE.md` files are readable and not corrupted
|
|
398
|
+
- Check `state/BUILDLOG.md` for error messages
|
|
399
|
+
|
|
400
|
+
### "I want to add a custom signal to the monitor"
|
|
401
|
+
- Edit `monitor/collect-signals.mjs` (it's a template)
|
|
402
|
+
- Add a new signal function (see the examples in the file)
|
|
403
|
+
- Restart the monitor (if running)
|
|
404
|
+
- Signal will appear in the next health check
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## Next Steps
|
|
409
|
+
|
|
410
|
+
1. **Commit the CLAUDE.md layer** to your main branch (or review in a PR first)
|
|
411
|
+
2. **Run `/buildsystem` regularly** — it automates your team's development waves
|
|
412
|
+
3. **Iterate domain CLAUDE.md** as your team discovers invariants
|
|
413
|
+
4. **Monitor the dashboard** — `python ui/serve.py` and open http://localhost:8770
|
|
414
|
+
5. **Read [DISPATCH-MODEL.md](DISPATCH-MODEL.md)** to understand cost analysis + parallelism
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
## Key Takeaways
|
|
419
|
+
|
|
420
|
+
- **Aesop works in ANY repo** — no special stack, language, or project structure required
|
|
421
|
+
- **Init-prime is automatic** — one `/power` run generates the CLAUDE.md layer for you
|
|
422
|
+
- **Fast path is the default** — every subsequent `/power` loads state in seconds
|
|
423
|
+
- **State files are team-shareable** — CLAUDE.md, STATE.md, BUILDLOG.md are git-tracked and shared
|
|
424
|
+
- **Personal config is local** — aesop.config.json + heartbeats are git-ignored
|
|
425
|
+
- **Fully portable** — no hardcoded personal paths, all paths are configurable or relative
|
|
426
|
+
|
|
427
|
+
Your repo is now orchestrated. Happy deploying! 🚀
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Contributing to Aesop
|
|
2
|
+
|
|
3
|
+
Aesop is **source-available** under the [PolyForm Strict License 1.0.0](../LICENSE). You may read, run, and use the software for any permitted purpose (noncommercial, personal, or organizational research), but **modification and redistribution are not permitted**.
|
|
4
|
+
|
|
5
|
+
## Contribution Policy
|
|
6
|
+
|
|
7
|
+
**Outside code patches cannot be merged as contributions** due to license terms. However, feedback and collaboration are genuinely welcome:
|
|
8
|
+
|
|
9
|
+
- **Issues and bug reports** — describe what's broken or confusing.
|
|
10
|
+
- **Discussion and ideas** — feature requests, design critiques, use-case questions.
|
|
11
|
+
- **Code snapshots for discussion** — propose changes in issues or discussions without expecting merge.
|
|
12
|
+
|
|
13
|
+
Code changes are made by the maintainer at their discretion. If you'd like to propose a change, open an issue first — describe the problem, your approach, and why it matters.
|
|
14
|
+
|
|
15
|
+
## Running the Test Suites
|
|
16
|
+
|
|
17
|
+
Aesop has three test suites:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Node.js tests (orchestration skills, monitor, UI API)
|
|
21
|
+
npm run test:node
|
|
22
|
+
|
|
23
|
+
# Python tests (state_store, log rotation, secret-scan)
|
|
24
|
+
npm run test:py
|
|
25
|
+
|
|
26
|
+
# Bash tests (daemons, watchdog, hook policy)
|
|
27
|
+
npm run test:sh
|
|
28
|
+
|
|
29
|
+
# All suites
|
|
30
|
+
npm run test:all
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Each suite is self-contained and idempotent. Run them before proposing any changes.
|
|
34
|
+
|
|
35
|
+
## Workflow (for Maintainers)
|
|
36
|
+
|
|
37
|
+
Aesop develops itself via its own `/buildsystem` wave cycle. The process:
|
|
38
|
+
|
|
39
|
+
1. **One issue per branch** — `feature/issue-name` branches only (never main).
|
|
40
|
+
2. **Commit and push** — each commit triggers the pre-push hook.
|
|
41
|
+
3. **Secret-scan gate** — `hooks/pre-push-policy.sh` blocks any credentials before they leave your machine.
|
|
42
|
+
4. **Pull request** — PR runs CI and waits for merge-train coordination.
|
|
43
|
+
5. **Checkpoint** — STATE.md and BUILDLOG.md capture wave state; both are git-committed and survive wipes.
|
|
44
|
+
|
|
45
|
+
See [docs/ARCHITECTURE.md](./ARCHITECTURE.md) for the wave cycle diagram and [docs/HOW-THE-LOOP-WORKS.md](./HOW-THE-LOOP-WORKS.md) for a concrete walkthrough.
|
|
46
|
+
|
|
47
|
+
## Code Style
|
|
48
|
+
|
|
49
|
+
**Python**: Stdlib-first (no external deps except asyncio). Docstrings required; snake_case for functions and variables. See `tools/secret_scan.py` and `state_store/` for examples.
|
|
50
|
+
|
|
51
|
+
**Node.js/JavaScript**: Node stdlib for tooling only (no external packages). Use async/await. See `daemons/`, `monitor/`, and `bin/` for patterns.
|
|
52
|
+
|
|
53
|
+
**Bash**: POSIX-safe (no Bashisms; works in Git Bash on Windows). Sourceable scripts must guard with `[[ "${BASH_SOURCE[0]}" == "${0}" ]]`. See `hooks/pre-push-policy.sh` for structure.
|
|
54
|
+
|
|
55
|
+
## Attribution
|
|
56
|
+
|
|
57
|
+
Commits are authored with your git user.name. The repo signs all commits and uses co-author trailers for multi-person changes:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
git commit -m "message
|
|
61
|
+
|
|
62
|
+
Co-Authored-By: Alice <alice@example.com>
|
|
63
|
+
Co-Authored-By: Bob <bob@example.com>"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## License & DCO
|
|
67
|
+
|
|
68
|
+
By proposing changes, you affirm that you own or have the right to contribute your work and agree to license it under PolyForm Strict 1.0.0. See [LICENSE](../LICENSE) for the full terms.
|
|
69
|
+
|
|
70
|
+
## Questions?
|
|
71
|
+
|
|
72
|
+
Open an issue or discussion on GitHub. Read [docs/GOVERNANCE.md](./GOVERNANCE.md) for details on the decision-making process and [docs/RELIABILITY.md](./RELIABILITY.md) for the engineering principles behind Aesop.
|