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,91 @@
1
+ ## Workflow Checkpoint System
2
+
3
+ A checkpoint file tracks your progress through this workflow:
4
+
5
+ **Path**: `{{CHECKPOINT_PATH}}`
6
+
7
+ ### Rules
8
+
9
+ 1. **Before each skill**: Read `workflow-checkpoint.json`, verify the previous step has `status: "completed"` or `status: "skipped"`. If it is still `"pending"` or `"in_progress"`, you MUST complete it first before moving on.
10
+
11
+ 2. **Starting a skill**: Use the update script to set the current step to `status: "in_progress"`.
12
+
13
+ 3. **After each skill completes**: Use the update script to set the current step to `status: "completed"`.
14
+
15
+ 4. **On failure**: Use the update script to set the step to `status: "failed"` and continue to the next step if possible, or halt and write failure-log.md.
16
+
17
+ 5. **On session exit**: The checkpoint file reflects your actual progress. Do NOT manually set future steps to "completed".
18
+
19
+ ### Checkpoint Update Pattern
20
+
21
+ **IMPORTANT: NEVER hand-write or edit `workflow-checkpoint.json` directly. Always use the update script.**
22
+
23
+ Define this helper once in the active PowerShell session before running PrizmKit Python scripts:
24
+
25
+ ```powershell
26
+ function Invoke-PrizmPython {
27
+ param([Parameter(ValueFromRemainingArguments = $true)][string[]]$Arguments)
28
+ $python = Get-Command python -ErrorAction SilentlyContinue
29
+ if ($python) {
30
+ & $python.Source -c 'import sys; raise SystemExit(0 if sys.version_info[0] == 3 else 1)' *> $null
31
+ if ($LASTEXITCODE -eq 0) {
32
+ & $python.Source @Arguments
33
+ return
34
+ }
35
+ }
36
+ $py = Get-Command py -ErrorAction SilentlyContinue
37
+ if ($py) {
38
+ & $py.Source -3 -c 'import sys; raise SystemExit(0 if sys.version_info[0] == 3 else 1)' *> $null
39
+ if ($LASTEXITCODE -eq 0) {
40
+ & $py.Source -3 @Arguments
41
+ return
42
+ }
43
+ }
44
+ throw "Python 3 is required. Install Python and ensure python or py is in PATH."
45
+ }
46
+ ```
47
+
48
+ After completing each skill, run:
49
+
50
+ ```powershell
51
+ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py `
52
+ --checkpoint-path {{CHECKPOINT_PATH}} `
53
+ --step <SKILL_NAME> `
54
+ --status completed
55
+ ```
56
+
57
+ For example, after completing `prizmkit-implement`:
58
+ ```powershell
59
+ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py `
60
+ --checkpoint-path {{CHECKPOINT_PATH}} `
61
+ --step prizmkit-implement `
62
+ --status completed
63
+ ```
64
+
65
+ Before starting the next skill:
66
+ ```powershell
67
+ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py `
68
+ --checkpoint-path {{CHECKPOINT_PATH}} `
69
+ --step <NEXT_SKILL_NAME> `
70
+ --status in_progress
71
+ ```
72
+
73
+ On failure:
74
+ ```powershell
75
+ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py `
76
+ --checkpoint-path {{CHECKPOINT_PATH}} `
77
+ --step <SKILL_NAME> `
78
+ --status failed `
79
+ --note "brief failure reason"
80
+ ```
81
+
82
+ The script outputs JSON: `{"ok": true, ...}` on success, `{"ok": false, "error": "..."}` on failure.
83
+
84
+ ### Resume Behavior
85
+
86
+ **Checkpoint is the primary source of truth for resume.** On retry sessions:
87
+
88
+ 1. Read `workflow-checkpoint.json` — steps already `"completed"` or `"skipped"` are skipped
89
+ 2. Start from the first `"pending"` or `"in_progress"` step
90
+ 3. If `failure-log.md` exists, read it for diagnostic context (the previous session failure reason, what approach to try differently) — but do NOT use it to determine the step to resume from
91
+ 4. If `workflow-checkpoint.json` is missing or corrupted, fall back to `failure-log.md` + the resume phase as the legacy mechanism
@@ -0,0 +1,33 @@
1
+ ## Context Budget Rules (CRITICAL — read before any phase)
2
+
3
+ You are running in **headless non-interactive mode** with a FINITE context window. Exceeding it will crash the session and lose all work. Follow these rules strictly:
4
+
5
+ 0. **NON-INTERACTIVE MODE** — There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input, NEVER use interactive prompts (e.g. "Would you like me to…"). If a skill has an interactive step (e.g. offer remediation, ask for approval), skip it and proceed autonomously. Make decisions based on the data available and move forward.
6
+
7
+ 1. **context-snapshot.md is your single source of truth** — After it is built, ALWAYS read context-snapshot.md instead of re-reading individual source files
8
+ 2. **Never re-read your own writes** — After you create/modify a file, do NOT read it back to verify. Trust your write was correct.
9
+ 3. **Stay focused** — Do NOT explore code unrelated to this feature. No curiosity-driven reads.
10
+ 4. **One task at a time** — Complete and test one task before starting the next.
11
+ 5. **Minimize tool output** — Never load full command output into context. First capture to a temp file (`cmd 2>&1 | Tee-Object (Join-Path $env:TEMP "out.txt") | Select-Object -Last 20`), then scan the head/tail to identify relevant fields, and use targeted filtering (`Select-String`, `filtering`, `PowerShell object filtering`) to extract only the information needed for the current task. Only read the filtered result — never the raw full output.
12
+ 6. **No intermediate commits** — Do NOT run `git add`/`git commit` during implementation phases. All changes are committed once at the end via `/prizmkit-committer`.
13
+ 7. **Capture test output once** — When running test suites, always use `& { {{TEST_CMD}} } 2>&1 | Tee-Object (Join-Path $env:TEMP "test-out.txt") | Select-Object -Last 20`. Then Select-String (Join-Path $env:TEMP "test-out.txt") for details. Never re-run the suite just to apply a different filter.
14
+ 8. **Scaffold / generated file awareness (CRITICAL)** — When you run a scaffolding tool or package manager init command (`npm init`, `npx create-*`, `vite create`, `cargo init`, `go mod init`, `rails new`, `django-admin startproject`, `npx shadcn-ui init`, etc.), the output files are **generated boilerplate**. You MUST:
15
+ - Identify and mentally tag all files created by the tool as "scaffold files"
16
+ - Record the list of scaffold-generated files in context-snapshot.md under a `### Scaffold Files (do not re-read)` section
17
+ - **NEVER re-read scaffold files** after initial creation. Their content is standard boilerplate — you already know what they contain from the tool that generated them
18
+ - If you need to modify a scaffold file, make the edit directly without reading it first (you know the standard template content)
19
+ - This applies equally to `node_modules/`, `package-lock.json`, generated config files (`tsconfig.json`, `vite.config.ts`, `tailwind.config.js`, `.eslintrc`, etc.) produced by init commands
20
+ - When passing context to subagents, explicitly tell them the scaffold-generated files so they skip reading them too
21
+ 9. **Package version verification (HARD CONSTRAINT — BLOCKING)** — Before writing ANY dependency version in `package.json`, `requirements.txt`, `Cargo.toml`, `go.mod`, `Gemfile`, `pyproject.toml`, or any other dependency manifest:
22
+ - You MUST verify the real version exists by querying the package registry first:
23
+ - npm/Node.js: `npm view <package> dist-tags.latest 2>$null`
24
+ - Python/pip: `pip index versions <package> 2>$null | Select-Object -First 1`
25
+ - Go: `go list -m -versions <module>@latest 2>$null`
26
+ - Rust: `cargo search <crate> --limit 1 2>$null`
27
+ - **NEVER guess or hallucinate version numbers**. If you cannot verify a version, use `"latest"` or `"*"` as a placeholder, or omit the version constraint entirely and let the package manager resolve it
28
+ - If the registry query fails (network issue, package not found), you MUST either:
29
+ (a) Use a known-safe version you have high confidence in, OR
30
+ (b) Skip that dependency and document it as a manual step, OR
31
+ (c) Use no version constraint (e.g., `"express": "*"`)
32
+ - **This is a BLOCKING gate**: do NOT run `npm install` / `pip install` / `cargo build` / `go mod tidy` until ALL versions in the manifest have been verified or use open constraints
33
+ - Batch version lookups: query multiple packages in parallel to save time (e.g., run multiple `npm view` commands concurrently)
@@ -0,0 +1,10 @@
1
+ ## Critical Paths
2
+
3
+ | Resource | Path |
4
+ |----------|------|
5
+ | Feature Artifacts Dir | `.prizmkit/specs/{{FEATURE_SLUG}}/` |
6
+ | Context Snapshot | `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` |
7
+ | Dev Agent Def | {{DEV_SUBAGENT_PATH}} |
8
+ | Reviewer Agent Def | {{REVIEWER_SUBAGENT_PATH}} |
9
+ | Critic Agent Def (if enabled) | {{CRITIC_SUBAGENT_PATH}} |
10
+ | Project Root | {{PROJECT_ROOT}} |
@@ -0,0 +1,12 @@
1
+ ## Critical Paths
2
+
3
+ | Resource | Path |
4
+ |----------|------|
5
+ | Feature Artifacts Dir | `.prizmkit/specs/{{FEATURE_SLUG}}/` |
6
+ | Context Snapshot | `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` |
7
+ | Team Config | `{{TEAM_CONFIG_PATH}}` |
8
+ | Dev Agent Def | {{DEV_SUBAGENT_PATH}} |
9
+ | Reviewer Agent Def | {{REVIEWER_SUBAGENT_PATH}} |
10
+ | Critic Agent Def | {{CRITIC_SUBAGENT_PATH}} |
11
+ | Project Root | {{PROJECT_ROOT}} |
12
+ | Feature List Path | {{FEATURE_LIST_PATH}} |
@@ -0,0 +1,7 @@
1
+ ## Critical Paths
2
+
3
+ | Resource | Path |
4
+ |----------|------|
5
+ | Feature Artifacts Dir | `.prizmkit/specs/{{FEATURE_SLUG}}/` |
6
+ | Context Snapshot | `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` |
7
+ | Project Root | {{PROJECT_ROOT}} |
@@ -0,0 +1,8 @@
1
+ ## PrizmKit Directory Convention
2
+
3
+ ```
4
+ .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← orchestrator writes Sections 1-4; Dev appends Implementation Log; Reviewer appends Review Notes
5
+ .prizmkit/specs/{{FEATURE_SLUG}}/plan.md ← includes Tasks section
6
+ ```
7
+
8
+ **`context-snapshot.md`** is the shared knowledge base. Orchestrator writes Sections 1-4; Dev appends Implementation Log; Reviewer appends Review Notes. Append-only after initial creation.
@@ -0,0 +1,9 @@
1
+ ## PrizmKit Directory Convention
2
+
3
+ ```
4
+ .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← orchestrator writes Sections 1-4; Dev appends Implementation Log; Reviewer appends Review Notes
5
+ .prizmkit/specs/{{FEATURE_SLUG}}/spec.md
6
+ .prizmkit/specs/{{FEATURE_SLUG}}/plan.md ← includes Tasks section
7
+ ```
8
+
9
+ **`context-snapshot.md`** is the shared knowledge base. Orchestrator writes Sections 1-4; Dev appends Implementation Log; Reviewer appends Review Notes. This eliminates redundant I/O across all agents.
@@ -0,0 +1,6 @@
1
+ ## PrizmKit Directory Convention
2
+
3
+ ```
4
+ .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md
5
+ .prizmkit/specs/{{FEATURE_SLUG}}/plan.md ← includes Tasks section
6
+ ```
@@ -0,0 +1,21 @@
1
+ ## Failure Capture Protocol
2
+
3
+ If you encounter an unrecoverable error, context overflow, or are about to exit without completing all phases:
4
+
5
+ 1. Write `.prizmkit/specs/{{FEATURE_SLUG}}/failure-log.md` BEFORE exiting:
6
+ ```
7
+ FAILURE_TYPE: timeout | test_failure | review_rejected | context_overflow | unknown
8
+ PHASE: <failed phase>
9
+ ROOT_CAUSE: <1-2 sentence explanation>
10
+ ATTEMPTED: <approaches already tried>
11
+ SUGGESTION: <what the next session should try differently>
12
+ DISCOVERED_TRAPS:
13
+ - [CRITICAL|HIGH|LOW] <gotcha discovered during this failed session> | FIX: <approach>
14
+ ```
15
+
16
+ 2. This file is intentionally lightweight — write it BEFORE context runs out.
17
+
18
+ **Lifecycle**: failure-log.md is a temporary cross-session artifact. Do NOT commit it to git. After a successful session (all phases complete + commit done), delete it:
19
+ ```powershell
20
+ Remove-Item -Force -ErrorAction SilentlyContinue .prizmkit/specs/{{FEATURE_SLUG}}/failure-log.md
21
+ ```
@@ -0,0 +1,31 @@
1
+ <feature-context>
2
+ ### Feature Description
3
+
4
+ {{FEATURE_DESCRIPTION}}
5
+
6
+ {{USER_CONTEXT}}
7
+
8
+ ### Acceptance Criteria
9
+
10
+ {{ACCEPTANCE_CRITERIA}}
11
+
12
+ ### Project Brief
13
+
14
+ > Product ideas checklist from planning. Lines marked [x] are already implemented. When your feature touches any [ ] item, ensure alignment. After implementation, mark relevant items [x] and append the key file/directory paths.
15
+
16
+ {{PROJECT_BRIEF}}
17
+
18
+ ### Dependencies (Already Completed)
19
+
20
+ > Below are features that this feature depends on, along with their key implementation notes. Use this context to understand what has already been built and what interfaces/APIs/models are available.
21
+
22
+ {{COMPLETED_DEPENDENCIES}}
23
+
24
+ ### App Global Context
25
+
26
+ {{GLOBAL_CONTEXT}}
27
+
28
+ ### Project Conventions
29
+
30
+ > Read {{PLATFORM_CONVENTIONS}} for project-level coding standards, architecture decisions, and development rules. Follow these conventions throughout implementation.
31
+ </feature-context>
@@ -0,0 +1,72 @@
1
+ ### Browser Verification — MANDATORY
2
+
3
+ You MUST execute this phase. Use native PowerShell commands for setup, server lifecycle, and cleanup.
4
+
5
+ **Tool readiness**:
6
+ ```powershell
7
+ $playwright = Get-Command playwright-cli -ErrorAction SilentlyContinue
8
+ $opencli = Get-Command opencli -ErrorAction SilentlyContinue
9
+ if ($playwright) { playwright-cli --version } else { "PLAYWRIGHT_CLI:NOT_INSTALLED" }
10
+ if ($opencli) { opencli --version } else { "OPENCLI:NOT_INSTALLED" }
11
+ ```
12
+
13
+ If neither browser tool is available, install playwright-cli as the default:
14
+ ```powershell
15
+ npm install -g @playwright/cli@latest
16
+ playwright-cli --version
17
+ ```
18
+
19
+ **Choose the tool**:
20
+ - Use `playwright-cli` for isolated local dev-server verification.
21
+ - Use `opencli` when the scenario needs an existing Chrome login/session.
22
+ - If opencli is selected, verify connectivity with `opencli doctor` before browser actions.
23
+
24
+ **Dev server setup**:
25
+ ```powershell
26
+ $DEV_PORT = "{{DEV_PORT}}"
27
+ if ($DEV_PORT -eq "{{DEV_PORT}}") {
28
+ $detected = node -e "const p=require('./package.json'); const s = p.scripts ? p.scripts.dev : ''; const m=s.match(/-p\s+(\d+)/); console.log(m?m[1]:'')"
29
+ if ($detected) { $DEV_PORT = $detected } else { $DEV_PORT = "3000" }
30
+ }
31
+ "Detected DEV_PORT=$DEV_PORT"
32
+ $portBusy = Get-NetTCPConnection -LocalPort ([int]$DEV_PORT) -ErrorAction SilentlyContinue
33
+ if ($portBusy) { "PORT_IN_USE" } else { "PORT_FREE" }
34
+
35
+ # Replace <start-command> with the project-specific dev command.
36
+ $server = Start-Process -FilePath "powershell" -ArgumentList @("-NoProfile", "-Command", "<start-command>") -PassThru
37
+ $DEV_SERVER_PID = $server.Id
38
+ ```
39
+
40
+ Wait for readiness:
41
+ ```powershell
42
+ $ready = $false
43
+ for ($i = 0; $i -lt 15; $i++) {
44
+ try {
45
+ $response = Invoke-WebRequest -Uri "http://localhost:$DEV_PORT" -UseBasicParsing -TimeoutSec 2
46
+ if ($response.StatusCode -in @(200, 302)) { $ready = $true; break }
47
+ } catch { Start-Sleep -Seconds 2 }
48
+ }
49
+ if (-not $ready) { "DEV_SERVER_NOT_READY" }
50
+ ```
51
+
52
+ **Verification goals**:
53
+ {{BROWSER_VERIFY_STEPS}}
54
+
55
+ Use the selected browser tool to inspect current page state, perform actions, and take a final screenshot:
56
+ - `playwright-cli open http://localhost:$DEV_PORT`, `playwright-cli snapshot`, `playwright-cli screenshot`, `playwright-cli close`
57
+ - `opencli browser open http://localhost:$DEV_PORT`, `opencli browser state`, `opencli browser screenshot`, `opencli browser close`
58
+
59
+ **Cleanup**:
60
+ ```powershell
61
+ if ($DEV_SERVER_PID) { Stop-Process -Id $DEV_SERVER_PID -Force -ErrorAction SilentlyContinue }
62
+ Get-NetTCPConnection -LocalPort ([int]$DEV_PORT) -ErrorAction SilentlyContinue |
63
+ Select-Object -ExpandProperty OwningProcess -Unique |
64
+ ForEach-Object { Stop-Process -Id $_ -Force -ErrorAction SilentlyContinue }
65
+ ```
66
+
67
+ Append results to `context-snapshot.md` with tool, URL, commands used, screenshot path, PASS/FAIL reason, and cleanup status.
68
+
69
+ **Checkpoint update**:
70
+ ```powershell
71
+ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py --checkpoint-path {{CHECKPOINT_PATH}} --step browser-verification --status completed
72
+ ```
@@ -0,0 +1,63 @@
1
+ ### Browser Verification (opencli) — MANDATORY
2
+
3
+ You MUST execute this phase with `opencli browser`. Use native PowerShell commands for setup, server lifecycle, and cleanup.
4
+
5
+ **Readiness**:
6
+ ```powershell
7
+ $opencli = Get-Command opencli -ErrorAction SilentlyContinue
8
+ if ($opencli) { opencli --version } else { "OPENCLI:NOT_INSTALLED" }
9
+ opencli doctor
10
+ ```
11
+
12
+ If opencli is not available, install it:
13
+ ```powershell
14
+ npm install -g @jackwener/opencli@latest
15
+ opencli --version
16
+ ```
17
+
18
+ **Dev server setup**:
19
+ ```powershell
20
+ $DEV_PORT = "{{DEV_PORT}}"
21
+ if ($DEV_PORT -eq "{{DEV_PORT}}") {
22
+ $detected = node -e "const p=require('./package.json'); const s = p.scripts ? p.scripts.dev : ''; const m=s.match(/-p\s+(\d+)/); console.log(m?m[1]:'')"
23
+ if ($detected) { $DEV_PORT = $detected } else { $DEV_PORT = "3000" }
24
+ }
25
+ "Detected DEV_PORT=$DEV_PORT"
26
+ $portBusy = Get-NetTCPConnection -LocalPort ([int]$DEV_PORT) -ErrorAction SilentlyContinue
27
+ if ($portBusy) { "PORT_IN_USE" } else { "PORT_FREE" }
28
+ $server = Start-Process -FilePath "powershell" -ArgumentList @("-NoProfile", "-Command", "<start-command>") -PassThru
29
+ $DEV_SERVER_PID = $server.Id
30
+ ```
31
+
32
+ Wait for readiness:
33
+ ```powershell
34
+ $ready = $false
35
+ for ($i = 0; $i -lt 15; $i++) {
36
+ try {
37
+ $response = Invoke-WebRequest -Uri "http://localhost:$DEV_PORT" -UseBasicParsing -TimeoutSec 2
38
+ if ($response.StatusCode -in @(200, 302)) { $ready = $true; break }
39
+ } catch { Start-Sleep -Seconds 2 }
40
+ }
41
+ if (-not $ready) { "DEV_SERVER_NOT_READY" }
42
+ ```
43
+
44
+ **Verification goals**:
45
+ {{BROWSER_VERIFY_STEPS}}
46
+
47
+ Use `opencli browser open http://localhost:$DEV_PORT`, `opencli browser state`, indexed interaction commands from `opencli browser --help`, and `opencli browser screenshot`.
48
+
49
+ **Cleanup**:
50
+ ```powershell
51
+ opencli browser close
52
+ if ($DEV_SERVER_PID) { Stop-Process -Id $DEV_SERVER_PID -Force -ErrorAction SilentlyContinue }
53
+ Get-NetTCPConnection -LocalPort ([int]$DEV_PORT) -ErrorAction SilentlyContinue |
54
+ Select-Object -ExpandProperty OwningProcess -Unique |
55
+ ForEach-Object { Stop-Process -Id $_ -Force -ErrorAction SilentlyContinue }
56
+ ```
57
+
58
+ Append results to `context-snapshot.md` with URL, command used, opencli version, steps executed, screenshot path, PASS/FAIL reason, and cleanup status.
59
+
60
+ **Checkpoint update**:
61
+ ```powershell
62
+ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py --checkpoint-path {{CHECKPOINT_PATH}} --step browser-verification --status completed
63
+ ```
@@ -0,0 +1,62 @@
1
+ ### Browser Verification (playwright-cli) — MANDATORY
2
+
3
+ You MUST execute this phase with `playwright-cli`. Use native PowerShell commands for setup, server lifecycle, and cleanup.
4
+
5
+ **Readiness**:
6
+ ```powershell
7
+ $playwright = Get-Command playwright-cli -ErrorAction SilentlyContinue
8
+ if ($playwright) { playwright-cli --version } else { "PLAYWRIGHT_CLI:NOT_INSTALLED" }
9
+ ```
10
+
11
+ If playwright-cli is not available, install it:
12
+ ```powershell
13
+ npm install -g @playwright/cli@latest
14
+ playwright-cli --version
15
+ ```
16
+
17
+ **Dev server setup**:
18
+ ```powershell
19
+ $DEV_PORT = "{{DEV_PORT}}"
20
+ if ($DEV_PORT -eq "{{DEV_PORT}}") {
21
+ $detected = node -e "const p=require('./package.json'); const s = p.scripts ? p.scripts.dev : ''; const m=s.match(/-p\s+(\d+)/); console.log(m?m[1]:'')"
22
+ if ($detected) { $DEV_PORT = $detected } else { $DEV_PORT = "3000" }
23
+ }
24
+ "Detected DEV_PORT=$DEV_PORT"
25
+ $portBusy = Get-NetTCPConnection -LocalPort ([int]$DEV_PORT) -ErrorAction SilentlyContinue
26
+ if ($portBusy) { "PORT_IN_USE" } else { "PORT_FREE" }
27
+ $server = Start-Process -FilePath "powershell" -ArgumentList @("-NoProfile", "-Command", "<start-command>") -PassThru
28
+ $DEV_SERVER_PID = $server.Id
29
+ ```
30
+
31
+ Wait for readiness:
32
+ ```powershell
33
+ $ready = $false
34
+ for ($i = 0; $i -lt 15; $i++) {
35
+ try {
36
+ $response = Invoke-WebRequest -Uri "http://localhost:$DEV_PORT" -UseBasicParsing -TimeoutSec 2
37
+ if ($response.StatusCode -in @(200, 302)) { $ready = $true; break }
38
+ } catch { Start-Sleep -Seconds 2 }
39
+ }
40
+ if (-not $ready) { "DEV_SERVER_NOT_READY" }
41
+ ```
42
+
43
+ **Verification goals**:
44
+ {{BROWSER_VERIFY_STEPS}}
45
+
46
+ Use `playwright-cli open http://localhost:$DEV_PORT`, `playwright-cli snapshot`, interaction commands from `playwright-cli --help`, and `playwright-cli screenshot`.
47
+
48
+ **Cleanup**:
49
+ ```powershell
50
+ playwright-cli close
51
+ if ($DEV_SERVER_PID) { Stop-Process -Id $DEV_SERVER_PID -Force -ErrorAction SilentlyContinue }
52
+ Get-NetTCPConnection -LocalPort ([int]$DEV_PORT) -ErrorAction SilentlyContinue |
53
+ Select-Object -ExpandProperty OwningProcess -Unique |
54
+ ForEach-Object { Stop-Process -Id $_ -Force -ErrorAction SilentlyContinue }
55
+ ```
56
+
57
+ Append results to `context-snapshot.md` with URL, command used, playwright-cli version, steps executed, screenshot path, PASS/FAIL reason, and cleanup status.
58
+
59
+ **Checkpoint update**:
60
+ ```powershell
61
+ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py --checkpoint-path {{CHECKPOINT_PATH}} --step browser-verification --status completed
62
+ ```
@@ -0,0 +1,71 @@
1
+ ### Architecture Sync & Commit (SINGLE COMMIT) — DO NOT SKIP
2
+
3
+ **a.** Check if feature already committed:
4
+ ```powershell
5
+ git log --oneline | Select-String "{{FEATURE_ID}}" | Select-Object -First 3
6
+ ```
7
+ - If a commit for `{{FEATURE_ID}}` already exists → **skip d** (do NOT run /prizmkit-committer, do NOT run git reset, do NOT stage or unstage anything). Proceed directly to e Final verification.
8
+ - If no existing commit → proceed normally with b–d.
9
+
10
+ **b.** Run `/prizmkit-retrospective` (**before commit**, maintains `.prizmkit/prizm-docs/` architecture index):
11
+ 1. **Structural sync**: update KEY_FILES/INTERFACES/DEPENDENCIES/file counts for changed modules
12
+ 2. **Architecture knowledge**: extract TRAPS, RULES, DECISIONS from completed work into `.prizmkit/prizm-docs/`
13
+ 3. **L2 coverage check**: For any module/sub-module with source files created or significantly modified in this session but no L2 `.prizm` doc — evaluate whether L2 is warranted and create if so. The current session has the best context for accurate KEY_FILES, TRAPS, and DECISIONS.
14
+ 4. Stage doc changes: `git add .prizmkit/prizm-docs/`
15
+ ⚠️ Do NOT commit here. Only stage.
16
+
17
+ **c.** Stage all feature code explicitly (NEVER use `git add -A` or `git add .`):
18
+ ```powershell
19
+ git add <specific-files-created-or-modified>
20
+ git add .prizmkit/prizm-docs/
21
+ ```
22
+
23
+ **d.** Run `/prizmkit-committer` → THE ONLY commit for this feature:
24
+ `feat({{FEATURE_ID}}): {{FEATURE_TITLE}}`
25
+ This single commit includes: feature code + tests + .prizmkit/prizm-docs/ updates. Do NOT push.
26
+ - MANDATORY: commit must be done via `/prizmkit-committer` skill. Do NOT run manual `git add`/`git commit` as a substitute.
27
+ - Do NOT run `update-feature-status.py` here — the pipeline runner handles feature-list.json updates automatically after session exit.
28
+
29
+ **e.** Final verification:
30
+ ```powershell
31
+ git status --short
32
+ ```
33
+ Working tree MUST be clean after this step. If any feature-related files remain, stage them into the SAME commit via `git add <file>; git commit --amend --no-edit`, do NOT create a separate commit.
34
+
35
+ **f.** Write completion summary for downstream dependency context:
36
+
37
+ Write `.prizmkit/specs/{{FEATURE_SLUG}}/completion-summary.json` with the key changes from this session. This file is NOT committed to git — the pipeline runner reads it to propagate context to dependent features.
38
+
39
+ ```json
40
+ {
41
+ "completion_notes": [
42
+ "<each item: one key change, API, model, or integration point that downstream features may need>",
43
+ "Example: Added User model (id, email, password_hash, display_name) in prisma/schema.prisma",
44
+ "Example: POST /api/auth/register and POST /api/auth/login endpoints in src/api/auth.ts",
45
+ "Example: Auth middleware in src/middleware/auth.ts — validates JWT on protected routes"
46
+ ]
47
+ }
48
+ ```
49
+
50
+ Rules for writing completion notes:
51
+ - Focus on **what downstream features need to know**: new APIs, models, exported functions, key file paths
52
+ - Each note should be self-contained and concise (one line, under 120 characters preferred)
53
+ - Include 3-8 notes covering the most important changes
54
+ - Do NOT include test files, config changes, or internal implementation details unless they affect other features
55
+ - If this feature has no downstream dependents, still write the summary (it serves as documentation)
56
+
57
+
58
+ **Checkpoint update**: After `/prizmkit-retrospective` completes, run the update script to set step `prizmkit-retrospective` to `"completed"`:
59
+ ```powershell
60
+ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py `
61
+ --checkpoint-path {{CHECKPOINT_PATH}} `
62
+ --step prizmkit-retrospective `
63
+ --status completed
64
+ ```
65
+ After `/prizmkit-committer` completes, set step `prizmkit-committer` to `"completed"`:
66
+ ```powershell
67
+ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py `
68
+ --checkpoint-path {{CHECKPOINT_PATH}} `
69
+ --step prizmkit-committer `
70
+ --status completed
71
+ ```
@@ -0,0 +1,64 @@
1
+ ### Architecture Sync & Commit (SINGLE COMMIT)
2
+
3
+ **a.** Run `/prizmkit-retrospective` — maintains `.prizmkit/prizm-docs/` (architecture index):
4
+ 1. **Structural sync**: Use `git diff --cached --name-status` to locate changed modules, update KEY_FILES/INTERFACES/DEPENDENCIES/file counts in affected `.prizmkit/prizm-docs/` files
5
+ 2. **Architecture knowledge** (feature sessions only): Extract TRAPS/RULES/DECISIONS from completed work into `.prizmkit/prizm-docs/`
6
+ 3. **L2 coverage check**: For any module/sub-module with source files created or significantly modified in this session but no L2 `.prizm` doc — evaluate whether L2 is warranted and create if so. The current session has the best context for accurate KEY_FILES, TRAPS, and DECISIONS.
7
+ 4. Stage doc changes: `git add .prizmkit/prizm-docs/`
8
+ ⚠️ Do NOT commit here. Only stage.
9
+
10
+ **b.** Stage all feature code explicitly (NEVER use `git add -A` or `git add .`):
11
+ ```powershell
12
+ git add <specific-files-created-or-modified>
13
+ git add .prizmkit/prizm-docs/
14
+ ```
15
+
16
+ **c.** Run `/prizmkit-committer` → THE ONLY commit for this feature:
17
+ `feat({{FEATURE_ID}}): {{FEATURE_TITLE}}`
18
+ This single commit includes: feature code + tests + .prizmkit/prizm-docs/ updates. Do NOT push.
19
+ - MANDATORY: commit must be done via `/prizmkit-committer` skill. Do NOT run manual `git add`/`git commit` as a substitute.
20
+ - Do NOT run `update-feature-status.py` here — the pipeline runner handles feature-list.json updates automatically after session exit.
21
+
22
+ **d.** Final verification:
23
+ ```powershell
24
+ git status --short
25
+ ```
26
+ Working tree MUST be clean after this step. If any feature-related files remain, stage them into the SAME commit via `git add <file>; git commit --amend --no-edit`, do NOT create a separate commit.
27
+
28
+ **e.** Write completion summary for downstream dependency context:
29
+
30
+ Write `.prizmkit/specs/{{FEATURE_SLUG}}/completion-summary.json` with the key changes from this session. This file is NOT committed to git — the pipeline runner reads it to propagate context to dependent features.
31
+
32
+ ```json
33
+ {
34
+ "completion_notes": [
35
+ "<each item: one key change, API, model, or integration point that downstream features may need>",
36
+ "Example: Added User model (id, email, password_hash, display_name) in prisma/schema.prisma",
37
+ "Example: POST /api/auth/register and POST /api/auth/login endpoints in src/api/auth.ts",
38
+ "Example: Auth middleware in src/middleware/auth.ts — validates JWT on protected routes"
39
+ ]
40
+ }
41
+ ```
42
+
43
+ Rules for writing completion notes:
44
+ - Focus on **what downstream features need to know**: new APIs, models, exported functions, key file paths
45
+ - Each note should be self-contained and concise (one line, under 120 characters preferred)
46
+ - Include 3-8 notes covering the most important changes
47
+ - Do NOT include test files, config changes, or internal implementation details unless they affect other features
48
+ - If this feature has no downstream dependents, still write the summary (it serves as documentation)
49
+
50
+
51
+ **Checkpoint update**: After `/prizmkit-retrospective` completes, run the update script to set step `prizmkit-retrospective` to `"completed"`:
52
+ ```powershell
53
+ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py `
54
+ --checkpoint-path {{CHECKPOINT_PATH}} `
55
+ --step prizmkit-retrospective `
56
+ --status completed
57
+ ```
58
+ After `/prizmkit-committer` completes, set step `prizmkit-committer` to `"completed"`:
59
+ ```powershell
60
+ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py `
61
+ --checkpoint-path {{CHECKPOINT_PATH}} `
62
+ --step prizmkit-committer `
63
+ --status completed
64
+ ```
@@ -0,0 +1,23 @@
1
+ - **Section 3 — Prizm Context**: full content of root.prizm and relevant L1/L2 docs
2
+ - **Section 4 — File Manifest**: For each file relevant to this feature, list: file path, why it's needed (modify/reference/test), key interface signatures (function names + params + return types). Do NOT include full file content — agents read files on-demand. Format:
3
+ ### Files to Modify
4
+ | File | Why Needed | Key Interfaces |
5
+ |------|-----------|----------------|
6
+ | `<source-dir>/config.js` | Add runtime config layer | `config` (Zod object), `configSchema` |
7
+
8
+ ### Files for Reference
9
+ | File | Why Needed | Key Interfaces |
10
+ |------|-----------|----------------|
11
+ | `<source-dir>/security/permission-guard.js` | Permission check integration | `checkCommandPermission(userId, cmd)` |
12
+
13
+ ### Known TRAPS (from .prizmkit/prizm-docs/)
14
+ - <trap entries extracted from L1/L2 docs>
15
+
16
+
17
+ **Checkpoint update**: Run the update script to set step `context-snapshot` to `"completed"`:
18
+ ```powershell
19
+ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py `
20
+ --checkpoint-path {{CHECKPOINT_PATH}} `
21
+ --step context-snapshot `
22
+ --status completed
23
+ ```
@@ -0,0 +1,24 @@
1
+ ### Build Context Snapshot
2
+
3
+ ```powershell
4
+ if (Test-Path .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md) { "EXISTS" } else { "MISSING" }
5
+ ```
6
+
7
+ If MISSING — build it now:
8
+ 1. Read `.prizmkit/prizm-docs/root.prizm` and relevant L1/L2 prizm docs
9
+ 2. Detect source code directories: read KEY_FILES and STRUCTURE sections from `root.prizm` to identify where source code lives (e.g. `src/`, `app/`, `lib/`, `cmd/`, `packages/`, or project root). If `root.prizm` is missing, scan the project tree:
10
+ ```powershell
11
+ Get-ChildItem -Path . -File -Recurse -Depth 2 -Include *.js,*.ts,*.py,*.go,*.java,*.rb,*.rs -ErrorAction SilentlyContinue |
12
+ Where-Object { $_.FullName -notmatch '\\(node_modules|\.git|dist|build|vendor)(\\|$)' } |
13
+ Select-Object -First 30 -ExpandProperty FullName
14
+ ```
15
+ Identify the top-level source directories from the results.
16
+ 3. Scan the detected source directories for files related to this feature; read each one
17
+ 4. Write `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`:
18
+ - **Section 1 — Feature Brief**: feature description + acceptance criteria (copy from above)
19
+ - **Section 2 — Project Structure**: run the following to get a visual directory tree, then paste output:
20
+ ```powershell
21
+ Get-ChildItem -Path . -Directory -Recurse -Depth 2 -ErrorAction SilentlyContinue |
22
+ Where-Object { $_.FullName -notmatch '\\(node_modules|\.git|dist|build|__pycache__|vendor)(\\|$)' } |
23
+ Select-Object -ExpandProperty FullName
24
+ ```
@@ -0,0 +1,12 @@
1
+ - **Section 3 — Prizm Context**: content of root.prizm and relevant L1/L2 docs
2
+ - **Section 4 — Existing Source Files**: **full verbatim content** of each related file in fenced code blocks (with `### path/to/file` heading and line count). Include ALL files needed for implementation and review — downstream phases read this section instead of re-reading individual source files
3
+ - **Section 5 — Existing Tests**: full content of related test files as code block
4
+
5
+
6
+ **Checkpoint update**: Run the update script to set step `context-snapshot` to `"completed"`:
7
+ ```powershell
8
+ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py `
9
+ --checkpoint-path {{CHECKPOINT_PATH}} `
10
+ --step context-snapshot `
11
+ --status completed
12
+ ```