KB-95DB

IU Core 240x Composer — 07 Next macro package

4 min read Revision 1
dieu44iu-core-mvp240xnext-macrocomposer-event-wiringtext-as-codev0.62026-05-22

07 — Next Macro Package

State at handoff

  • Commit 9e7fbbf on main (parent e857178); KB commit follows. 792 tests.
  • Migrations 001–015 + runtime 010–050/060/090/120/140/160/170/180/190/200/ 230/240/250 on production.
  • IU Core surface: 14 tables / 12 views / 34 functions / 3 triggers / 6 config / 7 event types / 8 routes — DOT 84/84.
  • iu_piece_collection=1, iu_piece_membership=3 (the inert draft pilot).
  • information_unit 158, iu_structure_operation 57, iu_metadata_tag 330 — unchanged. Composer / structure-op / delivery gates all closed.

Open gaps (exact)

  1. Composer is not event-wiredfn_iu_compose / add / remove / reorder emit no events; a composition change is not on the bus.
  2. Text-as-code importer still unbuiltvalidate_collection_manifest checks; IMPORT_IS_DESTRUCTIVE=False. No real composition importer, no durable on-disk export of the manifests.
  3. Axis-B inferred lane still empty — only derived tags; the topic/subject inferred lane is registered with 0 rows.
  4. Auto-cut first integrated durable runmap_cut_to_compose_request maps a CutResult to a ComposeRequest, but no real cut has been driven durably through fn_iu_compose.
  5. Composer lifecycle is minimal — no function transitions a collection between draft/active/deprecated/retired.
  6. fn_iu_compose minting at scale — the from-scratch mint path is proven BEGIN…ROLLBACK only; no durable composed-from-scratch collection exists.

IU_CORE_480X_COMPOSER_EVENT_WIRING_AND_TEXTCODE_ROUNDTRIP

  1. Composer event wiring — register a iu.collection_* event family + routes (dry-run-safe); the composer functions emit one event per op via fn_iu_emit_event, fail-closed. Closes gap #1.
  2. Text-as-code durable export — export CollectionManifests to an on-disk iu-tree/_collections/ layout, commit, prove a diff round-trip. Part of #2.
  3. Text-as-code composition importer — build behind a fail-closed gate + validate_collection_manifest; prove BEGIN…ROLLBACK. Closes #2.
  4. One durable composed-from-scratch collection — drive fn_iu_compose with new_piece specs durably (a small generated file); the birth gate mints governed IUs; fn_iu_metadata_refresh into the three axes. Closes #6.

Alternatives

  • Axis-B inference pass — deterministic registry-backed classifier populating the inferred topic/subject lane (gap #3).
  • Auto-cut → composer integrated production run — drive a real CutResult through map_cut_to_compose_request → fn_iu_compose durably (gap #4).
  • Composer lifecycle + deliveryfn_iu_collection_set_lifecycle, active-gating, a composition-delivery route into the existing seam.

Recommended first: composer event wiring + text-as-code durable export — both build directly on this macro's substrate, stay additive and reversible, and together make a composition observable on the bus and round-trippable.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-240x-piece-native-authoring-composer-textcode-autocut-delivery-open-goal/07-next-macro-package.md