KB-21A2

P3D — B3-F1a Revision Directive Report

2 min read Revision 1
p3dbirth-systemb3f1arevisiondirectivereport

P3D — B3-F1a Compiled SQL Revision Directive Report

Date: 2026-05-13


b3f1a_revision_design_status=PASS
compiled_sql_current_status=BLOCKED_REVISION_REQUIRED
b3f1b_execution_allowed=false
create_function_allowed=false
create_trigger_allowed=false
pg_mutation_allowed=false
next_recommended_action=GPT_REVIEW_REVISED_PROMPT_THEN_AGENT_RECOMPILE

8 fixes in revised prompt

# Issue Fix
1 CREATE OR REPLACE CREATE FUNCTION only. Conflict → BLOCKED.
2 Helper generic name Renamed fn_b3f1_log_collection_onboarding_gap. Conflict-checked.
3 Severity all WARNING Gap-specific: 6 CRITICAL + 5 WARNING. Helper accepts severity param.
4 Scope governed-like Corrected: BIRTH_REQUIRED ∩ IN_SCOPE only for table/species/trigger checks.
5 Missing policy checks All 11 checks included (6 from B3-F0 coverage + 5 infrastructure).
6 birth_registry skipped early Recursive risk check FIRST, then skip other checks. Not blind skip.
7 Trigger detection MAX() Separate booleans: has_contract, has_sibling, has_out_of_scope, has_accepted. Validated by tgfoid + tgtype bits.
8 Full-scan same errors Recompiled with same 11 checks + corrected scope + birth_registry risk.

Sequence

Opus revised prompt (this) → GPT review → Agent recompiles 4 artifacts → GPT reviews SQL → B3-F1b execution

B3-F1a Revision Report | 2026-05-13

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reports/p3d-birth-system-b3f1a-compiled-sql-revision-directive-report.md