architect
Given a PRD, produces an implementation architecture: file tree, component breakdown, data model, and a phased build plan with end conditions that Archon can…
Continuous autonomous operation mode. Keeps campaigns running 24/7 by chaining Claude Code sessions via RemoteTrigger. Each session picks up from the campaign's continuation state, works until context runs low or the phase completes, then schedules the next session. Auto-stops
$ npx -y skills add SethGammon/Citadel --skill daemon --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/daemonContext preview
The summary Claude sees to decide when to auto-load this skill.
Continuous autonomous operation mode. Keeps campaigns running 24/7 by chaining Claude Code sessions via RemoteTrigger. Each session picks up from the campaign's continuation state, works until context runs low or the phase completes, then schedules the next session. Auto-stops
name: daemon license: MIT description: >- Continuous autonomous operation mode. Keeps campaigns running 24/7 by chaining Claude Code sessions via RemoteTrigger. Each session picks up from the campaign's continuation state, works until context runs low or the phase completes, then schedules the next session. Auto-stops on campaign completion or budget exhaustion. The thing that makes Citadel run overnight. user-invocable: true auto-trigger: false trigger_keywords: - daemon - continuous - run overnight - keep running - 24/7 - unattended - run autonomously - daemon start - daemon stop - daemon status last-updated: 2026-03-28
Architecture, daemon.json field reference, and rationale: docs/DAEMON.md.
**Use when:** running campaigns overnight or unattended -- chains sessions automatically until a ceiling or budget is hit. **Don't use when:** a single autonomous session is enough (use /archon); you want manual control between cycles (use /loop).
**`/daemon start` does NOT call `RemoteTrigger` by default.** The local runner is the default. Only pass `--remote` to use Anthropic's routine system, and only after explicit user confirmation.
**Why:** `RemoteTrigger` counts against the account-wide **15 routine runs / 24h** cap. A single overnight run can exhaust the quota and pause every other routine on the account (including unrelated ones). See [docs/ROUTINE-QUOTA.md](../../docs/ROUTINE-QUOTA.md).
1. Do Steps 1, 2, and 4 below (validate, check existing, write `daemon.json`). 2. **Skip Step 3** — do NOT create any `RemoteTrigger`. Leave `chainTriggerId` and `watchdogTriggerId` as `null` in the state file. 3. Instead of Step 5's trigger-confirmation, output the local-runner instructions (full text: docs/DAEMON.md#local-runner-default): the state file path, campaign, and budget, then:
To start the tick loop, run in a separate terminal:
npm run daemon:local
Leave that terminal open. It spawns `claude --permission-mode default -p "/do continue"` each
session, respects daemon.json status, and consumes zero Anthropic
routine quota. Stop with Ctrl+C or `/daemon stop`.
For true unattended background operation (machine sleeps, user away):
/daemon start --remote (uses RemoteTrigger, counts against 15/day cap)After approval of the campaign, finite budget and session limit, set `localRunnerEnabled: true` in daemon.json for the local runner. The default limit is 10 sessions; `--max-sessions N` requires a positive integer. A finite positive budget and valid estimatedSpend are required. The runner stops on failed execution and rechecks state before each spawn. Normal runtime permission checks remain enabled. The noninteractive environment variable alone does not authorize continuation. Remote starts leave this local opt-in disabled. See [runner safety and migration](../../docs/ISSUE-278-SECURITY.md).
In Codex, prefer a Codex Automation for durable unattended daemon ticks when available: `node scripts/codex-automation.js plan --type daemon --command "/daemon tick" --cadence "<interval>" --target background-worktree --write`. Use the returned prompt in the Codex app automation surface. Each run must still read and update `.planning/daemon.json`; Codex owns the scheduling, Citadel owns the budget/status gates and run log.
Only when the user has explicitly passed `--remote`: 1. Before proceeding, confirm: "This will use Anthropic's `RemoteTrigger`, which counts against your 15 routine runs / 24h quota. A single overnight daemon can exhaust it. Continue? (y/N)" 2. If the user confirms, run the full Step 1-5 protocol below (including Step 3's trigger creation).
| Command | Behavior | |---|---| | `/daemon start` | Default: create state file, prompt user to run `npm run daemon:local` (zero routine cost) | | `/daemon start --remote` | Use `RemoteTrigger` instead (counts against 15/day routine quota — requires confirmation) | | `/daemon start --campaign {slug}` | Target a specific campaign | | `/daemon start --budget {N}` | Set budget cap in dollars (default: $50) | | `/daemon start --budget unlimited` | Explicitly disable budget cap | | `/daemon start --interval {N}m` | Set watchdog interval (default: 30m) | | `/daemon start --cooldown {N}s` | Set delay between sessions (default: 60s) | | `/daemon start --cost-per-session {N}` | Override per-session cost estimate (default: $3) | | `/daemon stop` | Stop the daemon, tear down triggers | | `/daemon status` | Show daemon state, session count, budget remaining | | `/daemon log` | Show recent daemon session history | | `/daemon tick` | Internal: heartbeat handler fired by triggers. Not user-facing. |
**Step 1: Validate prerequisites**
1. Check `.planning/` exists. If not: "No planning directory found. Run `/do setup` first." 2. Find the target campaign: if `--campaign {slug}` provided, read `.planning/campaigns/{slug}.md`; otherwise scan `.planning/campaigns/` (excluding `completed/`) for files with `status: active` in frontmatter. No active campaign → "No active campaign. Start one with `/archon` first." Multiple active and no flag → list them, ask user to specify. 3. Verify the campaign has a Continuation State section (Archon knows where to resume) 4. Parse budget: default `$50`. `--budget unlimited` → set budget to `Infinity`, warn: "No budget cap. You will not be protected from runaway costs. Monitor usage at your Anthropic dashboard." `--budget {N}` → parse as number, must be > 0. 5. Parse cost-per-session: `--cost-per-session {N}` if provided; else the campaign's `estimated_cost_per_loop` frontmatter field if present (improve campaigns set this to 12); otherwise default `$
An open-source operating layer for Claude Code and OpenAI Codex. Citadel routes requests, preserves repository state between sessions, coordinates parallel work, applies repository safeguards, and records evidence and handoffs around the coding agent you
Repo: SethGammon/Citadel
Given a PRD, produces an implementation architecture: file tree, component breakdown, data model, and a phased build plan with end conditions that Archon can…
Autonomous multi-session campaign agent. Decomposes large work into phases, delegates to sub-agents, reviews output, and maintains campaign state across…
Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed…
Intake-to-delivery pipeline. Processes pending items from .planning/intake/: briefs new ideas, executes approved work through research → plan → build → verify.…
Deep cost exploration and transparency. Shows real token usage, session costs, campaign spend, burn rates, and model breakdown. Reads Claude Code's native…
End-to-end app creation from a single description. Five tiers: blank project, guided, templated, fully generated, or feature addition to existing codebase.…