# Corpus Reconciliation

> Audit every record one project holds against the index over them, then repair each mismatch found. "audit the records", "reconcile the index", "rebuild the map", the index and the records drifted apart, two records in force contradict each other, a record the index omits, a pointer whose target is gone, content carrying no recorded author, a recurring audit timer fires.

- Skill: `ryzhakar/corpus-reconciliation` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ryzhakar/corpus-reconciliation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ryzhakar/corpus-reconciliation/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: ryzhakar (https://skillmd.com/u/ryzhakar)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/ryzhakar/corpus-reconciliation

---


<take-what-is-compared>
Take a record as one written statement the system keeps; never take anything unwritten for one.

Take a record's force as its power to bind action; never treat a record stripped of it as binding.

Take the corpus as every record under one scope — one project the system governs — across every tier, meaning every standing store a record sits in; never take a part of the corpus for the whole.

Take the archive as the standing store reached by search alone; never take another store for it.

Take the map as the index over the corpus; never take it for the corpus itself.

Take an audit as one pass that reads the corpus whole, compares it with the map, and repairs what the comparison finds; never take a partial pass for one.

Date the corpus from its scope's creation; never date it from the first audit.

Count every write since the last audit as a change to the corpus; never treat an earlier audit's result as current.

Write the map at the first audit and at each audit after; never write it outside one.

Hold the map and the corpus one to one: every record the map lists exists, and every record that exists the map lists; never leave either side unmatched.

Take the declared shape of records — the kinds a scope admits and the home of each kind, meaning the path where records of that kind belong — from schema-resolution; never take it from the map.

Leave the declared shape to schema-resolution; never edit it here.
</take-what-is-compared>

<read-before-repairing>
Read the map, every record in the corpus, each record's recorded authorship, and each record's lineage — the chain of links running back through what it replaced — before repairing anything; never repair from a partial read.

Call each defect this reading finds in a record a fault; never call anything outside a record one.

Judge each record's authorship through authority-check; never judge it here.
</read-before-repairing>

<repair-each-fault>
Repair each fault by supersession (linking a replacement to the record replaced and keeping both), correction (rewriting a record in place), adoption (listing a found record in the map), quarantine (keeping a record and stripping its force), or retirement (keeping a record and stripping its force by decision); never reach for a sixth move.

Repair every fault in a record seated in the charter tier by correcting it in place; never supersede such a record.

Keep each record's lineage through every repair; never break one.

Write every repair through record-writing; never write one another way.

Write each quarantine and each retirement as a record naming the content it puts out of force and linking to it; never strip a record's force without writing one.

Leave the content of each record seated in any tier but charter as its author wrote it; never rewrite such a record.

Adopt an orphan — a record the map omits — under the home where it sits; never move it to another home.

Quarantine an orphan whose authorship authority-check refuses; never leave one in force.

Quarantine content carrying no recorded author; never leave it in force.

Leave quarantined content for the word of the owner — the human whose scope this is; never rule on it.

Repair a contradiction between two records in force at any tier but charter by superseding the earlier with the later where one recorded author wrote both; never by editing either.

Quarantine both records of a contradiction their recorded authorship and dates fail to order; never pick between them by their content.

Supersede a pointer — a record whose content is another record's home — seated in any tier but charter when its target moves to a new home; never supersede one whose target is gone.

Quarantine a pointer whose target is gone; never delete it.

Take a directive as a standing instruction; never take a one-time request for one.

Retire every directive resting on a goal — the owner's stated purpose — when that goal ends; never leave one in force.

Leave the ended goal's history where event-capture wrote it; never cut it.
</repair-each-fault>

<rebuild-the-map>
Rebuild the map at each audit from the records that exist; never from the homes the declared shape prescribes.

Write the map as one file at the home schema-resolution gives it; never spread it across two.

Head the map with the date of this audit; never leave the head undated.

Give the map one row per record; never merge two records into one row.

Carry in each row the record's home path, its kind, its tier, its status — the force state record-writing set — its subjects, meaning what the record is about, and the date of its last write; never leave a cell empty.

Take every row from a record already written; never write a record to fill a row.
</rebuild-the-map>

<move-into-the-archive>
Move into the archive superseded records, retired records, quarantined content, aged records of the journal event-capture keeps, the records one arrival from outside brings whole, and the receipt event-capture writes for that arrival, naming what arrived, when, and from whom; never move anything else in.

Take the archive's home from schema-resolution; never take it from anywhere else.

Move a record into the archive through record-writing, changing its home to the archive's and its map row with it; never leave a copy at the old home.

Leave every record the archive holds where it sits; never move one out.
</move-into-the-archive>

<close-the-audit>
Keep one home per piece of knowledge; never let two records in force carry the same knowledge in two homes.

Write one trace of this audit — the dated entry of what it found and repaired — through event-capture; never write it another way.

Close the audit when the map matches the corpus, every fault stands repaired, and every lineage runs unbroken; never close before all three hold.
</close-the-audit>

