LEGION

"My Name Is Legion, For We Are Many"

48 AI Specialist Personalities. 9 CLI Runtimes. One Coordinated Force.

Legion is a multi-CLI orchestrator that binds 48 specialist personalities into a single coordinated force. Engineers, designers, marketers, testers, product leads, project managers, and more — each with deep expertise, distinct voice, and hard-earned opinions. Speak the word, and the many answer as one.

48
Agents
9
Divisions
9
CLIs
17
Commands
31
Skills
0
Dependencies

Summon the Legion

Install with npx, open any project, and use the runtime-native Legion entry point.
Codex uses /project:legion-start; Gemini keeps /legion:start.

# Install for Claude Code
npx @9thlevelsoftware/legion --claude

# Or for other runtimes:
npx @9thlevelsoftware/legion --codex      # OpenAI Codex CLI
npx @9thlevelsoftware/legion --cursor     # Cursor
npx @9thlevelsoftware/legion --gemini     # Google Gemini CLI
# + copilot, kiro, windsurf, opencode, aider

# Then, in any project directory:
/project:legion-start    # Codex local install
/legion:start            # Gemini or Claude

The Forty-Eight

Not generic role labels. Each is a 155–677 line character sheet with deep expertise, communication style, hard rules, and personality quirks. When summoned, each receives its complete personality as instructions. Every agent includes structured metadata — languages, frameworks, artifact_types, review_strengths — for intelligent recommendation scoring.

9

Engineering

Full-stack, backend, frontend, AI, infrastructure/DevOps, mobile, prototyping, Laravel, security

6

Design

UI/UX, branding, visual storytelling, UX research, whimsy

4

Marketing

Content & social strategy, platform execution, growth, ASO

6

Testing

QA verification, performance, API testing, tool evaluation, workflow optimization

4

Product

Sprint planning, feedback synthesis, trend research, technical writing

5

Project Management

Coordination, portfolio, operations, experiments, production

4

Support

Finance, legal, executive summaries, support

6

Spatial Computing

VisionOS, XR, Metal, terminal integration, cockpit UI

4

Specialized

Orchestration, data analytics, LSP indexing, exploration (Polymath)

The Commands

Seventeen commands. Each a word of power.

CommandPurpose
/legion:startInitialize a new project with guided questioning flow
/legion:plan <N>Plan phase N with agent recommendations and wave-structured tasks
/legion:buildExecute current phase with parallel agent teams
/legion:reviewRun quality review cycle with testing/QA agents
/legion:statusShow progress dashboard and route to next action
/legion:quick <task>Run ad-hoc task with intelligent agent selection
/legion:advise <topic>Get read-only expert consultation from any personality
/legion:portfolioMulti-project dashboard with dependency tracking
/legion:milestoneMilestone completion, archiving, and metrics
/legion:agentCreate a new agent personality through guided workflow
/legion:explorePre-flight exploration — crystallize, onboard, compare, or debate
/legion:boardConvene board of directors for governance decisions
/legion:retroRun structured retrospective on completed phases or milestones
/legion:shipPre-ship checklist, PR creation, deployment verification, canary monitoring
/legion:learnRecord, recall, and manage project-specific patterns and preferences
/legion:updateCheck for updates and install latest version from npm
/legion:validateValidate state file integrity, schema conformance, and cross-references

The Rite of Execution

Each phase follows the sacred cycle: plan, build, review. Within each wave, agents work in parallel. Between waves, they synchronize.

/legion:explore Pre-flight → Crystallize, onboard, compare, or debate (optional)
/legion:start Guided questioning → PROJECT.md + ROADMAP.md
/legion:plan 1 Phase decomposition → Wave-structured plans + agents
/legion:build Parallel execution → Agents work in character, wave by wave
/legion:review Quality gate → Review → Fix → Re-review (max 3 cycles)
/legion:ship Ship pipeline → Pre-ship gates → PR creation → deployment verification
/legion:retro Retrospective → What worked, what didn't, reusable patterns
/legion:plan 2 Next phase → Repeat until the work is done

The Sacred Powers

Personality Injection

Each of the 48 agents is spawned with its complete 155–677 line character sheet as system instructions. Not a role label — an identity.

Wave Execution

Plans are grouped into dependency waves. Everything within a wave runs in parallel. File overlap detection and sequential_files prevent conflicts between parallel agents.

Hybrid Selection

The system recommends agents by scoring languages, frameworks, artifact_types, division affinity, and archetype-weighted past performance. You always confirm or override.

Domain Detection

Marketing phase? Campaign planning activates. Design phase? Three-lens review (brand + accessibility + usability). Engineering isn't the only workflow.

Quality Gates

Structured dev-QA loop: review → fix → re-review. Hard cap at 3 cycles. If it still fails, the problem is systemic — escalate to human.

Review Panels

2–4 domain-weighted reviewers with non-overlapping rubrics. Max 2 from any division. At least one tester on every panel. Diversity by design.

Plan Critique

Pre-mortem analysis assumes the phase has already failed, then works backward. Assumption hunting flags high-impact, weak-evidence beliefs.

Cross-Session Memory

Outcomes recorded after each cycle. During future planning, past performance boosts agent recommendations — with time-based decay so the system evolves.

Read-Only Advisory

/legion:advise spawns any personality as a read-only consultant. Full character, full expertise, zero risk. Tool-level enforcement via Explore agents.

Atomic Commits

Every completed plan produces an independent commit. If Plan 2 breaks something, roll it back without losing Plan 1. Clean revert boundaries.

Graceful Degradation

GitHub integration, memory, brownfield analysis, marketing workflows, design workflows, panels, critique — all opt-in. The core loop works without any of them.

Zero Runtime Dependencies

No custom CLI. No MCP server. No shell hooks. Zero runtime dependencies — npm is install-time only. Skills, commands, agents. Install with npx and go.

Plan Contracts

files_forbidden, expected_artifacts, and mandatory verification_commands in every plan. Provable completion, enforced scope boundaries, output contracts.

Control Modes

Four presets — autonomous, guarded, advisory, surgical — adjust how strictly authority matrix rules are enforced, from full freedom to file-level lockdown.

Observability

Decision logging in SUMMARY.md captures why agents were chosen. Cycle-over-cycle diffs in REVIEW.md track whether review rounds are making progress or spinning.

Explore Modes

/legion:explore offers crystallize, onboard, compare, and debate modes. Structured pre-flight exploration before committing to formal planning.

Intent Routing

Natural language intent parsing routes ambiguous inputs to the right command. Context-aware suggestions consider project state when recommending next actions.

Escalation Protocol

Structured <escalation> blocks with severity, type, and decision context. Forward-only handoff between waves. No agent acts outside its authority without documenting why.

v6.0 — Discipline & Intelligence

Twelve phases of improvements transform Legion from a working orchestration protocol into a disciplined, observable, and smarter one. Plans have contracts. Agents have metadata. Reviews leave audit trails. Authority has modes. Exploration has structure.

What Changed

  • Plan Schema Hardeningfiles_forbidden, expected_artifacts, mandatory verification_commands
  • Wave Safety — File overlap detection, sequential_files for single-agent access
  • Control Modes — autonomous / guarded / advisory / surgical presets
  • Observability — Decision logging in SUMMARY.md, cycle-over-cycle diff in REVIEW.md
  • Agent Metadatalanguages, frameworks, artifact_types, review_strengths on all 48 agents
  • Recommendation Engine v2 — Metadata-aware scoring, task_type in outcomes, archetype boosts
  • Adapter Conformance — Schema tests, cross-reference validation, max_prompt_size / known_quirks
  • Codebase Mapper — Dependency risk assessment, test coverage correlation in CODEBASE.md
  • Polymath Advanced — Onboard, compare, and debate modes in /legion:explore
  • Authority & Conflict — Escalation protocol, agent-to-agent communication conventions
  • Intent Routing v2 — Natural language parsing, context-aware suggestions
  • Integration & Release — Cross-platform checksums, full regression suite, version 6.0.0

v7.0 — Governance & Cross-CLI Dispatch

A governance layer and cross-CLI orchestration. Claude Code can now convene boards of directors for high-stakes decisions and dispatch work to Gemini CLI and Codex CLI based on capability matching.

What Changed

  • Board of Directors/legion:board meet for 5-phase deliberation (assess → discuss → vote → resolve → persist); /legion:board review for quick assessments
  • Cross-CLI Dispatch — Capability-based routing to Gemini (UI/UX, web research) and Codex (implementation, testing) with file-based handoff
  • Multi-Pass Evaluators — Code Quality (6 passes), UI/UX (7 passes), Integration (6 passes), Business Logic (6 passes)
  • Anti-Sycophancy Rules — No performative agreement, pushback expected, every finding needs file:line + what/why/how
  • Structured Review Requests — Auto-populated context from SUMMARY.md files
  • Dynamic Board Composition — Agent-registry assembles 3-5 directors per topic from the 48-agent pool, no fixed roles
  • Control-Mode-Aware Dispatch — External CLIs respect current control mode (read-only in surgical mode)

v7.1.0 — Shipping, Learning & Consolidation

Three new commands complete the core workflow loop: ship, retro, and learn. Agent roster tightened from 53 to 49 through four strategic merges.

What Changed

  • /legion:ship — Pre-ship checklist, PR creation, deployment verification, canary monitoring
  • /legion:retro — Structured retrospective with pattern extraction and plan feedback loop
  • /legion:learn — Project-specific memory: record, recall, and manage patterns and preferences
  • Agent Consolidation — 4 merges reduced roster from 53 to 49 (UX+Interaction, Social+Platform, PM+Senior PM, Content+Social)

v7.2.0 — Agent Depth, Security & Infrastructure

The largest single release: 61 files changed. Deep agent enrichment, security hardening, git worktrees, structured schemas, hooks integration, and extended thinking for planning. All new features default to off — zero behavioral change for existing users.

Agent Enrichment

10 thin agents (88–131 lines) enriched to 200–338 lines with domain-specific depth. Code review rubrics, spatial interaction patterns, growth experiment templates, and more.

Security Hardening

Dependency vulnerability scanning (6 ecosystems), secret detection (12+ patterns), supply chain checks, and post-execution boundary verification in authority-enforcer.

/legion:validate

State file integrity checker for .planning/ artifacts. Schema conformance, cross-reference validation, corruption detection. Supports --ci and --fix flags.

Git Worktrees

Opt-in filesystem isolation during parallel agent waves. Full lifecycle: create → spawn → merge with conflict detection → cleanup.

Structured Schemas

JSON Schema validation for plan frontmatter, summaries, outcomes records, and review findings at docs/schemas/.

Hooks Integration

Claude Code hooks for lifecycle automation: pre-build plan validation, post-build notification, pre-ship security gate. All opt-in with graceful degradation.

Extended Thinking

models.planning_reasoning enables deeper requirement analysis and wave ordering rationale in phase-decomposer and polymath-engine.

Quick — --fix

Inline review + PR creation in a single command. GitHub issue linking support. Replaces the proposed /legion:hotfix command.

Plan Auto-refine

--auto-refine on /legion:plan triggers automatic re-planning when critique returns CRITICAL findings. Max 2 cycles with user fallback.

Memory Pruning

OUTCOMES.md pruning with archive mechanism. Old outcomes compressed and archived, keeping active memory lean. Configurable thresholds and age limits.

Consolidation

Final agent merge: data-analytics-reporter + support-analytics-reporterdata-analytics-engineer. Roster now 48 agents across 9 divisions.

Adapter Maturity

OpenCode adapter enriched with model routing and troubleshooting. Aider downgraded to community-contributed tier with manual operation guide.

Dynamic Knowledge Index

Compressed directory index in AGENTS.md maps all 48 agents and 31 skills by division. “Prefer retrieval-led reasoning” directive eliminates LLM laziness during agent spawning. Based on Vercel’s Context Engineering research (100% tool-use vs. 53–79% for skills).

Standing on the Shoulders of Giants

Legion didn't emerge from the void. It cherry-picked the best patterns from proven orchestration systems, combined them into something greater than the sum of its parts, and left behind the complexity that made each hard to adopt.

Agency Agents

Took: The specialist personalities — 89–678 line character sheets with deep expertise, communication styles, hard rules, and personality quirks across 9 divisions. Started with 51 inherited + 2 Legion-native (53 total), consolidated to 48 via 5 merges across v7.1.0-v7.2.0. The foundation everything else stands on.

Left behind: Original "Agency" branding and namespace

GSD (Get Shit Done)

Took: Adaptive questioning flow (vision → requirements → constraints), orchestrator/subagent split, human-readable .planning/ state management.

Left behind: 33+ workflow files, custom CLI tooling, complex config

Conductor

Took: Build → review → fix evaluate-loop, quality gates, parallel dispatch pattern, typed evaluators for different work.

Left behind: Board-of-directors governance, message bus IPC, 50+ iteration limits

Shipyard

Took: Wave-based execution, max 3 tasks per plan constraint, atomic commits per completed plan.

Left behind: 29 commands, checkpoint/rollback system, complex hook infrastructure

Best Practice Config

Took: Plugin architecture (commands → skills → agents), agent frontmatter schema, structured metadata for programmatic catalog.

Left behind: RPI workflow, custom hooks infrastructure

Daem0n-MCP

Took: Semantic memory architecture — store, recall, decay primitives. Compute decay at recall time, not destructively. Full history always preserved.

Left behind: Hook-driven architecture, MCP server dependency

Feature-dev

Took: Confidence-based review filtering (80%+), competing architecture designs (2–3 approaches), 3-agent model.

Left behind: No state persistence, no memory, no quick mode

code-foundations

Took: Anti-rationalization tables, evidence-backed checklists, scope discipline.

Left behind: 614-check pipeline, heavy token consumption

beads

Took: Git-native state, ready primitive, semantic compaction, actor-based audit trails.

Left behind: Scope creep, MEOW naming, $100+/hour cost

Auto-Claude

Took: Worktree isolation, multi-stage spec pipeline, semantic merge, dynamic security profiles.

Left behind: 1,751 files, Python-Electron split, 50-iteration QA

bjarne

Took: Verification points, stale loop detection, environment auto-remediation, verbose output redirection.

Left behind: 2,500 lines of Bash, zero tests

Puzld.ai

Took: DPO preference extraction, debate-with-winner-tracking, clean adapter pattern.

Left behind: Near-zero test coverage, 95 releases in 3 months

The Tithe

The Legion asks not for blood, but for sustenance.
Those who have commanded the many and found them worthy
may offer tribute, that the voices may continue to serve.

Make an Offering

Your sacrifice sustains the many.