Migration Map — old laws → modular rewrite track (DRAFT)
Migration Map — Old System → Modular Architecture
Status: DRAFT — planning document only. No enactment, no mutation of knowledge/dev/laws/.
Date: 2026-06-12. SSOT rule: where a filename exists in both folders, laws-new/ is SSOT for this rewrite track; laws/ remains the enacted baseline.
1. File mapping (old → new)
1.1 Same-filename rewrites (drafted now or planned in this track)
Old (enacted baseline, knowledge/dev/laws/) |
New (knowledge/dev/laws-new/) |
Status |
|---|---|---|
constitution.md (HP v4.6.3) |
constitution.md (HP v4.7 DRAFT) |
DRAFTED in this pass |
dieu32-approval-law.md (v1.1) |
dieu32-approval-law.md (v1.2: +scope/jurisdiction routing column, +module-owner approver class; quorum thresholds unchanged) |
PLANNED — Phase 3, Class E amendment |
dieu20-thiet-ke-truoc-trien-khai.md (v1.2) |
dieu20-thiet-ke-truoc-trien-khai.md (v1.3: tier assignment takes blast-radius class as input; Context Graph Gate scoped to module maps for Class A/B; §6.9 parallel-agent ban relaxed to per-module boundaries) |
PLANNED — Phase 3 |
dieu35-dot-governance-law.md (v5.2) |
dieu35-dot-governance-law.md (v5.3: dot_tools gains module/jurisdiction column; registration remains global catalog but change-gating routes per class; coverage matrix per module) |
PLANNED — Phase 4 |
dieu36-collection-protocol-law.md (v4.0 enacted / v5.0 draft) |
dieu36-collection-protocol-law.md (HC-REG envelope tier: module-private tables legal via envelope row + module registry pointer; generalize Đ33-E4 gateway pattern) |
PLANNED — Phase 4 |
dieu41-luat-van-hanh-ma-vps-v1.1.md |
dieu41-luat-van-hanh-ma-vps-v1.1.md (v1.2: module sandbox = first-class zone; S-class ceiling per lane; promotion packet hook at Level 4) |
PLANNED — Phase 2+ (filename kept; version bump inside) |
1.2 Newly introduced files (no old counterpart)
| New file | Role | Status |
|---|---|---|
architecture-survey.md |
Survey/bottleneck/risk record for this track | DRAFTED |
modular-architecture-proposal.md |
5 layers, boundary rules, classes A–E, federated registry, migration strategy | DRAFTED |
module-contract-standard.md |
MODULE_CONTRACT/MANIFEST/TEST_RESULT/PROMOTION_PACKET/ROLLBACK v1 + forbidden patterns | DRAFTED |
migration-map.md |
This document | DRAFTED |
blast-radius-classifier-spec.md |
Mechanical class computation, fail-closed rules, probe suite | PLANNED — Phase 1 |
integration-bus-conventions.md |
Adapter/boundary-validation/version-negotiation conventions over existing channels | PLANNED — Phase 4/5 |
1.3 Old laws preserved by reference (NOT rewritten; no laws-new copy needed)
Đ0/Đ0-B/Đ0-G/Đ0-H (entity/composition/birth/sync), Đ1 foundation principles file, Đ2–Đ19 + Đ22 (registry/metadata/lifecycle/operations), Đ24 (label), Đ26 (pivot), Đ28 (display), Đ29 (classification), Đ30 (regression), Đ31 (system integrity), Đ33 (PostgreSQL), Đ37 (governance organization), Đ38 (+Appendix 01), Đ39 (KG), Đ43 (system map). These continue to apply; the modular doctrine consumes them via scope routing rather than amending their content. Đ34 (workflow) stays draft, untouched. Đ44 family stays in its own controlled-draft track (this track depends on it; it does not absorb it).
2. Provision-level disposition
2.1 Preserved unchanged (the kernel — HP v4.7 Part I.3)
- 15 NT verbatim (NT1–NT15); 4-DB + 3-layer architecture; gateway exclusivity.
- Đ32 quorum thresholds, no-self-approve, reject-not-overridable, DOT-100% APR creation.
- Đ20 Tier-3 Owner approval; "runtime differs → STOP"; design-before-execution chain.
- Tier-0 production SQL guard (
db=directus AND os_proposal_approvals>=1); per-action Owner grants (REAL_RUN/permit/activation/repoint/cutover); Đ41 deploy corridor + known-good rollback. - Rollback-proven-in-staging doctrine; Rule of Evidence; No Blind PASS; fail-closed validator + bad-input probe requirements; watchdog liveness; audit immutability (FK RESTRICT,
governance_audit_log). - Đ37 enacted-immutable, Council amendment path, law-must-have-DOT, one-primary-law-per-domain — for governance/kernel surfaces (Class D/E).
- Đ30 Tier-A no-waiver rule; Đ31 HEALTH GATE and watchdog.
2.2 Amended (strength preserved, scope added)
| Provision | Amendment | Vehicle |
|---|---|---|
| NT2/NT3/NT6/NT12/NT13 system-wide wording | "within declared contract scope of the owning module; kernel surfaces stay system-scoped" | HP v4.7 Part I.1 |
| Đ32 approval routing | +scope dimension (module/domain); +module-owner approver class for Class A/B/C; thresholds untouched | dieu32 v1.2 (Phase 3, Class E) |
| Đ20 Context Graph Gate + tiers | class-aware tiering; module-map reading for Class A/B; whole-system maps for C+ | dieu20 v1.3 |
| Đ20 §6.9 single-design/parallel-agent ban | relaxed to: parallel agents legal across different module boundaries; ban retained within one module's unsettled design | dieu20 v1.3 |
| Đ30/Đ31 global CI/audit verdicts | verdict partition per module for Class A/B merges (module suite + contract tests gate the merge); whole-suite still gates Class C+ and all deploys; Tier-A pages always global | future dieu30/dieu31 amendments (Phase 5; needs CI capability first) |
Đ35 dot_tools gating |
registration stays global (catalog); change-gating routes by class; +module/jurisdiction column; coverage per module | dieu35 v5.3 |
| Đ36 HC-REG | +envelope registration tier for module-private tables; gateway-per-store generalization | dieu36 rewrite |
| Đ26/Đ43 global counting/projection | modules publish standard aggregates + section rows; scanners read envelopes; delegated detail watchdogged | within dieu35/dieu43 living docs + proposal §4 (no Đ43 law-text change expected — its dispatcher already supports this) |
2.3 Deprecated / moved (nothing deleted)
- No old provision is deleted or weakened. The full macro lane is not deprecated — it is re-scoped as the Class D/E lane (reserved, permanent).
- "Every internal object globally registered by default" (implicit practice, e.g. TKT-OBJ-### addenda for every artifact) → moved: default becomes module-slice registration; global registration only for cross-module/authority/production/kernel-bearing objects (HP v4.7 Điều M-5.3).
- Whole-system review as the default review unit → moved to contract-boundary review for Class A/B (HP v4.7 Điều M-3).
- The older local law mirrors (
Manual Deploy/.claude/laws,.gemini/laws— Agent-Data/GCP constitution family) remain historical reference only; nothing in this track revives them.
3. Prerequisite decisions (block enactment; owners needed)
| # | Decision | Currently | Blocks |
|---|---|---|---|
| P1 | P44-2-δ / P44-4: intra-family (module-internal) edges exempt from universal_edges? |
OPEN in Đ44 design | Điều M-5.4, module registry slices |
| P2 | OP-B: owner agency seats for modules (Đ37 6th-agency proposal) | OPEN | Module owner authority (Class A/B approver) |
| P3 | Đ44 promotion path (controlled DRAFT → ENACTED v1.0: OQC borderline, Đ38 version reference, Family Registry/SCMR pilot seed) | Waiting on Owner per constitution catalog | Federated registry phases (4–5) |
| P4 | QT taxonomy extension: envelope-level birth as a recognized birth process (12c "third case" formalization) | Acknowledged in 12c, not enacted | Module-slice birth legality |
| P5 | Đ32 scope-amendment scoping note (which approver classes exist) | Not started | Phase 3 |
4. Recommended enactment sequence
Each step is its own gated change; rollback at every step = stop using the new lane (old lane never disabled). Per HP v4.7 Điều M-6.4 / risk R9: no lane opens before its fail-closed checker runs in block mode.
- E0 (now): keep this track as DRAFT; Owner reads survey + proposal; decides prerequisites P1–P5 (Class D decisions, Council where law text moves).
- E1: enact
module-contract-standard.mdv1 (new law, Council review; no behavior change yet — vocabulary + schemas only). - E2: build + register the blast-radius classifier and contract checker as paired DOTs (Đ35 process; Class C/D build). Probe suites green, block mode verified in sandbox.
- E3: pilot module under parallel run (Class A/B lanes shadow the old process on one module, 2–4 weeks; Đ38-R9-style comparison report: cost, latency, incidents).
- E4: enact HP v4.7 (constitution amendment — Council 2 rounds + APR high + Owner; Vietnamese enactment text produced from this draft).
- E5: enact
dieu32v1.2 scope routing (Class E lane). - E6: enact
dieu20v1.3 anddieu36envelope tier; amenddieu35v5.3 (may batch with E5 in one Council cycle if Owner prefers). - E7: federate registries (Phase 4 build: envelope columns, slices, drift checkers, scanner integration) — gated on P3 (Đ44 enacted).
- E8: onboard modules by value (each onboarding Class C-shaped); Đ30/Đ31 verdict partition lands here once CI capability exists.
Explicit non-goals of this sequence: no production DDL, deploy, DOT mutation, or approval mutation occurs in E0–E1 at all; E2+ build steps follow the existing Class-equivalent lanes of the current (v4.6.3) law until v4.7 is enacted at E4.