prizmkit 1.1.79 → 1.1.81

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 (110) 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 +12 -356
  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/backend/derivation-rules.md +10 -0
  10. package/bundled/skills/app-planner/references/rules/database/derivation-rules.md +9 -0
  11. package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +10 -0
  12. package/bundled/skills/app-planner/references/rules/frontend/question-bank.md +17 -0
  13. package/bundled/skills/app-planner/references/rules/frontend/template.md +19 -0
  14. package/bundled/skills/app-planner/references/rules/mobile/derivation-rules.md +10 -0
  15. package/bundled/skills/app-planner/references/rules-configuration.md +46 -0
  16. package/bundled/skills/bug-fix-workflow/SKILL.md +18 -54
  17. package/bundled/skills/bug-fix-workflow/references/bug-diagnosis.md +41 -0
  18. package/bundled/skills/bug-planner/SKILL.md +20 -12
  19. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +9 -108
  20. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +98 -0
  21. package/bundled/skills/feature-pipeline-launcher/SKILL.md +20 -103
  22. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +81 -0
  23. package/bundled/skills/feature-planner/SKILL.md +5 -9
  24. package/bundled/skills/feature-workflow/SKILL.md +27 -184
  25. package/bundled/skills/feature-workflow/references/brainstorm-guide.md +137 -0
  26. package/bundled/skills/prizm-kit/SKILL.md +14 -2
  27. package/bundled/skills/prizmkit-code-review/SKILL.md +67 -136
  28. package/bundled/skills/prizmkit-code-review/references/dev-agent-prompt.md +30 -0
  29. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +31 -0
  30. package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +62 -0
  31. package/bundled/skills/prizmkit-code-review/scripts/check_loop.py +186 -0
  32. package/bundled/skills/prizmkit-committer/SKILL.md +8 -0
  33. package/bundled/skills/prizmkit-deploy/SKILL.md +49 -73
  34. package/bundled/skills/prizmkit-deploy/references/data-safety-examples.md +120 -0
  35. package/bundled/skills/prizmkit-deploy/references/ssh-bootstrap-flow.md +49 -0
  36. package/bundled/skills/prizmkit-deploy/references/ssh-execution-flow.md +41 -0
  37. package/bundled/skills/prizmkit-deploy/references/ssh-takeover.md +20 -0
  38. package/bundled/skills/prizmkit-implement/SKILL.md +7 -1
  39. package/bundled/skills/prizmkit-plan/SKILL.md +1 -83
  40. package/bundled/skills/prizmkit-plan/references/examples.md +85 -0
  41. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +14 -0
  42. package/bundled/skills/prizmkit-retrospective/SKILL.md +1 -1
  43. package/bundled/skills/prizmkit-test/SKILL.md +3 -151
  44. package/bundled/skills/prizmkit-test/references/examples.md +70 -0
  45. package/bundled/skills/prizmkit-test/references/test-generation-steps.md +49 -0
  46. package/bundled/skills/prizmkit-test/references/test-report-template.md +42 -0
  47. package/bundled/skills/recovery-workflow/SKILL.md +24 -103
  48. package/bundled/skills/recovery-workflow/references/detection.md +58 -0
  49. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +9 -96
  50. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +88 -0
  51. package/bundled/skills/refactor-planner/SKILL.md +15 -157
  52. package/bundled/skills/refactor-planner/references/fast-path.md +59 -0
  53. package/bundled/skills/refactor-planner/references/planning-phases.md +135 -0
  54. package/bundled/skills/refactor-workflow/SKILL.md +18 -178
  55. package/bundled/skills/refactor-workflow/references/brainstorm-guide.md +116 -0
  56. package/bundled/skills-windows/app-planner/SKILL.md +12 -358
  57. package/bundled/skills-windows/app-planner/references/infrastructure-convention-discovery.md +108 -0
  58. package/bundled/skills-windows/app-planner/references/project-conventions-discovery.md +59 -0
  59. package/bundled/skills-windows/app-planner/references/project-state-detection.md +90 -0
  60. package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +10 -0
  61. package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +9 -0
  62. package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +10 -0
  63. package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +17 -0
  64. package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +19 -0
  65. package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +10 -0
  66. package/bundled/skills-windows/app-planner/references/rules-configuration.md +46 -0
  67. package/bundled/skills-windows/bug-fix-workflow/SKILL.md +18 -54
  68. package/bundled/skills-windows/bug-fix-workflow/references/bug-diagnosis.md +41 -0
  69. package/bundled/skills-windows/bug-planner/SKILL.md +20 -12
  70. package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +6 -91
  71. package/bundled/skills-windows/bugfix-pipeline-launcher/references/configuration.md +94 -0
  72. package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +19 -88
  73. package/bundled/skills-windows/feature-pipeline-launcher/references/configuration.md +77 -0
  74. package/bundled/skills-windows/feature-planner/SKILL.md +5 -9
  75. package/bundled/skills-windows/feature-workflow/SKILL.md +27 -184
  76. package/bundled/skills-windows/feature-workflow/references/brainstorm-guide.md +137 -0
  77. package/bundled/skills-windows/prizm-kit/SKILL.md +14 -2
  78. package/bundled/skills-windows/prizmkit-code-review/SKILL.md +67 -136
  79. package/bundled/skills-windows/prizmkit-code-review/references/dev-agent-prompt.md +30 -0
  80. package/bundled/skills-windows/prizmkit-code-review/references/review-report-template.md +31 -0
  81. package/bundled/skills-windows/prizmkit-code-review/references/reviewer-agent-prompt.md +62 -0
  82. package/bundled/skills-windows/prizmkit-code-review/scripts/check_loop.py +186 -0
  83. package/bundled/skills-windows/prizmkit-committer/SKILL.md +8 -0
  84. package/bundled/skills-windows/prizmkit-deploy/SKILL.md +50 -74
  85. package/bundled/skills-windows/prizmkit-deploy/references/data-safety-examples.md +120 -0
  86. package/bundled/skills-windows/prizmkit-deploy/references/direct-upload.md +3 -3
  87. package/bundled/skills-windows/prizmkit-deploy/references/ssh-bootstrap-flow.md +49 -0
  88. package/bundled/skills-windows/prizmkit-deploy/references/ssh-execution-flow.md +41 -0
  89. package/bundled/skills-windows/prizmkit-deploy/references/ssh-takeover.md +20 -0
  90. package/bundled/skills-windows/prizmkit-deploy/references/ssl-setup.md +2 -2
  91. package/bundled/skills-windows/prizmkit-implement/SKILL.md +7 -1
  92. package/bundled/skills-windows/prizmkit-plan/SKILL.md +1 -83
  93. package/bundled/skills-windows/prizmkit-plan/references/examples.md +85 -0
  94. package/bundled/skills-windows/prizmkit-prizm-docs/SKILL.md +14 -0
  95. package/bundled/skills-windows/prizmkit-retrospective/SKILL.md +1 -1
  96. package/bundled/skills-windows/prizmkit-retrospective/references/structural-sync-steps.md +1 -1
  97. package/bundled/skills-windows/prizmkit-test/SKILL.md +3 -151
  98. package/bundled/skills-windows/prizmkit-test/references/examples.md +70 -0
  99. package/bundled/skills-windows/prizmkit-test/references/test-generation-steps.md +49 -0
  100. package/bundled/skills-windows/prizmkit-test/references/test-report-template.md +42 -0
  101. package/bundled/skills-windows/recovery-workflow/SKILL.md +24 -125
  102. package/bundled/skills-windows/recovery-workflow/references/detection.md +58 -0
  103. package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +8 -77
  104. package/bundled/skills-windows/refactor-pipeline-launcher/references/configuration.md +82 -0
  105. package/bundled/skills-windows/refactor-planner/SKILL.md +15 -157
  106. package/bundled/skills-windows/refactor-planner/references/fast-path.md +59 -0
  107. package/bundled/skills-windows/refactor-planner/references/planning-phases.md +135 -0
  108. package/bundled/skills-windows/refactor-workflow/SKILL.md +18 -178
  109. package/bundled/skills-windows/refactor-workflow/references/brainstorm-guide.md +116 -0
  110. package/package.json +1 -1
@@ -108,94 +108,11 @@ Compare what exists against what should exist, across three levels:
108
108
 
109
109
  ### Phase 4: Generate Missing Tests
110
110
 
111
- Generate tests in priority order: unit → integration → E2E. After each batch, run immediately.
112
-
113
- When generated tests fail, distinguish two cases:
114
- - **Test bug** (syntax error, wrong import, wrong mock, wrong framework API usage) → fix the test and re-run
115
- - **Assertion failure** (test is valid but code returns unexpected result) → mark as "needs review" in report; do NOT modify production code. This is a potential bug discovered by the generated test.
116
-
117
- If a test fails repeatedly after 2 fix attempts, skip it and mark as "unresolved" in the report.
118
-
119
- **4a. Unit Tests (always applicable)**
120
-
121
- For each uncovered interface:
122
- - Read the source file to understand function signature and logic
123
- - Generate test file matching project conventions (framework, naming, directory, import style, mock/fixture patterns)
124
- - Common naming patterns to match:
125
- - `src/foo.ts` → `src/__tests__/foo.test.ts` or `src/foo.spec.ts` or `tests/foo_test.py`
126
- - Mirror the existing pattern; if no tests exist, use the framework's default convention
127
- - Cover: happy path, edge cases (null/undefined/empty), error conditions, boundary values
128
- - Do NOT test framework internals or third-party library behavior
129
- - Run tests immediately after generating
130
-
131
- **4b. Integration Tests**
132
-
133
- For each module with dependencies:
134
- - Generate tests for the module's primary interface exercising its real dependencies
135
- - If API endpoints exist: request/response tests (valid input, invalid input, missing params, auth)
136
- - If database operations exist: CRUD tests using the project's existing test database config
137
- - Run tests immediately after generating
138
-
139
- **4c. E2E Tests (conditional)**
140
-
141
- Preconditions (ALL must be met):
142
- - Playwright is available (`@playwright/test` or `playwright` in package.json dependencies, or `npx playwright --version` succeeds as fallback)
143
- - Playwright browsers are installed (check `npx playwright install --dry-run 2>/dev/null` exits cleanly, or `node_modules/.cache/ms-playwright/` directory exists; if missing, warn in report and skip E2E)
144
- - Project has a UI layer
145
- - Project can be started (start/dev script in package.json)
146
- - Acceptance criteria exist in spec.md files
147
-
148
- If ALL met:
149
- - **Before starting dev server**: detect whether it's already running: (1) check `package.json` scripts for port flags (`--port`, `-p`, `PORT=`), (2) fall back to framework defaults (3000 for React/Next/Express, 5173 for Vite, 8000 for Django, 5000 for Flask), (3) if still unknown, ask the user. Use the detected port in `lsof -i :<port>` to check. If running, tell user: "Dev server appears to be already running on port {N}. Use this running instance for E2E tests?" If user confirms, use existing instance. If user declines, skip E2E.
150
- - Start the project dev server (only if not already running). Wait for it to be ready.
151
- - For each uncovered acceptance criterion, generate a Playwright test script
152
- - Run generated E2E tests, capture screenshots of failures
153
- - **Only stop dev server if you started it.** Never stop a server that was already running.
154
-
155
- If NOT met:
156
- - Note what was skipped and why in the report
157
- - If only the server wasn't startable: still generate E2E script files but mark as "not run — manual execution needed"
111
+ Read `${SKILL_DIR}/references/test-generation-steps.md` for the detailed generation procedure — priority order (unit → integration → E2E), failure handling rules, and generation patterns for each test level.
158
112
 
159
113
  ### Phase 5: Unified Report
160
114
 
161
- Create `.prizmkit/test/{YYYY_MM_DD_HH_MM_SS}_testresult/` directory.
162
-
163
- **test-report.md** format:
164
-
165
- ```markdown
166
- # Test Report — {timestamp}
167
-
168
- ## Summary
169
- - Scope: {full / module: name / feature: ###-name}
170
- - Architecture: {frontend / backend / fullstack}
171
- - Test framework: {name}
172
- - Mode: {interactive / headless}
173
-
174
- ## Existing Tests
175
- - Total: {N} | Passed: {N} | Failed: {N}
176
- {failed test details or "All passing"}
177
- {or "No existing tests found — generated first batch"}
178
-
179
- ## Coverage Gaps Found
180
- | Module | Interface | Type | Status |
181
- |--------|-----------|------|--------|
182
- | ... | ... | unit/integration/e2e | covered / generated / needs-review / unresolved / skipped |
183
-
184
- ## Generated Tests
185
- - Unit: {N} generated, {N} needs-review, {N} unresolved
186
- - Integration: {N} generated, {N} needs-review, {N} unresolved
187
- - E2E: {N} generated, {N} skipped ({reason})
188
-
189
- ## Final Status
190
- - All tests passing: {yes / no}
191
- - Needs human review: {list of tests marked needs-review}
192
- {remaining failures if any}
193
- ```
194
-
195
- Also save:
196
- - `existing-test-output.txt` — raw output from Phase 2
197
- - `generated-tests/` — copies of all generated test files
198
- - `e2e-output/` — E2E logs and failure screenshots (if applicable)
115
+ Create `.prizmkit/test/{YYYY_MM_DD_HH_MM_SS}_testresult/` directory. Read `${SKILL_DIR}/references/test-report-template.md` for the full report format and artifact list.
199
116
 
200
117
  ## Output
201
118
 
@@ -211,71 +128,6 @@ If the session is interrupted:
211
128
 
212
129
  ## Examples
213
130
 
214
- ### Example 1: Full-Project Quality Check with Test Generation
215
-
216
- **User**: `/prizmkit-test`
217
-
218
- **Phase 0 — Architecture Detection**:
219
- ```
220
- Detected: Fullstack (React + Express)
221
- Test framework: Vitest (7 existing test files)
222
- ```
223
-
224
- **Phase 1 — Scope Selection** (user selects option 1):
225
- ```
226
- Scope: Full project (all modules, all specs)
227
- ```
228
-
229
- **Phase 2 — Existing Tests**: 7 test files found, 20 tests run, 18 passed, 2 pre-existing failures (recorded, not fixed).
230
-
231
- **Phase 3 — Gap Analysis** (excerpt):
232
- | Module | Interface | Type | Status |
233
- |--------|-----------|------|--------|
234
- | auth | login() | unit | missing |
235
- | auth | register() | unit | missing |
236
- | payment | processPayment() | unit | missing |
237
- | payment | api/checkout | integration | missing |
238
- | — | Checkout flow | e2e | missing |
239
-
240
- **Phase 4**: Generated 5 unit tests (3 passing, 2 assertion failures marked "needs-review"), 1 integration test (passing), 1 E2E test (passing).
241
-
242
- **Phase 5 — Report Summary**:
243
- ```
244
- Generated: 5 unit (2 needs-review), 1 integration, 1 E2E
245
- Report: .prizmkit/test/2026_05_23_14_30_00_testresult/test-report.md
246
- Needs human review: processPayment (returns 400 for negative amounts, expected 422), refund (missing authorization header causes 500 instead of 401)
247
- ```
248
-
249
- ### Example 2: Single-Feature Targeted Test
250
-
251
- **User**: `/prizmkit-test`
252
-
253
- **Phase 0 — Architecture Detection**:
254
- ```
255
- Detected: Backend (Express)
256
- Test framework: Vitest
257
- ```
258
-
259
- **Phase 1 — Scope Selection** (user selects option 3, then picks "042-payment-gateway"):
260
- ```
261
- Scope: Single feature — 042-payment-gateway
262
- Test files in scope: 2
263
-
264
- **Phase 2 — Existing Tests**: 2 test files, 8 tests, all passing.
265
-
266
- **Phase 3 — Gap Analysis** (excerpt):
267
- | Module | Interface | Type | Status |
268
- |--------|-----------|------|--------|
269
- | payment | processPayment() | unit | missing |
270
- | payment | refund() | unit | missing |
271
-
272
- **Phase 4**: Generated 2 unit tests (both passing). No integration/E2E applicable for this scope.
273
-
274
- **Phase 5 — Report Summary**:
275
- ```
276
- Generated: 2 unit tests (all passing)
277
- Report: .prizmkit/test/2026_05_23_15_00_00_testresult/test-report.md
278
- All tests passing. Ready for commit.
279
- ```
131
+ Read `${SKILL_DIR}/references/examples.md` for worked examples of full-project and single-feature test runs.
280
132
 
281
133
  **HANDOFF:** Independent skill — no handoff. User may proceed to `/prizmkit-committer` if all tests pass, or fix issues manually if tests are marked "needs-review".
@@ -0,0 +1,70 @@
1
+ # Test Examples
2
+
3
+ ## Example 1: Full-Project Quality Check with Test Generation
4
+
5
+ **User**: `/prizmkit-test`
6
+
7
+ **Phase 0 — Architecture Detection**:
8
+ ```
9
+ Detected: Fullstack (React + Express)
10
+ Test framework: Vitest (7 existing test files)
11
+ ```
12
+
13
+ **Phase 1 — Scope Selection** (user selects option 1):
14
+ ```
15
+ Scope: Full project (all modules, all specs)
16
+ ```
17
+
18
+ **Phase 2 — Existing Tests**: 7 test files found, 20 tests run, 18 passed, 2 pre-existing failures (recorded, not fixed).
19
+
20
+ **Phase 3 — Gap Analysis** (excerpt):
21
+ | Module | Interface | Type | Status |
22
+ |--------|-----------|------|--------|
23
+ | auth | login() | unit | missing |
24
+ | auth | register() | unit | missing |
25
+ | payment | processPayment() | unit | missing |
26
+ | payment | api/checkout | integration | missing |
27
+ | — | Checkout flow | e2e | missing |
28
+
29
+ **Phase 4**: Generated 5 unit tests (3 passing, 2 assertion failures marked "needs-review"), 1 integration test (passing), 1 E2E test (passing).
30
+
31
+ **Phase 5 — Report Summary**:
32
+ ```
33
+ Generated: 5 unit (2 needs-review), 1 integration, 1 E2E
34
+ Report: .prizmkit/test/2026_05_23_14_30_00_testresult/test-report.md
35
+ Needs human review: processPayment (returns 400 for negative amounts, expected 422), refund (missing authorization header causes 500 instead of 401)
36
+ ```
37
+
38
+ ## Example 2: Single-Feature Targeted Test
39
+
40
+ **User**: `/prizmkit-test`
41
+
42
+ **Phase 0 — Architecture Detection**:
43
+ ```
44
+ Detected: Backend (Express)
45
+ Test framework: Vitest
46
+ ```
47
+
48
+ **Phase 1 — Scope Selection** (user selects option 3, then picks "042-payment-gateway"):
49
+ ```
50
+ Scope: Single feature — 042-payment-gateway
51
+ Test files in scope: 2
52
+
53
+ **Phase 2 — Existing Tests**: 2 test files, 8 tests, all passing.
54
+
55
+ **Phase 3 — Gap Analysis** (excerpt):
56
+ | Module | Interface | Type | Status |
57
+ |--------|-----------|------|--------|
58
+ | payment | processPayment() | unit | missing |
59
+ | payment | refund() | unit | missing |
60
+
61
+ **Phase 4**: Generated 2 unit tests (both passing). No integration/E2E applicable for this scope.
62
+
63
+ **Phase 5 — Report Summary**:
64
+ ```
65
+ Generated: 2 unit tests (all passing)
66
+ Report: .prizmkit/test/2026_05_23_15_00_00_testresult/test-report.md
67
+ All tests passing. Ready for commit.
68
+ ```
69
+
70
+ **HANDOFF**: Independent skill — no handoff. User may proceed to `/prizmkit-committer` if all tests pass, or fix issues manually if tests are marked "needs-review".
@@ -0,0 +1,49 @@
1
+ # Test Generation Steps (Phase 4)
2
+
3
+ Generate tests in priority order: unit → integration → E2E. After each batch, run immediately.
4
+
5
+ When generated tests fail, distinguish two cases:
6
+ - **Test bug** (syntax error, wrong import, wrong mock, wrong framework API usage) → fix the test and re-run
7
+ - **Assertion failure** (test is valid but code returns unexpected result) → mark as "needs review" in report; do NOT modify production code. This is a potential bug discovered by the generated test.
8
+
9
+ If a test fails repeatedly after 2 fix attempts, skip it and mark as "unresolved" in the report.
10
+
11
+ ## 4a. Unit Tests (always applicable)
12
+
13
+ For each uncovered interface:
14
+ - Read the source file to understand function signature and logic
15
+ - Generate test file matching project conventions (framework, naming, directory, import style, mock/fixture patterns)
16
+ - Common naming patterns to match:
17
+ - `src/foo.ts` → `src/__tests__/foo.test.ts` or `src/foo.spec.ts` or `tests/foo_test.py`
18
+ - Mirror the existing pattern; if no tests exist, use the framework's default convention
19
+ - Cover: happy path, edge cases (null/undefined/empty), error conditions, boundary values
20
+ - Do NOT test framework internals or third-party library behavior
21
+ - Run tests immediately after generating
22
+
23
+ ## 4b. Integration Tests
24
+
25
+ For each module with dependencies:
26
+ - Generate tests for the module's primary interface exercising its real dependencies
27
+ - If API endpoints exist: request/response tests (valid input, invalid input, missing params, auth)
28
+ - If database operations exist: CRUD tests using the project's existing test database config
29
+ - Run tests immediately after generating
30
+
31
+ ## 4c. E2E Tests (conditional)
32
+
33
+ Preconditions (ALL must be met):
34
+ - Playwright is available (`@playwright/test` or `playwright` in package.json dependencies, or `npx playwright --version` succeeds as fallback)
35
+ - Playwright browsers are installed (check `npx playwright install --dry-run 2>/dev/null` exits cleanly, or `node_modules/.cache/ms-playwright/` directory exists; if missing, warn in report and skip E2E)
36
+ - Project has a UI layer
37
+ - Project can be started (start/dev script in package.json)
38
+ - Acceptance criteria exist in spec.md files
39
+
40
+ If ALL met:
41
+ - **Before starting dev server**: detect whether it's already running: (1) check `package.json` scripts for port flags (`--port`, `-p`, `PORT=`), (2) fall back to framework defaults (3000 for React/Next/Express, 5173 for Vite, 8000 for Django, 5000 for Flask), (3) if still unknown, ask the user. Use the detected port in `lsof -i :<port>` to check. If running, tell user: "Dev server appears to be already running on port {N}. Use this running instance for E2E tests?" If user confirms, use existing instance. If user declines, skip E2E.
42
+ - Start the project dev server (only if not already running). Wait for it to be ready.
43
+ - For each uncovered acceptance criterion, generate a Playwright test script
44
+ - Run generated E2E tests, capture screenshots of failure.
45
+ - **Only stop dev server if you started it.** Never stop a server that was already running.
46
+
47
+ If NOT met:
48
+ - Note what was skipped and why in the report
49
+ - If only the server wasn't startable: still generate E2E script files but mark as "not run — manual execution needed"
@@ -0,0 +1,42 @@
1
+ # Test Report Output Template
2
+
3
+ Used in Phase 5 of `/prizmkit-test`. Create `.prizmkit/test/{YYYY_MM_DD_HH_MM_SS}_testresult/` directory and write `test-report.md`.
4
+
5
+ ## test-report.md Format
6
+
7
+ ```markdown
8
+ # Test Report — {timestamp}
9
+
10
+ ## Summary
11
+ - Scope: {full / module: name / feature: ###-name}
12
+ - Architecture: {frontend / backend / fullstack}
13
+ - Test framework: {name}
14
+ - Mode: {interactive / headless}
15
+
16
+ ## Existing Tests
17
+ - Total: {N} | Passed: {N} | Failed: {N}
18
+ {failed test details or "All passing"}
19
+ {or "No existing tests found — generated first batch"}
20
+
21
+ ## Coverage Gaps Found
22
+ | Module | Interface | Type | Status |
23
+ |--------|-----------|------|--------|
24
+ | ... | ... | unit/integration/e2e | covered / generated / needs-review / unresolved / skipped |
25
+
26
+ ## Generated Tests
27
+ - Unit: {N} generated, {N} needs-review, {N} unresolved
28
+ - Integration: {N} generated, {N} needs-review, {N} unresolved
29
+ - E2E: {N} generated, {N} skipped ({reason})
30
+
31
+ ## Final Status
32
+ - All tests passing: {yes / no}
33
+ - Needs human review: {list of tests marked needs-review}
34
+ {remaining failures if any}
35
+ ```
36
+
37
+ ## Artifacts
38
+
39
+ Also save alongside `test-report.md`:
40
+ - `existing-test-output.txt` — raw output from Phase 2
41
+ - `generated-tests/` — copies of all generated test files
42
+ - `e2e-output/` — E2E logs and failure screenshots (if applicable)
@@ -55,30 +55,24 @@ Pipeline commands (for reference — Phase 1.3 will present these as a selectabl
55
55
 
56
56
  ## Overview
57
57
 
58
- ```
59
- recovery-workflow
60
-
61
- ├── Phase 0: Auto-detect
62
- ├── Read current branch name
63
- ├── Scan characteristic artifacts
64
- │ ├── Match workflow signature determine workflow type
65
- ├── Based on artifact presence infer current phase
66
- └── No match reject and guide user
67
-
68
- ├── Phase 1: Diagnose + report + user choice
69
- ├── Check branch and working tree state
70
- ├── Scan all pipelines for failed/in-progress tasks
71
- ├── Find residual dev branches from failed tasks
72
- │ ├── Display diagnosis + detection results
73
- ├── If code changes exist → run test suite
74
- ├── If multiple failed tasks ask user which to recover
75
- └── User chooses: run-recovery.sh (recommended) | interactive | start fresh
76
-
77
- └── Phase 2: Execute remaining steps
78
- ├── Read target workflow's SKILL.md
79
- ├── Read existing artifacts to restore context
80
- └── Execute from inferred phase through completion
81
- ```
58
+ 1. **Phase 0: Auto-detect**
59
+ 1. Read current branch name
60
+ 2. Scan characteristic artifacts
61
+ 3. Match workflow signature → determine workflow type
62
+ 4. Based on artifact presence → infer current phase
63
+ 5. No match → reject and guide user
64
+ 2. **Phase 1: Diagnose + report + user choice**
65
+ 1. Check branch and working tree state
66
+ 2. Scan all pipelines for failed/in-progress tasks
67
+ 3. Find residual dev branches from failed tasks
68
+ 4. Display diagnosis + detection results
69
+ 5. If code changes exist run test suite
70
+ 6. If multiple failed tasks ask user which to recover
71
+ 7. User chooses: run-recovery.sh (recommended) | interactive | start fresh
72
+ 3. **Phase 2: Execute remaining steps**
73
+ 1. Read target workflow's SKILL.md
74
+ 2. Read existing artifacts to restore context
75
+ 3. Execute from inferred phase through completion
82
76
 
83
77
  ---
84
78
 
@@ -88,36 +82,7 @@ recovery-workflow
88
82
 
89
83
  Run the detection script:
90
84
 
91
- ```bash
92
- python3 ${SKILL_DIR}/scripts/detect-recovery-state.py
93
- ```
94
-
95
- The script uses **priority-ordered signature matching**:
96
-
97
- ```
98
- 1. Current branch matches fix/* → bug-fix-workflow
99
- 2. .prizmkit/bugfix/ directory has content → bug-fix-workflow
100
- 3. Current branch matches refactor/* → refactor-workflow
101
- 4. .prizmkit/plans/refactor-list.json exists → refactor-workflow
102
- 5. Current branch matches feat/* → feature-workflow
103
- 6. .prizmkit/plans/feature-list.json exists → feature-workflow
104
- 7. None of the above → no workflow detected
105
- ```
106
-
107
- Bug-fix-workflow has highest priority because it is purely interactive and benefits most from recovery (no pipeline retry fallback).
108
-
109
- ### If no workflow detected
110
-
111
- Show guidance and exit:
112
-
113
- ```
114
- No interrupted workflow detected in this workspace.
115
-
116
- To start a new workflow:
117
- • /feature-workflow — build features from idea to code
118
- • /bug-fix-workflow — fix a specific bug interactively
119
- • /refactor-workflow — behavior-preserving code restructuring
120
- ```
85
+ Run the detection script (`python3 ${SKILL_DIR}/scripts/detect-recovery-state.py`). For the full signature matching table, phase inference tables (bug-fix/feature/refactor), and no-workflow-detected guidance, read `${SKILL_DIR}/references/detection.md`.
121
86
 
122
87
  **CHECKPOINT CP-REC-0**: Workflow type and phase identified.
123
88
 
@@ -318,53 +283,19 @@ This step replaces the context that was lost when the AI session was interrupted
318
283
 
319
284
  ---
320
285
 
321
- ### 2.1 Bug-Fix-Workflow Recovery
286
+ ### 2.1 Per-Workflow Phase Inference
322
287
 
323
- Phase inference table:
288
+ Read `${SKILL_DIR}/references/detection.md` for the per-workflow phase-inference tables (bug-fix / feature / refactor) that map detected state → the phase to resume from and its actions.
324
289
 
325
- | Detected State | Resume From | Actions |
326
- |---------------|------------|---------|
327
- | On `fix/<BUG_ID>-*` branch, no artifacts | Phase 1: Deep Bug Diagnosis | Read bug description from `.prizmkit/plans/bug-fix-list.json`. Start interactive diagnosis Q&A |
328
- | `fix-plan.md` exists, no code changes | Phase 4: Fix | Read fix-plan.md. Implement the fix following the plan |
329
- | `fix-plan.md` + code changes exist | Phase 5: Review | Invoke `/prizmkit-code-review` on all changes |
330
- | All docs + review passed | Phase 6: User Verification | Ask user to verify the fix works |
331
- | All docs + committed | Phase 7: Merge Decision | Ask merge vs keep branch |
332
-
333
- **Note**: Bug-fix Phases 1-3 (Diagnosis, Triage, Reproduce) collapse to Phase 1 for detection purposes because these phases don't produce persistent artifacts. If interrupted during these phases, recovery restarts from Phase 1 (diagnosis), which re-derives understanding from available inputs (bug description, code) without interactive Q&A.
334
-
335
- **Execution for each remaining phase**: Follow the bug-fix-workflow SKILL.md instructions exactly. Call the same prizmkit sub-commands (`/prizmkit-code-review`, `/prizmkit-committer`) at the same points.
290
+ **Bug-fix execution**: Follow the bug-fix-workflow SKILL.md instructions exactly. Call the same prizmkit sub-commands (`/prizmkit-code-review`, `/prizmkit-committer`) at the same points.
336
291
 
337
292
  **Special handling**:
338
293
  - If resuming from Phase 5 (Review) and tests are failing, fix test failures first (max 3 attempts). If unfixable, ask user whether to continue or restart.
339
294
  - If resuming from Phase 4 (Fix), read fix-plan.md to understand the planned approach before writing code.
340
295
 
341
- ---
342
-
343
- ### 2.2 Feature-Workflow Recovery
296
+ **Feature recovery**: Phases 3-4 are pipeline-driven. The main recovery value is avoiding re-brainstorming (Phase 1) when `.prizmkit/plans/feature-list.json` already exists.
344
297
 
345
- Phase inference table:
346
-
347
- | Detected State | Resume From | Actions |
348
- |---------------|------------|---------|
349
- | No `.prizmkit/plans/feature-list.json` | Phase 1: Brainstorm | Cannot recover conversation context. Start requirement clarification, but leverage any workspace content (README, existing code) for context |
350
- | `.prizmkit/plans/feature-list.json` exists, no pipeline state | Phase 3: Launch | Invoke `feature-pipeline-launcher` to start the pipeline |
351
- | `.prizmkit/plans/feature-list.json` + pipeline state exists | Phase 4: Monitor | Check pipeline status via `feature-pipeline-launcher` (Intent B: Check Status) |
352
-
353
- **Note**: Feature-workflow recovery is simpler because Phases 3-4 are pipeline-driven. The main recovery value is avoiding re-brainstorming (Phase 1) when `.prizmkit/plans/feature-list.json` already exists.
354
-
355
- ---
356
-
357
- ### 2.3 Refactor-Workflow Recovery
358
-
359
- Phase inference table (mirrors feature-workflow):
360
-
361
- | Detected State | Resume From | Actions |
362
- |---------------|------------|---------|
363
- | No `.prizmkit/plans/refactor-list.json` | Phase 1: Brainstorm | Start refactoring goal clarification |
364
- | `.prizmkit/plans/refactor-list.json` exists, no pipeline state | Phase 3: Launch | Invoke `refactor-pipeline-launcher` to start the pipeline |
365
- | `.prizmkit/plans/refactor-list.json` + pipeline state exists | Phase 4: Monitor | Check pipeline status |
366
-
367
- ---
298
+ **Refactor recovery**: Mirrors feature-workflow (brainstorm → launch → monitor).
368
299
 
369
300
  ### 2.4 Post-Recovery Report
370
301
 
@@ -416,16 +347,6 @@ Recovery complete.
416
347
 
417
348
  ---
418
349
 
419
- ## Comparison with Previous Version
420
-
421
- | Dimension | Previous | Current |
422
- |-----------|----------|---------|
423
- | Scope | Feature pipeline only | All 3 interactive workflows |
424
- | Input | Required `F-XXX` feature ID | No input — fully auto-detect |
425
- | Detection | Feature-specific (spec/plan/git) | Signature-based (branch + artifacts) |
426
- | Strategy | Multi-option (5 scenarios × 2-4 options each) | Single path: report → confirm → execute |
427
- | Intrusion | None | None (zero changes to target workflows) |
428
-
429
350
  ## Output
430
351
 
431
352
  - Resumed and completed workflow from the breakpoint
@@ -0,0 +1,58 @@
1
+ # Recovery Phase Detection
2
+
3
+ The script uses **priority-ordered signature matching**:
4
+
5
+ ```
6
+ 1. Current branch matches fix/* → bug-fix-workflow
7
+ 2. .prizmkit/bugfix/ directory has content → bug-fix-workflow
8
+ 3. Current branch matches refactor/* → refactor-workflow
9
+ 4. .prizmkit/plans/refactor-list.json exists → refactor-workflow
10
+ 5. Current branch matches feat/* → feature-workflow
11
+ 6. .prizmkit/plans/feature-list.json exists → feature-workflow
12
+ 7. None of the above → no workflow detected
13
+ ```
14
+
15
+ Bug-fix-workflow has highest priority because it is purely interactive and benefits most from recovery (no pipeline retry fallback).
16
+
17
+ ## If No Workflow Detected
18
+
19
+ Show guidance and exit:
20
+
21
+ ```
22
+ No interrupted workflow detected in this workspace.
23
+
24
+ To start a new workflow:
25
+ • /feature-workflow — build features from idea to code
26
+ • /bug-fix-workflow — fix a specific bug interactively
27
+ • /refactor-workflow — behavior-preserving code restructuring
28
+ ```
29
+
30
+ ## Phase Inference Tables
31
+
32
+ ### Bug-Fix-Workflow Recovery
33
+
34
+ | Detected State | Resume From | Actions |
35
+ |---------------|------------|---------|
36
+ | On `fix/<BUG_ID>-*` branch, no artifacts | Phase 1: Deep Bug Diagnosis | Read bug description from `.prizmkit/plans/bug-fix-list.json`. Start interactive diagnosis Q&A |
37
+ | `fix-plan.md` exists, no code changes | Phase 4: Fix | Read fix-plan.md. Implement the fix following the plan |
38
+ | `fix-plan.md` + code changes exist | Phase 5: Review | Invoke `/prizmkit-code-review` on all changes |
39
+ | All docs + review passed | Phase 6: User Verification | Ask user to verify the fix works |
40
+ | All docs + committed | Phase 7: Merge Decision | Ask merge vs keep branch |
41
+
42
+ Note: Bug-fix Phases 1-3 (Diagnosis, Triage, Reproduce) collapse to Phase 1 because they don't produce persistent artifacts. If interrupted during these phases, recovery restarts from Phase 1.
43
+
44
+ ### Feature-Workflow Recovery
45
+
46
+ | Detected State | Resume From | Actions |
47
+ |---------------|------------|---------|
48
+ | No `.prizmkit/plans/feature-list.json` | Phase 1: Brainstorm | Cannot recover conversation context. Start requirement clarification, leverage workspace content |
49
+ | `.prizmkit/plans/feature-list.json` exists, no pipeline state | Phase 3: Launch | Invoke `feature-pipeline-launcher` |
50
+ | `.prizmkit/plans/feature-list.json` + pipeline state exists | Phase 4: Monitor | Check pipeline status via `feature-pipeline-launcher` (Intent B) |
51
+
52
+ ### Refactor-Workflow Recovery
53
+
54
+ | Detected State | Resume From | Actions |
55
+ |---------------|------------|---------|
56
+ | No `.prizmkit/plans/refactor-list.json` | Phase 1: Brainstorm | Start refactoring goal clarification |
57
+ | `.prizmkit/plans/refactor-list.json` exists, no pipeline state | Phase 3: Launch | Invoke `refactor-pipeline-launcher` |
58
+ | `.prizmkit/plans/refactor-list.json` + pipeline state exists | Phase 4: Monitor | Check pipeline status |