# Audit pipeline — reproducibility kit

Everything the evidence ledger and decision register are built from, runnable in place.
All paths resolve relative to this folder; the site copy lives at `../site`.

## Artifacts (recorded outputs, 2026-07-15)

- `master_claims.json` — the 132 corpus claims parsed from `../site/documents/raw/research/` (9 domain reports + critic-and-gapfill), with sources, load-bearing tags, and the sweep's own verification transcripts attached.
- `batch_01..12.json` — the 12 verifier work orders (one per source batch; 121 unique URLs).
- `results_01..12.json` — the verifier outputs, verbatim: per-claim verdict, verbatim quote, checked numbers, not-visible numbers, retrieval surface. Constraint enforced: only the URL the corpus names (plus served redirects and same-document arXiv variants); verdicts from retrieved text only.
- `decision_grades.json` — decision-use grade (A/B/C), basis, measurement regime, and currency note for every claim (authored in `grade_claims.py` with per-claim rationale).
- `usage_map.json` — hand map of where claims are used on index/brief/research/pilot/architecture.
- `decisions_usage.json` — auto-recorded claim usage from the generated decision register.

## Scripts

| Script | What it does | Re-runnable? |
|---|---|---|
| `parse_corpus.py` | Corpus markdown → `master_claims.json` | Yes (idempotent) |
| `grade_claims.py` | Grades table → `decision_grades.json` | Yes (idempotent) |
| `build_data.py` | Merge claims + results + grades + usage → `../site/assets/claims.json` | Yes (idempotent) |
| `build_pages.py` | `claims.json` + decision spec → `../site/evidence.html`, `../site/decisions.html`; records `decisions_usage.json` | Yes (idempotent) |
| `patch_pages.py` | One-shot chip/nav/anchor edits to the original five leadership pages | **No** — already applied; its exact-match assertions will (correctly) fail against the patched site. Kept as the audit record of every edit made. |
| `verify_site.py` | Crawl every internal link + fragment, validate JSON, assert claims.json invariants, regenerate `../site/site-manifest.json` | Yes — run after any change |

## Full rebuild of the evidence layer

```bash
python3 parse_corpus.py     # only needed if the corpus documents change
python3 grade_claims.py
python3 build_data.py && python3 build_pages.py
python3 build_data.py && python3 build_pages.py   # second pass folds decision-register usage into ledger backlinks
python3 verify_site.py
```

## Re-running the live source verification

The `results_*.json` files are recorded outputs from 2026-07-15. To re-verify sources live,
issue each `batch_*.json` to a fresh agent (or script) under the same constraint —
fetch only the listed URL and its served redirects / same-document arXiv variants; verdicts
from retrieved text only — and overwrite the matching `results_*.json`, then rebuild.

