KB-1A17

IU Core 1k+ — 03 Three-axis UI envelope (Directus-ready)

3 min read Revision 1
iu-coredieu44v0.61k-plusui-assemblydirectusnuxtthree-axismigration-0202026-05-23

03 — Three-axis UI envelope · Directus-ready assembly surface

1. Boundary held

PG → Directus → Nuxt assembly path (per pack-23 P3D UI Boundary). No Nuxt custom business logic; no direct PG from Nuxt; no Directus/API bypass; no deploy/restart. Builds the PG read surface + Directus exposure runbook only.

2. Three axes — already there (migration 014)

Axis A (original-text reconstruction): v_iu_source_outline, fn_iu_reconstruct_source(doc_code). Axis B (semantic/content): iu_metadata_tag + iu_metadata_tag_registry + v_iu_content_group. Axis C (hierarchy): iu_tree_path, v_iu_tree, fn_iu_subtree(uuid). Migration 020 JOINS them into one Directus-friendly envelope.

3. v_ui_iu_three_axis_envelope — single read surface

Columns: unit_id, canonical_address, unit_kind, section_type, lifecycle_status; axis_a_doc_code/sort_order/section_code; axis_b_tags (jsonb grouped by tag_kind), axis_b_tags_by_source (by enrichment_source); axis_c_parent_id, axis_c_depth, axis_c_ancestors (uuid[]), axis_c_ancestor_addresses (text[]); created_at, updated_at. Scalars + jsonb only — no body text.

4. Live evidence — 163 rows

v_ui_iu_three_axis_envelope returns 163 rows in production. Sample: D38-DIEU28-ROOT doc_code=DIEU-28 sort_order=0, axis_b_tags={unit_kind:[kind:law_unit], section_type:[sectype:heading], legal_document:[doc:DIEU-28]}. Registry-backed: every tag_key joins iu_metadata_tag_registry, tag_kind from registry — no hardcoded taxonomy.

5. Directus exposure runbook (deploy-gated, NOT executed)

  1. Settings → Data Model → new collection backed by view v_ui_iu_three_axis_envelope (is_table=false). 2. Role permissions READ ONLY. 3. Expose fields exactly as declared in §3. 4. Nuxt reads via existing Directus SDK pattern; no new server route, no direct PG. Filters Nuxt can offer: by axis A doc_code=? ORDER BY axis_a_sort_order ASC; by axis B axis_b_tags @> '{"legal_document":["doc:DIEU-28"]}'::jsonb; by axis C axis_c_depth=0 or '<UUID>' = ANY(axis_c_ancestors).

6. DOT visibility

Registered in runtime/110 (('view','v_ui_iu_three_axis_envelope')) and counted in D9 expected total (view 17→18). DOT scan on production post-020: 123/123, D8 drift 0.

7. What is NOT in this macro

Directus collection registration (deploy-gated). Nuxt screen wiring (assembly-only). Write surface (envelope is read-only by construction).

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.6-iu-core-1k-plus-vector-ui-assembly-acceptance-open-goal/03-three-axis-ui-assembly.md