KB-E8F3

Handoff S192 — IU-0 Pack 1 Ready for C10 / P44-6

9 min read Revision 1
handoffs192iu-0pack-1p44-6claude-codeopus

Handoff S192 — IU-0 Pack 1 Ready for C10 / P44-6

Date: 2026-05-04 Audience: Opus new session Role split: GPT điều hành Opus; Opus điều hành Claude Code; Claude Code execute trên VPS khi được User approve C10. Current state: Pack 1 execution prompt exists, reviewed, not dispatched.


1. Bối cảnh tổng thể

Chúng ta đang triển khai Đ38/TAC, nhưng bị chặn bởi nhu cầu schema nhất quán cho mọi loại đối tượng thông tin. Vì vậy mở Đ44 để thiết kế schema chung information_unit. Mục tiêu gần nhất là đưa “miếng thông tin” vào sử dụng tối thiểu: có schema, versioning, birth gate, canonical address, profile JSONB tối thiểu, CRUD PG hot path. Vector IU/outbox/search adapter để sau, không làm trong Pack 1.

Trong các phiên vừa rồi đã hoàn thành:

  • Track 0/Track A: legacy vector ổn định. Orphan bug 47 → 0, ghost bug 0, zombie resurrection fixed, trigger persisted, dot-vector-audit report-only PASS, Qdrant backup cron daily.
  • Track B design: IU-0 modular baseline active trên KB, 3 files 07/07b/07c, đã review 3/3 PASS.
  • Pilot Round 1: READ-ONLY simulation + 2 writable slice edits PASS, token savings 77% và 95%.
  • Minimal implementation planning: 09, 09a, 09b.

Nôm na: bản thiết kế nhà đã chốt; đã thử sửa 2 viên gạch thật mà không làm sập tường; giờ chuẩn bị đổ móng tối thiểu Pack 1 nhưng chưa được User bấm nút.


2. Các tài liệu SSOT hiện tại

IU-0 baseline active

  1. knowledge/dev/laws/dieu44-trien-khai/design/07-iu0-index-and-core.md
    • Index + §0–§4: authority, guardrails, UMC, Profile/Capability.
  2. knowledge/dev/laws/dieu44-trien-khai/design/07b-iu0-packaging-crud-vector.md
    • §5–§6: packaging, CRUD hot path, outbox logical design, vector architecture.
  3. knowledge/dev/laws/dieu44-trien-khai/design/07c-iu0-protection-slice-pilot-open.md
    • §7–§13: protection, slice editing, MUP, pilot, OPEN/TD/risk.

Pilot / planning

  1. knowledge/dev/laws/dieu44-trien-khai/design/08-iu0-pilot-planning-pack.md
  2. knowledge/dev/laws/dieu44-trien-khai/design/08a-iu0-pilot-round1-candidate-slices.md rev 6
  3. knowledge/dev/laws/dieu44-trien-khai/design/08b-iu0-pilot-round1-walkthrough-pack.md
  4. knowledge/dev/laws/dieu44-trien-khai/design/08c-iu0-pilot-round1-gate-checklist.md
  5. knowledge/dev/laws/dieu44-trien-khai/design/08d-iu0-pilot-round1-readonly-execution-prompt.md rev 3
  6. knowledge/dev/laws/dieu44-trien-khai/design/08e-iu0-pilot-round1-g-pilot-2-decision-pack.md rev 2

Implementation planning / Pack 1

  1. knowledge/dev/laws/dieu44-trien-khai/design/09-iu0-minimal-implementation-planning-pack.md rev 7
    • Minimal implementation planning; no execution.
  2. knowledge/dev/laws/dieu44-trien-khai/design/09a-iu0-pack1-vocab-schema-ddl-design.md rev 3
    • Pack 1 DDL design, reviewed PASS. This is the SSOT for execution.
  3. knowledge/dev/laws/dieu44-trien-khai/design/09b-iu0-pack1-execution-prompt.md rev 1
    • Claude Code execution prompt. Ready but not dispatched.
  4. knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-09a-pack1-ddl-design-rev3-2026-05-04.md rev 1
    • GPT review of actual 09a rev3: PASS, stop patching 09a.

3. Current technical decision state

Pack 1 scope

Pack 1 = minimal schema foundation only:

  • Register 3 pilot vocab values in dot_config:
    • vocab.unit_kind.design_doc_section
    • vocab.section_type.section
    • vocab.publication_type.design_doc
  • Create 2 tables:
    • information_unit
    • unit_version
  • Add deferred FK from information_unit.version_anchor_ref to unit_version.id.
  • Add updated_at trigger.
  • Add 2-layer birth gate:
    • Layer 1 BEFORE INSERT: identity + vocab + required profile fields available at INSERT time.
    • Layer 2 deferred constraint trigger: re-query final row at COMMIT, check U5/U6 anchors and ownership.
  • Run smoke tests T1–T14.

Pack 1 explicitly does NOT do

  • No Qdrant / vector collection.
  • No outbox table/worker.
  • No search adapter.
  • No production migration.
  • No legacy vector mutation.
  • No P38-XC/07/07b/07c content edits.
  • No extension creation without APR.

Key design fixes already made in 09a rev3

  • Layer 2 deferred trigger must re-query final row, not rely on NEW snapshot.
  • content_anchor_ref must equal version_anchor_ref::text for Pack 1 pilot.
  • Vocab checks cover unit_kind, section_type, and publication_type when present.
  • Empty strings are rejected for required fields.
  • Smoke T14 positive deferred transaction proves INSERT unit with NULL anchors → INSERT version → UPDATE anchors → COMMIT PASS.

4. Current gate status

P44-6 pre-open checklist: C1–C9 effectively PASS after 09a rev3 + GPT review.

Only remaining gate:

  • C10 — User approval to open P44-6 and dispatch Claude Code.

Until C10 approved:

  • Do not dispatch 09b.
  • Do not execute SQL.
  • Do not tell Claude Code to connect/modify VPS.
  • Do not patch 09a unless runtime preflight later finds mismatch.

5. Immediate instruction for new Opus session

When the new Opus session starts:

  1. Read this handoff.
  2. Read 09b-iu0-pack1-execution-prompt.md and 09a-iu0-pack1-vocab-schema-ddl-design.md rev 3 only if needed; do not re-litigate design unless a concrete conflict is found.
  3. Report to GPT/User: “Pack 1 is ready for C10. Awaiting User approval to dispatch Claude Code.”
  4. If User approves C10:
    • Dispatch Claude Code with 09b as the execution prompt.
    • Agent = Claude Code / claude-go.
    • SSH alias = contabo.
    • DB command baseline = docker exec postgres psql -U directus -d directus.
    • Require execution report upload to knowledge/dev/laws/dieu44-trien-khai/reports/iu0-pack1-execution-report.md.
  5. After Claude Code returns, Opus must verify the actual report and ask GPT/User for review. Do not proceed to Pack 2 automatically.

6. How to handle Claude Code execution report

When report arrives, Opus should check:

  • Preflight 0a–0g all PASS.
  • Backups created before DDL.
  • Vocab insert verified 3 rows.
  • information_unit and unit_version exist with expected columns/indexes.
  • Deferred FK is DEFERRABLE INITIALLY DEFERRED.
  • L1 trigger exists.
  • L2 trigger exists and is deferrable + initially deferred.
  • T1–T14 smoke tests all PASS, especially:
    • T1 missing title blocks.
    • T12 fake unit_kind blocks.
    • T14 positive deferred transaction commits successfully.
  • Test data cleaned.
  • No Qdrant/outbox/legacy mutation occurred.
  • Overall PASS or rollback evidence if FAIL.

If any item fails:

  • Do not improvise.
  • Stop and escalate to GPT/User with evidence.
  • If Claude Code already rolled back, verify rollback state.

7. Short directive to Opus for normal operation

Do not make the work lắt nhắt. Operate by objective:

  • Objective now: execute Pack 1 safely once C10 approved.
  • Bundle work into one Claude Code run: preflight + backup + DDL + smoke tests + report.
  • Do not split into tiny prompts unless a real failure occurs.
  • Do not open Pack 2 or vector work until Pack 1 report is reviewed and PASS.

8. Startup prompt for new Opus session

Use this exact startup instruction:

Chúng ta bắt đầu phiên mới. Đọc handoff:
`knowledge/dev/laws/dieu44-trien-khai/reviews/handoff-s192-iu0-pack1-ready-for-c10-2026-05-04.md`

Vai trò:
- GPT điều hành Opus và giữ chốt kỹ thuật cuối.
- Opus điều hành Claude Code và soạn/dispatch prompt khi được duyệt.
- Claude Code execute trên VPS `contabo`.
- User quyết định C10 mở P44-6.

Trạng thái:
- IU-0 baseline 07/07b/07c DONE.
- Pilot Round 1 COMPLETE.
- 09a Pack 1 DDL Design rev3 PASS GPT review.
- 09b Claude Code execution prompt rev1 ready.
- Chưa dispatch. Chờ User approve C10.

Việc cần làm ngay:
1. Xác nhận đã đọc handoff.
2. Không patch thêm 09a/09b nếu không có lỗi cụ thể.
3. Chờ User/GPT approve C10.
4. Nếu approve: dispatch Claude Code bằng 09b, một run gộp, không chia nhỏ.
5. Sau report: verify thực tế, báo GPT/User, dừng trước Pack 2.

9. One-line plain image

Chúng ta đã xong bản vẽ móng và phiếu thi công; chỉ còn chờ chủ nhà ký “cho đổ móng” rồi gọi đội thi công Claude Code vào làm một lượt, có backup và kiểm tra tải ngay tại chỗ.

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/handoff-s192-iu0-pack1-ready-for-c10-2026-05-04.md