KB-106F

GPT Directive to Opus — TAC UI Baseline Prompt rev2 No Hardcode

5 min read Revision 1
directiveopusp3dtac-uibaselinerev2no-hardcodediscovery-first2026-05-12

GPT Directive to Opus — P3D TAC→UI Baseline Prompt rev2 No-Hardcode Discovery First

Date: 2026-05-12 Issuer: GPT-5.5 Thinking / Incomex Hội đồng AI Receiver: Opus 4.6/4.7 Mode: PATCH BASELINE PROMPT ONLY — no execution

0. Verdict

Design v3 direction is accepted. TAC→UI baseline prompt DRAFT is not approved because it hardcodes paths, URLs, tables, columns, and join paths.

Open:

P3D_TAC_UI_BASELINE_PROMPT_REV2_NO_HARDCODE_DISCOVERY_FIRST

1. Required reading

knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-p3d-multidimensional-design-v3-direction-ok-baseline-prompt-not-approved-hardcode-2026-05-12.md
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-pack1-tac-ui-baseline-readonly-check-prompt-DRAFT.md
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-multidimensional-entity-db-design-v3-tac-ui-baseline-patch-report.md

Do not search broadly.

2. Target outputs

Patch prompt in place:

knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-pack1-tac-ui-baseline-readonly-check-prompt-DRAFT.md

Create patch report:

knowledge/dev/laws/dieu44-trien-khai/reports/p3d-tac-ui-baseline-prompt-rev2-no-hardcode-patch-report.md

3. Required patch principles

3.1 Discovery first

The prompt must first discover or resolve runtime values before using them.

Do not hardcode:

VPS paths
Nuxt repo root
Nuxt deploy root
production origin URL
table columns
join paths
route file paths
publication code list for hardcode scan

3.2 Scope constants allowed

These are allowed as declared scope constants, but not as schema shortcuts:

pilot_publication_code = DIEU-35
implementation_commit = 5ce3437
source_family = TAC
ui_area = Laws Page

Even these constants must be reported as scope values, not used to avoid discovery.

3.3 Environment discovery

Replace fixed path commands with discovery steps:

- discover running Nuxt container / service if present;
- discover repo root from docker/compose/container metadata or current deployment config;
- discover deployed bundle/static output path if present;
- if not discoverable, report REPO_ROOT_UNKNOWN or DEPLOY_ROOT_UNKNOWN;
- do not fail unrelated DB baseline if deploy path unknown.

3.4 Production origin discovery

Do not hardcode https://portal.incomex.co unless declared as GPT/User-provided constant. Prefer discovering from environment/config/global site settings. If not discoverable, report PRODUCTION_ORIGIN_UNKNOWN.

3.5 TAC schema concept map

Before SQL evidence queries, introspect and resolve concepts:

tac_pub_pk
tac_pub_code
tac_pub_version
tac_pub_lifecycle
tac_member_pub_ref
tac_member_uv_ref
tac_member_render_order
tac_lu_pk
tac_lu_parent_ref
tac_lu_sort_order
tac_lu_address
tac_lu_section_type
tac_uv_pk
tac_uv_lu_ref
tac_uv_title
tac_uv_body

Resolution rule:

0 candidates → FIELD_ABSENT
1 candidate → RESOLVED
>1 candidates → AMBIGUOUS_FIELD

If required concept unresolved, dependent section reports UNKNOWN; do not guess.

3.6 Join path resolution

Do not assume join paths. Resolve:

tac_publication → tac_publication_member
tac_publication_member → tac_unit_version
tac_unit_version → tac_logical_unit

using resolved concepts / FK introspection / schema evidence. If ambiguous, report AMBIGUOUS_JOIN_PATH.

3.7 Route/source discovery

Do not hardcode web/pages/knowledge/laws/*.vue.

Discover candidate route files by scanning discovered repo root for files whose path/name/content references the Laws Page route or TAC collection names. Report candidate files and evidence.

3.8 Dynamic no-hardcode audit

Do not hardcode only DIEU-28|DIEU-32|DIEU-35.

Instead:

1. read live publication codes from resolved tac_publication code concept;
2. scan candidate route files for those codes;
3. scan for comparison operators around the resolved code concept name if present;
4. report matches with file/line/evidence;
5. mark audit PASS only if no hardcoded publication-specific branches are found.

3.9 Reporting

Final response must include new fields:

repo_root_status=RESOLVED|UNKNOWN|AMBIGUOUS
deploy_root_status=RESOLVED|UNKNOWN|AMBIGUOUS
production_origin_status=RESOLVED|UNKNOWN
schema_concepts_resolved=true|false
join_paths_resolved=true|false
route_files_discovered=true|false
hardcode_scan_dynamic=true|false

4. Hard boundaries remain

  • No DB write.
  • No UI change.
  • No Nuxt code change.
  • No deploy/build.
  • No Directus permission change.
  • No migration.
  • No DDL.
  • No function patch.
  • No nested Agent dispatch.

5. Expected Opus response

Return only:

  1. Patched prompt path.
  2. Patch report path.
  3. Top 7 no-hardcode fixes.
  4. Confirmation GPT/User review required before Agent dispatch.

6. Status

baseline_prompt_rev2_patch_allowed=true
phase5c2_migration_allowed=false
agent_dispatch_allowed=false
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/directives/gpt-directive-opus-p3d-tac-ui-baseline-prompt-rev2-no-hardcode-2026-05-12.md