Skip to content

feat: add --swarm flag to /review-pr and /fix-ci#12

Merged
iamladi merged 5 commits intomainfrom
feat/swarm-mode-review-pr-fix-ci
Feb 9, 2026
Merged

feat: add --swarm flag to /review-pr and /fix-ci#12
iamladi merged 5 commits intomainfrom
feat/swarm-mode-review-pr-fix-ci

Conversation

@iamladi
Copy link
Owner

@iamladi iamladi commented Feb 9, 2026

Summary

  • Add --swarm flag to /review-pr for parallel specialized PR review
    • 4 reviewer teammates: Security, Performance, Test Coverage, Architecture
    • Cross-concern findings shared between reviewers via SendMessage
    • Consolidated review with attribution markers ([Security], [Performance], etc.)
  • Add --swarm flag to /fix-ci (ci-fix-loop) for parallel error fixing
    • Errors partitioned by file path after centralized analysis
    • One teammate per file partition (max 4), lead collects into single commit
    • Falls through to sequential for single-file errors
  • Graceful fallback to standard workflow when agent teams unavailable
  • Constitution-compliant reasoning-based constraints with judgment criteria for severity

Part of cross-repo --swarm expansion: agent-teams-expansion plan

Related PRs: primitives-plugin, workflows-plugin, sdlc-plugin (same feature across repos)

Test plan

  • Invoke /review-pr <number> --swarm with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
  • Invoke /fix-ci --swarm with multi-file CI failures
  • Verify fallback to standard workflow without the env var
  • Verify bun run validate passes

Add parallel team-based fixing capability to CI fix loop:
- Add --swarm flag to "When to Use" section
- Add Argument Parsing section for flag extraction
- Modify Step 2.5 with conditional swarm logic:
  * Use team only if 2+ files with errors AND --swarm set
  * Partition errors by file (max 4 teammates)
  * Teammates restricted to file editing only
  * Lead collects changes in single commit
  * Team created/torn down within iteration
- Update Step 2.6 to note swarm handles commit/push
- Add swarm constraints to Safety Mechanisms

Phase 3 of agent-teams-expansion plan
Phase 2 of agent-teams-expansion: Add parallel team-based PR review

- Add Argument Parsing section to extract --swarm flag
- Add Mode Selection section to route between workflows
- Add comprehensive Swarm Workflow with 4 specialized reviewers
  - Security Reviewer: OWASP, injection, auth/authz, secrets
  - Performance Reviewer: algorithmic complexity, N+1, caching
  - Test Coverage Reviewer: adequacy, edge cases, quality
  - Architecture Reviewer: SOLID, design patterns, API design
- Each reviewer includes cross-concern finding protocol
- Add Completion Protocol with 10-min timeout
- Add Consolidation section with attribution markers
- Add Resource Cleanup with TeamDelete
- Rename existing workflow to "Standard Workflow"
- Preserve all existing Standard Workflow content unchanged
Version bump for --swarm flag additions to /review-pr and /fix-ci.
Replace bare "CRITICAL CONSTRAINTS" blocks with reasoning-based constraints
across all 4 reviewer teammate templates and ci-fix-loop teammate template.
Replace exhaustive review checklists with judgment criteria for severity.
Replace rigid FINDINGS FORMAT with judgment-guided FINDINGS GUIDANCE.
Keep 1.5.0 version, incorporate 1.4.1 changelog entry from main.
@iamladi iamladi merged commit d95972a into main Feb 9, 2026
1 check passed
@iamladi iamladi deleted the feat/swarm-mode-review-pr-fix-ci branch February 9, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant