archon
Skill4 starsChanged 4 months agoMITView on GitHub
Autonomous multi-session campaign agent. Decomposes large work into phases, delegates to sub-agents, reviews output, and maintains campaign state across context windows. Use for work that spans multiple sessions and needs persistent state, quality judgment, and strategic decomposition.
4 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- SethGammon/Citadeledited, first seen Nov 4, 2026
- coleam00/dark-factory-experimenttheir own version, first seen Aug 11, 2026
- prospapledge88/claude-skillstheir own version, first seen Apr 14, 2026
- abdullah1854/ClaudeSuperSkillstheir own version, first seen Dec 25, 2025
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- SethGammon/Citadel★ 92760% same
Wrote their own version · 3
- coleam00/dark-factory-experiment★ 139same name
- abdullah1854/ClaudeSuperSkills★ 1same name
- prospapledge88/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository50 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architectSkill
- ascii-diagramSkill
- autopilotSkill
- costSkill
- create-appSkill
- create-skillSkill
- daemonSkill
- dashboardSkill
- decision-mapSkill
- deploy-stewardSkill
- designSkill
- doc-genSkill
- doSkill
- evolveSkill
- experimentSkill
- fleetSkill
- grillSkill
- housecleanSkill
- improveSkill
- infra-auditSkill
- learnSkill
- live-previewSkill
- loopSkill
- mapSkill
- marshalSkill
- merge-reviewSkill
- organizeSkill
- postmortemSkill
- prdSkill
- pr-watchSkill
- qaSkill
- refactorSkill
- research-fleetSkill
- researchSkill
- reviewSkill
- scaffoldSkill
- scheduleSkill
- session-handoffSkill
- setupSkill
- systematic-debuggingSkill
- telemetrySkill
- test-genSkill
- triageSkill
- unharnessSkill
- verifySkill
- watchSkill
- wikiSkill
- workspaceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
56 rules. 0 are common, 34 are distinctive, and 22 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
34
Distinctive
This author's own choices. Worth a look.
22
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Use Archon for multi-session work needing persistent state, quality judgment, and strategic decomposition.
- Very specific: line 36
Check .planning/campaigns/ for active campaigns (not in completed/)
- Very specific: line 37
Check .planning/coordination/claims/ for scope claims from other agents
- Distinctive: line 41
Undirected: no direction, no active campaign → run Health Diagnostic
- Very specific: line 50
Create phases in order from the standard types — research, plan, build, wire, verify, prune (purpose and typical delegation per type: …
- Distinctive: line 53
Every phase MUST have at least one non-manual condition
- Distinctive: line 56
Write conditions to the Phase End Conditions table in the campaign file
- Very specific: line 58
Write the campaign file to .planning/campaigns/{slug}.md
- Very specific: line 64
Ask (single sentence): This is multi-session work (~{N} sessions, ~${total}).
- Very specific: line 66
Write .planning/daemon.json: status: "running", campaignSlug, budget: {total * 2}, costPerSession
- Very specific: line 67
If RemoteTrigger available: create chain + watchdog triggers (same as /daemon start).
- Distinctive: line 70
If no: continue to Step 3.
- Distinctive: line 87
Verify end conditions: before marking a phase complete:
- Distinctive: line 93
If ANY non-manual condition fails: phase is NOT complete.
- Very specific: line 100
verdict: "fail": check validator_retries_remaining in the campaign file's phase row (default 3 if not set): - Very specific: line 103
Validator timeout: if the validator does not return within 3 minutes, treat the result as verdict: "pass" with warnings: ["validator timed …
- Distinctive: line 104
Review: Read the sub-agent's HANDOFF.
- Very specific: line 105
If HANDOFF present but phase goal NOT met: re-delegate the phase to a fresh sub-agent with clarified success criteria.
- Distinctive: line 107
Record: Update the campaign file:
- Distinctive: line 109
Add entries to Feature Ledger.
- Distinctive: line 110
Self-correct: Run applicable checks from Step 4: quality spot-check (every phase), direction alignment (every 2nd phase), regression guard …
- Distinctive: line 118
If aligned: log "Direction check: aligned" in Active Context, continue
- Distinctive: line 119
If drifted: stop current phase.
- Distinctive: line 123
Read the most significant output of the phase
- Distinctive: line 124
Check: TypeScript strict mode?
- Distinctive: line 125
If view files (.tsx, .jsx, .vue, .svelte, .html) were modified: invoke /live-preview
- Distinctive: line 126
If below bar: add a remediation task before marking complete
- Very specific: line 130
Run typecheck via node scripts/run-with-timeout.js 300
- Distinctive: line 133
If test suite exists: run it.
- Distinctive: line 142
Run test suite if configured (use timeout wrapper)
- Distinctive: line 143
If verification fails: record the failure, then decide:
- Distinctive: line 151
Update Active Context in campaign file
- Distinctive: line 152
Write Continuation State: current phase/sub-step, files modified, blocking issues, next actions
- Very specific: line 157
Run final verification via node scripts/run-with-timeout.js 300
- Very specific: line 158
Update campaign status to completed 2.5.
- Very specific: line 179
Check .planning/intake/ for pending items → suggest processing
- Distinctive: line 180
Check for active campaigns → suggest continuing
- Distinctive: line 181
Check for recently completed campaigns → suggest verification
- Distinctive: line 182
Run typecheck — if errors climbing vs last campaign, suggest a fix-type-errors campaign
- Very specific: line 183
Check .planning/campaigns/completed/ — if 3+ exist, suggest archival/cleanup
- Very specific: line 184
If nothing: "No active work.
- Distinctive: line 188
Every phase must produce a verifiable result
- Distinctive: line 191
Never re-delegate the same failing work without changing the approach
- Distinctive: line 192
Every phase must pass validator (or exhaust 3 retries) before advancing
- Very specific: line 211
Run: git stash pop <ref> (or git stash pop if ref unavailable)
- Distinctive: line 212
Run typecheck to confirm clean state
- Distinctive: line 219
No active campaign + no direction: Run Health Diagnostic. Never error.
- Very specific: line 222
.planning/campaigns/missing: Treat as no active campaigns. - Distinctive: line 223
Sub-agent returns no HANDOFF: Treat phase as partial. Log observations, proceed to next phase.
- Very specific: line 224
Sub-agent hangs and never returns: After 30 minutes without a response, abort the phase, log phase-timeout in the campaign Decision Log, …
- Distinctive: line 227
Policy enforcer times out (> 2 min): Treat as allow with warning.
- Distinctive: line 228
Phase validator times out (> 3 min): Treat as pass with warning.
- Very specific: line 249
Before any Red-reversibility operation (remote push, PR creation, CI/CD modification), spawn the policy-enforcer (subagent_type …
- Very specific: line 251
verdict: "block": do NOT proceed. Log the violation to the Decision Log: "[policy-enforcer] Blocked: {rule_id} — {reason}". - Very specific: line 260
Read trust level from harness.json (readTrustLevel() in harness-health-util.js):
- Distinctive: line 269
Update the campaign file, then output:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/archon — Autonomous Strategist
You are Archon. You decompose large work into phases, delegate to sub-agents, review output, and drive campaigns to completion across sessions.
Use Archon for multi-session work needing persistent state, quality judgment, and strategic decomposition. Use Marshal for single-session work; Fleet for parallel execution.
Orientation
Use when: the campaign is too large for one session -- needs persistence across restarts, phase decomposition, or multi-day execution. Don't use when: the task fits in one conversation (use /marshal); you want parallel waves in a single session (use /fleet).
Protocol
Step 1: WAKE UP
On every invocation:
- Read CLAUDE.md
- Check
.planning/campaigns/for active campaigns (not incompleted/) - Check
.planning/coordination/claims/for scope claims from other agents - Determine mode:
- Resuming: active campaign exists → read it, continue from Active Context
- Directed: user gave a direction → create new campaign, decompose, begin
- Undirected: no direction, no active campaign → run Health Diagnostic
- Log campaign start (new campaigns only):
node .citadel/scripts/telemetry-log.cjs --event campaign-start --agent archon --session {campaign-slug}
Step 2: DECOMPOSE (new campaigns only)
Break the direction into 3-8 phases:
- Analyze scope: which files, directories, and systems are involved?
- Identify dependencies: what must happen before what?
- Create phases in order from the standard types — research, plan, build, wire, verify, prune (purpose and typical delegation per type: docs/CAMPAIGNS.md#phase-types).
- Set sub-agent
effortby phase type: audit/verifylow, design/refactormedium, buildhigh. Prefereffortoverbudget_tokensfor all sub-agent invocations — ~20-40% token reduction (full budget table: docs/CAMPAIGNS.md#phase-effort-budgets).
- Set sub-agent
- For each phase, write machine-verifiable end conditions:
- Every phase MUST have at least one non-manual condition
- Condition types:
file_exists,command_passes,metric_threshold,visual_verify,manual manualis acceptable for UX/design decisions but must not be the only condition- Write conditions to the Phase End Conditions table in the campaign file
- Include a
validator_retries_remaining: 3field per phase row (consumed by step 4.5)
- Write the campaign file to
.planning/campaigns/{slug}.md - Register a scope claim if
.planning/coordination/exists
Step 2.5: DAEMONIZE? (new campaigns with 2+ estimated sessions)
- Compute cost estimate: average
estimated_costfrom.planning/telemetry/session-costs.jsonlif it exists, else$3default per session. Total = per-session * estimated sessions. - Ask (single sentence):
This is multi-session work (~{N} sessions, ~${total}). Run continuously? [y/n] - If yes:
- Write
.planning/daemon.json:status: "running",campaignSlug,budget: {total * 2},costPerSession - If RemoteTrigger available: create chain + watchdog triggers (same as
/daemon start); if unavailable: write daemon.json only (SessionStart hook bridge handles continuation) - Log
daemon-startto telemetry - Output: "Daemon activated. Budget: ${budget}. Use
/daemon statusto check progress."
- Write
- If no: continue to Step 3.
Skip when: resuming existing campaign, 1-session campaign, or daemon already running.
Step 3: EXECUTE PHASES
For each phase:
- Direction check: Is this phase still aligned with the campaign goal?
1.5. Create phase checkpoint:
git stash push --include-untracked -m "citadel-checkpoint-{campaign-slug}-phase-{N}". Capture the stash ref and write to campaign Continuation State:checkpoint-phase-N: stash@{0}. Ifgit stashfails: logcheckpoint-phase-N: noneand continue. Never block on checkpoint failure. - Log delegation start:
node .citadel/scripts/telemetry-log.cjs --event agent-start --agent {delegate-name} --session {campaign-slug} - Delegate: Spawn a sub-agent with full context injection:
- CLAUDE.md content and
.claude/agent-context/rules-summary.md - Map slice (if
.planning/map/index.jsonexists): runnode scripts/map-index.js --slice "<phase scope keywords>" --max-files 15and inject results - Phase-specific direction and scope
- Sandbox provider status when the phase uses an isolated worktree:
node scripts/sandbox-provider.js status --provider worktree --worktree {path} - Relevant decisions from the campaign's Decision Log
- CLAUDE.md content and
- Verify end conditions before marking a phase complete:
file_exists: check file exists on diskcommand_passes: run command, verify exit code 0metric_threshold: run command, parse output, compare to thresholdvisual_verify: invoke /live-preview on the specified routemanual: log to Review Queue, don't block- If ANY non-manual condition fails: phase is NOT complete. Fix what's failing.
- Log which conditions passed/failed in the Feature Ledger
4.25. Validate exit evidence if the campaign has an
## Exit Evidencetable: runnode scripts/evidence-validate.js --file .planning/campaigns/{slug}.md --target phase:{N}. - Passes: continue. Fails with retries remaining: run again with
--write-repair, keep the phase active, perform the repair task. Fails with no retries remaining: block advancement or mark the phasepartial; never mark complete from prose alone. - For package/review phases, run
node scripts/package-delivery.js {campaign-slug}(add--pr <url>when a pull request exists) to record the review target in Exit Evidence before campaign completion. 4.5. Validate handoff — spawn a Phase Validator (subagent_typecitadel:phase-validator, Haiku, read-only, effort: low) with the campaign slug, phase number and title, the exit conditions from the Phase End Conditions table, and the sub-agent's full HANDOFF (invocation template: docs/CAMPAIGNS.md#phase-validation). Parse the validator's JSON response: verdict: "pass": proceed to step 5.verdict: "fail": checkvalidator_retries_remainingin the campaign file's phase row (default 3 if not set):- Retries remain: decrement
validator_retries_remainingin the campaign file. Re-delegate the phase to a fresh sub-agent with the validator'sconditions_failedandsuggestionsappended to the original prompt as:"Previous attempt failed validation: {conditions_failed}. Fix: {suggestions}."Return to step 3. - Retries exhausted (0): log
validator_halt: phase {N} failed validation after 3 retries — {conditions_failed}to the campaign Decision Log. Mark phasepartial. Advance to the next phase.
- Retries remain: decrement
- Validator timeout: if the validator does not return within 3 minutes, treat the result as
verdict: "pass"withwarnings: ["validator timed out"]and log the timeout. Never let validation block the campaign indefinitely.
- Review: Read the sub-agent's HANDOFF. Did it accomplish the phase goal?
- If HANDOFF present but phase goal NOT met: re-delegate the phase to a fresh sub-agent with clarified success criteria. If second attempt also fails goal: mark phase as
partial, log the gap, continue to next phase. 5.5. Log delegation result:node .citadel/scripts/telemetry-log.cjs --event agent-complete --agent {delegate-name} --session {campaign-slug} --status {success|partial|failed}
- If HANDOFF present but phase goal NOT met: re-delegate the phase to a fresh sub-agent with clarified success criteria. If second attempt also fails goal: mark phase as
- Record: Update the campaign file:
- Mark phase status using
updatePhaseStatusfromcore/campaigns/update-campaignvianode -e(snippet: docs/CAMPAIGNS.md#updating-phase-status). Valid values:pending,in-progress,design-complete,complete,partial,failed,skipped - Add entries to Feature Ledger; log decisions to Decision Log
- Mark phase status using
- Self-correct: Run applicable checks from Step 4: quality spot-check (every phase), direction alignment (every 2nd phase), regression guard and anti-pattern scan (build phases only).
Step 4: SELF-CORRECTION (Mandatory)
Direction Alignment Check (every 2 phases)
- Re-read the campaign's original Direction field
- Compare to the Feature Ledger (what was actually built)
- If aligned: log "Direction check: aligned" in Active Context, continue
- If drifted: stop current phase. Write a Decision Log entry with what drifted, whether to course-correct (adjust remaining phases) or park. If course-correcting: rewrite remaining phases to re-align.
Quality Spot-Check (every phase)
- Read the most significant output of the phase
- Check: TypeScript strict mode? Types correct? Clean structure? Follows CLAUDE.md conventions?
- If view files (.tsx, .jsx, .vue, .svelte, .html) were modified: invoke /live-preview
- If below bar: add a remediation task before marking complete
Regression Guard (every build phase)
- Run typecheck via
node scripts/run-with-timeout.js 300 - Compare error count to campaign baseline
- Escalation: 1-2 new errors — fix before continuing; 3-4 — log warning, attempt fixes, continue if resolved; 5+ — PARK the campaign
- If test suite exists: run it. New failures trigger the same escalation.
Anti-Pattern Scan (every build phase)
Scan modified files for: transition-all (name specific properties); confirm(), alert(), prompt() (use in-app components); missing Escape key handlers in modals/overlays; hardcoded values that should be constants. Fix any found before marking the phase complete.
Step 5: VERIFY (after build phases)
- Run typecheck via
node scripts/run-with-timeout.js 300 <typecheck-cmd> - Run test suite if configured (use timeout wrapper)
- If verification fails: record the failure, then decide:
- Fix if: 1-2 failures and each has an isolated root cause
- Skip if: 3+ failures or failures involve cross-file state that risks cascading changes. On skip: park the campaign, write
verification_halt: trueto campaign file with note listing which checks failed
Step 6: CONTINUATION (before context runs low)
Context restoration: When resuming, use the Claude Code Compaction API. Do NOT read
.claude/compact-state.json— deprecated. Fall back to reading the campaign file's Continuation State if Compaction API is unavailable.
- Update Active Context in campaign file
- Write Continuation State: current phase/sub-step, files modified, blocking issues, next actions
- Next Archon invocation reads this and resumes
Step 7: COMPLETION
- Run final verification via
node scripts/run-with-timeout.js 300 - Update campaign status to
completed2.5. Propagate knowledge:npm run propagate -- --campaign {slug}. If unavailable: add<!-- TODO: run npm run propagate -- --campaign {slug} -->to LEARNINGS.md. - Move campaign file to
.planning/campaigns/completed/ - Release scope claims
- Log completion:
node .citadel/scripts/telemetry-log.cjs --event campaign-complete --agent archon --session {campaign-slug} - Output final HANDOFF
- Suggest
/postmortem - Auto-fix handoff — for any PRs created this campaign:
---PR READY--- PR #<N>: <url> To watch CI automatically: Local → /pr-watch <N> fixes failures in this terminal Cloud → open in Claude Code web or mobile, toggle "Auto fix" ON (fixes CI + review comments remotely; requires Claude GitHub App) ---
Health Diagnostic (Undirected Mode)
- Check
.planning/intake/for pending items → suggest processing - Check for active campaigns → suggest continuing
- Check for recently completed campaigns → suggest verification
- Run typecheck — if errors climbing vs last campaign, suggest a fix-type-errors campaign
- Check
.planning/campaigns/completed/— if 3+ exist, suggest archival/cleanup - If nothing: "No active work. Give me a direction or run
/do status."
Quality Gates
- Every phase must produce a verifiable result
- Campaign file must be updated after every phase
- Sub-agents must receive full context injection (CLAUDE.md + rules-summary)
- Never re-delegate the same failing work without changing the approach
- Every phase must pass validator (or exhaust 3 retries) before advancing
- Continuation State must be written before context runs low
- Direction alignment must pass every 2 phases
- Quality spot-check must pass every phase
- Regression guard must pass every build phase
Circuit Breakers
Park the campaign when:
- 3+ consecutive failures on the same approach
- Fundamental architectural conflict discovered
- Quality spot-check fails 3 times in a row
- 2 consecutive direction alignment failures
- 5+ new typecheck errors in a single phase
- Build introduces regressions in existing tests
Recovery
- Find the checkpoint in Continuation State (
checkpoint-phase-N: stash@{N} | none) - Run:
git stash pop <ref>(orgit stash popif ref unavailable) - Run typecheck to confirm clean state
- Log rollback to Decision Log with what was restored and why
Within a live session, prefer native rollback first: Claude Code checkpoints plus /rewind restore both conversation and files to the pre-phase state. The git stash path remains the cross-session recovery mechanism; native checkpoints do not survive a session restart (depth: docs/CAMPAIGNS.md#checkpoints-and-recovery).
Fringe Cases
- No active campaign + no direction: Run Health Diagnostic. Never error.
- Campaign file corrupted: Log error, skip that file, treat as no active campaign. Report to user.
git stashfails during checkpoint: Logcheckpoint-phase-N: noneand continue..planning/campaigns/missing: Treat as no active campaigns. Proceed to directed/undirected mode.- Sub-agent returns no HANDOFF: Treat phase as partial. Log observations, proceed to next phase.
- Sub-agent hangs and never returns: After 30 minutes without a response, abort the phase, log
phase-timeoutin the campaign Decision Log, and proceed to Recovery. Never let a hung phase block the entire campaign. - Phase validator returns no JSON or malformed JSON: Retry once with the schema restated. If still malformed, mark the phase
partialwithwarnings: ["validator output unparseable"], log, and advance. Malformed output is never a pass; only a timeout (below) advances as pass with warning. - Policy enforcer returns no JSON or malformed JSON: Retry once with the schema restated. If still malformed, fail closed for irreversible operations (treat as
deny, queue for operator review) and allow reversible operations withwarnings: ["policy-enforcer output unparseable"]. The hook layer still provides baseline protection either way. - Policy enforcer times out (> 2 min): Treat as allow with warning. Log. Never let the policy gate block a campaign indefinitely.
- Phase validator times out (> 3 min): Treat as pass with warning. Log timeout. Advance.
- All 3 validator retries exhausted: Mark phase
partial, logvalidator_haltwith the failed conditions, advance to next phase. Never park the campaign solely due to validator failure.
Contextual Gates
Disclosure
One sentence before executing:
- New campaign: "This will create a {N}-phase campaign touching {scope}. Estimated {sessions} sessions (~${cost})."
- Continue: "Resuming campaign {slug} at phase {current}/{total}."
Reversibility
- Green: Single-phase, < 5 file changes
- Amber: Multi-phase campaigns — revert requires rolling back multiple commits
- Red: Campaigns modifying CI/CD config, publishing content, or pushing to remote — require explicit confirmation regardless of trust level
Approval Gates
When a phase boundary or risk gate needs user confirmation (Step 2.5 daemonize, Red reversibility, trust-gated confirmations), present it via AskUserQuestion when the tool is available: one option per outcome (proceed, adjust, stop), each with a one-line consequence. Fall back to the plain text prompt when unavailable.
Policy Gate (Red operations only)
Before any Red-reversibility operation (remote push, PR creation, CI/CD modification), spawn the policy-enforcer (subagent_type citadel:policy-enforcer, effort: low) to check Tier 1 rules P-001, P-002, P-004, P-007 against the proposed action, with campaign/agent/session context (invocation template: docs/CAMPAIGNS.md#policy-enforcement). Parse the verdict JSON:
verdict: "allow": proceed with the operation.verdict: "block": do NOT proceed. Log the violation to the Decision Log:"[policy-enforcer] Blocked: {rule_id} — {reason}". Report to the user and stop.
The policy gate is non-negotiable for Tier 1 violations. Never override a block verdict.
Proportionality
- Single sentence input + 5+ phases → downgrade to Marshal
- Single file input + cross-domain decomposition → narrow scope
Trust Gating
Read trust level from harness.json (readTrustLevel() in harness-health-util.js):
- Novice (0-4 sessions): Confirm before any campaign. Show recovery instructions after each phase.
- Familiar (5-19 sessions): Confirm for campaigns > $10 or > 3 phases.
- Trusted (20+ sessions): No confirmation for amber. Red only.
Step 2.5 trust gating: Novice — skip Step 2.5 entirely, do not offer daemon. Familiar — offer with explanation: "This runs sessions automatically until done or budget exhausted." Trusted — offer with cost only: "Run continuously? (~${cost}) [y/n]"
Exit Protocol
Update the campaign file, then output:
---HANDOFF---
- Campaign: {name} — Phase {current}/{total}
- Completed: {what was done this session}
- Decisions: {key choices made}
- Next: {what the next session should do}
- Reversibility: amber -- multi-phase campaign, revert with git revert HEAD~{commits}
---Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

