GPT Review S191 — P10D-2B Parallel TAC Laws Screen prompt approved with practical patches
GPT Review S191 — P10D-2B Parallel TAC Laws Screen prompt
Date: 2026-04-30
Phase: TAC MVP / P10D
Verdict: APPROVED AFTER PRACTICAL PATCHES
1. Overall assessment
The prompt now matches the User's corrected model:
- KB remains alive as draft/legacy.
- PG/TAC runs in parallel as official laws source.
- The task copies the working Directus→Nuxt display pattern to the new TAC source.
- It does not delete or retire KB.
- It requires verification of both new TAC screen and old KB screen.
- It requires git commit after PASS.
This is the right direction.
2. Required patches before dispatch
Patch 1 — Make “new page file” an explicit assembly exception
The prompt says “0 component mới” but creates /knowledge/laws/[pubId].vue, which is a new route/page file. That is acceptable only because it is an assembly composition page reusing existing primitives, not a new component or data plane.
Add:
Creating
pages/knowledge/laws/[pubId].vueis allowed as a narrow assembly route file only if it copies the existing Directus reader pattern and contains no new component, no server route, no direct PG, and no custom renderer. Keep it route-local and minimal.
Patch 2 — Inspect source shapes before coding
Before patching, Agent must inspect:
pages/knowledge/[...slug].vuecomposables/useAgentViews.tscomponents/DocsTreeView.vueutils/markdown.ts
Then adapt the TAC mapping to the actual expected types.
Do not assume selected.body or document.body shape without checking. Use whatever shape the existing reader actually expects.
Patch 3 — Path synthesis must be deterministic and order-preserving
The current prompt says “walk ancestors, join titles with /, append .md.” That may work, but must be deterministic and preserve statutory order.
Require:
- build a map of all member rows by LU id;
- compute path from ancestor chain using zero-padded
render_orderorsort_orderplus title/canonical_address; - avoid relying on localized title alone for uniqueness;
- keep ROOT/parent hierarchy intact;
- if ancestor relation shape is only id string, use the fetched member map, not another API call per node.
Patch 4 — Do not require preserving old governance_docs listing inside /knowledge/laws if it conflicts with official TAC goal
The prompt currently both says /knowledge/laws becomes official TAC and also requires governance_docs listing intact on the same page.
User's latest model: KB remains accessible elsewhere, but /knowledge/laws is the TAC official screen.
Patch verification:
- Verify old KB routes still work (
/knowledge,/knowledge/[...slug],/docsif applicable). - Do not require old
governance_docssections to remain visible inside/knowledge/lawsunless implementation keeps them trivially. - If old
/knowledge/lawscontent is moved/bypassed, report that KB content remains reachable through existing KB routes.
This avoids forcing a hybrid page that User no longer wants.
Patch 5 — Relax brittle HTML grep checks
Nuxt SSR/client rendering may make raw curl | grep unreliable depending on hydration.
Keep curl checks, but add stronger checks:
- Directus anonymous API check for TAC data still returns D35/D32/D28;
- run Nuxt build/typecheck if available and reasonably fast;
- check server logs only if page returns non-200;
- if rendered HTML does not include client-side text but HTTP 200 and code/API checks pass, report as “needs browser visual check” instead of automatic FAIL.
Patch 6 — No-hardcode audit should not ban doc_code everywhere
The listing legitimately may display or sort by doc_code. The renderer should not branch on concrete document codes.
Replace audit with:
- FAIL if code contains concrete literals
DIEU-28,DIEU-32,DIEU-35in route/reader logic. - FAIL if there is branching like
if (doc_code === ...)orswitch(doc_code). - Allow generic field name
doc_codefor display/sort/fetch.
Patch 7 — Commit rules
Keep commit requirement, but add:
- run
git diff --statandgit diff -- <changed-files>before commit; - commit only if verification PASS;
- commit message:
P10D: add parallel TAC official laws screen; - upload commit hash in report;
- if pre-existing dirty files exist, keep them out of commit.
3. Direction to Opus
Apply the seven patches above and dispatch Agent.
No further GPT review is required if Opus only patches these items and keeps the scope narrow.
4. Boundary reminder
No direct PG. No server route. No new tree/renderer component. No Directus mutation. No KB deletion. No full migration. No topic/search/admin workflow.