AGENT SKILL

unharness

Remove Citadel from a project. Exports valuable state (campaigns, postmortems, research, backlog, discoveries) to docs/citadel/ as human-readable markdown, then removes all harness files and hooks. The archive is detected by /do setup on re-install and offered for restore.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 4
Forks
0

01 前言 Front Matter

name
unharness
license
MIT
description
Remove Citadel from a project. Exports valuable state (campaigns, postmortems, research, backlog, discoveries) to docs/citadel/ as human-readable markdown, then removes all harness files and hooks. The archive is detected by /do setup on re-install and offered for restore.
auto-trigger
false
last-updated
1777507200000
user-invocable
true
trigger_keywords
[ "unharness", "remove citadel", "uninstall citadel", "clean up citadel", "remove harness", "uninstall harness" ]

03 SKILL.md 正文

/unharness — Remove Citadel from a Project

Orientation

Use when: removing Citadel from a project entirely -- exports state and cleans up hooks before uninstall. Don't use when: pausing campaign work (just stop or use /session-handoff); removing a single skill (delete its directory manually).

Invocation Forms

/unharness               # Export archive, then remove harness
/unharness --export-only # Export to docs/citadel/ without removing anything

Protocol

Step 1: FIND CITADEL ROOT

Read .citadel/plugin-root.txt to locate the Citadel install. If missing, use the directory containing this SKILL.md as the fallback.

cat .citadel/plugin-root.txt 2>/dev/null || echo "fallback"

Store as {citadelRoot}.


Step 2: RUN UNHARNESS SCRIPT

node {citadelRoot}/scripts/unharness.js

For --export-only:

node {citadelRoot}/scripts/unharness.js --export-only

The script:

  1. Scans .planning/ for valuable content (campaigns, postmortems, research, backlog, discoveries)
  2. Reads .citadel/project.md and .claude/harness.json for project metadata
  3. Writes docs/citadel/{category}.md files with citadel-archive: true frontmatter
  4. Removes .planning/, .citadel/, .claude/agent-context/
  5. Strips Citadel hook entries from .claude/settings.json (preserves user hooks)
  6. Prints a summary of what was exported and removed

Print the script output verbatim.


Step 3: CLOSING MESSAGE

After the script completes, print:

If archive was written:

Archive is at docs/citadel/ — commit it, delete it, or leave it.
Run /do setup again anytime to reinstall Citadel.
If you run setup in this project, it will find the archive and offer to restore your history.

If nothing was exported (empty project):

Citadel removed. No history to archive.
Run /do setup again anytime to reinstall.

If --export-only:

Archive written to docs/citadel/. Harness files left in place.
Run /unharness without --export-only to complete the removal.

Fringe Cases

Script not found: Report the error and explain the user can run the hook installer manually: node /path/to/Citadel/scripts/unharness.js

No .planning/ directory (harness was installed but never used): The script handles this gracefully — it skips the export and proceeds to cleanup. Nothing special needed.

docs/citadel/ already exists from a previous unharness: The script overwrites with the current timestamp. Prior archives are replaced. If the user wants to keep prior archives, they should commit docs/citadel/ to git first.

User runs unharness on a project that was never set up: The script exits cleanly with "Nothing to export." and nothing is deleted that shouldn't be.


Contextual Gates

Disclosure: "Removing Citadel from [project]. Exporting state to [path] before deletion. This is irreversible without reinstalling." Reversibility: red — removes hooks, clears .claude/settings.json entries, deletes .planning/. State export is made first, but reinstalling requires /setup. Trust gates:

  • Trusted (20+ sessions): irreversible unless reinstalled; exports state first.

Quality Gates

  • Never prompt the user before running — the export is the safety net, not a confirmation dialog
  • Always print the script output so the user can see exactly what happened
  • If the script errors, surface the error directly — don't swallow it

Exit Protocol

After the closing message in Step 3, output nothing further. Unharness is a terminal action — no HANDOFF block, no next-step suggestions. The session is now running without hooks.

04 同仓库更多 Skills

mayankjain1815-commits
mayankjain1815-commits/CITADEL

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.

★ 4
mayankjain1815-commits
mayankjain1815-commits/CITADEL

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.

★ 4
mayankjain1815-commits
mayankjain1815-commits/CITADEL

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 /do. Use for automatic reactions to file changes; do NOT use for one-off inspection or tasks needing human judgment per file.

★ 4
mayankjain1815-commits
mayankjain1815-commits/CITADEL

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.

★ 4
mayankjain1815-commits
mayankjain1815-commits/CITADEL

triage

GitHub issue and PR investigator. Pulls open issues/PRs, 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.

★ 4
mayankjain1815-commits
mayankjain1815-commits/CITADEL

test-gen

Generate and verify tests — happy path, edge cases, error paths — using the project's own framework and patterns

★ 4