IU Core Event Worker — 07 Auto-cut integration package
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 events —
unit_versioncarriestrg_iu_out_version→fn_iu_outbound_on_version→event_outbox(version_seq>1). Every cut that writes aunit_versionalready emits aversion_appliedevent. The route worker built this macro is the consumer — once its gate is opened it records aniu_route_attemptper 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
applyneeds 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
- Structure-ops workflow (doc 06).
autocut_bridge.pypure mapper + tests.- Orchestrator
iu_core_recordphase (gated, afterlifecycle_enact). - The route worker (this macro) already carries the resulting events.