prizmkit 1.1.111 → 1.1.113

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/codex/skill-adapter.js +4 -0
  3. package/bundled/agents/prizm-dev-team-reviewer.md +12 -1
  4. package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +10 -10
  5. package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -0
  6. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +20 -73
  7. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +290 -421
  8. package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +1 -1
  9. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +259 -481
  10. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +34 -0
  11. package/bundled/dev-pipeline/scripts/init-pipeline.py +12 -0
  12. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +24 -1
  13. package/bundled/dev-pipeline/scripts/prompt_framework.py +312 -0
  14. package/bundled/dev-pipeline/scripts/update-bug-status.py +87 -20
  15. package/bundled/dev-pipeline/scripts/update-feature-status.py +82 -16
  16. package/bundled/dev-pipeline/scripts/update-refactor-status.py +68 -28
  17. package/bundled/dev-pipeline/scripts/utils.py +171 -0
  18. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
  19. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +7 -1
  20. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +17 -19
  21. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +21 -26
  22. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +9 -1
  23. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +11 -8
  24. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +122 -182
  25. package/bundled/dev-pipeline/templates/sections/bugfix-artifacts.md +16 -0
  26. package/bundled/dev-pipeline/templates/sections/bugfix-critical-paths.md +12 -0
  27. package/bundled/dev-pipeline/templates/sections/bugfix-mission.md +9 -0
  28. package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +31 -0
  29. package/bundled/dev-pipeline/templates/sections/bugfix-phase-critic.md +22 -0
  30. package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +23 -0
  31. package/bundled/dev-pipeline/templates/sections/bugfix-phase-implement.md +20 -0
  32. package/bundled/dev-pipeline/templates/sections/bugfix-phase-init.md +9 -0
  33. package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +15 -0
  34. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +29 -0
  35. package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +11 -0
  36. package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +7 -0
  37. package/bundled/dev-pipeline/templates/sections/bugfix-session-status.md +31 -0
  38. package/bundled/dev-pipeline/templates/sections/bugfix-task-contract.md +40 -0
  39. package/bundled/dev-pipeline/templates/sections/failure-capture.md +2 -2
  40. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +8 -2
  41. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-opencli.md +7 -1
  42. package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +7 -1
  43. package/bundled/dev-pipeline/templates/sections/refactor-artifacts.md +17 -0
  44. package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +13 -0
  45. package/bundled/dev-pipeline/templates/sections/refactor-mission.md +9 -0
  46. package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +37 -0
  47. package/bundled/dev-pipeline/templates/sections/refactor-phase-critic.md +22 -0
  48. package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +16 -0
  49. package/bundled/dev-pipeline/templates/sections/refactor-phase-init.md +9 -0
  50. package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +22 -0
  51. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +19 -0
  52. package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +11 -0
  53. package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +7 -0
  54. package/bundled/dev-pipeline/templates/sections/refactor-session-status.md +28 -0
  55. package/bundled/dev-pipeline/templates/sections/refactor-task-contract.md +52 -0
  56. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +104 -26
  57. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +14 -0
  58. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +239 -0
  59. package/bundled/dev-pipeline/tests/test_unified_cli.py +6 -2
  60. package/bundled/dev-pipeline/tests/test_utils.py +66 -1
  61. package/bundled/skills/_metadata.json +1 -1
  62. package/bundled/skills/app-planner/SKILL.md +8 -7
  63. package/bundled/skills/app-planner/references/project-brief-guide.md +2 -2
  64. package/bundled/skills/app-planner/references/rules/backend/derivation-rules.md +1 -1
  65. package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +1 -1
  66. package/bundled/skills/app-planner/references/rules-configuration.md +53 -26
  67. package/bundled/skills/bug-fix-workflow/SKILL.md +191 -336
  68. package/bundled/skills/bug-planner/SKILL.md +6 -5
  69. package/bundled/skills/bug-planner/references/critic-and-verification.md +3 -3
  70. package/bundled/skills/bug-planner/references/schema-validation.md +2 -1
  71. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +70 -1
  72. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +21 -21
  73. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +2 -2
  74. package/bundled/skills/feature-pipeline-launcher/SKILL.md +25 -26
  75. package/bundled/skills/feature-planner/SKILL.md +9 -11
  76. package/bundled/skills/feature-planner/assets/planning-guide.md +1 -1
  77. package/bundled/skills/feature-planner/references/decomposition-patterns.md +1 -1
  78. package/bundled/skills/feature-planner/references/error-recovery.md +2 -1
  79. package/bundled/skills/feature-planner/references/incremental-feature-planning.md +2 -2
  80. package/bundled/skills/feature-planner/references/new-project-planning.md +35 -39
  81. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -1
  82. package/bundled/skills/feature-workflow/SKILL.md +170 -298
  83. package/bundled/skills/prizmkit/SKILL.md +103 -57
  84. package/bundled/skills/prizmkit-code-review/SKILL.md +97 -116
  85. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +1 -0
  86. package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +14 -3
  87. package/bundled/skills/prizmkit-committer/SKILL.md +59 -47
  88. package/bundled/skills/prizmkit-deploy/SKILL.md +162 -381
  89. package/bundled/skills/prizmkit-deploy/references/database-setup.md +12 -3
  90. package/bundled/skills/prizmkit-deploy/references/ssh-adapter-flow.md +220 -0
  91. package/bundled/skills/prizmkit-implement/SKILL.md +51 -40
  92. package/bundled/skills/prizmkit-init/SKILL.md +4 -3
  93. package/bundled/skills/prizmkit-plan/SKILL.md +85 -70
  94. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +94 -73
  95. package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +20 -18
  96. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +11 -13
  97. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +18 -14
  98. package/bundled/skills/prizmkit-retrospective/SKILL.md +56 -48
  99. package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +79 -27
  100. package/bundled/skills/prizmkit-test/SKILL.md +138 -141
  101. package/bundled/skills/prizmkit-test/references/boundary-coverage-protocol.md +1 -1
  102. package/bundled/skills/prizmkit-test/references/examples.md +11 -9
  103. package/bundled/skills/prizmkit-test/references/test-generation-steps.md +1 -1
  104. package/bundled/skills/prizmkit-test/references/test-report-template.md +2 -2
  105. package/bundled/skills/recovery-workflow/SKILL.md +195 -256
  106. package/bundled/skills/recovery-workflow/evals/evals.json +21 -13
  107. package/bundled/skills/recovery-workflow/references/detection.md +48 -39
  108. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +258 -322
  109. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +32 -13
  110. package/bundled/skills/refactor-planner/SKILL.md +2 -2
  111. package/bundled/skills/refactor-planner/references/behavior-preservation.md +24 -19
  112. package/bundled/skills/refactor-planner/references/fast-path.md +2 -4
  113. package/bundled/skills/refactor-planner/references/planning-phases.md +2 -2
  114. package/bundled/skills/refactor-workflow/SKILL.md +174 -307
  115. package/package.json +1 -1
  116. package/src/scaffold.js +5 -0
  117. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +0 -6
  118. package/bundled/skills/feature-workflow/references/brainstorm-guide.md +0 -137
  119. package/bundled/skills/refactor-workflow/references/brainstorm-guide.md +0 -116
@@ -35,10 +35,11 @@ If you believe the task is better suited for a different workflow, you MUST:
35
35
 
36
36
  **Your ONLY writable outputs are:**
37
37
  1. `.prizmkit/plans/project-brief.md` (`.prizmkit/plans/` — accumulated project context brief)
38
- 2. Project conventions and architecture decisions appended to `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` (with user consent)
39
- 3. Infrastructure configuration (database conventions, deployment config, **cloud services**) appended to `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section
40
- 4. `.prizmkit/rules/<layer>-rules.md` per-layer development rules generated by Rules Configuration
41
- 5. `.prizmkit/prizm-docs/root.prizm` — `RULES:` pointer line only (not other root.prizm content; created minimally if absent)
38
+ 2. `.prizmkit/plans/project-brief.draft.md` draft only when user exits before completion
39
+ 3. Project conventions and architecture decisions appended to `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` (with user consent)
40
+ 4. Infrastructure configuration (database conventions, deployment config, **cloud services**) appended to `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section
41
+ 5. `.prizmkit/rules/<layer>-rules.md` — per-layer development rules generated by Rules Configuration
42
+ 6. `.prizmkit/prizm-docs/root.prizm` — `RULES:` pointer line only (not other root.prizm content; created minimally if absent)
42
43
 
43
44
  **Project instruction file selection**:
44
45
  - If `.prizmkit/manifest.json` exists, use its `platform` field as the source of truth.
@@ -172,7 +173,7 @@ Route by answer:
172
173
  - After brainstorm completes, use `AskUserQuestion`: "Ideas are taking shape. What's next?"
173
174
  - **Continue to project planning (Recommended)** — capture tech stack, conventions, and architecture decisions
174
175
  - **Continue refining** — keep brainstorming
175
- - **Save draft & exit** — save progress to .prizmkit/planning/
176
+ - **Save draft & exit** — save progress to `.prizmkit/plans/project-brief.draft.md`
176
177
  - **Checkpoints in explore mode**: CP-AP-0 (required), CP-AP-1 (required), CP-AP-2 (from brainstorm output), CP-AP-3 (only if user proceeds to Phase 2), CP-AP-4 and CP-AP-5 (only if user transitions to produce mode)
177
178
  - **Generate project context only** → Enter **Quick Context Mode** (brownfield only):
178
179
  - Run Project State Detection → if greenfield, redirect to produce mode
@@ -271,7 +272,7 @@ When the session appears to be ending:
271
272
  1. **Remind**: "You set out to produce a project plan but `.prizmkit/plans/project-brief.md` isn't complete yet."
272
273
  2. Use `AskUserQuestion`: "How would you like to proceed?"
273
274
  - **Continue to completion (Recommended)** — finish the project brief
274
- - **Save draft & exit** — write current progress as draft to `.prizmkit/planning/`
275
+ - **Save draft & exit** — write current progress as draft to `.prizmkit/plans/project-brief.draft.md`
275
276
  - **Abandon** — exit without saving
276
277
 
277
278
  ## Completion Summary
@@ -281,7 +282,7 @@ After all checkpoints pass, present a summary and end the session:
281
282
  1. **Summary** (as text): List all project-level artifacts produced:
282
283
  - Project conventions → `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Project Conventions`
283
284
  - Infrastructure config → `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` (database conventions + deployment config)
284
- - Tech stack → `.prizmkit/config.json`
285
+ - Tech stack assumptions captured in `.prizmkit/plans/project-brief.md` and reused from `.prizmkit/config.json` when it already exists
285
286
  - Architecture decisions (if any) → `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Architecture Decisions`
286
287
  - Dev rules (if configured) → `.prizmkit/rules/<layer>-rules.md` (with `root.prizm` `RULES:` pointer)
287
288
  - Project brief → `.prizmkit/plans/project-brief.md`
@@ -1,6 +1,6 @@
1
1
  # Project Brief Template
2
2
 
3
- > Capture the user's key product ideas as a simple checklist. Each line is one idea. This file is referenced by `root.prizm` (`PROJECT_BRIEF:`) so every new AI session automatically knows the project's goals.
3
+ > Capture the user's key product ideas as a simple checklist. Each line is one idea. Downstream planners can load this file as project-level context.
4
4
 
5
5
  ## File Location
6
6
 
@@ -70,7 +70,7 @@ Stop asking when ALL of these are clear:
70
70
  2. **Users** — who will use it and in what context
71
71
  3. **Core features** — at least 3 concrete capabilities (not vague aspirations)
72
72
  4. **Boundaries** — what's in scope vs. out of scope for V1
73
- 5. **Technical direction** — enough to populate `config.json` tech_stack (or explicitly deferred)
73
+ 5. **Technical direction** — enough to describe stack assumptions in the brief, or explicitly mark them deferred
74
74
 
75
75
  If the user gives short/vague answers, don't accept them — rephrase and ask again. A weak brief leads to weak specs downstream.
76
76
 
@@ -614,6 +614,6 @@ This table verifies every template placeholder has at least one derivation rule
614
614
  | `{{ ai_dependency_rule }}` | Yes | No | D-AI-DEP-STRICT-01, D-AI-DEP-ANNOUNCE-01, D-AI-DEP-LOOSE-01 |
615
615
  | `{{ ai_breaking_change_rule }}` | Yes | No | D-AI-BREAK-STRICT-01, D-AI-BREAK-LOOSE-01 |
616
616
  | `{{ ai_config_rule }}` | Yes | No | D-AI-CONFIG-STRICT-01, D-AI-CONFIG-SYNC-01 |
617
- | `{{ FIXED_RULES_* }}` | No | Yes | `references/fixed-rules.md` |
617
+ | `{{ FIXED_RULES_* }}` | No | Yes | `references/rules/backend/fixed-rules.md` |
618
618
  | `{{ deny_list_summary }}` | N/A | N/A | AI auto-generates in Phase 4 |
619
619
  | `{{ recommended_libs }}` | N/A | N/A | AI auto-generates in Phase 4 |
@@ -2,7 +2,7 @@
2
2
 
3
3
  > This file defines the mapping "Phase 2 answers → rule blocks auto-injected into frontend-rules.md". The AI reads this file in Phase 3 — **do not ask the user again**.
4
4
  >
5
- > Usage: Each rule block has a unique ID (e.g., `D-TAILWIND-01`). After matching the user's answer, inject the "rule body" verbatim into the corresponding `{{ ... }}` placeholder in [frontend-rules.template.md](../templates/frontend-rules.template.md).
5
+ > Usage: Each rule block has a unique ID (e.g., `D-TAILWIND-01`). After matching the user's answer, inject the "rule body" verbatim into the corresponding `{{ ... }}` placeholder in [`template.md`](template.md).
6
6
 
7
7
  ---
8
8
 
@@ -1,6 +1,28 @@
1
- # Rules Configuration — Detailed Q&A Procedures
1
+ # Rules Configuration — Full Procedure
2
2
 
3
- Procedural details for configuring per-layer development rules during app planning. SKILL.md retains Steps 1-3 and 5 (flow control); this file contains Step 4's full Q&A workflow.
3
+ Procedure for configuring per-layer development rules during app planning.
4
+
5
+ ## Step 1: Detect Layers
6
+
7
+ - Prefer `.prizmkit/config.json` `tech_stack` when present.
8
+ - Otherwise infer layers from project files:
9
+ - frontend: `package.json` plus React/Vue/Svelte/Next/Vite indicators
10
+ - backend: Express/FastAPI/Django/Go/Java service indicators
11
+ - database: migrations, ORM config, schema files, or DB dependencies
12
+ - mobile: Flutter/React Native/iOS/Android indicators
13
+ - Present detected layers with `AskUserQuestion`; include "Skip rules configuration" as a non-blocking option.
14
+
15
+ ## Step 2: Choose Configuration Mode
16
+
17
+ - Quick mode asks only manifest groups marked `quick_mode: true`.
18
+ - Full mode asks every manifest group in order.
19
+ - Skip mode records no rules file for that layer and continues without reminders.
20
+
21
+ ## Step 3: Ask Questions with AskUserQuestion
22
+
23
+ - Convert each question-bank option group into selectable `AskUserQuestion` options.
24
+ - Do not ask users to type letter shortcuts such as `A` or `1`; those shortcuts are legacy notation in question banks only.
25
+ - Every non-essential question includes a skip/defer option.
4
26
 
5
27
  ## Step 4: Configure Each Selected Layer — Full Q&A Workflow
6
28
 
@@ -10,37 +32,42 @@ For each selected layer, run the 4-phase rule generation pattern:
10
32
 
11
33
  - Read `${SKILL_DIR}/references/rules/<layer>/fixed-rules.md` — industry-consensus rules injected without asking
12
34
  - Read `${SKILL_DIR}/references/rules/<layer>/question-bank.md` — interactive questions organized in groups (G1->G10): authoritative source for question text, options, "Recommended" markers, and Notes
13
- - Read `${SKILL_DIR}/references/rules/<layer>/question-manifest.json` — machine-readable structure for this layer. **This is your asking checklist.** It lists, per question: `group`, `required`, `maps_to` (which template placeholders the answer fills), and conditional fields (`required_if`, `auto_derived_when`, `options_vary_by`). Its `groups[]` carries each group's `quick_mode` flag, and `template_placeholders` is the expected-set for the Phase D self-check. Use the manifest to track coverage; use question-bank.md for the actual wording you present to the user. If a question id in one file is absent from the other, trust question-bank.md for content and note the drift.
35
+ - Read `${SKILL_DIR}/references/rules/<layer>/question-manifest.json` — machine-readable structure for this layer. This is the asking checklist. It lists, per question: `group`, `required`, `maps_to`, `required_if`, `auto_derived_when`, and `options_vary_by`. Its `groups[]` carries each group's `quick_mode` flag, and `template_placeholders` is the expected-set for the Phase D self-check. Use the manifest to track coverage; use question-bank.md for the actual wording you present to the user. If a question id in one file is absent from the other, trust question-bank.md for content and note the drift.
14
36
 
15
37
  ### Phase B — Interactive Q&A
16
38
 
17
- - Ask questions one group at a time (max 3 questions per message), as defined in question-bank.md
18
- - Each question shows a "Recommended" option to reduce decision cost
19
- - **Quick mode**: ask only the groups whose `quick_mode` is `true` in `question-manifest.json`. All other groups adopt recommended defaults silently. (The manifest is the single source of truth for quick-mode membership — do not hardcode group lists here.)
20
- - **Full mode**: ask all groups in manifest order (`groups[]`).
21
- - **Conditional questions** (driven by the manifest's per-question fields):
22
- - `required_if: "<expr>"` — ask this question only when the expression over prior answers holds (e.g. Q14 `required_if: Q13 != D`). If the condition is false, the question is legitimately skipped — not a coverage gap.
23
- - `auto_derived_when: "<expr>"` — when this holds, fill the mapped placeholder(s) from the prior answer without asking (e.g. backend Q6 `auto_derived_when: Q5 in [GraphQL, gRPC]`). Count as satisfied, not skipped.
24
- - `options_vary_by: "<Qid>"` — the question is still asked; only its option list depends on that prior answer (e.g. framework/ORM options vary by language). Never affects whether the question is required.
25
- - Shortcut commands work at any point:
26
- - `recommended` / `default` -> adopt all recommended for current group
27
- - `all recommended` -> adopt all recommended for all remaining groups
28
- - `skip` -> mark current group as "Not required at this stage"
39
+ - Ask questions one group at a time (max 3 questions per message), as defined in question-bank.md.
40
+ - Each question shows a "Recommended" option to reduce decision cost.
41
+ - Quick mode: ask only the groups whose `quick_mode` is `true` in `question-manifest.json`. All other groups adopt recommended defaults silently.
42
+ - Full mode: ask all groups in manifest order (`groups[]`).
43
+ - Conditional questions:
44
+ - `required_if: "<expr>"` — ask this question only when the expression over prior answers holds. If false, the question is legitimately skipped.
45
+ - `auto_derived_when: "<expr>"` — when true, fill the mapped placeholder(s) from the prior answer without asking. Count as satisfied, not skipped.
46
+ - `options_vary_by: "<Qid>"` — the question is still asked; only its option list depends on that prior answer.
47
+ - Legacy shortcut labels in question banks such as `recommended`, `default`, or `skip` are converted into selectable options in `AskUserQuestion`.
48
+ - Do not ask the user to type these commands manually; selectable options prevent merged or missed decisions.
29
49
  - Record answers in memory after each group. Track which manifest questions are answered, auto-derived, or conditionally skipped so Phase D can verify coverage.
30
50
 
31
51
  ### Phase C — Auto-derivation
32
52
 
33
- - Read `${SKILL_DIR}/references/rules/<layer>/derivation-rules.md`
34
- - Match user answers against the trigger map using keyword matching
35
- - Derive platform-specific rules without asking the user (e.g., choosing Flutter -> auto-inject Flutter widget/persistence/navigation rules)
53
+ - Read `${SKILL_DIR}/references/rules/<layer>/derivation-rules.md`.
54
+ - Match user answers against the trigger map using keyword matching.
55
+ - Derive platform-specific rules without asking the user.
36
56
 
37
57
  ### Phase D — Render and Write
38
58
 
39
- - Read `${SKILL_DIR}/references/rules/<layer>/template.md`
40
- - Fill all template placeholders with accumulated content from Phases A+B+C
41
- - **Post-render self-check** (driven by `question-manifest.json` -> `template_placeholders`):
42
- 1. **Coverage pass** — for every placeholder in `from_questions`, confirm it traces to an answered question OR an `auto_derived_when` path OR a conditionally-skipped question (`required_if` false). If a `from_questions` placeholder has no source, you skipped a required question — go back and ask it before writing.
43
- 2. **Residual pass** — scan the rendered document for any residual `{{ ` or ` }}`; count must be 0. Placeholders in `from_fixed_rules` / `auto_generated` / `metadata` are filled from fixed-rules.md, Phase D generation, and project metadata respectively — they are NOT expected to come from Q&A, but they MUST still be rendered (no residual braces).
44
- - Generate Appendix A (Deny List) and Appendix B (Recommended Tools) per template instructions — these fill the `auto_generated` placeholders
45
- - Create `.prizmkit/rules/` directory if it doesn't exist
46
- - Write `.prizmkit/rules/<layer>-rules.md`
59
+ - Read `${SKILL_DIR}/references/rules/<layer>/template.md`.
60
+ - Fill all template placeholders with accumulated content from Phases A+B+C.
61
+ - Post-render self-check driven by `question-manifest.json` -> `template_placeholders`:
62
+ 1. Coverage pass — for every placeholder in `from_questions`, confirm it traces to an answered question OR an `auto_derived_when` path OR a conditionally-skipped question (`required_if` false). If a `from_questions` placeholder has no source, go back and ask it before writing.
63
+ 2. Residual pass — scan the rendered document for any residual `{{ ` or ` }}`; count must be 0. Placeholders in `from_fixed_rules`, `auto_generated`, and `metadata` are filled from fixed rules, Phase D generation, and project metadata.
64
+ - Generate Appendix A (Deny List) and Appendix B (Recommended Tools) per template instructions.
65
+ - Create `.prizmkit/rules/` directory if it doesn't exist.
66
+ - Write `.prizmkit/rules/<layer>-rules.md`.
67
+
68
+ ## Step 5: Update root.prizm RULES Pointer
69
+
70
+ - Ensure `.prizmkit/prizm-docs/root.prizm` has a concise `RULES:` pointer to configured rules.
71
+ - If root.prizm exists, update only the `RULES:` line.
72
+ - If root.prizm is absent, create a minimal valid root.prizm with required fields and a `RULES:` pointer.
73
+ - Do not write architecture decisions, project brief content, or changelog metadata into root.prizm.