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.
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/codebuddy/skill-adapter.js +21 -7
- package/bundled/agents/prizm-dev-team-reviewer.md +53 -173
- package/bundled/dev-pipeline/.env.example +45 -0
- package/bundled/dev-pipeline/README.md +64 -64
- package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +535 -0
- package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
- package/bundled/dev-pipeline/launch-bugfix-daemon.sh +64 -18
- package/bundled/dev-pipeline/launch-feature-daemon.sh +15 -12
- package/bundled/dev-pipeline/launch-refactor-daemon.sh +64 -18
- package/bundled/dev-pipeline/lib/branch.sh +6 -1
- package/bundled/dev-pipeline/lib/common.sh +71 -0
- package/bundled/dev-pipeline/lib/heartbeat.sh +2 -2
- package/bundled/dev-pipeline/reset-bug.sh +10 -9
- package/bundled/dev-pipeline/reset-feature.sh +9 -8
- package/bundled/dev-pipeline/reset-refactor.sh +10 -9
- package/bundled/dev-pipeline/retry-bugfix.sh +67 -29
- package/bundled/dev-pipeline/retry-feature.sh +54 -18
- package/bundled/dev-pipeline/retry-refactor.sh +112 -29
- package/bundled/dev-pipeline/run-bugfix.sh +281 -59
- package/bundled/dev-pipeline/run-feature.sh +53 -18
- package/bundled/dev-pipeline/run-refactor.sh +392 -66
- package/bundled/dev-pipeline/scripts/check-session-status.py +24 -1
- package/bundled/dev-pipeline/scripts/cleanup-logs.py +2 -2
- package/bundled/dev-pipeline/scripts/detect-stuck.py +195 -85
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +57 -33
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +25 -9
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +104 -17
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +34 -9
- package/bundled/dev-pipeline/scripts/init-pipeline.py +10 -10
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +19 -8
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -5
- package/bundled/dev-pipeline/scripts/patch-completion-notes.py +191 -0
- package/bundled/dev-pipeline/scripts/update-bug-status.py +167 -22
- package/bundled/dev-pipeline/scripts/update-feature-status.py +104 -62
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +351 -21
- package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +1 -1
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +7 -11
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +41 -7
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +27 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +43 -19
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +54 -26
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +6 -15
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +36 -25
- package/bundled/dev-pipeline/templates/feature-list-schema.json +109 -31
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +270 -0
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +11 -3
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +3 -1
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +1 -0
- package/bundled/dev-pipeline/templates/sections/feature-context.md +2 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +29 -2
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +22 -0
- package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +8 -6
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +7 -5
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
- package/bundled/skills/_metadata.json +5 -22
- package/bundled/skills/app-planner/SKILL.md +98 -72
- package/bundled/skills/app-planner/assets/app-design-guide.md +1 -1
- package/bundled/skills/app-planner/references/architecture-decisions.md +1 -1
- package/bundled/skills/app-planner/references/project-brief-guide.md +69 -66
- package/bundled/skills/bug-fix-workflow/SKILL.md +52 -9
- package/bundled/skills/bug-planner/SKILL.md +139 -197
- package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +43 -0
- package/bundled/skills/bug-planner/references/critic-and-verification.md +44 -0
- package/bundled/skills/bug-planner/references/error-recovery.md +73 -0
- package/bundled/skills/bug-planner/references/input-formats.md +53 -0
- package/bundled/skills/bug-planner/references/schema-validation.md +25 -0
- package/bundled/skills/bug-planner/references/severity-rules.md +16 -0
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +4 -8
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +34 -39
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +49 -36
- package/bundled/skills/feature-pipeline-launcher/scripts/preflight-check.py +3 -3
- package/bundled/skills/feature-planner/SKILL.md +53 -142
- package/bundled/skills/feature-planner/assets/evaluation-guide.md +1 -1
- package/bundled/skills/feature-planner/assets/planning-guide.md +21 -5
- package/bundled/skills/feature-planner/references/browser-interaction.md +2 -4
- package/bundled/skills/feature-planner/references/completeness-review.md +57 -0
- package/bundled/skills/feature-planner/references/error-recovery.md +16 -35
- package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
- package/bundled/skills/feature-planner/references/new-project-planning.md +2 -2
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +19 -20
- package/bundled/skills/feature-workflow/SKILL.md +24 -25
- package/bundled/skills/prizm-kit/SKILL.md +39 -49
- package/bundled/skills/prizmkit-code-review/SKILL.md +51 -64
- package/bundled/skills/prizmkit-code-review/rules/dimensions.md +85 -0
- package/bundled/skills/prizmkit-code-review/rules/fix-strategy.md +11 -11
- package/bundled/skills/prizmkit-committer/SKILL.md +3 -31
- package/bundled/skills/prizmkit-deploy/SKILL.md +34 -31
- package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +1 -1
- package/bundled/skills/prizmkit-implement/SKILL.md +35 -68
- package/bundled/skills/prizmkit-init/SKILL.md +112 -65
- package/bundled/skills/prizmkit-init/assets/project-brief-template.md +82 -0
- package/bundled/skills/prizmkit-plan/SKILL.md +120 -79
- package/bundled/skills/prizmkit-plan/assets/plan-template.md +28 -18
- package/bundled/skills/prizmkit-plan/assets/spec-template.md +28 -11
- package/bundled/skills/prizmkit-plan/references/clarify-guide.md +3 -3
- package/bundled/skills/prizmkit-plan/references/verification-checklist.md +60 -0
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +10 -81
- package/bundled/skills/prizmkit-prizm-docs/assets/{PRIZM-SPEC.md → prizm-docs-format.md} +41 -526
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +46 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +16 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +14 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +19 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +17 -0
- package/bundled/skills/prizmkit-retrospective/SKILL.md +27 -65
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -4
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +7 -25
- package/bundled/skills/recovery-workflow/SKILL.md +22 -22
- package/bundled/skills/recovery-workflow/evals/evals.json +5 -5
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +43 -10
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +48 -40
- package/bundled/skills/refactor-planner/SKILL.md +43 -61
- package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +17 -17
- package/bundled/skills/refactor-workflow/SKILL.md +23 -24
- package/bundled/team/prizm-dev-team.json +1 -1
- package/bundled/{skills/prizm-kit/assets → templates}/project-memory-template.md +1 -1
- package/package.json +1 -1
- package/src/clean.js +3 -4
- package/src/gitignore-template.js +7 -9
- package/src/scaffold.js +14 -5
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +0 -5
- package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +0 -19
- package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +0 -19
- package/bundled/skills/app-planner/references/project-conventions.md +0 -93
- package/bundled/skills/prizmkit-analyze/SKILL.md +0 -207
- package/bundled/skills/prizmkit-code-review/rules/dimensions-bugfix.md +0 -25
- package/bundled/skills/prizmkit-code-review/rules/dimensions-feature.md +0 -43
- package/bundled/skills/prizmkit-code-review/rules/dimensions-refactor.md +0 -25
- package/bundled/skills/prizmkit-implement/references/deploy-guide-protocol.md +0 -69
- package/bundled/skills/prizmkit-verify/SKILL.md +0 -281
- package/bundled/skills/prizmkit-verify/scripts/verify-light.py +0 -402
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "refactor-workflow"
|
|
3
|
-
|
|
4
|
-
description: "One-stop entry point for code refactoring. Brainstorms refactoring goals with the user until fully clarified, then orchestrates refactor-planner → refactor-pipeline-launcher → execution. Handles multi-refactor batch development from a single request. Use this skill whenever the user wants to restructure, clean up, or optimize code without changing behavior. Trigger on: 'refactor', 'clean up code', 'restructure', 'optimize code structure', 'extract module', 'code refactoring', 'batch refactor'. (project)"
|
|
3
|
+
description: "One-stop entry point for code refactoring. Brainstorms refactoring goals with the user until fully clarified, then orchestrates refactor-planner → refactor-pipeline-launcher → execution. Handles multi-refactor batch development from a single request. Use this skill whenever the user wants to restructure, clean up, or optimize code without changing behavior. Trigger on: 'refactor', 'clean up code', 'restructure', 'optimize code structure', 'extract module', 'code refactoring', 'batch refactor'."
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Refactor Workflow
|
|
@@ -19,7 +18,7 @@ User says:
|
|
|
19
18
|
|
|
20
19
|
**Do NOT use this skill when:**
|
|
21
20
|
- User only wants to plan refactoring (use `refactor-planner` directly)
|
|
22
|
-
- User only wants to launch pipeline for existing refactor-list.json (use `refactor-pipeline-launcher`)
|
|
21
|
+
- User only wants to launch pipeline for existing .prizmkit/plans/refactor-list.json (use `refactor-pipeline-launcher`)
|
|
23
22
|
- User wants to add features (use `feature-workflow`)
|
|
24
23
|
- User wants to fix bugs (use `bug-planner` + `bugfix-pipeline-launcher`)
|
|
25
24
|
|
|
@@ -32,7 +31,7 @@ refactor-workflow <target / goals>
|
|
|
32
31
|
│
|
|
33
32
|
├── Phase 1: Brainstorm → interactive Q&A until refactoring goals are clear
|
|
34
33
|
│
|
|
35
|
-
├── Phase 2: Plan → refactor-planner → refactor-list.json
|
|
34
|
+
├── Phase 2: Plan → refactor-planner → .prizmkit/plans/refactor-list.json
|
|
36
35
|
│
|
|
37
36
|
├── Phase 3: Launch → refactor-pipeline-launcher → pipeline execution
|
|
38
37
|
│
|
|
@@ -44,7 +43,7 @@ refactor-workflow <target / goals>
|
|
|
44
43
|
| Phase | Action | Result |
|
|
45
44
|
|-------|--------|--------|
|
|
46
45
|
| 1 | **Brainstorm** — interactive Q&A with user | Fully clarified refactoring goals |
|
|
47
|
-
| 2 | Call `refactor-planner` with clarified goals |
|
|
46
|
+
| 2 | Call `refactor-planner` with clarified goals | `.prizmkit/plans/refactor-list.json` with N refactor items |
|
|
48
47
|
| 3 | Call `refactor-pipeline-launcher` | Pipeline started (execution mode chosen by user via launcher) |
|
|
49
48
|
| 4 | Monitor progress | Status updates, completion report |
|
|
50
49
|
|
|
@@ -52,7 +51,7 @@ refactor-workflow <target / goals>
|
|
|
52
51
|
|
|
53
52
|
Without this skill, users must:
|
|
54
53
|
1. Figure out all refactoring goals and scope themselves
|
|
55
|
-
2. Invoke `refactor-planner` → wait for refactor-list.json
|
|
54
|
+
2. Invoke `refactor-planner` → wait for .prizmkit/plans/refactor-list.json
|
|
56
55
|
3. Invoke `refactor-pipeline-launcher` → wait for pipeline start
|
|
57
56
|
4. Manually check progress
|
|
58
57
|
|
|
@@ -81,18 +80,18 @@ Natural language description of the refactoring goals. Can be:
|
|
|
81
80
|
|
|
82
81
|
Flow: brainstorm → refactor-planner → refactor-pipeline-launcher → monitor
|
|
83
82
|
|
|
84
|
-
**Mode B: From existing refactor-list.json**
|
|
83
|
+
**Mode B: From existing .prizmkit/plans/refactor-list.json**
|
|
85
84
|
|
|
86
|
-
When user says "run pipeline from existing file" or refactor-list.json already exists:
|
|
85
|
+
When user says "run pipeline from existing file" or .prizmkit/plans/refactor-list.json already exists:
|
|
87
86
|
- Skip brainstorm and `refactor-planner` (file already exists)
|
|
88
87
|
- Invoke `refactor-pipeline-launcher` directly
|
|
89
88
|
- Monitor and report progress
|
|
90
89
|
|
|
91
90
|
**Mode C: Incremental (add to existing refactor plan)**
|
|
92
91
|
|
|
93
|
-
When user says "add more refactors" or the project already has a refactor-list.json:
|
|
92
|
+
When user says "add more refactors" or the project already has a .prizmkit/plans/refactor-list.json:
|
|
94
93
|
- Brainstorm new refactoring goals with the user
|
|
95
|
-
- Invoke `refactor-planner` in incremental mode (reads existing refactor-list.json)
|
|
94
|
+
- Invoke `refactor-planner` in incremental mode (reads existing .prizmkit/plans/refactor-list.json)
|
|
96
95
|
- Append new refactor items to existing list
|
|
97
96
|
- Invoke `refactor-pipeline-launcher`
|
|
98
97
|
- Monitor and report progress
|
|
@@ -227,7 +226,7 @@ Present this summary to the user and get explicit confirmation before proceeding
|
|
|
227
226
|
|
|
228
227
|
## Phase 2: Plan
|
|
229
228
|
|
|
230
|
-
**Goal**: Generate structured refactor-list.json from the clarified refactoring goals.
|
|
229
|
+
**Goal**: Generate structured .prizmkit/plans/refactor-list.json from the clarified refactoring goals.
|
|
231
230
|
|
|
232
231
|
**STEPS**:
|
|
233
232
|
|
|
@@ -236,17 +235,17 @@ Present this summary to the user and get explicit confirmation before proceeding
|
|
|
236
235
|
- For new refactoring: standard planning mode
|
|
237
236
|
- For existing projects with `--incremental`: incremental planning mode
|
|
238
237
|
- **Input**: Markdown goals summary (refactor targets, scope, behavior preservation strategy)
|
|
239
|
-
- **Output**:
|
|
238
|
+
- **Output**: `.prizmkit/plans/refactor-list.json` (schema: `dev-pipeline-refactor-list-v1`) containing `project_name`, `refactors[]` with id (R-NNN), title, description, scope, type, priority, complexity, behavior_preservation, acceptance_criteria, dependencies, status
|
|
240
239
|
|
|
241
240
|
2. **Interactive planning** (if refactor-planner requires clarification):
|
|
242
241
|
- Because Phase 1 was thorough, refactor-planner should need minimal clarification
|
|
243
242
|
- If questions arise, answer from the Phase 1 context or pass through to user
|
|
244
243
|
|
|
245
244
|
3. **Validate output**:
|
|
246
|
-
- Confirm
|
|
245
|
+
- Confirm `.prizmkit/plans/refactor-list.json` exists
|
|
247
246
|
- Show summary: total refactor items, complexity distribution, dependencies
|
|
248
247
|
|
|
249
|
-
**CHECKPOINT CP-RW-1**:
|
|
248
|
+
**CHECKPOINT CP-RW-1**: `.prizmkit/plans/refactor-list.json` generated and validated.
|
|
250
249
|
|
|
251
250
|
**If user says `--from <file>`**: Skip Phase 1 and Phase 2 entirely.
|
|
252
251
|
|
|
@@ -269,7 +268,7 @@ Present this summary to the user and get explicit confirmation before proceeding
|
|
|
269
268
|
```
|
|
270
269
|
|
|
271
270
|
2. **Invoke `refactor-pipeline-launcher` skill**:
|
|
272
|
-
- **Input**: Path to validated
|
|
271
|
+
- **Input**: Path to validated `.prizmkit/plans/refactor-list.json`
|
|
273
272
|
- The launcher handles all prerequisites checks
|
|
274
273
|
- The launcher presents execution mode choices to the user (foreground/background/manual)
|
|
275
274
|
- Do NOT duplicate execution mode selection here — let the launcher handle it
|
|
@@ -303,8 +302,8 @@ Present this summary to the user and get explicit confirmation before proceeding
|
|
|
303
302
|
3. **Periodic progress reports** (when user asks):
|
|
304
303
|
```bash
|
|
305
304
|
python3 dev-pipeline/scripts/update-refactor-status.py \
|
|
306
|
-
--refactor-list refactor-list.json \
|
|
307
|
-
--state-dir
|
|
305
|
+
--refactor-list .prizmkit/plans/refactor-list.json \
|
|
306
|
+
--state-dir .prizmkit/state/refactor \
|
|
308
307
|
--action status
|
|
309
308
|
```
|
|
310
309
|
|
|
@@ -333,12 +332,12 @@ The workflow supports resuming by detecting existing state:
|
|
|
333
332
|
|
|
334
333
|
| State Found | Resume From |
|
|
335
334
|
|-------------|------------|
|
|
336
|
-
| No
|
|
337
|
-
|
|
|
338
|
-
|
|
|
335
|
+
| No `.prizmkit/plans/refactor-list.json` | Phase 1: Brainstorm |
|
|
336
|
+
| `.prizmkit/plans/refactor-list.json` exists, no pipeline state | Phase 3: Launch |
|
|
337
|
+
| `.prizmkit/plans/refactor-list.json` + pipeline state exists | Phase 4: Monitor (check status) |
|
|
339
338
|
| All refactors completed | Report completion, suggest next steps |
|
|
340
339
|
|
|
341
|
-
**Resume**: If
|
|
340
|
+
**Resume**: If `.prizmkit/plans/refactor-list.json` exists, ask user: "Existing refactor plan found with N items. Resume pipeline or re-plan?"
|
|
342
341
|
|
|
343
342
|
---
|
|
344
343
|
|
|
@@ -363,7 +362,7 @@ While the pipeline runs, the user can continue the conversation:
|
|
|
363
362
|
| Brainstorming stalls | Offer concrete options: "Would you prefer incremental or comprehensive refactoring?" |
|
|
364
363
|
| No tests exist for target module | WARN user, recommend writing tests first before refactoring |
|
|
365
364
|
| `refactor-planner` cannot parse goals | Refine the goals summary and retry |
|
|
366
|
-
|
|
|
365
|
+
| `.prizmkit/plans/refactor-list.json` generation failed | Show error, retry with refined input |
|
|
367
366
|
| Pipeline launch failed | Show daemon log, suggest manual start |
|
|
368
367
|
| All refactor items blocked/failed | Show status, suggest retrying specific items |
|
|
369
368
|
| User wants to cancel mid-brainstorming | Save conversation context, offer to resume later |
|
|
@@ -375,7 +374,7 @@ While the pipeline runs, the user can continue the conversation:
|
|
|
375
374
|
|
|
376
375
|
| Skill | Relationship |
|
|
377
376
|
|-------|-------------|
|
|
378
|
-
| `refactor-planner` | **Called by Phase 2** — generates refactor-list.json from clarified goals |
|
|
377
|
+
| `refactor-planner` | **Called by Phase 2** — generates .prizmkit/plans/refactor-list.json from clarified goals |
|
|
379
378
|
| `refactor-pipeline-launcher` | **Called by Phase 3** — starts pipeline (handles execution mode selection) |
|
|
380
379
|
| `feature-workflow` | **Alternative** — for new feature development |
|
|
381
380
|
| `bug-fix-workflow` | **Alternative** — for bug fix workflows |
|
|
@@ -401,7 +400,7 @@ While the pipeline runs, the user can continue the conversation:
|
|
|
401
400
|
## Output
|
|
402
401
|
|
|
403
402
|
- Structured refactoring goals summary (Phase 1 artifact)
|
|
404
|
-
-
|
|
403
|
+
- `.prizmkit/plans/refactor-list.json` (Phase 2 artifact)
|
|
405
404
|
- Pipeline execution (Phase 3)
|
|
406
405
|
- Progress updates (Phase 4)
|
|
407
406
|
- Multiple git commits with `refactor(<scope>):` prefix
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"name": "reviewer",
|
|
21
21
|
"role": "reviewer",
|
|
22
22
|
"agentDefinition": "prizm-dev-team-reviewer",
|
|
23
|
-
"prompt": "You are the Reviewer Agent of the prizm-dev-team.
|
|
23
|
+
"prompt": "You are the Reviewer Agent of the prizm-dev-team. Run /prizmkit-code-review for diagnosis + fix strategy formulation, write and execute integration tests. Produce structured Fix Instructions (Root Cause, Impact, Fix Strategy, Code Guidance, Verification) so Dev can follow them precisely. review-report.md is written to the artifact directory by /prizmkit-code-review.",
|
|
24
24
|
"subscriptions": ["*"]
|
|
25
25
|
},
|
|
26
26
|
{
|
|
@@ -37,6 +37,6 @@ Not every change needs the full spec -> plan workflow. Use fast path for:
|
|
|
37
37
|
- Documentation-only changes, test additions for existing code
|
|
38
38
|
- Fast path: `/prizmkit-plan` (simplified) → `/prizmkit-implement` → `/prizmkit-committer`
|
|
39
39
|
|
|
40
|
-
Use the full workflow (/prizmkit-plan -> /prizmkit-
|
|
40
|
+
Use the full workflow (/prizmkit-plan -> /prizmkit-implement) for:
|
|
41
41
|
- New features, multi-file coordinated changes, architectural decisions, data model or API changes
|
|
42
42
|
<!-- PRIZMKIT:END -->
|
package/package.json
CHANGED
package/src/clean.js
CHANGED
|
@@ -119,10 +119,9 @@ export async function runClean(directory, options = {}) {
|
|
|
119
119
|
'.prizm-docs', // AI-generated project context docs
|
|
120
120
|
'CODEBUDDY.md',
|
|
121
121
|
'CLAUDE.md',
|
|
122
|
-
'feature-list.json', // feature-planner output
|
|
123
|
-
'bug-fix-list.json', // bug-planner output
|
|
124
|
-
'project-brief.md', // feature-planner project brief
|
|
125
|
-
'project-conventions.json', // feature-planner coding conventions
|
|
122
|
+
path.join('.prizmkit', 'plans', 'feature-list.json'), // feature-planner output
|
|
123
|
+
path.join('.prizmkit', 'plans', 'bug-fix-list.json'), // bug-planner output
|
|
124
|
+
path.join('.prizmkit', 'plans', 'project-brief.md'), // feature-planner project brief
|
|
126
125
|
path.join('.codebuddy', 'settings.json'),
|
|
127
126
|
path.join('.claude', 'settings.json'),
|
|
128
127
|
path.join('.claude', 'team-info.json'),
|
|
@@ -14,8 +14,8 @@ export function generateGitignore(options = {}) {
|
|
|
14
14
|
'# PrizmKit Runtime Artifacts',
|
|
15
15
|
'# ===========================',
|
|
16
16
|
'',
|
|
17
|
-
'# PrizmKit
|
|
18
|
-
'.prizmkit/',
|
|
17
|
+
'# PrizmKit 运行时状态(不提交)',
|
|
18
|
+
'.prizmkit/state/',
|
|
19
19
|
'',
|
|
20
20
|
'# 多 Agent 协作临时工作区',
|
|
21
21
|
'.dev-team/',
|
|
@@ -24,18 +24,16 @@ export function generateGitignore(options = {}) {
|
|
|
24
24
|
'# .prizm-docs/',
|
|
25
25
|
'',
|
|
26
26
|
'# 规划产物(按需决定是否提交)',
|
|
27
|
-
'#
|
|
28
|
-
'# bug-fix-list.json',
|
|
29
|
-
'# project-brief.md',
|
|
30
|
-
'# project-conventions.json',
|
|
27
|
+
'# .prizmkit/plans/',
|
|
31
28
|
'',
|
|
32
29
|
];
|
|
33
30
|
|
|
34
31
|
if (options.pipeline) {
|
|
35
32
|
lines.push(
|
|
36
|
-
'# Dev-Pipeline
|
|
37
|
-
'
|
|
38
|
-
'
|
|
33
|
+
'# Dev-Pipeline 运行时状态(已迁移到 .prizmkit/state/)',
|
|
34
|
+
'.prizmkit/state/features/',
|
|
35
|
+
'.prizmkit/state/bugfix/',
|
|
36
|
+
'.prizmkit/state/refactor/',
|
|
39
37
|
'dev-pipeline/logs/',
|
|
40
38
|
'dev-pipeline/*.pid',
|
|
41
39
|
'',
|
package/src/scaffold.js
CHANGED
|
@@ -537,11 +537,9 @@ export async function installProjectMemory(platform, projectRoot, dryRun) {
|
|
|
537
537
|
const targetName = platform === 'claude' ? 'CLAUDE.md' : 'CODEBUDDY.md';
|
|
538
538
|
const targetPath = path.join(projectRoot, targetName);
|
|
539
539
|
|
|
540
|
-
//
|
|
540
|
+
// Template lives in core/templates/ (bundled as templates/).
|
|
541
541
|
const templateCandidates = [
|
|
542
542
|
path.join(templatesDir, templateName),
|
|
543
|
-
path.join(skillsDir, 'prizmkit-skill', 'prizm-kit', 'assets', templateName),
|
|
544
|
-
path.join(skillsDir, 'prizm-kit', 'assets', templateName),
|
|
545
543
|
];
|
|
546
544
|
const templatePath = templateCandidates.find(candidate => fs.pathExistsSync(candidate));
|
|
547
545
|
|
|
@@ -647,8 +645,10 @@ export async function installPipeline(projectRoot, dryRun, { forceOverwrite = fa
|
|
|
647
645
|
return [];
|
|
648
646
|
}
|
|
649
647
|
|
|
650
|
-
await fs.ensureDir(path.join(
|
|
651
|
-
await fs.ensureDir(path.join(
|
|
648
|
+
await fs.ensureDir(path.join(projectRoot, '.prizmkit', 'plans'));
|
|
649
|
+
await fs.ensureDir(path.join(projectRoot, '.prizmkit', 'state', 'features'));
|
|
650
|
+
await fs.ensureDir(path.join(projectRoot, '.prizmkit', 'state', 'bugfix'));
|
|
651
|
+
await fs.ensureDir(path.join(projectRoot, '.prizmkit', 'state', 'refactor'));
|
|
652
652
|
|
|
653
653
|
// 动态扫描 bundled dev-pipeline 目录,排除不应安装到用户项目的内容
|
|
654
654
|
const EXCLUDE = new Set(['tests', 'docs', '__pycache__', 'node_modules', '.DS_Store']);
|
|
@@ -688,6 +688,15 @@ export async function installPipeline(projectRoot, dryRun, { forceOverwrite = fa
|
|
|
688
688
|
}
|
|
689
689
|
|
|
690
690
|
console.log(chalk.green(` ✓ dev-pipeline/ (${installedCount} 项)`));
|
|
691
|
+
|
|
692
|
+
// Copy .env.example to project root if it exists in pipeline source
|
|
693
|
+
const envExampleSrc = path.join(pipelineSource, '.env.example');
|
|
694
|
+
const envExampleTgt = path.join(projectRoot, '.env.example');
|
|
695
|
+
if (await fs.pathExists(envExampleSrc) && !await fs.pathExists(envExampleTgt)) {
|
|
696
|
+
await fs.copy(envExampleSrc, envExampleTgt);
|
|
697
|
+
console.log(chalk.green(` ✓ .env.example (pipeline environment configuration)`));
|
|
698
|
+
}
|
|
699
|
+
|
|
691
700
|
return installedFiles;
|
|
692
701
|
}
|
|
693
702
|
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
2
|
-
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has project context, Section 4 has file manifest.
|
|
3
|
-
2. Run prizmkit-analyze: cross-check `spec.md` and `plan.md` (including Tasks section) for consistency.
|
|
4
|
-
3. Before flagging CRITICAL or HIGH issues, read the relevant source files listed in the File Manifest to verify.
|
|
5
|
-
Report: CRITICAL, HIGH, MEDIUM issues found (or 'No issues found')."
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
### Analyze — Reviewer Subagent
|
|
2
|
-
|
|
3
|
-
**Spawn Agent**:
|
|
4
|
-
| Parameter | Value |
|
|
5
|
-
|-----------|-------|
|
|
6
|
-
| subagent_type | prizm-dev-team-reviewer |
|
|
7
|
-
| mode | plan |
|
|
8
|
-
| run_in_background | false |
|
|
9
|
-
|
|
10
|
-
**Prompt**:
|
|
11
|
-
> {{AGENT_PROMPT_REVIEWER_ANALYZE}}
|
|
12
|
-
|
|
13
|
-
Wait for Reviewer to return.
|
|
14
|
-
- If CRITICAL issues found: fix them yourself — read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full project context. Fix ONLY the listed CRITICAL issues in plan.md. Then re-run analyze (max 1 round).
|
|
15
|
-
|
|
16
|
-
**CP-2**: No CRITICAL issues.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
**Checkpoint update**: Update `workflow-checkpoint.json` — set step `prizmkit-analyze` to `"completed"`.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
### Analyze — Reviewer Agent
|
|
2
|
-
|
|
3
|
-
**Spawn Agent**:
|
|
4
|
-
| Parameter | Value |
|
|
5
|
-
|-----------|-------|
|
|
6
|
-
| subagent_type | prizm-dev-team-reviewer |
|
|
7
|
-
| mode | plan |
|
|
8
|
-
| run_in_background | false |
|
|
9
|
-
|
|
10
|
-
**Prompt**:
|
|
11
|
-
> {{AGENT_PROMPT_REVIEWER_ANALYZE}}
|
|
12
|
-
|
|
13
|
-
Wait for Reviewer to return.
|
|
14
|
-
- If CRITICAL issues found: fix them yourself — read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full project context. Fix ONLY the listed CRITICAL issues in spec.md/plan.md. Then re-run analyze (max 1 round).
|
|
15
|
-
|
|
16
|
-
**CP-2**: No CRITICAL issues.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
**Checkpoint update**: Update `workflow-checkpoint.json` — set step `prizmkit-analyze` to `"completed"`.
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# Project Conventions — First-Run Setup Questions
|
|
2
|
-
|
|
3
|
-
> Capture project-wide norms once, reuse across all planning sessions.
|
|
4
|
-
|
|
5
|
-
These questions establish foundational conventions that affect every feature. They should be asked **once** during the first `app-planner` session and persisted to `.prizmkit/project-conventions.json` so subsequent sessions skip them.
|
|
6
|
-
|
|
7
|
-
## Persistence
|
|
8
|
-
|
|
9
|
-
- **File**: `.prizmkit/project-conventions.json`
|
|
10
|
-
- **Read on startup**: If the file exists and a convention has a non-null value, skip that question.
|
|
11
|
-
- **Write after asking**: Save answers immediately after the user responds.
|
|
12
|
-
- **Shared**: Other skills (`prizmkit-init`, `dev-pipeline`) may also read this file.
|
|
13
|
-
|
|
14
|
-
## Convention Questions
|
|
15
|
-
|
|
16
|
-
Ask only unanswered conventions. Group related questions together in a single prompt when possible.
|
|
17
|
-
|
|
18
|
-
### 1. UI Display Language
|
|
19
|
-
|
|
20
|
-
**Key**: `ui_language`
|
|
21
|
-
|
|
22
|
-
> "What is the primary language for the application's user interface? (e.g., English, 中文, 日本語, etc.)"
|
|
23
|
-
|
|
24
|
-
**Follow-up if applicable**: If the user specifies a non-English language, confirm whether all UI text (buttons, labels, error messages, tooltips) should be in that language.
|
|
25
|
-
|
|
26
|
-
### 2. Multi-Language Support (i18n)
|
|
27
|
-
|
|
28
|
-
**Key**: `i18n_enabled`, `i18n_languages`
|
|
29
|
-
|
|
30
|
-
> "Does the application need multi-language support (i18n)?"
|
|
31
|
-
|
|
32
|
-
- If **yes** → ask: "Which languages should be supported? List all target languages."
|
|
33
|
-
- If **no** → set `i18n_enabled: false`, skip `i18n_languages`.
|
|
34
|
-
|
|
35
|
-
**Impact on planning**: If i18n is enabled, add an infrastructure feature for i18n setup (framework, translation file structure, language switcher) early in the dependency graph.
|
|
36
|
-
|
|
37
|
-
### 3. Date, Time & Currency Formats
|
|
38
|
-
|
|
39
|
-
**Key**: `date_format`, `timezone_strategy`, `currency`
|
|
40
|
-
|
|
41
|
-
> "What are your preferences for date/time and currency display?"
|
|
42
|
-
|
|
43
|
-
Sub-questions (ask as a group):
|
|
44
|
-
- **Date format**: "Preferred date display format?" (e.g., `YYYY-MM-DD`, `MM/DD/YYYY`, `DD/MM/YYYY`, locale-auto)
|
|
45
|
-
- **Timezone strategy**: "How should the app handle timezones?" (e.g., UTC storage + local display, user-selected timezone, server timezone only)
|
|
46
|
-
- **Currency**: "If the app handles money, which currency format?" (e.g., USD `$1,234.56`, CNY `¥1,234.56`, EUR `€1.234,56`, or N/A if no monetary values)
|
|
47
|
-
|
|
48
|
-
If the user says "not applicable" for currency, set `currency: null`.
|
|
49
|
-
|
|
50
|
-
### 4. Code & Git Language Conventions
|
|
51
|
-
|
|
52
|
-
**Key**: `code_comment_language`, `git_commit_language`
|
|
53
|
-
|
|
54
|
-
> "What language should be used for code comments and git commit messages?"
|
|
55
|
-
|
|
56
|
-
Options to present:
|
|
57
|
-
- **Code comments**: English / Chinese / Match UI language / Mixed
|
|
58
|
-
- **Git commit messages**: English / Chinese / Match code comments
|
|
59
|
-
|
|
60
|
-
**Default suggestion**: English for both (widely accessible, compatible with open-source contribution).
|
|
61
|
-
|
|
62
|
-
## JSON Schema
|
|
63
|
-
|
|
64
|
-
```json
|
|
65
|
-
{
|
|
66
|
-
"ui_language": "English",
|
|
67
|
-
"i18n_enabled": false,
|
|
68
|
-
"i18n_languages": [],
|
|
69
|
-
"date_format": "YYYY-MM-DD",
|
|
70
|
-
"timezone_strategy": "utc_storage_local_display",
|
|
71
|
-
"currency": null,
|
|
72
|
-
"code_comment_language": "English",
|
|
73
|
-
"git_commit_language": "English"
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## How Conventions Are Used
|
|
78
|
-
|
|
79
|
-
Conventions are **AI context** — they inform your behavior during planning but are NOT written into `feature-list.json` `global_context` fields. Specifically:
|
|
80
|
-
|
|
81
|
-
- `ui_language` → Write feature descriptions and acceptance criteria in a way that acknowledges the target UI language (e.g., mention CJK text handling if Chinese, RTL layout if Arabic)
|
|
82
|
-
- `i18n_enabled` → If true, consider proposing an i18n infrastructure feature early in the dependency graph; ensure feature descriptions mention translation-ready patterns
|
|
83
|
-
- `date_format`, `timezone_strategy` → When features involve date/time display or storage, reference the chosen convention in feature descriptions
|
|
84
|
-
- `currency` → When features involve monetary values, reference the currency convention in descriptions
|
|
85
|
-
- `code_comment_language` → Inform the language used in code-related examples within feature descriptions
|
|
86
|
-
- `git_commit_language` → Inform pipeline and workflow language expectations
|
|
87
|
-
|
|
88
|
-
## Rules
|
|
89
|
-
|
|
90
|
-
- **Ask at most once per convention** — if answered, never re-ask unless user invokes a reset.
|
|
91
|
-
- **No blocking** — if the user skips a question ("I'll decide later"), set value to `null` and move on. The question will be re-asked next session.
|
|
92
|
-
- **Respect existing config** — if `.prizmkit/config.json` already has equivalent fields (e.g., `tech_stack.language`), do not duplicate. Only ask questions not covered by existing config.
|
|
93
|
-
- **Minimal interruption** — batch all unanswered questions into a single interaction round, not one-by-one.
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "prizmkit-analyze"
|
|
3
|
-
description: "Cross-document consistency analysis for spec.md and plan.md. Detects duplications, ambiguities, gaps, and rule conflicts. Read-only quality gate — use after /prizmkit-plan, before /prizmkit-implement. Trigger on: 'analyze', 'check consistency', 'validate spec', 'review plan', 'is the spec ready'. (project)"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# PrizmKit Analyze
|
|
7
|
-
|
|
8
|
-
### When to Use
|
|
9
|
-
- After `/prizmkit-plan` to validate spec-plan-tasks alignment before implementation
|
|
10
|
-
- User says "analyze", "check consistency", "validate spec", "review plan"
|
|
11
|
-
- Before `/prizmkit-implement` as a quality gate
|
|
12
|
-
|
|
13
|
-
**PRECONDITION:**
|
|
14
|
-
|
|
15
|
-
| Required Artifact | Directory | Check | If Missing |
|
|
16
|
-
|---|---|---|---|
|
|
17
|
-
| `spec.md` | `.prizmkit/specs/###-feature-name/` | File exists | Run `/prizmkit-plan` |
|
|
18
|
-
| `plan.md` (with Tasks section) | `.prizmkit/specs/###-feature-name/` | File exists + has Tasks section | Run `/prizmkit-plan` |
|
|
19
|
-
|
|
20
|
-
## Operating Constraints
|
|
21
|
-
|
|
22
|
-
**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.
|
|
23
|
-
|
|
24
|
-
**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).
|
|
25
|
-
|
|
26
|
-
## Execution Steps
|
|
27
|
-
|
|
28
|
-
### Step 1: Initialize Analysis Context
|
|
29
|
-
|
|
30
|
-
Locate the current feature directory in `.prizmkit/specs/###-feature-name/` by checking the current Git branch name or scanning `.prizmkit/specs/` for the most recent feature directory.
|
|
31
|
-
|
|
32
|
-
Derive absolute paths:
|
|
33
|
-
- SPEC = `.prizmkit/specs/###-feature-name/spec.md`
|
|
34
|
-
- PLAN = `.prizmkit/specs/###-feature-name/plan.md` (must include a Tasks section)
|
|
35
|
-
|
|
36
|
-
Abort with an error message if spec.md or plan.md is missing — instruct the user to run `/prizmkit-plan`.
|
|
37
|
-
|
|
38
|
-
### Step 2: Load Artifacts (Progressive Disclosure)
|
|
39
|
-
|
|
40
|
-
Load only the minimal necessary context from each artifact:
|
|
41
|
-
|
|
42
|
-
**From spec.md:**
|
|
43
|
-
- Overview/Context
|
|
44
|
-
- Functional Requirements
|
|
45
|
-
- Non-Functional Requirements
|
|
46
|
-
- User Stories and Acceptance Criteria
|
|
47
|
-
- Scope Boundaries
|
|
48
|
-
- Edge Cases (if present)
|
|
49
|
-
|
|
50
|
-
**From plan.md:**
|
|
51
|
-
- Architecture/stack choices
|
|
52
|
-
- Component Design
|
|
53
|
-
- Data Model references
|
|
54
|
-
- API Contracts
|
|
55
|
-
- Testing Strategy
|
|
56
|
-
- Risk Assessment
|
|
57
|
-
- Tasks section (task IDs, phase grouping, parallel markers, file paths)
|
|
58
|
-
|
|
59
|
-
**From .prizm-docs/root.prizm:**
|
|
60
|
-
- RULES section (MUST/NEVER/PREFER directives)
|
|
61
|
-
- PATTERNS section (project-wide code patterns)
|
|
62
|
-
- TECH_STACK section (for consistency checking)
|
|
63
|
-
|
|
64
|
-
### Step 3: Build Semantic Models
|
|
65
|
-
|
|
66
|
-
Create internal representations (do not include raw artifacts in output):
|
|
67
|
-
|
|
68
|
-
- **Requirements inventory**: Each functional + non-functional requirement with a stable key (derive slug from imperative phrase; e.g., "User can upload file" -> `user-can-upload-file`)
|
|
69
|
-
- **User story/action inventory**: Discrete user actions with acceptance criteria
|
|
70
|
-
- **Task coverage mapping**: Map each task (from plan.md Tasks section) to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
|
|
71
|
-
- **Prizm rule set**: Extract MUST/NEVER/PREFER normative statements from root.prizm RULES
|
|
72
|
-
|
|
73
|
-
### Step 4: Detection Passes
|
|
74
|
-
|
|
75
|
-
Focus on high-signal findings. Limit to **50 findings total**; aggregate remainder in overflow summary.
|
|
76
|
-
|
|
77
|
-
#### A. Duplication Detection
|
|
78
|
-
- Identify near-duplicate requirements across spec.md sections
|
|
79
|
-
- Mark lower-quality phrasing for consolidation
|
|
80
|
-
|
|
81
|
-
#### B. Ambiguity Detection
|
|
82
|
-
- Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria
|
|
83
|
-
- Flag unresolved placeholders (TODO, TBD, ???, `<placeholder>`, `[NEEDS CLARIFICATION]`)
|
|
84
|
-
|
|
85
|
-
#### C. Underspecification
|
|
86
|
-
- Requirements with verbs but missing object or measurable outcome
|
|
87
|
-
- User stories missing acceptance criteria alignment
|
|
88
|
-
- Tasks referencing files or components not defined in spec/plan
|
|
89
|
-
- Plan components with no corresponding spec requirement
|
|
90
|
-
|
|
91
|
-
#### D. Prizm Rules Alignment
|
|
92
|
-
- Any requirement or plan element conflicting with a MUST/NEVER directive
|
|
93
|
-
- Missing mandated patterns from PATTERNS section
|
|
94
|
-
- Tech stack inconsistencies between plan and root.prizm TECH_STACK
|
|
95
|
-
|
|
96
|
-
#### E. Coverage Gaps
|
|
97
|
-
- Requirements with zero associated tasks (from plan.md Tasks section)
|
|
98
|
-
- Tasks with no mapped requirement/story ("orphan tasks")
|
|
99
|
-
- Non-functional requirements not reflected in tasks (performance, security, etc.)
|
|
100
|
-
- User stories without corresponding plan components
|
|
101
|
-
|
|
102
|
-
#### F. Inconsistency
|
|
103
|
-
- Terminology drift (same concept named differently across files)
|
|
104
|
-
- Data entities referenced in plan but absent in spec (or vice versa)
|
|
105
|
-
- Task ordering contradictions (e.g., integration tasks before foundational setup without dependency note)
|
|
106
|
-
- Conflicting requirements (e.g., one requires REST while other specifies GraphQL)
|
|
107
|
-
|
|
108
|
-
#### G. Database Design Consistency (when plan.md has Data Model section)
|
|
109
|
-
- New entity/field naming inconsistent with existing schema conventions documented in "Existing Schema Audit"
|
|
110
|
-
- Missing constraints (NOT NULL, UNIQUE, FK, INDEX) on fields where existing similar tables define them
|
|
111
|
-
- Unresolved `[NEEDS CLARIFICATION]` in Data Model section → **CRITICAL** (must be resolved before implementation)
|
|
112
|
-
- Style Conformance Checklist items unchecked → **HIGH** (design not verified against existing conventions)
|
|
113
|
-
- New tables with no foreign key relationship to any existing table (orphan table warning — may indicate missing business logic)
|
|
114
|
-
- Missing migration strategy for schema changes that affect existing data
|
|
115
|
-
|
|
116
|
-
### Step 5: Severity Assignment
|
|
117
|
-
|
|
118
|
-
Use this heuristic to prioritize findings:
|
|
119
|
-
|
|
120
|
-
- **CRITICAL**: Violates Prizm RULES MUST/NEVER directive, missing core artifact section, or requirement with zero coverage that blocks baseline functionality
|
|
121
|
-
- **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion
|
|
122
|
-
- **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case
|
|
123
|
-
- **LOW**: Style/wording improvements, minor redundancy not affecting execution order
|
|
124
|
-
|
|
125
|
-
### Step 6: Produce Compact Analysis Report
|
|
126
|
-
|
|
127
|
-
Output a Markdown report (**no file writes**) with the following structure:
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
## Consistency Analysis Report
|
|
131
|
-
|
|
132
|
-
| ID | Category | Severity | Location(s) | Summary | Recommendation |
|
|
133
|
-
|----|----------|----------|-------------|---------|----------------|
|
|
134
|
-
| A1 | Duplication | HIGH | spec.md §2.1, §3.4 | Two similar requirements... | Merge phrasing; keep clearer version |
|
|
135
|
-
| D1 | Rules Alignment | CRITICAL | plan.md §Architecture | Conflicts with MUST rule... | Adjust plan to align with rule |
|
|
136
|
-
|
|
137
|
-
**Coverage Summary:**
|
|
138
|
-
|
|
139
|
-
| Requirement Key | Has Task? | Task IDs | Notes |
|
|
140
|
-
|-----------------|-----------|----------|-------|
|
|
141
|
-
|
|
142
|
-
**Prizm Rules Alignment Issues:** (if any)
|
|
143
|
-
|
|
144
|
-
**Unmapped Tasks:** (if any)
|
|
145
|
-
|
|
146
|
-
**Metrics:**
|
|
147
|
-
- Total Requirements: N
|
|
148
|
-
- Total Tasks: N
|
|
149
|
-
- Coverage %: N% (requirements with >=1 task)
|
|
150
|
-
- Ambiguity Count: N
|
|
151
|
-
- Duplication Count: N
|
|
152
|
-
- Critical Issues: N
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### Step 7: Provide Next Actions
|
|
156
|
-
|
|
157
|
-
At end of report, output a concise Next Actions block:
|
|
158
|
-
|
|
159
|
-
- If CRITICAL issues exist: **Recommend resolving before `/prizmkit-implement`**
|
|
160
|
-
- If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
|
|
161
|
-
- Provide explicit command suggestions:
|
|
162
|
-
- "Run `/prizmkit-plan` to refine requirements"
|
|
163
|
-
- "Run `/prizmkit-plan` to adjust architecture or tasks"
|
|
164
|
-
- "Edit plan.md Tasks section to add coverage for requirement X"
|
|
165
|
-
- "Proceed to `/prizmkit-implement`" (if clean)
|
|
166
|
-
|
|
167
|
-
### Step 8: Offer Remediation
|
|
168
|
-
|
|
169
|
-
Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)
|
|
170
|
-
|
|
171
|
-
## Operating Principles
|
|
172
|
-
|
|
173
|
-
### Context Efficiency
|
|
174
|
-
- Focus on actionable findings, not exhaustive documentation — the goal is to surface problems, not prove you read everything
|
|
175
|
-
- Load artifacts incrementally; reading all content upfront wastes tokens on sections irrelevant to the feature
|
|
176
|
-
- Cap findings at 50 rows to keep the report scannable; summarize overflow with counts
|
|
177
|
-
- Rerunning without changes should produce consistent IDs and counts (deterministic)
|
|
178
|
-
|
|
179
|
-
### Analysis Approach
|
|
180
|
-
- If a section is absent, report it accurately rather than guessing what it might contain
|
|
181
|
-
- Prizm Rules violations are always CRITICAL — they represent project-wide constraints that outrank individual feature decisions
|
|
182
|
-
- Cite specific instances rather than generic patterns — "spec §2.1 says REST but plan §Architecture says GraphQL" is more useful than "terminology inconsistency found"
|
|
183
|
-
- If zero issues found, report success with coverage statistics — a clean report is valuable confirmation
|
|
184
|
-
|
|
185
|
-
## Example Finding
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
| ID | Category | Severity | Location(s) | Summary | Recommendation |
|
|
189
|
-
|----|----------|----------|-------------|---------|----------------|
|
|
190
|
-
| 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 |
|
|
191
|
-
| 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 |
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
**HANDOFF:** `/prizmkit-implement` (if clean) or `/prizmkit-plan` (if issues found)
|
|
195
|
-
|
|
196
|
-
## Loop Protection
|
|
197
|
-
|
|
198
|
-
In unattended pipeline mode, the analyze→fix→analyze cycle can loop indefinitely if issues keep reappearing. To prevent this:
|
|
199
|
-
|
|
200
|
-
- Track an `analyze_iteration` counter starting at 1. Each re-run of this skill after remediation increments the counter.
|
|
201
|
-
- **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)."
|
|
202
|
-
- Unresolved findings from the final iteration should be noted in the handoff so that `/prizmkit-code-review` can catch them downstream.
|
|
203
|
-
- This guard exists because some findings oscillate (fixing one re-introduces another) and blocking forever is worse than proceeding with known issues.
|
|
204
|
-
|
|
205
|
-
## Output
|
|
206
|
-
|
|
207
|
-
Analysis report is output to conversation only.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Review Dimensions — Bugfix Mode
|
|
2
|
-
|
|
3
|
-
Review code against `fix-plan.md` and the bug description. Minimal scope — the fix should change as little as possible.
|
|
4
|
-
|
|
5
|
-
## Bugfix-Specific Dimensions
|
|
6
|
-
|
|
7
|
-
### Bug Actually Fixed
|
|
8
|
-
- The reproduction steps from fix-plan.md no longer trigger the bug
|
|
9
|
-
- The root cause identified in fix-plan.md is addressed (not just symptoms)
|
|
10
|
-
- A regression test exists that would catch this bug if reintroduced
|
|
11
|
-
|
|
12
|
-
### No Regressions
|
|
13
|
-
- All existing tests still pass
|
|
14
|
-
- The fix does not change behavior for non-buggy inputs
|
|
15
|
-
- Related code paths are not inadvertently affected
|
|
16
|
-
|
|
17
|
-
### Minimal Change Scope
|
|
18
|
-
- Only files directly related to the bug are modified
|
|
19
|
-
- No "while I'm here" refactoring mixed with the fix
|
|
20
|
-
- If scope creep is detected, flag it — those changes belong in a separate commit
|
|
21
|
-
|
|
22
|
-
### Reproduction Test
|
|
23
|
-
- A test exists that reproduces the exact bug scenario
|
|
24
|
-
- The test would fail on the pre-fix code and pass on the post-fix code
|
|
25
|
-
- The test covers the specific input/state that triggered the bug
|