"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.
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
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.
Full-stack, backend, frontend, AI, infrastructure/DevOps, mobile, prototyping, Laravel, security
UI/UX, branding, visual storytelling, UX research, whimsy
Content & social strategy, platform execution, growth, ASO
QA verification, performance, API testing, tool evaluation, workflow optimization
Sprint planning, feedback synthesis, trend research, technical writing
Coordination, portfolio, operations, experiments, production
Finance, legal, executive summaries, support
VisionOS, XR, Metal, terminal integration, cockpit UI
Orchestration, data analytics, LSP indexing, exploration (Polymath)
Seventeen commands. Each a word of power.
| Command | Purpose |
|---|---|
| /legion:start | Initialize a new project with guided questioning flow |
| /legion:plan <N> | Plan phase N with agent recommendations and wave-structured tasks |
| /legion:build | Execute current phase with parallel agent teams |
| /legion:review | Run quality review cycle with testing/QA agents |
| /legion:status | Show 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:portfolio | Multi-project dashboard with dependency tracking |
| /legion:milestone | Milestone completion, archiving, and metrics |
| /legion:agent | Create a new agent personality through guided workflow |
| /legion:explore | Pre-flight exploration — crystallize, onboard, compare, or debate |
| /legion:board | Convene board of directors for governance decisions |
| /legion:retro | Run structured retrospective on completed phases or milestones |
| /legion:ship | Pre-ship checklist, PR creation, deployment verification, canary monitoring |
| /legion:learn | Record, recall, and manage project-specific patterns and preferences |
| /legion:update | Check for updates and install latest version from npm |
| /legion:validate | Validate state file integrity, schema conformance, and cross-references |
Each phase follows the sacred cycle: plan, build, review. Within each wave, agents work in parallel. Between waves, they synchronize.
Each of the 48 agents is spawned with its complete 155–677 line character sheet as system instructions. Not a role label — an identity.
Plans are grouped into dependency waves. Everything within a wave runs in parallel. File overlap detection and sequential_files prevent conflicts between parallel agents.
The system recommends agents by scoring languages, frameworks, artifact_types, division affinity, and archetype-weighted past performance. You always confirm or override.
Marketing phase? Campaign planning activates. Design phase? Three-lens review (brand + accessibility + usability). Engineering isn't the only workflow.
Structured dev-QA loop: review → fix → re-review. Hard cap at 3 cycles. If it still fails, the problem is systemic — escalate to human.
2–4 domain-weighted reviewers with non-overlapping rubrics. Max 2 from any division. At least one tester on every panel. Diversity by design.
Pre-mortem analysis assumes the phase has already failed, then works backward. Assumption hunting flags high-impact, weak-evidence beliefs.
Outcomes recorded after each cycle. During future planning, past performance boosts agent recommendations — with time-based decay so the system evolves.
/legion:advise spawns any personality as a read-only consultant. Full character, full expertise, zero risk. Tool-level enforcement via Explore agents.
Every completed plan produces an independent commit. If Plan 2 breaks something, roll it back without losing Plan 1. Clean revert boundaries.
GitHub integration, memory, brownfield analysis, marketing workflows, design workflows, panels, critique — all opt-in. The core loop works without any of them.
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.
files_forbidden, expected_artifacts, and mandatory verification_commands in every plan. Provable completion, enforced scope boundaries, output contracts.
Four presets — autonomous, guarded, advisory, surgical — adjust how strictly authority matrix rules are enforced, from full freedom to file-level lockdown.
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.
/legion:explore offers crystallize, onboard, compare, and debate modes. Structured pre-flight exploration before committing to formal planning.
Natural language intent parsing routes ambiguous inputs to the right command. Context-aware suggestions consider project state when recommending next actions.
Structured <escalation> blocks with severity, type, and decision context. Forward-only handoff between waves. No agent acts outside its authority without documenting why.
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.
files_forbidden, expected_artifacts, mandatory verification_commandssequential_files for single-agent accesslanguages, frameworks, artifact_types, review_strengths on all 48 agentstask_type in outcomes, archetype boostsmax_prompt_size / known_quirks/legion:exploreA 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.
/legion:board meet for 5-phase deliberation (assess → discuss → vote → resolve → persist); /legion:board review for quick assessmentsThree new commands complete the core workflow loop: ship, retro, and learn. Agent roster tightened from 53 to 49 through four strategic merges.
/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 preferencesThe 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.
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.
Dependency vulnerability scanning (6 ecosystems), secret detection (12+ patterns), supply chain checks, and post-execution boundary verification in authority-enforcer.
/legion:validateState file integrity checker for .planning/ artifacts. Schema conformance, cross-reference validation, corruption detection. Supports --ci and --fix flags.
Opt-in filesystem isolation during parallel agent waves. Full lifecycle: create → spawn → merge with conflict detection → cleanup.
JSON Schema validation for plan frontmatter, summaries, outcomes records, and review findings at docs/schemas/.
Claude Code hooks for lifecycle automation: pre-build plan validation, post-build notification, pre-ship security gate. All opt-in with graceful degradation.
models.planning_reasoning enables deeper requirement analysis and wave ordering rationale in phase-decomposer and polymath-engine.
--fixInline review + PR creation in a single command. GitHub issue linking support. Replaces the proposed /legion:hotfix command.
--auto-refine on /legion:plan triggers automatic re-planning when critique returns CRITICAL findings. Max 2 cycles with user fallback.
OUTCOMES.md pruning with archive mechanism. Old outcomes compressed and archived, keeping active memory lean. Configurable thresholds and age limits.
Final agent merge: data-analytics-reporter + support-analytics-reporter → data-analytics-engineer. Roster now 48 agents across 9 divisions.
OpenCode adapter enriched with model routing and troubleshooting. Aider downgraded to community-contributed tier with manual operation guide.
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).
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.
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
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
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
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
Took: Plugin architecture (commands → skills → agents), agent frontmatter schema, structured metadata for programmatic catalog.
Left behind: RPI workflow, custom hooks infrastructure
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
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
Took: Anti-rationalization tables, evidence-backed checklists, scope discipline.
Left behind: 614-check pipeline, heavy token consumption
Took: Git-native state, ready primitive, semantic compaction, actor-based audit trails.
Left behind: Scope creep, MEOW naming, $100+/hour cost
Took: Worktree isolation, multi-stage spec pipeline, semantic merge, dynamic security profiles.
Left behind: 1,751 files, Python-Electron split, 50-iteration QA
Took: Verification points, stale loop detection, environment auto-remediation, verbose output redirection.
Left behind: 2,500 lines of Bash, zero tests
Took: DPO preference extraction, debate-with-winner-tracking, clean adapter pattern.
Left behind: Near-zero test coverage, 95 releases in 3 months
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.
Your sacrifice sustains the many.