@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.
Files changed (130) hide show
  1. package/CHANGELOG.md +117 -2
  2. package/README.md +59 -218
  3. package/bin/cli.js +168 -41
  4. package/daemons/run-watchdog.sh +16 -4
  5. package/daemons/selfheal.sh +231 -0
  6. package/docs/ANY-REPO.md +427 -0
  7. package/docs/CONTRIBUTING.md +72 -0
  8. package/docs/DEMO.md +334 -0
  9. package/docs/HOOK-INSTALL.md +15 -56
  10. package/docs/INSTALL.md +74 -4
  11. package/docs/PORTING.md +166 -0
  12. package/docs/README.md +33 -3
  13. package/docs/TEAM-STATE.md +372 -0
  14. package/docs/reproduce.md +33 -3
  15. package/driver/CLAUDE.md +150 -0
  16. package/driver/README.md +383 -0
  17. package/driver/aesop.config.example.json +80 -0
  18. package/driver/agent_driver.py +355 -0
  19. package/driver/backend_config.py +253 -0
  20. package/driver/claude_code_driver.py +198 -0
  21. package/driver/codex_driver.py +673 -0
  22. package/driver/openai_compatible_driver.py +249 -0
  23. package/driver/openai_transport.py +179 -0
  24. package/driver/verification_policy.py +75 -0
  25. package/driver/wave_bridge.py +254 -0
  26. package/driver/wave_loop.py +1408 -0
  27. package/driver/wave_scheduler.py +890 -0
  28. package/hooks/pre-push-policy.sh +131 -33
  29. package/mcp/server.mjs +320 -4
  30. package/monitor/collect-signals.mjs +69 -0
  31. package/package.json +22 -14
  32. package/skills/CLAUDE.md +132 -2
  33. package/skills/buildsystem/SKILL.md +330 -0
  34. package/skills/buildsystem/wave-flat-dispatch.template.mjs +658 -0
  35. package/skills/fleet/SKILL.md +113 -0
  36. package/skills/power/SKILL.md +246 -131
  37. package/state_store/__init__.py +4 -2
  38. package/state_store/api.py +19 -4
  39. package/state_store/coordination.py +209 -0
  40. package/state_store/identity.py +51 -0
  41. package/state_store/projections.py +63 -0
  42. package/state_store/read_api.py +156 -0
  43. package/state_store/store.py +185 -73
  44. package/state_store/write_api.py +462 -0
  45. package/templates/wave-presets/data.json +65 -0
  46. package/templates/wave-presets/library.json +65 -0
  47. package/templates/wave-presets/saas.json +64 -0
  48. package/tools/audit_report.py +388 -0
  49. package/tools/bench_runner.py +100 -3
  50. package/tools/ci_merge_wait.py +256 -35
  51. package/tools/ci_workflow_lint.py +430 -0
  52. package/tools/claudemd_drift.py +394 -0
  53. package/tools/claudemd_lint.py +359 -0
  54. package/tools/common.py +39 -3
  55. package/tools/cost_ceiling.py +166 -43
  56. package/tools/cost_econ.py +480 -0
  57. package/tools/cost_projection.py +559 -0
  58. package/tools/crossos_drift.py +394 -0
  59. package/tools/defect_escape.py +252 -0
  60. package/tools/doctor.js +1 -1
  61. package/tools/eod_sweep.py +188 -26
  62. package/tools/fleet.js +260 -0
  63. package/tools/fleet_ledger.py +209 -7
  64. package/tools/git_identity_check.py +315 -0
  65. package/tools/health-score.js +40 -0
  66. package/tools/health_score.py +361 -0
  67. package/tools/metrics_gate.py +13 -4
  68. package/tools/mutation_test.py +523 -0
  69. package/tools/portability_check.py +206 -0
  70. package/tools/proposals.mjs +47 -2
  71. package/tools/reconcile.py +7 -4
  72. package/tools/reproduce.js +405 -0
  73. package/tools/secret_scan.py +207 -65
  74. package/tools/self_stats.py +20 -0
  75. package/tools/stall_check.py +247 -16
  76. package/tools/stateapi_lint.py +325 -0
  77. package/tools/test_battery.py +173 -0
  78. package/tools/transcript_digest.py +380 -0
  79. package/tools/verify_activity_filter.py +437 -0
  80. package/tools/verify_agent_inspector.py +2 -0
  81. package/tools/verify_cost_panel.py +345 -0
  82. package/tools/verify_dash.py +2 -0
  83. package/tools/verify_dispatch_panel.py +301 -0
  84. package/tools/verify_failure_drilldown.py +188 -0
  85. package/tools/verify_prboard.py +2 -0
  86. package/tools/verify_scorecards.py +281 -0
  87. package/tools/verify_submit_encoding.py +2 -0
  88. package/tools/verify_ui_trio.py +409 -0
  89. package/tools/verify_wave_telemetry.py +268 -0
  90. package/tools/wave_backlog_analyzer.py +490 -0
  91. package/tools/wave_ledger_hook.py +150 -0
  92. package/tools/wave_preflight.py +779 -0
  93. package/tools/wave_resume.py +215 -0
  94. package/tools/wave_templates.py +340 -0
  95. package/ui/agents.py +68 -14
  96. package/ui/collectors.py +81 -55
  97. package/ui/config.py +7 -2
  98. package/ui/cost.py +231 -12
  99. package/ui/handler.py +383 -55
  100. package/ui/quality_scorecard.py +232 -0
  101. package/ui/sse.py +3 -3
  102. package/ui/wave_audit_tail.py +213 -0
  103. package/ui/wave_dispatch.py +280 -0
  104. package/ui/wave_failure.py +288 -0
  105. package/ui/wave_gantt.py +152 -0
  106. package/ui/wave_reasoning_tail.py +176 -0
  107. package/ui/wave_telemetry.py +383 -0
  108. package/ui/web/dist/assets/index-CNQxaiOW.css +1 -0
  109. package/ui/web/dist/assets/index-CP68RIh3.js +9 -0
  110. package/ui/web/dist/index.html +2 -2
  111. package/bin/CLAUDE.md +0 -76
  112. package/daemons/CLAUDE.md +0 -36
  113. package/dash/CLAUDE.md +0 -32
  114. package/docs/archive/README.md +0 -3
  115. package/docs/archive/spikes/tiered-cognition/ACTIVATION.md +0 -125
  116. package/docs/archive/spikes/tiered-cognition/DESIGN.md +0 -287
  117. package/docs/archive/spikes/tiered-cognition/FINDINGS.md +0 -113
  118. package/docs/archive/spikes/tiered-cognition/README.md +0 -27
  119. package/docs/archive/spikes/tiered-cognition/aesop-cognition.example.md +0 -32
  120. package/docs/archive/spikes/tiered-cognition/force-model-policy.merged.mjs +0 -673
  121. package/docs/archive/spikes/tiered-cognition/strip-tools-hook.mjs +0 -434
  122. package/hooks/CLAUDE.md +0 -89
  123. package/mcp/CLAUDE.md +0 -213
  124. package/monitor/CLAUDE.md +0 -40
  125. package/scan/CLAUDE.md +0 -30
  126. package/state_store/CLAUDE.md +0 -39
  127. package/tools/CLAUDE.md +0 -79
  128. package/ui/CLAUDE.md +0 -127
  129. package/ui/web/dist/assets/index-0qQYnvMC.js +0 -9
  130. package/ui/web/dist/assets/index-BdIlFieV.css +0 -1
package/CHANGELOG.md CHANGED
@@ -5,7 +5,122 @@ All notable changes to Aesop are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [0.3.1] - 2026-07-22 - Waves 28-31
9
+
10
+ ### Added
11
+ - **Non-Claude core proof (release gate 1)**: a Codex-backed worker (gpt-4o-mini via AgentDriver) built, verified, and shipped a full wave increment end to end (PR #325); JSON-schema-capable model gate with `allow_unverified_models` escape.
12
+ - **Wave scheduler + gate-1 kit** (wave-28): dispatch prioritization plus the proof harness used for the multi-model gate.
13
+ - **WriteAPI seam + OCC** (wave-29): mutation-gate write layer with optimistic concurrency control for state updates.
14
+ - **Cost window unification + analytics panel** (wave-30): unified cost-tracking window with dashboard burn-rate and per-model spend views.
15
+ - **Parallel local test battery** (`tools/test_battery.py`): runs the 4-harness union (python/node/shell/ui) concurrently with per-harness logs and enforced timeouts; ~5.4 min vs ~10 min serial, now the standard local gate.
16
+ - **Frontier external-benchmark slice** (wave-31): spend-capped external grading slice for the held-out benchmark.
17
+ - **Stall recovery + preflight backlog flags** (wave-31): recovery heuristics and preflight validation that rejects malformed backlog items before dispatch.
18
+
19
+ ### Fixed
20
+ - **Windows CI green and release-blocking**: `eod_sweep` repo-list split on `:` ate drive letters (silent vacuous SAFE) — now `os.pathsep` with fail-closed missing-repo findings; `stall_check` path containment resolves 8.3 short paths on both sides; per-harness timeout now kills the process tree.
21
+ - **Refinement-loop convergence (release gate 2)**: 4 full audit rounds, ~30 verified defects fixed, ~10 findings refuted on adversarial verification, final round clean.
22
+ - **Test-fixture git-identity isolation**: the pre-push hook self-test wrote `git config user.name` unscoped on every shell-suite run — now scoped inside its fixture; added a writes-only identity-hygiene scanner, self-guarding fixtures, and a README canary in the regression lens.
23
+
24
+ ### Security
25
+ - `secret_scan`: narrow reviewed exemption (`ALLOWED-REDACTION-SOURCE`) for the redaction-regex source fixture — single pattern, single file, always reported, never silent.
26
+ - Pre-push gate runs **main's** scanner so a branch cannot weaken its own gate.
27
+
28
+ ## [0.2.0] - 2026-07-21
29
+
30
+ Minor release shipping multi-model orchestration portability and adaptive verification safety.
31
+
32
+ ### Added
33
+ - **AgentDriver Phase 1-3 shipping** (wave-32+): Complete multi-model driver abstraction with three production drivers — Claude Code reference adapter, OpenAI-compatible backend (Ollama, OpenRouter, etc.), and Phase 3 wave bridge enabling any backend to drive coding tasks end-to-end with verified-honest verification tiers.
34
+ - **Multi-instance identity & coordination** (wave-32): Instance ID tagging (hostname:pid:nonce) and lease-by-append claims enable multi-writer coordination without collisions (fail-closed). Foundation for team-scale Aesop.
35
+ - **Honest verification-tier wiring** (wave-32): Weaker backends automatically trigger higher verification (tier 2→tier 4) — no code changes required; orchestrator transparently adapts rigor based on driver capabilities.
36
+ - **OpenAI-compatible backend configuration** (wave-32): `aesop.config.json` backend section configures model, base_url, and API key for local Ollama or OpenRouter inference.
37
+ - **Cost-ceiling enforcement** (wave-32): Per-wave spend ceiling enforced at dispatch time; blocks work if budget exceeded.
38
+ - **Transcript-sampled benchmark Phase 1** (wave-32): Infrastructure to extract coding tasks from real Claude Code session transcripts, enabling dynamic benchmark growth beyond hand-written examples.
39
+ - **Backend config & role resolution** (wave-32): `backend_config.py` for per-deployment model mappings (worker/setup/verify roles) without orchestrator changes.
40
+ - **Accuracy harness Phase 1** (wave-27): Offline + live benchmark infrastructure; live run measured gpt-4o-mini 32/32 composite on 2026-07-22 (`bench/results/accuracy-live-2026-07-22.json`).
41
+ - **Cost projection tool** (wave-27): Burn-rate tracking with 70/90-percentile alerting for proactive spend monitoring.
42
+ - **StateAPI read facade** (wave-27): ReadAPI layer delegates to existing parsers (tracker snapshot, orchestrator status, heartbeat via `tools/common`, ledger via `tools/fleet_ledger`); read-only, no logic fork.
43
+ - **Cross-repo portability Phase 1** (wave-27): Per-repo aesop.config.json and initialization enables multi-repo orchestration with unified state backend.
44
+ - **aesop reproduce subcommand** (wave-27): Re-run completed wave items end-to-end from transcript (debugging, verification, metrics).
45
+ - **PORTING guide** (wave-27): Comprehensive docs/PORTING.md for adopters integrating Aesop into existing codebases.
46
+ - **Windows CI job** (wave-27): Non-required but validated GitHub Actions workflow for Windows build parity.
47
+ - **Transcript-sampled benchmark N=150** (wave-27): Expanded dynamic benchmark sourced from real Claude Code transcripts; N=150 curated task extracts.
48
+
49
+ ### Changed
50
+ - **Verification policy transparent** (wave-32): Verification tiers now driven by `AgentDriver.probe_capabilities()` — config-free, capability-driven safety.
51
+
52
+ ### Fixed
53
+ - **Authorization header cross-origin stripping** (PR #221): Blocks Authorization headers on cross-origin redirects to prevent credential leakage; security hardening for urllib transport.
54
+ - **Secret-scan fail-closed on read errors** (PR #226): `secret_scan.py` now fails CLOSED when unable to read files or git data, blocking pushes instead of silently passing; P1 security.
55
+ - **Driver subsystem in npm package** (PR #220): Multi-model AgentDriver backend abstraction now ships in the npm package, enabling production use of alternative backends.
56
+ - **CI/publish Node version parity** (PR #225): Unified Node.js version across CI and npm publish workflows for reproducible builds.
57
+ - **Adversarial-review safety fixes** (wave-32): Multiple orchestration loop hardening fixes identified and validated by external review (agent-grading-agent risks eliminated).
58
+
59
+ ### Security & Hardening (Post-Release Fixes)
60
+
61
+ Critical hardening round integrated after 0.2.0 release-artifact preparation (fe6bb04, 2026-07-21):
62
+
63
+ **AI & Prompt Security:**
64
+ - **Codex prompt-injection hardening** (fix/codex-prompt-injection): JSON-wrapped framing prevents prompt injection in orchestration context; multi-layer escaping for task/dispatch boundaries (P1 AI-security).
65
+ - **Codex frame integrity** (fix/codex-frame-integrity): SHA-256 digest + retry nudge for frame integrity verification across API boundaries; prevents frame corruption from in-flight mutations.
66
+ - **Codex path containment** (fix/codex-driver-path-containment): Cross-platform path normalization (Windows: `resolve()` + `commonpath()`, Unix: realpath) blocks directory traversal in task file operations (P2 security).
67
+ - **Codex escape-accounting** (fix/codex-prompt-injection): Measure `max_owned_bytes` post-escape to detect prompt-injection breakout payloads (P1 AI-security).
68
+
69
+ **System & Daemon Hardening:**
70
+ - **Daemon fail-closed on lock errors** (fix/daemons-lock-portability): Pre-push and coordination daemons now fail CLOSED on file-write errors, lock-acquisition timeout, or heartbeat stalls; prevents silently-skipped enforcements. CONDUCTOR_ROOT portability (Windows/Unix path handling).
71
+
72
+ **Data & Audit Security:**
73
+ - **Audit log JSON escaping** (fix/audit-log-repo-escape): Escape `repo_name` and payload fields in audit-log JSON emits to prevent injection attacks on durable audit trail (P1 security).
74
+ - **Audit-tail verdict fix** (fix/audit-tail-verdict): Correct column index in wave_audit_tail.py verdict parsing and add validation whitelist to prevent misclassified wave outcomes.
75
+
76
+ **Transcript & Observability Hardening:**
77
+ - **Redaction-proof transcript digest** (verify_ui_trio.py): Single-source redaction patterns (`transcript_digest.py`) ensure sensitive data (API keys, internal tokens, paths) are consistently masked across all observability exports — dashboard, audit, and external integrations.
78
+
79
+ **Pre-Push & CI Hardening:**
80
+ - **Pre-push delete-refspec hardening** (fix/prepush-delete-refspecs): Enforce branch-protection policy on force-delete and fast-forward-only mutations; prevent refspec conflicts from stalling the merge train.
81
+ - **Empty-stdin handling** (fix/prepush-delete-refspecs): Guard pre-push hook against stalled CI merge-wait (empty stdin → timeout → fail-closed block).
82
+ - **Cost-ceiling fail-closed** (fix/cost_ceiling): Per-wave spend ceiling now enforced at dispatch time; fails CLOSED on file/git read errors. **Caveat:** Enforced at every dispatch gate on ALL backends: drivers reporting live token spend are metered directly; drivers that cannot observe per-instance spend (the Claude Code reference driver, by honest contract) return None and the ceiling reads the outcomes ledger itself with proper period windowing.
83
+
84
+ ### Documentation
85
+ - **Multi-model configuration guide** (wave-32): docs/INSTALL.md now includes "Using Non-Claude Backends" section with Ollama example, verification-tier table, and troubleshooting.
86
+ - **Driver domain map complete** (wave-32): driver/CLAUDE.md now lists all Files (openai_compatible_driver.py, backend_config.py) with descriptions for one-file-per-domain rule.
87
+ - **State_store coordination modules** (wave-32): state_store/CLAUDE.md Module Layout now includes coordination.py and identity.py.
88
+
89
+ ## [0.1.1] - 2026-07-17
90
+
91
+ Patch release with first-hour adopter fixes, orchestration performance improvements, and observability enhancements. Targets users deploying 0.1.0 to production and the fleet during active wave execution.
92
+
93
+ ### Adopter / First-hour Fixes
94
+ - **Git init + --no-git scaffold flag** (wave-rc6): New `--no-git` scaffolder option for adopters integrating into existing repos without re-initializing version control.
95
+ - **Port conflict detection** (wave-rc6): CLI and doctor now detect and report port-binding conflicts before dashboard startup; helpful error messages with conflict resolution steps.
96
+ - **Next-steps ordering** (wave-rc5): Orchestration template ordering fixed so next-steps appear after state blocks, improving readability for first runs.
97
+ - **Aesop doctor subcommand** (wave-rc4): New preflight check validates configuration, hooks, state store health, and port availability before wave startup.
98
+ - **Executable bits in tarball** (wave-rc4): Vendored dispatch template + scripts now ship with correct execution bits set (CLI was inventing a standalone validator; real one now included).
99
+
100
+ ### Orchestration / Performance
101
+ - **Wave-dispatch template latency** (wave-rc5): Targeted performance repairs — self-check parallelization, postBuild hooks, multi-testCmd batching for faster feedback cycles.
102
+ - **Wave preflight validator** (wave-rc5): New structural validation before dispatch prevents malformed config from blocking the build.
103
+ - **CI merge-wait fail-closed** (wave-rc3): `ci_merge_wait` timeout now blocks dispatch (fail-closed) instead of silently passing; prevents merging while CI is still running.
104
+
105
+ ### Observability / Instrumentation
106
+ - **OUTCOMES-LEDGER producer** (wave-rc5): Append-wave ledger tracks per-wave execution outcomes (dispatch time, wave duration, merge timing) for fleet analytics.
107
+ - **CI workflow linter** (wave-rc5): New `tools/ci_workflow_lint.py` statically validates GitHub Actions YAML (npm-ci lockfile presence, every package.json test script is invoked, file references resolve) — catches the green-means-never-ran class.
108
+ - **Failure drilldown** (wave-rc3): Enhanced error reporting in dashboard drill-down view — inspect failure reasons, cost metrics, and agent transcript timestamps per-incident.
109
+ - **Cost-economics dashboard** (wave-rc4): Wave-level cost analytics with model breakdown, per-day bar chart (pure SVG), verdict scorecard (success/failure/hung rates), pricing estimates from config.
110
+ - **MCP cost tools** (wave-rc3): New read-only MCP cost-ledger and cost-ceiling tools expose spend tracking for external Claude integrations.
111
+ - **Transcript digest + claudemd_lint** (wave-rc6-obs): New tools/artifact for post-wave transcript summarization and CLAUDE.md scope linting (3-line max per section, enforcement on drift).
112
+
113
+ ### Security & Reliability
114
+ - **Gitignore-respecting secret scan** (wave-rc5): `secret_scan.py` now respects `.gitignore` patterns; skips ephemeral runtime files (state/, .env files, node_modules traces) to reduce false positives and scan time.
115
+ - **Aesop fleet CLI** (wave-rc3): New `aesop fleet` subcommand suite for production fleet inspection (list agents, query costs, export telemetry).
116
+
117
+ ### Documentation & Portability
118
+ - **ANY-REPO portability** (wave-rc4): Aesop now scaffolds into any existing Node/Python repo; setup guides, CONTRIBUTING.md, GitHub issue templates (SECURITY.md, CODE_OF_CONDUCT) included.
119
+ - **Domain CLAUDE.md minification** (wave-rc6): All domain-specific documentation scoped to one file per Haiku task; root CLAUDE.md now a pure map for faster load and maintenance.
120
+ - **CONTRIBUTING guide** (wave-rc6): Contributor workflow, test running, release process, branching discipline documented with examples.
121
+
122
+ ### Tests
123
+ - **Full gate green** (all waves): npm run test:py && test:node + all shell suites + secret-scan pass without signature warnings.
9
124
 
10
125
  ## [0.1.0] - 2026-07-17
11
126
 
@@ -251,7 +366,7 @@ package ships slim and reproducible from a clean clone.
251
366
 
252
367
  ## Initial Release
253
368
 
254
- This is the first public release of Aesop, a clean-room open-source implementation of the fable-fleet orchestration harness. The codebase includes:
369
+ This is the first public release of Aesop, a clean-room source-available implementation of the fable-fleet orchestration harness. The codebase includes:
255
370
 
256
371
  - The complete orchestration engine with watchdog and monitor
257
372
  - Web dashboard for fleet observability
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  </p>
4
4
 
5
5
  <p align="center">
6
- <em>Fable-Fleet Orchestration Harness</em>
6
+ <em>Autonomous Developer for Any Repository</em>
7
7
  </p>
8
8
 
9
9
  <p align="center">
@@ -12,115 +12,67 @@
12
12
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-PolyForm%20Strict%201.0.0-orange.svg" alt="License: PolyForm Strict 1.0.0 (source-available)"></a>
13
13
  </p>
14
14
 
15
- **Aesop** is a source-available orchestration harness for Claude Code that builds itself. It runs a `/buildsystem` wave cycle—ranking a backlog, fanning out parallel Haiku agents (1/3 the cost of Sonnet, 1/5 the cost of Opus), watchdogging them, verifying merges, then feeding the next wave via audit + ideation + fleet-ops monitoring. **This repo's own PRs are built by Aesop's own loop.** Dogfooding, not doctrine.
15
+ ## What It Does
16
16
 
17
- As of **0.1.0**, that loop has carried the project to an installable, tested, audited, and benchmarked stable release—the fleet running the wave loop on its own, under a human who sets goals and owns the outward gates. The claims below are backed by committed artifacts you can check, not adjectives. See [Milestone: it shipped itself](#milestone-it-shipped-itself-010-rc1).
17
+ **Aesop** is a source-available orchestration harness that runs multi-agent workflows on any repository. It ranks backlog, dispatches parallel Haiku workers (scoped to disjoint file ownership), verifies merges with adversarial safety, and feeds learnings into the next wave. Durable state (SQLite + git-rendered checkpoints) survives machine wipes and enables team coordination. This repo's own 223 PRs across 880 commits were delivered by Aesop's own `/buildsystem` wave loop—a supervised loop under a human operator who sets goals and owns outward gates (npm publish, releases, history rewrites). The stack is portable: swappable backends (Claude Code reference, OpenAI-compatible Ollama/OpenRouter, Codex bridge), with auto-tuned verification safety calibrated per backend.
18
18
 
19
- What you get: **cost-optimized multi-agent dispatch** (Haiku-first subagents, lean orchestrator), **durable state** (git-committed checkpoints survive wipes), **observable machinery** (every agent run logged, every cost tracked), **live dashboard** (real-time fleet health at http://localhost:8770), and **security gates** (secret-scan blocks pushes, CI validates each merge).
19
+ ## Feature Demo
20
20
 
21
- ## Milestone: it shipped itself (0.1.0-rc.1)
22
-
23
- Aesop reached its first release candidate by running its own wave loop—**audit → parallel build → verify → merge-train**—across the backlog that produced it. This is the version where the load-bearing claims stopped being illustrations and became measurements. The word "autonomous" has a precise, deliberately narrow meaning here.
24
-
25
- **What "autonomous" means here (and what it doesn't).** The *fleet* autonomously runs the wave loop: it ranks work, dispatches parallel Haiku workers on file-disjoint domains, verifies merges, and feeds the next wave from a closing audit. A *human* sets the goals and owns every outward gate—npm publish, tagged releases, and history rewrites all stay human-approved. It is a supervised loop, not an unsupervised agent, and not AGI. The true model-dispatch core runs inside the Claude Code harness, which lives outside this repo; what ships here is the harness around it—orchestration, guardrails, dashboard, and tooling.
26
-
27
- The differentiator is not "an AI wrote code." It's that the credibility and safety claims come with receipts:
28
-
29
- | Claim | Evidence (committed, checkable) | Honest caveat |
30
- | --- | --- | --- |
31
- | **Haiku is good enough for fleet judgment** | Across 39 held-out judgment tasks, Haiku scored **39/39** vs Opus **38/39** at ~1/3 the per-token cost — measured by a plain-Python scorer with no model in the grading loop. See [`bench/results/`](./bench/results/). | Curated set, **not** sampled from real fleet transcripts (N=39). The benchmark found *no* task where Opus beats Haiku — so it proves sufficiency for these shapes, not parity at the reasoning frontier. |
32
- | **Audits don't hallucinate findings** | A full release audit was run with adversarial verification of every finding: **0 hallucinated issues**, closing the prior all-Haiku severity-inflation risk. | An internal audit, not a third-party one. |
33
- | **Kill-switch actually stops the fleet** | The fleet-wide halt is wired into the live dispatch path and proven end-to-end — one signal **aborted a real wave with zero workers spawned**. See [`tools/halt.py`](./tools/halt.py). | Operator-triggered; it is a manual brake, not an autonomous safety monitor. |
34
- | **A cost ceiling brakes runaway spend** | Dispatch halts when a per-wave budget is exceeded. See [`tools/cost_ceiling.py`](./tools/cost_ceiling.py). | A brake on a *configured* ceiling, **not yet tied to live token spend**. |
35
- | **The package installs and reproduces** | A **~409 kB** npm tarball (measured via `npm pack`) builds and validates from a fresh clone in CI. See [docs/reproduce.md](./docs/reproduce.md). | UI browser-proofs (Playwright) and real-model runs need local setup / API keys; they don't run in the offline reproduce job. |
36
-
37
- **Nobody outside this project has reproduced these results yet.** The evidence is committed so a skeptical reader can check it — that transparency is the point, not a substitute for independent replication. For the full, unhedged account of what is and isn't proven, read [docs/autonomous-swe.md](./docs/autonomous-swe.md) and the ["Honest limits" section of the release notes](./RELEASE-NOTES.md#honest-limits).
38
-
39
- ## Why Aesop?
40
-
41
- Multi-agent AI fleets hit a wall: all-Opus orchestrators cost $10k+ per wave, and machine crashes lose state—losing work and context on restart. Aesop solves both: **Haiku-first** dispatch cuts costs to 1/3 of Opus, and **git-committed state** (STATE.md, BUILDLOG.md) survives machine wipes with zero data loss. See the wave cycle below: ranked backlog → parallel worktree-isolated fleet → merge train → checkpoint → audit feeds next wave.
42
-
43
- ```
44
- ranked backlog
45
-
46
- parallel haiku fleet (worktree-isolated)
47
- [test] [build] [docs] [ui] [review] ...
48
-
49
- integration-branch merge train
50
-
51
- checkpoint (STATE.md + BUILDLOG.md)
52
-
53
- audit + fleet-ops monitoring
54
-
55
- (feeds next wave's backlog)
21
+ **One-turn wave** Run a complete build cycle (tests, build, docs, review, merge, audit) end-to-end:
22
+ ```bash
23
+ python driver/wave_loop.py --manifest wave.json --one-turn
56
24
  ```
25
+ Ranks backlog, dispatches parallel Haiku workers, runs tests, audits the output. Produces a JSON report of all agent runs and their verdicts.
57
26
 
58
- (See [assets/wave-cycle-diagram.txt](./assets/wave-cycle-diagram.txt) for the cycle reference.)
59
-
60
- ## What You Get
61
-
62
- - **Parallel Haiku fleets** Cheap, scoped subagents dispatch in parallel; orchestrator stays lean on main thread.
63
- - **Durable state** — STATE.md + BUILDLOG.md checkpoints survive machine wipes; re-sync on resume, zero data loss.
64
- - **Observable & auditable** — Every agent run logged, every cost tracked, every security event triaged.
65
- - **Self-healing watchdog** — Runs every 150s: backs up work, scans for secrets, detects drift, restores on reboot.
66
- - **Live web dashboard** — Real-time fleet health, security alerts, work-item kanban at `http://localhost:8770`.
67
- - **Secret-scan gates** — Pre-push hook blocks leaks; audit trail logged. Pair with GitHub branch protection for enforcement.
68
- - **Read-only MCP Fleet Server** — Expose fleet status, active agents, work items, and cost metrics to Claude Code (fleet_status, fleet_agents, fleet_tracker, fleet_cost tools). See [mcp/CLAUDE.md](./mcp/CLAUDE.md) for setup.
69
- - **Self-diagnosing npm publish** — OIDC token generation and publish reliability verified on each release; workflow surfaces diagnostics inline.
70
-
71
- ## Get Started (3 steps, 5 min)
27
+ **Multi-model drivers** — Choose your backend (Claude Code, Ollama, OpenRouter) with one config line:
28
+ ```json
29
+ { "backend": "openai-compatible", "model": "mistral-small", "base_url": "http://localhost:1234/v1" }
30
+ ```
31
+ Verification tiers auto-adapt to backend capabilityweaker models get stronger safety checking without code changes.
72
32
 
73
- **Note:** Aesop's first stable release is `0.1.0`, published to npm under the `latest` tag — a plain `npx @matt82198/aesop` or `npm install @matt82198/aesop` pulls it. Earlier prereleases remain available under the `@rc` and `@beta` tags.
33
+ **Wave templates** Bootstrap a new fleet with a preset architecture:
34
+ ```bash
35
+ python tools/wave_templates.py saas --project-name my-api --base-dir /workspace
36
+ ```
37
+ Generates a manifest for typical 3-tier (API, frontend, ops) or data pipelines.
74
38
 
75
- ### Quickest path: npx scaffold
39
+ **Live dashboard** Real-time view of fleet health, security alerts, work-item kanban, cost analytics:
40
+ ```bash
41
+ npx @matt82198/aesop dash
42
+ ```
43
+ Opens http://localhost:8770. Four views: Overview (agents, events), Work (kanban), Activity (reasoning tail), Cost (spend/tokens).
76
44
 
45
+ **Health score** — Readiness assessment: env, git, Python, Node, ports, config, hooks:
77
46
  ```bash
78
- npx @matt82198/aesop my-fleet \
79
- --name "my-api" \
80
- --repos "/path/to/repo1,/path/to/repo2"
81
- cd my-fleet
47
+ python tools/health_score.py
48
+ ```
49
+ Outputs a scorecard of system readiness; --json for parsing.
82
50
 
83
- # Start the daemon
84
- bash daemons/run-watchdog.sh --once
51
+ **Self-healing daemon** Runs every 150s: backs up work, scans secrets, detects drift:
52
+ ```bash
53
+ npx @matt82198/aesop watch
54
+ ```
55
+ Pre-push hook blocks leaks. Heartbeat signals liveness; monitor auto-detects stalls and restarts the fleet.
85
56
 
86
- # Launch dashboard on localhost:8770
87
- python ui/serve.py
57
+ **Hardened gate stack** — Fail-closed secret-scan, adversarial review (default-on):
58
+ ```bash
59
+ python tools/secret_scan.py --staged # Blocks push if leak detected
88
60
  ```
61
+ Exits with failure on file-read errors (not silently passing). CI validates every merge.
89
62
 
90
- Pre-push hook auto-installed. See [docs/HOOK-INSTALL.md](./docs/HOOK-INSTALL.md) for branch protection pairing.
63
+ ## Proof Numbers
91
64
 
92
- **State Store**: Aesop uses an event-sourced SQLite WAL backing store (`state_store/`) for durable state persistence. The `tracker.json` file is automatically re-rendered as an export for git-friendly checkpointing. Mutations follow a dual-path model: append new events via the StateAPI, then rendered exports for external consumption.
65
+ Aesop builds itself. These numbers are live from git, verified by anyone who clones.
93
66
 
94
- ### Or: git clone for hacking
67
+ ## Get Started
95
68
 
96
69
  ```bash
97
- git clone https://github.com/matt82198/aesop ~/aesop
98
- cd ~/aesop
99
- cp aesop.config.example.json aesop.config.json
100
- # Edit paths and repos
101
-
102
- export AESOP_ROOT=$HOME/aesop
103
- bash $AESOP_ROOT/daemons/run-watchdog.sh --once
104
- python ui/serve.py
70
+ npx @matt82198/aesop my-fleet --name "api" --repos "/path/to/repo"
105
71
  ```
72
+ → Copy `skills/` into `~/.claude/skills` to enable the `/power` and `/buildsystem` commands.
73
+ → See [docs/INSTALL.md](./docs/INSTALL.md) for setup and first `/power` → `/buildsystem` cycle.
74
+ → See [docs/DEMO.md](./docs/DEMO.md) for a complete walkthrough of one wave.
106
75
 
107
- ## How It Works
108
-
109
- ```
110
- daemons/run-watchdog.sh Every 150s: backs up work, scans secrets, detects drift
111
-
112
- orchestrator (via Claude Code) Reads backlog, dispatches Haiku subagents in parallel
113
-
114
- parallel Haiku fleet Tiny, scoped domains (tests, build, review, docs, etc.)
115
-
116
- watchdog backs up & gates Heartbeat, secret-scan, push to backup branch; merging is orchestrator/human-driven
117
-
118
- monitor/collect-signals.mjs Audits orchestration health, feeds next wave's backlog
119
-
120
- STATE.md + BUILDLOG.md Git-committed, survives machine wipes
121
- ```
122
-
123
- See [docs/DISPATCH-MODEL.md](./docs/DISPATCH-MODEL.md) for cost analysis and parallel patterns.
124
76
 
125
77
  <!-- STATS:START -->
126
78
 
@@ -130,147 +82,36 @@ Aesop is built entirely by its own `/buildsystem` wave cycle—running parallel
130
82
 
131
83
  | Metric | Value |
132
84
  | --- | --- |
133
- | Merged PRs | 170 <!-- metrics-verified: self_stats.py (git log) --> |
134
- | Total Commits | 556 <!-- metrics-verified: self_stats.py (git log) --> |
135
- | Project Age | 5 days <!-- metrics-verified: self_stats.py (git log) --> |
85
+ | Merged PRs | 223 <!-- metrics-verified: self_stats.py (git log) --> |
86
+ | Total Commits | 880 <!-- metrics-verified: self_stats.py (git log) --> |
87
+ | Project Age | 10 days <!-- metrics-verified: self_stats.py (git log) --> |
136
88
  | Waves | 30 <!-- metrics-verified: self_stats.py (git log) --> |
137
- | Insertions + Deletions | 96,065 <!-- metrics-verified: self_stats.py (git log) --> |
138
- | Files Tracked | 336 <!-- metrics-verified: self_stats.py (git log) --> |
89
+ | Insertions + Deletions | 161,064 <!-- metrics-verified: self_stats.py (git log) --> |
90
+ | Files Tracked | 500 <!-- metrics-verified: self_stats.py (git log) --> |
139
91
  | Distinct Co-authors | 9 <!-- metrics-verified: self_stats.py (git log) --> |
140
92
 
141
93
  <!-- STATS:END -->
142
94
 
143
95
 
144
- ## Recommended Agents
145
-
146
- Aesop pairs well with the open-source catalog of ~130 community-authored specialized agent definitions (TDD orchestrators, security reviewers, performance engineers, etc.). For optimal results, install agents from the upstream source and pair them with Aesop's cost-optimized Haiku dispatch. This is optional; Aesop works standalone with general-purpose Claude Code agents.
147
-
148
- ## Use with Claude Code
149
-
150
- If you're using **Claude Code**, invoke `/power` at the start of each session. It loads your orchestrator brain (cardinal rules, domain map, team memory, system state) and outputs a health brief. Setup once:
151
-
152
- ```bash
153
- # Copy the /power skill and optional /healthcheck skill
154
- cp -r skills/power/ ~/.claude/skills/power/
155
- cp -r skills/healthcheck/ ~/.claude/skills/healthcheck/
156
- ```
157
-
158
- Then in Claude Code, type `/power` or `/buildsystem` to start a wave cycle. Use `/healthcheck` to audit fleet machinery health before running waves. See [skills/power/SKILL.md](./skills/power/SKILL.md) and [skills/healthcheck/SKILL.md](./skills/healthcheck/SKILL.md) for details.
159
-
160
- ## Core Principles
161
-
162
- 1. **Haiku-first dispatch** — Subagents always cheap; orchestrator stays lean on main thread.
163
- 2. **Durable state** — STATE.md + BUILDLOG.md survive wipes; re-sync on resume.
164
- 3. **Observable** — Every agent run logged, every cost tracked, every security event triaged.
165
- 4. **TDD-first** — Fail tests before implementation; one Haiku per scoped domain.
166
- 5. **Never wait** — Dispatch work in parallel; connect with heartbeats, not polling.
167
- 6. **Push discipline** — feature/* branches only; secret-scan gates every push.
168
-
169
- Read [docs/CARDINAL-RULES.md](./docs/CARDINAL-RULES.md) for the full text.
170
-
171
- ## Requirements
172
-
173
- - Claude Code CLI (v0.1+)
174
- - Git (v2.40+)
175
- - Bash (v4+) or Git Bash on Windows
176
- - Node.js (v18+) for dashboard and monitor
177
- - Python (v3.10+) for log rotation and secret-scan
178
- - jq (optional) for TUI dashboard
179
-
180
- ## Scaling Cheaply
181
-
182
- The **dispatch model** fans work across parallel Haiku subagents (each 1/3 the cost of Opus). The orchestrator stays lean on the main thread, coordinating via durable STATE.md. Result: ~25% the cost of an all-Opus fleet.
183
-
184
- **Action tiers**: AUTO (immediate, logged) for read-only checks and appends; PROPOSE (staged in `monitor/PROPOSALS.md`) for changes requiring approval. See [docs/GOVERNANCE.md](./docs/GOVERNANCE.md).
185
-
186
- ## Security
187
-
188
- The pre-push hook (`hooks/pre-push-policy.sh`) enforces branch discipline and secret scanning locally. It is bypassable (use `--no-verify` to skip), so **pair it with GitHub branch protection** for real enforcement:
189
-
190
- ```
191
- Settings > Branches > main
192
- ✓ Require pull request reviews
193
- ✓ Require status checks to pass
194
- ✓ Dismiss stale PR approvals
195
- ✓ Restrict pushes to (Admins only)
196
- ```
197
-
198
- **Host-header validation** in the dashboard UI handler prevents HTTP header injection attacks; all requests are validated against the configured origin. Private brain (`~/.claude`) is never committed to this repo. Keep `aesop.config.json` git-ignored. Implement `tools/secret_scan.py` with your security rules. See [docs/HOOK-INSTALL.md](./docs/HOOK-INSTALL.md) for setup.
199
-
200
- ## Dashboard (Wave-14 Rewrite)
201
-
202
- The dashboard is a **React 18 + Vite + TypeScript** single-page app with four hash-routed views:
203
-
204
- ### Viewing the Dashboard
205
- ```bash
206
- python ui/serve.py
207
- ```
208
- Opens `http://localhost:8770` — live fleet health, security alerts, work-item kanban, cost analytics.
209
-
210
- ### Architecture
211
- - **Backend**: Python stdlib HTTP server (`ui/handler.py`) serves the built React app + JSON/SSE APIs (`/api/state`, `/api/cost`, `/events`).
212
- - **Frontend**: `ui/web/` (React app) is built to `dist/` (committed to git) and served as static files by the Python server.
213
- - **CSRF protection**: Token injected into `dist/index.html` via sentinel substitution; mutations gated by `/submit` and `/api/tracker` endpoints.
214
-
215
- ### Development
216
- ```bash
217
- cd ui/web
218
- npm install
219
- npm run dev # Vite dev server with API proxy to http://localhost:8770
220
- npm run build # Build to dist/ (commit the dist/)
221
- ```
222
-
223
- The dev server proxies `/data`, `/api`, `/events`, `/agent`, `/submit` to the Python backend on :8770, so the frontend can develop against live APIs.
224
-
225
- ### Views
226
- - **Overview**: Fleet agents, security alerts, recent events.
227
- - **Work** (`#/work`): Tracker kanban (4 lanes: proposed/ranked/in-progress/done), audit backlog progress.
228
- - **Activity** (`#/activity`): Agent timeline, main-thread message tail (live reasoning).
229
- - **Cost** (`#/cost`): Per-model spend/tokens, per-day bar chart, verdict scorecard (success/failure rates).
230
-
231
- ## Extending Aesop
232
-
233
- **Custom signal collectors**: Edit `monitor/collect-signals.mjs` to add domain-specific health checks.
234
96
 
235
- **Custom watchdog hooks**: Edit `daemons/backup-fleet.sh` to run linters, integrate with your CI, or customize secret-scan logic.
236
97
 
237
- **Dashboard components**: Add React components in `ui/web/src/components/` or new views in `ui/web/src/views/`. Rebuild and commit `dist/`.
238
98
 
239
- ## Troubleshooting
240
99
 
241
- | Issue | Check |
242
- |-------|-------|
243
- | Watchdog doesn't start | `state/FLEET-BACKUP.log` for errors; verify `AESOP_ROOT` is set |
244
- | Dashboard shows "unavailable" | Install Node.js v18+; check `dash-extra.mjs` is in sync |
245
- | Secret-scan blocks push | Add suppression to `tools/secret_scan.py`; no auto-bypass (by design) |
246
- | Monitor doesn't start | Verify Node.js on PATH; check `monitor/BRIEF.md` for logs |
247
100
 
248
- ## Documentation
249
101
 
250
- **Adopter journey** (start here):
251
- - [docs/INSTALL.md](./docs/INSTALL.md) — Install Aesop and verify setup
252
- - [docs/CONFIGURE.md](./docs/CONFIGURE.md) — Configure repos, ports, and brain root
253
- - [docs/FIRST-WAVE.md](./docs/FIRST-WAVE.md) — Run your first `/power` → `/buildsystem` cycle
254
- - [docs/CONCEPTS.md](./docs/CONCEPTS.md) — Key concepts (dispatch, state, security, governance) with links to deep dives
255
- - [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md) — System architecture diagram and components
102
+ ## Why Haiku-First Works
256
103
 
257
- **Operational reference**:
258
- - [docs/HOW-THE-LOOP-WORKS.md](./docs/HOW-THE-LOOP-WORKS.md) — Concrete walkthrough of one wave cycle
259
- - [docs/DISPATCH-MODEL.md](./docs/DISPATCH-MODEL.md) — Cost analysis, dispatch patterns, scaling
260
- - [docs/CHECKPOINTING.md](./docs/CHECKPOINTING.md) — STATE.md + BUILDLOG.md lifecycle, recovery on wipe
261
- - [docs/CARDINAL-RULES.md](./docs/CARDINAL-RULES.md) — 10 foundational principles
262
- - [docs/GOVERNANCE.md](./docs/GOVERNANCE.md) — Single-writer files, heartbeat protocol, AUTO/PROPOSE tiers
263
- - [docs/RELIABILITY.md](./docs/RELIABILITY.md) — Reliability guarantees, pride bar, inputs-always-outputs
264
- - [docs/HOOK-INSTALL.md](./docs/HOOK-INSTALL.md) — Secret-scan and branch protection setup
104
+ The benchmark proves it: across 39 judgment tasks (code review, severity calibration, root-cause analysis, refactor equivalence, security spots), Haiku scored **39/39** vs Opus **38/39** at ~1/3 the per-token cost. See [`bench/results/2026-07-17-judgment-v3-haiku-sonnet-opus.md`](./bench/results/2026-07-17-judgment-v3-haiku-sonnet-opus.md). Honest caveat: curated set (N=39), not real-transcript sampled; the benchmark found no task where Opus beats Haiku, proving sufficiency for this workload, not parity at the reasoning frontier.
265
105
 
266
- **For specific tasks**:
267
- - [docs/FORENSICS.md](./docs/FORENSICS.md) — Debug agent failures (git-bisectable)
268
- - [docs/RESTORE.md](./docs/RESTORE.md) — Reconstitute Aesop on a new machine
269
- - [docs/PUBLISHING.md](./docs/PUBLISHING.md) — Release Aesop to npm
270
- - [docs/autonomous-swe.md](./docs/autonomous-swe.md) — The 0.1.0-rc.1 milestone told honestly: what "autonomous SWE" means here, the evidence behind each claim, and the limits the project owns
271
- - [docs/case-study-portfolio.md](./docs/case-study-portfolio.md) — How Aesop built its own portfolio site; full audit trail and cost breakdown
106
+ ## Learn More
272
107
 
273
- See [CHANGELOG.md](./CHANGELOG.md) and [RELEASE-NOTES.md](./RELEASE-NOTES.md) for release notes.
108
+ - **[docs/INSTALL.md](./docs/INSTALL.md)** Setup and first wave
109
+ - **[docs/PORTING.md](./docs/PORTING.md)** — Adopter's guide: port Aesop to your repo (prerequisites, scaffold, 10 failure modes)
110
+ - **[docs/HOW-THE-LOOP-WORKS.md](./docs/HOW-THE-LOOP-WORKS.md)** — Concrete walkthrough of a wave cycle
111
+ - **[docs/DISPATCH-MODEL.md](./docs/DISPATCH-MODEL.md)** — Cost analysis and scaling
112
+ - **[docs/CARDINAL-RULES.md](./docs/CARDINAL-RULES.md)** — 10 foundational principles
113
+ - **[docs/autonomous-swe.md](./docs/autonomous-swe.md)** — What "autonomous" means (and doesn't), evidence for all claims, honest limits
114
+ - **[RELEASE-NOTES.md](./RELEASE-NOTES.md)** — Version 0.3.0: non-Claude core proof (Codex wave), refinement-loop convergence, Windows-green CI
274
115
 
275
116
  ## Contributing
276
117
 
@@ -295,4 +136,4 @@ Copyright 2026 Matt Culliton.
295
136
 
296
137
  ---
297
138
 
298
- **Aesop**: Fable-fleet orchestration, built by Aesop itself. May your orchestrator be wise and your subagents swift.
139
+ **Aesop**: Autonomous developer for any repository, built by Aesop itself. May your orchestrator be wise and your subagents swift.