compound-agent 1.2.1 → 1.2.3
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/dist/cli.js +48 -59
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2889,7 +2889,7 @@ var WORKFLOW_COMMANDS = {
|
|
|
2889
2889
|
Explore requirements through collaborative dialogue before committing to a plan.
|
|
2890
2890
|
|
|
2891
2891
|
## Workflow
|
|
2892
|
-
1. Parse the topic from
|
|
2892
|
+
1. Parse the topic from the arguments above. If empty, ask the user what to brainstorm.
|
|
2893
2893
|
2. Call \`memory_search\` with the topic to surface relevant past lessons. Display retrieved items and incorporate them into exploration.
|
|
2894
2894
|
3. Create a research team and spawn explorers in parallel:
|
|
2895
2895
|
\`\`\`
|
|
@@ -2906,12 +2906,10 @@ Explore requirements through collaborative dialogue before committing to a plan.
|
|
|
2906
2906
|
7. Run \`bd ready\` to check if related tasks already exist.
|
|
2907
2907
|
8. Output a clear problem definition, chosen approach, and open questions.
|
|
2908
2908
|
9. Create a beads epic from conclusions:
|
|
2909
|
-
|
|
2910
|
-
bd create --title="<epic title>" --type=feature --description="<problem definition + approach + scope>"
|
|
2911
|
-
\`\`\`
|
|
2909
|
+
bd create --title="(epic title)" --type=feature --description="(problem definition + approach + scope)"
|
|
2912
2910
|
10. For each significant decision, auto-create an ADR in \`docs/decisions/\`:
|
|
2913
2911
|
- Scan \`docs/decisions/\` for the highest existing number, increment by 1
|
|
2914
|
-
- Write
|
|
2912
|
+
- Write docs/decisions/NNN-(kebab-title).md using this template:
|
|
2915
2913
|
\`\`\`markdown
|
|
2916
2914
|
# NNN. <Title>
|
|
2917
2915
|
Status: accepted
|
|
@@ -2949,7 +2947,7 @@ Explore requirements through collaborative dialogue before committing to a plan.
|
|
|
2949
2947
|
Create a structured implementation plan enriched by semantic memory and existing documentation, with concrete tasks and dependencies.
|
|
2950
2948
|
|
|
2951
2949
|
## Workflow
|
|
2952
|
-
1. Parse the goal from
|
|
2950
|
+
1. Parse the goal from the arguments above. If empty, ask the user what to plan.
|
|
2953
2951
|
2. Check for brainstorm output: run \`bd list\` to find a related brainstorm epic. If one exists, read its description for decisions and open questions.
|
|
2954
2952
|
3. Call \`memory_search\` with the goal to retrieve relevant past lessons. Display retrieved memory items and incorporate them into planning context.
|
|
2955
2953
|
4. Create a research team and spawn analysts in parallel:
|
|
@@ -2967,26 +2965,20 @@ Create a structured implementation plan enriched by semantic memory and existing
|
|
|
2967
2965
|
6. Use \`AskUserQuestion\` to resolve ambiguities: unclear requirements, conflicting ADRs, or priority trade-offs that need user input before decomposing.
|
|
2968
2966
|
7. Break the goal into concrete, ordered tasks with clear acceptance criteria.
|
|
2969
2967
|
8. **Create review and compound blocking tasks** so they survive compaction:
|
|
2970
|
-
|
|
2971
|
-
bd create --title="
|
|
2972
|
-
bd
|
|
2973
|
-
bd dep add
|
|
2974
|
-
bd dep add <compound-id> <review-id> # compound depends on review
|
|
2975
|
-
\`\`\`
|
|
2968
|
+
- bd create --title="Review: /compound:review" --type=task --priority=1
|
|
2969
|
+
- bd create --title="Compound: /compound:compound" --type=task --priority=1
|
|
2970
|
+
- bd dep add (review-id) (last-work-task) -- review depends on work
|
|
2971
|
+
- bd dep add (compound-id) (review-id) -- compound depends on review
|
|
2976
2972
|
These tasks surface via \`bd ready\` after work completes, ensuring review and compound phases are never skipped \u2014 even after context compaction.
|
|
2977
2973
|
9. Create beads issues and map dependencies:
|
|
2978
|
-
|
|
2979
|
-
bd
|
|
2980
|
-
bd dep add <dependent-task> <blocking-task>
|
|
2981
|
-
\`\`\`
|
|
2974
|
+
- bd create --title="(task)" --type=task --priority=(1-4)
|
|
2975
|
+
- bd dep add (dependent-task) (blocking-task)
|
|
2982
2976
|
10. Output the plan as a structured list with task IDs and dependency graph.
|
|
2983
2977
|
|
|
2984
2978
|
## POST-PLAN VERIFICATION -- MANDATORY
|
|
2985
2979
|
After creating all tasks, verify review and compound tasks exist:
|
|
2986
|
-
|
|
2987
|
-
bd list --status=open
|
|
2988
|
-
bd list --status=open | grep 'Compound:' # Must show a result
|
|
2989
|
-
\`\`\`
|
|
2980
|
+
- Run bd list --status=open and check for a "Review:" task
|
|
2981
|
+
- Run bd list --status=open and check for a "Compound:" task
|
|
2990
2982
|
If either is missing, CREATE THEM NOW. The plan is NOT complete without these gates.
|
|
2991
2983
|
|
|
2992
2984
|
## Memory Integration
|
|
@@ -3002,7 +2994,7 @@ If either is missing, CREATE THEM NOW. The plan is NOT complete without these ga
|
|
|
3002
2994
|
## Beads Integration
|
|
3003
2995
|
- Create one \`bd\` issue per task with \`bd create\`.
|
|
3004
2996
|
- Set priority (1=critical, 4=low) based on dependency order.
|
|
3005
|
-
- Map dependencies with
|
|
2997
|
+
- Map dependencies with bd dep add (dependent) (blocker).
|
|
3006
2998
|
- Each task should include acceptance criteria in its description.
|
|
3007
2999
|
`,
|
|
3008
3000
|
"work.md": `$ARGUMENTS
|
|
@@ -3013,8 +3005,8 @@ If either is missing, CREATE THEM NOW. The plan is NOT complete without these ga
|
|
|
3013
3005
|
Execute implementation by delegating to an agent team. The lead coordinates and does not code directly.
|
|
3014
3006
|
|
|
3015
3007
|
## Workflow
|
|
3016
|
-
1. Parse task from
|
|
3017
|
-
2. Mark task in progress:
|
|
3008
|
+
1. Parse task from the arguments above. If empty, run \`bd ready\` to find available tasks.
|
|
3009
|
+
2. Mark task in progress: bd update (id) --status=in_progress.
|
|
3018
3010
|
3. Call \`memory_search\` with the task description to retrieve relevant lessons. Run \`memory_search\` per agent/subtask so each gets targeted context. Display retrieved lessons in your response. Do not silently discard memory results.
|
|
3019
3011
|
4. Assess complexity to determine team strategy.
|
|
3020
3012
|
5. If **trivial** (config changes, typos, one-line fixes): handle directly with a single subagent. No AgentTeam needed. Proceed to step 10.
|
|
@@ -3040,11 +3032,11 @@ Execute implementation by delegating to an agent team. The lead coordinates and
|
|
|
3040
3032
|
12. Shut down the team when done: send \`shutdown_request\` to all teammates.
|
|
3041
3033
|
13. Commit incrementally as tests pass \u2014 do not batch all commits to the end.
|
|
3042
3034
|
14. Run the full test suite to check for regressions.
|
|
3043
|
-
15. Close the task:
|
|
3035
|
+
15. Close the task: bd close (id).
|
|
3044
3036
|
|
|
3045
3037
|
## MANDATORY VERIFICATION -- DO NOT CLOSE TASK WITHOUT THIS
|
|
3046
3038
|
STOP. Before running \`bd close\`, you MUST:
|
|
3047
|
-
1. Run
|
|
3039
|
+
1. Run pnpm test, then pnpm lint (quality gates)
|
|
3048
3040
|
2. Run /implementation-reviewer on the changed code
|
|
3049
3041
|
3. Wait for APPROVED status
|
|
3050
3042
|
If /implementation-reviewer returns REJECTED: fix ALL issues, re-run tests, resubmit.
|
|
@@ -3060,8 +3052,8 @@ for complex changes. For all changes, /implementation-reviewer is the minimum re
|
|
|
3060
3052
|
|
|
3061
3053
|
## Beads Integration
|
|
3062
3054
|
- Start with \`bd ready\` to pick work.
|
|
3063
|
-
- Update status with
|
|
3064
|
-
- Close with
|
|
3055
|
+
- Update status with bd update (id) --status=in_progress.
|
|
3056
|
+
- Close with bd close (id) when all tests pass.
|
|
3065
3057
|
`,
|
|
3066
3058
|
"review.md": `$ARGUMENTS
|
|
3067
3059
|
|
|
@@ -3071,8 +3063,8 @@ for complex changes. For all changes, /implementation-reviewer is the minimum re
|
|
|
3071
3063
|
Multi-agent code review with severity classification and a mandatory \`/implementation-reviewer\` gate.
|
|
3072
3064
|
|
|
3073
3065
|
## Workflow
|
|
3074
|
-
1. Run quality gates first:
|
|
3075
|
-
2. Identify scope from
|
|
3066
|
+
1. Run quality gates first: pnpm test, then pnpm lint.
|
|
3067
|
+
2. Identify scope from the arguments above or \`git diff\`. Count changed lines.
|
|
3076
3068
|
3. Call \`memory_search\` with changed areas to surface past lessons.
|
|
3077
3069
|
4. **Select reviewer tier based on diff size:**
|
|
3078
3070
|
- **Small** (<100 lines): 4 core reviewers \u2014 security, test-coverage, simplicity, cct-reviewer.
|
|
@@ -3096,7 +3088,7 @@ Multi-agent code review with severity classification and a mandatory \`/implemen
|
|
|
3096
3088
|
6. Reviewers communicate cross-cutting findings via SendMessage.
|
|
3097
3089
|
7. Classify findings: **P1** (security, data loss, correctness \u2014 blocks completion), **P2** (architecture, performance), **P3** (style, minor).
|
|
3098
3090
|
8. Deduplicate and prioritize. Use \`AskUserQuestion\` for ambiguous severity.
|
|
3099
|
-
9. For P1/P2 findings:
|
|
3091
|
+
9. For P1/P2 findings: bd create --title="P1: (finding)" --type=bug --priority=1
|
|
3100
3092
|
10. Submit to **\`/implementation-reviewer\`** \u2014 mandatory gate, final authority. All P1s must be resolved.
|
|
3101
3093
|
11. **External reviewers (optional)**: Check \`.claude/compound-agent.json\` for \`"externalReviewers"\`. Spawn configured reviewers. Advisory only, never blocks.
|
|
3102
3094
|
12. Output review summary with severity breakdown and external findings (if any).
|
|
@@ -3123,7 +3115,7 @@ Multi-agent code review with severity classification and a mandatory \`/implemen
|
|
|
3123
3115
|
Multi-agent analysis to capture high-quality lessons from completed work into the memory system and update project documentation.
|
|
3124
3116
|
|
|
3125
3117
|
## Workflow
|
|
3126
|
-
1. Parse what was done from
|
|
3118
|
+
1. Parse what was done from the arguments above or recent git history (\`git diff\`, \`git log\`).
|
|
3127
3119
|
2. Call \`memory_search\` with the topic to check what is already known (avoid duplicates).
|
|
3128
3120
|
3. Create a compound team and spawn the 6 analysis agents in parallel:
|
|
3129
3121
|
\`\`\`
|
|
@@ -3179,7 +3171,7 @@ Multi-agent analysis to capture high-quality lessons from completed work into th
|
|
|
3179
3171
|
Chain all phases: brainstorm, plan, work, review, compound. End-to-end delivery.
|
|
3180
3172
|
|
|
3181
3173
|
## Workflow
|
|
3182
|
-
1. **Brainstorm phase**: Explore the goal
|
|
3174
|
+
1. **Brainstorm phase**: Explore the goal stated above.
|
|
3183
3175
|
- MEMORY CHECK: Call \`memory_search\` with the current goal/task. Display results to user. If relevant items found, state which ones apply and why. If none found, state "No relevant lessons found."
|
|
3184
3176
|
- Call \`memory_search\` with the goal.
|
|
3185
3177
|
- \`TeamCreate\` team "brainstorm-<slug>", spawn docs-explorer + code-explorer as parallel teammates.
|
|
@@ -3187,7 +3179,7 @@ Chain all phases: brainstorm, plan, work, review, compound. End-to-end delivery.
|
|
|
3187
3179
|
- Auto-create ADRs for significant decisions in \`docs/decisions/\`.
|
|
3188
3180
|
- Create a beads epic from conclusions with \`bd create --type=feature\`.
|
|
3189
3181
|
- Shut down brainstorm team before next phase.
|
|
3190
|
-
- Update epic phase state:
|
|
3182
|
+
- Update epic phase state: bd update (epic-id) --notes="Phase: brainstorm COMPLETE, Next: plan"
|
|
3191
3183
|
|
|
3192
3184
|
2. **Plan phase**: Structure the work.
|
|
3193
3185
|
- MEMORY CHECK: Call \`memory_search\` with the current goal/task. Display results to user. If relevant items found, state which ones apply and why. If none found, state "No relevant lessons found."
|
|
@@ -3197,7 +3189,7 @@ Chain all phases: brainstorm, plan, work, review, compound. End-to-end delivery.
|
|
|
3197
3189
|
- Create beads issues with \`bd create\` and map dependencies with \`bd dep add\`.
|
|
3198
3190
|
- Create review and compound blocking tasks (\`bd create\` + \`bd dep add\`) so they survive compaction and surface via \`bd ready\` after work completes.
|
|
3199
3191
|
- Shut down plan team before next phase.
|
|
3200
|
-
- Update epic phase state:
|
|
3192
|
+
- Update epic phase state: bd update (epic-id) --notes="Phase: plan COMPLETE, Next: work"
|
|
3201
3193
|
|
|
3202
3194
|
3. **Work phase**: Implement with adaptive TDD.
|
|
3203
3195
|
- MEMORY CHECK: Call \`memory_search\` with the current goal/task. Display results to user. If relevant items found, state which ones apply and why. If none found, state "No relevant lessons found."
|
|
@@ -3207,31 +3199,29 @@ Chain all phases: brainstorm, plan, work, review, compound. End-to-end delivery.
|
|
|
3207
3199
|
- Call \`memory_search\` per subtask; \`memory_capture\` after corrections.
|
|
3208
3200
|
- Commit incrementally. Close tasks as they complete.
|
|
3209
3201
|
- Run verification gate before marking complete. Shut down work team.
|
|
3210
|
-
- Update epic phase state:
|
|
3202
|
+
- Update epic phase state: bd update (epic-id) --notes="Phase: work COMPLETE, Next: review"
|
|
3211
3203
|
|
|
3212
3204
|
## PHASE GATE 3->4 -- MANDATORY
|
|
3213
3205
|
Before starting Review, verify ALL work tasks are closed:
|
|
3214
|
-
|
|
3215
|
-
bd list --status=
|
|
3216
|
-
bd list --status=open | grep -v 'Review:\\|Compound:' # Must return empty (only review+compound should be open)
|
|
3217
|
-
\`\`\`
|
|
3206
|
+
- Run \`bd list --status=in_progress\` \u2014 must return empty
|
|
3207
|
+
- Run \`bd list --status=open\` \u2014 only Review and Compound tasks should remain
|
|
3218
3208
|
If any work tasks remain open, DO NOT proceed. Complete them first.
|
|
3219
|
-
Update epic phase:
|
|
3209
|
+
Update epic phase: bd update (epic-id) --notes="Phase: work COMPLETE, Next: review"
|
|
3220
3210
|
|
|
3221
3211
|
4. **Review phase**: 11-agent review with severity classification.
|
|
3222
3212
|
- MEMORY CHECK: Call \`memory_search\` with the current goal/task. Display results to user. If relevant items found, state which ones apply and why. If none found, state "No relevant lessons found."
|
|
3223
|
-
- Run quality gates first:
|
|
3213
|
+
- Run quality gates first: pnpm test, then pnpm lint.
|
|
3224
3214
|
- \`TeamCreate\` team "review-<slug>", spawn all 11 reviewers as parallel teammates.
|
|
3225
3215
|
- Classify findings as P1 (critical/blocking), P2 (important), P3 (minor).
|
|
3226
3216
|
- P1 findings must be fixed before proceeding \u2014 they block completion.
|
|
3227
3217
|
- Submit to \`/implementation-reviewer\` as the mandatory gate. Shut down review team.
|
|
3228
|
-
- Update epic phase state:
|
|
3218
|
+
- Update epic phase state: bd update (epic-id) --notes="Phase: review COMPLETE, Next: compound"
|
|
3229
3219
|
|
|
3230
3220
|
## PHASE GATE 4->5 -- MANDATORY
|
|
3231
3221
|
Before starting Compound, verify review is complete:
|
|
3232
3222
|
- /implementation-reviewer must have returned APPROVED
|
|
3233
3223
|
- All P1 findings must be resolved
|
|
3234
|
-
Update epic phase:
|
|
3224
|
+
Update epic phase: bd update (epic-id) --notes="Phase: review COMPLETE, Next: compound"
|
|
3235
3225
|
|
|
3236
3226
|
5. **Compound phase**: Capture learnings.
|
|
3237
3227
|
- MEMORY CHECK: Call \`memory_search\` with the current goal/task. Display results to user. If relevant items found, state which ones apply and why. If none found, state "No relevant lessons found."
|
|
@@ -3240,14 +3230,13 @@ Update epic phase: \`bd update <epic-id> --notes="Phase: review COMPLETE | Next:
|
|
|
3240
3230
|
- Store novel insights via \`memory_capture\` with supersedes/related links.
|
|
3241
3231
|
- Update outdated docs and deprecate superseded ADRs.
|
|
3242
3232
|
- Use \`AskUserQuestion\` to confirm high-severity items. Shut down compound team.
|
|
3243
|
-
- Update epic phase state:
|
|
3233
|
+
- Update epic phase state: bd update (epic-id) --notes="Phase: compound COMPLETE, Next: close"
|
|
3244
3234
|
|
|
3245
3235
|
## FINAL GATE -- EPIC CLOSURE
|
|
3246
|
-
Before closing the epic
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
\`\`\`
|
|
3236
|
+
Before closing the epic:
|
|
3237
|
+
- Run ca verify-gates (epic-id) \u2014 must return PASS for both gates
|
|
3238
|
+
- Run \`pnpm test\` \u2014 must pass
|
|
3239
|
+
- Run \`pnpm lint\` \u2014 must pass
|
|
3251
3240
|
If verify-gates fails, the missing phase was SKIPPED. Go back and complete it.
|
|
3252
3241
|
CRITICAL: 3/5 phases is NOT success. All 5 phases are required.
|
|
3253
3242
|
|
|
@@ -3255,10 +3244,10 @@ CRITICAL: 3/5 phases is NOT success. All 5 phases are required.
|
|
|
3255
3244
|
Each phase creates its own AgentTeam via \`TeamCreate\`, spawns teammates via \`Task\` tool with \`team_name\`, coordinates via \`SendMessage\`, and shuts down with \`shutdown_request\` before the next phase starts. Use subagents (Task without team_name) only for quick lookups like \`memory_search\` or \`bd\` commands.
|
|
3256
3245
|
|
|
3257
3246
|
## Phase Control
|
|
3258
|
-
- **Skip phases**:
|
|
3247
|
+
- **Skip phases**: If the arguments above contain "from <phase>" (e.g., "from plan"), skip all phases before the named one.
|
|
3259
3248
|
- **Progress**: Announce the current phase before starting it (e.g., "[Phase 2/5] Plan").
|
|
3260
3249
|
- **Retry**: If a phase fails, report the failure and ask the user whether to retry, skip, or abort.
|
|
3261
|
-
- **Resume**: After interruption, run
|
|
3250
|
+
- **Resume**: After interruption, run bd show (epic-id) and read the notes field for current phase state. Resume from that phase. If no phase state, check \`bd list --status=in_progress\` to infer.
|
|
3262
3251
|
|
|
3263
3252
|
## Stop Conditions
|
|
3264
3253
|
- Stop if brainstorm reveals the goal is unclear (ask user).
|
|
@@ -3271,14 +3260,14 @@ Each phase creates its own AgentTeam via \`TeamCreate\`, spawns teammates via \`
|
|
|
3271
3260
|
|
|
3272
3261
|
## SESSION CLOSE -- INVIOLABLE
|
|
3273
3262
|
Before saying "done" or "complete", ALL of these must pass:
|
|
3274
|
-
1.
|
|
3275
|
-
2.
|
|
3276
|
-
3.
|
|
3277
|
-
4.
|
|
3278
|
-
5.
|
|
3279
|
-
6.
|
|
3280
|
-
7.
|
|
3281
|
-
8.
|
|
3263
|
+
1. ca verify-gates (epic-id) -- All workflow gates satisfied
|
|
3264
|
+
2. pnpm test -- All tests green
|
|
3265
|
+
3. pnpm lint -- Zero violations
|
|
3266
|
+
4. git status -- Review changes
|
|
3267
|
+
5. git add (specific files) -- Stage (never git add .)
|
|
3268
|
+
6. bd sync -- Sync beads
|
|
3269
|
+
7. git commit -- Commit with descriptive message
|
|
3270
|
+
8. git push -- Push to remote
|
|
3282
3271
|
If ANY step fails, fix it. Work is NOT done until git push succeeds.
|
|
3283
3272
|
`,
|
|
3284
3273
|
// =========================================================================
|