From claude-commands
Iteratively achieves a goal through a convergence loop of strategic planning, confidence assessment, and autonomous execution. Optimizes context using a command index for efficiency.
How this command is triggered — by the user, by Claude, or both
Slash command
/claude-commands:convergecommands/The summary Claude sees in its command listing — used to decide when to auto-load this command
## ⚡ EXECUTION INSTRUCTIONS FOR CLAUDE **When this command is invoked, YOU (Claude) must execute these steps immediately:** **This is NOT documentation - these are COMMANDS to execute right now.** **Use TodoWrite to track progress through multi-phase workflows.** ## 🚨 EXECUTION WORKFLOW ### Phase 1: 🗺️ CONVERGENCE LOOP (9-STEP CYCLE) **Action Steps:** **LOOP UNTIL CONVERGED OR MAX ITERATIONS REACHED (Default: 10 iterations)**: ### Phase 2: Step 2: Strategic Planning and Tool Analysis **Action Steps:** **Command**: `/planexec` - Create comprehensive strategy with command index optimiz...
When this command is invoked, YOU (Claude) must execute these steps immediately: This is NOT documentation - these are COMMANDS to execute right now. Use TodoWrite to track progress through multi-phase workflows.
Action Steps: LOOP UNTIL CONVERGED OR MAX ITERATIONS REACHED (Default: 10 iterations):
Action Steps:
Command: /planexec - Create comprehensive strategy with command index optimization
Action Steps: Action: Review the plan using strategic analysis with confidence scoring
Action Steps: AUTONOMOUS APPROVAL: All plans are automatically approved and proceed without human intervention
Action Steps:
Command: /cerebras - Fast high-quality code generation using direct Cerebras API script (NOT Gemini MCP)
cerebras/cerebras_direct.sh (relative to cerebras.md location)Action Steps:
Command: /converge --validate against the goals - Objective success measurement
Action Steps:
Command: /status - Generate comprehensive convergence status report with confidence data
docs/pr-guidelines/{PR_NUMBER}/convergence-status-{timestamp}.mdAction Steps: LOOP CONTROL: Start again with Step 1 (Goal Definition) and loop N times or stop when it's done
🚨 MANDATORY AUTONOMY CHECKPOINT: Before making convergence decision, verify autonomy preservation:
Convergence Decision Logic: 5. IF CONVERGED: All PRIMARY success criteria met → STOP with completion report 6. PR is MERGEABLE status (not conflicting) 7. All SERIOUS GitHub comments addressed (blocking issues resolved) 8. CI passes (no failed checks) 9. No critical errors or failures detected 10. IF GOOD ENOUGH: Core objectives achieved even if minor issues remain → STOP 11. Primary goal accomplished (90%+ criteria met) 12. Diminishing returns threshold reached (last 2 iterations <5% improvement) 13. PR is in good mergeable state with only cosmetic issues remaining
Threshold Definitions: 14. "90%+ criteria met": Calculate as (number of primary success criteria achieved) / (total number of primary success criteria). For example, if there are 10 criteria and 9 are met, progress = 90%. Criteria may include PR mergeability, CI passing, blocking comments resolved, etc. 15. "Last 2 iterations <5% improvement": Measure progress using a quantifiable validation score (e.g., percentage of criteria met, CI pass rate, or resolved blocking issues). If the increase in score between the last two iterations is less than 5% (e.g., from 88% to 90%), this threshold is considered reached. 16. Example: If in iteration 8, 8/10 criteria are met (80%), and in iteration 9, 9/10 are met (90%), the improvement is 10%. If in iteration 10, 9.5/10 are met (95%), the improvement is 5%. If subsequent iterations show <5% improvement, convergence is triggered. 17. IF STALLED: No meaningful progress in validation for 2+ iterations → STOP with stall report 18. Same validation scores for 2+ consecutive iterations 19. Unable to improve PR mergeability status 20. Repeated execution failures on same issue 21. IF IMPROVING: Meaningful progress on PRIMARY criteria → Continue (up to 2 more iterations, but never exceeding the hard cap) 22. Measurable improvement in PR status or CI state 23. Successful resolution of blocking GitHub comments 24. NOTE: The hard cap of 10 iterations always applies, overriding all other limits 25. IF MAX ITERATIONS: Absolute limit reached → STOP with partial report
🔒 AUTONOMY PRESERVATION: No user intervention allowed during convergence decision process
PR CONTEXT AWARENESS: When goal involves PR work: 26. Primary success = PR is MERGEABLE on current branch 27. ❌ NEVER create additional PRs as "solutions" 28. ✅ ALWAYS work within existing PR constraints 29. ✅ STAY ON CURRENT BRANCH throughout convergence
Action Steps: Eliminated User Dependencies:
Action Steps: Command Selection Protocol: Choose appropriate slash command for each task type:
/cerebras - Fast high-quality code generation via direct Cerebras API script (cerebras/cerebras_direct.sh relative to cerebras.md) - NOT Gemini MCP/copilot - Complete PR comment processing/test - Run and fix failing tests/orch - Delegate to orchestration agents/execute - Break down complex goalsAction Steps:
Achieve complex goals through autonomous plan-execute-validate-learn cycles until success criteria are met.
/converge <goal> - Start converging toward a specific goal/converge --max-iterations N - Set custom iteration limit (default: 10)/converge --goal-integration - Use /converge command for structured goal definition/converge - Resume previous convergence if interruptedLoop: Autonomous plan→execute→validate→learn cycles
Until: Success criteria fully met
FULLY AUTONOMOUS SYSTEM: /converge implements a completely autonomous, self-improving system through recursive goal achievement with persistent learning and systematic iteration. ZERO USER INTERVENTION required after initial goal statement.
MANDATORY: All /converge operations must use structured goal integration
Command: /converge - Define goal with structured success criteria and validation framework
Command: Goal Processing - Intelligently define goals with smart defaults and autonomous analysis
Command: /guidelines to update the documentation if mistakes/learnings were made
/converge operates with ZERO USER INTERVENTION after initial goal statement:
Intelligent Assumptions: System applies reasonable defaults when information is unclear:
Self-Improving Intelligence Markers:
System Architecture Patterns:
Convergence Indicators:
Termination Conditions:
Completion Report Generation:
/converge Implement PR #1307 roadmap - close 5 PRs, create 7 focused PRs, fix 6 existing PRs
Result: Autonomously closes obsolete PRs, creates new focused PRs, and fixes existing ones
/converge Make all tests pass in the repository
Result: Iteratively fixes failing tests until 100% pass rate
/converge Implement complete authentication system with tests and documentation
Result: Builds feature incrementally with validation at each step
Context-Efficient File Loading: Load files only when needed for execution, not during planning
**Planning Phase** (Steps 1-3):
- Goal Processing: Use independent agent (5K tokens max)
- Command Discovery: Use command index (71K chars vs 677K chars)
- Plan Review: Work with summaries only
- Context Usage: ~80K tokens (vs 200K+ traditional)
**Execution Phase** (Steps 5+):
- Command Details: Load full .md files only when executing specific commands
- File Operations: Read files on-demand during actual operations
- Resource Usage: Targeted loading based on execution needs
- Context Management: Release completed context between iterations
89.5% Context Reduction in Command Discovery:
/tmp/converge/{branch}/command-cache/index.jsonIndependent Processing Agents:
Filesystem-Based Coordination:
/tmp/converge/{branch_name}/
├── session-{timestamp}/
│ ├── goal-spec.json # Goal processor output
│ ├── execution-plan.json # Planning phase results
│ ├── current-state.json # Progress tracking
│ └── results/ # Execution outputs
└── command-cache/ # Command index system
└── index.json
CRITICAL: /converge achieves goals by systematically calling other slash commands:
/execute: Planning, analysis, validation, and coordination/cerebras: High-speed code/script/document generation via direct Cerebras API script (cerebras/cerebras_direct.sh relative to cerebras.md) - NOT Gemini MCP/copilot: Complete PR review and comment processing/test: Test execution and failure resolution/orch: Complex multi-agent task orchestration/pushl: Git operations and PR creationGoal Type → Command Selection:
- Code generation → /cerebras
- PR processing → /copilot
- Test management → /test
- Multi-step automation → /orch
- Planning/validation → /execute
**Command**: /commandname - Clear purpose and expected outcome
- Specific parameters and context
- Expected result verification
- Integration with next phase
Command: /converge Create a complete Python testing suite with test_math.py, test_utils.py, and run all tests successfully
Command: /execute - Analyze goal and create plan
Command: /cerebras - Generate test_math.py with basic math function tests
Command: /cerebras - Generate test_utils.py with utility function tests
Command: /test - Run pytest and check results
Command: /cerebras - Generate missing math.py implementation
Command: /test - Re-run pytest
# Command-line configuration
/converge "goal statement" --max-iterations 15
# Per-goal configuration via /converge integration
/converge "complex implementation task" --max-iterations 20
/converge --goal-integration
# Emergency termination conditions
- Manual interruption (Ctrl+C)
- Resource exhaustion (context/API limits)
- Blocking external dependencies
- Maximum time exceeded
# Convergence Complete: PR #1307 Implementation
## Goal
Implement PR #1307 roadmap with 18 PR operations
## Iterations: 3
1. Closed obsolete PRs (5/5 ✅)
2. Created focused PRs (7/7 ✅)
3. Fixed existing PRs (6/6 ✅)
## Success Criteria Met
- ✅ All obsolete PRs closed
- ✅ 7 new focused PRs created
- ✅ All KEEP PRs passing CI
- ✅ No merge conflicts
## Time: 45 minutes
## Status: CONVERGED ✅
Universal Composition: /converge systematically calls other slash commands using explicit "Command: /commandname" pattern
Iterative Convergence: Continues plan→execute→validate→learn cycles until ALL success criteria met
Measurable Success: Verifies completion objectively, not through assumption
Command Integration: Uses appropriate specialist commands (/cerebras, /copilot, /test, /orch) based on goal type
Remember: /converge achieves goals by orchestrating other slash commands intelligently, not by trying to do everything itself. It's a meta-command that coordinates specialized tools until convergence is achieved.
npx claudepluginhub jleechanorg/claude-commands --plugin claude-commands/implementExecutes a single task through implementation, quality gates, and PR creation. Accepts plan documents, GitHub issues, or free-form descriptions.
/swarmRuns a fully autonomous pipeline from prompt to pull request: creates an isolated worktree, implements feature stories with fresh context per story, runs 4-agent parallel review, auto-fixes CRITICAL/HIGH issues, and opens a PR. Supports GitHub issues and manual PRD files.
/SKILLExecutes implementation plans from a specified or auto-detected folder using Superpower Loop, agent teams for task creation, parallel batch execution, verification, and git commits.
/autoAnalyzes task and auto-executes optimal strategy: direct execution, hybrid PRD generation, worktree development, or mega-plan orchestration. Supports --flow quick/standard/full.
/workflowOrchestrates a full multi-agent development pipeline: design, planning, plan review, implementation, and code review. Produces tested, reviewed code with commit and pipeline metrics.
/fire-loopStarts a self-iterating autonomous loop with circuit breaker, error classification, and context-aware execution until a task is completed or a safety limit is reached.