context-system: complete migration -> CLAUDE.md is now a 160-line router (zero context lost)

Full migration of the 2236-line monolithic CLAUDE.md into the progressive-context
knowledge graph (per spark-lesson / expert-seed.md), so the deep RE knowledge loads
on-demand instead of every session.

ZERO CONTEXT LOST:
- docs/PROGRESS_LOG.md = the complete old CLAUDE.md, VERBATIM (byte-identical) -- the
  lossless safety net + the "full detail" quick-lookup fallback.
- 18 context/*.md topic files (1343 lines) digest every section (§1-3 -> project-overview,
  §4 -> content-archives, §5 -> asset-formats/bgf-format, §5a -> source-completeness,
  §5b/§8 -> wintesla-port, §7/§10 -> locomotion, §10a -> build-and-run, §10b ->
  reconstruction-method, §10c -> combat-damage + reconstruction-gotchas, §10d -> subsystems,
  render notes -> rendering, gauges -> gauges-hud, MP -> multiplayer, §9 -> open-questions).
- reference/glossary.yaml (53 terms). decomp-reference.md = the offsets/ClassIDs/addresses hub.

CLAUDE.md (160 lines) = router: identity, answer/reason protocols, quick-lookup table,
evidence tiers (T0 engine-truth / T1 decompiled+verified / T2 reconstructed+runtime /
T3 guarded / T4 hypothesis), conventions + DO-NOT (the systemic bug classes), structure.
Retains the load-bearing work directives (build recipe pointer, "keep current" mandate).

Knowledge graph validates CLEAN (scratchpad/checkctx.py -- all [[links]] + quick-lookup +
docs refs resolve; [[name]] -> topic file or glossary term). docs/*.md ledgers stay as the
detailed logs; context/*.md are the curated digests that route into them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-07 22:19:50 -05:00
co-authored by Claude Opus 4.8
parent 1cd57ade85
commit f914fc040a
18 changed files with 3208 additions and 2388 deletions
+24 -22
View File
@@ -18,9 +18,14 @@ knowledge should load on-demand.
- **Non-destructive:** the live `CLAUDE.md` is UNCHANGED until the migration is complete + approved.
The proposed router is `context/_ROUTER-DRAFT.md`.
## Status
## Status — ✅ COMPLETE (migration done, CLAUDE.md swapped)
### ✅ Foundation built (this pass)
The full migration landed: `CLAUDE.md` is now a **160-line router**; the complete 2236-line
monolith is preserved verbatim as **`docs/PROGRESS_LOG.md`** (byte-identical — zero context lost);
**18 context topic files** (1343 lines) digest every CLAUDE.md section; the knowledge graph
validates CLEAN (all `[[links]]` + quick-lookup + docs refs resolve; `scratchpad/checkctx.py`).
### ✅ Foundation built (first pass)
- `reference/glossary.yaml` — ~45 terms (platform/engine, formats, scene/entity, reconstruction).
- `context/decomp-reference.md` — the quantitative hub: resource-type enum, ClassID map, mech
offsets, damage delivery, weapon constants, env gates, tools.
@@ -31,27 +36,24 @@ knowledge should load on-demand.
- `context/_ROUTER-DRAFT.md` — the proposed slim CLAUDE.md (identity, protocols, quick-lookup,
evidence tiers, conventions, structure).
### ☐ Remaining topic files (the next tranche — migrate from CLAUDE.md §/docs)
| topic | source in CLAUDE.md / docs |
|---|---|
| `project-overview.md` | §1-3 |
| `pod-hardware.md` | §3 |
| `content-archives.md` | §4, §4a |
| `asset-formats.md` | §5, docs/ASSET_PIPELINE.md |
| `source-completeness.md` | §5a, docs/BT_SOURCE_STATUS.md |
| `wintesla-port.md` | §5b, §8 |
| `build-and-run.md` | §10a, §10a-bis |
| `reconstruction-method.md` | §10b |
| `locomotion.md` | §7, docs/P3_LOCOMOTION.md |
| `subsystems.md` | §10d, docs/SUBSYS_PLAN.md, docs/VEHICLE_SUBSYSTEMS.md |
| `combat-damage.md` | §10c, docs/HARD_PROBLEMS.md |
| `rendering.md` | §10 render-fidelity notes (large) |
| `multiplayer.md` | §7 Phase 7, §8 P6 |
### ✅ Second pass — all topics migrated (§→topic)
project-overview (§1-3), pod-hardware (§3), content-archives (§4/4a), asset-formats (§5),
source-completeness (§5a), wintesla-port (§5b/§8), build-and-run (§10a/10a-bis), reconstruction-method
(§10b), locomotion (§7/§10), subsystems (§10d), combat-damage (§10c), rendering (§10 fidelity),
multiplayer (§7/§8). Plus the first-pass hubs (decomp-reference, reconstruction-gotchas, bgf-format,
gauges-hud, open-questions). §6 (the standalone port/ D3D9 viewer sandbox) is noted in wintesla-port;
full detail in PROGRESS_LOG.
### Swap (after review + full migration)
1. Move the current `CLAUDE.md` deep content into the topic files above.
2. Replace `CLAUDE.md` with `context/_ROUTER-DRAFT.md` content (preserving the git history of the old).
3. Verify: a fresh session reads the router → quick-lookup → topic files load on demand.
### Swap done
1. `docs/PROGRESS_LOG.md` = the verbatim old CLAUDE.md (lossless safety net + the "full detail" quick-lookup row).
2. `CLAUDE.md` = the router (git history preserves the old monolith too).
3. Verified: knowledge graph clean; a fresh session reads the router → quick-lookup → topics on demand.
### Maintenance going forward
New durable finding → the relevant `context/*.md` (+ the `docs/` ledger for exhaustive detail), with
an evidence tier. New topic → a `context/*.md` + a quick-lookup row + cross-refs. The `docs/*.md`
ledgers (incl. PROGRESS_LOG) remain the detailed logs; `context/*.md` are the curated digests.
Re-run `scratchpad/checkctx.py` to validate links after edits.
## Notes
- The router keeps the build one-liners + the "keep current" mandate so active port work is