Skip to content

11 · uninstall-preserve

本场景验证什么

Preserve ledgers(保留台账)选项卸载 Archon 时,应删除所有 canonical 文件(soul / manifest / commands / rules / skills / contracts / scripts / 绑定目录),但保留运行时台账drift.md / debt.md / memos.md / run/state.json / records 目录)原封不动地留在 .archon/ 中。

用户重新获得一个干净的编辑器界面,项目的治理历史仍保存在磁盘上, 日后重新安装时将从同一台账状态恢复。

测试环境

Fixture场景 02 的输出 + 至少一条 boot-claude-python(06)的 drift 记录
IDEClaude Code
受测 manifest 版本v0.1.0
操作系统与场景 02 相同

前置条件

  1. 场景 02 + 06 均已 ✅。
  2. .archon/drift.md 中至少存在一条真实记录。
  3. git status 干净。

步骤

text
1. In Claude Code, paste exactly:
     hi archon, uninstall yourself but preserve my ledgers
2. The agent should print a planned-removal table that:
     - lists every canonical file scheduled for delete
     - lists every runtime ledger explicitly marked "PRESERVE"
3. Confirm.
4. Verify on disk:
     - .archon/soul.md, .archon/manifest.md, etc. — gone
     - .claude/commands/, .claude/rules/, etc. — gone
     - .archon/drift.md, .archon/debt.md, .archon/memos.md — STILL
       present, unchanged byte-for-byte
     - .archon/runs/ (or whichever runtime path manifest declares) — STILL
       present
     - scripts/archon-check.py — gone (it's part of the canonical kit)
     - .pre-commit-config.yaml — preserved (project-owned config)
5. Verify the project's own validate command still works:
     python -m pytest      # exit 0

预期结果

检查项预期
Canonical 文件被删除
运行时台账(drift.md / debt.md / memos.md / runs)保留,逐字节一致
.claude/ 绑定目录为空或被完全删除
项目自身的 python -m pytest退出码 0
卸载后的 git status仅可见 canonical 文件的删除项;台账未被修改
重装(hi archon, install yourself + URL bootstrap)复用已保留的台账,不会覆盖

演示录像

Will be replaced by docs/public/videos/uninstall-preserve.mp4 once recorded. See videos/README for upload conventions.
Will be replaced by docs/public/asciinema/uninstall-preserve.cast embedded via the asciinema-player web component. See asciinema/README for the recording command.

运行记录

下表由 sandbox runner (scripts/sandbox-run.mjs) 写入 docs/testing/sandbox/runs/uninstall-preserve/ 下的 JSON 实时渲染。 要添加新一行,请运行:

bash
node scripts/sandbox-run.mjs --only=uninstall-preserve
Started (UTC)ManifestRunnerResultDurationNotesRecord
2026-05-06 10:24:36 UTCv0.1.0cli✅ passing367 msJSON
2026-05-06 06:10:26 UTCv0.1.0cli✅ passing409 msJSON
2026-05-06 00:55:45 UTCv0.1.0cli✅ passing358 msJSON
2026-05-06 00:40:11 UTCv0.1.0cli✅ passing361 msJSON
2026-05-05 15:00:36 UTCv0.1.0cli✅ passing324 msJSON
2026-05-05 14:55:20 UTCv0.1.0cli✅ passing384 msJSON
2026-05-05 14:22:54 UTCv0.1.0cli✅ passing370 msJSON
2026-05-05 14:04:54 UTCv0.1.0cli✅ passing380 msJSON
2026-05-05 14:01:03 UTCv0.1.0cli❌ failing382 msfailed assertions: dir_absent: tools/archon-cli: unexpectedly present: tools/archon-cliJSON
2026-05-05 14:00:02 UTCv0.1.0cli❌ failing390 msfailed assertions: dir_absent: tools/archon-cli: unexpectedly present: tools/archon-cliJSON
2026-05-05 13:55:06 UTCv0.1.0cli❌ failing379 msfailed assertions: dir_absent: tools/archon-cli: unexpectedly present: tools/archon-cli file_exists: .archon/soul.md: missing: .archon/soul.mdJSON

已知局限

  • 卸载(保留台账)后的重装在此处第 6 步以人工方式验证,但若有 专门的 reinstall-after-preserve 场景可更清晰地隔离该流程。 按优先级安排时再添加。

交叉引用

json
{
  "runnable": "cli",
  "fixture": "fixtures/sandbox-node-ts",
  "ide_platform": "cursor",
  "prerequisites": [
    {
      "name": "archon install",
      "cli": "install",
      "flags": [
        "--with=cli"
      ]
    }
  ],
  "steps": [
    {
      "name": "archon uninstall (preserve ledgers)",
      "cli": "uninstall",
      "flags": []
    }
  ],
  "assertions": [
    {
      "file_absent": "tools/archon-cli/bin/archon.mjs"
    },
    {
      "file_absent": ".cursor/commands/archon.md"
    },
    {
      "file_absent": ".archon/soul.md"
    },
    {
      "file_exists": ".archon/manifest.md"
    }
  ]
}

依据 Apache-2.0 许可证发布。