Ledger History Archiver
- Read
.codex/harness/ledger-retention.jsonand validate it against its schema. - Run
.codex/hooks/ledger-history-archiver.ps1. - Archive only registered ledger rows whose status is terminal.
- Write and verify the history copy before removing the active row.
- Update
流程管理/历史记录库/INDEX.md, transaction state, and runtime event. - Run
ledger-history-integrity.ps1; block closeout on duplicate IDs, missing hashes, unfinished transactions, or terminal rows left active. - Treat a repeated run with the same stable ID and content hash as no-op.
Do not archive specifications or non-terminal work. Never delete the active record when archive verification fails.


