compound-agent 1.2.6 → 1.2.8
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 +14 -1
- package/dist/cli.js +91 -64
- package/dist/cli.js.map +1 -1
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [1.2.7] - 2026-02-17
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **Explicit agent mechanism language in phase skills**: Each phase now clearly distinguishes subagents (Task tool, lightweight research) from AgentTeam teammates (TeamCreate + Task with `team_name`, dedicated role skills). Relative paths to agent definitions and role skill files included in every step.
|
|
17
|
+
- Brainstorm/Plan: "Spawn **subagents** via Task tool" referencing `.claude/agents/compound/*.md`
|
|
18
|
+
- Work/Review/Compound: "Deploy an **AgentTeam** (TeamCreate + Task with `team_name`)" referencing `.claude/skills/compound/agents/*/SKILL.md`
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **`verify-gates` JSON array unwrap**: `bd show --json` returns an array, not an object. `parseDepsJson()` now unwraps the first element before reading `depends_on`. Previously caused false gate failures on valid epics.
|
|
23
|
+
|
|
12
24
|
## [1.2.6] - 2026-02-16
|
|
13
25
|
|
|
14
26
|
### Changed
|
|
@@ -493,7 +505,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
493
505
|
- Vitest test suite
|
|
494
506
|
- tsup build configuration
|
|
495
507
|
|
|
496
|
-
[Unreleased]: https://github.com/Nathandela/learning_agent/compare/v1.2.
|
|
508
|
+
[Unreleased]: https://github.com/Nathandela/learning_agent/compare/v1.2.7...HEAD
|
|
509
|
+
[1.2.7]: https://github.com/Nathandela/learning_agent/compare/v1.2.6...v1.2.7
|
|
497
510
|
[1.2.6]: https://github.com/Nathandela/learning_agent/compare/v1.2.5...v1.2.6
|
|
498
511
|
[1.2.5]: https://github.com/Nathandela/learning_agent/compare/v1.2.4...v1.2.5
|
|
499
512
|
[1.2.4]: https://github.com/Nathandela/learning_agent/compare/v1.2.1...v1.2.4
|
package/dist/cli.js
CHANGED
|
@@ -2926,13 +2926,7 @@ $ARGUMENTS
|
|
|
2926
2926
|
|
|
2927
2927
|
# Brainstorm
|
|
2928
2928
|
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
Key steps:
|
|
2932
|
-
- Search memory and explore docs for prior context
|
|
2933
|
-
- Clarify scope and constraints via AskUserQuestion
|
|
2934
|
-
- Propose 2-3 approaches with tradeoffs
|
|
2935
|
-
- Create a beads epic from conclusions
|
|
2929
|
+
**MANDATORY FIRST STEP -- NON-NEGOTIABLE**: Use the Read tool to open and read \`.claude/skills/compound/brainstorm/SKILL.md\` NOW. Do NOT proceed until you have read the complete skill file. It contains the full workflow you must follow.
|
|
2936
2930
|
`,
|
|
2937
2931
|
"plan.md": `---
|
|
2938
2932
|
name: compound:plan
|
|
@@ -2943,13 +2937,7 @@ $ARGUMENTS
|
|
|
2943
2937
|
|
|
2944
2938
|
# Plan
|
|
2945
2939
|
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
Key steps:
|
|
2949
|
-
- Spawn subagents to research constraints and patterns
|
|
2950
|
-
- Decompose into tasks with acceptance criteria
|
|
2951
|
-
- Create review and compound blocking tasks
|
|
2952
|
-
- Verify POST-PLAN gates
|
|
2940
|
+
**MANDATORY FIRST STEP -- NON-NEGOTIABLE**: Use the Read tool to open and read \`.claude/skills/compound/plan/SKILL.md\` NOW. Do NOT proceed until you have read the complete skill file. It contains the full workflow you must follow.
|
|
2953
2941
|
`,
|
|
2954
2942
|
"work.md": `---
|
|
2955
2943
|
name: compound:work
|
|
@@ -2960,13 +2948,7 @@ $ARGUMENTS
|
|
|
2960
2948
|
|
|
2961
2949
|
# Work
|
|
2962
2950
|
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
Key steps:
|
|
2966
|
-
- Deploy AgentTeam with test-writers and implementers
|
|
2967
|
-
- Lead coordinates, delegates, does not code directly
|
|
2968
|
-
- Commit incrementally as tests pass
|
|
2969
|
-
- Run verification gates before closing tasks
|
|
2951
|
+
**MANDATORY FIRST STEP -- NON-NEGOTIABLE**: Use the Read tool to open and read \`.claude/skills/compound/work/SKILL.md\` NOW. Do NOT proceed until you have read the complete skill file. It contains the full workflow you must follow.
|
|
2970
2952
|
`,
|
|
2971
2953
|
"review.md": `---
|
|
2972
2954
|
name: compound:review
|
|
@@ -2977,13 +2959,7 @@ $ARGUMENTS
|
|
|
2977
2959
|
|
|
2978
2960
|
# Review
|
|
2979
2961
|
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
Key steps:
|
|
2983
|
-
- Run quality gates, then spawn reviewers in parallel
|
|
2984
|
-
- Classify findings as P1/P2/P3
|
|
2985
|
-
- Fix all P1 findings before proceeding
|
|
2986
|
-
- Submit to /implementation-reviewer as mandatory gate
|
|
2962
|
+
**MANDATORY FIRST STEP -- NON-NEGOTIABLE**: Use the Read tool to open and read \`.claude/skills/compound/review/SKILL.md\` NOW. Do NOT proceed until you have read the complete skill file. It contains the full workflow you must follow.
|
|
2987
2963
|
`,
|
|
2988
2964
|
"compound.md": `---
|
|
2989
2965
|
name: compound:compound
|
|
@@ -2994,13 +2970,7 @@ $ARGUMENTS
|
|
|
2994
2970
|
|
|
2995
2971
|
# Compound
|
|
2996
2972
|
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
Key steps:
|
|
3000
|
-
- Spawn analysis agents in an AgentTeam
|
|
3001
|
-
- Apply quality filters, then store via npx ca learn
|
|
3002
|
-
- Delegate CCT synthesis to compounding agent
|
|
3003
|
-
- Verify FINAL GATE before closing epic
|
|
2973
|
+
**MANDATORY FIRST STEP -- NON-NEGOTIABLE**: Use the Read tool to open and read \`.claude/skills/compound/compound/SKILL.md\` NOW. Do NOT proceed until you have read the complete skill file. It contains the full workflow you must follow.
|
|
3004
2974
|
`,
|
|
3005
2975
|
"lfg.md": `---
|
|
3006
2976
|
name: compound:lfg
|
|
@@ -3012,13 +2982,7 @@ $ARGUMENTS
|
|
|
3012
2982
|
|
|
3013
2983
|
# LFG
|
|
3014
2984
|
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
- Brainstorm: explore and define the problem
|
|
3018
|
-
- Plan: decompose into tasks with dependencies
|
|
3019
|
-
- Work: delegate to AgentTeam for TDD
|
|
3020
|
-
- Review: multi-agent review with severity classification
|
|
3021
|
-
- Compound: capture lessons via npx ca learn
|
|
2985
|
+
**MANDATORY FIRST STEP -- NON-NEGOTIABLE**: Use the Read tool to open and read \`.claude/skills/compound/lfg/SKILL.md\` NOW. Do NOT proceed until you have read the complete skill file. It contains the full orchestration workflow you must follow.
|
|
3022
2986
|
`,
|
|
3023
2987
|
// =========================================================================
|
|
3024
2988
|
// Utility commands (CLI wrappers)
|
|
@@ -3131,10 +3095,10 @@ Explore the problem space before committing to a solution. This phase produces a
|
|
|
3131
3095
|
## Methodology
|
|
3132
3096
|
1. Ask "why" before "how" -- understand the real problem
|
|
3133
3097
|
2. Search memory with \`npx ca search\` for similar past features and known constraints
|
|
3134
|
-
3. Spawn
|
|
3135
|
-
-
|
|
3136
|
-
-
|
|
3137
|
-
-
|
|
3098
|
+
3. Spawn **subagents** via Task tool in parallel for research (lightweight, no inter-agent coordination):
|
|
3099
|
+
- Available agents: \`.claude/agents/compound/repo-analyst.md\`, \`memory-analyst.md\`
|
|
3100
|
+
- Or use \`subagent_type: Explore\` for ad-hoc research
|
|
3101
|
+
- Deploy MULTIPLE when topic spans several domains; synthesize all findings before proceeding
|
|
3138
3102
|
4. Use \`AskUserQuestion\` to clarify scope, constraints, and preferences
|
|
3139
3103
|
5. Divergent phase: generate multiple approaches without filtering
|
|
3140
3104
|
6. Identify constraints and non-functional requirements (performance, security, etc.)
|
|
@@ -3185,9 +3149,9 @@ Create a concrete implementation plan by decomposing work into small, testable t
|
|
|
3185
3149
|
## Methodology
|
|
3186
3150
|
1. Review brainstorm output for decisions and open questions
|
|
3187
3151
|
2. Search memory with \`npx ca search\` for architectural patterns and past mistakes
|
|
3188
|
-
3. Spawn
|
|
3189
|
-
-
|
|
3190
|
-
- For complex features
|
|
3152
|
+
3. Spawn **subagents** via Task tool in parallel for research (lightweight, no inter-agent coordination):
|
|
3153
|
+
- Available agents: \`.claude/agents/compound/repo-analyst.md\`, \`memory-analyst.md\`
|
|
3154
|
+
- For complex features, deploy MULTIPLE analysts per domain area
|
|
3191
3155
|
- Synthesize all findings before decomposing into tasks
|
|
3192
3156
|
4. Synthesize research findings into a coherent approach. Flag conflicts between ADRs and proposed plan.
|
|
3193
3157
|
5. Use \`AskUserQuestion\` to resolve ambiguities, conflicting constraints, or priority trade-offs before decomposing
|
|
@@ -3244,9 +3208,9 @@ Execute implementation through an AgentTeam using adaptive TDD. The lead coordin
|
|
|
3244
3208
|
2. Mark tasks in progress: \`bd update <id> --status=in_progress\`
|
|
3245
3209
|
3. Run \`npx ca search\` per agent/subtask for targeted context. Display results.
|
|
3246
3210
|
4. Assess parallelization: identify independent tasks that can be worked simultaneously
|
|
3247
|
-
5. Deploy an AgentTeam with MULTIPLE test-writers and implementers
|
|
3248
|
-
-
|
|
3249
|
-
-
|
|
3211
|
+
5. Deploy an **AgentTeam** (TeamCreate + Task with \`team_name\`) with MULTIPLE test-writers and implementers:
|
|
3212
|
+
- Role skills: \`.claude/skills/compound/agents/{test-writer,implementer}/SKILL.md\`
|
|
3213
|
+
- Scale teammate count to independent tasks; pairs coordinate via SendMessage on shared interfaces
|
|
3250
3214
|
6. Agents communicate via SendMessage when working on overlapping areas.
|
|
3251
3215
|
7. Lead coordinates: review agent outputs, resolve conflicts, verify tests pass. Do not write code directly.
|
|
3252
3216
|
8. If blocked, use AskUserQuestion to get user direction.
|
|
@@ -3317,9 +3281,9 @@ Perform thorough code review by spawning specialized reviewers in parallel, cons
|
|
|
3317
3281
|
- **Small** (<100 lines): 4 core -- security, test-coverage, simplicity, cct-reviewer
|
|
3318
3282
|
- **Medium** (100-500): add architecture, performance, edge-case (7 total)
|
|
3319
3283
|
- **Large** (500+): all 11 reviewers including docs, consistency, error-handling, pattern-matcher
|
|
3320
|
-
4. Spawn
|
|
3321
|
-
-
|
|
3322
|
-
-
|
|
3284
|
+
4. Spawn reviewers in an **AgentTeam** (TeamCreate + Task with \`team_name\`):
|
|
3285
|
+
- Role skills: \`.claude/skills/compound/agents/{security-reviewer,architecture-reviewer,performance-reviewer,test-coverage-reviewer,simplicity-reviewer}/SKILL.md\`
|
|
3286
|
+
- For large diffs (500+), deploy MULTIPLE instances; split files across instances, coordinate via SendMessage
|
|
3323
3287
|
5. Reviewers communicate findings to each other via \`SendMessage\`
|
|
3324
3288
|
6. Collect, consolidate, and deduplicate all findings
|
|
3325
3289
|
7. Classify by severity: P1 (critical/blocking), P2 (important), P3 (minor)
|
|
@@ -3380,15 +3344,11 @@ Lessons go to \`.claude/lessons/index.jsonl\` through the CLI. MEMORY.md is a di
|
|
|
3380
3344
|
|
|
3381
3345
|
## Methodology
|
|
3382
3346
|
1. Review what happened during this cycle (git diff, test results, plan context)
|
|
3383
|
-
2. Spawn the analysis pipeline in an AgentTeam
|
|
3384
|
-
-
|
|
3385
|
-
-
|
|
3386
|
-
- context-
|
|
3387
|
-
-
|
|
3388
|
-
- docs-reviewer: scans \`docs/\` for outdated content and ADRs that need updating
|
|
3389
|
-
- pattern-matcher: checks \`npx ca search\` for duplicates and related items
|
|
3390
|
-
- solution-writer: drafts final memory items
|
|
3391
|
-
- compounding: synthesizes accumulated lessons into CCT patterns
|
|
3347
|
+
2. Spawn the analysis pipeline in an **AgentTeam** (TeamCreate + Task with \`team_name\`):
|
|
3348
|
+
- Role skills: \`.claude/skills/compound/agents/{context-analyzer,lesson-extractor,pattern-matcher,solution-writer,compounding}/SKILL.md\`
|
|
3349
|
+
- For large diffs, deploy MULTIPLE context-analyzers and lesson-extractors
|
|
3350
|
+
- Pipeline: context-analyzers -> lesson-extractors -> pattern-matcher + solution-writer -> compounding
|
|
3351
|
+
- Agents coordinate via SendMessage throughout the pipeline
|
|
3392
3352
|
3. Agents pass results through the pipeline via \`SendMessage\`. The lead coordinates: context-analyzer and lesson-extractor feed pattern-matcher and solution-writer, which feed compounding.
|
|
3393
3353
|
4. Apply quality filters: novelty check (>0.85 similarity = skip), specificity check
|
|
3394
3354
|
5. Classify each item by type: lesson, solution, pattern, or preference
|
|
@@ -3430,6 +3390,73 @@ Before closing the epic:
|
|
|
3430
3390
|
- Run \`pnpm test\` and \`pnpm lint\` -- must pass
|
|
3431
3391
|
If verify-gates fails, the missing phase was SKIPPED. Go back and complete it.
|
|
3432
3392
|
CRITICAL: 3/5 phases is NOT success. All 5 phases are required.
|
|
3393
|
+
`,
|
|
3394
|
+
lfg: `---
|
|
3395
|
+
name: LFG
|
|
3396
|
+
description: Full-cycle orchestrator chaining all five phases with gates and controls
|
|
3397
|
+
---
|
|
3398
|
+
|
|
3399
|
+
# LFG Skill
|
|
3400
|
+
|
|
3401
|
+
## Overview
|
|
3402
|
+
Chain all 5 phases end-to-end: Brainstorm, Plan, Work, Review, Compound. This skill governs the orchestration -- phase sequencing, gates, progress tracking, and error recovery.
|
|
3403
|
+
|
|
3404
|
+
## CRITICAL RULE -- READ BEFORE EXECUTE
|
|
3405
|
+
Before starting EACH phase, you MUST use the Read tool to open its skill file:
|
|
3406
|
+
- .claude/skills/compound/brainstorm/SKILL.md
|
|
3407
|
+
- .claude/skills/compound/plan/SKILL.md
|
|
3408
|
+
- .claude/skills/compound/work/SKILL.md
|
|
3409
|
+
- .claude/skills/compound/review/SKILL.md
|
|
3410
|
+
- .claude/skills/compound/compound/SKILL.md
|
|
3411
|
+
|
|
3412
|
+
Do NOT proceed from memory. Read the skill, then follow it exactly.
|
|
3413
|
+
|
|
3414
|
+
## Phase Execution Protocol
|
|
3415
|
+
For each phase:
|
|
3416
|
+
1. Announce: "[Phase N/5] PHASE_NAME"
|
|
3417
|
+
2. Read the phase skill file (see above)
|
|
3418
|
+
3. Run \`npx ca search\` with the current goal -- display results before proceeding
|
|
3419
|
+
4. Execute the phase following the skill instructions
|
|
3420
|
+
5. Update epic state: \`bd update <epic-id> --notes="Phase: NAME COMPLETE | Next: NEXT"\`
|
|
3421
|
+
6. Verify phase gate before proceeding to the next phase
|
|
3422
|
+
|
|
3423
|
+
## Phase Gates (MANDATORY)
|
|
3424
|
+
- **After Plan**: Run \`bd list --status=open\` -- verify Review and Compound blocking tasks exist
|
|
3425
|
+
- **After Work (GATE 3)**: \`bd list --status=in_progress\` must be empty. Only Review + Compound tasks remain open
|
|
3426
|
+
- **After Review (GATE 4)**: /implementation-reviewer must have returned APPROVED. All P1 findings resolved
|
|
3427
|
+
- **After Compound (FINAL GATE)**: Run \`npx ca verify-gates <epic-id>\` -- must PASS. Run \`pnpm test\` and \`pnpm lint\`
|
|
3428
|
+
|
|
3429
|
+
If a gate fails, DO NOT proceed. Fix the issue first.
|
|
3430
|
+
|
|
3431
|
+
## Phase Control
|
|
3432
|
+
- **Skip phases**: Parse arguments for "from PHASE" (e.g., "from plan"). Skip earlier phases.
|
|
3433
|
+
- **Resume**: After interruption, run \`bd show <epic-id>\` and read notes for phase state. Resume from that phase.
|
|
3434
|
+
- **Retry**: If a phase fails, report and ask user to retry, skip, or abort via AskUserQuestion.
|
|
3435
|
+
- **Progress**: Always announce current phase number before starting.
|
|
3436
|
+
|
|
3437
|
+
## Stop Conditions
|
|
3438
|
+
- Brainstorm reveals goal is unclear -- stop, ask user
|
|
3439
|
+
- Tests produce unresolvable failures -- stop, report
|
|
3440
|
+
- Review finds critical security issues -- stop, report
|
|
3441
|
+
|
|
3442
|
+
## Common Pitfalls
|
|
3443
|
+
- Skipping the Read step for a phase skill (NON-NEGOTIABLE)
|
|
3444
|
+
- Not running phase gates between phases
|
|
3445
|
+
- Not announcing progress ("[Phase N/5]")
|
|
3446
|
+
- Proceeding after a failed gate
|
|
3447
|
+
- Not updating epic notes with phase state (loses resume ability)
|
|
3448
|
+
- Batching all commits to the end instead of committing incrementally
|
|
3449
|
+
|
|
3450
|
+
## Quality Criteria
|
|
3451
|
+
- All 5 phases were executed (3/5 is NOT success)
|
|
3452
|
+
- Each phase skill was Read before execution
|
|
3453
|
+
- Phase gates verified between each transition
|
|
3454
|
+
- Epic notes updated after each phase
|
|
3455
|
+
- Memory searched at the start of each phase
|
|
3456
|
+
- \`npx ca verify-gates\` passed at the end
|
|
3457
|
+
|
|
3458
|
+
## SESSION CLOSE -- INVIOLABLE
|
|
3459
|
+
Before saying "done": git status, git add, bd sync, git commit, bd sync, git push.
|
|
3433
3460
|
`
|
|
3434
3461
|
};
|
|
3435
3462
|
|