compound-agent 1.7.4 → 1.8.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 +50 -0
- package/README.md +213 -60
- package/dist/cli.js +637 -84
- package/dist/cli.js.map +1 -1
- package/dist/index.js +26 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,56 @@ All notable changes to this project will be documented in this file.
|
|
|
7
7
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
8
8
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
9
9
|
|
|
10
|
+
## [1.8.0] - 2026-03-15
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`ca improve` command**: Generates a bash script that autonomously improves the codebase using `improve/*.md` program files. Each program defines what to improve, how to find work, and how to validate changes. Options: `--topics` (filter specific topics), `--max-iters` (iterations per topic, default 5), `--time-budget` (total seconds, 0=unlimited), `--model`, `--force`, `--dry-run`. Includes `ca improve init` subcommand to scaffold an example program file.
|
|
15
|
+
- **`ca watch` command**: Tails and pretty-prints live trace JSONL from infinity loop and improvement loop sessions. Supports `--epic <id>` to watch a specific epic, `--improve` to watch improvement loop traces, and `--no-follow` to print existing trace and exit. Formats tool calls, thinking blocks, token usage, and result markers into a compact, color-coded stream.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **`git clean` scoping in improvement loop**: Bare `git clean -fd` on rollback was removing all untracked files including the script's own log directory, causing crashes. All three rollback paths now use `git clean -fd -e "$LOG_DIR/"` to exclude agent logs.
|
|
20
|
+
- **Embedded dirty-worktree guard fallthrough**: In embedded mode (when improvement loop runs inside `ca loop --improve`), setting `IMPROVE_RESULT=1` on a dirty worktree did not prevent the loop body from executing. Restructured to use `if/else` so the loop body only runs inside the `else` branch.
|
|
21
|
+
- **`ca watch --improve` ignoring `.latest` symlink**: The `--improve` code path had inline logic that only did reverse filename sort, bypassing the `.latest` symlink that the improvement loop maintains. Refactored `findLatestTraceFile()` with a `prefix` parameter to unify both code paths.
|
|
22
|
+
- **`--topics` flag ignored in `get_topics()`**: The `TOPIC_FILTER` variable from the CLI `--topics` flag was not used in the generated bash `get_topics()` function, causing all topics to run regardless of filtering.
|
|
23
|
+
- **Update-check hardening**: Switched to a lightweight npm registry endpoint, added CI environment guards, and corrected the update command shown to users.
|
|
24
|
+
|
|
25
|
+
## [1.7.6] - 2026-03-12
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- **`ca install-beads` command**: Standalone subcommand to install the beads CLI via the official script. Includes a platform guard (skips on Windows with `exitCode 1`), an "already installed" short-circuit, a `--yes` flag to bypass the confirmation hint (safe: never runs `curl | bash` without explicit opt-in), `spawnSync` with a 60-second timeout, and a post-install shell-reload warning. Non-TTY mode without `--yes` prints the install command as a copy-pasteable hint rather than silently doing nothing.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- **Beads hint display**: `printBeadsFullStatus` was silently swallowing the install hint message when the beads CLI was not found. The curl install command is now printed below the "not found" line.
|
|
34
|
+
- **Beads hint text**: `checkBeadsAvailable` now returns the actual `curl -sSL ... | bash` install command in its message instead of a bare repo URL.
|
|
35
|
+
- **Doctor fix message**: `ca doctor` now shows `Run: ca install-beads` for the missing-beads check instead of pointing to a URL.
|
|
36
|
+
- **`ca knowledge` description**: Reframed from "Ask the project docs any question" to "Semantic search over project docs — use keyword phrases, not questions" in both the live prime template and the setup template, reflecting the underlying embedding RAG retrieval mechanism.
|
|
37
|
+
|
|
38
|
+
## [1.7.5] - 2026-03-12
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- **`ca feedback` command**: Surfaces the GitHub Discussions URL for bug reports and feature requests. `ca feedback --open` opens the page directly in the browser. Cross-platform (macOS `open`, Windows `start`, Linux `xdg-open`).
|
|
43
|
+
- **Star and feedback prompt in `ca about`**: TTY sessions now see a star-us link and the GitHub Discussions URL after the changelog output.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- **README overhaul**: Complete rewrite to present compound-agent as a full agentic development environment rather than a memory plugin.
|
|
48
|
+
- New thesis-driven one-liner that names category, mechanism, and benefit
|
|
49
|
+
- "What gets installed" inventory table (15 commands, 24 agent role skills, 7 hooks, 5 phase skills, 5 docs)
|
|
50
|
+
- Three principles section mapping each architecture layer to the problem it solves (Memory / Feedback Loops / Navigable Structure)
|
|
51
|
+
- "Agents are interchangeable" design principle explained in the overview
|
|
52
|
+
- Levels of use replacing flat Quick Start: memory-only, structured workflow, and factory mode with code examples
|
|
53
|
+
- `/compound:architect` promoted to its own section with 4-phase description and context-window motivation
|
|
54
|
+
- Infinity loop elevated from CLI table row to its own section with full flag examples and honest maturity note
|
|
55
|
+
- Automatic hooks table with per-hook descriptions
|
|
56
|
+
- Architecture diagram updated to reflect three-principle mapping and accurate counts
|
|
57
|
+
- Compound loop diagram updated with architect as optional upstream entry point
|
|
58
|
+
- "Open with an AI agent" entry point in the Documentation section
|
|
59
|
+
|
|
10
60
|
## [1.7.4] - 2026-03-11
|
|
11
61
|
|
|
12
62
|
### Added
|
package/README.md
CHANGED
|
@@ -1,51 +1,79 @@
|
|
|
1
1
|
# Compound Agent
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> compound-agent is a Claude Code plugin that ships a self-improving development factory into your repository — persistent memory, structured multi-agent workflows, and autonomous loop execution. Fully local. Everything in git.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/compound-agent)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://www.typescriptlang.org/)
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
- **Knowledge** -- hybrid vector search over your project docs
|
|
11
|
-
- **Structure** -- 5-phase workflows with 35+ specialized agents
|
|
12
|
-
- **Accountability** -- git-tracked issues, multi-agent reviews, quality gates
|
|
9
|
+
AI coding agents forget everything between sessions. Each session starts with whatever context was prepared for it — nothing more. Because agents carry no persistent state, that state must live in the codebase itself, and any agent that reads the same well-structured context should be able to pick up where another left off. Compound Agent implements this: it captures mistakes once, retrieves them precisely when relevant, and can hand entire systems to an autonomous loop that processes epic by epic with no human intervention.
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
## What gets installed
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
`npx ca setup` injects a complete development environment into your repository:
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
| Component | What ships |
|
|
16
|
+
|-----------|-----------|
|
|
17
|
+
| 15 slash commands | `/compound:architect`, `cook-it`, `spec-dev`, `plan`, `work`, `review`, `compound`, `learn-that`, `check-that`, and more |
|
|
18
|
+
| 24 agent role skills | Security reviewers, TDD pair, decomposition convoy, spec writers, test analysers, drift detectors, and more |
|
|
19
|
+
| 7 automatic hooks | Fire on session start, prompt submit, tool use, tool failure, pre-compact, phase guard, and session stop |
|
|
20
|
+
| 5 phase skill files | Full workflow instructions for `architect`, `spec-dev`, `cook-it`, `work`, and `review` |
|
|
21
|
+
| 5 deployed docs | Workflow reference, CLI reference, skills guide, integration guide, and overview |
|
|
22
|
+
|
|
23
|
+
This is not a memory plugin bolted onto a text editor. It is the environment your agents run inside.
|
|
24
|
+
|
|
25
|
+
## How it works
|
|
19
26
|
|
|
20
27
|
```mermaid
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
flowchart TD
|
|
29
|
+
A["/compound:architect\nDecompose large system\ninto epics via DDD"] -->|produces epics| L
|
|
30
|
+
|
|
31
|
+
subgraph L["Compound Loop — one cycle per epic"]
|
|
32
|
+
direction LR
|
|
33
|
+
S[SPEC-DEV] --> P[PLAN]
|
|
34
|
+
P --> W[WORK]
|
|
35
|
+
W --> R[REVIEW]
|
|
36
|
+
R --> C[COMPOUND]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
C -->|writes lessons| M[(MEMORY\nJSONL + SQLite\n+ embeddings)]
|
|
40
|
+
M -->|injects context| P
|
|
28
41
|
|
|
29
42
|
style M fill:#f9f,stroke:#333
|
|
43
|
+
style A fill:#e8f4fd,stroke:#4a9ede
|
|
30
44
|
```
|
|
31
45
|
|
|
46
|
+
Each cycle through the loop makes the next one smarter. The architect step is optional — use it for systems too large for a single feature cycle.
|
|
47
|
+
|
|
32
48
|
```mermaid
|
|
33
49
|
block-beta
|
|
34
50
|
columns 1
|
|
35
|
-
block:L3["Workflows"]
|
|
36
|
-
A["
|
|
51
|
+
block:L3["Workflows · Feedback Loops"]
|
|
52
|
+
A["15 slash commands"] B["24 specialized agents"] C["Autonomous loop"]
|
|
37
53
|
end
|
|
38
|
-
block:L2["Semantic Memory"]
|
|
39
|
-
D["Vector search"] E["Hybrid retrieval"] F["Cross-
|
|
54
|
+
block:L2["Semantic Memory · Codebase Memory"]
|
|
55
|
+
D["Vector search"] E["Hybrid retrieval"] F["Cross-session persistence"]
|
|
40
56
|
end
|
|
41
|
-
block:L1["Foundation"]
|
|
42
|
-
G["Issue tracking"] H["Git-backed sync"] I["
|
|
57
|
+
block:L1["Beads Foundation · Navigable Structure"]
|
|
58
|
+
G["Issue tracking"] H["Git-backed sync"] I["Dependency graphs"]
|
|
43
59
|
end
|
|
44
60
|
|
|
45
61
|
L3 --> L2
|
|
46
62
|
L2 --> L1
|
|
47
63
|
```
|
|
48
64
|
|
|
65
|
+
## Three principles
|
|
66
|
+
|
|
67
|
+
These constraints follow from how AI agents work, and each one maps to a layer of the architecture.
|
|
68
|
+
|
|
69
|
+
| Principle | Without it | Layer |
|
|
70
|
+
|-----------|-----------|-------|
|
|
71
|
+
| **Memory** | Same mistakes every session. Architectural decisions re-derived from scratch. Knowledge locked in human heads where agents cannot reach it. | Semantic Memory |
|
|
72
|
+
| **Feedback loops** | Agents cannot verify their own work. Manual review is the only quality gate. Drift is the default at agent-scale output. | Structured Workflows |
|
|
73
|
+
| **Navigable structure** | Context windows fill with orientation work. Agents make unverifiable assumptions about dependencies and ordering. | Beads Foundation |
|
|
74
|
+
|
|
75
|
+
The three are not independent. Memory without feedback loops is unreliable. Feedback without navigable structure fires blindly. The system works as a whole or not at all.
|
|
76
|
+
|
|
49
77
|
## Is this for you?
|
|
50
78
|
|
|
51
79
|
**"It keeps making the same mistake every session."**
|
|
@@ -54,20 +82,159 @@ Capture it once. Compound Agent surfaces it automatically before the agent repea
|
|
|
54
82
|
**"I explained our auth pattern three sessions ago. Now it's reimplementing from scratch."**
|
|
55
83
|
Architectural decisions persist as searchable lessons. Next session, they inject into context before planning starts.
|
|
56
84
|
|
|
57
|
-
**"My agent uses pandas when we
|
|
85
|
+
**"My agent uses pandas when we standardised on Polars months ago."**
|
|
58
86
|
Preferences survive across sessions and projects. Once captured, they appear at the right moment.
|
|
59
87
|
|
|
60
88
|
**"Code reviews keep catching the same class of bugs."**
|
|
61
|
-
|
|
89
|
+
24 specialised review agents (security, performance, architecture, test coverage) run in parallel. Findings feed back as lessons that become test requirements in future work.
|
|
62
90
|
|
|
63
91
|
**"I have no idea what my agent actually learned or if it's reliable."**
|
|
64
|
-
`ca list` shows all captured knowledge. `ca stats` shows health. `ca wrong <id>` invalidates bad lessons. Everything is git-tracked JSONL
|
|
92
|
+
`ca list` shows all captured knowledge. `ca stats` shows health. `ca wrong <id>` invalidates bad lessons. Everything is git-tracked JSONL — you can read, diff, and audit it.
|
|
65
93
|
|
|
66
94
|
**"I want structured phases, not just 'go build this'."**
|
|
67
95
|
Five workflow phases (spec-dev, plan, work, review, compound) with mandatory gates between them. Each phase searches memory and docs for relevant context before starting.
|
|
68
96
|
|
|
69
97
|
**"My agent doesn't read the project docs before making decisions."**
|
|
70
|
-
`ca knowledge "auth flow"` runs hybrid search (vector + keyword) over your indexed docs. Agents query it automatically during planning
|
|
98
|
+
`ca knowledge "auth flow"` runs hybrid search (vector + keyword) over your indexed docs. Agents query it automatically during planning — ADRs, specs, and standards surface before code gets written.
|
|
99
|
+
|
|
100
|
+
**"I want to hand a large system spec to the machine and walk away."**
|
|
101
|
+
`/compound:architect` decomposes it into epics. `ca loop` processes them autonomously.
|
|
102
|
+
|
|
103
|
+
## Levels of use
|
|
104
|
+
|
|
105
|
+
### Level 1 — Memory only
|
|
106
|
+
|
|
107
|
+
Two minutes to set up. Works in any session without changing your existing workflow.
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Capture a mistake or preference
|
|
111
|
+
ca learn "Always use Polars, not pandas in this project" --severity high
|
|
112
|
+
ca learn "Auth 401 fix: add X-Request-ID header" --type solution
|
|
113
|
+
|
|
114
|
+
# Search manually anytime
|
|
115
|
+
ca search "polars"
|
|
116
|
+
|
|
117
|
+
# Or let hooks surface it automatically — no command needed
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Level 2 — Structured workflow
|
|
121
|
+
|
|
122
|
+
One command runs all five phases on a single feature: spec-dev, plan, work (TDD + agent team), review (24 agents), and compound (capture lessons).
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
/compound:cook-it "Add rate limiting to the API"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Run phases individually when you want more control:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
/compound:spec-dev "Add rate limiting" # Socratic dialogue → EARS spec → Mermaid diagrams
|
|
132
|
+
/compound:plan # Tasks enriched by memory search
|
|
133
|
+
/compound:work # TDD with agent team
|
|
134
|
+
/compound:review # 24 parallel agents with severity gates
|
|
135
|
+
/compound:compound # Capture what was learned
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Level 3 — Factory mode
|
|
139
|
+
|
|
140
|
+
For systems too large for a single feature cycle. `/compound:architect` decomposes the system; `ca loop` processes the resulting epics autonomously.
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Step 1: decompose the system into epics
|
|
144
|
+
/compound:architect "Multi-tenant SaaS: auth, billing, API, admin dashboard"
|
|
145
|
+
# → Socratic dialogue → system-level EARS spec → DDD decomposition
|
|
146
|
+
# → N epics with dependency graph, interface contracts, and scope boundaries
|
|
147
|
+
|
|
148
|
+
# Step 2: generate and run the loop
|
|
149
|
+
ca loop --reviewers claude-sonnet --review-every 3
|
|
150
|
+
./infinity-loop.sh
|
|
151
|
+
# → Processes each epic in dependency order: spec-dev → plan → work → review → compound
|
|
152
|
+
# → Captures lessons after every cycle, improving subsequent cycles
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## The infinity loop
|
|
156
|
+
|
|
157
|
+
`ca loop` generates a bash script that processes your beads epics sequentially, running the full cook-it cycle on each one. No human intervention required between epics.
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Generate script for all ready epics
|
|
161
|
+
ca loop
|
|
162
|
+
|
|
163
|
+
# With periodic review every 3 epics
|
|
164
|
+
ca loop --reviewers claude-sonnet --review-every 3
|
|
165
|
+
|
|
166
|
+
# Target specific epics
|
|
167
|
+
ca loop --epics beads-abc beads-def beads-ghi --max-retries 2
|
|
168
|
+
|
|
169
|
+
# Run it
|
|
170
|
+
./infinity-loop.sh
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
The loop respects beads dependency graphs — it only processes epics whose dependencies are complete. If an epic fails after `--max-retries` attempts, it stops and reports before proceeding.
|
|
174
|
+
|
|
175
|
+
**Current maturity**: the loop works and has been used to ship real projects, including compound-agent itself. Two things still required human involvement: specifications had to be written before the loop started, and a human applied fixes after the first review pass surfaced real problems (missing error handling, a migration gap, insufficient test coverage). Fully unattended long-duration runs across many epics are the current area of hardening.
|
|
176
|
+
|
|
177
|
+
## The improvement loop
|
|
178
|
+
|
|
179
|
+
`ca improve` generates a bash script that iterates over `improve/*.md` program files, spawning Claude Code sessions to make focused improvements. Each program file defines what to improve, how to find work, and how to validate changes.
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
# Scaffold an example program file
|
|
183
|
+
ca improve init
|
|
184
|
+
# Creates improve/example.md with a linting template
|
|
185
|
+
|
|
186
|
+
# Generate the improvement script
|
|
187
|
+
ca improve
|
|
188
|
+
|
|
189
|
+
# Filter to specific topics
|
|
190
|
+
ca improve --topics lint tests --max-iters 3
|
|
191
|
+
|
|
192
|
+
# Preview without generating
|
|
193
|
+
ca improve --dry-run
|
|
194
|
+
|
|
195
|
+
# Run the generated script
|
|
196
|
+
./improvement-loop.sh
|
|
197
|
+
|
|
198
|
+
# Preview without executing Claude sessions
|
|
199
|
+
IMPROVE_DRY_RUN=1 ./improvement-loop.sh
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Each iteration makes one focused improvement, commits it, and moves on. If an iteration finds nothing to improve or fails validation, it reverts cleanly and moves to the next topic. The loop tracks consecutive no-improvement results and stops early to avoid diminishing returns.
|
|
203
|
+
|
|
204
|
+
Monitor progress with `ca watch --improve` to see live trace output from improvement sessions.
|
|
205
|
+
|
|
206
|
+
## Automatic hooks
|
|
207
|
+
|
|
208
|
+
Once installed, seven Claude Code hooks fire without any commands:
|
|
209
|
+
|
|
210
|
+
| Hook | When it fires | What it does |
|
|
211
|
+
|------|--------------|--------------|
|
|
212
|
+
| `SessionStart` | Every new session | Loads high-severity lessons into context before you type anything |
|
|
213
|
+
| `PreCompact` | Before context compression | Saves phase state so cook-it survives compaction |
|
|
214
|
+
| `UserPromptSubmit` | Every prompt | Injects relevant memory items into context |
|
|
215
|
+
| `PreToolUse` | During cook-it | Enforces phase gates — prevents jumping ahead |
|
|
216
|
+
| `PostToolUse` | After tool success | Clears failure tracking state |
|
|
217
|
+
| `PostToolUseFailure` | After tool failure | Tracks failures; suggests memory search after repeated errors |
|
|
218
|
+
| `Stop` | Session end | Audits session for uncaptured lessons and unclosed issues |
|
|
219
|
+
|
|
220
|
+
No configuration needed. `npx ca setup` wires them into your `.claude/settings.json`.
|
|
221
|
+
|
|
222
|
+
## `/compound:architect`
|
|
223
|
+
|
|
224
|
+
AI agents work best on well-scoped problems. When a task exceeds what fits comfortably in one context window, quality degrades — not from lack of capability but from too many competing concerns pulling in different directions.
|
|
225
|
+
|
|
226
|
+
`/compound:architect` addresses this before the cook-it cycle begins. It takes a large system description and produces cook-it-ready epics via a structured 4-phase process:
|
|
227
|
+
|
|
228
|
+
1. **Socratic** — builds a domain glossary and discovery mindmap; classifies decisions by reversibility
|
|
229
|
+
2. **Spec** — produces system-level EARS requirements, C4 architecture diagrams, and a scenario table
|
|
230
|
+
3. **Decompose** — runs 6 parallel subagents (bounded context mapping, dependency analysis, scope sizing, interface design, STPA hazard analysis, structural-semantic gap analysis) then synthesises into a proposed epic structure
|
|
231
|
+
4. **Materialise** — creates beads epics with scope boundaries, interface contracts, and wired dependencies
|
|
232
|
+
|
|
233
|
+
Three human approval gates separate the phases. Each output epic is sized for one cook-it cycle and includes an EARS subset for traceability back to the system spec.
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
/compound:architect "Build a data pipeline: ingestion, transformation, storage, and API layer"
|
|
237
|
+
```
|
|
71
238
|
|
|
72
239
|
## Installation
|
|
73
240
|
|
|
@@ -104,36 +271,6 @@ If you prefer to configure manually, add to your `package.json`:
|
|
|
104
271
|
|
|
105
272
|
Then run `pnpm install`.
|
|
106
273
|
|
|
107
|
-
## Quick Start
|
|
108
|
-
|
|
109
|
-
The five-phase workflow:
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
1. /compound:spec-dev --> Develop precise specifications
|
|
113
|
-
2. /compound:plan --> Create tasks enriched by memory search
|
|
114
|
-
3. /compound:work --> Execute with agent teams + TDD
|
|
115
|
-
4. /compound:review --> Multi-agent review with inter-communication
|
|
116
|
-
5. /compound:compound --> Capture what was learned into memory
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Or run all phases sequentially:
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
/compound:cook-it "Add auth to API"
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
Additional commands:
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
/compound:learn-that --> Capture a lesson from conversation context
|
|
129
|
-
/compound:check-that --> Search lessons and apply to current work
|
|
130
|
-
/compound:get-a-phd --> Deep research to build agent knowledge
|
|
131
|
-
/compound:agentic-audit --> Score codebase against agentic manifesto
|
|
132
|
-
/compound:agentic-setup --> Audit then set up agentic infrastructure
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Each phase searches memory for relevant past knowledge and injects it into agent context. The compound phase captures new knowledge, closing the loop.
|
|
136
|
-
|
|
137
274
|
## CLI Reference
|
|
138
275
|
|
|
139
276
|
The CLI binary is `ca` (alias: `compound-agent`).
|
|
@@ -195,6 +332,17 @@ The CLI binary is `ca` (alias: `compound-agent`).
|
|
|
195
332
|
| `ca loop --max-review-cycles <n>` | Max review/fix iterations (default: 3) |
|
|
196
333
|
| `ca loop --review-blocking` | Fail loop if review not approved after max cycles |
|
|
197
334
|
| `ca loop --review-model <model>` | Model for implementer fix sessions (default: claude-opus-4-6) |
|
|
335
|
+
| `ca improve` | Generate improvement loop script from `improve/*.md` programs |
|
|
336
|
+
| `ca improve --topics <names...>` | Run only specific topics |
|
|
337
|
+
| `ca improve --max-iters <n>` | Max iterations per topic (default: 5) |
|
|
338
|
+
| `ca improve --time-budget <seconds>` | Total time budget, 0=unlimited (default: 0) |
|
|
339
|
+
| `ca improve --dry-run` | Validate and print plan without generating |
|
|
340
|
+
| `ca improve --force` | Overwrite existing script |
|
|
341
|
+
| `ca improve init` | Scaffold an example `improve/*.md` program file |
|
|
342
|
+
| `ca watch` | Tail and pretty-print live trace from loop sessions |
|
|
343
|
+
| `ca watch --epic <id>` | Watch a specific epic trace |
|
|
344
|
+
| `ca watch --improve` | Watch improvement loop traces |
|
|
345
|
+
| `ca watch --no-follow` | Print existing trace and exit (no live tail) |
|
|
198
346
|
|
|
199
347
|
### Knowledge
|
|
200
348
|
|
|
@@ -210,7 +358,7 @@ The CLI binary is `ca` (alias: `compound-agent`).
|
|
|
210
358
|
| `ca setup` | One-shot setup (hooks + git pre-commit + model) |
|
|
211
359
|
| `ca setup --skip-model` | Setup without model download |
|
|
212
360
|
| `ca setup --uninstall` | Remove all generated files |
|
|
213
|
-
| `ca setup --update` | Regenerate files (preserves user
|
|
361
|
+
| `ca setup --update` | Regenerate files (preserves user customisations) |
|
|
214
362
|
| `ca setup --status` | Show installation status |
|
|
215
363
|
| `ca setup --dry-run` | Show what would change without changing |
|
|
216
364
|
| `ca setup claude --status` | Check Claude Code integration health |
|
|
@@ -243,7 +391,7 @@ confirmation_boost: confirmed=1.3, unconfirmed=1.0
|
|
|
243
391
|
## FAQ
|
|
244
392
|
|
|
245
393
|
**Q: How is this different from mem0?**
|
|
246
|
-
A: mem0 is a cloud memory layer for general AI agents. Compound Agent is local-first with git-tracked storage and local embeddings
|
|
394
|
+
A: mem0 is a cloud memory layer for general AI agents. Compound Agent is local-first with git-tracked storage and local embeddings — no API keys or cloud services needed. It also goes beyond memory with structured workflows, multi-agent review, and issue tracking.
|
|
247
395
|
|
|
248
396
|
**Q: Does this work offline?**
|
|
249
397
|
A: Yes, completely. Embeddings run locally via node-llama-cpp. No network requests after the initial model download.
|
|
@@ -257,6 +405,9 @@ A: The CLI (`ca`) works standalone with any tool. Full hook integration is avail
|
|
|
257
405
|
**Q: What happens if the embedding model isn't available?**
|
|
258
406
|
A: Search gracefully falls back to keyword-only mode. Other commands that require embeddings will tell you what's missing. Run `npx ca doctor` to diagnose issues.
|
|
259
407
|
|
|
408
|
+
**Q: Is the loop production-ready?**
|
|
409
|
+
A: The loop works and has been used to ship real projects, including compound-agent itself. Long-duration autonomous runs across many epics are the current area of hardening. For 3–5 epic sequences, it is reliable today.
|
|
410
|
+
|
|
260
411
|
## Development
|
|
261
412
|
|
|
262
413
|
```bash
|
|
@@ -297,13 +448,15 @@ pnpm lint # Type check + ESLint
|
|
|
297
448
|
| [CHANGELOG.md](https://github.com/Nathandela/compound-agent/blob/main/CHANGELOG.md) | Version history |
|
|
298
449
|
| [AGENTS.md](https://github.com/Nathandela/compound-agent/blob/main/AGENTS.md) | Agent workflow instructions |
|
|
299
450
|
|
|
451
|
+
The most direct way to explore the system is to open this repository with an AI agent and ask it to walk you through the design — the project is structured precisely for that.
|
|
452
|
+
|
|
300
453
|
## Acknowledgments
|
|
301
454
|
|
|
302
455
|
Compound Agent builds on ideas and patterns from these projects:
|
|
303
456
|
|
|
304
457
|
| Project | Influence |
|
|
305
458
|
|---------|-----------|
|
|
306
|
-
| [Compound Engineering Plugin](https://github.com/EveryInc/compound-engineering-plugin) | The "compound" philosophy
|
|
459
|
+
| [Compound Engineering Plugin](https://github.com/EveryInc/compound-engineering-plugin) | The "compound" philosophy — each unit of work makes subsequent units easier. Multi-agent review workflows and skills as encoded knowledge. |
|
|
307
460
|
| [Beads](https://github.com/steveyegge/beads) | Git-backed JSONL + SQLite hybrid storage model, hash-based conflict-free IDs, dependency graphs |
|
|
308
461
|
| [OpenClaw](https://github.com/openclaw/openclaw) | Claude Code integration patterns and hook-based workflow architecture |
|
|
309
462
|
|
|
@@ -311,10 +464,10 @@ Also informed by research into [Reflexion](https://arxiv.org/abs/2303.11366) (ve
|
|
|
311
464
|
|
|
312
465
|
## Contributing
|
|
313
466
|
|
|
314
|
-
Bug reports and feature requests are welcome via [Issues](https://github.com/Nathandela/compound-agent/issues). Pull requests are not accepted at this time
|
|
467
|
+
Bug reports and feature requests are welcome via [Issues](https://github.com/Nathandela/compound-agent/issues). Pull requests are not accepted at this time — see [CONTRIBUTING.md](CONTRIBUTING.md) for details.
|
|
315
468
|
|
|
316
469
|
## License
|
|
317
470
|
|
|
318
|
-
MIT
|
|
471
|
+
MIT — see [LICENSE](LICENSE) for details.
|
|
319
472
|
|
|
320
473
|
> The embedding model (EmbeddingGemma-300M) is downloaded on-demand and subject to Google's [Gemma Terms of Use](https://ai.google.dev/gemma/terms). See [THIRD-PARTY-LICENSES.md](THIRD-PARTY-LICENSES.md) for full dependency license information.
|