12 — Next Prompts (VERIFIED v2)
12 — Next Prompts (VERIFIED v2)
Ordered by risk (read-only first; all PG mutation Đ32/Đ30-gated).
P1 — [READ-ONLY] Counting-contract & reconciliation harness ⭐ recommended
"Build & run a read-only test_counting_contract() design: for every active pivot assert total ≤ count(*) of source_object and grouped sums == total; enumerate every meta_catalog row where record_count ≠ actual_count (7 today) or where stored ≠ pivot_count() (DOT CAT-006 309 / CAT-DOT 307 / PIV-007 309); draft the read-only v_living_lists view (doc 09). Zero mutation."
P2 — [READ-ONLY → 1 reversible commit] Dedupe DOT count
"Design CAT-006 + CAT-DOT → one canonical CAT bound to PIV-007 (live 309); drop stale 307 + broken actual_count 163. BEGIN..ROLLBACK rehearsal; no COMMIT without Đ32."
P3 — [1 reversible commit] Reconcile record≠actual rows
"Bind the 7 record≠actual meta_catalog rows (incl CAT-007 37↔52, source ui_pages) to their pivots and recompute via refresh_meta_catalog_from_pivot(); verify contract. Reversible."
P4 — [OPS] Heal + expose pivot freshness
"Clear the 3 needs_refresh pivot_results rows; schedule refresh_pivot_results(); surface refreshed_at on /knowledge/pivot and /knowledge/registries."
P5 — [DESIGN] Single count writer
"Design making refresh_meta_catalog_from_pivot() the sole writer of meta_catalog numbers; scope trg_auto_sync_registry_counts (on meta_catalog) + refresh_registry_count(s)() to not write competing counts. Additive/reversible Đ32 packet."
P6 — [DESIGN] Build the missing composition_levels reference table
"Create the 6-layer reference table (atom..building, ordered) — it does NOT exist today; clean dirty composition_level values ('meta','1'). Precondition for anti-hardcode UI (R5/R6)."
P7 — [NUXT, Đ28-gated] De-hardcode registries page
"Remove hardcoded phantom rows (CAT-SPE/ORP/PHA/UNM/017 @index.vue:308–322) + in-page gap math (/api/registry/health totalGap); drive rows from meta_catalog + pivots + the new composition_levels table. Render-shell only."
P8 — [DESIGN] Backfill meta_catalog navigability
"Backfill ui_page across 169 rows (18 today); link each list to its pivot + entity profile (Đ38/44)."
P9 — [DESIGN] Birth the UI-Preview 61-item list (Pilot 2)
"Design birthing the 61 UI surfaces into ui_pages/birth_registry under species page; reconcile CAT-007 37↔52; retire the static manifest as SoT."
Recommended next macro
P1 — read-only counting-contract + v_living_lists: makes every drift in this audit self-auditing at zero mutation risk, and unblocks P2–P8 with evidence.