A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
The operating layer for Claude Code + OpenAI Codex: persistent project memory, intent routing, safety hooks, cost teleme
Citadel is an open-source orchestration layer for Claude Code and OpenAI Codex.
It gives your coding agent durable project memory, /do intent routing, safety hooks, cost telemetry, and parallel agents in isolated git worktrees.
If CLAUDE.md and AGENTS.md tell the runtime what your project is, Citadel tells the runtime how to operate on it.
Install · See It Run · How It Works · Why It Exists · Roadmap
[!NOTE] The session above is illustrative, but every step in it is real behavior: the tier cascade, the marshal step chain, the
.planning/handoff, and/costtelemetry. Watch the router animate in the interactive demo, or run the copyable demo workflow in your own repo.
After installing, try this from your project root:
/do setup --express
/do next
/do review README.md
/do generate tests for the changed files
/cost
Citadel turns one-off coding-agent chats into repeatable engineering workflows. Claude Code and Codex are strong at local reasoning and code edits, but each session still needs project context, safe operating rules, task routing, and a way to continue work after context resets. Citadel is that harness layer.
| Claude Code / Codex alone | With Citadel | |
|---|---|---|
| Project context | Re-explained every session | Compiled memory in repo-local .planning/ files |
| Choosing a workflow | You pick review vs. debug vs. refactor | /do routes plain English to the lightest capable tool |
| Long-running work | Dies with the context window | Campaigns persist, resume, and hand off across sessions |
| Parallel work | Manual branch juggling | Fleet agents in isolated worktrees with shared discoveries |
| Safety rules | Prompt discipline, re-stated by hand | Lifecycle hooks enforce file protection and quality gates |
| Token spend | Guesswork | /cost and /dashboard from runtime-native telemetry |
Prerequisites: Claude Code or OpenAI Codex, Node.js 18+, and a git repository you want Citadel to manage.
Open your project in Claude Code or Codex and paste this install prompt:
Install Citadel in this repository.
Use https://github.com/SethGammon/Citadel as the source. If a local clone
already exists, reuse it or update it. Detect whether this session is running
in OpenAI Codex or Claude Code. From this project's root, run the matching
Citadel installer and follow any printed plugin enable step.
After Citadel is enabled in a fresh thread, run:
/do setup --express
Use the current repository as the target project. Do not require placeholder
path edits.
[!IMPORTANT] After the installer finishes, start a fresh session if the runtime asks for one, then run
/do setup --express. That is the command that matters: it auto-detects the project, installs hooks, scaffolds Citadel state, and gets you to a working/dowithout a tour.
Clone Citadel once:
git clone https://github.com/SethGammon/Citadel.git ~/Citadel
Then run exactly one installer from the target project root.
For OpenAI Codex:
node ~/Citadel/scripts/install.js --runtime codex --add-marketplace
For Claude Code:
node ~/Citadel/scripts/install.js --runtime claude --install --scope local
Then start a fresh session in the same project and run:
/do setup --express
[!TIP] For a copyable first-run walkthrough, see DEMO.md. For runtime-specific details, dry runs, and troubleshooting, see INSTALL.md.
Say what you want. /do routes it to the lightest workflow that can handle it.
Classification cascades through four tiers, cheapest first:
Most requests resolve before Tier 3. Whatever runs, the same loop closes around it:
flowchart LR
A["you: /do <task>"] --> R{"router<br/>tiers 0-3"}
R --> S["skill<br/>focused task"]
R --> M["marshal<br/>multi-step"]
R --> C["archon<br/>multi-session"]
R --> F["fleet<br/>parallel worktrees"]
S --> H["lifecycle hooks<br/>protect · verify · record"]
M --> H
C --> H
F --> H
H --> P[(".planning/ memory<br/>state · telemetry · handoffs")]
P -.->|"next session resumes"| R
Four tiers let Citadel scale from a one-line edit to a multi-session campaign. You never pick one; the router does.
| Capability | What you get | Docs |
|---|---|---|
| Durable memory | Campaigns, discoveries, intake, and telemetry live in .planning/, so work resumes after a fresh thread or context reset | Campaigns |
/do routing | Describe the task once; pattern, state, and keyword tiers resolve most requests for zero tokens | Routing preview |
| Safety hooks | 35 Node hook scripts across 29 lifecycle events protect files, gate risky actions, and record handoffs | Hooks |
| Cost telemetry | /cost and /dashboard show real token usage and session spend instead of guesses | Reports |
| Operator console | /do next is a decision-first cockpit: current state, next action, risk boundary, verification profile | Operating loop |
| Parallel fleets | Broad work decomposes across agents in isolated worktrees, with discoveries shared between waves | Fleet |
| Skills | 46 built-in skills covering review, refactor, tests, QA, telemetry, and setup; write your own in one file | Skills |
| Repeatable setup | Runtime-specific installers plus /do setup --express produce the same project state on Codex and Claude Code | Install |
Claude Code and Codex made local agentic development practical. The next problem is operational: making those agents reliable across real projects, repeated sessions, and larger tasks. Without a harness, you keep solving the same coordination problems by hand:
Citadel adds the missing layer around the runtime: persistent state, intent routing, lifecycle enforcement, telemetry, and coordinated multi-agent execution. The priority is reliability over novelty: easier to install, easier to verify, harder to misuse.
Everything described above ships in this repository:
npm test
The full plan with exit criteria lives in docs/ROADMAP.md. The arc: make the harness visible, prove it with numbers, then make it steerable.
.planning/ state: campaigns, fleet, loops, hooks, and dual-mode cost (dollars for API users, plan-window burn for subscribers). Spec in docs/DASHBOARD_SPEC.md.If you use Claude Code or Codex on a real repository and keep hitting context loss, repeated setup, weak handoffs, or manual coordination overhead, yes. Citadel is most useful once you have repeated workflows.
CLAUDE.md or AGENTS.md?Those files describe your project. Citadel adds the operating layer around the agent: routing, memory, hooks, telemetry, and parallel coordination.
No. Use /do and describe what you want. Direct skill commands are available when you want explicit control.
Skills cost zero when not loaded. Router tiers 0-2 are local checks; Tier 3 uses a small LLM classification only when needed. Use /cost to inspect real usage.
Yes. Hooks and scripts run on Node.js, and the Codex installer includes Windows readiness checks.
MIT
Universal Claude Code workflow plugin with agents, skills, hooks, and commands
Give Claude Code memory that evolves with your codebase via hooks and LLM-compiled knowledge
Blocks dangerous git and shell commands from being executed by AI coding agents
Rule enforcement plugin — save rules with natural language, enforce with 17 lifecycle hooks