prizmkit 1.1.8 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/codebuddy/skill-adapter.js +21 -7
  3. package/bundled/agents/prizm-dev-team-reviewer.md +53 -173
  4. package/bundled/dev-pipeline/.env.example +45 -0
  5. package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +535 -0
  6. package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
  7. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +57 -12
  8. package/bundled/dev-pipeline/launch-feature-daemon.sh +3 -1
  9. package/bundled/dev-pipeline/launch-refactor-daemon.sh +57 -12
  10. package/bundled/dev-pipeline/lib/branch.sh +6 -1
  11. package/bundled/dev-pipeline/lib/common.sh +71 -0
  12. package/bundled/dev-pipeline/lib/heartbeat.sh +2 -2
  13. package/bundled/dev-pipeline/retry-bugfix.sh +60 -23
  14. package/bundled/dev-pipeline/retry-feature.sh +47 -12
  15. package/bundled/dev-pipeline/retry-refactor.sh +105 -23
  16. package/bundled/dev-pipeline/run-bugfix.sh +265 -44
  17. package/bundled/dev-pipeline/run-feature.sh +35 -1
  18. package/bundled/dev-pipeline/run-refactor.sh +376 -51
  19. package/bundled/dev-pipeline/scripts/check-session-status.py +24 -1
  20. package/bundled/dev-pipeline/scripts/detect-stuck.py +195 -85
  21. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +31 -19
  22. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +19 -3
  23. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +98 -11
  24. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +30 -5
  25. package/bundled/dev-pipeline/scripts/init-pipeline.py +3 -3
  26. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +15 -4
  27. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -5
  28. package/bundled/dev-pipeline/scripts/patch-completion-notes.py +191 -0
  29. package/bundled/dev-pipeline/scripts/update-bug-status.py +159 -14
  30. package/bundled/dev-pipeline/scripts/update-feature-status.py +79 -37
  31. package/bundled/dev-pipeline/scripts/update-refactor-status.py +343 -13
  32. package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +1 -1
  33. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +7 -11
  34. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +41 -7
  35. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +27 -3
  36. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +43 -19
  37. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +54 -26
  38. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +5 -14
  39. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +36 -25
  40. package/bundled/dev-pipeline/templates/feature-list-schema.json +23 -11
  41. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +270 -0
  42. package/bundled/dev-pipeline/templates/refactor-list-schema.json +10 -2
  43. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +3 -1
  44. package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +1 -0
  45. package/bundled/dev-pipeline/templates/sections/feature-context.md +2 -0
  46. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +29 -2
  47. package/bundled/dev-pipeline/templates/sections/phase-commit.md +22 -0
  48. package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +2 -2
  49. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +8 -6
  50. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +7 -5
  51. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
  52. package/bundled/skills/_metadata.json +5 -22
  53. package/bundled/skills/app-planner/SKILL.md +92 -66
  54. package/bundled/skills/app-planner/assets/app-design-guide.md +1 -1
  55. package/bundled/skills/app-planner/references/architecture-decisions.md +1 -1
  56. package/bundled/skills/app-planner/references/project-brief-guide.md +69 -66
  57. package/bundled/skills/bug-fix-workflow/SKILL.md +47 -4
  58. package/bundled/skills/bug-planner/SKILL.md +130 -188
  59. package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +43 -0
  60. package/bundled/skills/bug-planner/references/critic-and-verification.md +44 -0
  61. package/bundled/skills/bug-planner/references/error-recovery.md +73 -0
  62. package/bundled/skills/bug-planner/references/input-formats.md +53 -0
  63. package/bundled/skills/bug-planner/references/schema-validation.md +25 -0
  64. package/bundled/skills/bug-planner/references/severity-rules.md +16 -0
  65. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +1 -5
  66. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +5 -10
  67. package/bundled/skills/feature-pipeline-launcher/SKILL.md +16 -3
  68. package/bundled/skills/feature-planner/SKILL.md +33 -122
  69. package/bundled/skills/feature-planner/assets/evaluation-guide.md +1 -1
  70. package/bundled/skills/feature-planner/assets/planning-guide.md +21 -5
  71. package/bundled/skills/feature-planner/references/browser-interaction.md +2 -4
  72. package/bundled/skills/feature-planner/references/completeness-review.md +57 -0
  73. package/bundled/skills/feature-planner/references/error-recovery.md +15 -34
  74. package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
  75. package/bundled/skills/feature-planner/references/new-project-planning.md +2 -2
  76. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -2
  77. package/bundled/skills/feature-workflow/SKILL.md +3 -4
  78. package/bundled/skills/prizm-kit/SKILL.md +39 -49
  79. package/bundled/skills/prizmkit-code-review/SKILL.md +51 -64
  80. package/bundled/skills/prizmkit-code-review/rules/dimensions.md +85 -0
  81. package/bundled/skills/prizmkit-code-review/rules/fix-strategy.md +11 -11
  82. package/bundled/skills/prizmkit-committer/SKILL.md +3 -31
  83. package/bundled/skills/prizmkit-deploy/SKILL.md +34 -31
  84. package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +1 -1
  85. package/bundled/skills/prizmkit-implement/SKILL.md +35 -68
  86. package/bundled/skills/prizmkit-init/SKILL.md +112 -65
  87. package/bundled/skills/prizmkit-init/assets/project-brief-template.md +82 -0
  88. package/bundled/skills/prizmkit-plan/SKILL.md +120 -79
  89. package/bundled/skills/prizmkit-plan/assets/plan-template.md +28 -18
  90. package/bundled/skills/prizmkit-plan/assets/spec-template.md +28 -11
  91. package/bundled/skills/prizmkit-plan/references/clarify-guide.md +3 -3
  92. package/bundled/skills/prizmkit-plan/references/verification-checklist.md +60 -0
  93. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +10 -81
  94. package/bundled/skills/prizmkit-prizm-docs/assets/{PRIZM-SPEC.md → prizm-docs-format.md} +41 -526
  95. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +46 -0
  96. package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +16 -0
  97. package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +14 -0
  98. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +19 -0
  99. package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +17 -0
  100. package/bundled/skills/prizmkit-retrospective/SKILL.md +27 -65
  101. package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -4
  102. package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +7 -25
  103. package/bundled/skills/recovery-workflow/SKILL.md +8 -8
  104. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +17 -9
  105. package/bundled/skills/refactor-planner/SKILL.md +23 -41
  106. package/bundled/skills/refactor-workflow/SKILL.md +1 -2
  107. package/bundled/team/prizm-dev-team.json +1 -1
  108. package/bundled/{skills/prizm-kit/assets → templates}/project-memory-template.md +1 -1
  109. package/package.json +1 -1
  110. package/src/clean.js +0 -1
  111. package/src/gitignore-template.js +0 -1
  112. package/src/scaffold.js +10 -3
  113. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +0 -5
  114. package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +0 -19
  115. package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +0 -19
  116. package/bundled/skills/app-planner/references/project-conventions.md +0 -93
  117. package/bundled/skills/prizmkit-analyze/SKILL.md +0 -207
  118. package/bundled/skills/prizmkit-code-review/rules/dimensions-bugfix.md +0 -25
  119. package/bundled/skills/prizmkit-code-review/rules/dimensions-feature.md +0 -43
  120. package/bundled/skills/prizmkit-code-review/rules/dimensions-refactor.md +0 -25
  121. package/bundled/skills/prizmkit-implement/references/deploy-guide-protocol.md +0 -69
  122. package/bundled/skills/prizmkit-verify/SKILL.md +0 -281
  123. package/bundled/skills/prizmkit-verify/scripts/verify-light.py +0 -402
@@ -0,0 +1,14 @@
1
+ # Operation: Status — Detailed Steps
2
+
3
+ Check freshness of all .prizm docs.
4
+
5
+ PRECONDITION: .prizm-docs/ exists with root.prizm.
6
+
7
+ STEPS:
8
+ 1. Get last git modification time of root.prizm via `git log -1 --format="%ai" -- .prizm-docs/root.prizm`.
9
+ 2. Count commits since that time via `git log --since="<timestamp>" --oneline | wc -l`.
10
+ 3. For each L1/L2 doc, compare git modification time of the .prizm file (`git log -1 --format="%ai" -- <prizm-file>`) against latest git modification of source files in that module (`git log -1 --format="%ai" -- <module-path>/`).
11
+ 4. Classify each doc as: FRESH (prizm file updated after latest source change), STALE (source changed more recently than prizm file), MISSING (module exists but no .prizm doc).
12
+ 5. Flag any docs exceeding size limits.
13
+
14
+ OUTPUT: Freshness report table with columns: DOC_PATH | LEVEL | STATUS | PRIZM_LAST_MOD | SOURCE_LAST_MOD.
@@ -0,0 +1,19 @@
1
+ # Operation: Update — Detailed Steps
2
+
3
+ Update .prizm-docs/ to reflect recent code changes.
4
+
5
+ PRECONDITION: .prizm-docs/ exists with root.prizm.
6
+
7
+ STEPS:
8
+ 1. Get changed files via `git diff --cached --name-status`. If nothing staged, use `git diff --name-status`. If no git changes at all, do full rescan comparing code against existing docs — this includes checking for modules that have source files but no L2 doc.
9
+ 2. Map changed files to modules by matching against MODULE_INDEX or MODULE_GROUPS in root.prizm. Group changes by module.
10
+ 3. Classify each change: A (added) -> new KEY_FILES entries. D (deleted) -> remove entries, update counts. M (modified) -> check dependency changes. R (renamed) -> update all path references.
11
+ 4. Update affected docs: L2 first (KEY_FILES, INTERFACES, DATA_FLOW, DEPENDENCIES, TRAPS, CHANGELOG), then L1 (FILES count, KEY_FILES, DEPENDENCIES — L1 does NOT contain INTERFACES/DATA_FLOW/TRAPS/DECISIONS), then L0 (MODULE_INDEX or MODULE_GROUPS counts, CROSS_CUTTING) only if structural change. No UPDATED timestamps — git tracks modification times. **Preserve** any `PROJECT_BRIEF:` line in root.prizm — it is managed by prizmkit-init, not by this skill.
12
+ 5. Skip updates if: only internal implementation changed (no interface/dependency change), only comments/whitespace/formatting, only .prizm files changed. DO NOT skip test file changes or bug fixes — they may reveal TRAPS worth capturing in L2.
13
+ 6. If new directory qualifies as a module (per MODULE_DISCOVERY_CRITERIA) and matches no existing module: create L1 immediately, add to MODULE_INDEX. If the current diff includes Added or Modified source files in this module → also create L2 immediately with sections: MODULE, FILES, RESPONSIBILITY, INTERFACES, DATA_FLOW, KEY_FILES, DEPENDENCIES, RULES, TRAPS, DECISIONS, CHANGELOG. Otherwise defer L2.
14
+ 6a. **L2 gap check** (runs during full rescan mode only — when no git changes detected): For each existing module in MODULE_INDEX, check if L2 doc exists. If L2 is missing and the module has source files with meaningful logic (not trivial config/wrapper) → create L2 with sections: MODULE, FILES, RESPONSIBILITY, INTERFACES, DATA_FLOW, KEY_FILES, DEPENDENCIES, RULES, TRAPS, DECISIONS, CHANGELOG. This ensures Update fills documentation gaps left by previous sessions.
15
+ 7. Append entries to changelog.prizm using format: `- <module-path> | <verb>: <description>`
16
+ 8. Enforce size limits: L0 > 4KB -> consolidate. L1 > 4KB -> trim KEY_FILES descriptions, ensure RULES <= 3 entries. L2 > 5KB -> split or archive.
17
+ 9. Stage updated .prizm files via `git add .prizm-docs/`
18
+
19
+ OUTPUT: List of updated/created/skipped docs with reasons.
@@ -0,0 +1,17 @@
1
+ # Operation: Validate — Detailed Steps
2
+
3
+ Check format compliance and consistency of all .prizm docs.
4
+
5
+ PRECONDITION: .prizm-docs/ exists.
6
+
7
+ STEPS:
8
+ 1. FORMAT CHECK: Verify all .prizm files use KEY: value format. Flag any prose paragraphs, code blocks (```), markdown headers (##), emoji, ASCII art, or horizontal rules. Flag TRAPS entries missing severity prefix ([CRITICAL], [HIGH], or [LOW]). Note: [REVIEW] preceding severity (e.g., `[REVIEW][HIGH]`) is a valid temporary staleness marker, not a format violation.
9
+ 2. SIZE CHECK: Verify size limits: L0 <= 4KB, L1 <= 4KB, L2 <= 5KB. Report files exceeding limits with current size.
10
+ 3. POINTER CHECK: Verify all arrow (->) references resolve to existing .prizm files. Report broken pointers.
11
+ 4. STALENESS CHECK: Compare git modification time of each .prizm file against source directory. Flag docs where source was modified more recently.
12
+ 5. COMPLETENESS CHECK: Verify root.prizm has all required fields (PRIZM_VERSION, PROJECT, LANG, MODULE_INDEX or MODULE_GROUPS). Verify L1 docs have MODULE, FILES, RESPONSIBILITY, DEPENDENCIES (no INTERFACES/TRAPS/DECISIONS). Verify L2 docs have MODULE, FILES, KEY_FILES, DEPENDENCIES, INTERFACES, TRAPS.
13
+ 6. ANTI-PATTERN CHECK: Flag duplicate information across levels, implementation details in L0/L1, TODO items, session-specific context.
14
+ 7. RULES HIERARCHY CHECK: Verify L1/L2 RULES do not contradict root.prizm RULES. L1/L2 may only supplement with module-specific exceptions.
15
+ 8. TRAPS STALENESS CHECK: For each L2 doc where TRAPS section has more than 8 entries, verify that TRAPS include staleness metadata (`STALE_IF:` or `REF:` fields). Flag TRAPS without any staleness metadata as `NEEDS_METADATA` — these are not auto-removed, but flagged for the next `/prizmkit-retrospective` to enrich with `STALE_IF:` globs or `REF:` hashes.
16
+
17
+ OUTPUT: Validation report with PASS/FAIL per check, list of issues with file paths and suggested fixes.
@@ -19,19 +19,15 @@ For initial doc setup, validation, or migration, use `/prizmkit-prizm-docs` inst
19
19
  ## When to Use
20
20
 
21
21
  - **Before every commit** (mandatory in pipeline) — ensures docs and code are in sync
22
- - After completing a feature
23
- - After code review passes (PASS or PASS WITH WARNINGS)
22
+ - After completing a feature, refactoring, or bug fix
23
+ - After code review passes
24
24
  - User says "retrospective", "retro", "update docs", "sync docs", "wrap up"
25
- - After refactoring or bugfix cycles (structural sync + optional TRAPS update)
26
25
 
27
- ## PRECONDITION
26
+ ## Input
28
27
 
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 |
28
+ | Parameter | Required | Description |
29
+ |-----------|----------|-------------|
30
+ | `artifact_dir` | No | Directory containing spec.md, plan.md, review-report.md. If omitted, scan `.prizmkit/` subdirectories for the most recently modified directory with a `plan.md`. If no artifact directory found, run in standalone mode (structural sync only from `git diff`). |
35
31
 
36
32
  ## When NOT to Use
37
33
 
@@ -39,32 +35,36 @@ For initial doc setup, validation, or migration, use `/prizmkit-prizm-docs` inst
39
35
  - Only test files changed — no module-level impact
40
36
  - Only .prizm files changed — avoid circular updates
41
37
 
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
-
55
38
  ---
56
39
 
57
40
  ### Job 1: Structural Sync (always runs)
58
41
  Synchronize `.prizm-docs/` structure with actual codebase changes from this session.
59
- → Read `${SKILL_DIR}/references/structural-sync-steps.md` for the detailed 7-step procedure (1a–1g).
42
+ → Read `${SKILL_DIR}/references/structural-sync-steps.md` for the detailed procedure.
60
43
 
61
44
  **Key outputs**: Updated L1 file counts, L2 INTERFACES/DATA_FLOW, changelog entries, stale TRAPS cleanup.
62
45
 
63
46
  ---
64
47
 
65
- ### Job 2: Knowledge Injection (conditional — skip for pure refactors)
48
+ ### Job 2: Knowledge Injection (conditional)
66
49
  Inject newly discovered project knowledge (TRAPS, RULES, DECISIONS) into architecture docs.
67
- → Read `${SKILL_DIR}/references/knowledge-injection-steps.md` for the detailed 3-step procedure (2a–2c).
50
+ → Read `${SKILL_DIR}/references/knowledge-injection-steps.md` for the detailed procedure.
51
+
52
+ **Review gate**: Before running Job 2, check `review-report.md` in the artifact directory for the `## Verdict:` line:
53
+ - Verdict is `PASS` → proceed
54
+ - Verdict is `NEEDS_FIXES` → **skip Job 2** — do not inject knowledge for code that hasn't passed review. Output warning: "Review report has unresolved findings. Skipping knowledge injection."
55
+ - No `review-report.md` found → proceed with warning
56
+ - No artifact directory (standalone mode) → skip Job 2, only Job 1 runs
57
+
58
+ **Skip for**: pure refactors (no behavioral change).
59
+
60
+ **Bug Fix Documentation Policy**:
61
+ - DEFAULT for bug fixes: Run Job 1 (structural sync) only. Skip Job 2 (knowledge injection).
62
+ - RUN Job 2 when the bug fix causes any of:
63
+ • Interface signature changes
64
+ • Dependency additions/removals
65
+ • Observable behavior changes to existing features
66
+ • Newly discovered TRAPs (gotchas/pitfalls)
67
+ - When any of the above apply, run full retrospective (Job 1 + Job 2).
68
68
 
69
69
  **Key outputs**: New TRAPS entries, RULES updates, DECISIONS records in relevant L1/L2 docs and root.prizm.
70
70
 
@@ -82,45 +82,7 @@ Inject newly discovered project knowledge (TRAPS, RULES, DECISIONS) into archite
82
82
  git add .prizm-docs/
83
83
  ```
84
84
 
85
- **3c.** Handoff:
86
- - `/prizmkit-committer` — proceed to commit
87
-
88
- ---
89
-
90
- ## Integration with Pipeline
91
-
92
- In the dev-pipeline, this skill is the **single doc maintenance step** before commit:
93
-
94
- ```
95
- implement → code-review → retrospective (architecture sync) → committer (pure commit)
96
- ```
97
-
98
- The pipeline enforces a **docs pass condition**: `.prizm-docs/` must show changes in the final commit. This skill satisfies that requirement.
99
-
100
- ## HANDOFF Chain
101
-
102
- | From | To | Condition |
103
- |------|----|-----------|
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 |
107
- | `prizmkit-deploy` | `prizmkit-committer` | Deploy docs updated, ready to commit |
108
- | `prizmkit-committer` | — | Committed |
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`
85
+ **HANDOFF:** `/prizmkit-committer`
124
86
 
125
87
  ## Output
126
88
 
@@ -3,10 +3,9 @@
3
3
  **2a.** Gather context — read the **actual code that was changed** plus any available artifacts:
4
4
 
5
5
  - `git diff HEAD` — the real source of truth for what happened
6
- - `.prizmkit/specs/###-feature-name/context-snapshot.md` read the '## Implementation Log' section (Dev's changes, decisions, discoveries) and '## Review Notes' section (Reviewer's findings). These are the **preferred source** for pre-categorized decisions and findings. If these sections exist, prefer them over re-extracting from git diff.
7
- - `.prizmkit/specs/###-feature-name/plan.md` if feature work, read planned vs actual
8
- - `.prizmkit/bugfix/<id>/fix-report.md` — if bugfix, read what was discovered
9
- - `.prizmkit/specs/###-feature-name/failure-log.md` — if a previous session failed, read DISCOVERED_TRAPS. These are high-value TRAPS because they come from actual failures — prioritize injecting them into `.prizm-docs/`
6
+ - `review-report.md` in the artifact directory read the findings and fix instructions. If this file exists, use it as a source for pre-categorized decisions and findings.
7
+ - `plan.md` in the artifact directory read planned vs actual
8
+ - Any companion documents in the artifact directory (e.g., `refactor-analysis.md`, `fix-report.md`) — read what was discovered
10
9
  - The relevant `.prizm-docs/` L1/L2 docs for affected modules
11
10
 
12
11
  **2b.** Extract knowledge from what was **observed in code**, not invented:
@@ -1,4 +1,4 @@
1
- # Structural Sync — Detailed Steps (1a–1g)
1
+ # Structural Sync — Detailed Steps
2
2
 
3
3
  **1a.** Get changed files:
4
4
  ```bash
@@ -19,16 +19,14 @@ git diff --name-status
19
19
 
20
20
  **1d.** Update affected docs (bottom-up: L2 → L1 → L0):
21
21
 
22
- - **L2**: If L2 exists → update KEY_FILES, INTERFACES, DATA_FLOW, DEPENDENCIES, CHANGELOG, TRAPS, DECISIONS. If L2 does NOT exist AND the module has Added or Modified source files in the current diff with meaningful logic (not trivial config) → create L2 using the L2 GENERATION TEMPLATE, then populate from source.
22
+ - **L2**: If L2 exists → update KEY_FILES, INTERFACES, DATA_FLOW, DEPENDENCIES, CHANGELOG, TRAPS, DECISIONS. If L2 does NOT exist AND the module has Added or Modified source files in the current diff with meaningful logic (not trivial config) → create L2 with these sections: MODULE, FILES, RESPONSIBILITY, INTERFACES, DATA_FLOW, KEY_FILES, DEPENDENCIES, RULES, TRAPS, DECISIONS, CHANGELOG. Populate from source.
23
23
  - **L1**: Update FILES count, KEY_FILES (if major files added/removed), DEPENDENCIES (if module-level deps changed). **L1 does NOT contain INTERFACES, DATA_FLOW, TRAPS, or DECISIONS** — those belong in L2 only.
24
- - **L0 root.prizm**: Update MODULE_INDEX file counts only if counts changed. Update CROSS_CUTTING if cross-module concerns changed. Update only if structural change (module added/removed).
24
+ - **L0 root.prizm**: Update MODULE_INDEX file counts only if counts changed. Update CROSS_CUTTING if cross-module concerns changed. Update only if structural change (module added/removed). **Preserve** any `PROJECT_BRIEF:` line — it is managed by prizmkit-init.
25
25
 
26
- **1d-migrate.** Legacy TRAPS format migration (opportunistic):
27
- While updating an affected L1/L2 doc, if you encounter TRAPS entries **without** a severity prefix (e.g., `- foo | FIX: bar` instead of `- [LOW] foo | FIX: bar`), prepend `[LOW]` as a conservative default. This clears legacy format debt incrementally only in files already being touched, never as a bulk operation.
28
-
29
- **1e.** If new directory qualifies as a module (per MODULE_DISCOVERY_CRITERIA in PRIZM-SPEC Section 9.1 Step 2) and matches no existing module:
30
- 1. Create L1 doc immediately, add to MODULE_INDEX.
31
- 2. If the current diff includes Added or Modified source files with meaningful logic in this module → create L2 immediately using the L2 GENERATION TEMPLATE. Otherwise defer L2 to the next session that touches this module.
26
+ **1e.** If new directory qualifies as a module and matches no existing module:
27
+ - A directory qualifies as a module if any of: contains source files forming a logical unit, contains entry/config/interface files, contains qualifying sub-modules, or is referenced by multiple modules as dependency.
28
+ - Create L1 doc immediately, add to MODULE_INDEX.
29
+ - If the current diff includes Added or Modified source files with meaningful logic create L2 immediately. Otherwise defer L2.
32
30
 
33
31
  **1f.** Enforce size limits:
34
32
  - L0 > 4KB → if using MODULE_INDEX with > 15 entries, convert to MODULE_GROUPS format (group by functional domain). Otherwise, consolidate MODULE_INDEX descriptions.
@@ -39,25 +37,9 @@ While updating an affected L1/L2 doc, if you encounter TRAPS entries **without**
39
37
 
40
38
  **1g. TRAPS staleness check** (only when an L2 doc's TRAPS section has > 10 entries):
41
39
 
42
- (Note: `/prizmkit-prizm-docs` Validate uses a lower threshold of > 8 entries to flag TRAPS needing staleness metadata. This step uses > 10 because it performs actual cleanup, which is more expensive. Validate warns early; this step acts later.)
43
-
44
40
  Perform a quick staleness scan on existing TRAPS to prevent unbounded accumulation:
45
41
  1. If a TRAP has `STALE_IF:` and the glob-matched files no longer exist (verified via `ls`) → delete the TRAP entry, append CHANGELOG: `remove: archived stale TRAP - <summary>`
46
42
  2. If a TRAP has `REF:` → check if the referenced file still exists and the REF commit is less than 180 days old (via `git log --since="180 days ago" <hash> 2>/dev/null`). If the file is deleted OR the REF commit is older than 180 days → prepend `[REVIEW]` to the severity, signaling it needs verification during the next retrospective Job 2
47
43
  3. Process at most 5 of the oldest TRAPS per L2 doc per session (to bound context cost)
48
44
 
49
45
  This step is lightweight — it only triggers when TRAPS exceed 10 entries, and processes at most 5 per run.
50
-
51
- **1h. Periodic full TRAPS audit** (runs approximately once every 10 retrospective sessions):
52
-
53
- Check `.prizm-docs/changelog.prizm` for the marker `audit: traps-audit full-scan`. If the marker does not exist, OR the most recent `audit: traps-audit full-scan` entry has 10+ other changelog entries after it:
54
-
55
- 1. Scan ALL L2 `.prizm` files (not just ones touched this session)
56
- 2. For each L2 doc with TRAPS entries:
57
- - Verify referenced file paths still exist (via `ls`)
58
- - If `STALE_IF:` glob matches zero files → delete the TRAP, append CHANGELOG: `remove: archived stale TRAP - <summary>`
59
- - If `REF:` commit is older than 180 days AND the referenced file was significantly refactored (>50% lines changed since REF commit) → prepend `[REVIEW]`
60
- 3. Process at most 3 TRAPS per L2 doc to bound context cost (total max ~15 TRAPS per audit)
61
- 4. Append to `.prizm-docs/changelog.prizm`: `- root | audit: traps-audit full-scan — checked N docs, removed M stale, marked K for review`
62
-
63
- This is a lightweight background pass. If the project has fewer than 5 L2 docs, skip this step (not enough accumulation to warrant auditing).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "recovery-workflow"
3
- description: "Recover and resume interrupted interactive workflow sessions. Auto-detects which workflow (feature-workflow, bug-fix-workflow, refactor-workflow) was interrupted and what phase it reached by inspecting git branch names, characteristic artifacts, and pipeline state — then resumes from the breakpoint. Use this skill whenever an AI CLI session is interrupted mid-workflow, times out, or hits token limits. Trigger on: 'recover', 'resume', 'continue where I left off', 'session interrupted', 'session timed out', 'pick up where it left off', 'token limit exceeded', 'salvage partial work'. (project)"
3
+ description: "Recover and resume interrupted interactive workflow sessions. Auto-detects which workflow (feature-workflow, bug-fix-workflow, refactor-workflow) was interrupted and what phase it reached by inspecting git branch names, characteristic artifacts, and pipeline state — then resumes from the breakpoint. Use this skill whenever an AI CLI session is interrupted mid-workflow, times out, or hits token limits. Trigger on: 'recover', 'resume', 'continue where I left off', 'session interrupted', 'session timed out', 'pick up where it left off', 'token limit exceeded', 'salvage partial work'."
4
4
  ---
5
5
 
6
6
  # Recovery Workflow
@@ -92,7 +92,7 @@ To start a new workflow:
92
92
  • /refactor-workflow — behavior-preserving code restructuring
93
93
  ```
94
94
 
95
- **CHECKPOINT CP-RW-0**: Workflow type and phase identified.
95
+ **CHECKPOINT CP-REC-0**: Workflow type and phase identified.
96
96
 
97
97
  ---
98
98
 
@@ -148,7 +148,7 @@ If the user declines, suggest alternatives:
148
148
  - "Use `/feature-workflow` to start fresh"
149
149
  - "Use `/refactor-workflow` to start fresh"
150
150
 
151
- **CHECKPOINT CP-RW-1**: User confirmed recovery.
151
+ **CHECKPOINT CP-REC-1**: User confirmed recovery.
152
152
 
153
153
  ---
154
154
 
@@ -160,10 +160,10 @@ If the user declines, suggest alternatives:
160
160
 
161
161
  1. **Read the workflow's SKILL.md** from `core/skills/orchestration-skill/workflows/{workflow-type}/SKILL.md`
162
162
  2. **Read existing artifacts** to restore context — check in this order for the most efficient recovery:
163
- - If `session-summary.md` exists in the artifact directory → read it first. It provides a lightweight summary of completed tasks, key decisions, active TRAPS, and remaining work from the interrupted session.
164
- > **Note**: `session-summary.md` is generated by the pipeline's bootstrap prompt system (`generate-bootstrap-prompt.py`) at the end of each AI CLI session. It may not exist if the session crashed before completion or if running in interactive (non-pipeline) mode. If absent, reconstruct context from the artifacts below.
165
- - Then read remaining artifacts: spec, plan, code diffs, bug descriptions, etc.
166
- 3. **Read relevant `.prizm-docs/`** — load project context (L0 root, relevant L1). If `session-summary.md` was found, use its "Files Changed" section to focus L1/L2 loading on affected modules only.
163
+ - If `context-snapshot.md` exists in the artifact directory → read it first. It provides a snapshot of completed tasks, key decisions, and remaining work from the interrupted session.
164
+ - If `session-summary.md` exists read it for a lightweight summary of the previous session.
165
+ - Then read remaining artifacts: spec.md, plan.md, review-report.md, code diffs, bug descriptions, etc.
166
+ 3. **Read relevant `.prizm-docs/`** — load project context (L0 root, relevant L1/L2 for affected modules).
167
167
 
168
168
  This step replaces the context that was lost when the AI session was interrupted.
169
169
 
@@ -232,7 +232,7 @@ Recovery complete.
232
232
  • Or start a new workflow
233
233
  ```
234
234
 
235
- **CHECKPOINT CP-RW-2**: Workflow recovered and completed.
235
+ **CHECKPOINT CP-REC-2**: Workflow recovered and completed.
236
236
 
237
237
  ---
238
238
 
@@ -135,20 +135,16 @@ Detect user intent from their message, then follow the corresponding workflow:
135
135
 
136
136
  Use `AskUserQuestion` to present the following configuration choices. Each question is a separate selectable option:
137
137
 
138
- **Question 1 — Critic review** (multiSelect: false):
139
- - Off (default) — Skip adversarial review
140
- - On — Enable critic review after refactoring (+3-8 min/refactor for critical/high complexity)
141
-
142
- **Question 2 — Verbose logging** (multiSelect: false):
138
+ **Question 1 — Verbose logging** (multiSelect: false):
143
139
  - On (default) — Detailed AI session logs including tool calls and subagent activity
144
140
  - Off — Minimal logging
145
141
 
146
- **Question 3 — Max retries** (multiSelect: false):
142
+ **Question 2 — Max retries** (multiSelect: false):
147
143
  - 3 (default)
148
144
  - 1
149
145
  - 5
150
146
 
151
- **Question 4 — Session timeout** (multiSelect: false):
147
+ **Question 3 — Session timeout** (multiSelect: false):
152
148
  - None (default) — No timeout
153
149
  - 30 min — `SESSION_TIMEOUT=1800`
154
150
  - 1 hour — `SESSION_TIMEOUT=3600`
@@ -171,6 +167,19 @@ Detect user intent from their message, then follow the corresponding workflow:
171
167
  | Strict behavior: On | `STRICT_BEHAVIOR_CHECK=1` |
172
168
  | Strict behavior: Off | `STRICT_BEHAVIOR_CHECK=0` |
173
169
 
170
+ **Advanced environment variables** (not exposed in interactive menu, pass via `--env`):
171
+
172
+ | Variable | Default | Purpose |
173
+ |----------|---------|---------|
174
+ | `MODEL` | (none) | AI model override (e.g. `claude-opus-4.6`) |
175
+ | `AUTO_PUSH` | `0` | Auto-push to remote after successful refactor (`1` to enable) |
176
+ | `DEV_BRANCH` | auto-generated | Custom dev branch name (default: `refactor/pipeline-{run_id}`) |
177
+ | `HEARTBEAT_INTERVAL` | `30` | Heartbeat log interval in seconds |
178
+ | `HEARTBEAT_STALE_THRESHOLD` | `600` | Max seconds without heartbeat before marking stale |
179
+ | `LOG_CLEANUP_ENABLED` | `1` | Run periodic log cleanup (`0` to disable) |
180
+ | `LOG_RETENTION_DAYS` | `14` | Delete logs older than N days |
181
+ | `LOG_MAX_TOTAL_MB` | `1024` | Keep total logs under N MB via oldest-first cleanup |
182
+
174
183
  ⚠️ STOP HERE and wait for user response before continuing to step 7.
175
184
 
176
185
  7. **Show final command**: After user confirms configuration in step 6, assemble the complete command from execution mode + user-confirmed configuration, and present it to the user.
@@ -324,8 +333,7 @@ SESSION_TIMEOUT=3600 STRICT_BEHAVIOR_CHECK=1 dev-pipeline/retry-refactor.sh R-00
324
333
  ```
325
334
 
326
335
  Notes:
327
- - `retry-refactor.sh` runs exactly one refactor session and exits.
328
- - `reset-refactor.sh --clean --run` clears the refactor state before retrying (fresh start).
336
+ - `retry-refactor.sh` runs exactly one refactor session and exits. It **preserves prior session artifacts and checkpoint state** — reads `retry_count` and `resume_from_phase` from `status.json` so the AI session can resume from where it left off. For a full clean retry, use `dev-pipeline/reset-refactor.sh <R-XXX> --clean --run`.
329
337
  - Keep pipeline daemon mode for main run management (`launch-refactor-daemon.sh`).
330
338
 
331
339
  ---
@@ -35,13 +35,13 @@ The user chose this skill intentionally. Respect that choice.
35
35
 
36
36
  **Your ONLY writable outputs are:**
37
37
  1. `.prizmkit/plans/refactor-list.json` (`.prizmkit/plans/`)
38
- 2. Draft backups in `.prizmkit/planning/`
38
+ 2. Draft backups in `.prizmkit/plans/` (e.g., `refactor-list.draft.json`)
39
39
 
40
40
  **After planning is complete**, you MUST:
41
41
  1. Present the summary and recommended next step
42
42
  2. **Ask the user explicitly** whether they want to proceed to execution
43
- 3. If the user agrees -> recommend invoking `refactor-pipeline-launcher` or running `run-refactor.sh` (do NOT execute it yourself)
44
- 4. If the user wants to adjust -> continue refining `.prizmkit/plans/refactor-list.json`
43
+ 3. If the user agrees recommend invoking `refactor-pipeline-launcher` (do NOT execute it yourself)
44
+ 4. If the user wants to adjust continue refining `.prizmkit/plans/refactor-list.json`
45
45
  5. **NEVER auto-execute** the pipeline, launcher, or any implementation step
46
46
 
47
47
  ## When to Use
@@ -240,12 +240,19 @@ Continue until all items are confirmed or skipped.
240
240
 
241
241
  ### Phase 6: Completeness Review
242
242
 
243
- **Goal**: Check the full item set for consistency and gaps.
243
+ **Goal**: Check the full item set for consistency, gaps, and headless execution readiness.
244
244
 
245
245
  1. **Dependency ordering check**: Verify items form a valid DAG (no cycles). Items should be ordered: safe renames -> extract/inline -> structural changes -> migrations
246
246
  2. **Behavior preservation check**: Every item must have a declared preservation strategy. Flag any item with `manual` strategy and no test coverage.
247
247
  3. **Gap detection**: Are there intermediate steps needed between items? Does item A's output match item B's input assumption?
248
248
  4. **Cross-module impact**: Do any items affect modules outside the declared scope?
249
+ 5. **Headless Execution Readiness**: The refactor pipeline runs each item through an autonomous AI session with NO human interaction. For each item, verify:
250
+ - **Scope clarity**: Are all affected files explicitly listed? The AI must know exactly where to look.
251
+ - **Refactoring instructions**: Is the description specific enough to execute without ambiguity?
252
+ - ❌ "Clean up the utils module" — what exactly should change?
253
+ - ✅ "Extract validation functions (validateEmail, validatePhone, validateUrl) from src/utils/helpers.ts into src/utils/validation.ts. Update all 12 import sites. Preserve existing function signatures."
254
+ - **Behavior preservation**: Is it clear what tests to run and what behavior must be preserved?
255
+ - **Dependency context**: If item depends on earlier refactors, does the description reference what changed?
249
256
 
250
257
  Present review summary:
251
258
  ```
@@ -286,7 +293,7 @@ If issues found, discuss with user and resolve before proceeding.
286
293
  | **CP-RP-5** | Completeness OK | DAG valid, preservation strategies declared, no gaps | 6 |
287
294
  | **CP-RP-6** | Output Valid | `.prizmkit/plans/refactor-list.json` passes validation script | 7 |
288
295
 
289
- **Resume Detection**: If existing artifacts found (partial `.prizmkit/plans/refactor-list.json`, draft in `.prizmkit/planning/`), offer to resume from the appropriate checkpoint.
296
+ **Resume Detection**: If existing artifacts found (partial `.prizmkit/plans/refactor-list.json`, draft `refactor-list.draft.json` in `.prizmkit/plans/`), offer to resume from the appropriate checkpoint.
290
297
 
291
298
  ## Output Rules
292
299
 
@@ -295,7 +302,7 @@ If issues found, discuss with user and resolve before proceeding.
295
302
  - Non-empty `refactors` array
296
303
  - Sequential IDs: `R-001`, `R-002`, ...
297
304
  - Valid dependency DAG (no cycles)
298
- - Each item has a declared `behavior_preservation` strategy: `test-gate`, `snapshot`, or `manual`
305
+ - Each item has a declared `behavior_preservation` object with `strategy` field: `"test-gate"`, `"snapshot"`, or `"manual"`. Optional fields: `existing_tests` (boolean), `new_tests_needed` (string array). See `dev-pipeline/templates/refactor-list-schema.json` for the full schema.
299
306
  - `priority` must be a string: `"critical"`, `"high"`, `"medium"`, or `"low"`
300
307
  - New items default `status: "pending"`
301
308
  - English titles for stable slug generation
@@ -304,27 +311,16 @@ If issues found, discuss with user and resolve before proceeding.
304
311
  - `model` field is optional — omitting it means the pipeline uses $MODEL env or CLI default
305
312
  - `scope` object with nested structure: `files` array (target file paths) and `modules` array (module names)
306
313
 
307
- ## Adversarial Critic Review
314
+ ## Adversarial Critic Defaults
308
315
 
309
- All refactoring items support optional critic review for additional quality assurance. The critic mechanism helps validate that refactoring preserves behavior while improving code quality.
316
+ Set default critic fields for each refactor item. The user can override per-item.
310
317
 
311
- ### Default Critic Behavior
312
-
313
- | Priority | Complexity | `critic` | `critic_count` | Rationale |
314
- |----------|-----------|----------|----------------|-----------|
315
- | critical | high | `true` | `3` | Multi-critic voting for high-risk refactors |
316
- | critical | medium/low | `true` | `1` | Single critic for critical-priority refactors |
317
- | high | high | `true` | `1` | Single critic for high-complexity refactors |
318
- | high | medium/low | `false` | (omitted) | Skip critic for simpler high-priority items |
319
- | medium | any | `false` | (omitted) | Skip critic for medium-priority refactors |
320
- | low | any | `false` | (omitted) | Skip critic for low-priority refactors |
321
-
322
- - `critic: true` — Enable adversarial review after refactoring completion
323
- - `critic_count: 1` — Single critic agent reviews the refactor
324
- - `critic_count: 3` — Three critic agents vote on the refactor quality
325
- - Critic verifies: behavior preservation strategy followed, code quality improved, no regressions, tests passing
326
-
327
- **User Override**: During planning phases, users can opt to enable/disable critic on a per-item basis.
318
+ | Priority | Complexity | `critic` | `critic_count` |
319
+ |----------|-----------|----------|----------------|
320
+ | critical | high | `true` | `3` |
321
+ | critical | medium/low | `true` | `1` |
322
+ | high | high | `true` | `1` |
323
+ | other combinations | any | `false` | (omitted) |
328
324
 
329
325
  ---
330
326
 
@@ -423,21 +419,7 @@ Take the highest of these individual assessments as the item's complexity.
423
419
 
424
420
  ## Next-Step Execution Policy (after planning)
425
421
 
426
- Recommend these three options in this strict order:
427
-
428
- 1. **Preferred**: invoke `refactor-pipeline-launcher` skill (natural-language handoff)
429
- 2. **Fallback A**: run daemon wrapper
430
- ```bash
431
- ./dev-pipeline/launch-refactor-daemon.sh start .prizmkit/plans/refactor-list.json
432
- ./dev-pipeline/launch-refactor-daemon.sh status
433
- ```
434
- 3. **Fallback B**: run direct foreground script
435
- ```bash
436
- ./dev-pipeline/run-refactor.sh run
437
- ./dev-pipeline/run-refactor.sh status
438
- ```
439
-
440
- When launcher is available, do not prioritize raw scripts.
422
+ Recommend invoking `refactor-pipeline-launcher` to configure and launch the dev-pipeline. Do NOT recommend running shell scripts directly — that is the launcher's responsibility.
441
423
 
442
424
  ## Error Recovery & Resume
443
425
 
@@ -452,7 +434,7 @@ Key behaviors:
452
434
  | Artifact Found | Resume From |
453
435
  |---------------|------------|
454
436
  | Nothing | Phase 1: Project Context |
455
- | Draft in `.prizmkit/planning/` | Phase matching draft state |
437
+ | Draft in `.prizmkit/plans/` | Phase matching draft state |
456
438
  | Partial `.prizmkit/plans/refactor-list.json` | Phase 6: Completeness Review |
457
439
  | Valid `.prizmkit/plans/refactor-list.json` | Mode D: Summary |
458
440
 
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: "refactor-workflow"
3
- tier: companion
4
- description: "One-stop entry point for code refactoring. Brainstorms refactoring goals with the user until fully clarified, then orchestrates refactor-planner → refactor-pipeline-launcher → execution. Handles multi-refactor batch development from a single request. Use this skill whenever the user wants to restructure, clean up, or optimize code without changing behavior. Trigger on: 'refactor', 'clean up code', 'restructure', 'optimize code structure', 'extract module', 'code refactoring', 'batch refactor'. (project)"
3
+ description: "One-stop entry point for code refactoring. Brainstorms refactoring goals with the user until fully clarified, then orchestrates refactor-planner → refactor-pipeline-launcher → execution. Handles multi-refactor batch development from a single request. Use this skill whenever the user wants to restructure, clean up, or optimize code without changing behavior. Trigger on: 'refactor', 'clean up code', 'restructure', 'optimize code structure', 'extract module', 'code refactoring', 'batch refactor'."
5
4
  ---
6
5
 
7
6
  # Refactor Workflow
@@ -20,7 +20,7 @@
20
20
  "name": "reviewer",
21
21
  "role": "reviewer",
22
22
  "agentDefinition": "prizm-dev-team-reviewer",
23
- "prompt": "You are the Reviewer Agent of the prizm-dev-team. In Phase 4: run /prizmkit-analyze for cross-document consistency. In Phase 6: run /prizmkit-code-review for diagnosis + fix strategy formulation, write and execute integration tests. Produce structured Fix Instructions (Root Cause, Impact, Fix Strategy, Code Guidance, Verification) so Dev can follow them precisely. Write Fix Instructions to context-snapshot.md '## Review Notes' section.",
23
+ "prompt": "You are the Reviewer Agent of the prizm-dev-team. Run /prizmkit-code-review for diagnosis + fix strategy formulation, write and execute integration tests. Produce structured Fix Instructions (Root Cause, Impact, Fix Strategy, Code Guidance, Verification) so Dev can follow them precisely. review-report.md is written to the artifact directory by /prizmkit-code-review.",
24
24
  "subscriptions": ["*"]
25
25
  },
26
26
  {
@@ -37,6 +37,6 @@ Not every change needs the full spec -> plan workflow. Use fast path for:
37
37
  - Documentation-only changes, test additions for existing code
38
38
  - Fast path: `/prizmkit-plan` (simplified) → `/prizmkit-implement` → `/prizmkit-committer`
39
39
 
40
- Use the full workflow (/prizmkit-plan -> /prizmkit-analyze -> /prizmkit-implement) for:
40
+ Use the full workflow (/prizmkit-plan -> /prizmkit-implement) for:
41
41
  - New features, multi-file coordinated changes, architectural decisions, data model or API changes
42
42
  <!-- PRIZMKIT:END -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "description": "Create a new PrizmKit-powered project with clean initialization — no framework dev files, just what you need.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/clean.js CHANGED
@@ -122,7 +122,6 @@ export async function runClean(directory, options = {}) {
122
122
  path.join('.prizmkit', 'plans', 'feature-list.json'), // feature-planner output
123
123
  path.join('.prizmkit', 'plans', 'bug-fix-list.json'), // bug-planner output
124
124
  path.join('.prizmkit', 'plans', 'project-brief.md'), // feature-planner project brief
125
- path.join('.prizmkit', 'project-conventions.json'), // feature-planner coding conventions
126
125
  path.join('.codebuddy', 'settings.json'),
127
126
  path.join('.claude', 'settings.json'),
128
127
  path.join('.claude', 'team-info.json'),
@@ -25,7 +25,6 @@ export function generateGitignore(options = {}) {
25
25
  '',
26
26
  '# 规划产物(按需决定是否提交)',
27
27
  '# .prizmkit/plans/',
28
- '# project-conventions.json',
29
28
  '',
30
29
  ];
31
30
 
package/src/scaffold.js CHANGED
@@ -537,11 +537,9 @@ export async function installProjectMemory(platform, projectRoot, dryRun) {
537
537
  const targetName = platform === 'claude' ? 'CLAUDE.md' : 'CODEBUDDY.md';
538
538
  const targetPath = path.join(projectRoot, targetName);
539
539
 
540
- // Prefer core/templates, fallback to prizm-kit/assets in hierarchical or flat skills layouts.
540
+ // Template lives in core/templates/ (bundled as templates/).
541
541
  const templateCandidates = [
542
542
  path.join(templatesDir, templateName),
543
- path.join(skillsDir, 'prizmkit-skill', 'prizm-kit', 'assets', templateName),
544
- path.join(skillsDir, 'prizm-kit', 'assets', templateName),
545
543
  ];
546
544
  const templatePath = templateCandidates.find(candidate => fs.pathExistsSync(candidate));
547
545
 
@@ -690,6 +688,15 @@ export async function installPipeline(projectRoot, dryRun, { forceOverwrite = fa
690
688
  }
691
689
 
692
690
  console.log(chalk.green(` ✓ dev-pipeline/ (${installedCount} 项)`));
691
+
692
+ // Copy .env.example to project root if it exists in pipeline source
693
+ const envExampleSrc = path.join(pipelineSource, '.env.example');
694
+ const envExampleTgt = path.join(projectRoot, '.env.example');
695
+ if (await fs.pathExists(envExampleSrc) && !await fs.pathExists(envExampleTgt)) {
696
+ await fs.copy(envExampleSrc, envExampleTgt);
697
+ console.log(chalk.green(` ✓ .env.example (pipeline environment configuration)`));
698
+ }
699
+
693
700
  return installedFiles;
694
701
  }
695
702
 
@@ -1,5 +0,0 @@
1
- "Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
2
- 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has project context, Section 4 has file manifest.
3
- 2. Run prizmkit-analyze: cross-check `spec.md` and `plan.md` (including Tasks section) for consistency.
4
- 3. Before flagging CRITICAL or HIGH issues, read the relevant source files listed in the File Manifest to verify.
5
- Report: CRITICAL, HIGH, MEDIUM issues found (or 'No issues found')."
@@ -1,19 +0,0 @@
1
- ### Analyze — Reviewer Subagent
2
-
3
- **Spawn Agent**:
4
- | Parameter | Value |
5
- |-----------|-------|
6
- | subagent_type | prizm-dev-team-reviewer |
7
- | mode | plan |
8
- | run_in_background | false |
9
-
10
- **Prompt**:
11
- > {{AGENT_PROMPT_REVIEWER_ANALYZE}}
12
-
13
- Wait for Reviewer to return.
14
- - If CRITICAL issues found: fix them yourself — read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full project context. Fix ONLY the listed CRITICAL issues in plan.md. Then re-run analyze (max 1 round).
15
-
16
- **CP-2**: No CRITICAL issues.
17
-
18
-
19
- **Checkpoint update**: Update `workflow-checkpoint.json` — set step `prizmkit-analyze` to `"completed"`.
@@ -1,19 +0,0 @@
1
- ### Analyze — Reviewer Agent
2
-
3
- **Spawn Agent**:
4
- | Parameter | Value |
5
- |-----------|-------|
6
- | subagent_type | prizm-dev-team-reviewer |
7
- | mode | plan |
8
- | run_in_background | false |
9
-
10
- **Prompt**:
11
- > {{AGENT_PROMPT_REVIEWER_ANALYZE}}
12
-
13
- Wait for Reviewer to return.
14
- - If CRITICAL issues found: fix them yourself — read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full project context. Fix ONLY the listed CRITICAL issues in spec.md/plan.md. Then re-run analyze (max 1 round).
15
-
16
- **CP-2**: No CRITICAL issues.
17
-
18
-
19
- **Checkpoint update**: Update `workflow-checkpoint.json` — set step `prizmkit-analyze` to `"completed"`.