back to home

SethGammon / Citadel

Agent orchestration harness for Claude Code. Four-tier routing (/do), campaign persistence across sessions, parallel agents in isolated worktrees, discovery relay between waves, lifecycle hooks, circuit breaker, and 6 production-quality skills. From solo developer to institutional scale.

View on GitHub
132 stars
14 forks
0 issues
JavaScript

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing SethGammon/Citadel in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/SethGammon/Citadel)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

Citadel — Agent Orchestration Harness for Claude Code Run autonomous coding campaigns with Claude Code. Route any task through the right tool at the right scale — from a one-line fix to a multi-day parallel campaign. **24 skills | 3 autonomous agents | 8 lifecycle hooks | campaign persistence | fleet coordination** Quickstart **Prerequisites:** Claude Code + Node.js 18+ Windows? Use PowerShell or Command Prompt instead **PowerShell:** **Command Prompt:** That's it. Full install guide → Try These First Say what you want. routes it to the cheapest tool that can handle it. How It Works You type what you want. classifies your intent and picks the cheapest tool that can handle it — no menus, no flags, no routing decisions on your end. Simple tasks get simple tools. Complex tasks get campaigns with phases, verification, and self-correction. You never have to choose. The Orchestration Ladder Four tiers. Use the cheapest one that fits. Skills (24) App Creation (3) | Skill | What It Does | Invoke | |---|---|---| | PRD | Generates a Product Requirements Document from an app description | | | Architect | Converts a PRD into file tree, build phases, and end conditions | | | Create App | End-to-end app creation with 5 tiers: blank, guided, templated, generated, or feature addition | | Core (6) | Skill | What It Does | Invoke | |---|---|---| | Code Review | 5-pass structured review (correctness, security, performance, readability, consistency) | | | Test Generation | Generates tests that run. Detects your framework, iterates up to 3x on failures. | | | Documentation | Function-level, module-level, or API reference. Matches your doc style. | | | Refactoring | Safe multi-file refactoring. Typechecks before and after. Reverts on failure. | | | Scaffolding | Project-aware file generation. Reads your conventions and matches them. | | | Skill Creator | Creates new skills from your repeating patterns. | | Research & Debugging (4) | Skill | What It Does | Invoke | |---|---|---| | Research | Structured investigation with confidence levels and sources | | | Research Fleet | Parallel multi-scout research with wave compression | | | Experiment | Optimization loops with scalar fitness functions in isolated worktrees | | | Systematic Debugging | 4-phase root cause analysis. Emergency stop after 2 failed fixes. | | Orchestration (5) | Skill | What It Does | Invoke | |---|---|---| | | Universal router — classifies intent and dispatches to cheapest capable path | | | Marshal | Single-session orchestrator. Chains skills autonomously. | | | Archon | Multi-session campaigns with self-correction and quality gates | | | Fleet | Parallel agents with discovery sharing and coordination safety | | | Autopilot | Intake-to-delivery pipeline for pending work items | | Quality & Verification (3) | Skill | What It Does | Invoke | |---|---|---| | Design | Generates and maintains a design manifest for visual consistency | | | QA | Browser-based interaction testing via Playwright (optional dependency) | | | Postmortem | Auto-generates structured postmortems from completed campaigns | | Utilities (3) | Skill | What It Does | Invoke | |---|---|---| | Live Preview | Mid-build visual verification via screenshots | | | Session Handoff | Context transfer between sessions | | | Setup | First-run harness configuration | | Hooks (8) Automated quality enforcement that runs without you thinking about it. | Hook | When | What It Does | |---|---|---| | Per-file typecheck | Every edit | Catches type errors at write-time, design manifest deviations | | Circuit breaker | Tool failure | After 3 failures: "try a different approach" | | Quality gate | Session end | Scans for anti-patterns in modified files | | Intake scanner | Session start | Reports pending work items | | File protection | Before edit/read | Blocks edits to protected files, blocks reads on .env secrets | | Pre-compaction save | Before context compaction | Saves session state so nothing is lost | | Post-compaction restore | After context compaction | Restores session state from saved snapshot | | Worktree setup | Agent spawn | Auto-installs deps in parallel agent worktrees | Sub-Agents (4) Specialized agents that Archon and Fleet spawn as sub-processes. You don't invoke these directly — they're internal workers. | Agent | What It Does | |---|---| | Archon | Autonomous campaign executor — decomposes phases, delegates, reviews, self-corrects | | Fleet | Parallel coordinator — runs 2-3 agents in isolated worktrees per wave | | Arch Reviewer | Read-only architecture auditor — checks boundary violations and import rules | | Knowledge Extractor | Extracts reusable patterns and decisions from completed work into the knowledge base | Campaign Persistence Work survives across sessions. Close the terminal, come back tomorrow, picks up where you left off. Campaigns track phases, decisions, feature status, and continuation state in markdown files. See docs/CAMPAIGNS.md. Fleet Parallelism Run 2-3 agents simultaneously in isolated worktrees. Discoveries compress into ~500-token briefs and relay between waves. See docs/FLEET.md. FAQ **How is this different from CLAUDE.md?** — CLAUDE.md tells Claude about your project. The harness tells Claude *how to work*: routing, persistence, quality enforcement, parallel coordination. **Do I need to learn all 24 skills?** — No. Just use and describe what you want in plain English. The router picks the right skill. You can go months without ever typing a skill name directly. **What if routes to the wrong tool?** — Tell it. "Wrong tool" or "just do it yourself" and it adjusts. You can also invoke any skill directly: , , etc. The router is a convenience, not a gate. **How much does it cost in tokens?** — Skills cost zero when not loaded. The router costs ~500 tokens only at Tier 3. Hooks add ~100 tokens per edit. The main cost is the work itself. **Can I use this with other AI tools?** — Designed for Claude Code specifically. T…