PIDX Seed Slice v0.1 — 9 prototype procedures (candidate, text only)
Path: knowledge/dev/laws-new/workflow-manage/design/pidx-seed-slice-v0.1.md
Status: CANDIDATE SEED · TEXT ONLY · NOT INSERTED · 0 PG writes. A small build-prototype slice (NOT the full 39). Designed to exercise the status machine, not to populate a complete library.
Date: 2026-06-23 · grounded by read-only SELECTs on directus (real dot_tools.code = DOT-001..; live approvals 4 implemented / 10 unimplemented; assign_governance_owner = unimplemented).
Companions: pidx-readiness-logic-v0.1.md (status rules), pidx-test-plan-v0.1.md (asserts the outcomes below), pidx-ddl-candidate-v0.1.sql.md (tables).
0. Slice rationale (Task 7)
Do not seed all 39 at first build. Seed 9 procedures in three slices chosen so the prototype exercises every interesting state: EXISTS, MISSING, UNKNOWN_SOURCE, INVALID_REF, READ_BLOCKED, READY, READY_WITH_WARNINGS, NOT_READY, UNMAPPED, READINESS_DRIFT.
Conventions: assembly_layer = 'UNMAPPED' for all seeds (the survey proved procedures carry no layer metadata; do not fabricate). declared_maturity is a HINT; PG recomputes readiness. safety_class default: verify/read = read_only; create/register = owner_gated; design/triage = ai_delegatable.
1. The 9 seed procedures
Slice A — DOT (domain_group = dot-manage)
| procedure_code |
title |
declared_maturity |
automation_mode |
safety_class |
short_note |
PROC_CHECK_DOT_EXISTS |
Check if a DOT exists |
machine_readable |
one_button |
read_only |
One-button existence probe of a DOT by code. |
PROC_CREATE_NEW_DOT |
Create a new DOT (full lifecycle, no orphan) |
dot_sequence_ready |
agent_assisted |
owner_gated |
Reuse-first, then governed create + birth, no orphan. |
PROC_UPDATE_DOT_HANDBOOK |
Add/update a DOT spec & handbook |
text_ready |
manual |
ai_delegatable |
Update a DOT's spec/handbook evidence. (= 39-list PROC_UPDATE_DOT_SPEC) |
Slice B — Collection / field (domain_group = collections-manage)
| procedure_code |
title |
declared_maturity |
automation_mode |
safety_class |
short_note |
PROC_VERIFY_COLLECTION_EXISTS |
Verify a collection/table exists |
one_button_ready |
one_button |
read_only |
One-button existence probe of a collection/table. |
PROC_VERIFY_FIELD_EXISTS |
Verify a field/column exists |
one_button_ready |
one_button |
read_only |
One-button existence probe of a column. |
PROC_CLASSIFY_COLLECTION |
Classify a collection (governance_role) |
machine_readable |
agent_assisted |
ai_delegatable |
Assign/verify a collection's governance classification. |
Slice C — Meta / index (domain_group = triage / procedure-index)
| procedure_code |
title |
declared_maturity |
automation_mode |
safety_class |
domain_group |
short_note |
PROC_TRIAGE_UNKNOWN_SOURCE |
Handle an UNKNOWN_SOURCE ingredient |
known |
manual |
ai_delegatable |
triage |
Decide where an unknown-source kind should be probed. |
PROC_RESOLVE_INVALID_REF |
Resolve an INVALID_REF (normalize per grammar) |
known |
agent_assisted |
ai_delegatable |
triage |
Normalize a malformed ref per grammar v0.1. |
PROC_BUILD_READINESS_REPORT |
Build a readiness report for a procedure |
machine_readable |
one_button |
read_only |
procedure-index |
Render a procedure's readiness from the views. |
2. Declared ingredients (1–4 each) and the state each exercises
| procedure_code |
ingredient_ref |
kind |
required_level |
usage_role |
ref_status |
expected per-ingredient status |
missing_route |
PROC_CHECK_DOT_EXISTS |
dot:DOT-001 |
dot |
required |
calls |
NORMALIZED |
EXISTS |
— |
PROC_CHECK_DOT_EXISTS |
collection:public.dot_tools |
collection |
required |
reads |
NORMALIZED |
EXISTS |
— |
PROC_CREATE_NEW_DOT |
procedure:PROC_REUSE_FIRST_SEARCH |
procedure |
required |
calls |
NORMALIZED |
MISSING (not seeded in slice) |
PROC_DESIGN_NEW_PROCEDURE |
PROC_CREATE_NEW_DOT |
collection:public.dot_tools |
collection |
required |
writes |
NORMALIZED |
EXISTS |
— |
PROC_CREATE_NEW_DOT |
approval:patch_ops_code |
approval |
required |
requires |
NORMALIZED |
EXISTS (handler implemented → no warning) |
— |
PROC_CREATE_NEW_DOT |
template:dot_spec_template |
template |
nice_to_have |
requires |
NORMALIZED |
UNKNOWN_SOURCE |
PROC_TRIAGE_UNKNOWN_SOURCE |
PROC_UPDATE_DOT_HANDBOOK |
report:dot-usage-handbook |
report |
required |
writes |
NORMALIZED |
UNKNOWN_SOURCE |
PROC_CANONICALIZE_EVIDENCE_KB |
PROC_UPDATE_DOT_HANDBOOK |
collection:public.dot_tools |
collection |
required |
reads |
NORMALIZED |
EXISTS |
— |
PROC_VERIFY_COLLECTION_EXISTS |
collection:public.directus_collections |
collection |
required |
reads |
NORMALIZED |
EXISTS |
— |
PROC_VERIFY_FIELD_EXISTS |
field:public.dot_tools.code |
field |
required |
reads |
NORMALIZED |
EXISTS |
— |
PROC_VERIFY_FIELD_EXISTS |
field:public.dot_tools.does_not_exist |
field |
nice_to_have |
reads |
NORMALIZED |
MISSING |
— |
PROC_CLASSIFY_COLLECTION |
collection:public.collection_registry |
collection |
required |
reads |
NORMALIZED |
EXISTS |
— |
PROC_CLASSIFY_COLLECTION |
approval:assign_governance_owner |
approval |
required |
requires |
NORMALIZED |
EXISTS + APPROVAL_HANDLER_UNIMPLEMENTED |
— |
PROC_TRIAGE_UNKNOWN_SOURCE |
(zero ingredients — intentional) |
— |
— |
— |
— |
— |
— |
PROC_RESOLVE_INVALID_REF |
field:public.dot_tools |
field |
required |
reads |
UNNORMALIZED |
INVALID_REF (no column part) |
PROC_TRIAGE_UNKNOWN_SOURCE |
PROC_RESOLVE_INVALID_REF |
dot:DOT_PIDX_FAKE_0000 |
dot |
nice_to_have |
calls |
NORMALIZED |
MISSING |
— |
PROC_RESOLVE_INVALID_REF |
collection:cutter_governance.policy_state |
collection |
nice_to_have |
reads |
NORMALIZED |
READ_BLOCKED (restricted schema) |
— |
PROC_RESOLVE_INVALID_REF |
report:ref-grammar-v0.1 |
report |
nice_to_have |
reads |
NORMALIZED |
UNKNOWN_SOURCE |
— |
PROC_BUILD_READINESS_REPORT |
view:public.v_pidx_procedure_readiness |
view |
required |
reads |
NORMALIZED |
EXISTS (post-build) |
— |
PROC_BUILD_READINESS_REPORT |
view:public.v_pidx_inventory_current |
view |
required |
reads |
NORMALIZED |
EXISTS (post-build) |
— |
3. Expected per-procedure rollup (the assertion targets)
| procedure_code |
computed_readiness |
readiness_drift |
warning_flags |
why |
PROC_CHECK_DOT_EXISTS |
READY |
false |
— |
all required EXISTS, no warnings |
PROC_CREATE_NEW_DOT |
NOT_READY |
true |
— |
required procedure: MISSING; declared dot_sequence_ready ⇒ DRIFT |
PROC_UPDATE_DOT_HANDBOOK |
NOT_READY |
false |
— |
required report: UNKNOWN_SOURCE; declared text_ready is not a ready-tier ⇒ no drift |
PROC_VERIFY_COLLECTION_EXISTS |
READY |
false |
— |
single required EXISTS |
PROC_VERIFY_FIELD_EXISTS |
READY_WITH_WARNINGS |
false |
(optional field MISSING) |
required EXISTS; a non-gating field is MISSING |
PROC_CLASSIFY_COLLECTION |
READY_WITH_WARNINGS |
false |
APPROVAL_HANDLER_UNIMPLEMENTED |
required all EXISTS but approval handler unimplemented |
PROC_TRIAGE_UNKNOWN_SOURCE |
UNMAPPED |
false |
— |
zero ingredients ⇒ never silent READY |
PROC_RESOLVE_INVALID_REF |
NOT_READY |
false |
(READ_BLOCKED + UNKNOWN_SOURCE on optionals) |
required INVALID_REF; declared known ⇒ no drift |
PROC_BUILD_READINESS_REPORT |
READY |
false |
— |
both required views EXIST post-build |
This 9-row slice covers all 11 readiness statuses and 1 warning flag concretely; OVERLOADED_FUNCTION, AMBIGUOUS_LABEL, LOGICAL_PHYSICAL_MISMATCH, STALE_SOURCE are exercised by the inventory-view unit checks / conditional probes in the test plan (they need specific probe data, not a seed procedure).
4. Candidate seed SQL (TEXT ONLY — DO NOT EXECUTE)
-- CANDIDATE SEED — DO NOT EXECUTE. Insert only after the governed build of the two tables.
INSERT INTO public.pidx_procedure
(procedure_code, title, short_note, intent, domain_group, assembly_layer,
declared_maturity, automation_mode, safety_class, status, manifest_jsonb, source_ref)
VALUES
('PROC_CHECK_DOT_EXISTS','Check if a DOT exists','One-button existence probe of a DOT by code.',
'Answer: does DOT X exist?','dot-manage','UNMAPPED','machine_readable','one_button','read_only','active','{}'::jsonb,'seed:pidx-seed-slice-v0.1'),
('PROC_CREATE_NEW_DOT','Create a new DOT (full lifecycle, no orphan)','Reuse-first, then governed create + birth.',
'Create a DOT without orphaning DB/FS.','dot-manage','UNMAPPED','dot_sequence_ready','agent_assisted','owner_gated','active','{}'::jsonb,'seed:pidx-seed-slice-v0.1'),
('PROC_UPDATE_DOT_HANDBOOK','Add/update a DOT spec & handbook','Update a DOT''s spec/handbook evidence.',
'Keep DOT docs current.','dot-manage','UNMAPPED','text_ready','manual','ai_delegatable','active','{}'::jsonb,'seed:pidx-seed-slice-v0.1'),
('PROC_VERIFY_COLLECTION_EXISTS','Verify a collection/table exists','One-button existence probe of a collection/table.',
'Answer: does collection X exist?','collections-manage','UNMAPPED','one_button_ready','one_button','read_only','active','{}'::jsonb,'seed:pidx-seed-slice-v0.1'),
('PROC_VERIFY_FIELD_EXISTS','Verify a field/column exists','One-button existence probe of a column.',
'Answer: does field X exist?','collections-manage','UNMAPPED','one_button_ready','one_button','read_only','active','{}'::jsonb,'seed:pidx-seed-slice-v0.1'),
('PROC_CLASSIFY_COLLECTION','Classify a collection (governance_role)','Assign/verify governance classification.',
'Classify a collection.','collections-manage','UNMAPPED','machine_readable','agent_assisted','ai_delegatable','active','{}'::jsonb,'seed:pidx-seed-slice-v0.1'),
('PROC_TRIAGE_UNKNOWN_SOURCE','Handle an UNKNOWN_SOURCE ingredient','Decide where an unknown-source kind should be probed.',
'Triage an unknown source.','triage','UNMAPPED','known','manual','ai_delegatable','active','{}'::jsonb,'seed:pidx-seed-slice-v0.1'),
('PROC_RESOLVE_INVALID_REF','Resolve an INVALID_REF (normalize per grammar)','Normalize a malformed ref per grammar v0.1.',
'Fix a malformed ingredient ref.','triage','UNMAPPED','known','agent_assisted','ai_delegatable','active','{}'::jsonb,'seed:pidx-seed-slice-v0.1'),
('PROC_BUILD_READINESS_REPORT','Build a readiness report for a procedure','Render a procedure''s readiness from the views.',
'Report readiness for a procedure.','procedure-index','UNMAPPED','machine_readable','one_button','read_only','active','{}'::jsonb,'seed:pidx-seed-slice-v0.1');
INSERT INTO public.pidx_procedure_ingredient
(procedure_code, step_code, ingredient_kind, ingredient_ref, usage_role, required_level, ref_status, missing_route_procedure_code)
VALUES
('PROC_CHECK_DOT_EXISTS', NULL,'dot','dot:DOT-001','calls','required','NORMALIZED', NULL),
('PROC_CHECK_DOT_EXISTS', NULL,'collection','collection:public.dot_tools','reads','required','NORMALIZED', NULL),
('PROC_CREATE_NEW_DOT', 'reuse_first','procedure','procedure:PROC_REUSE_FIRST_SEARCH','calls','required','NORMALIZED','PROC_DESIGN_NEW_PROCEDURE'),
('PROC_CREATE_NEW_DOT', 'register','collection','collection:public.dot_tools','writes','required','NORMALIZED', NULL),
('PROC_CREATE_NEW_DOT', 'approve','approval','approval:patch_ops_code','requires','required','NORMALIZED', NULL),
('PROC_CREATE_NEW_DOT', 'draft_spec','template','template:dot_spec_template','requires','nice_to_have','NORMALIZED','PROC_TRIAGE_UNKNOWN_SOURCE'),
('PROC_UPDATE_DOT_HANDBOOK', NULL,'report','report:dot-usage-handbook','writes','required','NORMALIZED','PROC_CANONICALIZE_EVIDENCE_KB'),
('PROC_UPDATE_DOT_HANDBOOK', NULL,'collection','collection:public.dot_tools','reads','required','NORMALIZED', NULL),
('PROC_VERIFY_COLLECTION_EXISTS', NULL,'collection','collection:public.directus_collections','reads','required','NORMALIZED', NULL),
('PROC_VERIFY_FIELD_EXISTS', NULL,'field','field:public.dot_tools.code','reads','required','NORMALIZED', NULL),
('PROC_VERIFY_FIELD_EXISTS', NULL,'field','field:public.dot_tools.does_not_exist','reads','nice_to_have','NORMALIZED', NULL),
('PROC_CLASSIFY_COLLECTION', NULL,'collection','collection:public.collection_registry','reads','required','NORMALIZED', NULL),
('PROC_CLASSIFY_COLLECTION', NULL,'approval','approval:assign_governance_owner','requires','required','NORMALIZED', NULL),
-- PROC_TRIAGE_UNKNOWN_SOURCE: intentionally NO ingredient rows
('PROC_RESOLVE_INVALID_REF', NULL,'field','field:public.dot_tools','reads','required','UNNORMALIZED','PROC_TRIAGE_UNKNOWN_SOURCE'),
('PROC_RESOLVE_INVALID_REF', NULL,'dot','dot:DOT_PIDX_FAKE_0000','calls','nice_to_have','NORMALIZED', NULL),
('PROC_RESOLVE_INVALID_REF', NULL,'collection','collection:cutter_governance.policy_state','reads','nice_to_have','NORMALIZED', NULL),
('PROC_RESOLVE_INVALID_REF', NULL,'report','report:ref-grammar-v0.1','reads','nice_to_have','NORMALIZED', NULL),
('PROC_BUILD_READINESS_REPORT', NULL,'view','view:public.v_pidx_procedure_readiness','reads','required','NORMALIZED', NULL),
('PROC_BUILD_READINESS_REPORT', NULL,'view','view:public.v_pidx_inventory_current','reads','required','NORMALIZED', NULL);
5. Seeding discipline
- Seed rows only; declare ingredients lazily. Start with the
one_button/machine_readable verification procedures — cleanest SAFE-kind ingredients, immediate value.
manifest_jsonb stays {} for all 9 seeds at v0.1 (do not over-design manifests).
- The
UNKNOWN_SOURCE/READ_BLOCKED/INVALID_REF ingredients are included on purpose — surfacing where the system has no clean PG source (or where a ref is malformed) is a feature, not a defect.
dot:DOT_PIDX_FAKE_0000, field:public.dot_tools.does_not_exist, and collection:cutter_governance.policy_state are deliberate synthetic refs that must resolve to MISSING/READ_BLOCKED — they are the negative-path fixtures.
- The remaining 30 of the 39 candidates (
seed-procedure-candidates-v0.1.md) are seeded after the prototype proves the status machine.