KB-65A0

dot-iu-cutter v0.2 — P0-5 decision_backlog_dependency Design (2026-05-16)

6 min read Revision 1
dot-iu-cutterdieu44v0.2p0-5-remainderdecision-backlog-dependencydesignno-ddl

dot-iu-cutter v0.2 — P0-5 decision_backlog_dependency Design

document_path: knowledge/dev/laws/dieu44-trien-khai/v0.2-design/dot-iu-cutter-v0.2-p0-5-decision-backlog-dependency-design-2026-05-16.md
revision: r1
date: 2026-05-16
author: Agent (Claude Code CLI, Opus 4.7 1M)
verifier: GPT (PENDING)
phase: v0.2 — P0-5-remainder decision_backlog_dependency DESIGN (LOGICAL ONLY; no DDL)
master: dot-iu-cutter-v0.2-p0-6-p0-5-remainder-batch-design-master-2026-05-16.md
v0.1_predecessor: migration-design/dot-iu-cutter-v0.1-p0-5-decision-backlog-entry-migration-design-2026-05-15.md §4.3
mutation_performed: false
ddl_written: false

§1 — Purpose

decision_backlog_dependency is the entry-to-entry directed-graph edge table for the Decision Backlog Registry: it records blocks / supersedes / refines / related_to relationships between decision_backlog_entry rows. Parent is already LIVE & empty (v0.1); this is an additive empty-table design into cutter_governance.

§2 — Source Design References

  • v0.1 P0-5 migration design §4.3 (fields baseline) — schema-placement OPEN item now resolved to cutter_governance (batch master §6).
  • D5 §4.5 (routing); Đ44 G3 relations group (dependency_kind vocabulary).

§3 — Logical Object / Table Intent

primary_table: cutter_governance.decision_backlog_dependency
becomes: cutter_governance table #11 (post-create, gated; design only now)
target_schema: cutter_governance   # resolved (batch master §6)
target_layer: Lớp KHO (registry graph; co-located with live parent)
authority_pattern: PG = SSOT; KB mirror only

§4 — Proposed Fields (conceptual — NO DDL)

Field Type-class Nullable Notes
dependency_id uuid NO edge identifier
from_decision_id in-schema FK → decision_backlog_entry NO source of edge (LIVE parent)
to_decision_id in-schema FK → decision_backlog_entry NO target of edge (LIVE parent)
dependency_kind enum-ref NO blocks / supersedes / refines / related_to
created_at timestamptz NO when
created_by text actor NO who

§5 — Field Ownership / Vocabulary Dependency

Field Owner v0.2 note
dependency_kind enum cutter-local DBD-2 — per Đ44 G3 relations group; Đ24 confirm path

§6 — Lifecycle

Insert-mostly edge table. Edges may be soft-retired by an explicit related_to replacement or by superseding the entry; no in-place mutation of from/to. Cycle prevention (DBD-1): application-layer in v0.2 (recursive-CTE check at write time); a PG-level trigger guard is FUTURE — explicitly NOT authored here.

§7 — Relationship to Live v0.1 / Phase α / P0-2 Objects

v0.1 decision_backlog_entry (LIVE, empty):
  - both endpoints (from_decision_id, to_decision_id) → decision_backlog_entry
  - two in-schema FKs to the SAME live parent; no column/trigger added to the parent
Phase α / P0-2 / public.* : NONE (no relationship, no FK)
no_existing_live_table_modified: TRUE

§8 — FK Policy (this table)

in_schema_FK:
  - from_decision_id -> decision_backlog_entry
  - to_decision_id   -> decision_backlog_entry
soft_uuid: none
no_cross_schema_FK: TRUE
rationale: both endpoints are the SAME live parent in the SAME schema/family →
  two in-schema FKs are correct. Graph-cycle integrity is a SEMANTIC constraint, kept
  application-layer in v0.2 (DBD-1) — not a PG trigger (no trigger authored).

§9 — Empty-at-Create & Rollback Posture

empty_at_create: TRUE — 0 rows; NO backfill of existing dependency edges (P1/operational)
rollback: DROP TABLE decision_backlog_dependency (empty) → schema to pre-state
data_loss_on_rollback: NONE at create-time

§10 — Đ32 Risk Class (estimate)

STANDARD (estimate). Additive empty edge table; two in-schema FKs to one live parent; no live-table touch; no data mutation. Residual concern (DBD-1): unbounded/cyclic graph is an application-layer correctness concern, not a create-time risk. Full surface: File 6.

§11 — Open Decisions (registration only; Agent does NOT self-close)

  • DBD-1 cycle detection: application-layer v0.2 (lean) vs PG trigger (FUTURE). Owner GPT.
  • DBD-2 dependency_kind enum ownership: cutter-local v0.2 (lean) vs Đ24. Owner Đ24 + GPT.
  • BATCH-1 enum implementation strategy (shared). Owner Đ24 + GPT.

All block DDL freeze; NONE block this design review.

§12 — Dependencies

upstream (SATISFIED — LIVE): decision_backlog_entry (v0.1 LIVE, empty)
downstream: sweep log + KB mirror consume the dependency graph
no_new_parent_table_required: TRUE

§13 — Explicit Confirmation

no_ddl_written: true
no_sql_written: true
no_create_or_alter_table: true
no_column_or_index_or_constraint_ddl: true
no_trigger_or_function_or_rls_policy: true
no_migration_executed: true
no_pg_mutation: true
no_data_writes: true
no_backfill: true
no_existing_file_or_table_modified: true
open_decision_self_closed: false
output_form: logical_design_only

End of P0-5 decision_backlog_dependency design.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/v0.2-design/dot-iu-cutter-v0.2-p0-5-decision-backlog-dependency-design-2026-05-16.md