Turns a pile of plan directories into docs/history/, where every decision appears with the alternative it replaced and the reason it won, and every reproducible failure with the mechanism behind it and the guard that closed it, then deletes the plans that document covers. Use when history must be organised: old plans become decisions, and old bug reports become one incident report.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Archive?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/uniterra-solutions-archive)
---
name: archive
description: "Turns a pile of plan directories into docs/history/, where every decision appears with the alternative it replaced and the reason it won, and every reproducible failure with the mechanism behind it and the guard that closed it, then deletes the plans that document covers. Use when history must be organised: old plans become decisions, and old bug reports become one incident report."
version: 4.0.0
author: Tsz Kin Lai (LaiTszKin), Hermes Agent
license: MIT
platforms: [linux, macos, windows]
metadata:
hermes:
tags: [software-development, history, decisions, mermaid, cleanup]
related_skills: [study, plan]
---
# Archive — from a pile of plans to one history
## Context
Collect the record before writing any of it, because a reason reconstructed from the code is a plausible story with no author.
- **One row per plan**: the artefacts it holds, its first and last commit date, whether it is tracked, whether a live document still references it, and whether `docs/history/index.md` already covers it — built from `references/plan-discovery.md` rather than from memory.
- **The batches**: plans that replaced one another are read together in commit order, because a boundary between a decision and its reversal produces two records that contradict each other.
- **The reasons as written at the time**, quoted from the plan with `path:line` or from the commit as `<sha> — <subject>`.
- **The bug reports where any exist**: `<plan-dir>/bugs/BUG-*.md` from `pdd-reproduce`, because the mechanism of a failure is the other half of the history and nobody writes it twice (`references/incident-report.md`).
- **The reference files**: `references/decision-record.md` for what qualifies as a decision, the record's fields and dating, supersession and evolution events; `references/history-diagrams.md` for the timeline, era flowchart and decision graph with their conventions; `references/plan-discovery.md` for what counts as a plan, its format eras and what no inventory can tell you; `references/deletion.md` for when a deletion is irreversible, what must exist first and how a wrong removal is diagnosed; `references/incident-report.md` for what a failure row carries and when two reports are one row; `assets/HISTORY.md` for the index's shape and `assets/INCIDENTS.md` for the incident report's.
## Goal
`docs/history/` holds `index.md`, `timeline.md`, `decisions.md` and `eras/NN-<slug>.md` when the register would pass ~300 lines, with every era file carrying a row in the register's `## Era detail` table. `docs/history/incidents.md` carries one row per mechanism with its symptom, its guard, its area and its state, the classes that repeat, and what stays open — and it is what survives when the plan carrying the `BUG` records is deleted (`references/incident-report.md`).
A reader walks history to decision to evidence without the plans, and git plus the index's recorded commits are the only copy left.
## Constraints
- **Every decision carries a rejected alternative, a date or `undated`, a `path:line` with a commit hash, and its source plan**, because the citation must resolve after the plan is deleted.
- **Two plans that disagree leave one record**, the newest, with the older claim inside its `conflict:` field, because a register that argues with itself cannot answer why the code looks like this.
- **Every decision id appears exactly once as a node in the decision graph**, every node has a row, and the agent reads the ids off both to compare the sets.
- **Every era names the decisions that drove it**, so a reader reaches the evidence without the plans.
- **Deletion is gated on coverage**: every plan is either covered by a record or excluded with a reason, and no conflict keeps two rows.
- **A reference sweep precedes every deletion** across every tracked file type, because a checker that parses a plan-adjacent `.tsv` crashes on a missing file.
- **Every deleted plan is recoverable at a commit the index names**, and that commit names the decision ids the plan produced, because a deletion nobody can trace back is indistinguishable from an accident.
- **An untracked plan is summarised if useful and never deleted**, because git cannot recover it.
- **Ids are never renumbered or reused**, because tasks, commits and reviews quote them.