KB-5705

GPT Pre-execution Law Conflict Review — IU-0 Pack 1

6 min read Revision 1
gpt-reviewiu-0pack-1law-conflictpre-executionp44-6

GPT Pre-execution Law Conflict Review — IU-0 Pack 1

Date: 2026-05-04 Scope: rà soát trước khi động vào code/DDL thật cho IU-0 Pack 1. Reviewed via Agent Data targeted search + related docs: Law-04 Birth Process, Law-07 Assembly First, Law-08 Dependency, Law-10/13 Operations & Live Catalog, Law-14 No Duplicate, Đ43 System Context Law, IU-0 09a rev3, IU-0 09b rev1, GPT review 09a rev3, handoff S192.

Verdict

CONDITIONAL PASS — được chuẩn bị dispatch Claude Code Pack 1, nhưng phải có Opus independent second legal review trước execution.

Không thấy xung đột blocking trong thiết kế 09a/09b với các luật liên quan đã rà soát. Tuy nhiên, trước khi execute DDL thật, cần Opus rà soát lần cuối theo checklist bên dưới và ghi report ngắn. Nếu Opus phát hiện xung đột hoặc runtime mismatch thì dừng, không dispatch.

Law-by-law review

Law-04 — Luật Sinh sản / Birth Process

Requirement: thực thể mới phải tạo qua quy trình chuẩn, có ID tự động, registry/metadata, thông báo hệ thống liên quan.

Assessment:

  • Pack 1 dùng id UUID DEFAULT gen_random_uuid() cho identity tự động.
  • Birth gate L1/L2 kiểm UMC/profile required trước khi commit.
  • 3 vocab pilot được đăng ký qua dot_config trước khi unit dùng.
  • Chưa tạo entity data production thật; chỉ tạo schema nền + smoke test rồi cleanup.
  • No blocker.

Watchpoint:

  • Nếu Pack 1 tạo sample/test information_unit, test rows phải cleanup và không được xem là entity production.
  • Nếu sau này tạo unit thật, cần registry/dependency/metadata đầy đủ hơn ở Pack 2/3.

Law-07 — Assembly First

Requirement: ưu tiên PostgreSQL/view/trigger/constraint/function trước code mới.

Assessment:

  • Pack 1 là PG-first: table, FK, trigger, constraint; không app code, không worker, không external service.
  • Không kéo OpenAI/Qdrant vào hot path.
  • No blocker.

Law-08 — Dependency

Requirement: mọi liên kết/phụ thuộc phải được ghi nhận, deprecate cần biết dependency graph.

Assessment:

  • Pack 1 tạo parent_or_container_ref, content_anchor_ref, version_anchor_ref tối thiểu.
  • Đây chưa phải full entity_dependencies; nhưng Pack 1 chỉ là minimal schema pilot.
  • No blocker nếu không deprecate/retire production entity và không claim dependency graph complete.

Watchpoint:

  • Pack 2/Pack 3 phải đưa edge/dependency tracking vào universal_edges hoặc cơ chế đã chốt.

Law-10/13 — Inject / Full lifecycle / Live Catalog

Requirement: rules đến đúng nơi agent đọc; vòng đời có sinh-sửa-xoá; tạo/xoá được ghi nhận.

Assessment:

  • 09b là execution prompt explicit cho Claude Code, có hard boundaries và report path.
  • Pack 1 có deleted_at, lifecycle_status, updated_at, rollback, smoke tests.
  • No blocker.

Watchpoint:

  • Sau execution, phải upload report; không được chỉ dựa log miệng.

Law-14 — No Duplicate / SSOT

Requirement: không hai thứ cùng bản chất.

Assessment:

  • IU-0 explicitly chọn một schema information_unit, không schema riêng TAC/design/SOP.
  • 3 vocab values là classification, không tạo object family riêng.
  • Không mutate legacy vector, tránh duplicate vector schema trong production_documents.
  • No blocker.

Đ43 — System Context Law

Requirement: map/system context, dispatch có target DB, context-pack/knowledge conventions, no blind operations.

Assessment:

  • 09b explicit DB command: docker exec postgres psql -U directus -d directus.
  • Execution prompt requires preflight/discover and backup before DDL.
  • No blocker.

Watchpoint:

  • Claude Code must verify actual DB/schema before DDL. If dot_config, extension, or database differs, stop and report.

Đ44 / IU-0 own guardrails

Requirement: no DDL/code before P44-6; after C10, Pack 1 only, no Qdrant/outbox/vector.

Assessment:

  • Current state before User approval: still design/prompt only.
  • If User approves C10, Pack 1 execution is the first P44-6 action, limited to vocab + schema + birth gate.
  • No blocker if scope remains Pack 1.

Potential conflicts / non-blocking watchpoints

  1. Birth Process vs minimal pilot: Law-04 wants registry/metadata. Pack 1 only creates schema + pilot vocab. This is acceptable as minimal foundation, but production entity creation must not start until Pack 2/3 registry/dependency is addressed.
  2. Dependency graph incomplete: Pack 1 does not implement full entity_dependencies/universal_edges. Acceptable because Pack 1 is schema foundation; not acceptable if team starts deprecating/migrating real docs.
  3. Vocab in dot_config: acceptable as pilot registration if existing system uses dot_config; Opus must verify actual schema and avoid inventing a second registry.
  4. DDL rollback: 09a/09b include rollback. Claude Code must take backup and report rollback evidence.
  5. No vector/outbox: strict. Any attempt to add Qdrant, outbox, worker, search adapter is out of scope.

Decision

  • Do not dispatch immediately only from GPT review.
  • First instruct Opus to perform independent second review against the same laws and actual 09a/09b documents.
  • If Opus returns PASS with no blocking conflict, dispatch Claude Code using 09b.
  • If Opus finds any conflict, patch design/prompt first; do not execute.

Opus instruction summary

Opus must read only the specified docs, perform law-conflict checklist, produce one short review report, and if PASS, dispatch Claude Code with 09b. No broad searching unless a referenced doc is missing or a conflict is found.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-pre-execution-law-conflict-review-iu0-pack1-2026-05-04.md