prizmkit 1.1.6 → 1.1.8

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 (63) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/dev-pipeline/README.md +65 -65
  3. package/bundled/dev-pipeline/assets/feature-list-example.json +2 -2
  4. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +11 -10
  5. package/bundled/dev-pipeline/launch-feature-daemon.sh +12 -11
  6. package/bundled/dev-pipeline/launch-refactor-daemon.sh +11 -10
  7. package/bundled/dev-pipeline/reset-bug.sh +305 -0
  8. package/bundled/dev-pipeline/reset-feature.sh +9 -8
  9. package/bundled/dev-pipeline/reset-refactor.sh +10 -9
  10. package/bundled/dev-pipeline/retry-bugfix.sh +7 -6
  11. package/bundled/dev-pipeline/retry-feature.sh +7 -6
  12. package/bundled/dev-pipeline/retry-refactor.sh +7 -6
  13. package/bundled/dev-pipeline/run-bugfix.sh +71 -23
  14. package/bundled/dev-pipeline/run-feature.sh +30 -21
  15. package/bundled/dev-pipeline/run-refactor.sh +21 -17
  16. package/bundled/dev-pipeline/scripts/cleanup-logs.py +2 -2
  17. package/bundled/dev-pipeline/scripts/detect-stuck.py +3 -3
  18. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +26 -14
  19. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +6 -6
  20. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +6 -6
  21. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +4 -4
  22. package/bundled/dev-pipeline/scripts/init-pipeline.py +26 -12
  23. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +4 -4
  24. package/bundled/dev-pipeline/scripts/update-bug-status.py +10 -10
  25. package/bundled/dev-pipeline/scripts/update-feature-status.py +31 -31
  26. package/bundled/dev-pipeline/scripts/update-refactor-status.py +8 -8
  27. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +111 -31
  28. package/bundled/dev-pipeline/templates/feature-list-schema.json +91 -25
  29. package/bundled/dev-pipeline/templates/refactor-list-schema.json +107 -28
  30. package/bundled/dev-pipeline/tests/test_auto_skip.py +1 -1
  31. package/bundled/skills/_metadata.json +10 -2
  32. package/bundled/skills/app-planner/SKILL.md +24 -13
  33. package/bundled/skills/app-planner/references/project-brief-guide.md +1 -1
  34. package/bundled/skills/bug-fix-workflow/SKILL.md +7 -5
  35. package/bundled/skills/bug-planner/SKILL.md +80 -25
  36. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +3 -3
  37. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +38 -33
  38. package/bundled/skills/feature-pipeline-launcher/SKILL.md +33 -33
  39. package/bundled/skills/feature-pipeline-launcher/scripts/preflight-check.py +3 -3
  40. package/bundled/skills/feature-planner/SKILL.md +96 -24
  41. package/bundled/skills/feature-planner/references/error-recovery.md +9 -9
  42. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +25 -24
  43. package/bundled/skills/feature-workflow/SKILL.md +23 -20
  44. package/bundled/skills/prizmkit-committer/SKILL.md +1 -0
  45. package/bundled/skills/prizmkit-deploy/SKILL.md +1 -0
  46. package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +1 -1
  47. package/bundled/skills/prizmkit-implement/SKILL.md +1 -1
  48. package/bundled/skills/prizmkit-implement/references/deploy-guide-protocol.md +4 -4
  49. package/bundled/skills/prizmkit-plan/SKILL.md +3 -3
  50. package/bundled/skills/prizmkit-retrospective/SKILL.md +40 -3
  51. package/bundled/skills/prizmkit-verify/SKILL.md +281 -0
  52. package/bundled/skills/prizmkit-verify/scripts/verify-light.py +402 -0
  53. package/bundled/skills/recovery-workflow/SKILL.md +15 -14
  54. package/bundled/skills/recovery-workflow/evals/evals.json +5 -5
  55. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +43 -10
  56. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +38 -34
  57. package/bundled/skills/refactor-planner/SKILL.md +74 -24
  58. package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +17 -17
  59. package/bundled/skills/refactor-workflow/SKILL.md +24 -20
  60. package/package.json +1 -1
  61. package/src/clean.js +4 -4
  62. package/src/gitignore-template.js +7 -8
  63. package/src/scaffold.js +4 -2
@@ -19,7 +19,7 @@ User says:
19
19
 
20
20
  **Do NOT use this skill when:**
21
21
  - User only wants to plan features (use `feature-planner` directly)
22
- - User only wants to launch pipeline for existing feature-list.json (use `feature-pipeline-launcher`)
22
+ - User only wants to launch pipeline for existing .prizmkit/plans/feature-list.json (use `feature-pipeline-launcher`)
23
23
  - User wants to fix bugs (use `bug-planner` + `bugfix-pipeline-launcher`)
24
24
  - User wants to refactor code (use `refactor-workflow`)
25
25
 
@@ -32,7 +32,7 @@ feature-workflow <idea / requirements>
32
32
 
33
33
  ├── Phase 1: Brainstorm → deep interactive Q&A until requirements are crystal clear
34
34
 
35
- ├── Phase 2: Plan → feature-planner → feature-list.json
35
+ ├── Phase 2: Plan → feature-planner → .prizmkit/plans/feature-list.json
36
36
 
37
37
  ├── Phase 3: Launch → feature-pipeline-launcher → pipeline execution
38
38
 
@@ -44,7 +44,7 @@ feature-workflow <idea / requirements>
44
44
  | Phase | Action | Result |
45
45
  |-------|--------|--------|
46
46
  | 1 | **Brainstorm** — interactive Q&A with user | Fully clarified requirements document |
47
- | 2 | Call `feature-planner` with clarified requirements | `feature-list.json` with N features |
47
+ | 2 | Call `feature-planner` with clarified requirements | `.prizmkit/plans/feature-list.json` with N features |
48
48
  | 3 | Call `feature-pipeline-launcher` | Pipeline started (execution mode chosen by user via launcher) |
49
49
  | 4 | Monitor progress | Status updates, completion report |
50
50
 
@@ -52,7 +52,7 @@ feature-workflow <idea / requirements>
52
52
 
53
53
  Without this skill, users must:
54
54
  1. Figure out all requirements themselves
55
- 2. Invoke `feature-planner` → wait for feature-list.json
55
+ 2. Invoke `feature-planner` → wait for .prizmkit/plans/feature-list.json
56
56
  3. Invoke `feature-pipeline-launcher` → wait for pipeline start
57
57
  4. Manually check progress
58
58
 
@@ -81,9 +81,9 @@ Natural language description of the project or features. Can be:
81
81
 
82
82
  Flow: brainstorm → feature-planner → feature-pipeline-launcher → monitor
83
83
 
84
- **Mode B: From existing feature-list.json**
84
+ **Mode B: From existing .prizmkit/plans/feature-list.json**
85
85
 
86
- When user says "run pipeline from existing file" or feature-list.json already exists:
86
+ When user says "run pipeline from existing file" or .prizmkit/plans/feature-list.json already exists:
87
87
  - Skip brainstorm and `feature-planner` (file already exists)
88
88
  - Invoke `feature-pipeline-launcher` directly
89
89
  - Monitor and report progress
@@ -92,7 +92,7 @@ When user says "run pipeline from existing file" or feature-list.json already ex
92
92
 
93
93
  When user says "add features to existing project" or the project already has features:
94
94
  - Brainstorm new feature requirements with the user
95
- - Invoke `feature-planner` in incremental mode (reads existing feature-list.json)
95
+ - Invoke `feature-planner` in incremental mode (reads existing .prizmkit/plans/feature-list.json)
96
96
  - Append new features to existing list
97
97
  - Invoke `feature-pipeline-launcher`
98
98
  - Monitor and report progress
@@ -232,7 +232,7 @@ Present this summary to the user and get explicit confirmation before proceeding
232
232
 
233
233
  ## Phase 2: Plan
234
234
 
235
- **Goal**: Generate structured feature-list.json from the clarified requirements.
235
+ **Goal**: Generate structured .prizmkit/plans/feature-list.json from the clarified requirements.
236
236
 
237
237
  **STEPS**:
238
238
 
@@ -240,16 +240,18 @@ Present this summary to the user and get explicit confirmation before proceeding
240
240
  - Pass the structured requirements summary as input — NOT the raw user conversation
241
241
  - For new projects: standard planning mode
242
242
  - For existing projects with `--incremental`: incremental planning mode
243
+ - **Input**: Markdown requirements summary (feature descriptions, user stories, constraints)
244
+ - **Output**: `.prizmkit/plans/feature-list.json` (schema: `dev-pipeline-feature-list-v1`) containing `project_name`, `features[]` with id (F-NNN), title, description, priority, dependencies, acceptance_criteria, status
243
245
 
244
246
  2. **Interactive planning** (if feature-planner requires clarification):
245
247
  - Because Phase 1 was thorough, feature-planner should need minimal clarification
246
248
  - If questions arise, answer from the Phase 1 context or pass through to user
247
249
 
248
250
  3. **Validate output**:
249
- - Confirm `feature-list.json` exists
251
+ - Confirm `.prizmkit/plans/feature-list.json` exists
250
252
  - Show summary: total features, complexity distribution, dependencies
251
253
 
252
- **CHECKPOINT CP-FW-1**: `feature-list.json` generated and validated.
254
+ **CHECKPOINT CP-FW-1**: `.prizmkit/plans/feature-list.json` generated and validated.
253
255
 
254
256
  **If user says `--from <file>`**: Skip Phase 1 and Phase 2 entirely.
255
257
 
@@ -272,11 +274,12 @@ Present this summary to the user and get explicit confirmation before proceeding
272
274
  ```
273
275
 
274
276
  2. **Invoke `feature-pipeline-launcher` skill**:
277
+ - **Input**: Path to validated `.prizmkit/plans/feature-list.json`
275
278
  - The launcher handles all prerequisites checks
276
279
  - The launcher presents execution mode choices to the user (foreground/background/manual)
277
280
  - The launcher asks whether to enable Critic Agent (adversarial review) — passes `--critic` flag if chosen
278
281
  - Do NOT duplicate execution mode or critic selection here — let the launcher handle it
279
- - Returns PID/status and log file location
282
+ - **Output**: PID/status, log file path, execution mode selected
280
283
 
281
284
  3. **Verify launch success**:
282
285
  - Confirm pipeline is running
@@ -305,8 +308,8 @@ Present this summary to the user and get explicit confirmation before proceeding
305
308
  3. **Periodic progress reports** (when user asks):
306
309
  ```bash
307
310
  python3 dev-pipeline/scripts/update-feature-status.py \
308
- --feature-list feature-list.json \
309
- --state-dir dev-pipeline/state \
311
+ --feature-list .prizmkit/plans/feature-list.json \
312
+ --state-dir .prizmkit/state/features \
310
313
  --action status
311
314
  ```
312
315
 
@@ -335,12 +338,12 @@ The workflow supports resuming by detecting existing state:
335
338
 
336
339
  | State Found | Resume From |
337
340
  |-------------|------------|
338
- | No `feature-list.json` | Phase 1: Brainstorm |
339
- | `feature-list.json` exists, no pipeline state | Phase 3: Launch |
340
- | `feature-list.json` + pipeline state exists | Phase 4: Monitor (check status) |
341
+ | No `.prizmkit/plans/feature-list.json` | Phase 1: Brainstorm |
342
+ | `.prizmkit/plans/feature-list.json` exists, no pipeline state | Phase 3: Launch |
343
+ | `.prizmkit/plans/feature-list.json` + pipeline state exists | Phase 4: Monitor (check status) |
341
344
  | All features completed | Report completion, suggest next steps |
342
345
 
343
- **Resume**: If `feature-list.json` exists, ask user: "Existing feature plan found with N features. Resume pipeline or re-plan?"
346
+ **Resume**: If `.prizmkit/plans/feature-list.json` exists, ask user: "Existing feature plan found with N features. Resume pipeline or re-plan?"
344
347
 
345
348
  ---
346
349
 
@@ -364,7 +367,7 @@ While the pipeline runs, the user can continue the conversation:
364
367
  | User's idea is too vague to brainstorm | Ask for more context: "Can you describe the main problem this solves?" |
365
368
  | Brainstorming stalls | Offer concrete options: "Would you prefer A or B?" |
366
369
  | `feature-planner` cannot parse requirements | Refine the requirements summary and retry |
367
- | `feature-list.json` generation failed | Show error, retry with refined input |
370
+ | `.prizmkit/plans/feature-list.json` generation failed | Show error, retry with refined input |
368
371
  | Pipeline launch failed | Show daemon log, suggest manual start |
369
372
  | All features blocked/failed | Show status, suggest retrying specific features |
370
373
  | User wants to cancel mid-brainstorming | Save conversation context, offer to resume later |
@@ -375,7 +378,7 @@ While the pipeline runs, the user can continue the conversation:
375
378
 
376
379
  | Skill | Relationship |
377
380
  |-------|-------------|
378
- | `feature-planner` | **Called by Phase 2** — generates feature-list.json from clarified requirements |
381
+ | `feature-planner` | **Called by Phase 2** — generates .prizmkit/plans/feature-list.json from clarified requirements |
379
382
  | `feature-pipeline-launcher` | **Called by Phase 3** — starts pipeline (handles execution mode selection) |
380
383
  | `bug-planner` | **Alternative** — for bug fix workflows |
381
384
  | `bugfix-pipeline-launcher` | **Alternative** — for bug fix pipelines |
@@ -406,7 +409,7 @@ All internal asset paths use `${SKILL_DIR}` placeholder for cross-IDE compatibil
406
409
  ## Output
407
410
 
408
411
  - Structured requirements summary (Phase 1 artifact)
409
- - `feature-list.json` (Phase 2 artifact)
412
+ - `.prizmkit/plans/feature-list.json` (Phase 2 artifact)
410
413
  - Pipeline execution (Phase 3)
411
414
  - Progress updates (Phase 4)
412
415
  - Multiple git commits with `feat(<scope>):` prefix
@@ -17,6 +17,7 @@ description: "Pure git commit workflow with safety checks. Stages files, generat
17
17
  | Uncommitted changes exist | `git status` shows modified/added/untracked files | Inform user "nothing to commit" and stop |
18
18
  | `.prizm-docs/` synced (feature/refactor) | `/prizmkit-retrospective` has run | Run `/prizmkit-retrospective` first |
19
19
  | Code review passed (pipeline mode) | `context-snapshot.md` has Review Notes with PASS/PASS_WITH_WARNINGS | Run `/prizmkit-code-review` first |
20
+ | `DEPLOY.md` updated (if applicable) | If `/prizmkit-deploy` ran, `DEPLOY.md` is staged | Run `/prizmkit-deploy` or skip if no infrastructure changes |
20
21
 
21
22
  ### Workflow
22
23
 
@@ -25,6 +25,7 @@ description: "Generate or update DEPLOY.md with local dev setup, testing, produc
25
25
  1. Read `.prizmkit/config.json`:
26
26
  - `deploy_strategy` — user's confirmed deployment approach (may be absent)
27
27
  - `tech_stack` — detected or user-provided technology stack
28
+ - **If `.prizmkit/config.json` does not exist**: proceed without it — infer deployment approach entirely from project file scanning in steps 2-3. Log a warning: "No .prizmkit/config.json found — inferring deployment strategy from project files. Run `/prizmkit-init` to generate config."
28
29
  2. Scan project for deployment-related files:
29
30
  - Container: `Dockerfile`, `docker-compose.yml`, `.dockerignore`
30
31
  - Cloud platforms: `vercel.json`, `netlify.toml`, `fly.toml`, `app.yaml` (GCP), `appspec.yml` (AWS)
@@ -1,5 +1,5 @@
1
1
  # Deployment Guide: [PROJECT_NAME]
2
- <!-- Replace [PROJECT_NAME] with: app_name from feature-list.json, or name from package.json, or the project root directory name (in that priority order) -->
2
+ <!-- Replace [PROJECT_NAME] with: project_name from feature-list.json, or name from package.json, or the project root directory name (in that priority order) -->
3
3
 
4
4
  > Generated by PrizmKit Deploy
5
5
 
@@ -89,5 +89,5 @@ If a session is interrupted mid-implementation:
89
89
 
90
90
  - Code files created/modified as specified in plan.md Tasks section
91
91
  - `plan.md` Tasks section updated with completion markers `[x]`
92
- - `deploy_guide.md` created/updated (only when new frameworks/tools were added)
92
+ - `DEPLOY.md` created/updated (only when new frameworks/tools were added)
93
93
  - Implementation summary output to conversation
@@ -1,6 +1,6 @@
1
1
  # Deploy Guide Update Protocol
2
2
 
3
- When dependency manifests change during implementation, update `deploy_guide.md` at the project root.
3
+ When dependency manifests change during implementation, update `DEPLOY.md` at the project root.
4
4
 
5
5
  ## Detection
6
6
 
@@ -16,7 +16,7 @@ When dependency manifests change during implementation, update `deploy_guide.md`
16
16
 
17
17
  ## Recording
18
18
 
19
- For each genuinely new framework/tool, record in `deploy_guide.md` at project root:
19
+ For each genuinely new framework/tool, record in `DEPLOY.md` at project root:
20
20
 
21
21
  | Field | Description | Source |
22
22
  |-------|-------------|--------|
@@ -27,7 +27,7 @@ For each genuinely new framework/tool, record in `deploy_guide.md` at project ro
27
27
  | **Key Config** | Config files or env vars needed | Config files you just created/modified |
28
28
  | **Notes** | Setup gotchas, required services | Docker services, manual steps, env vars |
29
29
 
30
- ## Template for `deploy_guide.md`
30
+ ## Template for `DEPLOY.md`
31
31
 
32
32
  ```markdown
33
33
  # Deploy Guide
@@ -66,4 +66,4 @@ For each genuinely new framework/tool, record in `deploy_guide.md` at project ro
66
66
 
67
67
  ## Final Step
68
68
 
69
- Stage the file: `git add deploy_guide.md`
69
+ Stage the file: `git add DEPLOY.md`
@@ -30,9 +30,9 @@ Transforms natural language into a structured spec. Skip this phase when:
30
30
  2. Auto-generate 2-4 word feature slug from description
31
31
  3. Determine next feature number by scanning `.prizmkit/specs/`:
32
32
  - List existing `###-*` directories, find highest numeric prefix
33
- - Next = highest + 1 (zero-padded to 3 digits), append `-MMDD` timestamp suffix for collision prevention
33
+ - Next = highest + 1 (zero-padded to 3 digits)
34
34
  - If empty or doesn't exist, start at `001`
35
- 4. Create directory: `.prizmkit/specs/###-feature-name-MMDD/`
35
+ 4. Create directory: `.prizmkit/specs/###-feature-name/`
36
36
  5. Load project context (use first available):
37
37
  - If `context-snapshot.md` exists in the feature dir → read Section 3 'Prizm Context' (skip re-reading .prizm-docs/)
38
38
  - Otherwise → read `.prizm-docs/root.prizm` and relevant L1/L2 docs
@@ -101,7 +101,7 @@ If no input document exists, prompt user to describe the feature (triggers Phase
101
101
 
102
102
  **Input:** "I want users to upload avatars"
103
103
 
104
- **Phase 0 output:** `.prizmkit/specs/003-user-avatar-0402/spec.md`
104
+ **Phase 0 output:** `.prizmkit/specs/003-user-avatar/spec.md`
105
105
  ```markdown
106
106
  # Feature: User Avatar Upload
107
107
  ## User Stories
@@ -24,12 +24,34 @@ For initial doc setup, validation, or migration, use `/prizmkit-prizm-docs` inst
24
24
  - User says "retrospective", "retro", "update docs", "sync docs", "wrap up"
25
25
  - After refactoring or bugfix cycles (structural sync + optional TRAPS update)
26
26
 
27
+ ## PRECONDITION
28
+
29
+ | Mode | Required Input | Expected Source | If Missing |
30
+ |---|---|---|---|
31
+ | **Feature** | Code review verdict (PASS/PASS_WITH_WARNINGS) | `.prizmkit/specs/###-feature-name/` context-snapshot.md Review Notes | Run `/prizmkit-code-review` |
32
+ | **Refactor** | Code review verdict + behavior preservation evidence | `.prizmkit/refactor/<slug>/` context-snapshot.md | Run `/prizmkit-code-review` in refactor mode |
33
+ | **Bugfix** | Code review verdict + regression test evidence | `.prizmkit/bugfix/<BUG_ID>/` context-snapshot.md | Run `/prizmkit-code-review` in bugfix mode |
34
+ | **Standalone** (user-invoked) | Code changes in working tree | `git diff` output | No prerequisite — runs structural sync only |
35
+
27
36
  ## When NOT to Use
28
37
 
29
38
  - Only comments, whitespace, or formatting changed — no structural/knowledge change
30
39
  - Only test files changed — no module-level impact
31
40
  - Only .prizm files changed — avoid circular updates
32
41
 
42
+ ## PRECONDITION: Review Verdict Gate
43
+
44
+ Before executing, check the most recent `/prizmkit-code-review` verdict from the current session context:
45
+
46
+ | Verdict | Action |
47
+ |---------|--------|
48
+ | `PASS` | Proceed normally |
49
+ | `PASS_WITH_WARNINGS` | Proceed normally (warnings are informational) |
50
+ | `NEEDS_FIXES` | **ABORT** — do not sync docs for code that failed review. Output: "Code review verdict is NEEDS_FIXES. Fix the issues identified in code review first, then re-run `/prizmkit-code-review` before proceeding to retrospective." |
51
+ | No verdict found | Proceed with warning: "No code review verdict found — running retrospective without review gate. Consider running `/prizmkit-code-review` first." |
52
+
53
+ This gate prevents updating `.prizm-docs/` for code that hasn't passed review, which would create a false impression that the codebase is in a consistent, reviewed state.
54
+
33
55
  ---
34
56
 
35
57
  ### Job 1: Structural Sync (always runs)
@@ -79,12 +101,27 @@ The pipeline enforces a **docs pass condition**: `.prizm-docs/` must show change
79
101
 
80
102
  | From | To | Condition |
81
103
  |------|----|-----------|
82
- | `prizmkit-code-review` | **this skill** | Review passes or work is complete |
83
- | **this skill** | `prizmkit-deploy` (conditional) | Architecture synced; deploy only if new tech stack detected |
84
- | **this skill** | `prizmkit-committer` (direct) | Architecture synced, no deployment doc update needed |
104
+ | `prizmkit-code-review` | **this skill** | Review verdict is PASS or PASS_WITH_WARNINGS |
105
+ | **this skill** | `prizmkit-deploy` (conditional) | Architecture synced; deploy only if new infrastructure components detected (new DB, cache, MQ, etc.) |
106
+ | **this skill** | `prizmkit-committer` (direct) | Architecture synced, no new infrastructure components |
85
107
  | `prizmkit-deploy` | `prizmkit-committer` | Deploy docs updated, ready to commit |
86
108
  | `prizmkit-committer` | — | Committed |
87
109
 
110
+ ### Deploy Decision Logic
111
+
112
+ After structural sync and knowledge injection are complete, decide the next step:
113
+
114
+ 1. **Check if this is a fast-path change** (bugfix, config tweak, simple refactor) → skip deploy, go to `/prizmkit-committer`
115
+ 2. **Check `.prizmkit/config.json`** for `deploy_strategy` field:
116
+ - If absent → skip deploy (project hasn't configured deployment yet)
117
+ - If present → continue to step 3
118
+ 3. **Scan this session's changes** for new infrastructure indicators:
119
+ - New `Dockerfile`, `docker-compose.yml`, cloud config files (vercel.json, fly.toml, etc.)
120
+ - New database migrations, new cache/queue dependencies in package.json/requirements.txt
121
+ - New environment variables added to source code
122
+ - If any found → invoke `/prizmkit-deploy`
123
+ - If none found → go to `/prizmkit-committer`
124
+
88
125
  ## Output
89
126
 
90
127
  - `.prizm-docs/*.prizm` — Structurally synced + TRAPS/RULES/DECISIONS enriched
@@ -0,0 +1,281 @@
1
+ ---
2
+ name: "prizmkit-verify"
3
+ description: "Automated framework verification for PrizmKit's 4-layer architecture (Skill → Pipeline → Workflow → Script). Use this skill to validate structural integrity, contract consistency between layers, cross-scenario alignment, and adapter/installer correctness. Trigger whenever: verifying framework health, checking skill contracts, auditing layer integration, running pre-release checks, or after significant framework modifications."
4
+ ---
5
+
6
+ # PrizmKit Framework Verification
7
+
8
+ Verify PrizmKit's four-layer architecture for structural integrity, contract consistency, and cross-scenario alignment.
9
+
10
+ ## Execution Modes
11
+
12
+ Parse the user's arguments to determine scope and depth:
13
+
14
+ | Command | What Runs | When to Use |
15
+ |---------|-----------|-------------|
16
+ | `/prizmkit-verify light` | Light checks only (R1-R4) | Quick CI gate, seconds |
17
+ | `/prizmkit-verify medium` | Light + Medium (R1-R4) | Regular development, recommended default |
18
+ | `/prizmkit-verify full` | All rounds (R1-R6) including E2E | Pre-release, after major changes |
19
+ | `/prizmkit-verify --round R1` | Specific round only | Targeted check after editing a layer |
20
+ | `/prizmkit-verify` (no args) | Same as `medium` | Default |
21
+
22
+ ## Architecture Context
23
+
24
+ PrizmKit has four layers, bottom to top:
25
+
26
+ ```
27
+ L1 Skill layer → core/skills/prizmkit-skill/ (10 skills, dev lifecycle)
28
+ L2 Pipeline layer → core/skills/orchestration-skill/pipelines/ (7 skills, planners + launchers)
29
+ L3 Workflow layer → core/skills/orchestration-skill/workflows/ (4 skills, scenario entry points)
30
+ L4 Script layer → dev-pipeline/ (Bash + Python runtime engine)
31
+ ```
32
+
33
+ Three verification depths, cumulative:
34
+ - **Light**: Structural/static checks, scriptable, zero tokens
35
+ - **Medium**: AI reads SKILL.md content, verifies inter-layer contracts
36
+ - **Deep**: End-to-end scenario traces through all 4 layers
37
+
38
+ ## Execution
39
+
40
+ ### Phase 0: Setup
41
+
42
+ 1. Create output directory: `.prizmkit/verify/` (timestamp-based run dir)
43
+ 2. Determine which rounds to run based on user args
44
+ 3. Initialize the report structure
45
+
46
+ ### Phase 1: Horizontal Verification (R1-R4)
47
+
48
+ Run rounds sequentially. For each round, run Light first, then Medium if in scope.
49
+
50
+ ---
51
+
52
+ #### R1: L1 Skill Layer
53
+
54
+ **Target**: All skills in `core/skills/prizmkit-skill/` (expect ~10)
55
+
56
+ **Light checks** — run `${SKILL_DIR}/scripts/verify-light.py --round R1` if available, otherwise check manually:
57
+
58
+ | Check | How | Pass Criteria |
59
+ |-------|-----|---------------|
60
+ | Frontmatter validity | Read each SKILL.md YAML header | `name` + `description` present; `name` is lowercase-hyphens; `name` matches directory name |
61
+ | Asset reference integrity | Grep `${SKILL_DIR}` in each SKILL.md, resolve path relative to skill dir | Every referenced file exists on disk |
62
+ | Cross-skill references | Grep `/prizmkit-*` references in each SKILL.md | Every referenced skill exists under `core/skills/` |
63
+ | Orphaned assets | List files in each skill's `assets/`, `scripts/`, `references/` dirs | Every file is referenced by SKILL.md (warn if not) |
64
+ | Lint: ESLint | Run `npm run lint` | 0 errors (warnings OK) |
65
+ | Lint: Ruff | Run `npm run lint:py` | 0 errors |
66
+
67
+ **Medium checks** — read each SKILL.md FULLY and verify artifact chain contracts:
68
+
69
+ For each adjacent skill pair in the chain:
70
+ `prizmkit-plan → prizmkit-analyze → prizmkit-implement → prizmkit-code-review → prizmkit-retrospective → prizmkit-committer → prizmkit-deploy`
71
+
72
+ | Verification Point | What to Check |
73
+ |-------------------|---------------|
74
+ | Output format defined? | Does the producer skill explicitly describe its output structure (file name, format, key sections)? |
75
+ | Input expectation defined? | Does the consumer skill explicitly state what it reads and in what format? |
76
+ | Format match | Do output and input specifications agree on structure, field names, file paths? |
77
+ | Path convention | Do both skills reference the same directory convention (e.g., `.prizmkit/specs/###-feature-name/`)? |
78
+ | Error handling | What happens if upstream artifact is missing or malformed? Is fallback defined? |
79
+ | Quality gate | Does each consumer check preconditions before proceeding? |
80
+
81
+ Record each pair as: `PASS` / `WARN (gap described)` / `FAIL (mismatch described)`
82
+
83
+ ---
84
+
85
+ #### R2: L2 Pipeline Layer
86
+
87
+ **Target**: All skills in `core/skills/orchestration-skill/pipelines/` (expect 7)
88
+
89
+ **Light checks**:
90
+
91
+ | Check | How | Pass Criteria |
92
+ |-------|-----|---------------|
93
+ | Frontmatter validity | Same as R1 | `name` + `description`; name matches dir |
94
+ | Asset reference integrity | Same as R1 | All `${SKILL_DIR}` refs resolve |
95
+ | Planner→Launcher coupling | For each scenario (feature/bugfix/refactor): check planner mentions correct JSON filename, launcher references correct script | All 3 pairs coupled correctly |
96
+ | Script path references | Launchers reference `dev-pipeline/run-*.sh` | All referenced scripts exist and are executable |
97
+ | Schema consistency | Compare planner SKILL.md output schema with `dev-pipeline/templates/*-list-schema.json` | Field names, types, required fields match |
98
+ | Schema version match | Compare `dev-pipeline/templates/*-list-schema.json` const value with `dev-pipeline/scripts/init-*-pipeline.py` EXPECTED_SCHEMA | Versions identical |
99
+
100
+ **Medium checks** — read each SKILL.md FULLY:
101
+
102
+ For each scenario (feature, bugfix, refactor):
103
+ 1. What JSON format does the planner produce? What fields, what validation?
104
+ 2. What JSON format does the launcher expect? What fields does it read?
105
+ 3. Do they match? Any fields the launcher expects but planner doesn't produce?
106
+ 4. What command does the launcher assemble? What env vars? Do they match `run-*.sh` expectations?
107
+
108
+ ---
109
+
110
+ #### R3: L3 Workflow Layer
111
+
112
+ **Target**: All skills in `core/skills/orchestration-skill/workflows/` (expect 4)
113
+
114
+ **Light checks**:
115
+
116
+ | Check | How | Pass Criteria |
117
+ |-------|-----|---------------|
118
+ | Frontmatter validity | Same as R1 | `name` + `description`; name matches dir |
119
+ | Pipeline skill references | Grep each workflow for planner/launcher skill names | All referenced pipeline skills exist |
120
+ | Checkpoint naming | Grep for `CP-` patterns | Follows `CP-{XW}-{N}` convention |
121
+ | Flow completeness markers | Each workflow has: When to Use, Execution phases, Error handling table, Relationship table | All sections present |
122
+
123
+ **Medium checks** — read each SKILL.md FULLY:
124
+
125
+ | Verification Point | What to Check |
126
+ |-------------------|---------------|
127
+ | Workflow → Pipeline handoff | What does workflow pass to each pipeline skill? Is the input format documented? |
128
+ | Flow completeness | feature-workflow: requirements→planning→launch→monitor? bug-fix-workflow: diagnosis→triage→fix→review→commit? refactor-workflow: goals→planning→launch→monitor? recovery-workflow: detect→diagnose→recover? |
129
+ | Fast path integration | If fast path exists, is there a decision tree for when to use it? |
130
+ | Cross-workflow consistency | Same checkpoint naming, phase structure, error handling patterns? |
131
+
132
+ ---
133
+
134
+ #### R4: L4 Script Layer
135
+
136
+ **Target**: `dev-pipeline/` directory
137
+
138
+ **Light checks**:
139
+
140
+ | Check | How | Pass Criteria |
141
+ |-------|-----|---------------|
142
+ | Shell scripts executable | `ls -la dev-pipeline/*.sh` | All `.sh` files have `+x` permission |
143
+ | Python scripts compile | `python3 -m py_compile` each `.py` file | All compile without error |
144
+ | Bash lib sourcing | Grep `run-*.sh` for `source.*lib/` | Each sources common.sh, heartbeat.sh, branch.sh |
145
+ | JSON templates valid | `python3 -c "import json; json.load(open(f))"` for each `.json` in `templates/` | All parse without error |
146
+ | Ruff Python lint | `ruff check dev-pipeline/scripts/` | 0 errors |
147
+ | Test file existence | List `dev-pipeline/tests/` | At least test files exist for prompt generation |
148
+
149
+ **Medium checks** — read key scripts:
150
+
151
+ | Verification Point | What to Check |
152
+ |-------------------|---------------|
153
+ | Shell → Python integration | For each `run-*.sh`: list all Python scripts invoked, verify each exists, verify argument names match |
154
+ | Bootstrap prompt generation | Read `generate-bootstrap-prompt.py` (or per-scenario variant): does it reference correct skill names? Are all `{{PLACEHOLDER}}` variables populated? |
155
+ | State management | Read `init-*-pipeline.py`: correct schema validation? Proper state dir initialization? |
156
+ | Cross-scenario consistency | Compare `run-feature.sh` vs `run-bugfix.sh` vs `run-refactor.sh`: same structure? Same error handling patterns? Note intentional divergences vs unintentional gaps |
157
+
158
+ ---
159
+
160
+ ### Phase 2: Vertical E2E Verification (R5-R6)
161
+
162
+ Only runs in `full` mode. For each scenario, trace data flow through all 4 layers.
163
+
164
+ #### R5: Feature Scenario
165
+
166
+ Trace "Add user authentication with JWT" through:
167
+
168
+ 1. **L3→L2**: feature-workflow → feature-planner → feature-pipeline-launcher
169
+ - What format does workflow pass to planner?
170
+ - What JSON does planner produce?
171
+ - What command does launcher assemble?
172
+
173
+ 2. **L2→L4**: feature-pipeline-launcher → run-feature.sh
174
+ - What args/env vars are passed?
175
+ - How does init-pipeline.py consume .prizmkit/plans/feature-list.json?
176
+ - What bootstrap prompt does generate-bootstrap-prompt.py produce?
177
+
178
+ 3. **L4→L1**: run-feature.sh → AI CLI → Skills
179
+ - What skills does the bootstrap prompt reference?
180
+ - In what order?
181
+ - Are skill names correct?
182
+
183
+ At each transition, verify: **format match**, **field completeness**, **path consistency**, **error propagation**.
184
+
185
+ #### R6: Bugfix + Refactor Scenarios
186
+
187
+ Same trace for:
188
+ - Bugfix: "Fix login crash when email is empty"
189
+ - Refactor: "Extract authentication logic into shared module"
190
+
191
+ Then cross-scenario comparison:
192
+ - Layer transition patterns structurally similar?
193
+ - Schema conventions consistent (F-NNN / B-NNN / R-NNN)?
194
+ - Bootstrap prompt patterns consistent?
195
+ - State management patterns consistent?
196
+ - Intentional divergences documented?
197
+
198
+ ---
199
+
200
+ ### Phase 3: Supplementary Checks
201
+
202
+ These address gaps identified in the first verification run. Include in `medium` and `full` modes.
203
+
204
+ #### S1: Adapter Layer Verification
205
+
206
+ | Check | How |
207
+ |-------|-----|
208
+ | Claude adapter output | Run `node adapters/claude/command-adapter.js` on a sample skill, verify output format |
209
+ | CodeBuddy adapter output | Run `node adapters/codebuddy/skill-adapter.js` on same skill, verify output |
210
+ | Cross-platform equivalence | Diff the two outputs for semantic equivalence |
211
+ | ${SKILL_DIR} resolution | Verify Claude resolves to `.claude/command-assets/`, CodeBuddy to `.codebuddy/skills/` |
212
+
213
+ #### S2: Installer & Distribution Verification
214
+
215
+ | Check | How |
216
+ |-------|-----|
217
+ | _metadata.json completeness | All skills listed in `core/skills/_metadata.json` suites? |
218
+ | Bundle sync | `npm run bundle && npm run bundle:verify` passes |
219
+ | Skill count | Bundled skill count matches source skill count |
220
+
221
+ #### S3: Rules Consistency
222
+
223
+ | Check | How |
224
+ |-------|-----|
225
+ | Rules exist | All files in `core/rules/` referenced by `_rules-metadata.json` |
226
+ | Rule-skill alignment | Rules reference skill names that exist |
227
+
228
+ ---
229
+
230
+ ## Report Format
231
+
232
+ Generate the verification report at `.prizmkit/verify/verify-report-{timestamp}.md`:
233
+
234
+ ```markdown
235
+ # PrizmKit Verification Report
236
+ **Date**: {date} **Mode**: {light|medium|full}
237
+
238
+ ## Summary
239
+ | Round | Layer | Light | Medium | Deep | Issues |
240
+ |-------|-------|-------|--------|------|--------|
241
+ | R1 | L1 Skill | PASS/WARN/FAIL | PASS/WARN/FAIL | — | count |
242
+ | R2 | L2 Pipeline | ... | ... | — | count |
243
+ | R3 | L3 Workflow | ... | ... | — | count |
244
+ | R4 | L4 Script | ... | ... | — | count |
245
+ | R5 | E2E Feature | — | — | PASS/WARN/FAIL | count |
246
+ | R6 | E2E Bug+Refactor | — | — | PASS/WARN/FAIL | count |
247
+ | S1 | Adapters | ... | ... | — | count |
248
+ | S2 | Distribution | ... | ... | — | count |
249
+ | S3 | Rules | ... | ... | — | count |
250
+
251
+ ## Issues by Severity
252
+ ### Critical
253
+ - [C1] Description... (Round, Layer, Location)
254
+
255
+ ### High
256
+ - [H1] Description...
257
+
258
+ ### Medium
259
+ - [M1] Description...
260
+
261
+ ## Cross-Scenario Comparison (full mode only)
262
+ | Dimension | Feature | Bugfix | Refactor | Consistent? |
263
+ |-----------|---------|--------|----------|-------------|
264
+ | ... | ... | ... | ... | ✅/⚠️ |
265
+
266
+ ## Recommendations
267
+ 1. **P0**: ...
268
+ 2. **P1**: ...
269
+ ```
270
+
271
+ ## Parallelization Strategy
272
+
273
+ For efficiency, run independent checks concurrently:
274
+ - R1 Light + R2 Light + R3 Light + R4 Light can run in parallel
275
+ - R1 Medium depends on R1 Light passing
276
+ - R5/R6 depend on R1-R4 completing (need full picture of each layer)
277
+ - S1/S2/S3 can run in parallel with R1-R4
278
+
279
+ ## Previous Verification Findings
280
+
281
+ Reference `docs/framework-verification-report.md` for the baseline findings from the initial verification run. This helps track whether previously identified issues have been resolved.