Skip to content

12 · uninstall-archive

What this scenario proves

The Archive ledgers option moves the runtime ledgers (drift.md / debt.md / memos.md / runs/) into a single timestamped tarball or zip outside .archon/ (e.g. .archon-archive-2026-05-05.tar.gz at the project root) before deleting .archon/ entirely.

This is the option for projects that:

  • want a clean repo (no .archon/ left behind),
  • but also want a portable record of the governance history they built up, in case they re-adopt later or audit the past.

Test environment

Fixtureoutput of scenario 01 + at least one boot-cursor-node (05) drift row
IDECursor
Manifest version under testv0.1.0
OSsame as scenario 01

Pre-conditions

  1. Scenarios 01 + 05 both ✅.
  2. .archon/drift.md has at least one real row.
  3. git status clean.

Steps

text
1. In Cursor, paste exactly:
     hi archon, uninstall yourself and archive my ledgers
2. The agent should print a planned-removal table that includes a
   line like:
     ARCHIVE  .archon/drift.md, .archon/debt.md, ...
       → .archon-archive-<YYYY-MM-DD-HHmm>.tar.gz
     DELETE   <every other canonical and ledger file>
3. Confirm.
4. Verify on disk:
     - .archon/  — gone entirely
     - .cursor/  — gone (binding dir removed; if you keep .cursor/
       for non-Archon settings, only Archon's contributed files are
       removed)
     - scripts/archon-check.py — gone
     - .archon-archive-<timestamp>.tar.gz — exists at project root
5. Inspect the archive contents:
     tar -tzf .archon-archive-<timestamp>.tar.gz
   should list every preserved ledger plus a small README
   explaining how to restore.
6. Verify the project's own validate still works:
     npm run validate     # exit 0

Expected outcome

CheckExpected
Archive tarball exists at project rootyes
Archive includes .archon/drift.md, .archon/debt.md, .archon/memos.md, and any runs/ contentyes
Archive includes a README explaining restore stepsyes
.archon/ directory removedyes
.cursor/ Archon-contributed files removed (other Cursor settings preserved)yes
npm run validate exit code0
git status after uninstallshows the archive tarball as untracked + Archon files deleted
Restore by extracting archive into a fresh .archon/ directory then running installworks (manual verification optional)

Demo recordings

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

Run records

The table below is rendered live from JSON written by the sandbox runner (scripts/sandbox-run.mjs) under docs/testing/sandbox/runs/uninstall-archive/. To add a new row, run

bash
node scripts/sandbox-run.mjs --only=uninstall-archive
Started (UTC)ManifestRunnerResultDurationNotesRecord
2026-06-08 08:17:13 UTCv0.1.0cli✅ passing353 msJSON
2026-06-07 07:10:18 UTCv0.1.0cli✅ passing393 msJSON
2026-06-06 06:34:42 UTCv0.1.0cli✅ passing361 msJSON
2026-06-05 07:14:08 UTCv0.1.0cli✅ passing349 msJSON
2026-06-04 07:56:45 UTCv0.1.0cli✅ passing358 msJSON
2026-06-03 08:24:19 UTCv0.1.0cli✅ passing370 msJSON
2026-06-02 08:00:53 UTCv0.1.0cli✅ passing377 msJSON
2026-06-01 08:40:47 UTCv0.1.0cli✅ passing370 msJSON
2026-05-31 07:02:26 UTCv0.1.0cli✅ passing355 msJSON
2026-05-30 06:27:55 UTCv0.1.0cli✅ passing360 msJSON
2026-05-29 06:59:41 UTCv0.1.0cli✅ passing361 msJSON
2026-05-28 06:59:35 UTCv0.1.0cli✅ passing354 msJSON
2026-05-27 07:09:44 UTCv0.1.0cli✅ passing362 msJSON
2026-05-26 06:52:10 UTCv0.1.0cli✅ passing323 msJSON
2026-05-25 07:20:24 UTCv0.1.0cli✅ passing337 msJSON
2026-05-24 06:41:54 UTCv0.1.0cli✅ passing363 msJSON
2026-05-23 06:16:52 UTCv0.1.0cli✅ passing350 msJSON
2026-05-22 06:54:19 UTCv0.1.0cli✅ passing362 msJSON
2026-05-21 06:58:06 UTCv0.1.0cli✅ passing356 msJSON
2026-05-20 06:53:39 UTCv0.1.0cli✅ passing349 msJSON
2026-05-19 06:53:20 UTCv0.1.0cli✅ passing348 msJSON
2026-05-18 07:01:49 UTCv0.1.0cli✅ passing361 msJSON
2026-05-17 06:27:38 UTCv0.1.0cli✅ passing348 msJSON
2026-05-16 06:04:42 UTCv0.1.0cli✅ passing355 msJSON
2026-05-15 06:38:01 UTCv0.1.0cli✅ passing357 msJSON
2026-05-14 06:28:58 UTCv0.1.0cli✅ passing360 msJSON
2026-05-13 06:30:26 UTCv0.1.0cli✅ passing327 msJSON
2026-05-12 06:19:02 UTCv0.1.0cli✅ passing349 msJSON
2026-05-11 06:45:37 UTCv0.1.0cli✅ passing329 msJSON
2026-05-10 06:16:46 UTCv0.1.0cli✅ passing376 msJSON
2026-05-09 05:52:41 UTCv0.1.0cli✅ passing357 msJSON
2026-05-08 05:33:37 UTCv0.1.0cli✅ passing382 msJSON
2026-05-07 11:01:05 UTCv0.1.0cli✅ passing431 msJSON
2026-05-07 09:54:55 UTCv0.1.0cli✅ passing355 msJSON
2026-05-07 09:45:15 UTCv0.1.0cli✅ passing452 msJSON
2026-05-07 06:15:46 UTCv0.1.0cli✅ passing354 msJSON
2026-05-06 13:05:54 UTCv0.1.0cli✅ passing377 msJSON
2026-05-06 10:24:36 UTCv0.1.0cli✅ passing357 msJSON
2026-05-06 06:10:26 UTCv0.1.0cli✅ passing399 msJSON
2026-05-06 00:55:44 UTCv0.1.0cli✅ passing360 msJSON
2026-05-06 00:40:10 UTCv0.1.0cli✅ passing363 msJSON
2026-05-05 15:00:36 UTCv0.1.0cli✅ passing328 msJSON
2026-05-05 14:55:19 UTCv0.1.0cli✅ passing418 msJSON
2026-05-05 14:22:54 UTCv0.1.0cli✅ passing365 msJSON
2026-05-05 14:04:54 UTCv0.1.0cli✅ passing400 msJSON
2026-05-05 14:00:01 UTCv0.1.0cli❌ failing388 msfailed assertions: dir_absent: tools/archon-cli: unexpectedly present: tools/archon-cliJSON
2026-05-05 13:55:06 UTCv0.1.0cli❌ failing477 msfailed assertions: dir_absent: tools/archon-cli: unexpectedly present: tools/archon-cliJSON

Known limitations

  • The exact archive filename pattern (.tar.gz vs .zip, timestamp granularity) is whatever the protocol page declares — this scenario asserts the archive exists and is restorable, not the exact filename shape.
  • Restore-from-archive is verified manually here; a dedicated restore-from-archive scenario would tighten this guarantee.

Cross-references

json
{
  "runnable": "cli",
  "fixture": "fixtures/sandbox-node-ts",
  "ide_platform": "cursor",
  "prerequisites": [
    {
      "name": "archon install",
      "cli": "install",
      "flags": [
        "--with=cli"
      ]
    }
  ],
  "steps": [
    {
      "name": "archon uninstall --archive-ledgers",
      "cli": "uninstall",
      "flags": [
        "--archive-ledgers"
      ]
    }
  ],
  "assertions": [
    {
      "file_absent": ".cursor/commands/archon.md"
    },
    {
      "file_absent": "tools/archon-cli/bin/archon.mjs"
    },
    {
      "file_absent": ".archon/soul.md"
    }
  ],
  "notes": "--archive-ledgers moves runtime ledgers under .archon-history-<ts>/. We assert .archon/soul.md is gone (moved). A more rigorous check could glob-match .archon-history-*/soul.md."
}

Released under the Apache-2.0 License.