# Repository Briefing: SethGammon/Citadel
> Source: https://repoforai.com/repo/SethGammon/Citadel (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/SethGammon/Citadel
- **Official Docs / Website**: https://sethgammon.github.io/Citadel/
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: JavaScript
- **License**: MIT
- **Engineering Health**: A+ (91/100 · Maintenance 35/35 · Adoption 16/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v1.4.5 (2026-11-04) — https://github.com/SethGammon/Citadel/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: MCP, CLI
- **Momentum**: 943 ★ total (+0 24h / +3 7d) · 85 forks
- **Topics**: `agent-orchestration`, `agent-workflow`, `ai-agents`, `claude-code-plugin`, `claude-plugins`, `codex-plugin`, `developer-tools`, `mcp`
- **When to Use**: Best for: Teams running multi-step Claude Code or Codex work in git that need repo-local handoffs, explicit approval stops, and reviewable evidence across agents or sessions. Skip if: Most work is a one-off edit, your existing host workflow is sufficient, or you need sandboxing, guaranteed savings, or proven improvements in task success.

## Overview
```text
### Architecture & Core Mechanics
Citadel is a JavaScript plugin layer for Claude Code and OpenAI Codex. Its package requires Node.js 22+ and exposes a `citadel` CLI. The source tree separates host integrations (`.claude-plugin/`, `.codex-plugin/`), lifecycle hooks (`hooks/`, `hooks_src/`), and MCP integration files (`.mcp.json`, `mcp-servers/`). The native marketplace handles plugin acquisition and executable-code trust; Citadel manages repository workflow state within the host's permissions.

`/do` matches exact commands against the normalized whole request. Larger requests assemble route candidates and require semantic classification by the host runtime before a workflow is selected. `.planning/` holds runs, evidence, handoffs, and telemetry, while `.citadel/scripts/` holds project-local coordination utilities. A fresh session can recover its next action from saved project state rather than relying on the previous conversation.

### Key Capabilities & Differentiators
The workflow moves through Request, Run, Evidence, Needs You, and Resume. Checks can report `passed`, `failed`, `blocked`, or `unknown`; missing evidence does not count as success. Parallel workflows use isolated git worktrees, explicit ownership, and shared discoveries. In Codex, agent models and reasoning effort can be set per family or per agent; `max` and `ultra` are available only where the chosen model supports them.

`/do test`, `/do build`, and `/do typecheck` require matching nonempty scripts in the target `package.json`. `/do --route /test-gen -- …` can select a route without bypassing activation or safety checks. Natural-language `/do preview` is more limited: it checks built-in candidates without reading active state, discovering project-local skills, or invoking the semantic classifier. It returns no executable route.

### Trade-offs & Limitations
Compared with using Claude Code or Codex directly, Citadel is most useful when work crosses sessions or worktrees and reviewers need to see what was checked and what blocked progress. The cost is another executable plugin plus local state and approval rules to maintain. Citadel is not a sandbox and does not replace repository instructions, human review, or branch protection. Local-by-default state and telemetry also do not change the host's model data path.

Do not build a cost or reliability case from the published experiments. Removing one matched timeout reversed the initial economic result, and a later profile maintained the verification rate while consuming more measured GPU energy. The outside-authored holdout verified 3/16 tasks with Citadel versus 2/16 with direct Claude, but the direct-Claude baseline was invalid. The hybrid pilot's 38.7% lower comparison cost was measured on one machine with one model pair and synthetic tasks—not as a reduction in subscription spend.

### Hardware & Deployment Guide
Start from the target git repository with Claude Code or Codex and Node.js 22+. Install the plugin through the host's native marketplace, pinning `v1.4.5` rather than substituting floating `main`. Reload plugins if Claude Code is already open; in Codex, start a fresh task and review the registered hooks through `/hooks`. Run `/do review README.md` as a smoke test. The Codex installer includes Windows readiness checks.

For offline or controlled installation, compare the release archive's SHA-256 with both the release manifest and the `.sha256` sidecar before extraction, then use the extracted directory as the immutable input to an adoption plan. v1.4.3 fixed plugin MCP paths and bound configuration recovery commands to the project root. v1.4.5 requires interactive, machine-local approval tied to the exact project and command for repository-configured typechecks and loop triggers or verifiers. For removal, `/unharness` produces a plan based on install receipts for review before it is applied with a plan token; legacy installs require an inventory and cannot promise exact removal.
```

## Key Capabilities
```text
- Routing: `/do` matches exact commands against the normalized whole request; larger requests go through runtime semantic classification.
- Preview boundary: Natural-language `/do preview` leaves `selected` and `command` null and sets `canRunNow` to false.
- Recovery state: `.planning/` holds campaigns, runs, evidence, handoffs, and telemetry; project state and telemetry stay local by default.
- Parallel work: Isolated git worktrees separate agent changes, with explicit ownership and shared discoveries.
- Release scope: The slim release ships 48 skills and 36 hook scripts across 29 lifecycle events; `npm run grant:verify` requires a full source checkout.
- Execution approvals: v1.4.5 requires machine-local approval for the exact project and command before repository-configured typechecks or loop triggers and verifiers can run.
```

## Quick Start / Clone
```bash
codex plugin marketplace add SethGammon/Citadel --ref v1.4.5
codex plugin add citadel@citadel-local
```
