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.
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/claude/agent-adapter.js +2 -1
- package/bundled/adapters/claude/command-adapter.js +4 -3
- package/bundled/agents/prizm-dev-team-dev.md +1 -1
- package/bundled/dev-pipeline/README.md +3 -4
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +2 -3
- package/bundled/dev-pipeline/launch-bugfix-daemon.sh +2 -2
- package/bundled/dev-pipeline/launch-daemon.sh +2 -2
- package/bundled/dev-pipeline/lib/branch.sh +76 -0
- package/bundled/dev-pipeline/run-bugfix.sh +58 -149
- package/bundled/dev-pipeline/run.sh +60 -153
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +8 -16
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +10 -18
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +20 -24
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +6 -6
- package/bundled/dev-pipeline/tests/conftest.py +19 -131
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +207 -0
- package/bundled/dev-pipeline/tests/test_utils.py +51 -110
- package/bundled/rules/prizm/prizm-commit-workflow.md +3 -3
- package/bundled/skills/_metadata.json +15 -16
- package/bundled/skills/app-planner/SKILL.md +8 -7
- package/bundled/skills/bug-fix-workflow/SKILL.md +174 -0
- package/bundled/skills/bug-planner/SKILL.md +20 -32
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +3 -5
- package/bundled/skills/dev-pipeline-launcher/SKILL.md +4 -6
- package/bundled/skills/feature-workflow/SKILL.md +25 -42
- package/bundled/skills/prizm-kit/SKILL.md +57 -21
- package/bundled/skills/prizm-kit/assets/{claude-md-template.md → project-memory-template.md} +2 -2
- package/bundled/skills/prizmkit-analyze/SKILL.md +41 -29
- package/bundled/skills/prizmkit-clarify/SKILL.md +40 -30
- package/bundled/skills/prizmkit-code-review/SKILL.md +48 -43
- package/bundled/skills/prizmkit-committer/SKILL.md +30 -68
- package/bundled/skills/prizmkit-implement/SKILL.md +48 -26
- package/bundled/skills/prizmkit-init/SKILL.md +57 -66
- package/bundled/skills/prizmkit-plan/SKILL.md +46 -20
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +60 -19
- package/bundled/skills/prizmkit-prizm-docs/assets/PRIZM-SPEC.md +23 -23
- package/bundled/skills/prizmkit-retrospective/SKILL.md +142 -65
- package/bundled/skills/prizmkit-retrospective/assets/retrospective-template.md +13 -0
- package/bundled/skills/prizmkit-specify/SKILL.md +63 -13
- package/bundled/skills/refactor-workflow/SKILL.md +105 -49
- package/bundled/team/prizm-dev-team.json +2 -2
- package/package.json +1 -1
- package/src/scaffold.js +3 -3
- package/bundled/dev-pipeline/lib/worktree.sh +0 -164
- package/bundled/dev-pipeline/tests/__init__.py +0 -0
- package/bundled/dev-pipeline/tests/test_check_session.py +0 -131
- package/bundled/dev-pipeline/tests/test_cleanup_logs.py +0 -119
- package/bundled/dev-pipeline/tests/test_detect_stuck.py +0 -207
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +0 -181
- package/bundled/dev-pipeline/tests/test_generate_prompt.py +0 -190
- package/bundled/dev-pipeline/tests/test_init_bugfix_pipeline.py +0 -153
- package/bundled/dev-pipeline/tests/test_init_pipeline.py +0 -241
- package/bundled/dev-pipeline/tests/test_update_bug_status.py +0 -142
- package/bundled/dev-pipeline/tests/test_update_feature_status.py +0 -338
- package/bundled/dev-pipeline/tests/test_worktree.py +0 -236
- package/bundled/dev-pipeline/tests/test_worktree_integration.py +0 -796
- package/bundled/skills/prizm-kit/assets/codebuddy-md-template.md +0 -35
- package/bundled/skills/prizm-kit/assets/hooks/prizm-commit-hook.json +0 -15
- package/bundled/skills/prizmkit-summarize/SKILL.md +0 -51
- package/bundled/skills/prizmkit-summarize/assets/registry-template.md +0 -18
- package/bundled/templates/hooks/commit-intent-claude.json +0 -26
- /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
|
|
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
|
|
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
|
-
**
|
|
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
|
|
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 (
|
|
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
|
|
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
|
|
159
|
-
- "Run
|
|
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
|
|
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
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
|
|
175
|
-
### Analysis
|
|
176
|
-
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
|
|
182
|
-
|
|
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.
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
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
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- Edge cases
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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:**
|
|
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.
|
|
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
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
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**:
|
|
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.
|
|
32
|
-
7.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
46
|
+
## Example Finding
|
|
53
47
|
|
|
54
|
-
**Report Format:**
|
|
55
48
|
```
|
|
56
|
-
|
|
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
|
-
|
|
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
|
-
|
|
64
|
+
## Loop Protection
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
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: "
|
|
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
|
-
|
|
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
|
|
13
|
-
-
|
|
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:
|
|
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
|
|
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
|
|
40
|
+
#### Step 4: Git Commit
|
|
90
41
|
|
|
91
|
-
|
|
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
|
-
|
|
53
|
+
4b. Stage and commit:
|
|
103
54
|
```bash
|
|
104
|
-
git add -
|
|
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
|
|
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
|
|
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
|
|
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
|
|
135
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
17
|
+
## Execution Steps
|
|
19
18
|
|
|
20
19
|
1. Read `plan.md` (including Tasks section), `spec.md` for full context
|
|
21
|
-
2. Load project context
|
|
22
|
-
- If
|
|
23
|
-
- Otherwise → read relevant `.prizm-docs/` L1/L2 for affected modules
|
|
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
|
|
27
|
-
b. Read L2 doc for target file's module (if exists)
|
|
28
|
-
c.
|
|
29
|
-
d. Mark task as `[x]` in `plan.md` Tasks section
|
|
30
|
-
e.
|
|
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
|
|
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
|
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
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:**
|
|
65
|
+
**HANDOFF:** `/prizmkit-code-review`
|
|
44
66
|
|
|
45
67
|
## Output
|
|
46
68
|
|