KB-325D

GPT Review — P11A Agent Inventory Prompt

2 min read Revision 1
p11ainventoryschemametadata-governancereview

GPT Review — P11A Agent Inventory Prompt

Date: 2026-05-01

Verdict

Opus direction is correct: narrow P11A to production schema inventory + design requirement checklist + gap classification. This avoids trying to solve metadata, vector, relation, checker, and topic view in one pass.

Assessment

The Agent prompt is mostly OK and read-only. It checks TAC columns, constraints, triggers, related relation/metadata/vector tables, JSONB columns, row counts, indexes, Directus collections, and vector/Qdrant tables.

Required small patches before dispatch

  1. Add Gate 0 identity check before ssh contabo work:

    • hostname
    • db identity directus/directus
    • confirm read-only scope.
  2. Add Directus fields inventory for TAC collections:

    • directus_fields for collection LIKE 'tac_%'. This was requested in the design but missing from the prompt.
  3. Add vocabulary/config tables inventory:

    • tac_section_type_vocab
    • tac_birth_gate_config
    • any tac_%vocab%, tac_%config% tables. These matter for metadata governance and validation.
  4. Add function inventory for TAC checkers/gates:

    • pg_proc names like fn_tac_%. Triggers alone are not enough; function bodies/names show enforcement.
  5. Change constraints query to avoid incomplete FK mapping for composite constraints if possible; acceptable for first pass, but report limitations.

  6. Wrap output into a dated markdown report and upload to KB. Raw terminal output alone is insufficient; include short summary table.

Direction

Apply these patches and dispatch Agent. No mutation, no schema, no code. After Agent output, Opus should produce the P11A gap matrix and Top 3 next proofs, not a long roadmap.

Back to Knowledge Hub knowledge/dev/laws/dieu38-trien-khai/reports/gpt-review-p11a-agent-inventory-prompt-2026-05-01.md