KB-6080 rev 2

P3D — Birth System B3 rev2 Report

3 min read Revision 2
p3dbirth-systemb3rev2onboarding-gatereport

P3D — Birth System B3 rev2 Trigger + Onboarding Gate Report

Date: 2026-05-12 Rev: 2


Status

status=PASS
mode=DESIGN_AND_PROMPT_DRAFT_ONLY
b3_design_rev=2
b3_prompt_rev=2
onboarding_gate_designed=true
species_queue_designed=true
4_stage_enforcement_designed=true
b3_execution_allowed=false
agent_dispatch_allowed=false
phase5c2_migration_allowed=false

Top 8 rev2 additions

  1. Collection Onboarding Gate — PG trigger on collection_registry AFTER INSERT/UPDATE. Detects new/changed collections missing coverage. Auto-creates system_health_checks + system_issues.

  2. 4-stage PG-native enforcement — Stage 1 (audit) + Stage 2 (issue creation) = B3 immediate. Stage 3 (soft gate warning) + Stage 4 (hard gate block) = future activation after B3 stable.

  3. Species Mapping Queue — BIRTH_REQUIRED without species mapping → system_issues with category='SPECIES_MAPPING_REQUIRED'. Not skipped, not trigger-installed, queued for resolution.

  4. 3-set policy matching — trigger_target = approved ∩ live_birth_required ∩ live_species_mapped. Mismatch → STOP, return to GPT. No self-expansion.

  5. Anti-hardcode at scale table — Old: "list 43 in prompt" / "manually check new". New: "live-derive from governance_role" / "onboarding gate auto-detects" / "species queue auto-creates issues".

  6. fn_collection_onboarding_gate function — Checks 3 conditions (table exists, species mapped, trigger exists). Uses system_health_checks for audit + system_issues for action items.

  7. Rollback includes gate cleanup — DROP gate trigger + function + DELETE created issues/health checks by timestamp.

  8. Report fields expanded — Added onboarding_gate_installed, species_queue_issues_created, policy_mismatch_detected, new_collections_without_coverage_count.

PG-native scale guarantee

collection_registry grows → gate trigger fires → gap detected → issue created → human resolves
No prompt editing. No manual tracking. No external tools. PG does the work.
agent_dispatch_allowed=false
next_action=GPT_REVIEW_B3_REV2

B3 rev2 Report | 2026-05-12