prizmkit 1.1.78 → 1.1.80

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 (115) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/dev-pipeline/scripts/init-pipeline.py +2 -0
  3. package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +2 -0
  4. package/bundled/skills/_metadata.json +1 -1
  5. package/bundled/skills/app-planner/SKILL.md +10 -347
  6. package/bundled/skills/app-planner/references/infrastructure-convention-discovery.md +108 -0
  7. package/bundled/skills/app-planner/references/project-conventions-discovery.md +59 -0
  8. package/bundled/skills/app-planner/references/project-state-detection.md +88 -0
  9. package/bundled/skills/app-planner/references/rules-configuration.md +46 -0
  10. package/bundled/skills/bug-fix-workflow/SKILL.md +1 -30
  11. package/bundled/skills/bug-fix-workflow/references/bug-diagnosis.md +66 -0
  12. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +3 -40
  13. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +49 -0
  14. package/bundled/skills/feature-pipeline-launcher/SKILL.md +3 -46
  15. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +55 -0
  16. package/bundled/skills/feature-workflow/SKILL.md +5 -121
  17. package/bundled/skills/feature-workflow/references/brainstorm-guide.md +137 -0
  18. package/bundled/skills/prizm-kit/SKILL.md +11 -0
  19. package/bundled/skills/prizmkit-code-review/SKILL.md +66 -135
  20. package/bundled/skills/prizmkit-code-review/references/dev-agent-prompt.md +30 -0
  21. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +31 -0
  22. package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +62 -0
  23. package/bundled/skills/prizmkit-code-review/scripts/check_loop.py +186 -0
  24. package/bundled/skills/prizmkit-committer/SKILL.md +6 -0
  25. package/bundled/skills/prizmkit-deploy/SKILL.md +48 -72
  26. package/bundled/skills/prizmkit-deploy/references/data-safety-examples.md +120 -0
  27. package/bundled/skills/prizmkit-deploy/references/ssh-bootstrap-flow.md +49 -0
  28. package/bundled/skills/prizmkit-deploy/references/ssh-execution-flow.md +41 -0
  29. package/bundled/skills/prizmkit-deploy/references/ssh-takeover.md +20 -0
  30. package/bundled/skills/prizmkit-implement/SKILL.md +6 -0
  31. package/bundled/skills/prizmkit-plan/SKILL.md +1 -83
  32. package/bundled/skills/prizmkit-plan/references/examples.md +85 -0
  33. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +13 -0
  34. package/bundled/skills/prizmkit-test/SKILL.md +3 -151
  35. package/bundled/skills/prizmkit-test/references/examples.md +70 -0
  36. package/bundled/skills/prizmkit-test/references/test-generation-steps.md +49 -0
  37. package/bundled/skills/prizmkit-test/references/test-report-template.md +42 -0
  38. package/bundled/skills/recovery-workflow/SKILL.md +1 -30
  39. package/bundled/skills/recovery-workflow/references/detection.md +58 -0
  40. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +3 -45
  41. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +54 -0
  42. package/bundled/skills/refactor-planner/SKILL.md +9 -149
  43. package/bundled/skills/refactor-planner/references/fast-path.md +59 -0
  44. package/bundled/skills/refactor-planner/references/planning-phases.md +135 -0
  45. package/bundled/skills/refactor-workflow/SKILL.md +4 -103
  46. package/bundled/skills/refactor-workflow/references/brainstorm-guide.md +116 -0
  47. package/bundled/skills-windows/app-planner/SKILL.md +10 -349
  48. package/bundled/skills-windows/app-planner/references/infrastructure-convention-discovery.md +108 -0
  49. package/bundled/skills-windows/app-planner/references/project-conventions-discovery.md +59 -0
  50. package/bundled/skills-windows/app-planner/references/project-state-detection.md +90 -0
  51. package/bundled/skills-windows/app-planner/references/rules-configuration.md +46 -0
  52. package/bundled/skills-windows/bug-fix-workflow/SKILL.md +1 -30
  53. package/bundled/skills-windows/bug-fix-workflow/references/bug-diagnosis.md +66 -0
  54. package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +2 -29
  55. package/bundled/skills-windows/bugfix-pipeline-launcher/references/configuration.md +49 -0
  56. package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +2 -35
  57. package/bundled/skills-windows/feature-pipeline-launcher/references/configuration.md +55 -0
  58. package/bundled/skills-windows/feature-workflow/SKILL.md +5 -121
  59. package/bundled/skills-windows/feature-workflow/references/brainstorm-guide.md +137 -0
  60. package/bundled/skills-windows/prizm-kit/SKILL.md +92 -0
  61. package/bundled/skills-windows/prizmkit-code-review/SKILL.md +156 -0
  62. package/bundled/skills-windows/prizmkit-code-review/references/dev-agent-prompt.md +30 -0
  63. package/bundled/skills-windows/prizmkit-code-review/references/review-report-template.md +31 -0
  64. package/bundled/skills-windows/prizmkit-code-review/references/reviewer-agent-prompt.md +62 -0
  65. package/bundled/skills-windows/prizmkit-code-review/scripts/check_loop.py +186 -0
  66. package/bundled/skills-windows/prizmkit-committer/SKILL.md +87 -0
  67. package/bundled/skills-windows/prizmkit-deploy/SKILL.md +444 -0
  68. package/bundled/skills-windows/prizmkit-deploy/references/ci-cd-workflows.md +115 -0
  69. package/bundled/skills-windows/prizmkit-deploy/references/cloud-platform-deploy.md +93 -0
  70. package/bundled/skills-windows/prizmkit-deploy/references/data-safety-examples.md +120 -0
  71. package/bundled/skills-windows/prizmkit-deploy/references/database-setup.md +46 -0
  72. package/bundled/skills-windows/prizmkit-deploy/references/deploy-config-schema.md +148 -0
  73. package/bundled/skills-windows/prizmkit-deploy/references/deploy-history-schema.md +62 -0
  74. package/bundled/skills-windows/prizmkit-deploy/references/deployment-modes.md +50 -0
  75. package/bundled/skills-windows/prizmkit-deploy/references/direct-upload.md +26 -0
  76. package/bundled/skills-windows/prizmkit-deploy/references/dns-setup.md +42 -0
  77. package/bundled/skills-windows/prizmkit-deploy/references/docker-deploy.md +31 -0
  78. package/bundled/skills-windows/prizmkit-deploy/references/firewall-setup.md +37 -0
  79. package/bundled/skills-windows/prizmkit-deploy/references/live-validation-notes.md +21 -0
  80. package/bundled/skills-windows/prizmkit-deploy/references/nginx-blue-green.md +59 -0
  81. package/bundled/skills-windows/prizmkit-deploy/references/ssh-bootstrap-flow.md +49 -0
  82. package/bundled/skills-windows/prizmkit-deploy/references/ssh-execution-flow.md +41 -0
  83. package/bundled/skills-windows/prizmkit-deploy/references/ssh-takeover.md +20 -0
  84. package/bundled/skills-windows/prizmkit-deploy/references/ssl-setup.md +56 -0
  85. package/bundled/skills-windows/prizmkit-implement/SKILL.md +71 -0
  86. package/bundled/skills-windows/prizmkit-plan/SKILL.md +102 -0
  87. package/bundled/skills-windows/prizmkit-plan/assets/plan-template.md +115 -0
  88. package/bundled/skills-windows/prizmkit-plan/assets/spec-template.md +73 -0
  89. package/bundled/skills-windows/prizmkit-plan/references/clarify-guide.md +67 -0
  90. package/bundled/skills-windows/prizmkit-plan/references/examples.md +85 -0
  91. package/bundled/skills-windows/prizmkit-plan/references/verification-checklist.md +60 -0
  92. package/bundled/skills-windows/prizmkit-prizm-docs/SKILL.md +128 -0
  93. package/bundled/skills-windows/prizmkit-prizm-docs/assets/prizm-docs-format.md +613 -0
  94. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-init.md +45 -0
  95. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-rebuild.md +15 -0
  96. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-status.md +14 -0
  97. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-update.md +19 -0
  98. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-validate.md +17 -0
  99. package/bundled/skills-windows/prizmkit-retrospective/SKILL.md +87 -0
  100. package/bundled/skills-windows/prizmkit-retrospective/references/knowledge-injection-steps.md +50 -0
  101. package/bundled/skills-windows/prizmkit-retrospective/references/structural-sync-steps.md +43 -0
  102. package/bundled/skills-windows/prizmkit-test/SKILL.md +133 -0
  103. package/bundled/skills-windows/prizmkit-test/references/examples.md +70 -0
  104. package/bundled/skills-windows/prizmkit-test/references/test-generation-steps.md +49 -0
  105. package/bundled/skills-windows/prizmkit-test/references/test-report-template.md +42 -0
  106. package/bundled/skills-windows/recovery-workflow/SKILL.md +1 -52
  107. package/bundled/skills-windows/recovery-workflow/references/detection.md +58 -0
  108. package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +2 -32
  109. package/bundled/skills-windows/refactor-pipeline-launcher/references/configuration.md +54 -0
  110. package/bundled/skills-windows/refactor-planner/SKILL.md +9 -149
  111. package/bundled/skills-windows/refactor-planner/references/fast-path.md +59 -0
  112. package/bundled/skills-windows/refactor-planner/references/planning-phases.md +135 -0
  113. package/bundled/skills-windows/refactor-workflow/SKILL.md +4 -103
  114. package/bundled/skills-windows/refactor-workflow/references/brainstorm-guide.md +116 -0
  115. package/package.json +1 -1
@@ -131,71 +131,11 @@ Record everything the user provides — these become inputs for Step 1.3.
131
131
 
132
132
  ### Step 1.3: Parallel Deep Reading
133
133
 
134
- **Goal**: Build comprehensive understanding of the project context before discussing detailed requirements. Spawn multiple agents in parallel to read all relevant materials simultaneously.
135
-
136
- **Parallel reading tasks** (launch concurrently):
137
-
138
- | Agent | What to read | Purpose |
139
- |-------|-------------|---------|
140
- | Agent A | User-provided code paths — read existing source files | Understand current architecture, patterns, conventions |
141
- | Agent B | User-provided documents — design docs, specs, PRDs | Understand intended requirements and constraints |
142
- | Agent C | `.prizmkit/prizm-docs/` — root.prizm, L1/L2 docs, TRAPS, RULES | Understand existing architecture knowledge and known pitfalls |
143
- | Agent D | Database/schema files + `.prizmkit/config.json` | Understand data model and tech stack preferences |
144
-
145
- **Also gather** (can be included in any agent's task):
146
- - Directory structure of the project
147
- - Existing test patterns and conventions
148
- - Dependency relationships between existing modules
149
-
150
- **After all agents complete**: Synthesize findings into a coherent understanding before proceeding to discussion.
134
+ Read `${SKILL_DIR}/references/brainstorm-guide.md` §Step 1.3 for the parallel agent dispatch procedure spawn 4 agents (A: code paths, B: documents, C: prizm-docs, D: database/config) to build comprehensive project context before discussion. Synthesize findings before proceeding.
151
135
 
152
136
  ### Step 1.4: Discuss Requirements
153
137
 
154
- **Now** with deep knowledge of the actual codebase and documentsdiscuss the requirements with the user. This discussion is grounded in real context, not abstract questions.
155
-
156
- Present what you learned from the parallel reading:
157
- - Current project structure and patterns (with specific references)
158
- - Existing data model and schema conventions
159
- - Known TRAPS and pitfalls from `.prizmkit/prizm-docs/`
160
- - Integration points with existing modules
161
-
162
- Then ask targeted questions based on what you read. **Adapt question depth to the feature complexity** — a simple CRUD feature needs fewer questions than a real-time collaboration system.
163
-
164
- **Functional Requirements:**
165
- - What are the core user actions/workflows?
166
- - What inputs does the system accept? What outputs does it produce?
167
- - What are the key business rules and validation logic?
168
- - Are there different user roles with different permissions?
169
-
170
- **Data Model & Database** (if applicable):
171
- - What entities/data need to be stored?
172
- - What are the relationships between entities?
173
- - Are there existing database tables this feature must integrate with?
174
- - What fields are required vs optional? What data types?
175
- - Any unique constraints, indexes, or special query patterns needed?
176
- - **RULE**: If the project has existing database tables, ALL new table designs must reference and conform to the existing schema style (naming conventions, ID strategy, timestamp patterns, constraint patterns). Ask the user to confirm the data model before proceeding.
177
-
178
- **User Experience:**
179
- - What does the user see and interact with?
180
- - What is the expected flow/sequence of actions?
181
- - How should errors be displayed to the user?
182
- - Are there any specific UI/UX requirements?
183
-
184
- **Integration & Architecture:**
185
- - "Based on the existing code, this feature would integrate with [modules]. Does that match your expectations?"
186
- - Any external APIs or services involved?
187
- - What authentication/authorization model applies?
188
- - Any real-time requirements (WebSocket, SSE, polling)?
189
-
190
- **Edge Cases & Error Handling:**
191
- - What happens when things go wrong? (network failure, invalid input, concurrent access)
192
- - What are the boundary conditions? (empty states, max limits, permissions denied)
193
- - Any rate limiting, quotas, or resource constraints?
194
-
195
- **Non-Functional Requirements:**
196
- - Performance expectations? (response time, throughput)
197
- - Scalability considerations?
198
- - Security requirements? (encryption, audit logs, compliance)
138
+ Read `${SKILL_DIR}/references/brainstorm-guide.md` §Step 1.4 for the full requirements discussion frameworkfunctional requirements, data model, user experience, integration/architecture, edge cases, and non-functional requirements. Ask targeted questions based on what was learned from parallel reading. **Adapt question depth to the feature complexity.**
199
139
 
200
140
  ### Step 1.5: Confirm and Supplement
201
141
 
@@ -206,57 +146,11 @@ After the discussion:
206
146
  3. **Identify gaps** — if any areas are still unclear, list them explicitly and ask follow-up questions
207
147
  4. **Repeat** until the user confirms: "That covers everything" or "Let's proceed"
208
148
 
209
- **Signs that brainstorming is complete:**
210
- - All functional requirements have concrete acceptance criteria
211
- - Data model entities and relationships are defined
212
- - Edge cases and error handling are addressed
213
- - Integration points are identified
214
- - The user has confirmed the summary is accurate
215
-
216
- **Signs that more questions are needed:**
217
- - User's answers contain vague terms ("handle it appropriately", "make it user-friendly", "standard behavior")
218
- - Core business rules are undefined ("depends on the situation")
219
- - Data relationships are unclear ("somehow connected")
220
- - User says "I'm not sure" — help them think through it with concrete options
149
+ Read `${SKILL_DIR}/references/brainstorm-guide.md` §Completion Signs for the full checklist of when brainstorming is complete vs when more questions are needed.
221
150
 
222
151
  ### Step 1.6: Requirements Summary
223
152
 
224
- Once brainstorming is complete, produce a structured requirements summary:
225
-
226
- ```markdown
227
- ## Requirements Summary
228
-
229
- ### Project/Feature: [Name]
230
-
231
- ### Core Functionality
232
- - [Bullet list of what the system does]
233
-
234
- ### User Roles
235
- - [Role]: [What they can do]
236
-
237
- ### Data Model Overview
238
- - [Entity]: [Key fields, relationships]
239
-
240
- ### Key Business Rules
241
- - [Rule 1]
242
- - [Rule 2]
243
-
244
- ### Integration Points
245
- - [External system/API/module]
246
-
247
- ### Edge Cases & Error Handling
248
- - [Case]: [Expected behavior]
249
-
250
- ### Non-Functional Requirements
251
- - [Requirement]
252
-
253
- ### Reference Materials Reviewed
254
- - [List of code paths, documents, .prizmkit/prizm-docs/ files that were read]
255
-
256
- ### Confirmed by user: ✓
257
- ```
258
-
259
- Present this summary to the user and get explicit confirmation before proceeding.
153
+ Once brainstorming is complete, produce a structured requirements summary. Read `${SKILL_DIR}/references/brainstorm-guide.md` §Requirements Summary Template for the structured output format. Present the summary to the user and get explicit confirmation before proceeding.
260
154
 
261
155
  **CHECKPOINT CP-FW-0**: Requirements fully clarified and confirmed by user.
262
156
 
@@ -503,17 +397,7 @@ While the pipeline runs, the user can continue the conversation:
503
397
 
504
398
  ## Comparison with Alternative Workflows
505
399
 
506
- | Dimension | feature-workflow | bug-fix-workflow | refactor-workflow |
507
- |-----------|-----------------|------------------|-------------------|
508
- | **Purpose** | New features (batch) | Single bug fix (interactive) | Code restructuring (batch) |
509
- | **Brainstorming** | Yes — collect materials, parallel read, discuss | No (bug report is input) | Yes — clarify type, collect materials, parallel read, discuss |
510
- | **Planning Skill** | `feature-planner` | None (triage built-in) | `refactor-planner` |
511
- | **Branch** | Pipeline manages per-feature | `fix/<BUG_ID>-*` | Pipeline manages per-refactor |
512
- | **Execution** | Foreground or background daemon | In-session, interactive | Foreground or background daemon |
513
- | **Input** | Rough idea or requirements | Bug report / stack trace | Rough refactoring idea or target |
514
- | **Output** | Multiple `feat()` commits | Single `fix()` commit | Multiple `refactor()` commits |
515
- | **Behavior Change** | Expected (new functionality) | Fix behavior | Forbidden (structure only) |
516
- | **Batch alternative** | (this is the batch flow) | `bug-planner` + `bugfix-pipeline-launcher` | (this is the batch flow) |
400
+ Read `${SKILL_DIR}/references/brainstorm-guide.md` §Comparison for the full comparison table (feature-workflow vs bug-fix-workflow vs refactor-workflow across 9 dimensions).
517
401
 
518
402
  ---
519
403
 
@@ -0,0 +1,137 @@
1
+ # Brainstorm Guide — Detailed Procedures
2
+
3
+ Procedural details for Phase 1 brainstorming in feature-workflow.
4
+
5
+ ## Step 1.3: Parallel Deep Reading
6
+
7
+ **Goal**: Build comprehensive understanding of the project context before discussing detailed requirements. Spawn multiple agents in parallel to read all relevant materials simultaneously.
8
+
9
+ **Parallel reading tasks** (launch concurrently):
10
+
11
+ | Agent | What to read | Purpose |
12
+ |-------|-------------|---------|
13
+ | Agent A | User-provided code paths — read existing source files | Understand current architecture, patterns, conventions |
14
+ | Agent B | User-provided documents — design docs, specs, PRDs | Understand intended requirements and constraints |
15
+ | Agent C | `.prizmkit/prizm-docs/` — root.prizm, L1/L2 docs, TRAPS, RULES | Understand existing architecture knowledge and known pitfalls |
16
+ | Agent D | Database/schema files + `.prizmkit/config.json` | Understand data model and tech stack preferences |
17
+
18
+ **Also gather** (can be included in any agent's task):
19
+ - Directory structure of the project
20
+ - Existing test patterns and conventions
21
+ - Dependency relationships between existing modules
22
+
23
+ **After all agents complete**: Synthesize findings into a coherent understanding before proceeding to discussion.
24
+
25
+ ## Step 1.4: Discuss Requirements
26
+
27
+ **Now** — with deep knowledge of the actual codebase and documents — discuss the requirements with the user. This discussion is grounded in real context, not abstract questions.
28
+
29
+ Present what you learned from the parallel reading:
30
+ - Current project structure and patterns (with specific references)
31
+ - Existing data model and schema conventions
32
+ - Known TRAPS and pitfalls from `.prizmkit/prizm-docs/`
33
+ - Integration points with existing modules
34
+
35
+ Then ask targeted questions based on what you read. **Adapt question depth to the feature complexity** — a simple CRUD feature needs fewer questions than a real-time collaboration system.
36
+
37
+ ### Functional Requirements
38
+ - What are the core user actions/workflows?
39
+ - What inputs does the system accept? What outputs does it produce?
40
+ - What are the key business rules and validation logic?
41
+ - Are there different user roles with different permissions?
42
+
43
+ ### Data Model & Database (if applicable)
44
+ - What entities/data need to be stored?
45
+ - What are the relationships between entities?
46
+ - Are there existing database tables this feature must integrate with?
47
+ - What fields are required vs optional? What data types?
48
+ - Any unique constraints, indexes, or special query patterns needed?
49
+ - **RULE**: If the project has existing database tables, ALL new table designs must reference and conform to the existing schema style (naming conventions, ID strategy, timestamp patterns, constraint patterns). Ask the user to confirm the data model before proceeding.
50
+
51
+ ### User Experience
52
+ - What does the user see and interact with?
53
+ - What is the expected flow/sequence of actions?
54
+ - How should errors be displayed to the user?
55
+ - Are there any specific UI/UX requirements?
56
+
57
+ ### Integration & Architecture
58
+ - "Based on the existing code, this feature would integrate with [modules]. Does that match your expectations?"
59
+ - Any external APIs or services involved?
60
+ - What authentication/authorization model applies?
61
+ - Any real-time requirements (WebSocket, SSE, polling)?
62
+
63
+ ### Edge Cases & Error Handling
64
+ - What happens when things go wrong? (network failure, invalid input, concurrent access)
65
+ - What are the boundary conditions? (empty states, max limits, permissions denied)
66
+ - Any rate limiting, quotas, or resource constraints?
67
+
68
+ ### Non-Functional Requirements
69
+ - Performance expectations? (response time, throughput)
70
+ - Scalability considerations?
71
+ - Security requirements? (encryption, audit logs, compliance)
72
+
73
+ ## Comparison with Alternative Workflows
74
+
75
+ | Dimension | feature-workflow | bug-fix-workflow | refactor-workflow |
76
+ |-----------|-----------------|------------------|--------------------|
77
+ | **Purpose** | New features (batch) | Single bug fix (interactive) | Code restructuring (batch) |
78
+ | **Brainstorming** | Yes — collect materials, parallel read, discuss | No (bug report is input) | Yes — clarify type, collect materials, parallel read, discuss |
79
+ | **Planning Skill** | `feature-planner` | None (triage built-in) | `refactor-planner` |
80
+ | **Branch** | Pipeline manages per-feature | `fix/<BUG_ID>-*` | Pipeline manages per-refactor |
81
+ | **Execution** | Foreground or background daemon | In-session, interactive | Foreground or background daemon |
82
+ | **Input** | Rough idea or requirements | Bug report / stack trace | Rough refactoring idea or target |
83
+ | **Output** | Multiple `feat()` commits | Single `fix()` commit | Multiple `refactor()` commits |
84
+ | **Behavior Change** | Expected (new functionality) | Fix behavior | Forbidden (structure only) |
85
+ | **Batch alternative** | (this is the batch flow) | `bug-planner` + `bugfix-pipeline-launcher` | (this is the batch flow) |
86
+
87
+ ## Completion Signs
88
+
89
+ **Signs that brainstorming is complete:**
90
+ - All functional requirements have concrete acceptance criteria
91
+ - Data model entities and relationships are defined
92
+ - Edge cases and error handling are addressed
93
+ - Integration points are identified
94
+ - The user has confirmed the summary is accurate
95
+
96
+ **Signs that more questions are needed:**
97
+ - User's answers contain vague terms ("handle it appropriately", "make it user-friendly", "standard behavior")
98
+ - Core business rules are undefined ("depends on the situation")
99
+ - Data relationships are unclear ("somehow connected")
100
+ - User says "I'm not sure" — help them think through it with concrete options
101
+
102
+ ## Requirements Summary Template
103
+
104
+ Once brainstorming is complete, produce a structured requirements summary using the following format. Present the summary to the user and get explicit confirmation before proceeding.
105
+
106
+ ```markdown
107
+ ## Requirements Summary
108
+
109
+ ### Project/Feature: [Name]
110
+
111
+ ### Core Functionality
112
+ - [Bullet list of what the system does]
113
+
114
+ ### User Roles
115
+ - [Role]: [What they can do]
116
+
117
+ ### Data Model Overview
118
+ - [Entity]: [Key fields, relationships]
119
+
120
+ ### Key Business Rules
121
+ - [Rule 1]
122
+ - [Rule 2]
123
+
124
+ ### Integration Points
125
+ - [External system/API/module]
126
+
127
+ ### Edge Cases & Error Handling
128
+ - [Case]: [Expected behavior]
129
+
130
+ ### Non-Functional Requirements
131
+ - [Requirement]
132
+
133
+ ### Reference Materials Reviewed
134
+ - [List of code paths, documents, .prizmkit/prizm-docs/ files that were read]
135
+
136
+ ### Confirmed by user: ✓
137
+ ```
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: "prizm-kit"
3
+ description: "Full-lifecycle dev toolkit index. Routes to the right PrizmKit skill for spec-driven development, Prizm docs, code quality, deployment, and knowledge management. Use when the user asks 'which command?', 'help', 'how do I start a feature', 'get started', 'what tools', 'dev workflow', 'lifecycle', or '/prizmkit'. Use this as the entry point for the full PrizmKit development lifecycle."
4
+ ---
5
+
6
+ # PrizmKit — Full-Lifecycle Development Toolkit
7
+
8
+ ### When to Use
9
+ - User asks "which command?", "help", "how do I start a feature", "get started", "what tools"
10
+ - User wants to understand the PrizmKit development lifecycle
11
+ - User invokes "/prizmkit" or asks about dev workflow
12
+ - User is new to the project and needs orientation
13
+
14
+ ### When NOT to Use
15
+ - User already knows which specific skill to use — invoke it directly
16
+ - Mid-implementation — use the specific skill needed (/prizmkit-implement, /prizmkit-code-review, etc.)
17
+ - User wants to execute immediately without orientation — go directly to /prizmkit-plan or /prizmkit-implement
18
+
19
+ ## Task Execution Model
20
+
21
+ PrizmKit uses **headless mode** — each task runs as an independent AI CLI session with NO context carryover between tasks. Every session starts by reading docs and ends by maintaining docs.
22
+
23
+ **Per-task flow**:
24
+ ```
25
+ read docs → plan → implement → code-review → retrospective → committer
26
+ ```
27
+
28
+ Each task begins by reading context at two levels:
29
+
30
+ **Application level** (read every session):
31
+ - `.prizmkit/prizm-docs/root.prizm` — L0 project architecture index (modules, tech stack, conventions)
32
+ - `.prizmkit/plans/project-brief.md` — user's product vision checklist (generated during project initialization)
33
+ - `.prizmkit/config.json` — tech stack config, deploy strategy
34
+
35
+ **Task level** (read for the specific task):
36
+ - `spec.md` / `plan.md` — task specification and implementation plan
37
+ - `.prizmkit/prizm-docs/<module>.prizm` (L1/L2) — architecture docs for affected modules (TRAPS, DECISIONS, INTERFACES)
38
+
39
+ Each cycle produces spec, plan, and task artifacts that create a traceable record of what was built and why. `.prizmkit/prizm-docs/` stays in sync through retrospective, so the next session starts with up-to-date context.
40
+
41
+ **Fast path** — for small, well-scoped changes, always ask user whether to use fast path:
42
+ ```
43
+ /prizmkit-plan → /prizmkit-implement → /prizmkit-committer
44
+ ```
45
+
46
+ ### Development Scenarios
47
+
48
+ PrizmKit supports any development scenario through the same skill chain. `/prizmkit-plan` produces `spec.md` + `plan.md` regardless of the task type:
49
+
50
+ | Scenario | Artifacts | When to Use |
51
+ |----------|-----------|-------------|
52
+ | **Feature** | `spec.md` → `plan.md` → code | New functionality, UI, API, data model changes |
53
+ | **Bug Fix** | `spec.md` → `plan.md` → code | Complex defects, regressions, crash fixes. Simple bugs can use fast path directly. |
54
+ | **Refactor** | `spec.md` → `plan.md` → code | Restructure, extract, rename, performance. No behavior change. |
55
+
56
+ All three follow the same per-task flow. Detailed documentation policies (when to update `.prizmkit/prizm-docs/`, when to skip steps) are defined within each skill — not here.
57
+
58
+ ### Best Practices for AI-Driven Development
59
+
60
+ **Monorepo structure recommended**: Keep frontend, backend, and shared libraries in one repository. AI needs visibility into the full call chain — cross-repo references are invisible to it. If you have a multi-repo setup, add all related repos to the AI workspace so module boundaries and API contracts are discoverable.
61
+
62
+ **Module organization**: Ensure every meaningful module has a `.prizmkit/prizm-docs/` L1 doc. AI reads TRAPS and DECISIONS before modifying files — undocumented modules get no guardrails.
63
+
64
+ **Small, focused tasks**: Break large features into tasks that can each be completed in one AI session. The pipeline handles this automatically via `/prizmkit-plan` task decomposition.
65
+
66
+ ## Core Skill Reference
67
+
68
+ | Skill | Purpose | Trigger Phrases |
69
+ |-------|---------|-----------------|
70
+ | `/prizmkit-plan` | Specify + plan: natural language → spec.md → plan.md + tasks | "specify", "plan", "new feature", "I want to add...", "architect", "break it down" |
71
+ | `/prizmkit-implement` | Execute plan.md tasks, write code (TDD) | "implement", "build", "code it", "start coding" |
72
+ | `/prizmkit-code-review` | Diagnose issues + produce Fix Instructions | "review", "check code", "is it ready to commit" |
73
+ | `/prizmkit-retrospective` | Sync .prizmkit/prizm-docs/ with code changes | "retrospective", "retro", "sync docs", "wrap up" |
74
+ | `/prizmkit-committer` | Safe git commit with Conventional Commits | "commit", "submit", "finish", "ship it" |
75
+ | `/prizmkit-deploy` | Generate/update deployment documentation | "deploy docs", "deployment guide", "how to deploy" |
76
+ | `/prizmkit-init` | Project bootstrap + .prizmkit/prizm-docs/ setup | "init", "initialize", "take over this project" |
77
+ | `/prizmkit-prizm-docs` | Doc management (init/status/rebuild/validate) | "check docs", "rebuild docs", "validate docs" |
78
+
79
+ **Reading guide**:
80
+ - Need code structure/modules/interfaces/traps/decisions? → `.prizmkit/prizm-docs/`
81
+
82
+ ## Quick Start (First-Time Setup)
83
+
84
+ 1. `npx prizmkit install .` → installs skills, rules (`prizm-documentation.md`, `prizm-commit-workflow.md`), hooks, platform scaffolding
85
+ 2. `/prizmkit-init` → scans project code, generates `.prizmkit/prizm-docs/`, detects tech stack, populates `.prizmkit/config.json`
86
+ 3. `/prizmkit-plan` → specify your first feature → produces spec.md + plan.md
87
+ 4. `/prizmkit-implement` → TDD implementation following the plan
88
+ 5. `/prizmkit-code-review` → review before commit
89
+ 6. `/prizmkit-retrospective` → sync `.prizmkit/prizm-docs/` with changes
90
+ 7. `/prizmkit-committer` → safe Conventional Commit
91
+
92
+ > **Note**: Rules and hooks are installed by `npx prizmkit install`, not by `/prizmkit-init`.
@@ -0,0 +1,156 @@
1
+ ---
2
+ name: "prizmkit-code-review"
3
+ description: "Iterative review-fix loop against spec and plan. Spawns a read-only Reviewer agent, filters findings, then a Dev agent applies fixes. Loops until PASS (max 3 rounds). Use after /prizmkit-implement as quality gate. Trigger on: 'review', 'check code', 'code review', 'is it ready to commit'. (project)"
4
+ ---
5
+
6
+ # PrizmKit Code Review
7
+
8
+ An iterative review-fix loop that reviews code changes against the spec and plan, then automatically fixes issues. Uses three separated roles:
9
+
10
+ - **Reviewer Agent** (read-only): analyzes git diff against spec goals and plan decisions, produces structured findings
11
+ - **Main Agent** (orchestrator): filters Reviewer findings for reasonableness, coordinates the loop
12
+ - **Dev Agent** (read-write): applies fixes for accepted findings
13
+
14
+ The loop repeats until the Reviewer finds no issues or the max round limit is reached.
15
+
16
+ ### When to Use
17
+ - After `/prizmkit-implement` to verify code quality before commit
18
+ - User says "review", "check code", "review my implementation"
19
+ - As a quality gate before `/prizmkit-committer`
20
+
21
+ ### When NOT to Use
22
+ - Trivial changes (typo, single-line config) → commit directly
23
+ - No spec.md or plan.md exists → nothing to review against
24
+
25
+ ## Input
26
+
27
+ | Parameter | Required | Description |
28
+ |-----------|----------|-------------|
29
+ | `artifact_dir` | No | Directory containing spec.md + plan.md. If omitted, scan `.prizmkit/` subdirectories for the most recently modified directory with a `plan.md` whose tasks are all completed. |
30
+
31
+ ## Phase 0: Context Loading
32
+
33
+ 1. **Read spec.md** from the artifact directory — extract goals and acceptance criteria.
34
+ 2. **Read plan.md** from the artifact directory — extract architecture decisions and completed tasks.
35
+ 3. **Read dev rules** (if configured): If `.prizmkit/prizm-docs/root.prizm` exists, read it and check for a `RULES:` line. If present, read all referenced `.prizmkit/rules/<layer>-rules.md` files. If `root.prizm` or a referenced rules file does not exist, continue with "No custom dev rules configured — use general best practices."
36
+ 4. **Capture workspace diff**: run `git diff` (unstaged) + `git diff --cached` (staged) + `git status` to understand the full scope of changes. For new files in git status, note their paths for the Reviewer to read.
37
+ - If no changes are detected, skip Phase 1 and proceed to Phase 2 with verdict PASS, rounds 0, and an empty findings list. Always write `review-report.md`; downstream pipeline steps use it as the review gate.
38
+
39
+ ## Phase 1: Review-Fix Loop
40
+
41
+ ### Gate Mode Detection
42
+
43
+ The loop exit conditions are enforced by a gatekeeper. Check Python availability first:
44
+
45
+ ```bash
46
+ python3 --version 2>/dev/null && echo "SCRIPT_MODE" || echo "TEXT_MODE"
47
+ ```
48
+
49
+ - **Script mode** (Python available): Use `${SKILL_DIR}/scripts/check_loop.py` to enforce exit conditions with round tracking, max-rounds enforcement, and divergence detection. The script prevents accidentally exceeding the 3-round limit.
50
+ - **Text mode** (no Python): Follow §Text Fallback Constraints — identical behavior enforced manually.
51
+
52
+ ### Step 0: Initialize Loop State
53
+
54
+ The script is stateless — no `--reset` or runtime files. Initialize these values before starting:
55
+
56
+ **Script mode** — `findings_history = []`, `max_rounds = 3`, `round = 1`.
57
+ **Text mode** — track manually: `round = 1`, `findings_history = []`.
58
+
59
+ ### Loop Flow
60
+
61
+ ```
62
+ 1. Spawn Reviewer Agent (read-only) → findings or PASS
63
+ 2. Parse result:
64
+ - PASS → Call Loop Exit Gate → Phase 2
65
+ - NEEDS_FIXES → count findings → Step 3 (do not call gate yet)
66
+ 3. Main Agent filters findings → Call Loop Exit Gate → if endLoop: Phase 2
67
+ 4. Spawn Dev Agent (read-write) → apply fixes
68
+ 5. Increment round and return to Step 1
69
+ ```
70
+
71
+ ### Loop Exit Gate
72
+
73
+ Call the gate only in these cases:
74
+
75
+ 1. Reviewer returned `PASS`.
76
+ 2. Main Agent has finished filtering `NEEDS_FIXES` findings.
77
+
78
+ Do not call the gate for `NEEDS_FIXES` before filtering, because `accepted_count` is not known yet. Only exit the loop when `endLoop` is `true` — the gate is the sole authority on exit decisions.
79
+
80
+ **Script mode invocation:**
81
+ ```bash
82
+ echo '{"reviewer_result":"NEEDS_FIXES","accepted_count":2,"findings_count":3,"round":1,"findings_history":[],"max_rounds":3,"filtering_done":true}' | python3 ${SKILL_DIR}/scripts/check_loop.py
83
+ ```
84
+
85
+ | Input field | Type | Description |
86
+ |-------------|------|-------------|
87
+ | `reviewer_result` | `"PASS"` or `"NEEDS_FIXES"` | Reviewer's verdict |
88
+ | `accepted_count` | int | Findings accepted by Main Agent. Use `0` for Reviewer PASS or when all findings were rejected after filtering. |
89
+ | `findings_count` | int | Total findings returned by Reviewer this round |
90
+ | `round` | int | Current round number (1-based, model-supplied — the script does not auto-increment) |
91
+ | `findings_history` | `[int, ...]` | Findings count per round, used for divergence detection. Initialize as `[]`. Pass back the value from the previous gate call's output. |
92
+ | `max_rounds` | int | Maximum review rounds before forced exit. Default `3`. |
93
+ | `filtering_done` | bool | `true` only after Main Agent has filtered `NEEDS_FIXES` findings. For Reviewer PASS, this may be omitted. |
94
+
95
+ Output: `{"endLoop": bool, "reason": str, "verdict": "PASS"|"NEEDS_FIXES"|null, "round": int, "maxRounds": int, "divergenceWarning": bool, "findings_history": [int, ...]}`
96
+
97
+ The script enforces three exit conditions in order: (1) Reviewer PASS → exit with verdict PASS, (2) filtered `NEEDS_FIXES` with zero accepted findings → exit with verdict PASS, (3) max rounds reached after filtering → exit with verdict NEEDS_FIXES. It records `findings_count` once per round by round index, so repeated gate calls cannot duplicate history entries. If `divergenceWarning` is true, warn the user the loop may not be converging.
98
+
99
+ **Text mode** — enforce §Text Fallback Constraints manually with identical logic.
100
+
101
+ ### Text Fallback Constraints
102
+
103
+ When Python is unavailable, apply these rules exactly — they match the script's logic:
104
+
105
+ 1. **PASS exit**: Reviewer returns `PASS` → exit loop, verdict PASS.
106
+ 2. **Pre-filter NEEDS_FIXES**: Count findings and continue to filtering. Do not apply all-rejected or max-round exits before filtering.
107
+ 3. **All-rejected exit**: After filtering, if all findings were rejected → exit loop, verdict PASS.
108
+ 4. **Max rounds**: After filtering, if `round >= 3` and accepted findings remain → exit loop, verdict NEEDS_FIXES. Write `review-report.md` with unresolved findings.
109
+ 5. **Divergence**: If findings count strictly increases for 3 consecutive recorded rounds, warn user the loop may not converge.
110
+ 6. **Counter**: Increment `round` after each complete cycle (Steps 1-4). Track `findings_history` by round index to detect divergence — record `findings_count` once per round.
111
+
112
+ ### Step 1: Spawn Reviewer Agent
113
+
114
+ Include the dev rules read in Phase 0 step 3 in the `## Dev Rules` section of the prompt. Spawn a platform-supported **read-only** reviewer agent; use `subagent_type: Explore` only on platforms that support it. If no read-only agent is available, perform the review in the Main Agent without editing files. Read `${SKILL_DIR}/references/reviewer-agent-prompt.md` for the full prompt template — fill `{goals}`, `{plan decisions}`, `{dev rules}`, `{round N}`, and `{round_context}` before spawning.
115
+
116
+ Round context varies by round:
117
+ - Round 1: "This is the first review. Examine all changes comprehensively."
118
+ - Round 2+: "Previous round found issues that were fixed. Focus on: (1) whether previous fixes are correct, (2) whether fixes introduced new problems, (3) any remaining issues. Do not re-report issues that have already been fixed."
119
+
120
+ ### Step 2: Check Result + Gate
121
+
122
+ Parse the Reviewer Agent's output:
123
+ - If `Result: PASS` → call the **Loop Exit Gate** with `{"reviewer_result": "PASS", "accepted_count": 0, "findings_count": 0, "round": <current_round>, "findings_history": <current_history>, "max_rounds": 3}`. If `endLoop=true`, proceed to Phase 2.
124
+ - If `Result: NEEDS_FIXES` → count findings, do not call the gate yet, then continue to Step 3.
125
+
126
+ ### Step 3: Main Agent Filters Findings + Gate
127
+
128
+ Review each finding and decide whether it's reasonable. This prevents unnecessary or harmful changes.
129
+
130
+ **For each finding, evaluate:**
131
+ - Is this relevant to the current changes? (Reject findings about unmodified, unrelated code.)
132
+ - Is this a real problem or a subjective style preference? (Reject pure style preferences unless they violate clear project conventions.)
133
+ - Would fixing this improve the code without introducing risk? (Reject fixes that require large refactors outside scope.)
134
+
135
+ **Output per finding:**
136
+ - **Accepted**: The finding is reasonable — include it in the Dev Agent's task.
137
+ - **Rejected** (with reason): Brief explanation (e.g., "Out of scope", "Style preference, not a defect").
138
+
139
+ After filtering: call the **Loop Exit Gate** with `{"reviewer_result": "NEEDS_FIXES", "accepted_count": <N>, "findings_count": <total findings this round>, "round": <current_round>, "findings_history": <current_history>, "max_rounds": 3, "filtering_done": true}`. If `endLoop=true`, proceed to Phase 2.
140
+
141
+ ### Step 4: Spawn Dev Agent
142
+
143
+ Spawn a platform-supported **read-write** developer agent. If no write-capable agent is available, the Main Agent applies accepted fixes directly. Read `${SKILL_DIR}/references/dev-agent-prompt.md` for the full prompt template — fill `{spec context}` and `{accepted findings}` before spawning.
144
+
145
+ After the Dev Agent returns, record results and return to Step 1 for the next round.
146
+
147
+ ## Phase 2: Output
148
+
149
+ Always write `review-report.md` to the artifact directory, including no-change PASS results. Read `${SKILL_DIR}/references/review-report-template.md` for the full output format.
150
+
151
+ - `PASS`: Reviewer returned no findings (or all remaining findings were rejected as unreasonable)
152
+ - `NEEDS_FIXES`: 3 rounds completed but unresolved findings remain
153
+
154
+ Also output a completion summary to conversation.
155
+
156
+ **HANDOFF:** `/prizmkit-retrospective` (if PASS) or inform the caller of remaining issues (if NEEDS_FIXES after max rounds)
@@ -0,0 +1,30 @@
1
+ # Dev Agent Prompt Template
2
+
3
+ Used in Phase 1 Step 4 of `/prizmkit-code-review`. The orchestrator fills `{spec context}` and `{accepted findings}` before spawning the Dev Agent.
4
+
5
+ ```
6
+ You are a developer fixing code review findings. Apply each fix carefully without breaking existing functionality.
7
+
8
+ ## Spec Context
9
+ {goals from spec.md for reference}
10
+
11
+ ## Findings to Fix
12
+ {accepted findings list — each with Severity, Location, Problem, Suggestion, Verification}
13
+
14
+ ## Instructions
15
+ 1. Read each finding carefully.
16
+ 2. For each finding:
17
+ a. Read the relevant code and understand the context.
18
+ b. Implement the fix based on the suggestion.
19
+ c. If a suggestion is not feasible (would break other functionality, technically impossible), explain why.
20
+ 3. After all fixes, report what you did.
21
+
22
+ ## Output Format
23
+ For each finding, report:
24
+ - **Finding N**: [fixed | unable-to-fix]
25
+ - **What was done**: Brief description
26
+ - **Files modified**: List of changed files
27
+ (If unable-to-fix, explain why)
28
+ ```
29
+
30
+ After the Dev Agent returns, record results and return to Step 1 for the next round.
@@ -0,0 +1,31 @@
1
+ # Review Report Output Template
2
+
3
+ Used in Phase 2 of `/prizmkit-code-review`. Always write `review-report.md` to the artifact directory using this format.
4
+
5
+ ```markdown
6
+ # Review Report
7
+
8
+ ## Verdict: <PASS|NEEDS_FIXES>
9
+ ## Rounds: <number of review rounds completed; use 0 for no-change PASS>
10
+ ## Total findings: <total> → Fixed: <fixed>, Rejected: <rejected>, Unresolved: <unresolved>
11
+
12
+ ## Round <N>
13
+ Findings: <count> | Accepted: <count>, Rejected: <count>
14
+
15
+ ### Finding <N>: <short title>
16
+ - Severity: <high|medium|low>
17
+ - Dimension: <goal-alignment|defect|completeness|consistency|security|rules-compliance>
18
+ - Location: <filepath:line or project-level>
19
+ - Problem: <what was wrong and why it mattered>
20
+ - Status: <fixed (round N)|rejected — reason|unresolved — reason>
21
+
22
+ ## Final Summary
23
+ <One to three sentences summarizing the review outcome, including no-change PASS when applicable.>
24
+ ```
25
+
26
+ For `PASS` with no findings, write `Total findings: 0 → Fixed: 0, Rejected: 0, Unresolved: 0` and `## Round 0: PASS — no workspace changes to review` or `## Round N: PASS — no issues found`.
27
+
28
+ ## Verdict Rules
29
+
30
+ - `PASS`: Reviewer returned no findings, no workspace changes existed, or all remaining findings were rejected as unreasonable.
31
+ - `NEEDS_FIXES`: Max rounds completed but accepted findings remain unresolved.