commit-code
Review the files that have changed, and create a commit with a commit message summrizing the changes made. Always try to give…
**INFINITE AGENTIC LOOP COMMAND**
How it fires
How this command gets triggered: by you, by Claude, or both.
/infiniteContext preview
What this command does when you run it.
**INFINITE AGENTIC LOOP COMMAND**
**INFINITE AGENTIC LOOP COMMAND**
Think deeply about this infinite generation task. You are about to embark on a sophisticated iterative creation process.
**Variables:**
spec_file: $ARGUMENTS output_dir: $ARGUMENTS count: $ARGUMENTS
**ARGUMENTS PARSING:** Parse the following arguments from "$ARGUMENTS": 1. `spec_file` - Path to the markdown specification file 2. `output_dir` - Directory where iterations will be saved 3. `count` - Number of iterations (1-N or "infinite")
**PHASE 1: SPECIFICATION ANALYSIS** Read and deeply understand the specification file at `spec_file`. This file defines:
Think carefully about the spec's intent and how each iteration should build upon previous work.
**PHASE 2: OUTPUT DIRECTORY RECONNAISSANCE** Thoroughly analyze the `output_dir` to understand the current state:
**PHASE 3: ITERATION STRATEGY** Based on the spec analysis and existing iterations:
**PHASE 4: PARALLEL AGENT COORDINATION** Deploy multiple Sub Agents to generate iterations in parallel for maximum efficiency and creative diversity:
**Sub-Agent Distribution Strategy:**
**Agent Assignment Protocol:** Each Sub Agent receives: 1. **Spec Context**: Complete specification file analysis 2. **Directory Snapshot**: Current state of output_dir at launch time 3. **Iteration Assignment**: Specific iteration number (starting_number + agent_index) 4. **Uniqueness Directive**: Explicit instruction to avoid duplicating concepts from existing iterations 5. **Quality Standards**: Detailed requirements from the specification
**Agent Task Specification:**
TASK: Generate iteration [NUMBER] for [SPEC_FILE] in [OUTPUT_DIR] You are Sub Agent [X] generating iteration [NUMBER]. CONTEXT: - Specification: [Full spec analysis] - Existing iterations: [Summary of current output_dir contents] - Your iteration number: [NUMBER] - Assigned creative direction: [Specific innovation dimension to explore] REQUIREMENTS: 1. Read and understand the specification completely 2. Analyze existing iterations to ensure your output is unique 3. Generate content following the spec format exactly 4. Focus on [assigned innovation dimension] while maintaining spec compliance 5. Create file with exact name pattern specified 6. Ensure your iteration adds genuine value and novelty DELIVERABLE: Single file as specified, with unique innovative content
**Parallel Execution Management:**
**PHASE 5: INFINITE MODE ORCHESTRATION** For infinite generation mode, orchestrate continuous parallel waves:
**Wave-Based Generation:** 1. **Wave Planning**: Determine next wave size (3-5 agents) based on context capacity 2. **Agent Preparation**: Prepare fresh context snapshots for each new wave 3. **Progressive Sophistication**: Each wave should explore more advanced innovation dimensions 4. **Context Monitoring**: Track total context usage across all agents and main orchestrator 5. **Graceful Conclusion**: When approaching context limits, complete current wave and summarize
**Infinite Execution Cycle:**
WHILE context_capacity > threshold:
1. Assess current output_dir state
2. Plan next wave of agents (size based on remaining context)
3. Assign increasingly sophisticated creative directions
4. Launch parallel Sub Agent wave
5. Monitor wave completion
6. Update directory state snapshot
7. Evaluate context capacity remaining
8. If sufficient capacity: Continue to next wave
9. If approaching limits: Complete final wave and summarize**Progressive Sophistication Strategy:**
**Context Optimization:**
**EXECUTION PRINCIPLES:**
**Quality & Uniqueness:**
**Parallel Coordination:**
**Scalability & Efficiency:**
Agentic Coding with Claude Code, published by Packt
Review the files that have changed, and create a commit with a commit message summrizing the changes made. Always try to give…