KB-2D9C

IU Core Event Worker — 07 Auto-cut integration package

3 min read Revision 1
dieu44iu-core-mvpevent-workerauto-cutorchestratordesign-packagev0.62026-05-21

IU Core Event Worker — 07 Auto-cut integration package

Design package (not built this macro). Specifies how cutter/orchestrator output feeds IU Core links / tree / lineage / events.

What the cutter produces

The v0.6 orchestrator (O1–O10, cutter_agent/orchestrator/) drives a one- command cut: source_pin → … → cut_leg_a → leg_b_record → write_verify → lifecycle_enact. Its durable output is Information Units + unit_versions + enacted lifecycle — created through the birth gate and the gateway write guard.

What is already integrated (no work needed)

  • Version eventsunit_version carries trg_iu_out_versionfn_iu_outbound_on_versionevent_outbox (version_seq>1). Every cut that writes a unit_version already emits a version_applied event. The route worker built this macro is the consumer — once its gate is opened it records an iu_route_attempt per cut version. The auto-cut → event path is therefore closed end-to-end (in dry-run) the moment the worker runs.

What is NOT yet integrated

Cutter act IU Core artifact needed Hook
create a new IU iu_structure_operation add_new_piece + iu_relation contains + iu_tree_path row post-lifecycle_enact
split a large piece split_large_piece op + split_from relations + tree paths post-lifecycle_enact
merge pieces merge_small_pieces op + merged_from relations post-lifecycle_enact
represent an IU as a SQL/Directus object iu_sql_link row post-write_verify

Hook point

A post-cut bridge phase in the orchestrator, after lifecycle_enact, that maps the cut result to structure-ops (doc 06) calls. It must be:

  • read-only to the cut itself — it records lineage/links after the cut committed; it never re-runs CUT.
  • gated — behind the IU Core master gate; structure-op apply needs sovereign approval.
  • idempotent — keyed by structure_operation_key / iu_sql_link_key, so re-running the bridge over the same cut writes nothing new.

Proposed seam: cutter_agent/iu_core/autocut_bridge.py — a pure mapper cut_result → list[StructureOpRequest] + list[SqlLinkRequest], plus an orchestrator phase iu_core_record that drives the structure-ops workflow. The mapper is pure and unit-testable; the phase is gated and DOT-invoked.

Not built this macro — why

The mission forbids production CUT execution and the structure-ops workflow (doc 06) is itself only a design package. Authoring an autocut_bridge skeleton now would be dead, untested-against-a-real-cut code. It is specified here and built in the structure-ops macro, once doc 06's workflow exists.

Build order

  1. Structure-ops workflow (doc 06).
  2. autocut_bridge.py pure mapper + tests.
  3. Orchestrator iu_core_record phase (gated, after lifecycle_enact).
  4. The route worker (this macro) already carries the resulting events.
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-event-worker-structure-ops-autocut-integration-open-goal/07-autocut-integration-package.md