Skip to content

The map compiler: dex-map writes state/map.json - #126

Merged
leeovery merged 1 commit into
mainfrom
instance-map-compiler
Sep 1, 2026
Merged

The map compiler: dex-map writes state/map.json#126
leeovery merged 1 commit into
mainfrom
instance-map-compiler

Conversation

@leeovery

@leeovery leeovery commented Sep 1, 2026

Copy link
Copy Markdown
Owner

PR1 of the instance-map stack (design: #125). The mechanical compile: dex-map reads taxonomy, entity-members, corpus and wiki and writes state/map.json — every topic and entity with members, counts, has-page and newest date, plus the typed relation graph (directed wikilink edges, weighted shared-member edges). Deterministic to the byte, atomic write, loud refusal on malformed judgment files, honestly-empty map for young instances. Wikilink extraction lifted to wikitext.py, shared with serve unchanged.

63 tests; mutation audit run on both new modules (survivors read — all equivalent).

🤖 Generated with Claude Code

One mechanical compile inverts what is already on disk — taxonomy,
entity-members, corpus and wiki — into the cached artifact the query
surface will read: every topic (uncategorized-shares excluded — a ledger,
not a topic) with description, sorted members, count, has-page and the
newest member's share date; every entity with kind, aliases and members;
and a typed edge list with implicit nodes — directed wikilink edges kept
only between taxonomy names, and weighted shared-items intersections for
topic-topic and entity-topic pairs, each stored once, smaller name first.

The bytes are deterministic — sorted names, sorted ids, fixed edge order —
so a freshness check can diff a recompile against the file. A missing
taxonomy or entity-members file compiles an honestly empty map; a
malformed one refuses loudly with nothing written; a corpus or wiki file
that will not read contributes nothing, as in serve — lint is what
reports broken files.

The [[wikilink]] extraction lifts out of serve/library.py into
wikitext.py, THE one extraction both readers share; serve behavior is
unchanged. Instance gains map_path, KNOWN_VERBS gains map, and the entry
point, shim usage line and README command table move together per the
standing rule.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@leeovery
leeovery merged commit 2e367d3 into main Sep 1, 2026
@leeovery
leeovery deleted the instance-map-compiler branch September 1, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant