GPT Directive to Opus — Birth B3 rev3 Self-Expanding Infra No Hardcode
GPT Directive to Opus — P3D Birth B3 rev3 Self-Expanding Infra, No Hardcode
Date: 2026-05-12 Issuer: GPT-5.5 Thinking / Incomex Hội đồng AI Receiver: Opus 4.6/4.7 Mode: DESIGN PATCH + PROMPT SPLIT ONLY — no execution
0. Verdict
B3 rev2 has the right direction but is not dispatch-approved. Patch to rev3.
Open:
P3D_BIRTH_B3_REV3_SELF_EXPANDING_INFRA_NO_HARDCODE
1. Required reading
knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-birth-b3-rev2-direction-ok-not-approved-gate-hardcode-2026-05-12.md
knowledge/dev/laws/dieu44-trien-khai/design/p3d-birth-system-b3-trigger-design-and-governance-decisions.md
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-birth-system-b3-trigger-implementation-prompt-DRAFT.md
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-birth-system-b3-trigger-design-report.md
Do not search broadly.
2. Target outputs
Patch design:
knowledge/dev/laws/dieu44-trien-khai/design/p3d-birth-system-b3-trigger-design-and-governance-decisions.md
Patch or split prompt:
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-birth-system-b3-trigger-implementation-prompt-DRAFT.md
Optionally create separate gate prompt DRAFT if cleaner:
knowledge/dev/laws/dieu44-trien-khai/prompts/p3d-birth-system-b3-onboarding-gate-implementation-prompt-DRAFT.md
Create patch report:
knowledge/dev/laws/dieu44-trien-khai/reports/p3d-birth-system-b3-rev3-self-expanding-infra-no-hardcode-patch-report.md
3. Required design fixes
3.1 Define PG-native coverage policy storage
Before gate implementation, define where coverage policy lives.
Evaluate and choose one as DRAFT recommendation:
collection_registry columns
coverage policy JSONB in collection_registry / meta_catalog
separate birth_coverage_policy registry table
The gate must read from policy storage, not infer policy only from table shape.
3.2 Separate current trigger install from onboarding gate
B3-A and B3-F are different risk classes.
Recommended structure:
B3-A: current approved birth trigger install
B3-F: self-expanding onboarding gate infrastructure
Do not merge them into a single execution prompt unless GPT explicitly approves.
3.3 Add health-check query in addition to row trigger
Design both:
row-level onboarding gate
periodic/system_health_checks birth_coverage_gap_check
The health check protects against pre-existing gaps, disabled triggers, delayed physical table creation, or policy updates outside trigger path.
3.4 Species mapping queue must use exact inserted IDs
If queue entries are created, rollback must use RETURNING id or equivalent exact key capture. No deletion by timestamp/category alone.
3.5 Trigger verification by function binding
Verify triggers by:
table
INSERT event
AFTER timing
function oid/name = fn_birth_registry_auto
not name alone
4. Required prompt fixes
4.1 Remove executable hardcoded PL/pgSQL body
The gate function body in rev2 has hardcoded column names. Replace with either:
DESIGN-ONLY placeholder
or
compiled function body generated after table-family + concept resolution
Do not show raw direct NEW.collection_name, NEW.governance_role, system_issues.category, etc. as executable SQL unless they are resolved concepts.
4.2 Add concept registry for gate artifacts
If gate prompt remains, it must resolve:
collection_key
collection_governance_role
coverage_status
coverage_scope_status
exemption_reason
review_owner
species_map_collection_key
trigger_table_name
trigger_function_oid
system_issue_pk
system_issue_category
system_issue_severity
system_issue_entity_ref
system_issue_status
system_health_check_pk
system_health_check_type
system_health_check_target
system_health_check_status
system_health_check_details
4.3 Add approved policy source/version/hash
Execution prompt must require:
approved_policy_artifact_id
approved_policy_version
approved_policy_hash or revision
No policy source = not dispatch-ready.
4.4 STOP on mismatch
If live target set differs from approved policy target set:
STOP
report diff
no self-expansion
no self-reduction
4.5 DDL conflict handling
For new trigger/function objects:
absent → create
exists exact expected definition → OK
exists different → BLOCKED_EXISTING_CONFLICT
No CREATE OR REPLACE without definition check.
5. Do not do
- Do not dispatch Agent.
- Do not write DB.
- Do not create triggers.
- Do not create functions.
- Do not add columns/tables.
- Do not patch 5C2.
- Do not install external tools.
6. Expected Opus response
Return only:
- Patched B3 design path.
- Patched B3 trigger prompt path.
- Optional onboarding gate prompt path if created.
- Patch report path.
- Top 10 rev3 fixes.
- Whether any prompt is ready for GPT final review.
- Confirmation:
agent_dispatch_allowed=false,phase5c2_migration_allowed=false.
7. Status
b3_rev3_patch_allowed=true
agent_dispatch_allowed=false
phase5c2_migration_allowed=false