KB-3832
IU Core 120x Three-Axis — 08 Next macro package
4 min read Revision 1
dieu44iu-core-mvp120xnext-macrosemantic-inferencetext-as-codev0.62026-05-22
08 — Next Macro Package
State at handoff
- Commit
bf05cc5onmain(parente789bff); KB commit95c4913. 740 tests. - Migrations 001–014 + runtime
010–050/060/090/120/140/160/170/180/190/200/ 230/240on production. iu_structure_operation57 (45 reparent + 12 deprecate, all enacted);event_outboxiu 56;iu_route_attempt56 (55 dry_run + 1 sent);iu_tree_change_log1;iu_route_dead_letter0.- 158 IUs — 12
deprecated, 86draft, 60enacted. - Three-axis metadata:
iu_metadata_tag330 derived tags,iu_metadata_tag _registry17 keys; envelope covers all 158. - DOT 68/68, no-hardcode clean, five-layer classified.
- Delivery seam built + INERT. Structure-op gate closed.
Open gaps (exact)
- Axis-B inferred lane is empty — only
derivedtags exist (330). Thetopic/subject/legal_domaininferred/proposedlanes are registered capabilities with zero rows. Real semantic topic tagging needs an NLP/embedding pass — no semantic content was fabricated. - Text-as-code import is unbuilt —
text_as_code.pydefines the deterministic export, the diff, and a fail-closed validate-only import contract;IMPORT_IS_DESTRUCTIVE=False. No real importer, no durable round-trip export-to-disk. - Auto-cut first integrated production run — the bridge → structure-op →
event → three-axis chain is proven
BEGIN…ROLLBACK(sandbox/090 M7); no durable auto-cut run. - Broader durable internal delivery — proven safe at scale (sandbox/080
D7) but only 1 durable
sentdelivery exists; a durableenabled+dry_run=falseroute is still unproven. PgStructureStorelive psycopg run — still proven only over a fake connection.- 60 enacted (null)-doc IUs — frozen by
trg_iu_enacted_immut; no encoded hierarchy, no axis-Asort_order.
Recommended next macro
IU_CORE_SEMANTIC_INFERENCE_AND_TEXTCODE_ROUNDTRIP
- Axis-B inference pass — populate the
inferredtopic/subject lane from a deterministic, reviewable classifier (keyword/registry rules first, an embedding pass later), strictlyenrichment_source='inferred'with a confidence < 1; keepderivedauthoritative. Closes gap #1. - Text-as-code durable export — run the proven
text_as_codeexport to a real on-diskiu-tree/layout (read-only from PG), commit it, and prove a diff round-trip. Closes part of gap #2. - Text-as-code importer — build the importer behind a fail-closed gate +
validate_import; proveBEGIN…ROLLBACK. Closes gap #2.
Alternatives
- Auto-cut first integrated production run — drive a real orchestrator
CutResultthroughAutocutBridge → PgStructureStore → fn_iu_structure_op_*durably, thenfn_iu_metadata_refreshthe minted IUs into the three axes (gap #3). - Durable internal delivery route — allowlist a structure route durably and
run the worker live so a route sits
enabled+dry_run=falsedurably (gap #4). - Vector bridge — feed the axis-B
inferredtags / IU content into Qdrant so the semantic axis also powers vector search.
Recommended first: the axis-B inference pass + text-as-code durable export — both build directly on this macro's three-axis substrate, both stay additive and reversible, and together they make the semantic axis real and the text-as-code layer round-trippable.