KB-4498 rev 2

13 — Next-Macro Prompts (rehearsal → PG view → Directus/API → UI preview → implementation → notification)

7 min read Revision 2
designregistries-pivotnext-macropromptsroadmaprehearsalbegin-rollbackdirectus-apinotification100000xgated2026-05-31

title: 13 — Next-Macro Prompts date: 2026-05-31

13 — Next-Macro Prompts

Sequenced, each gated. Authored per the 100000x open-goal prompt standard (live-check → goal → input → completion → forbidden → autonomy → continue-safe → evidence). Every prompt is design/rehearsal-first; implementation only after ratification (doc 12 RG1). Each prompt carries the standing no-hardcode + pivot-only constraints.

M1 — REGISTRIES_PIVOT_COUNT_INTEGRITY_READONLY_REHEARSAL (after RG1) · = P0

  • Goal: Stand up v_count_integrity over the leaf set as a BEGIN..ROLLBACK read-only rehearsal; prove it reproduces doc-05 numbers (drift_rows, phantom-side, orphan-side, net_gap) and never blind-SUMs rollup rows.
  • Forbidden: COMMIT; any write to meta_catalog/system_issues/event_outbox; Nuxt change; any count not pivot-backed.
  • Evidence: rehearsal SELECT output == doc-05 table; ROLLBACK clean (entry==exit).
  • Gate0: verify ssh contabo → docker psql role + BEGIN..ROLLBACK probe before deep work.

M2 — REGISTRIES_PIVOT_ADDITIVE_SCHEMA_AND_PIVOTS_DRESS_REHEARSAL (after M1 + Đ32 packet) · = P1

  • Goal: BEGIN..ROLLBACK rehearse the additive set: meta_catalog.phantom_count column; v_count_integrity; fn_count_integrity_check(); propose pivot_definitions rows PIV-500/30x/31x; populate sample parent_code edges (doc 04). Validate views/fns compile; ROLLBACK.
  • Forbidden: COMMIT until human Đ32 approval; no production notification emit; no Nuxt; no hardcoded counts.
  • Evidence: compile-clean, rollback-clean, PIVOT_MISSING ledger reduced on paper.

M2.5 — REGISTRIES_PIVOT_DIRECTUS_API_EXPOSURE_PLAN (after M2; design-only) · = P2

  • Goal: Design how pivot/view outputs reach the surface: which Directus collection(s) or /api/registries-pivot/* endpoint serves the doc-03 contract (node / list / child-summary) sourced from pivot_count/pivot_query/v_count_integrity; read-grants/permissions (reuse Đ33 access tiers); the contract shaper does no counting — it only reshapes pivot output.
  • Forbidden: mutation; computing counts in the API; exposing any number that is not a pivot result or PIVOT_MISSING; direct PG from Nuxt (assembly PG→Directus→Nuxt).
  • Evidence: an exposure contract doc mapping every doc-03 field → its pivot/view source; the PIVOT_MISSING cells listed explicitly.

M3 — REGISTRIES_PIVOT_LAW_RECONCILE_PACKET (council)

  • Goal: Author the council packet: ratify phantom operational definition (or formally DEFER); register count_integrity_*/label_missing issue types + event_type_registry rows; decide route convergence string; reconcile CAT-006/CAT-DOT to one canonical CAT.
  • Forbidden: self-approval; enacting a law without council; mutation.
  • Evidence: APR request package (reuse approval_requests/apr_approvals).

M4 — REGISTRIES_PIVOT_UI_PREVIEW_STATIC (after RG6) · = P3

  • Goal: Build a static UI preview of the OS-Agency surface (L1 9-row + drill + child-summary + traffic-lights + columns) under knowledge/dev/ui/registries-pivot/ (spec) and /ui-preview/registries-pivot/<version>/ (static, additive nginx mount). Render from a mock contract matching doc 03; mark every count PIVOT_MISSING if not yet pivoted.
  • Forbidden: production Nuxt change; DB mutation; fabricated counts; hardcoded layer/species/label arrays.
  • Evidence: HTTP 200 preview; Đ28 template registration spec; no hardcoded arrays.

M5 — REGISTRIES_PIVOT_PIN_REGISTRY_BIRTH (after RG5 + approval)

  • Goal: Birth registry_pin (Đ0-G), register in meta_catalog, add PIV-32x, wire pin.created/removed events. BEGIN..ROLLBACK first.
  • Forbidden: implement without approval; frontend pin state.

M6 — REGISTRIES_PIVOT_IMPLEMENT_CONVERGED_SURFACE (after RG1–RG8 all accepted) · = P4

  • Goal: Implement the converged /knowledge/registries-pivot render-shell (reusing /knowledge/pivot pattern + registered Đ28 templates); retire health.get.ts gap-math behind live pivot replacements; run the doc-11 test suite (Truth Check, coverage, no-hardcode, contract).
  • Forbidden: any count not pivot-backed; direct PG from Nuxt; Nuxt business/count logic; retiring an old number before its pivot is live.
  • Evidence: Đ28 Test-4 100% parity; coverage 100%; 0 hardcode_violation; count_integrity surfaced.

M7 — REGISTRIES_PIVOT_NOTIFICATION_CLEANUP_INTEGRATION (after M6 + M3 ratified) · = P5

  • Goal: Wire the doc-09 contract live: fn_count_integrity_check() writes idempotent system_issues (coalesce_key) and emits signal-only event_outbox events; governed cleanup workflows consume per issue_type (Đ45 register-before-emit, MOT-not-executor); register the check as a Đ31 self-verification contract + watchdog cadence.
  • Forbidden: scanner self-executing cleanup; data-in-queue (signal-not-data); emit before event_type registered; any count not pivot-backed.
  • Evidence: issue rows idempotent (occurrence_count bumps, no dup); events signal-only; Đ31 contract registered.

Ordering & gates

RG1 (ratify) → M1 → M2 (+Đ32) → M2.5 → M3 (council) → M4 (UI preview) ∥ M5 (pin, after approval) → M6 (implement, after all RG) → M7 (notification/cleanup integration). DEFER: ghost detection (Qdrant), IU/KG pivots — separate later macros.

Mapping to the P0–P5 roadmap framing (resume-mission checklist)

  • P0 count-integrity + view rehearsal = M1
  • P1 PG view/function BEGIN..ROLLBACK rehearsal = M2
  • P2 Directus/API exposure plan = M2.5
  • P3 UI preview static prototype = M4
  • P4 Nuxt render-shell implementation after approval = M6
  • P5 notification/cleanup integration = M7 (Council law-reconcile M3 and pin-birth M5 are additional gated steps beyond the P0–P5 list.)

Standing guardrails for every macro

No PG/Directus/Qdrant mutation without an explicit passed gate; no Nuxt business logic; every count pivot-backed or PIVOT_MISSING; additive + BEGIN..ROLLBACK + soft-retire; live verification beats old report; design-only unless the survey-then-design-then-implement gate is satisfied.