prizmkit 1.1.7 → 1.1.9

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 (132) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/codebuddy/skill-adapter.js +21 -7
  3. package/bundled/agents/prizm-dev-team-reviewer.md +53 -173
  4. package/bundled/dev-pipeline/.env.example +45 -0
  5. package/bundled/dev-pipeline/README.md +64 -64
  6. package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +535 -0
  7. package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
  8. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +64 -18
  9. package/bundled/dev-pipeline/launch-feature-daemon.sh +15 -12
  10. package/bundled/dev-pipeline/launch-refactor-daemon.sh +64 -18
  11. package/bundled/dev-pipeline/lib/branch.sh +6 -1
  12. package/bundled/dev-pipeline/lib/common.sh +71 -0
  13. package/bundled/dev-pipeline/lib/heartbeat.sh +2 -2
  14. package/bundled/dev-pipeline/reset-bug.sh +10 -9
  15. package/bundled/dev-pipeline/reset-feature.sh +9 -8
  16. package/bundled/dev-pipeline/reset-refactor.sh +10 -9
  17. package/bundled/dev-pipeline/retry-bugfix.sh +67 -29
  18. package/bundled/dev-pipeline/retry-feature.sh +54 -18
  19. package/bundled/dev-pipeline/retry-refactor.sh +112 -29
  20. package/bundled/dev-pipeline/run-bugfix.sh +281 -59
  21. package/bundled/dev-pipeline/run-feature.sh +53 -18
  22. package/bundled/dev-pipeline/run-refactor.sh +392 -66
  23. package/bundled/dev-pipeline/scripts/check-session-status.py +24 -1
  24. package/bundled/dev-pipeline/scripts/cleanup-logs.py +2 -2
  25. package/bundled/dev-pipeline/scripts/detect-stuck.py +195 -85
  26. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +57 -33
  27. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +25 -9
  28. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +104 -17
  29. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +34 -9
  30. package/bundled/dev-pipeline/scripts/init-pipeline.py +10 -10
  31. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +19 -8
  32. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -5
  33. package/bundled/dev-pipeline/scripts/patch-completion-notes.py +191 -0
  34. package/bundled/dev-pipeline/scripts/update-bug-status.py +167 -22
  35. package/bundled/dev-pipeline/scripts/update-feature-status.py +104 -62
  36. package/bundled/dev-pipeline/scripts/update-refactor-status.py +351 -21
  37. package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +1 -1
  38. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +7 -11
  39. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +41 -7
  40. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +27 -3
  41. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +43 -19
  42. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +54 -26
  43. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +6 -15
  44. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +36 -25
  45. package/bundled/dev-pipeline/templates/feature-list-schema.json +109 -31
  46. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +270 -0
  47. package/bundled/dev-pipeline/templates/refactor-list-schema.json +11 -3
  48. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +3 -1
  49. package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +1 -0
  50. package/bundled/dev-pipeline/templates/sections/feature-context.md +2 -0
  51. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +29 -2
  52. package/bundled/dev-pipeline/templates/sections/phase-commit.md +22 -0
  53. package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +2 -2
  54. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +8 -6
  55. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +7 -5
  56. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
  57. package/bundled/skills/_metadata.json +5 -22
  58. package/bundled/skills/app-planner/SKILL.md +98 -72
  59. package/bundled/skills/app-planner/assets/app-design-guide.md +1 -1
  60. package/bundled/skills/app-planner/references/architecture-decisions.md +1 -1
  61. package/bundled/skills/app-planner/references/project-brief-guide.md +69 -66
  62. package/bundled/skills/bug-fix-workflow/SKILL.md +52 -9
  63. package/bundled/skills/bug-planner/SKILL.md +139 -197
  64. package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +43 -0
  65. package/bundled/skills/bug-planner/references/critic-and-verification.md +44 -0
  66. package/bundled/skills/bug-planner/references/error-recovery.md +73 -0
  67. package/bundled/skills/bug-planner/references/input-formats.md +53 -0
  68. package/bundled/skills/bug-planner/references/schema-validation.md +25 -0
  69. package/bundled/skills/bug-planner/references/severity-rules.md +16 -0
  70. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +4 -8
  71. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +34 -39
  72. package/bundled/skills/feature-pipeline-launcher/SKILL.md +49 -36
  73. package/bundled/skills/feature-pipeline-launcher/scripts/preflight-check.py +3 -3
  74. package/bundled/skills/feature-planner/SKILL.md +53 -142
  75. package/bundled/skills/feature-planner/assets/evaluation-guide.md +1 -1
  76. package/bundled/skills/feature-planner/assets/planning-guide.md +21 -5
  77. package/bundled/skills/feature-planner/references/browser-interaction.md +2 -4
  78. package/bundled/skills/feature-planner/references/completeness-review.md +57 -0
  79. package/bundled/skills/feature-planner/references/error-recovery.md +16 -35
  80. package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
  81. package/bundled/skills/feature-planner/references/new-project-planning.md +2 -2
  82. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +19 -20
  83. package/bundled/skills/feature-workflow/SKILL.md +24 -25
  84. package/bundled/skills/prizm-kit/SKILL.md +39 -49
  85. package/bundled/skills/prizmkit-code-review/SKILL.md +51 -64
  86. package/bundled/skills/prizmkit-code-review/rules/dimensions.md +85 -0
  87. package/bundled/skills/prizmkit-code-review/rules/fix-strategy.md +11 -11
  88. package/bundled/skills/prizmkit-committer/SKILL.md +3 -31
  89. package/bundled/skills/prizmkit-deploy/SKILL.md +34 -31
  90. package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +1 -1
  91. package/bundled/skills/prizmkit-implement/SKILL.md +35 -68
  92. package/bundled/skills/prizmkit-init/SKILL.md +112 -65
  93. package/bundled/skills/prizmkit-init/assets/project-brief-template.md +82 -0
  94. package/bundled/skills/prizmkit-plan/SKILL.md +120 -79
  95. package/bundled/skills/prizmkit-plan/assets/plan-template.md +28 -18
  96. package/bundled/skills/prizmkit-plan/assets/spec-template.md +28 -11
  97. package/bundled/skills/prizmkit-plan/references/clarify-guide.md +3 -3
  98. package/bundled/skills/prizmkit-plan/references/verification-checklist.md +60 -0
  99. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +10 -81
  100. package/bundled/skills/prizmkit-prizm-docs/assets/{PRIZM-SPEC.md → prizm-docs-format.md} +41 -526
  101. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +46 -0
  102. package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +16 -0
  103. package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +14 -0
  104. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +19 -0
  105. package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +17 -0
  106. package/bundled/skills/prizmkit-retrospective/SKILL.md +27 -65
  107. package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -4
  108. package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +7 -25
  109. package/bundled/skills/recovery-workflow/SKILL.md +22 -22
  110. package/bundled/skills/recovery-workflow/evals/evals.json +5 -5
  111. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +43 -10
  112. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +48 -40
  113. package/bundled/skills/refactor-planner/SKILL.md +43 -61
  114. package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +17 -17
  115. package/bundled/skills/refactor-workflow/SKILL.md +23 -24
  116. package/bundled/team/prizm-dev-team.json +1 -1
  117. package/bundled/{skills/prizm-kit/assets → templates}/project-memory-template.md +1 -1
  118. package/package.json +1 -1
  119. package/src/clean.js +3 -4
  120. package/src/gitignore-template.js +7 -9
  121. package/src/scaffold.js +14 -5
  122. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +0 -5
  123. package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +0 -19
  124. package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +0 -19
  125. package/bundled/skills/app-planner/references/project-conventions.md +0 -93
  126. package/bundled/skills/prizmkit-analyze/SKILL.md +0 -207
  127. package/bundled/skills/prizmkit-code-review/rules/dimensions-bugfix.md +0 -25
  128. package/bundled/skills/prizmkit-code-review/rules/dimensions-feature.md +0 -43
  129. package/bundled/skills/prizmkit-code-review/rules/dimensions-refactor.md +0 -25
  130. package/bundled/skills/prizmkit-implement/references/deploy-guide-protocol.md +0 -69
  131. package/bundled/skills/prizmkit-verify/SKILL.md +0 -281
  132. package/bundled/skills/prizmkit-verify/scripts/verify-light.py +0 -402
@@ -1,102 +1,89 @@
1
1
  ---
2
2
  name: "prizmkit-code-review"
3
- description: "Code review with fix strategy formulation. Diagnoses issues across 6 dimensions, then produces structured Fix Instructions. Use after /prizmkit-implement as quality gate before committing. Trigger on: 'review', 'check code', 'code review', 'is it ready to commit'. (project)"
3
+ description: "Code review against spec and plan. Diagnoses issues across multiple dimensions, produces findings with fix instructions. Use after /prizmkit-implement as quality gate. Trigger on: 'review', 'check code', 'code review', 'is it ready to commit'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Code Review
7
7
 
8
- Perform a comprehensive code review against the feature spec, implementation plan, and project best practices. This skill has two phases:
9
-
10
- 1. **Diagnostic Review** — read-only analysis producing findings with severity ratings
11
- 2. **Fix Strategy Formulation** — for each finding, produce actionable Fix Instructions
12
-
13
- The review itself is read-only. Fix Instructions are structured guidance for the developer — the reviewer does not modify code.
8
+ Review code changes against the spec, plan, and project conventions. Produces a diagnostic report with findings and actionable fix instructions. The review itself is read-only — no source code is modified.
14
9
 
15
10
  ### When to Use
16
11
  - After `/prizmkit-implement` to verify code quality before commit
17
12
  - User says "review", "check code", "review my implementation"
18
13
  - As a quality gate before `/prizmkit-committer`
19
14
 
20
- **PRECONDITION:**
15
+ ### When NOT to Use
16
+ - Trivial changes (typo, single-line config) → commit directly
17
+ - No spec.md or plan.md exists → nothing to review against
21
18
 
22
- | Mode | Required Artifacts | Directory | Check | If Missing |
23
- |---|---|---|---|---|
24
- | **Feature** | `spec.md` + `plan.md` (with Tasks) | `.prizmkit/specs/###-feature-name/` | Files exist + tasks completed | Run `/prizmkit-implement` |
25
- | **Refactor** | `refactor-analysis.md` + `plan.md` (with Tasks) | `.prizmkit/refactor/<refactor-slug>/` | Files exist + tasks completed. Review against behavior preservation, not spec. | Run `/prizmkit-implement` in refactor mode |
26
- | **Bugfix** | `fix-plan.md` | `.prizmkit/bugfix/<BUG_ID>/` | File exists + tasks completed. Review against bug description + reproduction test. | Run `/prizmkit-implement` in bugfix mode |
19
+ ## Input
27
20
 
28
- **Auto-detect**: Check which artifact directory was passed by the calling workflow, or scan `.prizmkit/` for the most recently modified feature/refactor/bugfix directory.
21
+ | Parameter | Required | Description |
22
+ |-----------|----------|-------------|
23
+ | `artifact_dir` | No | Directory containing spec.md + plan.md. If omitted, scan `.prizmkit/` subdirectories for the most recently modified directory with a `plan.md` whose tasks are all completed. |
29
24
 
30
- ## Phase 1: Diagnostic Review
25
+ ## Context Loading
31
26
 
32
- 1. **Detect mode and load review baseline + dimension rules**:
33
- - If `spec.md` exists **Feature mode**: read `spec.md` + `plan.md` as baseline. Load `${SKILL_DIR}/rules/dimensions-feature.md` for review dimensions.
34
- - If `refactor-analysis.md` exists → **Refactor mode**: read `refactor-analysis.md` + `plan.md` as baseline. Load `${SKILL_DIR}/rules/dimensions-refactor.md` for refactor-specific dimensions, **and also** `${SKILL_DIR}/rules/dimensions-feature.md` §3–§6 for standard dimensions (code quality, security, consistency, test coverage) that still apply.
35
- - If `fix-plan.md` exists → **Bugfix mode**: read `fix-plan.md` as baseline. Load `${SKILL_DIR}/rules/dimensions-bugfix.md` for review dimensions.
36
- - If none found → prompt user: "No review baseline found. Which workflow are you in? (feature/refactor/bugfix)"
37
- 2. Read **architecture index**: `.prizm-docs/root.prizm` RULES and PATTERNS for project conventions
38
- 3. Read **past decisions**: check DECISIONS sections in relevant `.prizm-docs/` L1/L2 files — helps verify implementation respects established conventions
39
- 4. Read '## Implementation Log' section of context-snapshot.md in the feature directory (if exists) — understand Dev's implementation decisions, trade-offs, and notable discoveries. This context helps distinguish intentional design choices from accidental patterns during review.
40
- 5. Scan all code files referenced in completed tasks
41
- 6. Review across all dimensions defined in the loaded rules file
42
- 7. Generate findings with severity: `CRITICAL` > `HIGH` > `MEDIUM` > `LOW`
27
+ 1. **Task context**: Read `spec.md`, `plan.md`, and any companion documents (e.g., `refactor-analysis.md`) from the artifact directory.
28
+ 2. **Architecture context**: Read `.prizm-docs/root.prizm` (L0) and relevant L1/L2 docs for affected modules check RULES, PATTERNS, TRAPS, DECISIONS.
43
29
 
44
- ## Phase 2: Fix Strategy Formulation
30
+ ## Phase 1: Diagnostic Review
45
31
 
46
- Load `${SKILL_DIR}/rules/fix-strategy.md` for the complete fix formulation process, finding format, grouping rules, and priority ordering.
32
+ 1. **Identify changed files**: Extract file paths from completed tasks in plan.md, or use `git diff` against the branch base.
33
+ 2. **Read changed files**: Scan all code files identified above.
34
+ 3. **Review across dimensions**: Load `${SKILL_DIR}/rules/dimensions.md` and evaluate each applicable dimension. Dimensions are conditionally triggered based on what sections exist in spec.md — see the dimensions file for trigger conditions.
35
+ 4. **Generate findings**: For each issue found, describe the problem, its location, which dimension it falls under, and why it matters.
36
+ 5. If unsure whether something is a bug or intentional design, flag it with a note asking the developer to confirm.
47
37
 
48
- For each finding from Phase 1 (CRITICAL and HIGH are mandatory; MEDIUM/LOW when actionable), follow the fix strategy rules to produce structured Fix Instructions.
38
+ ## Phase 2: Fix Strategy
49
39
 
50
- ## Severity & Verdict
40
+ For each finding, load `${SKILL_DIR}/rules/fix-strategy.md` and produce structured Fix Instructions: Root Cause, Impact, Fix Strategy, Code Guidance, Verification Criteria.
51
41
 
52
- Spec compliance failures are always HIGH or CRITICAL — if the code doesn't match what was agreed in the spec, that's a functional gap, not a style issue. Security findings follow the same rule.
42
+ ## Reviewer Agent Mode
53
43
 
54
- **Verdict criteria:**
55
- - `PASS`: No CRITICAL or HIGH findings
56
- - `PASS WITH WARNINGS`: No CRITICAL findings, some HIGH findings
57
- - `NEEDS FIXES`: Any CRITICAL findings present
44
+ When interactive session is available, offer the option to spawn an independent reviewer subagent:
58
45
 
59
- Cap findings at 30 to keep the review actionable. If there are more, summarize the overflow with counts by dimension.
46
+ 1. Spawn a reviewer subagent with **read-only** permissions (Read, Glob, Grep, Bash for test commands only)
47
+ 2. The subagent independently reviews changed files against spec/plan/dimensions and produces findings
48
+ 3. The main agent receives findings and applies fixes
49
+ 4. Re-spawn the subagent to verify fixes
50
+ 5. Repeat until the subagent reports no more findings or the caller's maximum iteration limit is reached
60
51
 
61
- If you're unsure whether something is a bug or intentional design, flag it as MEDIUM with a note asking the developer to confirm. Don't silently skip uncertain findings.
52
+ In non-interactive mode, perform the review directly (no subagent).
62
53
 
63
- ## Review Notes Format
54
+ ## Output
64
55
 
65
- When writing to context-snapshot.md, use this structured format:
56
+ Write `review-report.md` to the artifact directory:
66
57
 
67
58
  ```markdown
68
- ## Review Notes
69
-
70
- ### Verdict: PASS | PASS_WITH_WARNINGS | NEEDS_FIXES
71
- ### Review Iteration: 1/5
72
- ### Summary: X findings (N critical, N high, N medium, N low)
59
+ # Review Report
73
60
 
74
- ### Fix Instructions (ordered by priority)
61
+ ## Verdict: PASS | NEEDS_FIXES
75
62
 
76
- #### FIX-1: [SEVERITY] Title
77
- (finding format per ${SKILL_DIR}/rules/fix-strategy.md)
63
+ ## Summary: X findings
78
64
 
79
- #### FIX-2: [SEVERITY] Title
80
- ...
65
+ ## Findings
81
66
 
82
- ### Re-Review Expectations
83
- After fixes are applied, the reviewer expects:
84
- 1. (specific grep/test commands that should pass)
85
- 2. (behavioral checks)
86
- 3. All existing tests pass
67
+ ### Finding 1: Title
68
+ - Location: file:line
69
+ - Dimension: category
70
+ - Problem: what is wrong and why it matters
71
+ - Root Cause: explanation
72
+ - Impact: affected callers/dependents
73
+ - Fix Strategy: step-by-step
74
+ - Code Guidance: before/after snippet
75
+ - Verification: commands/checks to confirm
76
+ - Related: Finding N (if grouped)
87
77
  ```
88
78
 
89
- **HANDOFF:** `/prizmkit-retrospective` (if PASS) or Dev fixes following Fix Instructions (if NEEDS FIXES)
79
+ - `PASS`: 0 findings
80
+ - `NEEDS_FIXES`: 1+ findings with fix instructions
90
81
 
91
- ## Loop Protection
82
+ Also output findings summary to conversation.
92
83
 
93
- In unattended pipeline mode, the review→fix→review cycle can loop indefinitely if fixes introduce new issues. To prevent this:
84
+ **HANDOFF:** `/prizmkit-retrospective` (if no findings) or apply fixes and re-review (if findings exist)
94
85
 
95
- - Track a `review_iteration` counter starting at 1. Each review-fix-review cycle increments the counter.
96
- - **max_iterations = 5**: If `review_iteration >= 5`, you MUST proceed to `/prizmkit-retrospective` regardless of remaining findings. Log remaining issues as known technical debt: "Loop protection triggered — proceeding to retrospective with N unresolved findings (iterations: 5/5)."
97
- - Unresolved findings should be recorded in the review report so they can be tracked as follow-up work.
98
- - On re-review (iteration > 1): only check the specific Verification Criteria from previous Fix Instructions + scan for regressions. Do NOT re-run the full dimension review unless new code was added beyond the fix scope.
99
-
100
- ## Output
86
+ ## References
101
87
 
102
- Review report with Fix Instructions is output to conversation and written to the '## Review Notes' section of context-snapshot.md. No source code files are created or modified.
88
+ - Review dimensions: `${SKILL_DIR}/rules/dimensions.md`
89
+ - Fix strategy formulation: `${SKILL_DIR}/rules/fix-strategy.md`
@@ -0,0 +1,85 @@
1
+ # Review Dimensions
2
+
3
+ Evaluate code changes across the following dimensions. Each dimension is either **always active** or **conditionally triggered** based on spec.md content.
4
+
5
+ ---
6
+
7
+ ## §1 Goal Compliance (always active)
8
+
9
+ Does code implement all goals and acceptance criteria from spec.md?
10
+
11
+ - Check every goal (G-N) in spec.md has a corresponding implementation
12
+ - Verify acceptance criteria are met
13
+ - Verify edge cases mentioned in spec are handled
14
+ - Confirm scope boundaries are respected (no over-implementation, no under-implementation)
15
+
16
+ ## §2 Plan Adherence (always active)
17
+
18
+ Does implementation follow architectural decisions in plan.md?
19
+
20
+ - Check component structure matches plan's change approach
21
+ - Verify data model matches plan's schema design (if applicable)
22
+ - Confirm API contracts (endpoints, request/response) match plan (if applicable)
23
+ - Deviations may be improvements — flag for confirmation, not automatic rejection
24
+
25
+ ## §3 Behavior Preservation (conditional: spec.md has `## Behavior Preservation`)
26
+
27
+ Observable behavior for existing functionality must remain unchanged.
28
+
29
+ - All existing tests still pass without modification
30
+ - Public API signatures are unchanged (parameter types, return types, error types)
31
+ - Side effects (logging, metrics, events) are preserved unless explicitly scoped for removal
32
+ - Edge case handling is preserved — changes often silently drop edge case branches
33
+
34
+ ## §4 Code Quality (always active)
35
+
36
+ Naming, structure, complexity, DRY. Focus on maintainability.
37
+
38
+ - Function/variable names are descriptive and consistent with project conventions
39
+ - No unnecessary complexity (deep nesting, oversized functions)
40
+ - No copy-paste duplication that should be abstracted
41
+ - Error messages are informative for debugging
42
+
43
+ ## §5 Security (always active)
44
+
45
+ Injection, auth/authz gaps, sensitive data exposure, insecure defaults.
46
+
47
+ - User input is validated and sanitized before use in queries, HTML, or commands
48
+ - Authentication and authorization checks are present on protected routes
49
+ - Sensitive data (passwords, tokens, PII) is not logged or exposed in responses
50
+ - Cryptographic operations use established libraries, not custom implementations
51
+
52
+ ## §6 Consistency (always active)
53
+
54
+ Follows project patterns from `.prizm-docs/` PATTERNS and RULES sections.
55
+
56
+ - Code style matches existing codebase conventions
57
+ - Error handling follows established patterns
58
+ - File organization follows project structure conventions
59
+ - Naming conventions align with `.prizm-docs/` RULES
60
+
61
+ ## §7 Test Coverage (always active)
62
+
63
+ Are critical paths tested?
64
+
65
+ - Happy path tests exist for each goal
66
+ - Error/edge case tests for critical paths
67
+ - Tests are deterministic (no flaky timing dependencies)
68
+ - Test names clearly describe what they verify
69
+
70
+ ## §8 Fix Correctness (conditional: spec.md has `## Root Cause`)
71
+
72
+ The fix addresses the actual root cause, not just symptoms.
73
+
74
+ - The root cause identified in spec.md is addressed
75
+ - A regression test exists that would catch this issue if reintroduced
76
+ - The fix does not change behavior for non-affected inputs
77
+ - Related code paths are not inadvertently affected
78
+
79
+ ## §9 Change Scope (conditional: spec.md `## Scope` emphasizes minimal change)
80
+
81
+ Only files directly related to the task are modified.
82
+
83
+ - No "while I'm here" changes mixed with the primary task
84
+ - If scope creep is detected, flag it — those changes belong in a separate commit
85
+ - Structural improvement (refactoring) is measured against stated goals, not unbounded
@@ -1,6 +1,6 @@
1
1
  # Fix Strategy Formulation
2
2
 
3
- For each finding from the Diagnostic Review (CRITICAL and HIGH mandatory; MEDIUM/LOW when actionable):
3
+ For each finding from the Diagnostic Review, produce actionable Fix Instructions.
4
4
 
5
5
  ## Per-Finding Analysis
6
6
 
@@ -14,7 +14,7 @@ Search the codebase for all callers/dependents of the affected code. List concre
14
14
  Concrete step-by-step modification plan:
15
15
  - What to change, where, and in what order
16
16
  - Which project conventions to follow (reference `.prizm-docs/` RULES)
17
- - Dependencies between fixes (FIX-1 must be done before FIX-3)
17
+ - Dependencies between fixes (Finding 1 must be done before Finding 3)
18
18
 
19
19
  ### 4. Code Guidance
20
20
  Show before/after code snippets for the key change. Keep minimal — enough to unambiguate the approach, not a full implementation.
@@ -27,21 +27,21 @@ How to confirm the fix works:
27
27
 
28
28
  ## Finding Grouping
29
29
 
30
- Group related findings that should be fixed together. If FIX-1 and FIX-3 share the same root cause or affect the same code path, mark them as a group with a shared fix strategy. This prevents Dev from fixing symptoms individually only to have the underlying cause persist.
30
+ Group related findings that should be fixed together. If Finding 1 and Finding 3 share the same root cause or affect the same code path, mark them as a group with a shared fix strategy. This prevents fixing symptoms individually only to have the underlying cause persist.
31
31
 
32
- ## Fix Priority Ordering
32
+ ## Fix Ordering
33
33
 
34
34
  Order Fix Instructions by:
35
- 1. **Dependencies first** — if FIX-2 depends on FIX-1, FIX-1 comes first
36
- 2. **CRITICAL before HIGH** — severity determines priority within independent fixes
37
- 3. **Grouped fixes together** — related findings are adjacent
35
+ 1. **Dependencies first** — if Finding 2 depends on Finding 1, Finding 1 comes first
36
+ 2. **Grouped fixes together** — related findings are adjacent
38
37
 
39
38
  ## Finding Format
40
39
 
41
40
  ```
42
- #### FIX-N: [SEVERITY] Title
41
+ ### Finding N: Title
43
42
  - Location: file:line
44
43
  - Dimension: category
44
+ - Problem: what is wrong and why it matters
45
45
  - Root Cause: explanation
46
46
  - Impact: affected callers/dependents with file:line locations
47
47
  - Fix Strategy:
@@ -55,7 +55,7 @@ Order Fix Instructions by:
55
55
  - Verification:
56
56
  - command to run
57
57
  - expected output
58
- - Related: FIX-X (if grouped)
59
- - Depends On: FIX-Y (if dependency)
60
- - Blocks: FIX-Z (if blocking)
58
+ - Related: Finding X (if grouped)
59
+ - Depends On: Finding Y (if dependency)
60
+ - Blocks: Finding Z (if blocking)
61
61
  ```
@@ -16,8 +16,8 @@ description: "Pure git commit workflow with safety checks. Stages files, generat
16
16
  |---|---|---|
17
17
  | Uncommitted changes exist | `git status` shows modified/added/untracked files | Inform user "nothing to commit" and stop |
18
18
  | `.prizm-docs/` synced (feature/refactor) | `/prizmkit-retrospective` has run | Run `/prizmkit-retrospective` first |
19
- | Code review passed (pipeline mode) | `context-snapshot.md` has Review Notes with PASS/PASS_WITH_WARNINGS | Run `/prizmkit-code-review` first |
20
- | `DEPLOY.md` updated (if applicable) | If `/prizmkit-deploy` ran, `DEPLOY.md` is staged | Run `/prizmkit-deploy` or skip if no infrastructure changes |
19
+ | Code review passed (pipeline mode) | `review-report.md` in artifact directory has `## Verdict: PASS` | Run `/prizmkit-code-review` first |
20
+ | `.prizmkit/deploy.md` updated (if applicable) | If `/prizmkit-deploy` ran, `.prizmkit/deploy.md` is staged | Run `/prizmkit-deploy` or skip if no infrastructure changes |
21
21
 
22
22
  ### Workflow
23
23
 
@@ -31,7 +31,7 @@ git status
31
31
  - If there are changes: proceed
32
32
 
33
33
  #### Step 2: Generate Commit Message
34
- Analyze the staged diff and context (spec title, plan summary, review verdict) to generate a concise Conventional Commits message. The message should capture the *what* and *why* of the change.
34
+ Analyze the staged diff and context (spec title, plan summary) to generate a concise Conventional Commits message. The message should capture the *what* and *why* of the change.
35
35
 
36
36
  #### Step 3: Update CHANGELOG.md
37
37
  If CHANGELOG.md exists in the project root, append an entry following Keep a Changelog format under the `[Unreleased]` section. Match the existing style in the file.
@@ -62,34 +62,6 @@ git status
62
62
  ```
63
63
  - If "nothing to commit, working tree clean": commit verified successfully, proceed
64
64
 
65
- #### Step 5.5: Generate Session Summary (for cross-session recovery)
66
-
67
- After a successful commit, generate a lightweight handoff file for future sessions. Locate the artifact directory (`.prizmkit/specs/<feature-dir>/` for features, `.prizmkit/refactor/<slug>/` for refactors, `.prizmkit/bugfix/<id>/` for bugfixes) by checking which `plan.md` was used in this workflow.
68
-
69
- If an artifact directory with `plan.md` is found, write `session-summary.md` in that directory:
70
-
71
- ```markdown
72
- # Session Summary
73
- ## Completed Tasks
74
- <list task IDs and one-line descriptions from plan.md [x] items>
75
-
76
- ## Files Changed
77
- <list from `git diff HEAD~1 --name-only` of the commit just made>
78
-
79
- ## Key Decisions
80
- <1-3 bullet points of non-obvious design choices made this session, referencing DECISIONS in .prizm-docs/ if applicable>
81
-
82
- ## Active TRAPS
83
- <any CRITICAL or HIGH TRAPS relevant to the changed files, copied from .prizm-docs/ L2>
84
-
85
- ## Remaining Work
86
- <list unchecked [ ] task IDs from plan.md, or "None — feature complete" if all done>
87
- ```
88
-
89
- Keep this file under 1.5KB. If no artifact directory with `plan.md` can be identified (e.g., ad-hoc commit), skip this step.
90
-
91
- **Lifecycle**: `session-summary.md` is a local cross-session artifact — do NOT commit it to git. It exists only on disk for the next session to read. Overwrite any existing `session-summary.md` from a previous session — this file reflects only the most recent commit's state. In pipeline mode, this file will remain as an untracked file after commit; the pipeline runner should ignore it (it is not a sign of incomplete work).
92
-
93
65
  #### Step 6: Optional Push
94
66
  Ask user: "Push to remote?"
95
67
  - Yes: `git push`
@@ -1,73 +1,76 @@
1
1
  ---
2
2
  name: "prizmkit-deploy"
3
- description: "Generate or update DEPLOY.md with local dev setup, testing, production deployment, and rollback procedures. Fully autonomous. Use after /prizmkit-retrospective, before /prizmkit-committer. Trigger on: 'deploy docs', 'deployment guide', 'how to deploy', 'DEPLOY.md'. (project)"
3
+ description: "Generate or update .prizmkit/deploy.md with local dev setup, testing, production deployment, and rollback procedures. On-demand skill trigger when deployment docs are needed. Trigger on: 'deploy docs', 'deployment guide', 'how to deploy', 'deploy.md'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Deploy
7
7
 
8
8
  ### When to Use
9
- - After `/prizmkit-retrospective` and before `/prizmkit-committer` to complete documentation before commit
10
- - After a batch of features has been implemented and reviewed
11
9
  - When the project has no deployment documentation yet
12
10
  - When new infrastructure components have been added (new database, cache, message queue, etc.)
11
+ - When deployment-related configuration has changed significantly
12
+ - When explicitly requested by user or caller
13
13
 
14
14
  ### When NOT to Use
15
- - Mid-feature development (deployment docs should reflect reviewed, stable code)
16
- - For actual deployment execution (this skill only produces docs)
17
- - Fast-path bug fixes (no deployment doc update needed)
15
+ - For actual deployment execution (this skill only produces documentation)
16
+ - When only application logic changed with no infra/config impact
18
17
 
19
- ### Pipeline Safety
20
- - **Fully autonomous** — no user interaction required at any step
18
+ > **On-demand skill** — not part of the default `plan → implement → code-review → retrospective → committer` chain. Invoke independently when deployment documentation needs creation or update.
19
+
20
+ ### PRECONDITION
21
+ - Project contains deployable artifacts (at least one of: `package.json`, `Dockerfile`, `Makefile`, `go.mod`, `Cargo.toml`, `pyproject.toml`, or equivalent)
22
+
23
+ ## Context Loading
24
+
25
+ 1. **Architecture context**: Read `.prizm-docs/root.prizm` → identify modules with deployment-relevant components (APIs, services, workers)
26
+ 2. **Project config**: Read `.prizmkit/config.json` for `deploy_strategy` and `tech_stack`
27
+ - If `.prizmkit/config.json` does not exist → proceed without it, infer from project file scanning. Log warning: "No .prizmkit/config.json found — inferring deployment strategy from project files."
28
+ 3. **Module detail**: Read relevant `.prizm-docs/<module>.prizm` L1/L2 for INTERFACES and DEPENDENCIES sections that inform deployment topology
21
29
 
22
30
  ## Execution Steps
23
31
 
24
- **Phase 1 — Context Gathering:**
25
- 1. Read `.prizmkit/config.json`:
26
- - `deploy_strategy` — user's confirmed deployment approach (may be absent)
27
- - `tech_stack` — detected or user-provided technology stack
28
- - **If `.prizmkit/config.json` does not exist**: proceed without it — infer deployment approach entirely from project file scanning in steps 2-3. Log a warning: "No .prizmkit/config.json found — inferring deployment strategy from project files. Run `/prizmkit-init` to generate config."
29
- 2. Scan project for deployment-related files:
32
+ **Phase 1 — Project Scanning:**
33
+ 1. Scan project for deployment-related files:
30
34
  - Container: `Dockerfile`, `docker-compose.yml`, `.dockerignore`
31
35
  - Cloud platforms: `vercel.json`, `netlify.toml`, `fly.toml`, `app.yaml` (GCP), `appspec.yml` (AWS)
32
36
  - CI/CD: `.github/workflows/`, `.gitlab-ci.yml`, `Jenkinsfile`, `bitbucket-pipelines.yml`
33
37
  - Package managers: `package.json` scripts (start, build, preview), `Makefile`, `Procfile`
34
38
  - Infrastructure as Code: `terraform/`, `pulumi/`, `cdk/`, `serverless.yml`
35
- 3. Scan source code for environment variable references:
39
+ 2. Scan source code for environment variable references:
36
40
  - Grep for `process.env.`, `os.environ`, `os.Getenv`, `env::var`, `System.getenv`
37
41
  - Cross-reference with `.env.example`, `.env.template`, or `.env.sample` if they exist
38
42
  - Catalog all env vars with their usage context
39
- 4. Check for existing `DEPLOY.md` (or `docs/deployment.md`, `docs/DEPLOY.md`)
40
- 5. Read recent git log to identify newly added infrastructure components since last deploy doc update:
41
- - If `DEPLOY.md` exists → use `git log -1 --format=%H -- DEPLOY.md` to find the last commit that touched it, then `git diff <that-commit>..HEAD` to identify new infra files
42
- - If `DEPLOY.md` does not exist → treat all infrastructure as "new"
43
+ 3. Check for existing `.prizmkit/deploy.md`
44
+ 4. If `.prizmkit/deploy.md` exists → use `git log` to identify infra changes since last update; otherwise treat all infrastructure as "new"
43
45
 
44
46
  **Phase 2 — Document Generation:**
45
- 6. If NO existing deploy doc:
46
- - Generate full `DEPLOY.md` from template (`${SKILL_DIR}/assets/deploy-template.md`)
47
+ 5. If NO existing deploy doc:
48
+ - Generate `.prizmkit/deploy.md` from template (`${SKILL_DIR}/assets/deploy-template.md`)
47
49
  - Fill all sections based on scanned project state
48
50
  - If `deploy_strategy` exists in config → use it as the authoritative deployment approach
49
- - If `deploy_strategy` is absent → infer from detected files (Dockerfile → Docker-based, vercel.json → Vercel, etc.) and note "Inferred from project files — confirm with `/prizmkit-plan` on next feature"
50
- 7. If existing deploy doc found:
51
+ - If `deploy_strategy` is absent → infer from detected files (Dockerfile → Docker-based, vercel.json → Vercel, etc.) and note "Inferred from project files"
52
+ 6. If existing deploy doc found:
51
53
  - Compare current project state against documented state
52
54
  - Identify gaps: new env vars not documented, new services not covered, outdated commands
53
55
  - Apply incremental updates — preserve user-written sections, only add/update auto-detectable content
54
56
  - Mark updated sections with `<!-- Updated by prizmkit-deploy -->` comment
55
57
 
56
58
  **Phase 3 — Validation:**
57
- 8. Verify completeness checklist:
59
+ 7. Verify completeness checklist:
58
60
  - [ ] All detected env vars are documented with descriptions
59
61
  - [ ] Local development setup commands are runnable (check referenced scripts/commands exist)
60
62
  - [ ] Build command documented and exists in package.json/Makefile
61
- - [ ] Production deployment steps match `deploy_strategy` in config
63
+ - [ ] Production deployment steps match `deploy_strategy` in config (if configured)
62
64
  - [ ] Health check or verification step is included
63
- 9. If any checklist item fails, add a `## TODO` section at the bottom listing what needs manual completion
64
- 10. Output: `DEPLOY.md` path, summary of sections generated/updated, list of TODOs if any
65
+ 8. If any checklist item fails, add a `## TODO` section at the bottom listing what needs manual completion
66
+ 9. If interactive session is available show summary and ask if user wants to review before finishing
67
+ 10. Output: `.prizmkit/deploy.md` path, summary of sections generated/updated, list of TODOs if any
65
68
 
66
- **HANDOFF:** `/prizmkit-committer` — commit all changes including the updated `DEPLOY.md`.
69
+ **HANDOFF:** `/prizmkit-committer` — commit changes including `.prizmkit/deploy.md`.
67
70
 
68
71
  ## Document Sections
69
72
 
70
- The generated `DEPLOY.md` includes these sections (skip any that don't apply to the project):
73
+ The generated deploy doc includes these sections (skip any that don't apply to the project):
71
74
 
72
75
  | Section | Content | Source |
73
76
  |---------|---------|--------|
@@ -84,7 +87,7 @@ The generated `DEPLOY.md` includes these sections (skip any that don't apply to
84
87
 
85
88
  ## Incremental Update Rules
86
89
 
87
- When updating an existing `DEPLOY.md`:
90
+ When updating an existing `.prizmkit/deploy.md`:
88
91
  - **NEVER delete** user-written content (sections without `<!-- Updated by prizmkit-deploy -->` markers)
89
92
  - **ADD** newly detected env vars to the Environment Variables table
90
93
  - **ADD** new services/components to Production Deployment
@@ -99,7 +102,7 @@ When updating an existing `DEPLOY.md`:
99
102
  - Project has `Dockerfile`, `docker-compose.yml`, `package.json` with build script
100
103
  - 12 env vars detected in source code, `.env.example` has 8
101
104
 
102
- **Output:** `DEPLOY.md` with all sections filled, plus TODO:
105
+ **Output:** `.prizmkit/deploy.md` with all sections filled, plus TODO:
103
106
  ```
104
107
  ## TODO
105
108
  - [ ] 4 environment variables found in code but missing from `.env.example`: `REDIS_URL`, `SMTP_HOST`, `SMTP_PORT`, `SENTRY_DSN`
@@ -1,5 +1,5 @@
1
1
  # Deployment Guide: [PROJECT_NAME]
2
- <!-- Replace [PROJECT_NAME] with: project_name from feature-list.json, or name from package.json, or the project root directory name (in that priority order) -->
2
+ <!-- Replace [PROJECT_NAME] with: name from package.json, or the project root directory name -->
3
3
 
4
4
  > Generated by PrizmKit Deploy
5
5
 
@@ -1,87 +1,55 @@
1
1
  ---
2
2
  name: "prizmkit-implement"
3
- description: "Execute plan.md tasks with TDD approach. Respects task ordering and dependencies. Use after /prizmkit-plan (or /prizmkit-analyze). Trigger on: 'implement', 'build', 'code it', 'start coding', 'execute', 'write the code'. (project)"
3
+ description: "Execute plan.md tasks with TDD approach. Respects task ordering and dependencies. Use after /prizmkit-plan. Trigger on: 'implement', 'build', 'code it', 'start coding', 'execute', 'write the code'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Implement
7
7
 
8
8
  ### When to Use
9
- - After `/prizmkit-plan` (or `/prizmkit-analyze`) when ready to write code
9
+ - After `/prizmkit-plan` when ready to write code
10
10
  - User says "implement", "build", "code it", "start coding", "develop"
11
11
  - For fast-path: user describes a simple change directly (fast-path skips specify, but still requires a simplified plan.md with Tasks section)
12
12
 
13
13
  **PRECONDITION:**
14
14
 
15
- | Mode | Required Artifact | Directory | Check | If Missing |
16
- |---|---|---|---|---|
17
- | **Feature** (default) | `plan.md` with Tasks section | `.prizmkit/specs/###-feature-name/` | File exists + unchecked tasks | Run `/prizmkit-plan` |
18
- | **Refactor** | `plan.md` with Tasks section | `.prizmkit/refactor/<refactor-slug>/` | File exists + unchecked tasks | Run `/prizmkit-plan` in refactor mode |
19
- | **Bugfix** | `plan.md` with Tasks section | `.prizmkit/bugfix/<BUG_ID>/` | File exists + unchecked tasks | Run `/prizmkit-plan` in bugfix mode |
20
-
21
- **Auto-detect**: If the calling workflow passes an explicit artifact directory, use that. Otherwise scan `.prizmkit/` subdirectories for the most recently modified `plan.md` with unchecked tasks.
22
-
23
- ## Execution Steps
24
-
25
- 1. **Detect mode and read context**:
26
- - Locate `plan.md` (check the artifact directory passed by the calling workflow, or auto-detect per PRECONDITION above)
27
- - Read `plan.md` (including Tasks section)
28
- - Read the companion input document for full context:
29
- - **Feature mode**: read `spec.md` in the same directory
30
- - **Refactor mode**: read `refactor-analysis.md` in the same directory — pay special attention to Scope Boundary (do not implement changes outside scope) and Baseline Tests (all must still pass)
31
- - **Bugfix mode**: read `fix-plan.md` in the same directory
32
- 2. Load project context use the most efficient source available (check in this order):
33
- - If `context-snapshot.md` exists in the feature directory read it. Section 3 has Prizm docs + TRAPS. Section 4 has File Manifest (Tier-2/3) or full source (Tier-1). Read source files on-demand as directed by the manifest.
34
- - Else if `session-summary.md` exists in the feature directory → read it for quick context recovery (completed tasks, key decisions, active TRAPS). Then load only the L1/L2 docs for modules listed in "Files Changed" — skip unrelated modules.
35
- - Otherwise **self-service context fallback**:
36
- 1. Read **architecture index**: `.prizm-docs/root.prizm` and relevant L1/L2 for affected modules. Pay special attention to TRAPS and DECISIONS.
37
- 2. Scan needed source files
38
- 3. Check if checkpoint tasks are complete before proceeding to next phase
39
- 4. For each unchecked task in order:
40
- a. If task has `[P]` marker, it can run in parallel with other `[P]` tasks in the same group
41
- b. Read L2 doc for target file's module. TRAPS save you from repeating known mistakes.
42
- - If L2 exists: check TRAPS and DECISIONS before modifying files.
43
- - If L2 does not exist and this task creates a new module directory or adds significant source files: create L2 using the L2 GENERATION TEMPLATE (see PRIZM-SPEC). Seed KEY_FILES and DEPENDENCIES from the files being created. TRAPS and DECISIONS can be minimal initially `/prizmkit-retrospective` will enrich them.
44
- - Judgment call: not every directory needs L2. Create L2 when the module has meaningful logic, non-obvious coupling, or design decisions worth preserving. Skip for trivial wrapper directories or single-config modules.
45
- c. Apply TDD where applicable: write a failing test first, then implement until it passes. For UI components or configuration changes where unit tests don't apply, skip the test-first step.
46
- d. Mark task as `[x]` in `plan.md` Tasks section immediately — not batched at the end. Immediate marking means the plan always reflects true progress, even if the session is interrupted.
47
- e. After all tasks, append '## Implementation Log' to `context-snapshot.md` (if running in pipeline context): files changed/created, key decisions, notable discoveries.
48
- f. Error handling: sequential tasks stop on failure (later tasks may depend on this one). Parallel `[P]` tasks continue — report all failures at the end.
49
- 5. At each checkpoint: verify build passes and tests pass. Checkpoints catch integration errors early — skipping them means cascading failures in later phases that are much harder to debug.
50
- 6. After all tasks: run full test suite
51
- 7. **Deploy guide update** — only when dependency manifests (package.json, requirements.txt, etc.) changed during this task.
52
- → Read `${SKILL_DIR}/references/deploy-guide-protocol.md` and follow its protocol.
53
- 8. Output implementation summary with pass/fail status
54
-
55
- ## Task Format in plan.md
56
-
57
- Tasks in plan.md look like this:
58
- ```markdown
59
- ## Tasks
60
-
61
- ### Phase 1: Data Layer
62
- - [ ] Create User model with avatar field in src/models/user.ts
63
- - [ ] Add S3 upload utility in src/lib/s3.ts
64
- - [x] ~~Set up database migration~~ (already done)
65
-
66
- ### Phase 2: API [P]
67
- - [ ] [P] POST /api/avatar endpoint in src/routes/avatar.ts
68
- - [ ] [P] DELETE /api/avatar endpoint in src/routes/avatar.ts
69
-
70
- ### Phase 3: UI
71
- - [ ] Avatar upload component in src/components/AvatarUpload.tsx
72
- - [ ] CP: Integration checkpoint — full test suite must pass
73
- ```
74
-
75
- - `[ ]` / `[x]` — unchecked / completed
76
- - `[P]` — can run in parallel with other `[P]` tasks in the same phase
77
- - `CP:` — checkpoint where build + tests must pass before continuing
15
+ | Required Artifact | Check | If Missing |
16
+ |---|---|---|
17
+ | `plan.md` with Tasks section | File exists + unchecked tasks | Run `/prizmkit-plan` |
18
+ | `spec.md` | File exists in same directory as plan.md | Run `/prizmkit-plan` |
19
+
20
+ **Artifact directory**: Accept `artifact_dir` from caller. If not provided, scan `.prizmkit/` subdirectories for the most recently modified `plan.md` with unchecked tasks.
21
+
22
+ ## Input
23
+
24
+ | Parameter | Required | Description |
25
+ |-----------|----------|-------------|
26
+ | `artifact_dir` | No | Directory containing spec.md + plan.md. If omitted, auto-detect per precondition above. |
27
+
28
+ ## Context Loading
29
+
30
+ Before implementation, load context once:
31
+
32
+ 1. **Task context**: Read `plan.md` (including Tasks section) and `spec.md` from the artifact directory. If other companion documents exist in the directory (e.g., `refactor-analysis.md`), read them for additional context.
33
+ 2. **Architecture context**: Read `.prizm-docs/root.prizm` (L0 project overview, module index, tech stack, conventions) and relevant L1/L2 docs for affected modules. Pay special attention to TRAPS (known pitfalls) and DECISIONS (architectural choices).
34
+
35
+ > `.prizm-docs/` uses a 3-level hierarchy: L0 (`root.prizm`) is the project-wide index. L1 (e.g., `auth.prizm`) covers a module — its key files, interfaces, dependencies, traps, and decisions. L2 is for sub-modules with their own complexity. Implement reads these docs to avoid repeating known mistakes; `/prizmkit-retrospective` is responsible for updating them after implementation.
36
+
37
+ ## Execution
38
+
39
+ For each unchecked task in plan.md, in order:
40
+
41
+ 1. Read L1/L2 doc for the target file's module — check TRAPS and DECISIONS before modifying files
42
+ 2. Apply TDD where applicable: write a failing test first, then implement until it passes. For UI components or configuration changes where unit tests don't apply, skip the test-first step.
43
+ 3. Mark task as `[x]` in `plan.md` immediately after completion not batched at the end. Immediate marking means plan.md always reflects true progress, even if the session is interrupted.
44
+ 4. **Parallel tasks**: If task has `[P]` marker, it can run in parallel with other `[P]` tasks in the same group. Sequential tasks stop on failure (later tasks may depend on this one). Parallel `[P]` tasks continue report all failures at the end.
45
+ 5. **Checkpoint tasks** (`CP:` prefix in plan.md): When a checkpoint task is reached, verify build passes and tests pass before continuing. Checkpoints catch integration errors early skipping them means cascading failures in later phases.
46
+ 6. After all tasks complete: run full test suite.
78
47
 
79
48
  ## Recovery
80
49
 
81
50
  If a session is interrupted mid-implementation:
82
51
  - Completed tasks are already marked `[x]` in plan.md (because we mark immediately)
83
- - Resume by re-running `/prizmkit-implement` — it picks up from the first unchecked task
84
- - context-snapshot.md persists across sessions for consistent context
52
+ - Resume by re-running `/prizmkit-implement` — it picks up from the first unchecked `[ ]` task
85
53
 
86
54
  **HANDOFF:** `/prizmkit-code-review`
87
55
 
@@ -89,5 +57,4 @@ If a session is interrupted mid-implementation:
89
57
 
90
58
  - Code files created/modified as specified in plan.md Tasks section
91
59
  - `plan.md` Tasks section updated with completion markers `[x]`
92
- - `DEPLOY.md` created/updated (only when new frameworks/tools were added)
93
60
  - Implementation summary output to conversation