GPT Review — P10A Pilot Cut-and-Render Plan v0.2
GPT Review — P10A Pilot Cut-and-Render Plan v0.2
Date: 2026-04-29
Verdict
GOOD DIRECTION — patch to v0.3 required before final approval.
v0.2 correctly moves P10A to one-document-first, exact source path, schema discovery, segmentation candidate before insert, user-visible deliverables, and batch-marker rollback. However, because P10A is the first production write into TAC core/member tables, remaining assumptions must be removed.
Law / constitutional check
No conceptual conflict if patched.
- Hiến pháp / Zero Trust: v0.2 is better, but still assumes DB execution role and batch-marker availability.
- Điều 38 / LSL-01: aligned. This is the first visible information-unit pilot.
- Điều 33 / PostgreSQL SSOT: aligned if all inserted pilot units go into PG and old KB remains source/reference.
- Gate separation: aligned. P10A is a new gate, not automatically authorized by P9.
- User role correction: aligned. GPT reviews technical/constitutional correctness; User evaluates visible result.
Accepted improvements
- P10A is now one document only.
- Pilot document candidate is exact:
knowledge/dev/laws/dieu35-dot-governance-law.md, v5.2 FINAL. - Schema discovery is required before segmentation.
- Segmentation candidate artifact is required before insert.
- Vocab values must come from production PG.
- User-visible outputs are defined.
- Rollback by broad
LIKE 'D35%'is rejected. - Nuxt, KG/vector, broad migration remain out of scope.
Required v0.3 patches
Patch 1 — Split P10A into two explicit substeps
v0.2 still combines plan + eventual insert path. v0.3 should name:
- P10A-1: Segmentation Candidate Only — read-only, no production insert.
- P10A-2: Pilot Insert + Render — only after GPT approves candidate and User GO.
Current next action should be P10A-1 only.
Patch 2 — Batch marker must be based on actual schema
v0.2 says pilot_batch_id but does not prove any column exists to store it. v0.3 must state:
- Step 1 schema discovery will determine whether a suitable metadata/comment/source field exists.
- If no safe batch marker field exists, STOP and propose one of:
- use publication natural key / source reference if schema supports it;
- use a dedicated publication row as root marker and FK traversal for cleanup;
- do not insert until a governed marker path is approved.
Do not rely on comments or out-of-band notes for rollback.
Patch 3 — Execution role must be verified before selecting psql
v0.2 chooses psql -U directus, but prior gates showed execution-role assumptions caused failures. v0.3 must add a pre-execution role probe before P10A-2:
- verify which DB role owns/can INSERT core/member tables;
- verify triggers fire for that role;
- verify transaction/rollback works;
- if role lacks permission, STOP and report.
For P10A-1, no DB mutation is needed.
Patch 4 — Source document revision must be captured by Agent Data, not handwritten
v0.2 says v5.2 FINAL. v0.3 should require Agent to fetch document metadata/revision from Agent Data and include:
- document ID/path;
- title;
- current revision number;
- content hash SHA256;
- date/time captured.
Patch 5 — Segmentation candidate should include no full-body duplication unless needed
Candidate should avoid bloating logs. Use:
- source heading;
- body hash;
- body excerpt;
- line/section range if available;
- full body only in a separate candidate file if necessary.
Patch 6 — Define PASS for P10A-1 separately from P10A-2
P10A-1 PASS:
- schema discovery complete;
- source snapshot captured;
- segmentation candidate generated;
- assembly/render plan generated;
- no production mutation.
P10A-2 PASS:
- pilot rows inserted;
- reassembled markdown produced from PG;
- diff/tree/count reports produced;
- User can inspect result;
- rollback path proven or available.
Directive to Opus 4.6
Patch P10A v0.2 → v0.3 with the six changes above.
Immediate next work should be P10A-1 Segmentation Candidate Only, read-only. Do not insert into PG yet.
P10A-1 deliverables should include:
- schema discovery report;
- source document snapshot/hash;
- segmentation candidate JSON/table;
- proposed insert mapping, but no insert SQL execution;
- assembly/render query draft based on actual schema;
- rollback strategy based on actual schema.
Return v0.3 for GPT review.
Current state
- P9 foundation: GPT technically complete.
- P10A v0.2: correct direction, needs patch before starting candidate work.
- No production core/member insert authorized yet.