infinite-agents-public/.claude/commands/infinite.md

3.3 KiB

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:

  • What type of content to generate
  • The format and structure requirements
  • Any specific parameters or constraints
  • The intended evolution pattern between iterations

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:

  • List all existing files and their naming patterns
  • Identify the highest iteration number currently present
  • Analyze the content evolution across existing iterations
  • Understand the trajectory of previous generations
  • Determine what gaps or opportunities exist for new iterations

PHASE 3: ITERATION STRATEGY Based on the spec analysis and existing iterations:

  • Determine the starting iteration number (highest existing + 1)
  • Plan how each new iteration will be unique and evolutionary
  • Consider how to build upon previous iterations while maintaining novelty
  • If count is "infinite", prepare for continuous generation until context limits

PHASE 4: GENERATION EXECUTION For each iteration to generate:

  1. Deep Context Analysis: Review the spec requirements and all previous iterations
  2. Evolutionary Planning: Plan how this iteration will advance beyond previous ones
  3. Unique Content Creation: Generate content that fulfills the spec while being distinctly new
  4. Quality Validation: Ensure the output meets spec requirements and adds value
  5. File Naming: Use the pattern specified in the spec with proper iteration suffixing

PHASE 5: INFINITE MODE HANDLING If count is "infinite":

  • Continue generating iterations until you approach context window limits
  • Monitor your remaining context capacity
  • Each iteration should become progressively more sophisticated
  • Maintain awareness of when to gracefully conclude the generation cycle
  • Provide a summary of all iterations created in the infinite run

EXECUTION PRINCIPLES:

  • Each iteration must be genuinely unique and valuable
  • Build upon previous work while introducing novel elements
  • Maintain consistency with the original specification
  • Ensure proper file organization and naming
  • Think deeply about the evolution trajectory
  • For infinite mode, optimize for maximum valuable output before context exhaustion

ULTRA-THINKING DIRECTIVE: Before beginning generation, engage in extended thinking about:

  • The deeper implications of the specification
  • How to create meaningful progression across iterations
  • What makes each iteration valuable and unique
  • The optimal strategy for infinite generation
  • How to balance consistency with innovation

Begin execution with deep analysis and proceed systematically through each phase.