prizmkit 1.0.45 → 1.0.58

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 (64) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/claude/agent-adapter.js +2 -1
  3. package/bundled/adapters/claude/command-adapter.js +4 -3
  4. package/bundled/agents/prizm-dev-team-dev.md +1 -1
  5. package/bundled/dev-pipeline/README.md +3 -4
  6. package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +2 -3
  7. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +2 -2
  8. package/bundled/dev-pipeline/launch-daemon.sh +2 -2
  9. package/bundled/dev-pipeline/lib/branch.sh +76 -0
  10. package/bundled/dev-pipeline/run-bugfix.sh +58 -149
  11. package/bundled/dev-pipeline/run.sh +60 -153
  12. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -1
  13. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +8 -16
  14. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +10 -18
  15. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +20 -24
  16. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +6 -6
  17. package/bundled/dev-pipeline/tests/conftest.py +19 -131
  18. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +207 -0
  19. package/bundled/dev-pipeline/tests/test_utils.py +51 -110
  20. package/bundled/rules/prizm/prizm-commit-workflow.md +3 -3
  21. package/bundled/skills/_metadata.json +15 -16
  22. package/bundled/skills/app-planner/SKILL.md +8 -7
  23. package/bundled/skills/bug-fix-workflow/SKILL.md +174 -0
  24. package/bundled/skills/bug-planner/SKILL.md +20 -32
  25. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +3 -5
  26. package/bundled/skills/dev-pipeline-launcher/SKILL.md +4 -6
  27. package/bundled/skills/feature-workflow/SKILL.md +25 -42
  28. package/bundled/skills/prizm-kit/SKILL.md +57 -21
  29. package/bundled/skills/prizm-kit/assets/{claude-md-template.md → project-memory-template.md} +2 -2
  30. package/bundled/skills/prizmkit-analyze/SKILL.md +41 -29
  31. package/bundled/skills/prizmkit-clarify/SKILL.md +40 -30
  32. package/bundled/skills/prizmkit-code-review/SKILL.md +48 -43
  33. package/bundled/skills/prizmkit-committer/SKILL.md +30 -68
  34. package/bundled/skills/prizmkit-implement/SKILL.md +48 -26
  35. package/bundled/skills/prizmkit-init/SKILL.md +57 -66
  36. package/bundled/skills/prizmkit-plan/SKILL.md +46 -20
  37. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +60 -19
  38. package/bundled/skills/prizmkit-prizm-docs/assets/PRIZM-SPEC.md +23 -23
  39. package/bundled/skills/prizmkit-retrospective/SKILL.md +142 -65
  40. package/bundled/skills/prizmkit-retrospective/assets/retrospective-template.md +13 -0
  41. package/bundled/skills/prizmkit-specify/SKILL.md +63 -13
  42. package/bundled/skills/refactor-workflow/SKILL.md +105 -49
  43. package/bundled/team/prizm-dev-team.json +2 -2
  44. package/package.json +1 -1
  45. package/src/scaffold.js +3 -3
  46. package/bundled/dev-pipeline/lib/worktree.sh +0 -164
  47. package/bundled/dev-pipeline/tests/__init__.py +0 -0
  48. package/bundled/dev-pipeline/tests/test_check_session.py +0 -131
  49. package/bundled/dev-pipeline/tests/test_cleanup_logs.py +0 -119
  50. package/bundled/dev-pipeline/tests/test_detect_stuck.py +0 -207
  51. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +0 -181
  52. package/bundled/dev-pipeline/tests/test_generate_prompt.py +0 -190
  53. package/bundled/dev-pipeline/tests/test_init_bugfix_pipeline.py +0 -153
  54. package/bundled/dev-pipeline/tests/test_init_pipeline.py +0 -241
  55. package/bundled/dev-pipeline/tests/test_update_bug_status.py +0 -142
  56. package/bundled/dev-pipeline/tests/test_update_feature_status.py +0 -338
  57. package/bundled/dev-pipeline/tests/test_worktree.py +0 -236
  58. package/bundled/dev-pipeline/tests/test_worktree_integration.py +0 -796
  59. package/bundled/skills/prizm-kit/assets/codebuddy-md-template.md +0 -35
  60. package/bundled/skills/prizm-kit/assets/hooks/prizm-commit-hook.json +0 -15
  61. package/bundled/skills/prizmkit-summarize/SKILL.md +0 -51
  62. package/bundled/skills/prizmkit-summarize/assets/registry-template.md +0 -18
  63. package/bundled/templates/hooks/commit-intent-claude.json +0 -26
  64. /package/bundled/templates/hooks/{commit-intent-codebuddy.json → commit-intent.json} +0 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "prizmkit-analyze"
3
- description: "Cross-document consistency analysis for spec.md, plan.md, and tasks.md. Detects duplications, ambiguities, gaps, and rule conflicts. Read-only. (project)"
3
+ description: "Cross-document consistency analysis for spec.md, plan.md, and tasks.md. Detects duplications, ambiguities, gaps, and rule conflicts. Read-only. Use this skill to check if spec and plan are aligned, validate documents before coding, or as a quality gate after planning. Trigger on: 'analyze', 'check consistency', 'validate spec', 'review plan', 'is the spec ready', 'check if spec and plan are aligned', 'validate documents before coding'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Analyze
@@ -8,23 +8,17 @@ description: "Cross-document consistency analysis for spec.md, plan.md, and task
8
8
  Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md before implementation. Identifies duplications, ambiguities, underspecified items, rule conflicts, and coverage gaps.
9
9
 
10
10
  ### When to Use
11
- - After `prizmkit.plan` to validate spec-plan-tasks alignment before implementation
11
+ - After `/prizmkit-plan` to validate spec-plan-tasks alignment before implementation
12
12
  - User says "analyze", "check consistency", "validate spec", "review plan"
13
- - Before `prizmkit.implement` as a quality gate
14
-
15
- ## Commands
16
-
17
- ### prizmkit.analyze
18
-
19
- Cross-document consistency analysis.
13
+ - Before `/prizmkit-implement` as a quality gate
20
14
 
21
15
  **PRECONDITION:** `spec.md` and `plan.md` exist in `.prizmkit/specs/###-feature-name/`. `plan.md` must include a Tasks section.
22
16
 
23
17
  ## Operating Constraints
24
18
 
25
- **STRICTLY READ-ONLY**: Do **not** modify any files. Output a structured analysis report to conversation only. Offer an optional remediation plan (user must explicitly approve before any edits).
19
+ **Read-only analysis**: Do not modify any files. The analysis output goes to conversation only, with an optional remediation plan the user must explicitly approve. This separation matters because the user needs to understand what's wrong before deciding what to change — auto-fixing consistency issues often introduces new ones.
26
20
 
27
- **Prizm Rules Authority**: The project rules in `.prizm-docs/root.prizm` RULES section are **non-negotiable** within this analysis scope. Rule conflicts are automatically CRITICAL severity and require adjustment of the spec, plan, or tasks not dilution or silent ignoring of the rule. If a rule itself needs to change, that must occur via a separate `prizmkit.doc.update`.
21
+ **Prizm Rules take precedence**: The project rules in `.prizm-docs/root.prizm` RULES section are the source of truth. If a spec or plan element conflicts with a MUST/NEVER directive, the spec/plan needs to change, not the rule. This prevents well-intentioned features from silently violating project-wide constraints. If a rule itself is wrong, that's a separate conversation via prizmkit-prizm-docs (Update operation).
28
22
 
29
23
  ## Execution Steps
30
24
 
@@ -37,7 +31,7 @@ Derive absolute paths:
37
31
  - PLAN = `.prizmkit/specs/###-feature-name/plan.md`
38
32
  - TASKS = `.prizmkit/specs/###-feature-name/tasks.md` (optional)
39
33
 
40
- Abort with an error message if spec.md or plan.md is missing — instruct the user to run the missing prerequisite command (`prizmkit.specify` or `prizmkit.plan`).
34
+ Abort with an error message if spec.md or plan.md is missing — instruct the user to run the missing prerequisite command (`/prizmkit-specify` or `/prizmkit-plan`).
41
35
 
42
36
  ### Step 2: Load Artifacts (Progressive Disclosure)
43
37
 
@@ -152,13 +146,13 @@ Output a Markdown report (**no file writes**) with the following structure:
152
146
 
153
147
  At end of report, output a concise Next Actions block:
154
148
 
155
- - If CRITICAL issues exist: **Recommend resolving before `prizmkit.implement`**
149
+ - If CRITICAL issues exist: **Recommend resolving before `/prizmkit-implement`**
156
150
  - If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
157
151
  - Provide explicit command suggestions:
158
- - "Run `prizmkit.specify` to refine requirements"
159
- - "Run `prizmkit.plan` to adjust architecture or tasks"
152
+ - "Run `/prizmkit-specify` to refine requirements"
153
+ - "Run `/prizmkit-plan` to adjust architecture or tasks"
160
154
  - "Edit tasks.md to add coverage for requirement X"
161
- - "Proceed to `prizmkit.implement`" (if clean)
155
+ - "Proceed to `/prizmkit-implement`" (if clean)
162
156
 
163
157
  ### Step 8: Offer Remediation
164
158
 
@@ -167,19 +161,37 @@ Ask the user: "Would you like me to suggest concrete remediation edits for the t
167
161
  ## Operating Principles
168
162
 
169
163
  ### Context Efficiency
170
- - **Minimal high-signal tokens**: Focus on actionable findings, not exhaustive documentation
171
- - **Progressive disclosure**: Load artifacts incrementally; don't dump all content into analysis
172
- - **Token-efficient output**: Limit findings table to 50 rows; summarize overflow
173
- - **Deterministic results**: Rerunning without changes should produce consistent IDs and counts
174
-
175
- ### Analysis Guidelines
176
- - **NEVER modify files** (this is read-only analysis)
177
- - **NEVER hallucinate missing sections** (if absent, report them accurately)
178
- - **Prioritize Prizm Rules violations** (these are always CRITICAL)
179
- - **Use examples over exhaustive rules** (cite specific instances, not generic patterns)
180
- - **Report zero issues gracefully** (emit success report with coverage statistics)
181
-
182
- **HANDOFF:** `prizmkit.implement` (if clean) or `prizmkit.specify` / `prizmkit.plan` (if issues found)
164
+ - Focus on actionable findings, not exhaustive documentation — the goal is to surface problems, not prove you read everything
165
+ - Load artifacts incrementally; reading all content upfront wastes tokens on sections irrelevant to the feature
166
+ - Cap findings at 50 rows to keep the report scannable; summarize overflow with counts
167
+ - Rerunning without changes should produce consistent IDs and counts (deterministic)
168
+
169
+ ### Analysis Approach
170
+ - Do not modify files read-only analysis ensures artifacts remain stable for the implement phase
171
+ - If a section is absent, report it accurately rather than guessing what it might contain
172
+ - Prizm Rules violations are always CRITICAL — they represent project-wide constraints that outrank individual feature decisions
173
+ - Cite specific instances rather than generic patterns "spec §2.1 says REST but plan §Architecture says GraphQL" is more useful than "terminology inconsistency found"
174
+ - If zero issues found, report success with coverage statistics — a clean report is valuable confirmation
175
+
176
+ ## Example Finding
177
+
178
+ ```
179
+ | ID | Category | Severity | Location(s) | Summary | Recommendation |
180
+ |----|----------|----------|-------------|---------|----------------|
181
+ | D1 | Rules Alignment | CRITICAL | plan.md §Architecture | Plan specifies SQLite but root.prizm RULES has "MUST: use PostgreSQL for all persistent storage" | Change plan to use PostgreSQL or request rule amendment via prizmkit-prizm-docs |
182
+ | E1 | Coverage Gap | HIGH | spec.md §FR-3 | "User can export reports as PDF" has no corresponding task in plan.md Tasks section | Add export task to Phase 3 of plan.md |
183
+ ```
184
+
185
+ **HANDOFF:** `/prizmkit-implement` (if clean) or `/prizmkit-specify` / `/prizmkit-plan` (if issues found)
186
+
187
+ ## Loop Protection
188
+
189
+ In unattended pipeline mode, the analyze→fix→analyze cycle can loop indefinitely if issues keep reappearing. To prevent this:
190
+
191
+ - Track an `analyze_iteration` counter starting at 1. Each re-run of this skill after remediation increments the counter.
192
+ - **max_iterations = 5**: If `analyze_iteration >= 5`, you MUST proceed to `/prizmkit-implement` regardless of remaining findings. Log a warning: "Loop protection triggered — proceeding to implement with N unresolved findings (iterations: 5/5)."
193
+ - Unresolved findings from the final iteration should be noted in the handoff so that `/prizmkit-code-review` can catch them downstream.
194
+ - This guard exists because some findings oscillate (fixing one re-introduces another) and blocking forever is worse than proceeding with known issues.
183
195
 
184
196
  ## Output
185
197
 
@@ -1,51 +1,61 @@
1
1
  ---
2
2
  name: "prizmkit-clarify"
3
- description: "Interactive requirement clarification. Resolves ambiguities in feature specs by asking sequential questions. Invoke after 'specify' or when spec has NEEDS CLARIFICATION markers. (project)"
3
+ description: "Interactive requirement clarification. Resolves ambiguities in feature specs by asking sequential questions with recommended answers. Use when spec has unclear parts or you're unsure about requirements before planning. Use this skill whenever a spec has [NEEDS CLARIFICATION] markers, vague requirements, or the user wants to refine their feature definition before planning. Trigger on: 'clarify', 'refine spec', 'resolve ambiguities', 'spec has questions', 'unsure about requirements', 'spec is unclear'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Clarify
7
7
 
8
8
  Interactive requirement clarification that resolves ambiguities in feature specifications. Asks focused questions one at a time, updating the spec atomically after each answer.
9
9
 
10
- ## Commands
11
-
12
- ### prizmkit.clarify
13
-
14
- Resolve ambiguities and underspecified areas in a feature specification.
10
+ ### When to Use
11
+ - After `/prizmkit-specify` when spec has `[NEEDS CLARIFICATION]` markers
12
+ - User says "clarify", "resolve ambiguities", "refine spec"
13
+ - Before `/prizmkit-plan` to ensure spec is unambiguous
15
14
 
16
15
  **PRECONDITION:** `spec.md` exists in current feature directory (`.prizmkit/specs/###-feature-name/`)
17
16
 
18
- **STEPS:**
17
+ ## Execution Steps
19
18
 
20
19
  1. Read `spec.md` from `.prizmkit/specs/###-feature-name/`
21
20
  2. Scan for `[NEEDS CLARIFICATION]` markers and underspecified areas
22
- 3. Categorize ambiguities by dimension:
23
- - Functional scope
24
- - Data model
25
- - UX flow
26
- - Non-functional requirements
27
- - Error handling
28
- - Edge cases
29
- - Integration points
30
- - Security
31
- - Performance
32
- - Accessibility
33
- 4. Ask questions ONE AT A TIME (not all at once), max 5 questions
34
- 5. For each question: provide a recommended answer with rationale
35
- 6. After each answer: immediately update `spec.md` atomically (not batch)
36
- 7. Support early termination: user says "done" or "stop"
21
+ 3. Categorize ambiguities by dimension and prioritize — address the ones that would most affect architecture and data model first, since those are hardest to change later:
22
+ - Functional scope (what does it do?)
23
+ - Data model (what entities, relationships?)
24
+ - UX flow (what does the user see?)
25
+ - Error handling (what happens when things fail?)
26
+ - Non-functional requirements (performance, security)
27
+ - Edge cases, integration points, accessibility
28
+ 4. Ask questions one at a time (max 5 per session) — batch questions overwhelm users and produce lower-quality answers because they rush through without thinking deeply about each one
29
+ 5. For each question: provide a recommended answer with rationale. The recommendation gives users a concrete starting point to accept, modify, or reject — this is much faster than open-ended questions
30
+ 6. After each answer: immediately update `spec.md` (not batched at the end). Atomic updates mean the spec is always in a consistent state, even if the session is interrupted
31
+ 7. Support early termination: user says "done" or "stop" — end immediately
37
32
  8. Remove resolved `[NEEDS CLARIFICATION]` markers
38
33
  9. After all questions resolved or user terminates: output summary of changes made
39
34
 
40
- **KEY RULES:**
41
- - NEVER ask all questions at once — sequential, one at a time
42
- - ALWAYS provide a recommended answer with rationale for each question
43
- - Updates to `spec.md` MUST be atomic (after each answer, not batched)
44
- - Max 5 questions per session
45
- - Respect early termination "done" or "stop" ends the session immediately
46
- - Do NOT introduce implementation details — keep spec at WHAT/WHY level
35
+ ## Example Session
36
+
37
+ **Question 1:**
38
+ > spec.md §3.2 says "User can upload files" but doesn't specify which file types or size limits.
39
+ >
40
+ > **Recommended answer:** Accept JPEG, PNG, and PDF up to 10MB. These are the most common user upload types, and 10MB covers high-res photos without straining storage.
41
+ >
42
+ > Do you agree, or would you like different constraints?
43
+
44
+ **User:** "Also allow SVG, and make it 25MB"
45
+
46
+ **Action:** Update spec.md §3.2:
47
+ ```
48
+ File upload: accepts JPEG, PNG, PDF, SVG. Max size: 25MB per file.
49
+ ```
50
+ Remove `[NEEDS CLARIFICATION]` marker from §3.2.
51
+
52
+ ## Guidelines
53
+
54
+ - Keep questions at the WHAT/WHY level — do not introduce implementation details (HOW). The spec describes the problem space; implementation choices belong in plan.md
55
+ - 5-question limit per session keeps clarification focused. If more questions remain, tell the user and suggest running clarify again after they've had time to think
56
+ - If the user's answer contradicts an existing requirement, point out the conflict and ask which one should change
47
57
 
48
- **HANDOFF:** `prizmkit.plan`
58
+ **HANDOFF:** `/prizmkit-plan`
49
59
 
50
60
  ## Output
51
61
 
@@ -1,70 +1,75 @@
1
1
  ---
2
2
  name: "prizmkit-code-review"
3
- description: "Code review against spec, plan, and best practices. Read-only analysis with severity ratings. Invoke after implementation or when user requests review. (project)"
3
+ description: "Code review against spec, plan, and best practices. Read-only analysis with severity ratings. Use this skill after implementation to catch spec compliance gaps, security issues, and pattern violations before committing. Trigger on: 'review', 'check code', 'review my implementation', '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. Produces a structured review report with severity ratings. This skill is strictly read-only and does not modify any files.
8
+ Perform a comprehensive code review against the feature spec, implementation plan, and project best practices. Produces a structured review report with severity ratings. This skill is strictly read-only it surfaces issues without auto-fixing them, so you can decide what actually needs changing.
9
9
 
10
- ## Commands
11
-
12
- ### prizmkit.code-review
13
-
14
- Review implemented code against spec and plan.
10
+ ### When to Use
11
+ - After `/prizmkit-implement` to verify code quality before commit
12
+ - User says "review", "check code", "review my implementation"
13
+ - As a quality gate before `/prizmkit-committer`
15
14
 
16
15
  **PRECONDITION:** `spec.md`, `plan.md`, `tasks.md` exist in `.prizmkit/specs/###-feature-name/` with completed tasks
17
16
 
18
- **STEPS:**
17
+ ## Execution Steps
19
18
 
20
19
  1. Read `spec.md`, `plan.md`, `tasks.md` as review baseline
21
20
  2. Read `.prizm-docs/root.prizm` RULES for project conventions
22
21
  3. Scan all code files referenced in completed tasks
23
22
  4. Review across 6 dimensions:
24
- - **Spec compliance**: Does code implement all acceptance criteria?
25
- - **Plan adherence**: Does implementation follow architectural decisions?
26
- - **Code quality**: Naming, structure, complexity, DRY
27
- - **Security**: Common vulnerabilities (injection, auth, data exposure)
28
- - **Consistency**: Follows project patterns from `.prizm-docs/` PATTERNS
29
- - **Test coverage**: Are critical paths tested?
23
+ - **Spec compliance**: Does code implement all acceptance criteria? Missing criteria are the #1 source of "it works but it's wrong" bugs
24
+ - **Plan adherence**: Does implementation follow architectural decisions in plan.md? Deviations may be improvements or may break assumptions other components depend on
25
+ - **Code quality**: Naming, structure, complexity, DRY. Focus on maintainability — will someone understand this code in 6 months?
26
+ - **Security**: Injection (SQL, XSS, command), auth/authz gaps, sensitive data exposure, insecure defaults. Security issues are always HIGH+ because they're the hardest to catch later
27
+ - **Consistency**: Follows project patterns from `.prizm-docs/` PATTERNS section. Inconsistent patterns increase cognitive load for every future reader
28
+ - **Test coverage**: Are critical paths tested? Focus on paths that handle user input, money, or state transitions
30
29
  5. Generate findings with severity: `CRITICAL` > `HIGH` > `MEDIUM` > `LOW`
31
- 6. Max 30 findings
32
- 7. Verdict: `PASS` | `PASS WITH WARNINGS` | `NEEDS FIXES`
33
- 8. OUTPUT: Structured review report (to conversation only, NOT written to file)
34
-
35
- **KEY RULES:**
36
- - This is STRICTLY READ-ONLYdoes NOT modify any files
37
- - Output goes to conversation ONLY, not to any file
38
- - Max 30 findings to keep review actionable
39
- - Every CRITICAL finding MUST include a specific fix suggestion
40
- - Spec compliance failures are always rated HIGH or CRITICAL
41
- - Security findings are always rated HIGH or CRITICAL
42
-
43
- **VERDICT CRITERIA:**
30
+ 6. Determine verdict (see criteria below)
31
+ 7. Output structured review report to conversation only
32
+
33
+ ## Severity & Verdict
34
+
35
+ 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.
36
+
37
+ **Verdict criteria:**
44
38
  - `PASS`: No CRITICAL or HIGH findings
45
39
  - `PASS WITH WARNINGS`: No CRITICAL findings, some HIGH findings
46
40
  - `NEEDS FIXES`: Any CRITICAL findings present
47
41
 
48
- **HANDOFF:** `prizmkit.summarize` (if PASS) or `prizmkit.implement` (if NEEDS FIXES)
42
+ Cap findings at 30 to keep the review actionable. If there are more, summarize the overflow with counts by dimension. Every CRITICAL finding includes a specific fix suggestion — telling someone "this is broken" without saying how to fix it wastes their time.
49
43
 
50
- ## Output
44
+ 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.
51
45
 
52
- Review report is output to conversation only. No files are created or modified.
46
+ ## Example Finding
53
47
 
54
- **Report Format:**
55
48
  ```
56
- ## Code Review: [Feature Name]
49
+ #### [CRITICAL] SQL Injection in User Search
50
+ - File: src/services/userService.ts:47
51
+ - Dimension: security
52
+ - Description: User input `searchTerm` is interpolated directly into SQL query string without parameterization
53
+ - Suggestion: Use parameterized query: `db.query('SELECT * FROM users WHERE name LIKE $1', [`%${searchTerm}%`])`
54
+
55
+ #### [HIGH] Missing Acceptance Criterion
56
+ - File: src/routes/upload.ts
57
+ - Dimension: spec-compliance
58
+ - Description: spec.md §AC-3 requires "display progress bar during upload" but no progress tracking is implemented
59
+ - Suggestion: Add upload progress callback using xhr.upload.onprogress or fetch with ReadableStream
60
+ ```
57
61
 
58
- ### Summary
59
- - Files reviewed: N
60
- - Findings: N (Critical: N, High: N, Medium: N, Low: N)
61
- - Verdict: [PASS | PASS WITH WARNINGS | NEEDS FIXES]
62
+ **HANDOFF:** `/prizmkit-retrospective` (if PASS) or `/prizmkit-implement` (if NEEDS FIXES)
62
63
 
63
- ### Findings
64
+ ## Loop Protection
64
65
 
65
- #### [SEVERITY] Finding Title
66
- - File: path/to/file:line
67
- - Dimension: [spec-compliance | plan-adherence | code-quality | security | consistency | test-coverage]
68
- - Description: [What was found]
69
- - Suggestion: [How to fix]
70
- ```
66
+ In unattended pipeline mode, the review→fix→review cycle can loop indefinitely if fixes introduce new issues. To prevent this:
67
+
68
+ - Track a `review_iteration` counter starting at 1. Each review-fix-review cycle increments the counter.
69
+ - **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)."
70
+ - Unresolved findings should be recorded in the review report so they can be tracked as follow-up work.
71
+ - This guard exists because some review cycles oscillate (fixing one issue introduces another) and blocking forever is worse than shipping with documented known issues.
72
+
73
+ ## Output
74
+
75
+ Review report is output to conversation only. No files are created or modified.
@@ -1,17 +1,18 @@
1
1
  ---
2
2
  name: "prizmkit-committer"
3
- description: "Commit workflow with automatic Prizm doc updates, changelog management, and learning capture. Invoke when user wants to commit, finish task, or ship changes. (project)"
3
+ description: "Pure git commit workflow with safety checks. Stages files, analyzes diff, generates Conventional Commits message, and commits. Does NOT modify .prizm-docs/ memory maintenance is handled by /prizmkit-retrospective before this skill is invoked. Trigger on: 'commit', '提交', 'finish', 'done', 'ship it', 'save my work'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Committer
7
7
 
8
- Automated commit workflow that keeps Prizm documentation in sync, manages changelog entries, and captures learnings from each commit.
8
+ Pure git commit workflow. Analyzes changes, generates a Conventional Commits message, performs safety checks, and commits.
9
+
10
+ **This skill does NOT modify any project files.** It only reads and commits. All documentation and memory maintenance must be completed before invoking this skill (via `/prizmkit-retrospective`).
9
11
 
10
12
  ### When to Use
11
13
  - User says "commit", "提交", "finish", "done with this task", "ship it"
12
- - After implementing a feature or fixing a bug
13
- - CodeBuddy: the UserPromptSubmit hook will remind to use this skill
14
- - Claude Code: the `.claude/rules/prizm-commit-workflow.md` rule will enforce this
14
+ - After `/prizmkit-retrospective` has finished memory maintenance
15
+ - The UserPromptSubmit hook will remind to use this skill when commit intent is detected
15
16
 
16
17
  ### Workflow
17
18
 
@@ -24,53 +25,7 @@ git status
24
25
  - If "nothing to commit, working tree clean": inform user and stop
25
26
  - If there are changes: proceed
26
27
 
27
- #### Step 2: Prizm Documentation Update (CRITICAL — must complete before commit)
28
-
29
- 2a. Get changed files:
30
- ```bash
31
- git diff --cached --name-status
32
- ```
33
- If nothing staged, also check:
34
- ```bash
35
- git diff --name-status
36
- ```
37
-
38
- 2b. Read .prizm-docs/root.prizm to get MODULE_INDEX
39
-
40
- 2c. Map each changed file to its module using MODULE_INDEX paths
41
-
42
- 2d. For each affected module:
43
- - IF L2 doc exists (.prizm-docs/<module>/<submodule>.prizm):
44
- - Update KEY_FILES (add new files, remove deleted, note modified)
45
- - Update INTERFACES (if public signatures changed)
46
- - Update DEPENDENCIES (if imports changed)
47
- - Append to module CHANGELOG section
48
- - Update UPDATED timestamp
49
- - IF L1 doc exists (.prizm-docs/<module>.prizm):
50
- - Update FILES count
51
- - Update KEY_FILES (if major files added/removed)
52
- - Update UPDATED timestamp
53
- - Update root.prizm:
54
- - Update MODULE_INDEX file counts (only if counts changed)
55
- - UPDATED timestamp (only if structural changes)
56
-
57
- 2e. Append to .prizm-docs/changelog.prizm:
58
- Format: `- YYYY-MM-DD | <module-path> | <verb>: <one-line description>`
59
- Verbs: add, update, fix, remove, refactor, rename, deprecate
60
-
61
- 2f. Stage prizm docs:
62
- ```bash
63
- git add .prizm-docs/
64
- ```
65
-
66
- SKIP CONDITIONS for doc update:
67
- - Only internal implementation changed (no interface/dependency change)
68
- - Only comments, whitespace, or formatting changed
69
- - Only test files changed
70
- - Only .prizm files changed (avoid circular updates)
71
- - Bug fixes to existing features (bugs are incomplete features being refined, not new functionality — no new doc entries needed)
72
-
73
- #### Step 3: Diff Analysis
28
+ #### Step 2: Diff Analysis
74
29
  ```bash
75
30
  git diff HEAD
76
31
  ```
@@ -79,16 +34,12 @@ Analyze:
79
34
  - Scope: affected module name
80
35
  - Description: imperative mood summary
81
36
 
82
- #### Step 4: Update CHANGELOG.md
83
- If CHANGELOG.md exists, append entry following Keep a Changelog format.
84
- If manage_changelog.py exists in skill scripts:
85
- ```bash
86
- python3 ${SKILL_DIR}/scripts/manage_changelog.py add --type <type> --message "<description>"
87
- ```
37
+ #### Step 3: Update CHANGELOG.md
38
+ 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.
88
39
 
89
- #### Step 5: Git Commit
40
+ #### Step 4: Git Commit
90
41
 
91
- 5a. Safety check before staging:
42
+ 4a. Safety check before staging:
92
43
  ```bash
93
44
  git diff --name-only
94
45
  git ls-files --others --exclude-standard
@@ -99,18 +50,18 @@ Review the output for sensitive files. If any file matches these patterns, **STO
99
50
  - `credentials.*`, `*secret*`
100
51
  - `*.sqlite`, `*.db` (database files)
101
52
 
102
- 5b. Stage and commit:
53
+ 4b. Stage and commit:
103
54
  ```bash
104
- git add -A
55
+ git add <specific-files>
105
56
  git diff --cached --name-only
106
57
  ```
107
- Review staged file list one final time, then:
58
+ Stage files explicitly by name rather than using `git add -A`, which can accidentally include sensitive files or large binaries that appeared between the safety check and staging. Review staged file list one final time, then:
108
59
  ```bash
109
60
  git commit -m "<type>(<scope>): <description>"
110
61
  ```
111
62
  Follow Conventional Commits format.
112
63
 
113
- #### Step 6: Verification
64
+ #### Step 5: Verification
114
65
  ```bash
115
66
  git log -1 --stat
116
67
  ```
@@ -121,9 +72,9 @@ Then verify working tree is clean:
121
72
  git status
122
73
  ```
123
74
  - If "nothing to commit, working tree clean": commit verified successfully, proceed
124
- - If there are uncommitted changes remaining: **STOP** and report error all changes must be captured in the commit. Run `git add -A && git commit --amend --no-edit` to include missed files, then re-verify
75
+ - If there are uncommitted changes remaining: **STOP** and report what files were missed. Stage the missed files explicitly by name and create a new commit (do NOT amend the previous commit amending risks destroying unrelated changes from prior commits)
125
76
 
126
- #### Step 7: Optional Push
77
+ #### Step 6: Optional Push
127
78
  Ask user: "Push to remote?"
128
79
  - Yes: `git push`
129
80
  - No: Stop
@@ -131,5 +82,16 @@ Ask user: "Push to remote?"
131
82
  ### Error Handling
132
83
  - If git diff is empty but untracked files exist: run `git add -N .` first (respects .gitignore)
133
84
  - If CHANGELOG.md script fails: update manually or ask user
134
- - If .prizm-docs/ doesn't exist: skip Step 2 entirely (project not initialized)
135
- - If sensitive files are detected during Step 5a safety check: warn user and do NOT stage them automatically
85
+ - If sensitive files are detected during Step 4a safety check: warn user and do NOT stage them automatically
86
+
87
+ ## Example
88
+
89
+ **Feature commit:**
90
+ ```
91
+ git commit -m "feat(avatar): add user avatar upload with S3 storage"
92
+ ```
93
+
94
+ **Bug fix commit:**
95
+ ```
96
+ git commit -m "fix(auth): handle null token in refresh flow"
97
+ ```
@@ -1,46 +1,68 @@
1
1
  ---
2
2
  name: "prizmkit-implement"
3
- description: "Execute implementation following tasks.md. Respects task ordering, dependencies, and TDD approach. Marks tasks complete as they finish. Invoke with 'implement' or 'build'. (project)"
3
+ description: "Execute implementation following plan.md tasks. Respects task ordering, dependencies, and TDD approach. Marks tasks complete as they finish. Use this skill whenever you're ready to write code for a planned feature, or for fast-path changes where the user describes a simple fix directly. Trigger on: 'implement', 'build', 'code it', 'start coding', '开发', 'write the code'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Implement
7
7
 
8
- Execute implementation by following the task breakdown in tasks.md. Respects task ordering, dependency constraints, and applies a TDD approach where applicable. Marks each task complete as it finishes.
8
+ Execute implementation by following the task breakdown in plan.md. Respects task ordering, dependency constraints, and applies a TDD approach where applicable. Marks each task complete as it finishes.
9
9
 
10
- ## Commands
11
-
12
- ### prizmkit.implement
13
-
14
- Implement the feature by executing tasks from tasks.md.
10
+ ### When to Use
11
+ - After `/prizmkit-plan` (or `/prizmkit-analyze`) when ready to write code
12
+ - User says "implement", "build", "code it", "start coding", "开发"
13
+ - For fast-path: user describes a simple change directly (skip specify/plan)
15
14
 
16
15
  **PRECONDITION:** `plan.md` exists in `.prizmkit/specs/###-feature-name/` with a Tasks section containing unchecked tasks
17
16
 
18
- **STEPS:**
17
+ ## Execution Steps
19
18
 
20
19
  1. Read `plan.md` (including Tasks section), `spec.md` for full context
21
- 2. Load project context (use first available source):
22
- - If `.prizmkit/specs/###-feature-name/context-snapshot.md` exists → read it (Section 3 has Prizm docs + TRAPS, Section 4 has source files). Do NOT re-read `.prizm-docs/` or individual source files.
23
- - Otherwise → read relevant `.prizm-docs/` L1/L2 for affected modules (check TRAPS and DECISIONS sections)
20
+ 2. Load project context use the most efficient source available:
21
+ - If `context-snapshot.md` exists in the feature directory → read it. Section 3 has Prizm docs + TRAPS, Section 4 has source files. This snapshot was built in Phase 1 of the pipeline to avoid re-reading dozens of individual files, saving significant tokens.
22
+ - Otherwise → read relevant `.prizm-docs/` L1/L2 for affected modules. Pay special attention to TRAPS (gotchas, race conditions) and DECISIONS (past architectural choices you should respect).
24
23
  3. Check if checkpoint tasks are complete before proceeding to next phase
25
24
  4. For each unchecked task in order:
26
- a. If task has `[P]` marker and previous parallel tasks are running, can proceed in parallel
27
- b. Read L2 doc for target file's module (if exists)
28
- c. Implement following TDD: write test first if applicable
29
- d. Mark task as `[x]` in `plan.md` Tasks section
30
- e. If error occurs: for sequential tasks, stop and report; for parallel tasks, continue others
31
- 5. At each checkpoint: verify build passes and tests pass
25
+ a. If task has `[P]` marker, it can run in parallel with other `[P]` tasks in the same group
26
+ b. Read L2 doc for target file's module (if exists) — TRAPS save you from repeating known mistakes
27
+ 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.
28
+ 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.
29
+ e. Error handling: sequential tasks stop on failure (later tasks may depend on this one). Parallel `[P]` tasks continue — report all failures at the end.
30
+ 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.
32
31
  6. After all tasks: run full test suite
33
- 7. Output: implementation summary with pass/fail status
32
+ 7. Output implementation summary with pass/fail status
33
+
34
+ ## Task Format in plan.md
35
+
36
+ Tasks in plan.md look like this:
37
+ ```markdown
38
+ ## Tasks
39
+
40
+ ### Phase 1: Data Layer
41
+ - [ ] Create User model with avatar field in src/models/user.ts
42
+ - [ ] Add S3 upload utility in src/lib/s3.ts
43
+ - [x] ~~Set up database migration~~ (already done)
44
+
45
+ ### Phase 2: API [P]
46
+ - [ ] [P] POST /api/avatar endpoint in src/routes/avatar.ts
47
+ - [ ] [P] DELETE /api/avatar endpoint in src/routes/avatar.ts
48
+
49
+ ### Phase 3: UI
50
+ - [ ] Avatar upload component in src/components/AvatarUpload.tsx
51
+ - [ ] CP: Integration checkpoint — full test suite must pass
52
+ ```
53
+
54
+ - `[ ]` / `[x]` — unchecked / completed
55
+ - `[P]` — can run in parallel with other `[P]` tasks in the same phase
56
+ - `CP:` — checkpoint where build + tests must pass before continuing
57
+
58
+ ## Recovery
34
59
 
35
- **KEY RULES:**
36
- - NEVER skip a checkpoint build and tests MUST pass before proceeding to next phase
37
- - Sequential tasks MUST execute in order stop on failure
38
- - Parallel tasks (`[P]` marker) MAY continue if one fails, but report all failures
39
- - TDD approach: write test first, then implement, then verify test passes
40
- - Read TRAPS before implementing: prefer `context-snapshot.md` Section 3 (if exists), otherwise `.prizm-docs/` TRAPS section
41
- - Mark each task `[x]` in `plan.md` Tasks section immediately upon completion (not batched)
60
+ If a session is interrupted mid-implementation:
61
+ - Completed tasks are already marked `[x]` in plan.md (because we mark immediately)
62
+ - Resume by re-running `/prizmkit-implement` it picks up from the first unchecked task
63
+ - context-snapshot.md persists across sessions for consistent context
42
64
 
43
- **HANDOFF:** `prizmkit.code-review`
65
+ **HANDOFF:** `/prizmkit-code-review`
44
66
 
45
67
  ## Output
46
68