KB-3201

GPT Review — D28 Index rev3 + Design v0.2 and Next Directive

6 min read Revision 1
gpt-reviewdieu28nuxtgenerated-mapdesigndirective

GPT Review — D28 Index rev3 + Design Plan v0.2 and Next Directive

Date: 2026-05-08
Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI
Reviewed:

  • knowledge/dev/laws/dieu28-trien-khai/appendices/d28-ui-template-design-implementation-index.md rev3
  • knowledge/dev/laws/dieu28-trien-khai/design/d28-nuxt-ui-template-consolidation-design-plan.md v0.2

Verdict

ACCEPTED.

Opus amended exactly the two requested documents and did not implement. The index and design plan now reflect Agent evidence and GPT correction.

No Nuxt edit, no tableIdMap change, no P3D resume, no publish.

Accepted updates

Index rev3

Accepted changes:

  • table_registry live count corrected to 21.
  • KB synced docs count remains 14.
  • missing KB docs corrected to 7, with full list:
    • tbl_workflow_steps
    • tbl_workflow_timeline
    • tbl_wcr_list
    • tbl_modules_list
    • tbl_tasks_list
    • tbl_registry_checkpoint_types
    • tbl_registry_checkpoint_sets
  • DirectusMatrix updated from planned to exists.
  • DirectusDataTable updated to completed / 0 hits local, with VPS reverify caveat.
  • hardcoded map count = 3 confirmed issues.
  • tableIdMap entries = 18.
  • Nuxt pages = 52 local.
  • server API routes = 45 local.
  • LOCAL_FACT caveat is clearly preserved.

Design plan v0.2

Accepted changes:

  • Option B rejected as primary due collection_equals_entityType=1/21.
  • Option A treated as partial, not sufficient alone.
  • Option C build-time generated map promoted to primary candidate.
  • Option D hybrid retained as fallback candidate.
  • Manual hardcoded map remains forbidden.
  • Machine-generated map from table_registry is explicitly allowed as candidate.
  • Generation script scope includes 3 maps:
    • tableIdMap
    • collectionMap
    • reverseCollectionMap
  • relations.get.ts mirror must consume the same generated source.
  • Phase L0 VPS reverify added before implementation.
  • Phase L1 generated-map implementation separated from P3D resume.
  • Phase L2 resumes P3D only after generated map + route smoke.

Important governance note

Option C is accepted as primary candidate, not final implementation authorization.

Before implementation, two things are still required:

  1. VPS reverify of relevant Nuxt files because Agent grep was LOCAL_FACT.
  2. A concrete design/prompt review for the generated-map mechanism.

Directive to Opus — next action

Do not implement yet.

Opus should now prepare the next design-review prompt/document for the generated-map mechanism, still under Điều 28, and include a required VPS reverify step before any code patch.

Create KB document:

knowledge/dev/laws/dieu28-trien-khai/prompts/d28-generated-table-map-design-review-prompt.md

Purpose: ask Agent/Opus to design the Option C mechanism, not implement it.

The prompt must require:

1. VPS-focused reverify prerequisite

Before designing final implementation details, Agent must reverify these on VPS SSOT read-only:

  • actual path of Nuxt web root;
  • current pages/knowledge/registries/[entityType]/index.vue;
  • current config/detail-sections.ts;
  • current server/api/discovery/relations.get.ts;
  • presence/absence of existing generated files;
  • current build/deploy scripts;
  • current Nuxt import alias conventions;
  • whether server API can import generated shared TS safely.

This is not a full inventory rerun, only focused L0 reverify.

2. Design target

Design Option C:

table_registry → generated map artifact → Nuxt imports generated maps

The design must cover:

  • source of truth: live table_registry;
  • generator command/script location;
  • output file path(s);
  • output format;
  • header/provenance: AUTO-GENERATED, DO NOT EDIT;
  • generation timing: build-time, deploy-hook, or pre-build;
  • how to include draft vs published/active tables;
  • how to treat tbl_event_outbox draft during P3D resume;
  • how to generate tableIdMap, collectionMap, reverseCollectionMap from one source;
  • how relations.get.ts consumes generated source without duplicating maps;
  • how to verify generated output matches table_registry;
  • how to prevent manual edits;
  • rollback plan.

3. DOT/API 100% automation

Design must preserve:

No click UI.
No manual editing generated map.
No human route smoke as final state.

Generator must be runnable by DOT/script and have verify pair:

  • Cấp B: generate/update artifact;
  • Cấp A: verify generated artifact matches live registry and no manual drift.

4. Report/design outputs

Expected design doc:

knowledge/dev/laws/dieu28-trien-khai/design/d28-generated-table-map-design.md

Expected report:

knowledge/dev/laws/dieu28-trien-khai/reports/d28-generated-table-map-design-review-report.md

Upload report even on BLOCKED.

5. Hard boundaries

  • No Nuxt code modification yet.
  • No generated file creation yet.
  • No Directus mutation.
  • No PG mutation.
  • No publish tbl_event_outbox.
  • No P3D resume.
  • No final route option beyond design recommendation.

Sequence after generated-map design report

  1. GPT/User review generated-map design.
  2. If accepted, Opus drafts implementation prompt.
  3. Implementation pack runs:
    • VPS reverify;
    • create generator + verify pair;
    • generate maps;
    • replace hardcoded imports;
    • run automated smoke;
    • update Custom Code Registry / Điều 28 index.
  4. Only after that, P3D resumes and tbl_event_outbox may be published after smoke.

Current P3D state remains unchanged

table_registry_id=21
permission_id=1483
tbl_event_outbox.status=draft
notification_display=paused
implementation_allowed=false
nuxt_edit_allowed=false

Final status

index_rev3=ACCEPTED
design_plan_v0_2=ACCEPTED
option_c=PRIMARY_CANDIDATE_NOT_IMPLEMENTATION_APPROVAL
next_action=OPUS_DRAFT_GENERATED_MAP_DESIGN_REVIEW_PROMPT
implementation_allowed=false
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-d28-index-rev3-design-v02-and-next-directive-2026-05-08.md