KB-4D44

GPT Review — D28 Nuxt Display Requirements v0.2 and Generated Map Next

8 min read Revision 1
gpt-reviewdieu28nuxtrequirementsgenerated-mapimplementation-promptphase1

GPT Review — D28 Nuxt Display Requirements v0.2 and Generated Map Next

Date: 2026-05-09
Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI
Reviewed: knowledge/dev/laws/dieu28-trien-khai/requirements/d28-nuxt-ui-display-requirements-spec-draft.md v0.2

Verdict

ACCEPTED.

D28 Nuxt/UI Display Requirements v0.2 now has the correct Phase 1 scope.

It is accepted as the Minimum Display Governance checkpoint needed to resume the P3D notification display path without drifting into a full Nuxt redesign.

Accepted Phase 1 decisions

The following are accepted as Phase 1 working assumptions, pending User confirmation of the three immediate questions:

I1. tbl_event_outbox = Family 1 / DirectusTable instance.
I2. Generated map = shared Table Module infrastructure, not notification-specific.
I3. Families 2–8 remain Phase 2+ roadmap and do not block P3D.

GPT position: all three are acceptable and aligned with the User's stated priority of finishing information-unit / text-as-code infrastructure.

What v0.2 fixed

  • It no longer tries to make the current phase a full Nuxt redesign.
  • It clearly states Phase 1 is only minimum display governance.
  • It places tbl_event_outbox under TPL-001 / DirectusTable.
  • It defines generated map as shared Table Module infrastructure.
  • It states P3D can resume after generated map + automated route smoke.
  • It demotes Families 2–8 to Phase 2+ roadmap.
  • It reduces immediate questions from Q1–Q8 to I1–I3.

Important caveat

v0.2 uses a compact placeholder for sections 1–9:

(Nội dung sections 1–9 giữ nguyên như v0.1...)

This is acceptable for now as a draft checkpoint. However, before converting to a final law appendix, the full text should be consolidated, not referenced by placeholder.

Do not block Phase 1 on this consolidation.

Directive to Opus — next action

Opus may now draft the Generated Map Implementation Prompt, because the minimum D28 display governance needed for Phase 1 is in place.

Create prompt:

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

This is still a prompt draft for GPT/User review, not immediate dispatch.

The implementation prompt must implement the accepted design from:

  • knowledge/dev/laws/dieu28-trien-khai/design/d28-generated-table-map-design.md
  • knowledge/dev/laws/dieu28-trien-khai/reports/d28-generated-table-map-design-review-report.md
  • knowledge/dev/laws/dieu28-trien-khai/requirements/d28-nuxt-ui-display-requirements-spec-draft.md v0.2

Required implementation prompt scope

The prompt must direct Agent to implement exactly Phase 1B only:

Generate table maps from table_registry
→ replace three hardcoded map consumers
→ add CI/check verification
→ run route smoke

Required steps

  1. Preflight / VPS reverify

    • Use correct path: /opt/incomex/docker/nuxt-repo/web/.
    • Snapshot the three target files:
      • pages/knowledge/registries/[entityType]/index.vue
      • config/detail-sections.ts
      • server/api/discovery/relations.get.ts
    • Snapshot package.json, CI workflows, .gitignore, Nuxt config.
    • Confirm no generated map file exists or handle if it does.
    • Confirm NUXT_DIRECTUS_SERVICE_TOKEN availability without printing value.
  2. Create generator script

    • web/scripts/generate-table-maps.ts
    • TypeScript via tsx.
    • Supports modes:
      • generate default;
      • --check drift detection;
      • --print-hash optional;
      • --include-draft for smoke/preview;
      • optional force_include[] config as last resort.
    • Reads table_registry via Directus API GET.
    • Uses E4 Phase 1 strategy: convention + explicit overrides.
    • Fail-fast if row cannot derive entityType.
    • Emits no secrets.
  3. Create generated artifact

    • web/generated/table-maps.generated.ts
    • Pure static module, safe for client/SSR/server.
    • Exports:
      • tableIdMap;
      • collectionMap;
      • reverseCollectionMap;
      • __META__.
    • Header must include:
      • AUTO-GENERATED — DO NOT EDIT;
      • row count;
      • status filter;
      • content hash;
      • source table.
  4. Replace three consumers

    • Replace local tableIdMap in registry page import.
    • Replace collectionMap/reverseCollectionMap in config/detail-sections.ts import.
    • Replace COLLECTION_ENTITY_MAP in relations.get.ts with generated reverseCollectionMap or equivalent.
    • Preserve behavior except drift fixes.
  5. package.json / prebuild / scripts

    • Add script names carefully:
      • generate:table-maps;
      • verify:table-maps;
      • prebuild if safe and no conflict.
    • If prebuild already exists, merge safely or STOP.
  6. CI / deploy verification

    • Add --check step to relevant workflows if safe:
      • nuxt-ci.yml;
      • deploy-vps.yml if present.
    • If workflows absent/different, report and adapt conservatively.
  7. Route smoke

    • Smoke existing registry routes.
    • Smoke non-registry pages affected by generated map.
    • Smoke server API relations endpoint if safe.
    • Smoke event_outbox only using safe draft handling:
      • either --include-draft preview route smoke;
      • or keep draft and report next Phase 1C action.
  8. Report and rollback

    • Rollback via git diff/revert instructions.
    • Record all files changed.
    • Report exact smoke results.

Hard boundaries for implementation prompt

The prompt must forbid:

  • Directus mutation;
  • PG mutation;
  • publishing tbl_event_outbox in Phase 1B;
  • changing Directus permission 1483;
  • changing table_registry row 21 except read/smoke context;
  • adding entity_type column;
  • fixing tbl_modules_list.collection;
  • deep Nuxt redesign;
  • touching Families 2–8;
  • creating notification-specific UI;
  • manual hardcoded map edit without generator.

Required report fields for future Agent execution

The prompt should require report fields:

phase_status=PASS|FAIL|BLOCKED|PARTIAL
nuxt_repo_path=/opt/incomex/docker/nuxt-repo/web/
generator_created=true|false
generated_artifact_created=true|false
tableIdMap_import_replaced=true|false
collectionMap_import_replaced=true|false
relations_map_import_replaced=true|false
package_scripts_updated=true|false
ci_check_added=true|false
prebuild_added=true|false
include_draft_smoke_used=true|false
event_outbox_route_smoke=PASS|FAIL|SKIPPED_DRAFT
routes_smoked_count=<number>
route_smoke_failures=<list>
secret_leak_check=PASS|FAIL
check_mode_result=PASS|FAIL
build_or_typecheck_result=PASS|FAIL|NOT_RUN_WITH_REASON
rollback_plan=PASS|FAIL
files_changed=<list>
no_directus_mutation=true
no_pg_mutation=true
no_tbl_event_outbox_publish=true
next_required_pack=P3D4C2U_RESUME_NOTIFICATION_PUBLISH|FIX_GENERATED_MAP|D28_DATA_FIX|BLOCKED

Sequence after implementation prompt draft

  1. Opus drafts prompt.
  2. GPT/User review prompt.
  3. If approved, Agent implements Phase 1B.
  4. GPT/User/Opus review implementation report.
  5. If PASS, resume P3D Phase 1C:
    • route smoke event_outbox;
    • publish tbl_event_outbox if appropriate;
    • complete notification display checkpoint.

Do not dispatch yet

This directive authorizes Opus to draft the implementation prompt only. Do not dispatch Agent implementation until GPT/User approve the prompt.

Current P3D state

table_registry_id=21
permission_id=1483
tbl_event_outbox.status=draft
notification_display=paused
primary_goal=information_unit_text_as_code_infrastructure
implementation_allowed=false_until_prompt_approval
nuxt_edit_allowed=false_until_prompt_approval

Final status

requirements_v0_2=ACCEPTED
minimum_display_governance=SATISFIED_FOR_PHASE1
next_action=OPUS_DRAFT_GENERATED_MAP_IMPLEMENTATION_PROMPT
agent_dispatch_allowed=false
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-d28-nuxt-display-requirements-v02-and-generated-map-next-2026-05-09.md