Airsc is free for everyone. If it helps you, support it with $2–$20.

Support
AgentCautionAgent workflow & memoryAdvanced

claude_code_sub_agents

yzyydev · yzyydev/claude_code_sub_agents

A Claude Multi-Agent orchestration system that transforms single-threaded AI assistance into a distributed network of self-coordinating sub-agents for complex tasks.

Claude Multi-Agent: Iterative Sub-Agent Orchestration System - Transform single-threaded AI assistance into a distributed, self-coordinating agent network capable of handling tasks of arbitrary complexity and scale.

43 stars4License: No licenseUpdated last year0 opens

Preview

▍

What you can do with it

  • Orchestrate multiple Claude sub-agents to generate large volumes of content iteratively.
  • Distribute complex tasks among parallel sub-agents to break through traditional AI limitations.
  • Manage context windows and optimize state across multiple agent waves for scalability.

Safety check

Caution

Usable, but read the notes first.

  • ●No clear license: check with the author before using it in a commercial product.
  • ●Not updated for over a year.

Automated scan of the repo files. Always review code you run.

From the README

Claude Multi-Agent: Iterative Sub-Agent Orchestration System

A sophisticated project exploring the limits and capabilities of Claude Code for infinite-scale iterative task execution through parallel sub-agent coordination.

🎯 Project Overview

This project pushes the boundaries of what's possible with Claude Code by implementing a multi-agent orchestration system that can spawn and coordinate unlimited sub-agents to tackle complex, iterative tasks. The system demonstrates how to break through traditional single-agent limitations by leveraging Claude Code's command system for sophisticated parallel processing.

Core Innovation: Transform single-threaded AI assistance into a distributed, self-coordinating agent network capable of handling tasks of arbitrary complexity and scale.

🏗️ Architecture

The system is built around three core command modules in /.claude/commands/:

Command System Overview

/.claude/commands/
├── start.md    # Infinite agentic loop orchestrator
├── solve.md    # Specialized parallel case processor  
└── prime.md    # Context window management utilities

Each command implements sophisticated agent coordination patterns:

  • Wave-based Generation: Deploy agents in strategic batches to manage context limits
  • Parallel Task Distribution: Assign unique creative directions to maximize output diversity
  • Context Optimization: Progressive summarization and state management across agent waves
  • Quality Coordination: Ensure uniqueness and value across concurrent outputs

📋 Command Reference

/start - Infinite Agentic Loop

Purpose: General-purpose iterative content generation with unlimited scalability

Usage:

/start <spec_file> <output_dir> <count>

Parameters:

  • spec_file: Markdown specification defining content requirements
  • output_dir: Target directory for generated iterations
  • count: Number of iterations (1-N or "infinite")

Key Features:

  • Intelligent Agent Distribution: 1-5 agents for small tasks, batched deployment for larger scales
  • Parallel Coordination: Prevents duplicate concepts across concurrent streams
  • Context Management: Wave-based generation for sustained infinite output
  • Quality Assurance: Each iteration builds meaningfully on previous work

/solve - Legal Case Analysis Engine

Purpose: Parallel processing of legal scenarios with sophisticated analysis

Usage:

/solve <spec_file> <input_dir> <output_dir>

Parameters:

  • spec_file: Legal analysis specification (see specs/law_example.md)
  • input_dir: Directory containing legal scenario files
  • output_dir: Target directory for analysis outputs

Key Features:

  • Auto-scaling: Automatically detects input file count and deploys appropriate agent count
  • Specialized Assignment: Each agent receives unique legal scenario and analysis focus
  • Professional Output: Generates comprehensive legal analyses following IRAC methodology
  • Batch Processing: Handles 1-20+ legal cases simultaneously

/prime - Context Window Management

Purpose: Optimize context usage for extended agent sessions

Commands:

  • Lists project files for context awareness
  • Pre-loads essential documentation
  • Manages memory efficiency across agent waves

🚀 Usage Examples

Basic Iterative Generation

# Generate 5 iterations of content based on specification
/start specs/content_spec.md output/ 5

Infinite Mode Execution

# Run until context limits, generating maximum valuable output
/start specs/advanced_spec.md infinite_output/ infinite

Legal Case Analysis

# Process all legal scenarios in parallel
/solve specs/law_example.md example_input/ example_output/

🎯 Capabilities & Limits Demonstrated

What This System Achieves

Massive Parallel Processing:

  • Demonstrated with 10 simultaneous legal case analyses
  • Each agent maintains unique analytical perspective
  • Coordinated output prevents duplication while maximizing diversity

Context Window Optimization:

  • Strategic agent wave deployment prevents context saturation
  • Progressive summarization maintains state across infinite iterations
  • Intelligent pruning of non-essential details in later waves

Quality at Scale:

  • Each iteration/analysis maintains professional standards
  • Building sophistication across multiple agent generations
  • Coherent progression despite parallel execution

Tested Limits

Successful Scenarios:

  • ✅ 10 parallel legal analyses (complex, multi-page outputs)
  • ✅ Infinite mode content generation with quality maintenance
  • ✅ Cross-agent coordination preventing duplicate concepts
  • ✅ Professional-grade output across all parallel streams

Context Boundaries:

  • 🔄 Wave-based deployment successfully manages context limits
  • 🔄 Progressive sophistication strategies maintain quality over extended runs
  • 🔄 Graceful conclusion planning when approaching context capacity

📚 Legal Case Study Example

The project includes a complete legal education system demonstrating the multi-agent capabilities:

Input Dataset

  • 10 Legal Scenarios: Complex civilian law cases across multiple domains
  • Specification: Detailed requirements for legal analysis format and quality
  • Student Instructions: Comprehensive guidance for educational use

Generated Outputs

  • Professional Analyses: Each scenario processed by dedicated agent
  • IRAC Methodology: Issue identification, rule statement, application, conclusion
  • Unique Perspectives: Each agent brings distinct analytical approach
  • Educational Value: Suitable for law school curriculum integration

Sample Workflow

# Process all legal scenarios (example_input/) using legal specification
/solve specs/law_example.md example_input/ example_output/

# Result: 10 comprehensive legal analyses generated in parallel
# Each analysis: 2000+ words, professional quality, uni
View source on GitHub