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 bf05cc5 on main (parent e789bff); KB commit 95c4913. 740 tests.
  • Migrations 001–014 + runtime 010–050/060/090/120/140/160/170/180/190/200/ 230/240 on production.
  • iu_structure_operation 57 (45 reparent + 12 deprecate, all enacted); event_outbox iu 56; iu_route_attempt 56 (55 dry_run + 1 sent); iu_tree_change_log 1; iu_route_dead_letter 0.
  • 158 IUs — 12 deprecated, 86 draft, 60 enacted.
  • Three-axis metadata: iu_metadata_tag 330 derived tags, iu_metadata_tag _registry 17 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)

  1. Axis-B inferred lane is empty — only derived tags exist (330). The topic/subject/legal_domain inferred/proposed lanes are registered capabilities with zero rows. Real semantic topic tagging needs an NLP/embedding pass — no semantic content was fabricated.
  2. Text-as-code import is unbuilttext_as_code.py defines 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.
  3. 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.
  4. Broader durable internal delivery — proven safe at scale (sandbox/080 D7) but only 1 durable sent delivery exists; a durable enabled+dry_run=false route is still unproven.
  5. PgStructureStore live psycopg run — still proven only over a fake connection.
  6. 60 enacted (null)-doc IUs — frozen by trg_iu_enacted_immut; no encoded hierarchy, no axis-A sort_order.

IU_CORE_SEMANTIC_INFERENCE_AND_TEXTCODE_ROUNDTRIP

  1. Axis-B inference pass — populate the inferred topic/subject lane from a deterministic, reviewable classifier (keyword/registry rules first, an embedding pass later), strictly enrichment_source='inferred' with a confidence < 1; keep derived authoritative. Closes gap #1.
  2. Text-as-code durable export — run the proven text_as_code export to a real on-disk iu-tree/ layout (read-only from PG), commit it, and prove a diff round-trip. Closes part of gap #2.
  3. Text-as-code importer — build the importer behind a fail-closed gate + validate_import; prove BEGIN…ROLLBACK. Closes gap #2.

Alternatives

  • Auto-cut first integrated production run — drive a real orchestrator CutResult through AutocutBridge → PgStructureStore → fn_iu_structure_op_* durably, then fn_iu_metadata_refresh the 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=false durably (gap #4).
  • Vector bridge — feed the axis-B inferred tags / 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.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-120x-three-axis-metadata-delivery-autocut-textcode-open-goal/08-next-macro-package.md