compound-agent 1.2.4 → 1.2.5

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 CHANGED
@@ -3438,6 +3438,11 @@ Create a concrete implementation plan by decomposing work into small, testable t
3438
3438
  - Existing docs and ADRs were checked for constraints
3439
3439
  - Ambiguities resolved via \`AskUserQuestion\` before decomposing
3440
3440
  - Complexity estimates are realistic (no "should be quick")
3441
+
3442
+ ## POST-PLAN VERIFICATION -- MANDATORY
3443
+ After creating all tasks, verify review and compound tasks exist:
3444
+ - Run \`bd list --status=open\` and check for a "Review:" task and a "Compound:" task
3445
+ - If either is missing, CREATE THEM NOW. The plan is NOT complete without these gates.
3441
3446
  `,
3442
3447
  work: `---
3443
3448
  name: Work
@@ -3475,9 +3480,14 @@ Spawn teammates via \`Task\` with \`team_name\`, coordinate via \`SendMessage\`,
3475
3480
  - Each agent receives memory items tailored to their assigned task, not a shared blob
3476
3481
  - Call \`memory_capture\` after corrections or novel discoveries
3477
3482
 
3478
- ## Verification Gate
3479
- Before marking work complete, run the 8-step TDD verification pipeline:
3480
- 1. /invariant-designer \u2192 2. /cct-subagent \u2192 3. /test-first-enforcer \u2192 4. /property-test-generator \u2192 5. /anti-cargo-cult-reviewer \u2192 6. /module-boundary-reviewer \u2192 7. /drift-detector \u2192 8. /implementation-reviewer
3483
+ ## MANDATORY VERIFICATION -- DO NOT CLOSE TASK WITHOUT THIS
3484
+ Before \`bd close\`, you MUST:
3485
+ 1. Run \`pnpm test\` then \`pnpm lint\` (quality gates)
3486
+ 2. Run \`/implementation-reviewer\` on changed code -- wait for APPROVED
3487
+ If REJECTED: fix ALL issues, re-run tests, resubmit. INVIOLABLE per CLAUDE.md.
3488
+
3489
+ The full 8-step pipeline (invariant-designer through implementation-reviewer) is recommended
3490
+ for complex changes. For all changes, \`/implementation-reviewer\` is the minimum required gate.
3481
3491
 
3482
3492
  ## Beads Lifecycle
3483
3493
  - \`bd ready\` to find available tasks
@@ -3501,6 +3511,12 @@ Before marking work complete, run the 8-step TDD verification pipeline:
3501
3511
  - Incremental commits made as tests pass
3502
3512
  - All tests pass after refactoring
3503
3513
  - Task lifecycle tracked via beads (\`bd\`)
3514
+
3515
+ ## PHASE GATE 3 -- MANDATORY
3516
+ Before starting Review, verify ALL work tasks are closed:
3517
+ - \`bd list --status=in_progress\` must return empty
3518
+ - \`bd list --status=open\` should only have Review and Compound tasks remaining
3519
+ If any work tasks remain open, DO NOT proceed. Complete them first.
3504
3520
  `,
3505
3521
  review: `---
3506
3522
  name: Review
@@ -3515,18 +3531,19 @@ Perform thorough code review by spawning specialized reviewers in parallel, cons
3515
3531
  ## Methodology
3516
3532
  1. Run quality gates first: \`pnpm test && pnpm lint\`
3517
3533
  2. Search memory with \`memory_search\` for known patterns and recurring issues
3518
- 3. Create an AgentTeam (\`TeamCreate\`) and spawn all 11 reviewers as parallel teammates via \`Task\` tool with \`team_name\`:
3519
- - **Core**: security, architecture, performance, test-coverage, simplicity
3520
- - **Quality**: docs-reviewer, consistency-reviewer, error-handling-reviewer
3521
- - **Intelligence**: edge-case-reviewer, pattern-matcher (memory-backed), cct-reviewer (CCT patterns)
3522
- 4. Reviewers communicate findings to each other via \`SendMessage\`
3523
- 5. Collect, consolidate, and deduplicate all findings
3524
- 6. Classify by severity: P1 (critical/blocking), P2 (important), P3 (minor)
3525
- 7. Use \`AskUserQuestion\` when severity is ambiguous or fix has multiple valid options
3526
- 8. Create beads issues for P1 findings: \`bd create --title="P1: ..."\`
3527
- 9. Fix all P1 findings before proceeding
3528
- 10. Run \`/implementation-reviewer\` as mandatory gate
3529
- 11. Capture novel findings with \`memory_capture\`; pattern-matcher auto-reinforces recurring issues
3534
+ 3. Select reviewer tier based on diff size:
3535
+ - **Small** (<100 lines): 4 core -- security, test-coverage, simplicity, cct-reviewer
3536
+ - **Medium** (100-500): add architecture, performance, edge-case (7 total)
3537
+ - **Large** (500+): all 11 reviewers including docs, consistency, error-handling, pattern-matcher
3538
+ 4. Create an AgentTeam (\`TeamCreate\`) and spawn selected reviewers as parallel teammates via \`Task\` tool with \`team_name\`
3539
+ 5. Reviewers communicate findings to each other via \`SendMessage\`
3540
+ 6. Collect, consolidate, and deduplicate all findings
3541
+ 7. Classify by severity: P1 (critical/blocking), P2 (important), P3 (minor)
3542
+ 8. Use \`AskUserQuestion\` when severity is ambiguous or fix has multiple valid options
3543
+ 9. Create beads issues for P1 findings: \`bd create --title="P1: ..."\`
3544
+ 10. Fix all P1 findings before proceeding
3545
+ 11. Run \`/implementation-reviewer\` as mandatory gate
3546
+ 12. Capture novel findings with \`memory_capture\`; pattern-matcher auto-reinforces recurring issues
3530
3547
 
3531
3548
  ## Memory Integration
3532
3549
  - Call \`memory_search\` before review for known recurring issues
@@ -3556,6 +3573,13 @@ Perform thorough code review by spawning specialized reviewers in parallel, cons
3556
3573
  - docs-reviewer confirmed docs/ADR alignment
3557
3574
  - All P1 findings fixed before \`/implementation-reviewer\` approval
3558
3575
  - \`/implementation-reviewer\` approved as mandatory gate
3576
+
3577
+ ## PHASE GATE 4 -- MANDATORY
3578
+ Before starting Compound, verify review is complete:
3579
+ - \`/implementation-reviewer\` must have returned APPROVED
3580
+ - All P1 findings must be resolved
3581
+
3582
+ **CRITICAL**: Use \`memory_capture\` MCP tool for ALL lesson storage -- NOT MEMORY.md.
3559
3583
  `,
3560
3584
  compound: `---
3561
3585
  name: Compound
@@ -3567,6 +3591,9 @@ description: Reflect on the cycle and capture high-quality lessons for future se
3567
3591
  ## Overview
3568
3592
  Extract and store lessons learned during the cycle, and update project documentation. This is what makes the system compound -- each session leaves the next one better equipped.
3569
3593
 
3594
+ **CRITICAL**: Store all lessons via \`memory_capture\` MCP tool -- NOT via MEMORY.md, NOT via markdown files.
3595
+ Lessons go to \`.claude/lessons/index.jsonl\` through the MCP tool. MEMORY.md is a different system and MUST NOT be used for compounding.
3596
+
3570
3597
  ## Methodology
3571
3598
  1. Review what happened during this cycle (git diff, test results, plan context)
3572
3599
  2. Create an AgentTeam (\`TeamCreate\`) and spawn the 6 analysis agents as parallel teammates via \`Task\` tool with \`team_name\`:
@@ -3609,6 +3636,13 @@ Extract and store lessons learned during the cycle, and update project documenta
3609
3636
  - User confirmed high-severity items
3610
3637
  - Beads checked for related issues (\`bd\`)
3611
3638
  - Each item gives clear, concrete guidance for future sessions
3639
+
3640
+ ## FINAL GATE -- EPIC CLOSURE
3641
+ Before closing the epic:
3642
+ - Run \`ca verify-gates <epic-id>\` -- must return PASS for both gates
3643
+ - Run \`pnpm test\` and \`pnpm lint\` -- must pass
3644
+ If verify-gates fails, the missing phase was SKIPPED. Go back and complete it.
3645
+ CRITICAL: 3/5 phases is NOT success. All 5 phases are required.
3612
3646
  `
3613
3647
  };
3614
3648