[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GXKHSYDHDMR30RY7KN083G":3,"skill-same:01M6GXKHSYDHDMR30RY7KN083G":103},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":67,"commitSha":68,"skillDirectory":69,"forksCount":70,"repositoryHtmlUrl":71,"repositoryHomepageUrl":72,"ownerHtmlUrl":73,"ownerBlogUrl":72,"ownerDescription":74,"updatedAt":75,"install":76,"resources":88},"01M6GXKHSYDHDMR30RY7KN083G","daemon",null,"Continuous autonomous operation mode. Keeps campaigns running 24\u002F7 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.","SethGammon\u002FCitadel","SethGammon","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F5523585?v=4","01M6GXJ90FD2CE9QF5GQERWN06","Seth Gammon","01M6GXJ94VXYGK5KAW14EYE901",931,"MIT","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fdaemon\u002FSKILL.md",[18,23,28],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",{"categoryNo":29,"categoryName":30,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000040","财务",[5,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"run","overnight","wed","chaining","context","stop","start","status","Budget","daemon status","next","code","false","claude code sessions","auto","autonomous","campaign","up","mode","2026-11-10 10:12:30",false,"---\nname: daemon\nlicense: MIT\ndescription: >-\n  Continuous autonomous operation mode. Keeps campaigns running 24\u002F7 by\n  chaining Claude Code sessions via RemoteTrigger. Each session picks up\n  from the campaign's continuation state, works until context runs low or\n  the phase completes, then schedules the next session. Auto-stops on\n  campaign completion or budget exhaustion. The thing that makes Citadel\n  run overnight.\nuser-invocable: true\nauto-trigger: false\ntrigger_keywords:\n  - daemon\n  - continuous\n  - run overnight\n  - keep running\n  - 24\u002F7\n  - unattended\n  - run autonomously\n  - daemon start\n  - daemon stop\n  - daemon status\nlast-updated: 2026-11-04\n---\n\n# \u002Fdaemon -- Continuous Autonomous Operation\n\nArchitecture, daemon.json field reference, and rationale: docs\u002FDAEMON.md.\n\n## Orientation\n\n**Use when:** running campaigns overnight or unattended -- chains sessions automatically until a ceiling or budget is hit.\n**Don't use when:** a single autonomous session is enough (use \u002Farchon); you want manual control between cycles (use \u002Floop).\n\n## Default execution path (READ FIRST)\n\n**`\u002Fdaemon 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.\n\n**Why:** `RemoteTrigger` counts against the account-wide **15 routine runs \u002F 24h** cap. A single overnight run can exhaust the quota and pause every other routine on the account (including unrelated ones). See [docs\u002FROUTINE-QUOTA.md](..\u002F..\u002Fdocs\u002FROUTINE-QUOTA.md).\n\n### Default flow — `\u002Fdaemon start` (no `--remote` flag)\n\n1. Do Steps 1, 2, and 4 below (validate, check existing, write `daemon.json`).\n2. **Skip Step 3.** Leave `chainTriggerId` and `watchdogTriggerId` as `null` in the state file. Keep the confirmation focused on the state path, campaign, finite budget, session ceiling, and local start\u002Fstop instructions.\n3. Instead of Step 5's trigger-confirmation, output the local-runner instructions (full text: docs\u002FDAEMON.md#local-runner-default): the state file path, campaign, and budget, then:\n   ```\n   To start the tick loop, run in a separate terminal:\n     npm run daemon:local\n\n   Leave that terminal open. It spawns `claude --permission-mode default -p \"\u002Fdo continue\"` each\n   session, respects daemon.json status, and consumes zero Anthropic\n   routine quota. Stop with Ctrl+C or `\u002Fdaemon stop`.\n\n   ```\n\n### Local execution safety\n\nAfter approval of the campaign, finite budget and session limit, set\n`localRunnerEnabled: true` in daemon.json for the local runner. The default\nlimit is 10 sessions; `--max-sessions N` requires a positive integer. A finite\npositive budget and valid estimatedSpend are required. The runner stops on\nfailed execution and rechecks state before each spawn. Normal runtime permission\nchecks remain enabled. The noninteractive environment variable alone does not\nauthorize continuation. Remote starts leave this local opt-in disabled.\nSee [runner safety and migration](..\u002F..\u002Fdocs\u002FISSUE-278-SECURITY.md).\n\n### Codex automation lane\n\nIn Codex, prefer a Codex Automation for durable unattended daemon ticks when available: `node scripts\u002Fcodex-automation.js plan --type daemon --command \"\u002Fdaemon tick\" --cadence \"\u003Cinterval>\" --target background-worktree --write`. Use the returned prompt in the Codex app automation surface. Each run must still read and update `.planning\u002Fdaemon.json`; Codex owns the scheduling, Citadel owns the budget\u002Fstatus gates and run log.\n\n### Opt-in routine flow — `\u002Fdaemon start --remote`\n\nOnly when the user has explicitly passed `--remote`:\n1. Before proceeding, confirm: \"This will use Anthropic's `RemoteTrigger`, which counts against your 15 routine runs \u002F 24h quota. A single overnight daemon can exhaust it. Continue? (y\u002FN)\"\n2. If the user confirms, run the full Step 1-5 protocol below (including Step 3's trigger creation).\n\n## Commands\n\n| Command | Behavior |\n|---|---|\n| `\u002Fdaemon start` | Default: create state file, prompt user to run `npm run daemon:local` (zero routine cost) |\n| `\u002Fdaemon start --remote` | Use `RemoteTrigger` instead (counts against 15\u002Fday routine quota — requires confirmation) |\n| `\u002Fdaemon start --campaign {slug}` | Target a specific campaign |\n| `\u002Fdaemon start --budget {N}` | Set budget cap in dollars (default: $50) |\n| `\u002Fdaemon start --budget unlimited` | Explicitly disable budget cap |\n| `\u002Fdaemon start --interval {N}m` | Set watchdog interval (default: 30m) |\n| `\u002Fdaemon start --cooldown {N}s` | Set delay between sessions (default: 60s) |\n| `\u002Fdaemon start --cost-per-session {N}` | Override per-session cost estimate (default: $3) |\n| `\u002Fdaemon stop` | Stop the daemon, tear down triggers |\n| `\u002Fdaemon status` | Show daemon state, session count, budget remaining |\n| `\u002Fdaemon log` | Show recent daemon session history |\n| `\u002Fdaemon tick` | Internal: heartbeat handler fired by triggers. Not user-facing. |\n\n## Protocol\n\n### \u002Fdaemon start\n\n**Step 1: Validate prerequisites**\n\n1. Check `.planning\u002F` exists. If not: \"No planning directory found. Run `\u002Fdo setup` first.\"\n2. Find the target campaign: if `--campaign {slug}` provided, read `.planning\u002Fcampaigns\u002F{slug}.md`; otherwise scan `.planning\u002Fcampaigns\u002F` (excluding `completed\u002F`) for files with `status: active` in frontmatter. No active campaign → \"No active campaign. Start one with `\u002Farchon` first.\" Multiple active and no flag → list them, ask user to specify.\n3. Verify the campaign has a Continuation State section (Archon knows where to resume)\n4. 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.\n5. 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 `$3`. The auto-read prevents running an improve campaign on the $3 default designed for simple archon sessions (rationale: docs\u002FDAEMON.md#cost-estimation).\n\n**Step 2: Check for existing daemon**\n\nRead `.planning\u002Fdaemon.json` if it exists. If a daemon is already running (`status: \"running\"`): show its state (campaign, sessions completed, budget remaining) and ask \"A daemon is already running. Stop it and start a new one?\" Yes → run `\u002Fdaemon stop` first, then continue. No → abort.\n\n**Step 3: Create triggers** (remote flow only)\n\n**A. Chain trigger** — one-shot, fires after cooldown, `command: \"\u002Fdaemon tick\"`. Save ID as `chainTriggerId`.\n**B. Watchdog trigger** — recurring, fires every `--interval`, `command: \"\u002Fdaemon tick --watchdog\"`. Save ID as `watchdogTriggerId`.\nBoth use `type: scheduled\u002Frecurring`, `project_path: {absolute project root}`, `description: \"Daemon: {slug} tick\u002Fwatchdog\"`.\n\n**Step 4: Write state file**\n\nWrite `.planning\u002Fdaemon.json`:\n\n```json\n{\n  \"status\": \"running\",\n  \"campaignSlug\": \"{slug}\",\n  \"budget\": 50,\n  \"costPerSession\": 3,\n  \"estimatedSpend\": 0,\n  \"localRunnerEnabled\": false,\n  \"sessionCount\": 0,\n  \"interval\": \"30m\",\n  \"cooldown\": \"60s\",\n  \"chainTriggerId\": \"{id from step 3A}\",\n  \"watchdogTriggerId\": \"{id from step 3B}\",\n  \"startedAt\": \"{ISO timestamp}\",\n  \"lastTickAt\": null,\n  \"lastTickStatus\": null,\n  \"stoppedAt\": null,\n  \"stopReason\": null,\n  \"log\": []\n}\n```\n\n**Step 5: Log and confirm**\n\nLog `daemon-start` event with budget and interval. Output confirmation: campaign slug, budget (estimated sessions), cooldown, watchdog interval, state file path. Suggest `\u002Fdaemon status` and `\u002Fdaemon stop`.\n\n### \u002Fdaemon stop\n\n1. Read `.planning\u002Fdaemon.json`. If missing or not `running`: \"No daemon is running.\"\n2. Delete both triggers (ignore failures — may already be cleaned up).\n3. Update daemon.json: `status: stopped`, `stoppedAt`, `stopReason: user`.\n4. Log `daemon-stop` event. Output: sessions completed, estimated spend, campaign status.\n\n### \u002Fdaemon status\n\nOutput: status, campaign (slug + phase), sessions, budget (spent\u002Fcap\u002Fremaining), cost\u002Fsession source, last tick (time + status), running duration, watchdog interval, state file path.\n\nIf `paused-level-up`: add instructions to review proposals at `.planning\u002Frubrics\u002F{target}-proposals.md` and set campaign `status: active` to resume. For improve campaigns: add loops completed\u002Ftotal, current level, last axis attacked.\n\n### \u002Fdaemon log\n\nRead `.planning\u002Fdaemon.json` and output the `log` array, most recent first, as `[{timestamp}] Session #{N}: {status} -- {summary}` with a second line `Phase: {phase} | Duration: {duration} | Est. cost: ${cost}` (entry format: docs\u002FDAEMON.md#daemonjson-reference). Show the last 20 entries. If more exist: \"Showing last 20 of {total}. Full log in .planning\u002Fdaemon.json\"\n\n### \u002Fdaemon tick\n\n**This is the heartbeat handler. It runs in a fresh Claude Code session spawned by the scheduler. It is not user-facing.**\n\n**Step 1: Gate checks**\n\n1. Read `.planning\u002Fdaemon.json`\n2. **Status gate**: If status is not `\"running\"` and not `\"paused-level-up\"` -- exit silently. The daemon was stopped. If `\"paused-level-up\"`: read the campaign file. If campaign status is now `active` (human approved the level-up): update daemon.json `status: \"running\"`, clear `pauseReason`, log `daemon-resume` with reason `level-up-approved`, continue to Step 2. If still `level-up-pending`: exit silently (still waiting for human).\n3. **Lock gate**: If `lastTickAt` is within the last 2 minutes and `lastTickStatus` is `\"running\"` -- another session is active. Exit silently.\n4. **Budget gate**: If `estimatedSpend >= budget` -- stop the daemon: update daemon.json (`status: \"stopped\"`, `stopReason: \"budget-exhausted\"`), delete both triggers, log `daemon-stop` with reason `budget-exhausted`, exit.\n5. **Campaign gate**: Read the campaign file.\n   - File does not exist, or `status: completed`, `failed`, or `parked` -- stop the daemon: update daemon.json (`status: \"stopped\"`, `stopReason:` `\"no-active-work\"` for a missing file, `\"campaign-completed\"` \u002F `\"campaign-failed\"` \u002F `\"campaign-parked\"` for the matching status), delete both triggers, log `daemon-stop` with that reason, exit.\n   - `status: level-up-pending` -- **pause** the daemon (do not stop): update daemon.json `status: \"paused-level-up\"`, `pauseReason: \"Improve hit distribution saturation. Human approval required for level-up proposals.\"` Do NOT delete triggers (the watchdog stays alive to detect when the human resumes). Log `daemon-pause` with reason `level-up-pending`. Append to daemon.json log: `\"Paused: level-up triggered. Approve proposals at .planning\u002Frubrics\u002F{target}-proposals.md and set campaign status to active to resume.\"` Exit.\n\n**Step 2: Acquire lock**\n\nUpdate daemon.json: `lastTickAt` = current ISO timestamp, `lastTickStatus: \"running\"`.\n\n**Step 3: Execute**\n\nRun `\u002Fdo continue` -- routes to Archon, which reads the campaign's Continuation State and picks up where the last session left off. Archon works until the current phase completes (normal exit), context runs low and PreCompact fires (saves state, session can end), or an error parks the campaign.\n\n**Step 4: Record session**\n\nAfter `\u002Fdo continue` returns (or the session is winding down):\n\n1. Read the campaign file again to get updated status and phase\n2. **No-work gate**: If the campaign status is `completed`, `failed`, `parked`, or the campaign file no longer exists -- stop the daemon immediately: update daemon.json (`status: \"stopped\"`, `stopReason: \"no-active-work\"`, `stoppedAt: \"{ISO timestamp}\"`), delete both triggers, log `daemon-stop` with reason `no-active-work`. Do NOT schedule the next tick. Exit after recording the session.\n3. Update daemon.json: increment `sessionCount`, add `costPerSession` to `estimatedSpend`, set `lastTickStatus: \"completed\"`, append a `log` entry with session, timestamp, status, phase, summary, and estimatedCost (JSON shape: docs\u002FDAEMON.md#daemonjson-reference).\n4. Run a safe memory consolidation pass when the session produced planning changes: `node scripts\u002Fmemory-compile.js compile`. If it fails, record the failure in daemon.json `log` and continue shutdown or scheduling; memory compile failures must not create overlapping daemon ticks.\n\n**Step 5: Schedule next tick**\n\nRe-read daemon.json. If still `running` and `estimatedSpend + costPerSession \u003C= budget`: create new chain trigger (one-shot, cooldown delay), update `chainTriggerId`. If budget would be exceeded: stop daemon (`budget-exhausted`), delete watchdog, log `daemon-stop`.\n\n**Step 6: Exit**\n\nSession ends cleanly. PreCompact hook saves campaign state. The next tick starts a fresh session with full context budget.\n\n### \u002Fdaemon tick --watchdog\n\nSame as `\u002Fdaemon tick` but after the standard gate checks pass, check whether the chain is alive: read `lastTickAt` from daemon.json.\n- If `lastTickAt` is more than `2 * interval` ago AND `lastTickStatus` is not `\"running\"`: the chain died. Log: `\"Watchdog: chain appears dead. Last tick at {lastTickAt}. Restarting chain.\"` Proceed with Step 2 onwards (this watchdog tick becomes a chain tick) and schedule the next chain tick in Step 5.\n- If `lastTickAt` is recent (within `2 * interval`): the chain is healthy. Exit silently.\n\n## SessionStart Hook Bridge (Primary Bootstrap)\n\nThe daemon's primary continuation mechanism is the `init-project.js` SessionStart hook, not RemoteTrigger prompt injection. On every session start the hook reads `.planning\u002Fdaemon.json`; if `status: running`, it checks the lock (no overlap), budget (can afford), and campaign (still active), and when all gates pass outputs `[daemon] Active daemon detected. Campaign: {slug}. Run: \u002Fdo continue` — the agent sees this first and executes `\u002Fdo continue`. RemoteTrigger's role is reduced to scheduling session starts; if it is unavailable, an OS cron job or manual restart achieves the same result (architecture: docs\u002FDAEMON.md#how-it-works).\n\n## Budget Tracking\n\n**Primary:** Read latest entry from `.planning\u002Ftelemetry\u002Fsession-costs.jsonl` (written by session-end hook) for real cost. Use `override_cost` if present, else `estimated_cost`.\n\n**Fallback:** `costPerSession` flat estimate (default $3). Each tick adds it to `estimatedSpend`.\n\nStop when `estimatedSpend >= budget` or `estimatedSpend + costPerSession > budget` (preemptive). Overrides: `--budget {N}` | `--budget unlimited` (explicit, warns) | `--cost-per-session {N}`\n\n## Fringe Cases\n\n- **RemoteTrigger unavailable**: SessionStart hook bridge still works. Suggest OS cron: `*\u002F30 * * * * cd ~\u002Fproject && claude -p '\u002Fdo continue'`\n- **No `.planning\u002F`**: \"Run `\u002Fdo setup` first.\"\n- **Campaign has no Continuation State**: run `\u002Farchon` once interactively to establish it.\n- **daemon.json corrupted**: treat as no daemon running; `\u002Fdaemon start` fresh.\n- **Session crashes without next tick**: watchdog restarts chain after `2 * interval`.\n- **Multiple daemons**: one per project. Block with \"daemon already running\" prompt.\n- **`\u002Fdaemon tick` called manually**: works, gate checks apply. Warn it's internal.\n- **Budget exhausted**: stop, log \"Budget exhausted. Restart with `--budget {higher}`.\"\n- **Level-up during run**: detect `level-up-pending`, set `paused-level-up`, keep watchdog alive for human-resume detection.\n- **Campaign completes mid-session**: no-work gate (Step 4) catches it, stops daemon.\n- **Idle loop bug (campaign done but daemon still running)**: three layers prevent it — campaign gate (Step 1), no-work gate (Step 4), `\u002Fdo` Tier 1 stop. All write `stopReason: no-active-work`.\n\n## Contextual Gates\n\n### Disclosure\nAlways disclose, regardless of trust level:\n- \"Starting continuous mode on campaign {slug}. Budget: ${N} (~{sessions} sessions at ${cost}\u002Fsession). Sessions restart automatically until done or budget exhausted.\"\n- For unlimited budget: \"WARNING: No budget cap. Sessions will continue until the campaign completes or you run `\u002Fdaemon stop`.\"\n\n### Reversibility\n- **Amber:** Standard daemon with budget cap -- stop with `\u002Fdaemon stop`, no work is lost\n- **Red:** Daemon with `--budget unlimited` -- no automatic cost protection\n\nRed actions (unlimited budget) require explicit confirmation at ALL trust levels.\n\n### Proportionality\nBefore starting, verify daemon is warranted:\n- If campaign has only 1 remaining phase: suggest running it directly instead\n- If estimated sessions \u003C= 2: suggest manual continuation instead\n- If campaign is type `improve` and no rubric exists: block -- rubric requires human approval first\n\n### Trust Gating\nRead trust level from `harness.json`:\n- **Novice** (0-4 sessions): Block daemon activation entirely. Output: \"Daemon mode requires familiarity with the harness. Complete a few sessions first, then daemon will be available.\"\n- **Familiar** (5-19 sessions): Allow with full disclosure and explicit confirmation.\n- **Trusted** (20+ sessions): Allow with cost-only confirmation.\n\n## Quality Gates\n\n- Budget cap MUST be set (default $50, explicit `unlimited` to bypass)\n- Daemon state file MUST be written before any triggers are created\n- For an explicitly requested remote start, both triggers (chain + watchdog) must be created; if either fails, abort and clean up. Local starts keep both trigger IDs null.\n- Every tick must update daemon.json BEFORE scheduling the next tick\n- Campaign must have Continuation State before daemon can start\n- Lock mechanism must prevent overlapping sessions\n- Watchdog must detect and recover from dead chains\n- Stop must clean up ALL triggers (no orphaned triggers)\n\n## Exit Protocol\n\n- `start`: confirmation output, no HANDOFF\n- `stop`: stop summary, no HANDOFF\n- `tick`: no user output (headless); updates daemon.json, schedules or stops\n- `status`\u002F`log`: output requested info\n- On error: actionable message, clean up any dangling triggers before exiting\n","# \u002Fdaemon -- Continuous Autonomous Operation\n\nArchitecture, daemon.json field reference, and rationale: docs\u002FDAEMON.md.\n\n## Orientation\n\n**Use when:** running campaigns overnight or unattended -- chains sessions automatically until a ceiling or budget is hit.\n**Don't use when:** a single autonomous session is enough (use \u002Farchon); you want manual control between cycles (use \u002Floop).\n\n## Default execution path (READ FIRST)\n\n**`\u002Fdaemon 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.\n\n**Why:** `RemoteTrigger` counts against the account-wide **15 routine runs \u002F 24h** cap. A single overnight run can exhaust the quota and pause every other routine on the account (including unrelated ones). See [docs\u002FROUTINE-QUOTA.md](..\u002F..\u002Fdocs\u002FROUTINE-QUOTA.md).\n\n### Default flow — `\u002Fdaemon start` (no `--remote` flag)\n\n1. Do Steps 1, 2, and 4 below (validate, check existing, write `daemon.json`).\n2. **Skip Step 3.** Leave `chainTriggerId` and `watchdogTriggerId` as `null` in the state file. Keep the confirmation focused on the state path, campaign, finite budget, session ceiling, and local start\u002Fstop instructions.\n3. Instead of Step 5's trigger-confirmation, output the local-runner instructions (full text: docs\u002FDAEMON.md#local-runner-default): the state file path, campaign, and budget, then:\n   ```\n   To start the tick loop, run in a separate terminal:\n     npm run daemon:local\n\n   Leave that terminal open. It spawns `claude --permission-mode default -p \"\u002Fdo continue\"` each\n   session, respects daemon.json status, and consumes zero Anthropic\n   routine quota. Stop with Ctrl+C or `\u002Fdaemon stop`.\n\n   ```\n\n### Local execution safety\n\nAfter approval of the campaign, finite budget and session limit, set\n`localRunnerEnabled: true` in daemon.json for the local runner. The default\nlimit is 10 sessions; `--max-sessions N` requires a positive integer. A finite\npositive budget and valid estimatedSpend are required. The runner stops on\nfailed execution and rechecks state before each spawn. Normal runtime permission\nchecks remain enabled. The noninteractive environment variable alone does not\nauthorize continuation. Remote starts leave this local opt-in disabled.\nSee [runner safety and migration](..\u002F..\u002Fdocs\u002FISSUE-278-SECURITY.md).\n\n### Codex automation lane\n\nIn Codex, prefer a Codex Automation for durable unattended daemon ticks when available: `node scripts\u002Fcodex-automation.js plan --type daemon --command \"\u002Fdaemon tick\" --cadence \"\u003Cinterval>\" --target background-worktree --write`. Use the returned prompt in the Codex app automation surface. Each run must still read and update `.planning\u002Fdaemon.json`; Codex owns the scheduling, Citadel owns the budget\u002Fstatus gates and run log.\n\n### Opt-in routine flow — `\u002Fdaemon start --remote`\n\nOnly when the user has explicitly passed `--remote`:\n1. Before proceeding, confirm: \"This will use Anthropic's `RemoteTrigger`, which counts against your 15 routine runs \u002F 24h quota. A single overnight daemon can exhaust it. Continue? (y\u002FN)\"\n2. If the user confirms, run the full Step 1-5 protocol below (including Step 3's trigger creation).\n\n## Commands\n\n| Command | Behavior |\n|---|---|\n| `\u002Fdaemon start` | Default: create state file, prompt user to run `npm run daemon:local` (zero routine cost) |\n| `\u002Fdaemon start --remote` | Use `RemoteTrigger` instead (counts against 15\u002Fday routine quota — requires confirmation) |\n| `\u002Fdaemon start --campaign {slug}` | Target a specific campaign |\n| `\u002Fdaemon start --budget {N}` | Set budget cap in dollars (default: $50) |\n| `\u002Fdaemon start --budget unlimited` | Explicitly disable budget cap |\n| `\u002Fdaemon start --interval {N}m` | Set watchdog interval (default: 30m) |\n| `\u002Fdaemon start --cooldown {N}s` | Set delay between sessions (default: 60s) |\n| `\u002Fdaemon start --cost-per-session {N}` | Override per-session cost estimate (default: $3) |\n| `\u002Fdaemon stop` | Stop the daemon, tear down triggers |\n| `\u002Fdaemon status` | Show daemon state, session count, budget remaining |\n| `\u002Fdaemon log` | Show recent daemon session history |\n| `\u002Fdaemon tick` | Internal: heartbeat handler fired by triggers. Not user-facing. |\n\n## Protocol\n\n### \u002Fdaemon start\n\n**Step 1: Validate prerequisites**\n\n1. Check `.planning\u002F` exists. If not: \"No planning directory found. Run `\u002Fdo setup` first.\"\n2. Find the target campaign: if `--campaign {slug}` provided, read `.planning\u002Fcampaigns\u002F{slug}.md`; otherwise scan `.planning\u002Fcampaigns\u002F` (excluding `completed\u002F`) for files with `status: active` in frontmatter. No active campaign → \"No active campaign. Start one with `\u002Farchon` first.\" Multiple active and no flag → list them, ask user to specify.\n3. Verify the campaign has a Continuation State section (Archon knows where to resume)\n4. 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.\n5. 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 `$3`. The auto-read prevents running an improve campaign on the $3 default designed for simple archon sessions (rationale: docs\u002FDAEMON.md#cost-estimation).\n\n**Step 2: Check for existing daemon**\n\nRead `.planning\u002Fdaemon.json` if it exists. If a daemon is already running (`status: \"running\"`): show its state (campaign, sessions completed, budget remaining) and ask \"A daemon is already running. Stop it and start a new one?\" Yes → run `\u002Fdaemon stop` first, then continue. No → abort.\n\n**Step 3: Create triggers** (remote flow only)\n\n**A. Chain trigger** — one-shot, fires after cooldown, `command: \"\u002Fdaemon tick\"`. Save ID as `chainTriggerId`.\n**B. Watchdog trigger** — recurring, fires every `--interval`, `command: \"\u002Fdaemon tick --watchdog\"`. Save ID as `watchdogTriggerId`.\nBoth use `type: scheduled\u002Frecurring`, `project_path: {absolute project root}`, `description: \"Daemon: {slug} tick\u002Fwatchdog\"`.\n\n**Step 4: Write state file**\n\nWrite `.planning\u002Fdaemon.json`:\n\n```json\n{\n  \"status\": \"running\",\n  \"campaignSlug\": \"{slug}\",\n  \"budget\": 50,\n  \"costPerSession\": 3,\n  \"estimatedSpend\": 0,\n  \"localRunnerEnabled\": false,\n  \"sessionCount\": 0,\n  \"interval\": \"30m\",\n  \"cooldown\": \"60s\",\n  \"chainTriggerId\": \"{id from step 3A}\",\n  \"watchdogTriggerId\": \"{id from step 3B}\",\n  \"startedAt\": \"{ISO timestamp}\",\n  \"lastTickAt\": null,\n  \"lastTickStatus\": null,\n  \"stoppedAt\": null,\n  \"stopReason\": null,\n  \"log\": []\n}\n```\n\n**Step 5: Log and confirm**\n\nLog `daemon-start` event with budget and interval. Output confirmation: campaign slug, budget (estimated sessions), cooldown, watchdog interval, state file path. Suggest `\u002Fdaemon status` and `\u002Fdaemon stop`.\n\n### \u002Fdaemon stop\n\n1. Read `.planning\u002Fdaemon.json`. If missing or not `running`: \"No daemon is running.\"\n2. Delete both triggers (ignore failures — may already be cleaned up).\n3. Update daemon.json: `status: stopped`, `stoppedAt`, `stopReason: user`.\n4. Log `daemon-stop` event. Output: sessions completed, estimated spend, campaign status.\n\n### \u002Fdaemon status\n\nOutput: status, campaign (slug + phase), sessions, budget (spent\u002Fcap\u002Fremaining), cost\u002Fsession source, last tick (time + status), running duration, watchdog interval, state file path.\n\nIf `paused-level-up`: add instructions to review proposals at `.planning\u002Frubrics\u002F{target}-proposals.md` and set campaign `status: active` to resume. For improve campaigns: add loops completed\u002Ftotal, current level, last axis attacked.\n\n### \u002Fdaemon log\n\nRead `.planning\u002Fdaemon.json` and output the `log` array, most recent first, as `[{timestamp}] Session #{N}: {status} -- {summary}` with a second line `Phase: {phase} | Duration: {duration} | Est. cost: ${cost}` (entry format: docs\u002FDAEMON.md#daemonjson-reference). Show the last 20 entries. If more exist: \"Showing last 20 of {total}. Full log in .planning\u002Fdaemon.json\"\n\n### \u002Fdaemon tick\n\n**This is the heartbeat handler. It runs in a fresh Claude Code session spawned by the scheduler. It is not user-facing.**\n\n**Step 1: Gate checks**\n\n1. Read `.planning\u002Fdaemon.json`\n2. **Status gate**: If status is not `\"running\"` and not `\"paused-level-up\"` -- exit silently. The daemon was stopped. If `\"paused-level-up\"`: read the campaign file. If campaign status is now `active` (human approved the level-up): update daemon.json `status: \"running\"`, clear `pauseReason`, log `daemon-resume` with reason `level-up-approved`, continue to Step 2. If still `level-up-pending`: exit silently (still waiting for human).\n3. **Lock gate**: If `lastTickAt` is within the last 2 minutes and `lastTickStatus` is `\"running\"` -- another session is active. Exit silently.\n4. **Budget gate**: If `estimatedSpend >= budget` -- stop the daemon: update daemon.json (`status: \"stopped\"`, `stopReason: \"budget-exhausted\"`), delete both triggers, log `daemon-stop` with reason `budget-exhausted`, exit.\n5. **Campaign gate**: Read the campaign file.\n   - File does not exist, or `status: completed`, `failed`, or `parked` -- stop the daemon: update daemon.json (`status: \"stopped\"`, `stopReason:` `\"no-active-work\"` for a missing file, `\"campaign-completed\"` \u002F `\"campaign-failed\"` \u002F `\"campaign-parked\"` for the matching status), delete both triggers, log `daemon-stop` with that reason, exit.\n   - `status: level-up-pending` -- **pause** the daemon (do not stop): update daemon.json `status: \"paused-level-up\"`, `pauseReason: \"Improve hit distribution saturation. Human approval required for level-up proposals.\"` Do NOT delete triggers (the watchdog stays alive to detect when the human resumes). Log `daemon-pause` with reason `level-up-pending`. Append to daemon.json log: `\"Paused: level-up triggered. Approve proposals at .planning\u002Frubrics\u002F{target}-proposals.md and set campaign status to active to resume.\"` Exit.\n\n**Step 2: Acquire lock**\n\nUpdate daemon.json: `lastTickAt` = current ISO timestamp, `lastTickStatus: \"running\"`.\n\n**Step 3: Execute**\n\nRun `\u002Fdo continue` -- routes to Archon, which reads the campaign's Continuation State and picks up where the last session left off. Archon works until the current phase completes (normal exit), context runs low and PreCompact fires (saves state, session can end), or an error parks the campaign.\n\n**Step 4: Record session**\n\nAfter `\u002Fdo continue` returns (or the session is winding down):\n\n1. Read the campaign file again to get updated status and phase\n2. **No-work gate**: If the campaign status is `completed`, `failed`, `parked`, or the campaign file no longer exists -- stop the daemon immediately: update daemon.json (`status: \"stopped\"`, `stopReason: \"no-active-work\"`, `stoppedAt: \"{ISO timestamp}\"`), delete both triggers, log `daemon-stop` with reason `no-active-work`. Do NOT schedule the next tick. Exit after recording the session.\n3. Update daemon.json: increment `sessionCount`, add `costPerSession` to `estimatedSpend`, set `lastTickStatus: \"completed\"`, append a `log` entry with session, timestamp, status, phase, summary, and estimatedCost (JSON shape: docs\u002FDAEMON.md#daemonjson-reference).\n4. Run a safe memory consolidation pass when the session produced planning changes: `node scripts\u002Fmemory-compile.js compile`. If it fails, record the failure in daemon.json `log` and continue shutdown or scheduling; memory compile failures must not create overlapping daemon ticks.\n\n**Step 5: Schedule next tick**\n\nRe-read daemon.json. If still `running` and `estimatedSpend + costPerSession \u003C= budget`: create new chain trigger (one-shot, cooldown delay), update `chainTriggerId`. If budget would be exceeded: stop daemon (`budget-exhausted`), delete watchdog, log `daemon-stop`.\n\n**Step 6: Exit**\n\nSession ends cleanly. PreCompact hook saves campaign state. The next tick starts a fresh session with full context budget.\n\n### \u002Fdaemon tick --watchdog\n\nSame as `\u002Fdaemon tick` but after the standard gate checks pass, check whether the chain is alive: read `lastTickAt` from daemon.json.\n- If `lastTickAt` is more than `2 * interval` ago AND `lastTickStatus` is not `\"running\"`: the chain died. Log: `\"Watchdog: chain appears dead. Last tick at {lastTickAt}. Restarting chain.\"` Proceed with Step 2 onwards (this watchdog tick becomes a chain tick) and schedule the next chain tick in Step 5.\n- If `lastTickAt` is recent (within `2 * interval`): the chain is healthy. Exit silently.\n\n## SessionStart Hook Bridge (Primary Bootstrap)\n\nThe daemon's primary continuation mechanism is the `init-project.js` SessionStart hook, not RemoteTrigger prompt injection. On every session start the hook reads `.planning\u002Fdaemon.json`; if `status: running`, it checks the lock (no overlap), budget (can afford), and campaign (still active), and when all gates pass outputs `[daemon] Active daemon detected. Campaign: {slug}. Run: \u002Fdo continue` — the agent sees this first and executes `\u002Fdo continue`. RemoteTrigger's role is reduced to scheduling session starts; if it is unavailable, an OS cron job or manual restart achieves the same result (architecture: docs\u002FDAEMON.md#how-it-works).\n\n## Budget Tracking\n\n**Primary:** Read latest entry from `.planning\u002Ftelemetry\u002Fsession-costs.jsonl` (written by session-end hook) for real cost. Use `override_cost` if present, else `estimated_cost`.\n\n**Fallback:** `costPerSession` flat estimate (default $3). Each tick adds it to `estimatedSpend`.\n\nStop when `estimatedSpend >= budget` or `estimatedSpend + costPerSession > budget` (preemptive). Overrides: `--budget {N}` | `--budget unlimited` (explicit, warns) | `--cost-per-session {N}`\n\n## Fringe Cases\n\n- **RemoteTrigger unavailable**: SessionStart hook bridge still works. Suggest OS cron: `*\u002F30 * * * * cd ~\u002Fproject && claude -p '\u002Fdo continue'`\n- **No `.planning\u002F`**: \"Run `\u002Fdo setup` first.\"\n- **Campaign has no Continuation State**: run `\u002Farchon` once interactively to establish it.\n- **daemon.json corrupted**: treat as no daemon running; `\u002Fdaemon start` fresh.\n- **Session crashes without next tick**: watchdog restarts chain after `2 * interval`.\n- **Multiple daemons**: one per project. Block with \"daemon already running\" prompt.\n- **`\u002Fdaemon tick` called manually**: works, gate checks apply. Warn it's internal.\n- **Budget exhausted**: stop, log \"Budget exhausted. Restart with `--budget {higher}`.\"\n- **Level-up during run**: detect `level-up-pending`, set `paused-level-up`, keep watchdog alive for human-resume detection.\n- **Campaign completes mid-session**: no-work gate (Step 4) catches it, stops daemon.\n- **Idle loop bug (campaign done but daemon still running)**: three layers prevent it — campaign gate (Step 1), no-work gate (Step 4), `\u002Fdo` Tier 1 stop. All write `stopReason: no-active-work`.\n\n## Contextual Gates\n\n### Disclosure\nAlways disclose, regardless of trust level:\n- \"Starting continuous mode on campaign {slug}. Budget: ${N} (~{sessions} sessions at ${cost}\u002Fsession). Sessions restart automatically until done or budget exhausted.\"\n- For unlimited budget: \"WARNING: No budget cap. Sessions will continue until the campaign completes or you run `\u002Fdaemon stop`.\"\n\n### Reversibility\n- **Amber:** Standard daemon with budget cap -- stop with `\u002Fdaemon stop`, no work is lost\n- **Red:** Daemon with `--budget unlimited` -- no automatic cost protection\n\nRed actions (unlimited budget) require explicit confirmation at ALL trust levels.\n\n### Proportionality\nBefore starting, verify daemon is warranted:\n- If campaign has only 1 remaining phase: suggest running it directly instead\n- If estimated sessions \u003C= 2: suggest manual continuation instead\n- If campaign is type `improve` and no rubric exists: block -- rubric requires human approval first\n\n### Trust Gating\nRead trust level from `harness.json`:\n- **Novice** (0-4 sessions): Block daemon activation entirely. Output: \"Daemon mode requires familiarity with the harness. Complete a few sessions first, then daemon will be available.\"\n- **Familiar** (5-19 sessions): Allow with full disclosure and explicit confirmation.\n- **Trusted** (20+ sessions): Allow with cost-only confirmation.\n\n## Quality Gates\n\n- Budget cap MUST be set (default $50, explicit `unlimited` to bypass)\n- Daemon state file MUST be written before any triggers are created\n- For an explicitly requested remote start, both triggers (chain + watchdog) must be created; if either fails, abort and clean up. Local starts keep both trigger IDs null.\n- Every tick must update daemon.json BEFORE scheduling the next tick\n- Campaign must have Continuation State before daemon can start\n- Lock mechanism must prevent overlapping sessions\n- Watchdog must detect and recover from dead chains\n- Stop must clean up ALL triggers (no orphaned triggers)\n\n## Exit Protocol\n\n- `start`: confirmation output, no HANDOFF\n- `stop`: stop summary, no HANDOFF\n- `tick`: no user output (headless); updates daemon.json, schedules or stops\n- `status`\u002F`log`: output requested info\n- On error: actionable message, clean up any dangling triggers before exiting\n",{"name":5,"license":15,"description":7,"auto-trigger":52,"last-updated":56,"user-invocable":57,"trigger_keywords":58},1793750400000,true,[5,59,60,61,62,63,64,65,66,41],"continuous","run overnight","keep running","24\u002F7","unattended","run autonomously","daemon start","daemon stop","main","3c317a0bf13f147efaa695db7c24117349119d07","skills\u002Fdaemon",84,"https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel","https:\u002F\u002Fsethgammon.github.io\u002FCitadel\u002F","https:\u002F\u002Fgithub.com\u002FSethGammon","Building Citadel, the repo-local operating layer for Claude Code and Codex. Persistent work, routing, verification, and coordinated agent fleets.","2026-11-13 02:05:13",{"source":8,"skillName":5,"commands":77,"prompt":87,"zipAvailable":57},[78,81,84],{"tool":79,"command":80},"npx","npx skills add SethGammon\u002FCitadel --skill daemon",{"tool":82,"command":83},"bunx","bunx skills add SethGammon\u002FCitadel --skill daemon",{"tool":85,"command":86},"pnpm","pnpm dlx skills add SethGammon\u002FCitadel --skill daemon","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fdaemon\u002FSKILL.md",[89,95,99],{"path":90,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"__benchmarks__\u002Fno-active-campaign.md","REFERENCE","参考文档",886,"https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fdaemon\u002F__benchmarks__\u002Fno-active-campaign.md",{"path":96,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":97,"sourceHtmlUrl":98},"__benchmarks__\u002Fnovice-local-refusal.md",630,"https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fdaemon\u002F__benchmarks__\u002Fnovice-local-refusal.md",{"path":100,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":101,"sourceHtmlUrl":102},"__benchmarks__\u002Fstart-local.md",1415,"https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fdaemon\u002F__benchmarks__\u002Fstart-local.md",[104,127,153,174,201,220],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":51},"01M6GXSBKE9A2HQWF8QRAZ4WJ5","workspace","Multi-repo campaign coordinator. Same lifecycle as fleet -- scope claims, discovery relay, wave-based execution -- but the unit of work is a repo, not a file. Coordinates campaigns across repositories with shared context.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fworkspace\u002FSKILL.md",[],[106,111,112,113,114,36,48,115,116,117,118,119,120,44,121,122,123,124,125,126],"repos","snowflake","multi-repo","work","coordinate","but","across","campaigns","shared","as","scope","add","unit","coordinator","fleet","claims",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":136,"publishedAt":51},"01M6GXS873AD1Y6RTM6GV47F3E","wiki","Markdown-first knowledge base where the LLM acts as librarian. Ingests raw sources, compiles and interlinks topic files, self-maintains an index. No vector DB or embeddings required -- uses LLM-native navigation over structured markdown up to ~400K words.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fwiki\u002FSKILL.md",[133],{"categoryNo":134,"categoryName":135,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",[129,137,138,139,140,141,142,143,144,49,145,146,147,148,149,150,120,44,151,152],"vector","embeddings","librarian","markdown","knowledge","karpathy","knowledge management","karpathy wiki","files","maintain","self","knowledge base","project","db","sources","native",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":51},"01M6GXS2840SJ61285SZ43EJC3","watch","File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills. Poll-based via git diff against the last scan commit. Writes intake items for batch processing and routes marker actions through \u002Fdo. Use for automatic reactions to file changes; do NOT use for one-off inspection or tasks needing human judgment per file.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fwatch\u002FSKILL.md",[],[155,160,161,162,163,164,165,38,166,167,46,37,145,168,169,170,171,172,44,173],"directory","commit","tasks","git","batch","actions","sentinel","diff","do","scan","human","judgment","reactions","processing",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":183,"publishedAt":51},"01M6GXRXHYJ5RD9RZP81S2VFSW","verify","Self-test the Citadel hook pipeline from within a live session. Exercises real tool calls (Write, Edit, Bash, Read) and checks that hooks fired, telemetry accumulated, and no errors occurred. Reports HOOK HEALTH: PASS or HOOK HEALTH: FAIL with a per-hook breakdown.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Fverify\u002FSKILL.md",[180],{"categoryNo":181,"categoryName":182,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",[176,184,185,186,187,188,189,190,191,192,193,194,195,147,196,44,197,198,199,200],"citadel","telemetry","harness","pipeline","Bash","tool","read","write","edit","session","hooks","reports","live","hook","errors","calls","true",{"skillNo":202,"name":203,"nameZh":6,"description":204,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":205,"categories":206,"keywords":207,"publishedAt":51},"01M6GXRS9MCJFMQZ917H2XH3AC","unharness","Safely leave Citadel using the active adoption receipt. Produces a no-write, reviewable plan, preserves a portable archive, removes only exact owned material, and reports modified or externally registered surfaces as retained or unknown. Legacy installs must be imported before exact leave is claimed.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Funharness\u002FSKILL.md",[],[203,208,184,186,209,210,211,212,213,49,195,214,215,216,217,218,120,44,219,200],"uninstall","adoption","plan","archive","remove","only","Legacy","surfaces","clean","imported","active","material",{"skillNo":221,"name":222,"nameZh":6,"description":223,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":224,"categories":225,"keywords":230,"publishedAt":51},"01M6GXRMEJ2VHD43R9FNPD4910","triage","GitHub issue and PR investigator. Pulls open issues\u002FPRs, classifies them, searches the codebase for root cause or reviews contributed code, proposes fixes with file:line references, and optionally implements fixes. Use for investigating GitHub issues and reviewing PRs; do NOT use for general code review unrelated to GitHub issues.","https:\u002F\u002Fgithub.com\u002FSethGammon\u002FCitadel\u002Fblob\u002Fmain\u002Fskills\u002Ftriage\u002FSKILL.md",[226,229],{"categoryNo":227,"categoryName":228,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},[222,231,232,233,234,43,235,236,237,238,239,240,241,242,168,44,243,244,245,200],"code review","review","review pr","pr","github issues","issues","open","use","unrelated","issue","general","references","line","investigator","reviews"]