prizmkit 1.1.8 → 1.1.10

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 (123) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/codebuddy/skill-adapter.js +21 -7
  3. package/bundled/agents/prizm-dev-team-reviewer.md +53 -173
  4. package/bundled/dev-pipeline/.env.example +45 -0
  5. package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +535 -0
  6. package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
  7. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +57 -12
  8. package/bundled/dev-pipeline/launch-feature-daemon.sh +3 -1
  9. package/bundled/dev-pipeline/launch-refactor-daemon.sh +57 -12
  10. package/bundled/dev-pipeline/lib/branch.sh +6 -1
  11. package/bundled/dev-pipeline/lib/common.sh +71 -0
  12. package/bundled/dev-pipeline/lib/heartbeat.sh +2 -2
  13. package/bundled/dev-pipeline/retry-bugfix.sh +60 -23
  14. package/bundled/dev-pipeline/retry-feature.sh +47 -12
  15. package/bundled/dev-pipeline/retry-refactor.sh +105 -23
  16. package/bundled/dev-pipeline/run-bugfix.sh +265 -44
  17. package/bundled/dev-pipeline/run-feature.sh +35 -1
  18. package/bundled/dev-pipeline/run-refactor.sh +376 -51
  19. package/bundled/dev-pipeline/scripts/check-session-status.py +24 -1
  20. package/bundled/dev-pipeline/scripts/detect-stuck.py +195 -85
  21. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +31 -19
  22. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +19 -3
  23. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +98 -11
  24. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +30 -5
  25. package/bundled/dev-pipeline/scripts/init-pipeline.py +3 -3
  26. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +15 -4
  27. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -5
  28. package/bundled/dev-pipeline/scripts/patch-completion-notes.py +191 -0
  29. package/bundled/dev-pipeline/scripts/update-bug-status.py +159 -14
  30. package/bundled/dev-pipeline/scripts/update-feature-status.py +79 -37
  31. package/bundled/dev-pipeline/scripts/update-refactor-status.py +343 -13
  32. package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +1 -1
  33. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +7 -11
  34. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +41 -7
  35. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +27 -3
  36. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +43 -19
  37. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +54 -26
  38. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +5 -14
  39. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +36 -25
  40. package/bundled/dev-pipeline/templates/feature-list-schema.json +23 -11
  41. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +270 -0
  42. package/bundled/dev-pipeline/templates/refactor-list-schema.json +10 -2
  43. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +3 -1
  44. package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +1 -0
  45. package/bundled/dev-pipeline/templates/sections/feature-context.md +2 -0
  46. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +29 -2
  47. package/bundled/dev-pipeline/templates/sections/phase-commit.md +22 -0
  48. package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +2 -2
  49. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +8 -6
  50. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +7 -5
  51. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
  52. package/bundled/skills/_metadata.json +5 -22
  53. package/bundled/skills/app-planner/SKILL.md +92 -66
  54. package/bundled/skills/app-planner/assets/app-design-guide.md +1 -1
  55. package/bundled/skills/app-planner/references/architecture-decisions.md +1 -1
  56. package/bundled/skills/app-planner/references/project-brief-guide.md +69 -66
  57. package/bundled/skills/bug-fix-workflow/SKILL.md +47 -4
  58. package/bundled/skills/bug-planner/SKILL.md +130 -188
  59. package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +43 -0
  60. package/bundled/skills/bug-planner/references/critic-and-verification.md +44 -0
  61. package/bundled/skills/bug-planner/references/error-recovery.md +73 -0
  62. package/bundled/skills/bug-planner/references/input-formats.md +53 -0
  63. package/bundled/skills/bug-planner/references/schema-validation.md +25 -0
  64. package/bundled/skills/bug-planner/references/severity-rules.md +16 -0
  65. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +1 -5
  66. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +5 -10
  67. package/bundled/skills/feature-pipeline-launcher/SKILL.md +16 -3
  68. package/bundled/skills/feature-planner/SKILL.md +33 -122
  69. package/bundled/skills/feature-planner/assets/evaluation-guide.md +1 -1
  70. package/bundled/skills/feature-planner/assets/planning-guide.md +21 -5
  71. package/bundled/skills/feature-planner/references/browser-interaction.md +2 -4
  72. package/bundled/skills/feature-planner/references/completeness-review.md +57 -0
  73. package/bundled/skills/feature-planner/references/error-recovery.md +15 -34
  74. package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
  75. package/bundled/skills/feature-planner/references/new-project-planning.md +2 -2
  76. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -2
  77. package/bundled/skills/feature-workflow/SKILL.md +3 -4
  78. package/bundled/skills/prizm-kit/SKILL.md +39 -49
  79. package/bundled/skills/prizmkit-code-review/SKILL.md +51 -64
  80. package/bundled/skills/prizmkit-code-review/rules/dimensions.md +85 -0
  81. package/bundled/skills/prizmkit-code-review/rules/fix-strategy.md +11 -11
  82. package/bundled/skills/prizmkit-committer/SKILL.md +3 -31
  83. package/bundled/skills/prizmkit-deploy/SKILL.md +34 -31
  84. package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +1 -1
  85. package/bundled/skills/prizmkit-implement/SKILL.md +35 -68
  86. package/bundled/skills/prizmkit-init/SKILL.md +112 -65
  87. package/bundled/skills/prizmkit-init/assets/project-brief-template.md +82 -0
  88. package/bundled/skills/prizmkit-plan/SKILL.md +120 -79
  89. package/bundled/skills/prizmkit-plan/assets/plan-template.md +28 -18
  90. package/bundled/skills/prizmkit-plan/assets/spec-template.md +28 -11
  91. package/bundled/skills/prizmkit-plan/references/clarify-guide.md +3 -3
  92. package/bundled/skills/prizmkit-plan/references/verification-checklist.md +60 -0
  93. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +10 -81
  94. package/bundled/skills/prizmkit-prizm-docs/assets/{PRIZM-SPEC.md → prizm-docs-format.md} +41 -526
  95. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +46 -0
  96. package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +16 -0
  97. package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +14 -0
  98. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +19 -0
  99. package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +17 -0
  100. package/bundled/skills/prizmkit-retrospective/SKILL.md +27 -65
  101. package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -4
  102. package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +7 -25
  103. package/bundled/skills/recovery-workflow/SKILL.md +8 -8
  104. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +17 -9
  105. package/bundled/skills/refactor-planner/SKILL.md +23 -41
  106. package/bundled/skills/refactor-workflow/SKILL.md +1 -2
  107. package/bundled/team/prizm-dev-team.json +1 -1
  108. package/bundled/{skills/prizm-kit/assets → templates}/project-memory-template.md +1 -1
  109. package/package.json +1 -1
  110. package/src/clean.js +0 -1
  111. package/src/gitignore-template.js +0 -1
  112. package/src/scaffold.js +10 -3
  113. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +0 -5
  114. package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +0 -19
  115. package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +0 -19
  116. package/bundled/skills/app-planner/references/project-conventions.md +0 -93
  117. package/bundled/skills/prizmkit-analyze/SKILL.md +0 -207
  118. package/bundled/skills/prizmkit-code-review/rules/dimensions-bugfix.md +0 -25
  119. package/bundled/skills/prizmkit-code-review/rules/dimensions-feature.md +0 -43
  120. package/bundled/skills/prizmkit-code-review/rules/dimensions-refactor.md +0 -25
  121. package/bundled/skills/prizmkit-implement/references/deploy-guide-protocol.md +0 -69
  122. package/bundled/skills/prizmkit-verify/SKILL.md +0 -281
  123. package/bundled/skills/prizmkit-verify/scripts/verify-light.py +0 -402
@@ -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
@@ -1,43 +0,0 @@
1
- # Review Dimensions — Feature Mode
2
-
3
- Review code against `spec.md` and `plan.md` across 6 dimensions:
4
-
5
- ## 1. Spec Compliance
6
- Does code implement all acceptance criteria? Missing criteria are the #1 source of "it works but it's wrong" bugs.
7
- - Check every acceptance criterion in spec.md has a corresponding implementation
8
- - Verify edge cases mentioned in spec are handled
9
- - Confirm scope boundaries are respected (no over-implementation, no under-implementation)
10
-
11
- ## 2. Plan Adherence
12
- Does implementation follow architectural decisions in plan.md? Deviations may be improvements or may break assumptions other components depend on.
13
- - Check component structure matches plan's architecture approach
14
- - Verify data model matches plan's schema design
15
- - Confirm API contracts (endpoints, request/response) match plan
16
-
17
- ## 3. Code Quality
18
- Naming, structure, complexity, DRY. Focus on maintainability — will someone understand this code in 6 months?
19
- - Function/variable names are descriptive and consistent with project conventions
20
- - No unnecessary complexity (cyclomatic complexity, deep nesting)
21
- - No copy-paste duplication that should be abstracted
22
- - Error messages are informative for debugging
23
-
24
- ## 4. Security
25
- 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.
26
- - User input is validated and sanitized before use in queries, HTML, or commands
27
- - Authentication and authorization checks are present on protected routes
28
- - Sensitive data (passwords, tokens, PII) is not logged or exposed in responses
29
- - Cryptographic operations use established libraries, not custom implementations
30
-
31
- ## 5. Consistency
32
- Follows project patterns from `.prizm-docs/` PATTERNS section. Inconsistent patterns increase cognitive load for every future reader.
33
- - Code style matches existing codebase conventions
34
- - Error handling follows established patterns
35
- - File organization follows project structure conventions
36
- - Naming conventions align with `.prizm-docs/` RULES
37
-
38
- ## 6. Test Coverage
39
- Are critical paths tested? Focus on paths that handle user input, money, or state transitions.
40
- - Happy path tests exist for each user story
41
- - Error/edge case tests for critical paths
42
- - Tests are deterministic (no flaky timing dependencies)
43
- - Test names clearly describe what they verify
@@ -1,25 +0,0 @@
1
- # Review Dimensions — Refactor Mode
2
-
3
- Review code against `refactor-analysis.md` goals. Standard dimensions (code quality, security, consistency, test coverage) still apply — load `${SKILL_DIR}/rules/dimensions-feature.md` §3–§6 for those.
4
-
5
- ## Refactor-Specific Dimensions
6
-
7
- ### Behavior Preservation (replaces Spec Compliance)
8
- Observable behavior must remain unchanged. This is the #1 refactor risk — "improving" code that subtly changes behavior.
9
- - All existing tests still pass without modification (test changes during refactor are a red flag)
10
- - Public API signatures are unchanged (parameter types, return types, error types)
11
- - Side effects (logging, metrics, events) are preserved unless explicitly scoped for removal
12
- - Edge case handling is preserved — refactors often silently drop edge case branches
13
-
14
- ### Structural Improvement (replaces Plan Adherence)
15
- Is the code measurably better against the refactor goals?
16
- - Complexity metrics improved (fewer nested conditions, shorter functions)
17
- - Coupling reduced (fewer cross-module imports, clearer boundaries)
18
- - Duplication reduced (DRY violations eliminated per refactor-analysis.md scope)
19
- - Readability improved (naming, organization, documentation)
20
-
21
- ### Test Integrity
22
- Refactors must not weaken the test suite.
23
- - No tests were deleted or skipped
24
- - Test coverage percentage is equal or higher
25
- - If tests were rewritten, they cover the same behavioral scenarios
@@ -1,69 +0,0 @@
1
- # Deploy Guide Update Protocol
2
-
3
- When dependency manifests change during implementation, update `DEPLOY.md` at the project root.
4
-
5
- ## Detection
6
-
7
- 1. Check if any dependency manifests were modified in this session:
8
- ```bash
9
- git diff --name-only HEAD -- package.json requirements*.txt Pipfile pyproject.toml go.mod Cargo.toml pom.xml build.gradle Gemfile composer.json docker-compose*.yml Dockerfile .tool-versions 2>/dev/null
10
- ```
11
- 2. If no manifest files changed → skip this step entirely
12
- 3. If manifest files changed, scan for **newly added** dependencies (not version bumps):
13
- ```bash
14
- git diff -U0 HEAD -- package.json requirements*.txt Pipfile pyproject.toml go.mod Cargo.toml pom.xml build.gradle Gemfile composer.json docker-compose*.yml Dockerfile .tool-versions 2>/dev/null | grep '^\+' | grep -v '^\+\+\+' | head -30
15
- ```
16
-
17
- ## Recording
18
-
19
- For each genuinely new framework/tool, record in `DEPLOY.md` at project root:
20
-
21
- | Field | Description | Source |
22
- |-------|-------------|--------|
23
- | **Name** | Framework/tool name | Package name from manifest |
24
- | **Version** | Installed version or constraint | Version spec from manifest |
25
- | **Purpose** | Why it was introduced | You just added it — you know why |
26
- | **Install Command** | How to install locally | Standard install command for the ecosystem |
27
- | **Key Config** | Config files or env vars needed | Config files you just created/modified |
28
- | **Notes** | Setup gotchas, required services | Docker services, manual steps, env vars |
29
-
30
- ## Template for `DEPLOY.md`
31
-
32
- ```markdown
33
- # Deploy Guide
34
-
35
- > Auto-maintained by PrizmKit. Manual edits are preserved.
36
- > Last updated: YYYY-MM-DD
37
-
38
- ## Frameworks & Tools
39
-
40
- ### <Framework Name>
41
-
42
- - **Version**: <version constraint>
43
- - **Purpose**: <why this framework is used>
44
- - **Install**:
45
- ```bash
46
- <install command>
47
- ```
48
- - **Key Config**:
49
- - `<config file or env var>`: <description>
50
- - **Notes**:
51
- - <any setup gotchas, required external services, manual steps>
52
- ```
53
-
54
- ## Update Rules
55
-
56
- - Create file if absent; append new sections if file exists
57
- - Update version if framework already documented
58
- - Preserve manually added content
59
- - Keep entries sorted alphabetically
60
-
61
- ## Filter Out
62
-
63
- - Patch version bumps of existing deps
64
- - Dev-only tools needing no setup (linters, formatters)
65
- - Transitive/lock-file-only changes
66
-
67
- ## Final Step
68
-
69
- Stage the file: `git add DEPLOY.md`