prizmkit 1.1.57 → 1.1.60

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 (188) hide show
  1. package/bin/create-prizmkit.js +8 -6
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/adapters/codex/agent-adapter.js +38 -0
  4. package/bundled/adapters/codex/paths.js +27 -0
  5. package/bundled/adapters/codex/rules-adapter.js +30 -0
  6. package/bundled/adapters/codex/settings-adapter.js +27 -0
  7. package/bundled/adapters/codex/skill-adapter.js +65 -0
  8. package/bundled/adapters/codex/team-adapter.js +37 -0
  9. package/bundled/dev-pipeline/.env.example +2 -1
  10. package/bundled/dev-pipeline/README.md +10 -7
  11. package/bundled/dev-pipeline/lib/common.sh +278 -37
  12. package/bundled/dev-pipeline/run-bugfix.sh +10 -61
  13. package/bundled/dev-pipeline/run-feature.sh +10 -78
  14. package/bundled/dev-pipeline/run-recovery.sh +10 -46
  15. package/bundled/dev-pipeline/run-refactor.sh +10 -61
  16. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +17 -7
  17. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -3
  18. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +9 -3
  19. package/bundled/dev-pipeline/scripts/utils.py +6 -4
  20. package/bundled/dev-pipeline-windows/.env.example +28 -0
  21. package/bundled/dev-pipeline-windows/README.md +30 -0
  22. package/bundled/dev-pipeline-windows/SCHEMA_ANALYSIS.md +525 -0
  23. package/bundled/dev-pipeline-windows/assets/feature-list-example.json +146 -0
  24. package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +138 -0
  25. package/bundled/dev-pipeline-windows/launch-bugfix-daemon.ps1 +9 -0
  26. package/bundled/dev-pipeline-windows/launch-feature-daemon.ps1 +9 -0
  27. package/bundled/dev-pipeline-windows/launch-refactor-daemon.ps1 +9 -0
  28. package/bundled/dev-pipeline-windows/lib/common.ps1 +432 -0
  29. package/bundled/dev-pipeline-windows/lib/daemon.ps1 +140 -0
  30. package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +446 -0
  31. package/bundled/dev-pipeline-windows/lib/reset.ps1 +87 -0
  32. package/bundled/dev-pipeline-windows/reset-bug.ps1 +9 -0
  33. package/bundled/dev-pipeline-windows/reset-feature.ps1 +9 -0
  34. package/bundled/dev-pipeline-windows/reset-refactor.ps1 +9 -0
  35. package/bundled/dev-pipeline-windows/run-bugfix.ps1 +9 -0
  36. package/bundled/dev-pipeline-windows/run-feature.ps1 +9 -0
  37. package/bundled/dev-pipeline-windows/run-recovery.ps1 +76 -0
  38. package/bundled/dev-pipeline-windows/run-refactor.ps1 +9 -0
  39. package/bundled/dev-pipeline-windows/scripts/check-session-status.py +228 -0
  40. package/bundled/dev-pipeline-windows/scripts/cleanup-logs.py +192 -0
  41. package/bundled/dev-pipeline-windows/scripts/detect-stuck.py +530 -0
  42. package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +1737 -0
  43. package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +685 -0
  44. package/bundled/dev-pipeline-windows/scripts/generate-recovery-prompt.py +805 -0
  45. package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +763 -0
  46. package/bundled/dev-pipeline-windows/scripts/init-bugfix-pipeline.py +316 -0
  47. package/bundled/dev-pipeline-windows/scripts/init-dev-team.py +134 -0
  48. package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +380 -0
  49. package/bundled/dev-pipeline-windows/scripts/init-refactor-pipeline.py +399 -0
  50. package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +388 -0
  51. package/bundled/dev-pipeline-windows/scripts/patch-completion-notes.py +191 -0
  52. package/bundled/dev-pipeline-windows/scripts/update-bug-status.py +864 -0
  53. package/bundled/dev-pipeline-windows/scripts/update-checkpoint.py +173 -0
  54. package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +1501 -0
  55. package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +1073 -0
  56. package/bundled/dev-pipeline-windows/scripts/utils.py +542 -0
  57. package/bundled/dev-pipeline-windows/templates/agent-prompts/critic-plan-challenge.md +7 -0
  58. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-fix.md +7 -0
  59. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +30 -0
  60. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-resume.md +5 -0
  61. package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +7 -0
  62. package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +46 -0
  63. package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +43 -0
  64. package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +43 -0
  65. package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +43 -0
  66. package/bundled/dev-pipeline-windows/templates/bug-fix-list-schema.json +263 -0
  67. package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +320 -0
  68. package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +237 -0
  69. package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +331 -0
  70. package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +270 -0
  71. package/bundled/dev-pipeline-windows/templates/sections/ac-verification-checklist.md +13 -0
  72. package/bundled/dev-pipeline-windows/templates/sections/checkpoint-system.md +91 -0
  73. package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +33 -0
  74. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-agent.md +10 -0
  75. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-full.md +12 -0
  76. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-lite.md +7 -0
  77. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-agent.md +8 -0
  78. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-full.md +9 -0
  79. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-lite.md +6 -0
  80. package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +21 -0
  81. package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +31 -0
  82. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +72 -0
  83. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +63 -0
  84. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +62 -0
  85. package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +71 -0
  86. package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +64 -0
  87. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +23 -0
  88. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +24 -0
  89. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +12 -0
  90. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +53 -0
  91. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +32 -0
  92. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +37 -0
  93. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +50 -0
  94. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +52 -0
  95. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +27 -0
  96. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +27 -0
  97. package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +27 -0
  98. package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +29 -0
  99. package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +77 -0
  100. package/bundled/dev-pipeline-windows/templates/sections/phase0-init.md +13 -0
  101. package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +23 -0
  102. package/bundled/dev-pipeline-windows/templates/sections/session-context.md +5 -0
  103. package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +6 -0
  104. package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-agent.md +67 -0
  105. package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-lite.md +58 -0
  106. package/bundled/dev-pipeline-windows/templates/session-status-schema.json +83 -0
  107. package/bundled/skills/_metadata.json +1 -1
  108. package/bundled/skills/app-planner/SKILL.md +26 -18
  109. package/bundled/skills/app-planner/references/architecture-decisions.md +9 -5
  110. package/bundled/skills/app-planner/references/frontend-design-guide.md +1 -1
  111. package/bundled/skills/feature-planner/SKILL.md +9 -2
  112. package/bundled/skills/prizmkit-init/SKILL.md +7 -6
  113. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +2 -0
  114. package/bundled/skills-windows/app-planner/SKILL.md +639 -0
  115. package/bundled/skills-windows/app-planner/assets/app-design-guide.md +101 -0
  116. package/bundled/skills-windows/app-planner/references/architecture-decisions.md +52 -0
  117. package/bundled/skills-windows/app-planner/references/brainstorm-guide.md +101 -0
  118. package/bundled/skills-windows/app-planner/references/frontend-design-guide.md +71 -0
  119. package/bundled/skills-windows/app-planner/references/project-brief-guide.md +82 -0
  120. package/bundled/skills-windows/app-planner/references/red-team-checklist.md +40 -0
  121. package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +609 -0
  122. package/bundled/skills-windows/app-planner/references/rules/backend/fixed-rules.md +285 -0
  123. package/bundled/skills-windows/app-planner/references/rules/backend/question-bank.md +249 -0
  124. package/bundled/skills-windows/app-planner/references/rules/backend/template.md +173 -0
  125. package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +373 -0
  126. package/bundled/skills-windows/app-planner/references/rules/database/fixed-rules.md +211 -0
  127. package/bundled/skills-windows/app-planner/references/rules/database/question-bank.md +184 -0
  128. package/bundled/skills-windows/app-planner/references/rules/database/template.md +158 -0
  129. package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +810 -0
  130. package/bundled/skills-windows/app-planner/references/rules/frontend/fixed-rules.md +188 -0
  131. package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +302 -0
  132. package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +320 -0
  133. package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +639 -0
  134. package/bundled/skills-windows/app-planner/references/rules/mobile/fixed-rules.md +290 -0
  135. package/bundled/skills-windows/app-planner/references/rules/mobile/question-bank.md +232 -0
  136. package/bundled/skills-windows/app-planner/references/rules/mobile/template.md +175 -0
  137. package/bundled/skills-windows/bug-fix-workflow/SKILL.md +415 -0
  138. package/bundled/skills-windows/bug-planner/SKILL.md +395 -0
  139. package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +43 -0
  140. package/bundled/skills-windows/bug-planner/references/critic-and-verification.md +44 -0
  141. package/bundled/skills-windows/bug-planner/references/error-recovery.md +73 -0
  142. package/bundled/skills-windows/bug-planner/references/input-formats.md +53 -0
  143. package/bundled/skills-windows/bug-planner/references/schema-validation.md +25 -0
  144. package/bundled/skills-windows/bug-planner/references/severity-rules.md +16 -0
  145. package/bundled/skills-windows/bug-planner/scripts/validate-bug-list.py +322 -0
  146. package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +380 -0
  147. package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +441 -0
  148. package/bundled/skills-windows/feature-pipeline-launcher/scripts/preflight-check.py +462 -0
  149. package/bundled/skills-windows/feature-planner/SKILL.md +401 -0
  150. package/bundled/skills-windows/feature-planner/assets/evaluation-guide.md +64 -0
  151. package/bundled/skills-windows/feature-planner/assets/planning-guide.md +214 -0
  152. package/bundled/skills-windows/feature-planner/references/browser-interaction.md +59 -0
  153. package/bundled/skills-windows/feature-planner/references/completeness-review.md +57 -0
  154. package/bundled/skills-windows/feature-planner/references/decomposition-patterns.md +75 -0
  155. package/bundled/skills-windows/feature-planner/references/error-recovery.md +90 -0
  156. package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +112 -0
  157. package/bundled/skills-windows/feature-planner/references/new-project-planning.md +85 -0
  158. package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +1029 -0
  159. package/bundled/skills-windows/feature-workflow/SKILL.md +531 -0
  160. package/bundled/skills-windows/prizmkit-init/SKILL.md +356 -0
  161. package/bundled/skills-windows/prizmkit-init/assets/project-brief-template.md +82 -0
  162. package/bundled/skills-windows/prizmkit-init/references/config-schema.md +68 -0
  163. package/bundled/skills-windows/prizmkit-init/references/rules/layer-detection.md +41 -0
  164. package/bundled/skills-windows/prizmkit-init/references/tech-stack-catalog.md +13 -0
  165. package/bundled/skills-windows/prizmkit-init/references/update-supplement.md +9 -0
  166. package/bundled/skills-windows/recovery-workflow/SKILL.md +456 -0
  167. package/bundled/skills-windows/recovery-workflow/evals/evals.json +46 -0
  168. package/bundled/skills-windows/recovery-workflow/scripts/detect-recovery-state.py +544 -0
  169. package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +406 -0
  170. package/bundled/skills-windows/refactor-planner/SKILL.md +540 -0
  171. package/bundled/skills-windows/refactor-planner/assets/planning-guide.md +292 -0
  172. package/bundled/skills-windows/refactor-planner/references/behavior-preservation.md +301 -0
  173. package/bundled/skills-windows/refactor-planner/references/refactor-scoping-guide.md +221 -0
  174. package/bundled/skills-windows/refactor-planner/scripts/validate-and-generate-refactor.py +858 -0
  175. package/bundled/skills-windows/refactor-workflow/SKILL.md +503 -0
  176. package/package.json +3 -2
  177. package/src/clean.js +73 -2
  178. package/src/config.js +159 -50
  179. package/src/detect-platform.js +16 -8
  180. package/src/external-skills.js +26 -19
  181. package/src/index.js +31 -9
  182. package/src/manifest.js +6 -2
  183. package/src/metadata.js +43 -5
  184. package/src/platforms.js +36 -0
  185. package/src/prompts.js +31 -6
  186. package/src/runtimes.js +20 -0
  187. package/src/scaffold.js +314 -110
  188. package/src/upgrade.js +81 -41
@@ -0,0 +1,320 @@
1
+ # Dev-Pipeline Bug Fix Session Bootstrap
2
+
3
+ ## Session Context
4
+
5
+ - **Bug ID**: {{BUG_ID}}
6
+ - **Bug Title**: {{BUG_TITLE}}
7
+ - **Severity**: {{SEVERITY}}
8
+ - **Verification Type**: {{VERIFICATION_TYPE}}
9
+
10
+ ## Your Mission
11
+
12
+ You are the **bug fix session agent**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}".
13
+
14
+ **CRITICAL**: You MUST NOT exit until ALL work is complete and committed.
15
+
16
+ **NON-INTERACTIVE MODE**: There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input. Make decisions autonomously and move forward.
17
+
18
+ ### Bug Description
19
+
20
+ {{BUG_DESCRIPTION}}
21
+
22
+ {{USER_CONTEXT}}
23
+
24
+ ### Error Source
25
+
26
+ - **Type**: {{ERROR_SOURCE_TYPE}}
27
+ {{ERROR_SOURCE_DETAILS}}
28
+
29
+ ### Acceptance Criteria
30
+
31
+ {{ACCEPTANCE_CRITERIA}}
32
+
33
+ ### Environment
34
+
35
+ {{ENVIRONMENT}}
36
+
37
+ ### App Global Context
38
+
39
+ {{GLOBAL_CONTEXT}}
40
+
41
+ ### Project Conventions
42
+
43
+ > Read {{PLATFORM_CONVENTIONS}} for project-level coding standards, architecture decisions, and development rules.
44
+
45
+ ## ⚠️ Context Budget Rules (CRITICAL)
46
+
47
+ 0. **NON-INTERACTIVE MODE** — NEVER ask for confirmation. Proceed autonomously.
48
+ 1. **context-snapshot.md is your single source of truth** — After it is built, read context-snapshot.md instead of re-reading individual source files.
49
+ 2. **Never re-read your own writes** — Trust your write was correct.
50
+ 3. **Stay focused** — Do NOT explore code unrelated to this bug.
51
+ 4. **Minimize tool output** — Capture to temp file, scan head/tail, filter with Select-String/PowerShell object filtering. Never load full output.
52
+ 5. **No intermediate commits** — All changes committed once at the end via `/prizmkit-committer`.
53
+
54
+ ## Bug Fix Artifacts Directory
55
+
56
+ ```
57
+ .prizmkit/bugfix/{{BUG_ID}}/
58
+ ├── spec.md ← /prizmkit-plan output (root cause, scope, behavior preservation)
59
+ ├── plan.md ← /prizmkit-plan output (fix tasks, first task = reproduction test)
60
+ ├── context-snapshot.md ← Project context for this bug
61
+ └── fix-report.md ← Final bug resolution report
62
+ ```
63
+
64
+ ## Workflow Checkpoint System
65
+
66
+ **Path**: `{{CHECKPOINT_PATH}}`
67
+
68
+ **Rules**:
69
+ 1. **Before each step**: Read `workflow-checkpoint.json`, verify the previous step is `"completed"`. If not, complete it first.
70
+ 2. **Starting a step**: Update to `status: "in_progress"`.
71
+ 3. **After step completes**: Update to `status: "completed"`.
72
+ 4. **On failure**: Set to `status: "failed"` and continue if possible.
73
+ 5. **On resume**: Skip `"completed"` steps. Start from first `"pending"` or `"in_progress"` step.
74
+
75
+ ---
76
+
77
+ ## Execution
78
+
79
+ ### Phase 0: Initialize
80
+
81
+ ```powershell
82
+ New-Item -ItemType Directory -Force -Path .prizmkit/bugfix/{{BUG_ID}} | Out-Null
83
+ ```
84
+
85
+ {{IF_BROWSER_INTERACTION}}
86
+
87
+ #### Browser Verification Setup
88
+
89
+ The bug may be reproducible via the UI using browser tools:
90
+
91
+ {{IF_BROWSER_TOOL_AUTO}}
92
+ - **Browser Tool**: Will be auto-selected based on error type and dev server configuration
93
+ {{END_IF_BROWSER_TOOL_AUTO}}
94
+
95
+ {{IF_BROWSER_TOOL_PLAYWRIGHT}}
96
+ - **Browser Tool**: playwright-cli (local isolated browser against dev server)
97
+ {{END_IF_BROWSER_TOOL_PLAYWRIGHT}}
98
+
99
+ {{IF_BROWSER_TOOL_OPENCLI}}
100
+ - **Browser Tool**: opencli (Chrome session with existing login context — ideal for OAuth/third-party integrations)
101
+ {{END_IF_BROWSER_TOOL_OPENCLI}}
102
+
103
+ **Browser Verification Goals**:
104
+ {{BROWSER_VERIFY_STEPS}}
105
+
106
+ If the bug is related to UI/frontend, you may use these tools to:
107
+ 1. Reproduce the bug in a running dev server
108
+ 2. Verify the fix after implementation
109
+ 3. Smoke-test related UI flows for regression
110
+
111
+ {{END_IF_BROWSER_INTERACTION}}
112
+
113
+ ### Phase 1: Diagnose & Plan
114
+
115
+ **Goal**: Identify root cause, build project context, produce spec.md + plan.md.
116
+
117
+ **Step 1 — Diagnose the bug**:
118
+
119
+ 1. Read `.prizmkit/prizm-docs/root.prizm` and relevant L1/L2 docs for affected modules
120
+ 2. Trace the bug:
121
+ - Classify error type (Runtime / Network / Auth / Data / Logic / Config / External)
122
+ - Check `.prizmkit/prizm-docs/` TRAPS sections for matching known issues
123
+ - Trace call chain from error source to root cause
124
+ - Identify all affected files and modules
125
+ 3. Read the affected source files and related test files
126
+
127
+ **Step 2 — Build context snapshot** (skip if already exists):
128
+
129
+ Write `.prizmkit/bugfix/{{BUG_ID}}/context-snapshot.md`:
130
+ - **Section 1 — Bug Brief**: bug description + acceptance criteria + root cause analysis
131
+ - **Section 2 — Affected Files**: full verbatim content of each affected source file
132
+ - **Section 3 — Existing Tests**: full content of related test files
133
+ - **Section 4 — Prizm Context**: relevant TRAPS, RULES from .prizmkit/prizm-docs/
134
+
135
+ **Step 3 — Plan the fix**:
136
+
137
+ Run `/prizmkit-plan` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`:
138
+ - The spec.md should capture: root cause, impact scope, behavior that must be preserved
139
+ - The plan.md Tasks section **MUST start with a reproduction test task** — a test that FAILS with current code (RED state), proving the bug exists
140
+ - Subsequent tasks implement the minimal fix to make the test pass (GREEN state)
141
+ - Resolve any `[NEEDS CLARIFICATION]` markers autonomously — do NOT pause
142
+
143
+ {{IF_BROWSER_INTERACTION}}
144
+ - **Browser Verification**: If the bug is UI-reproducible, plan.md should include browser-based reproduction as an optional verification step
145
+ {{END_IF_BROWSER_INTERACTION}}
146
+
147
+ **DECISION GATE — Fast Path Check**:
148
+ - If plan.md has ≤ 2 tasks AND root cause is obvious → mark `FAST_PATH=true`, skip Phase 3 (Review) later
149
+
150
+ **CP-1**: spec.md and plan.md exist with Tasks section.
151
+
152
+ **Checkpoint update**: Set step `bug-diagnosis-and-plan` to `"completed"`.
153
+
154
+ {{IF_VERIFICATION_MANUAL_OR_HYBRID}}
155
+ **NOTE**: verification_type is '{{VERIFICATION_TYPE}}'. The plan.md MUST also include:
156
+ - Manual Verification Plan section with UAT checklist
157
+ - User Review Required section specifying reviewer and blocking behavior
158
+ {{END_IF_VERIFICATION_MANUAL_OR_HYBRID}}
159
+
160
+ ---
161
+
162
+ ### Phase 2: Implement & Fix
163
+
164
+ **Goal**: Execute the fix plan. Reproduction test goes from RED → GREEN.
165
+
166
+ Run `/prizmkit-implement` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`:
167
+ - Executes plan.md tasks in order (TDD: first task creates failing test, subsequent tasks fix the code)
168
+ - Marks each task `[x]` on completion
169
+ - Runs test suite after each task
170
+ - Uses convergence-based test failure recovery (keep fixing while progress is being made)
171
+
172
+ {{IF_BROWSER_INTERACTION}}
173
+
174
+ **Browser Verification During Implementation**:
175
+ - After each code fix, you may optionally use browser tools to verify the behavior
176
+ - Reproduce the original bug steps and confirm they no longer occur
177
+ - Test related UI flows to ensure no regression
178
+ - Document any manual verification steps in the implementation notes
179
+
180
+ {{END_IF_BROWSER_INTERACTION}}
181
+
182
+ After implement completes, verify:
183
+ 1. All tasks in plan.md are `[x]`
184
+ 2. Reproduction test passes (GREEN)
185
+ 3. Full test suite passes (no regression)
186
+ 4. Each acceptance criterion is met
187
+
188
+ **CP-2**: All tasks complete, reproduction test passes, no regression.
189
+
190
+ **Checkpoint update**: Set step `prizmkit-implement` to `"completed"`.
191
+
192
+ ---
193
+
194
+ ### Phase 3: Review
195
+
196
+ If `FAST_PATH=true` (≤ 2 tasks, obvious root cause), skip this phase entirely.
197
+
198
+ Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`:
199
+ - The skill runs an internal review-fix loop (Reviewer → filter → Dev fix, max 3 rounds) and writes review-report.md
200
+ - If PASS: proceed
201
+ - If NEEDS_FIXES: the skill exhausted its max rounds; log remaining findings and proceed
202
+
203
+ {{IF_BROWSER_INTERACTION}}
204
+
205
+ **Code Review — Browser Verification Check**:
206
+ - Verify that browser-based reproduction steps (if applicable) are clearly documented
207
+ - Confirm that the fix maintains the expected UI behavior for all affected flows
208
+ - Validate that any manual verification steps have been completed successfully
209
+
210
+ {{END_IF_BROWSER_INTERACTION}}
211
+
212
+ **CP-3**: Code review complete, all tests green.
213
+
214
+ **Checkpoint update**: Set step `prizmkit-code-review` to `"completed"`.
215
+
216
+ {{IF_VERIFICATION_MANUAL_OR_HYBRID}}
217
+ **MANUAL VERIFICATION GATE**:
218
+ - After automated review passes, write session-status.json with status="partial", resume_from_phase=4
219
+ - Set bug status to `verifying` and STOP — manual UAT required before commit
220
+ {{END_IF_VERIFICATION_MANUAL_OR_HYBRID}}
221
+
222
+ ---
223
+
224
+ ### Phase 4: Commit & Learn
225
+
226
+ **Bug Fix Documentation Policy**:
227
+ - **DEFAULT**: Run `/prizmkit-retrospective` with structural sync only (Job 1). Skip knowledge injection.
228
+ - **Full retrospective** (Job 1 + Job 2): Only when the fix causes interface signature changes, dependency additions/removals, observable behavior changes, or reveals new TRAPs.
229
+
230
+ **a.** If a new pitfall was discovered (not previously in TRAPS):
231
+ - Update the affected module's TRAPS section in `.prizmkit/prizm-docs/`
232
+ - Format: `- TRAP: <description> | FIX: <solution> | DATE: YYYY-MM-DD`
233
+
234
+ **b.** Run `/prizmkit-retrospective` following the policy above.
235
+ Stage doc changes: `git add .prizmkit/prizm-docs/`
236
+
237
+ **c.** Stage all changed files explicitly (NEVER use `git add -A` or `git add .`):
238
+ ```powershell
239
+ git add <specific-files-modified>
240
+ git add .prizmkit/prizm-docs/
241
+ ```
242
+
243
+ **d.** Run `/prizmkit-committer --headless`:
244
+ - Commit message prefix: `fix({{FIX_SCOPE}}): {{BUG_TITLE}}`
245
+ - Include both fix code and reproduction test
246
+ - Do NOT push
247
+
248
+ **e.** Final verification:
249
+ ```powershell
250
+ git status --short
251
+ ```
252
+ Working tree MUST be clean. If any files remain, amend the commit.
253
+
254
+ **f.** Write fix report to `.prizmkit/bugfix/{{BUG_ID}}/fix-report.md`:
255
+
256
+ The fix-report.md MUST contain:
257
+ - **Bug Resolution Summary**: ID, title, status, phases completed
258
+ - **What Was Fixed**: changes made, diff summary, commit hash
259
+ - **Verification Results**: reproduction test before/after, regression tests, review findings
260
+
261
+ {{IF_BROWSER_INTERACTION}}
262
+ - **Browser Verification Results**: UI flows tested, browser tool used (if any), manual verification steps completed
263
+ {{END_IF_BROWSER_INTERACTION}}
264
+
265
+ - **Knowledge Captured**: TRAPS updated (if any), prevention recommendation
266
+ - **Acceptance Criteria Verification**: checklist with pass/fail for each criterion
267
+
268
+ **Checkpoint update**: Set steps `prizmkit-committer` and `bug-report` to `"completed"`.
269
+
270
+ ---
271
+
272
+ ### Step 3: Report Session Status
273
+
274
+ **CRITICAL**: Before exiting, write the session status file.
275
+
276
+ Write to: `{{SESSION_STATUS_PATH}}`
277
+
278
+ ```json
279
+ {
280
+ "session_id": "{{SESSION_ID}}",
281
+ "bug_id": "{{BUG_ID}}",
282
+ "status": "<success|partial|failed>",
283
+ "completed_phases": [1, 2, 3, 4],
284
+ "current_phase": 4,
285
+ "checkpoint_reached": "CP-4",
286
+ "fast_path": false,
287
+ "errors": [],
288
+ "can_resume": false,
289
+ "resume_from_phase": null,
290
+ "artifacts": {
291
+ "spec_path": ".prizmkit/bugfix/{{BUG_ID}}/spec.md",
292
+ "plan_path": ".prizmkit/bugfix/{{BUG_ID}}/plan.md",
293
+ "fix_report_path": ".prizmkit/bugfix/{{BUG_ID}}/fix-report.md"
294
+ },
295
+ "git_commit": "<commit hash>",
296
+ "traps_updated": false,
297
+ "timestamp": "{{TIMESTAMP}}"
298
+ }
299
+ ```
300
+
301
+ ## Critical Paths
302
+
303
+ | Resource | Path |
304
+ |----------|------|
305
+ | Bug Fix Artifacts Dir | `.prizmkit/bugfix/{{BUG_ID}}/` |
306
+ | Spec | `.prizmkit/bugfix/{{BUG_ID}}/spec.md` |
307
+ | Plan | `.prizmkit/bugfix/{{BUG_ID}}/plan.md` |
308
+ | Fix Report | `.prizmkit/bugfix/{{BUG_ID}}/fix-report.md` |
309
+ | Session Status Output | {{SESSION_STATUS_PATH}} |
310
+ | Project Root | {{PROJECT_ROOT}} |
311
+
312
+ ## Reminders
313
+
314
+ - Use L1 Skills: `/prizmkit-plan`, `/prizmkit-implement`, `/prizmkit-code-review`, `/prizmkit-committer`, `/prizmkit-retrospective`
315
+ - All skills use `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`
316
+ - plan.md first task MUST be reproduction test (RED → GREEN TDD)
317
+ - Commit with `fix(<scope>):` prefix, NOT `feat:`
318
+ - DEFAULT: `/prizmkit-retrospective` structural sync only (Job 1). Full retrospective when fix changes interfaces/dependencies/behavior
319
+ - ALWAYS write session-status.json before exiting
320
+ - Do NOT run `git add`/`git commit` during Phases 1-3 — all committed once in Phase 4
@@ -0,0 +1,237 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Dev-Pipeline Feature List",
4
+ "description": "Schema for .prizmkit/plans/feature-list.json",
5
+ "type": "object",
6
+ "required": [
7
+ "$schema",
8
+ "project_name",
9
+ "features"
10
+ ],
11
+ "properties": {
12
+ "$schema": {
13
+ "type": "string",
14
+ "const": "dev-pipeline-feature-list-v1"
15
+ },
16
+ "project_name": {
17
+ "type": "string",
18
+ "minLength": 1
19
+ },
20
+ "project_description": {
21
+ "type": "string"
22
+ },
23
+ "created_at": {
24
+ "type": "string",
25
+ "format": "date-time"
26
+ },
27
+ "created_by": {
28
+ "type": "string"
29
+ },
30
+ "features": {
31
+ "type": "array",
32
+ "minItems": 1,
33
+ "items": {
34
+ "type": "object",
35
+ "required": [
36
+ "id",
37
+ "title",
38
+ "description",
39
+ "priority",
40
+ "dependencies",
41
+ "acceptance_criteria",
42
+ "status"
43
+ ],
44
+ "properties": {
45
+ "id": {
46
+ "type": "string",
47
+ "pattern": "^F-\\d{3}(-[A-Z])?$",
48
+ "description": "Feature ID, format F-001, F-002... Optional sub-feature suffix: F-001-A"
49
+ },
50
+ "title": {
51
+ "type": "string",
52
+ "minLength": 1,
53
+ "description": "Feature title — brief description of the functionality"
54
+ },
55
+ "description": {
56
+ "type": "string",
57
+ "minLength": 1,
58
+ "description": "Detailed feature description: what it does, why it's needed"
59
+ },
60
+ "priority": {
61
+ "type": "string",
62
+ "enum": [
63
+ "critical",
64
+ "high",
65
+ "medium",
66
+ "low"
67
+ ],
68
+ "description": "Feature priority. Pipeline processes critical before high before medium before low; within same level, array order determines sequence."
69
+ },
70
+ "estimated_complexity": {
71
+ "type": "string",
72
+ "enum": [
73
+ "low",
74
+ "medium",
75
+ "high",
76
+ "critical"
77
+ ],
78
+ "description": "Estimated implementation complexity. Determines pipeline execution tier: low/medium → lite (single agent), high → standard (orchestrator + dev + reviewer), critical → full (full team + critic)."
79
+ },
80
+ "dependencies": {
81
+ "type": "array",
82
+ "items": {
83
+ "type": "string",
84
+ "pattern": "^F-\\d{3}(-[A-Z])?$"
85
+ },
86
+ "description": "IDs of features that must be completed before this one"
87
+ },
88
+ "acceptance_criteria": {
89
+ "type": "array",
90
+ "minItems": 1,
91
+ "items": {
92
+ "type": "string"
93
+ },
94
+ "description": "Conditions that must be met for the feature to be considered complete"
95
+ },
96
+ "status": {
97
+ "type": "string",
98
+ "enum": [
99
+ "pending",
100
+ "in_progress",
101
+ "completed",
102
+ "failed",
103
+ "skipped",
104
+ "split",
105
+ "auto_skipped"
106
+ ],
107
+ "description": "Feature status. Pipeline manages status transitions automatically."
108
+ },
109
+ "session_granularity": {
110
+ "type": "string",
111
+ "enum": [
112
+ "feature",
113
+ "sub_feature",
114
+ "auto"
115
+ ],
116
+ "default": "feature",
117
+ "description": "Session execution strategy: feature=one-session-per-feature, sub_feature=one-session-per-sub-feature, auto=pipeline-decides"
118
+ },
119
+ "sub_features": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "object",
123
+ "required": [
124
+ "id",
125
+ "title",
126
+ "description"
127
+ ],
128
+ "properties": {
129
+ "id": {
130
+ "type": "string",
131
+ "pattern": "^F-\\d{3}-[A-Z]$"
132
+ },
133
+ "title": {
134
+ "type": "string",
135
+ "minLength": 1
136
+ },
137
+ "description": {
138
+ "type": "string",
139
+ "minLength": 1
140
+ }
141
+ }
142
+ }
143
+ },
144
+ "model": {
145
+ "type": "string",
146
+ "description": "AI model ID for this feature. Overrides $MODEL env var."
147
+ },
148
+ "critic": {
149
+ "type": "boolean",
150
+ "description": "Enable adversarial plan challenge before implementation. Default: false.",
151
+ "default": false
152
+ },
153
+ "critic_count": {
154
+ "type": "integer",
155
+ "description": "Number of parallel critic agents. 1 = single critic, 3 = multi-critic voting. Default: 1.",
156
+ "enum": [
157
+ 1,
158
+ 3
159
+ ]
160
+ },
161
+ "completion_notes": {
162
+ "type": "array",
163
+ "items": {
164
+ "type": "string"
165
+ },
166
+ "description": "AI-generated summary of key changes from this feature session. Useful to provide rich dependency context to downstream features. Each item is a concise statement about what was built/changed (e.g. APIs added, models created, key file paths)."
167
+ },
168
+ "user_context": {
169
+ "type": "array",
170
+ "items": { "type": "string" },
171
+ "description": "User-provided supplementary materials, preserved verbatim. Each entry is either inline content/rules (stored as-is) or a file reference (e.g. 'src/auth/login.ts:42-78', 'src/utils/ — focus on validation logic')."
172
+ },
173
+ "browser_interaction": {
174
+ "type": "object",
175
+ "description": "Browser verification config for features with UI. Supports playwright-cli and opencli. AI auto-detects dev server command, URL, and port from project config at runtime.",
176
+ "properties": {
177
+ "tool": {
178
+ "type": "string",
179
+ "enum": ["playwright-cli", "opencli", "auto"],
180
+ "default": "auto",
181
+ "description": "Browser tool to use. 'auto' (default) = AI chooses at runtime. 'playwright-cli' = local dev server verification in isolated browser. 'opencli' = reuses Chrome logged-in session, ideal for verifying third-party integrations or OAuth flows."
182
+ },
183
+ "verify_steps": {
184
+ "type": "array",
185
+ "description": "Verification goals describing WHAT to verify (not HOW). AI decides concrete browser tool actions at runtime based on actual code and snapshot. If omitted, AI explores the app and verifies the feature works.",
186
+ "items": {
187
+ "type": "string"
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ }
194
+ },
195
+ "global_context": {
196
+ "type": "object",
197
+ "properties": {
198
+ "tech_stack": {
199
+ "type": "string"
200
+ },
201
+ "language": {
202
+ "type": "string"
203
+ },
204
+ "runtime": {
205
+ "type": "string"
206
+ },
207
+ "frontend_framework": {
208
+ "type": "string"
209
+ },
210
+ "frontend_styling": {
211
+ "type": "string"
212
+ },
213
+ "backend_framework": {
214
+ "type": "string"
215
+ },
216
+ "database": {
217
+ "type": "string"
218
+ },
219
+ "orm": {
220
+ "type": "string"
221
+ },
222
+ "design_system": {
223
+ "type": "string"
224
+ },
225
+ "testing_strategy": {
226
+ "type": "string"
227
+ },
228
+ "bundler": {
229
+ "type": "string"
230
+ },
231
+ "project_type": {
232
+ "type": "string"
233
+ }
234
+ }
235
+ }
236
+ }
237
+ }