prizmkit 1.0.3 → 1.0.5

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 (28) hide show
  1. package/bin/create-prizmkit.js +7 -1
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/adapters/claude/agent-adapter.js +1 -10
  4. package/bundled/adapters/claude/command-adapter.js +5 -1
  5. package/bundled/adapters/claude/paths.js +1 -2
  6. package/bundled/adapters/shared/constants.js +13 -0
  7. package/bundled/adapters/shared/frontmatter.js +3 -0
  8. package/bundled/dev-pipeline/launch-daemon.sh +22 -23
  9. package/bundled/dev-pipeline/run.sh +16 -13
  10. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +2 -15
  11. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +3 -17
  12. package/bundled/dev-pipeline/scripts/init-dev-team.py +11 -11
  13. package/bundled/dev-pipeline/scripts/update-bug-status.py +8 -67
  14. package/bundled/dev-pipeline/scripts/update-feature-status.py +8 -83
  15. package/bundled/dev-pipeline/scripts/utils.py +85 -0
  16. package/bundled/skills/_metadata.json +19 -3
  17. package/bundled/skills/feature-workflow/SKILL.md +317 -0
  18. package/bundled/skills/prizm-kit/SKILL.md +5 -3
  19. package/bundled/skills/prizm-kit/assets/hooks/prizm-commit-hook.json +2 -2
  20. package/bundled/skills/prizmkit-bug-fix-workflow/SKILL.md +1 -1
  21. package/bundled/skills/prizmkit-committer/SKILL.md +21 -3
  22. package/bundled/skills/prizmkit-prizm-docs/assets/PRIZM-SPEC.md +1 -1
  23. package/bundled/skills/refactor-workflow/SKILL.md +340 -0
  24. package/bundled/templates/hooks/commit-intent-claude.json +16 -0
  25. package/bundled/templates/hooks/commit-intent-codebuddy.json +16 -0
  26. package/package.json +2 -3
  27. package/src/detect-platform.js +10 -2
  28. package/src/scaffold.js +38 -70
@@ -0,0 +1,85 @@
1
+ #!/usr/bin/env python3
2
+ """Shared utility functions for dev-pipeline scripts.
3
+
4
+ Centralizes common operations (JSON I/O, error reporting, display helpers)
5
+ to avoid duplication across pipeline scripts.
6
+ """
7
+
8
+ import json
9
+ import os
10
+ import sys
11
+
12
+
13
+ def load_json_file(path):
14
+ """Load and return parsed JSON from a file.
15
+
16
+ Returns (data, error_string). On success error_string is None.
17
+ """
18
+ abs_path = os.path.abspath(path)
19
+ if not os.path.isfile(abs_path):
20
+ return None, "File not found: {}".format(abs_path)
21
+ try:
22
+ with open(abs_path, "r", encoding="utf-8") as f:
23
+ data = json.load(f)
24
+ except json.JSONDecodeError as e:
25
+ return None, "Invalid JSON: {}".format(str(e))
26
+ except IOError as e:
27
+ return None, "Cannot read file: {}".format(str(e))
28
+ return data, None
29
+
30
+
31
+ def write_json_file(path, data):
32
+ """Write data as JSON to a file. Creates parent directories if needed.
33
+
34
+ Returns an error string on failure, None on success.
35
+ """
36
+ abs_path = os.path.abspath(path)
37
+ parent = os.path.dirname(abs_path)
38
+ if parent and not os.path.isdir(parent):
39
+ try:
40
+ os.makedirs(parent, exist_ok=True)
41
+ except OSError as e:
42
+ return "Cannot create directory: {}".format(str(e))
43
+ try:
44
+ with open(abs_path, "w", encoding="utf-8") as f:
45
+ json.dump(data, f, indent=2, ensure_ascii=False)
46
+ f.write("\n")
47
+ except IOError as e:
48
+ return "Cannot write file: {}".format(str(e))
49
+ return None
50
+
51
+
52
+ def error_out(message, code=1):
53
+ """Print an error JSON and exit with the given code."""
54
+ output = {"error": message}
55
+ print(json.dumps(output, indent=2, ensure_ascii=False))
56
+ sys.exit(code)
57
+
58
+
59
+ def pad_right(text, width):
60
+ """Pad text with spaces to fill width, accounting for ANSI escape codes."""
61
+ i = 0
62
+ visible_len = 0
63
+ while i < len(text):
64
+ if text[i] == "\033":
65
+ while i < len(text) and text[i] != "m":
66
+ i += 1
67
+ i += 1
68
+ else:
69
+ visible_len += 1
70
+ i += 1
71
+ padding = width - visible_len
72
+ if padding > 0:
73
+ return text + " " * padding
74
+ return text
75
+
76
+
77
+ def _build_progress_bar(percent, width=20):
78
+ """Build a text progress bar.
79
+
80
+ Example: ████████░░░░░░░░░░░░ 40%
81
+ """
82
+ filled = int(width * percent / 100)
83
+ empty = width - filled
84
+ bar = "\u2588" * filled + "\u2591" * empty
85
+ return "{} {:>3}%".format(bar, int(percent))
@@ -197,6 +197,20 @@
197
197
  "hasAssets": false,
198
198
  "hasScripts": false
199
199
  },
200
+ "feature-workflow": {
201
+ "description": "End-to-end feature workflow: specify → plan → tasks → analyze → implement → review → commit.",
202
+ "tier": "1",
203
+ "category": "pipeline",
204
+ "hasAssets": false,
205
+ "hasScripts": false
206
+ },
207
+ "refactor-workflow": {
208
+ "description": "End-to-end refactor workflow: analyze → plan → tasks → implement → review → commit. Behavior-preserving.",
209
+ "tier": "1",
210
+ "category": "pipeline",
211
+ "hasAssets": false,
212
+ "hasScripts": false
213
+ },
200
214
  "bug-planner": {
201
215
  "description": "Interactive bug planning that produces bug-fix-list.json. Supports stack traces, user reports, failed tests, log patterns, monitoring alerts.",
202
216
  "tier": "companion",
@@ -228,11 +242,11 @@
228
242
  },
229
243
  "suites": {
230
244
  "full": {
231
- "description": "All 32 skills",
245
+ "description": "All 34 skills",
232
246
  "skills": "*"
233
247
  },
234
248
  "core": {
235
- "description": "Core Tier 1 skills (15 skills)",
249
+ "description": "Core Tier 1 skills (17 skills)",
236
250
  "skills": [
237
251
  "prizm-kit",
238
252
  "prizmkit-init",
@@ -248,7 +262,9 @@
248
262
  "prizmkit-retrospective",
249
263
  "prizmkit-prizm-docs",
250
264
  "prizmkit-tech-debt-tracker",
251
- "prizmkit-bug-fix-workflow"
265
+ "prizmkit-bug-fix-workflow",
266
+ "feature-workflow",
267
+ "refactor-workflow"
252
268
  ]
253
269
  },
254
270
  "minimal": {
@@ -0,0 +1,317 @@
1
+ ---
2
+ name: "feature-workflow"
3
+ tier: 1
4
+ description: "[Tier 1] End-to-end feature workflow: specify → plan → tasks → analyze → implement → review → commit. 7-phase pipeline with resume support and fast path for simple changes. (project)"
5
+ ---
6
+
7
+ # PrizmKit Feature Workflow
8
+
9
+ End-to-end orchestration skill for new features. Chains existing PrizmKit skills (specify, plan, tasks, analyze, implement, code-review, committer, summarize) into a 7-phase pipeline with standardized artifacts and resume support.
10
+
11
+ ## Overview
12
+
13
+ ```
14
+ prizmkit.feature <需求描述>
15
+ → Phase 1: Specify → spec.md
16
+ → Phase 2: Plan → plan.md
17
+ → Phase 3: Tasks → tasks.md
18
+ → Phase 4: Analyze → (consistency report)
19
+ → Phase 5: Implement → (code)
20
+ → Phase 6: Review → (review report)
21
+ → Phase 7: Commit → git commit + REGISTRY
22
+ ```
23
+
24
+ ### Pipeline Phases
25
+
26
+ | Phase | Name | Skill Used | Artifact |
27
+ |-------|------|-----------|----------|
28
+ | 1 | Specify 需求规格 | `prizmkit.specify` | → `spec.md` |
29
+ | 2 | Plan 技术方案 | `prizmkit.plan` | → `plan.md` |
30
+ | 3 | Tasks 任务拆解 | `prizmkit.tasks` | → `tasks.md` |
31
+ | 4 | Analyze 一致性检查 | `prizmkit.analyze` | (quality report) |
32
+ | 5 | Implement 实现 | `prizmkit.implement` | (code changes) |
33
+ | 6 | Code Review | `prizmkit.code-review` | (review report) |
34
+ | 7 | Commit & Archive | `prizmkit.committer` + `prizmkit.summarize` | git commit + REGISTRY |
35
+
36
+ ### Artifacts
37
+
38
+ Standard feature artifacts stored at `.prizmkit/specs/<feature-slug>/`:
39
+ - **`spec.md`** — Feature specification (Phase 1)
40
+ - **`plan.md`** — Technical implementation plan (Phase 2)
41
+ - **`tasks.md`** — Executable task breakdown (Phase 3)
42
+
43
+ ## Commands
44
+
45
+ ### prizmkit.feature \<需求描述\>
46
+
47
+ Execute the full feature pipeline from natural language description to committed code.
48
+
49
+ **INPUT**: Natural language feature description. Can be:
50
+ - A brief one-liner (e.g., "添加用户头像上传功能")
51
+ - A detailed requirement paragraph
52
+ - A reference to an existing spec file
53
+
54
+ ---
55
+
56
+ ## Phase 1: Specify — 需求规格
57
+
58
+ **Goal**: Transform natural language into structured feature specification.
59
+
60
+ **STEPS:**
61
+
62
+ 1. **Parse feature description**: Extract:
63
+ - Core functionality requested
64
+ - User-facing behavior expectations
65
+ - Implicit constraints and edge cases
66
+ - Affected modules (from `.prizm-docs/`)
67
+
68
+ 2. **Invoke `prizmkit.specify`** with the feature description:
69
+ - Receive structured `spec.md` with user stories, acceptance criteria, scope
70
+ - Artifact path: `.prizmkit/specs/<feature-slug>/spec.md`
71
+
72
+ 3. **Validate spec completeness**:
73
+ - All acceptance criteria are testable
74
+ - Scope boundaries are clear
75
+ - No ambiguous requirements remain
76
+
77
+ **CHECKPOINT CP-FW-1**: `spec.md` exists and is well-formed.
78
+
79
+ ---
80
+
81
+ ## Phase 2: Plan — 技术方案
82
+
83
+ **Goal**: Generate technical implementation plan from the specification.
84
+
85
+ **STEPS:**
86
+
87
+ 1. **Read context**: spec.md, `.prizm-docs/` (PATTERNS, RULES, TRAPS)
88
+
89
+ 2. **Invoke `prizmkit.plan`** with spec.md:
90
+ - Receive `plan.md` with architecture decisions, file changes, dependencies
91
+ - Artifact path: `.prizmkit/specs/<feature-slug>/plan.md`
92
+
93
+ 3. **Verify plan alignment**:
94
+ - Plan addresses all spec acceptance criteria
95
+ - No out-of-scope changes
96
+ - Dependencies are identified
97
+
98
+ **CHECKPOINT CP-FW-2**: `plan.md` exists and aligns with spec.md.
99
+
100
+ ---
101
+
102
+ ## Phase 3: Tasks — 任务拆解
103
+
104
+ **Goal**: Break implementation plan into executable, ordered tasks.
105
+
106
+ **STEPS:**
107
+
108
+ 1. **Invoke `prizmkit.tasks`** with plan.md:
109
+ - Receive `tasks.md` with ordered task list, dependencies, estimated scope
110
+ - Artifact path: `.prizmkit/specs/<feature-slug>/tasks.md`
111
+
112
+ 2. **Verify task coverage**:
113
+ - Every plan item maps to at least one task
114
+ - Tasks include test tasks (not just implementation)
115
+ - Task order respects dependencies
116
+
117
+ **CHECKPOINT CP-FW-3**: `tasks.md` exists with complete task coverage.
118
+
119
+ ---
120
+
121
+ ## Phase 4: Analyze — 一致性检查
122
+
123
+ **Goal**: Cross-document consistency analysis before implementation begins.
124
+
125
+ **STEPS:**
126
+
127
+ 1. **Invoke `prizmkit.analyze`** with spec.md, plan.md, tasks.md:
128
+ - Check spec ↔ plan alignment
129
+ - Check plan ↔ tasks coverage
130
+ - Check for contradictions or gaps
131
+ - Verify naming consistency
132
+
133
+ 2. **Handle analysis results**:
134
+ - **PASS**: Proceed to Phase 5
135
+ - **WARNINGS**: Log warnings, proceed to Phase 5
136
+ - **ERRORS**: Return to the earliest affected phase to fix inconsistencies
137
+
138
+ **CHECKPOINT CP-FW-4**: Analysis passes (no blocking errors).
139
+
140
+ ---
141
+
142
+ ## Phase 5: Implement — 实现
143
+
144
+ **Goal**: Execute tasks.md with TDD approach.
145
+
146
+ **STEPS:**
147
+
148
+ 1. **Invoke `prizmkit.implement`**:
149
+ - Follow tasks.md order
150
+ - TDD: write tests first, then implementation
151
+ - Run tests after each task completion
152
+
153
+ 2. **Progress tracking**:
154
+ - Mark tasks complete in tasks.md as they finish
155
+ - If a task fails after 3 attempts → escalate to user
156
+
157
+ 3. **Local verification**:
158
+ - All new tests pass
159
+ - All existing tests pass (no regression)
160
+
161
+ **CHECKPOINT CP-FW-5**: All tasks complete, all tests green.
162
+
163
+ ---
164
+
165
+ ## Phase 6: Code Review — 代码审查
166
+
167
+ **Goal**: Ensure implementation quality and spec compliance.
168
+
169
+ **STEPS:**
170
+
171
+ 1. **Invoke `prizmkit.code-review`** (scoped to changed files):
172
+ - Review dimensions:
173
+ - **Spec compliance**: Does implementation match all acceptance criteria?
174
+ - **Plan adherence**: Does code follow the technical plan?
175
+ - **Code quality**: Clean, maintainable, follows project conventions?
176
+ - **Test coverage**: Are all acceptance criteria tested?
177
+ - Verdict: PASS / PASS_WITH_WARNINGS / NEEDS_FIXES
178
+
179
+ 2. **Handle review results**:
180
+ - **PASS / PASS_WITH_WARNINGS**: Proceed to Phase 7
181
+ - **NEEDS_FIXES**: Return to Phase 5 (max 2 review rounds)
182
+
183
+ **CHECKPOINT CP-FW-6**: Code review passes.
184
+
185
+ ---
186
+
187
+ ## Phase 7: Commit & Archive — 提交与归档
188
+
189
+ **Goal**: Commit with proper conventions, archive to REGISTRY.
190
+
191
+ **STEPS:**
192
+
193
+ 1. **Invoke `prizmkit.committer`**:
194
+ - Commit message: `feat(<scope>): <description>`
195
+ - Include all implementation code + tests
196
+ - Do NOT push
197
+
198
+ 2. **Invoke `prizmkit.summarize`**:
199
+ - Archive feature to REGISTRY.md
200
+ - Include: feature slug, description, files changed, date
201
+
202
+ 3. **Update `.prizm-docs/`** if needed:
203
+ - New PATTERNS discovered during implementation
204
+ - New TRAPS encountered
205
+ - Updated module documentation
206
+
207
+ **CHECKPOINT CP-FW-7**: Commit recorded, REGISTRY updated.
208
+
209
+ ---
210
+
211
+ ## Fast Path — 快速路径
212
+
213
+ For simple features (single file, <50 lines, no cross-module impact):
214
+
215
+ ```
216
+ Phase 2 (Plan) → Phase 3 (Tasks) → Phase 5 (Implement) → Phase 6 (Review) → Phase 7 (Commit)
217
+ ```
218
+
219
+ Skip Phase 1 (Specify) and Phase 4 (Analyze).
220
+
221
+ **CRITERIA** (ALL must be true):
222
+ - Single file change or tightly scoped to one module
223
+ - Estimated change < 50 lines
224
+ - No cross-module dependencies or side effects
225
+ - No new user-facing API surface
226
+ - Clear and unambiguous requirement
227
+
228
+ **Fast Path still requires:**
229
+ - plan.md and tasks.md (lightweight versions)
230
+ - Code review
231
+ - `feat(<scope>):` commit convention
232
+ - REGISTRY update via summarize
233
+
234
+ ---
235
+
236
+ ## Resume — 中断恢复
237
+
238
+ The pipeline supports resuming from the last completed phase by detecting existing artifacts.
239
+
240
+ **Detection logic**: Check `.prizmkit/specs/<slug>/` for:
241
+
242
+ | Artifact Found | Resume From |
243
+ |---------------|------------|
244
+ | (nothing) | Phase 1: Specify |
245
+ | `spec.md` only | Phase 2: Plan |
246
+ | `spec.md` + `plan.md` | Phase 3: Tasks |
247
+ | `spec.md` + `plan.md` + `tasks.md` | Phase 4: Analyze |
248
+ | All 3 docs + analysis passed | Phase 5: Implement |
249
+ | All 3 docs + code changes exist | Phase 6: Review |
250
+ | All 3 docs + review passed | Phase 7: Commit |
251
+
252
+ **Resume command**: `prizmkit.feature <slug>` — if `<slug>` matches an existing `.prizmkit/specs/<slug>/` directory, resume instead of starting fresh.
253
+
254
+ ---
255
+
256
+ ## Error Handling
257
+
258
+ | Scenario | Action |
259
+ |----------|--------|
260
+ | Cannot parse feature description | Ask user for clarification |
261
+ | Spec has ambiguous requirements | Invoke `prizmkit.clarify` before proceeding |
262
+ | Plan-spec misalignment detected | Return to Phase 2 with feedback |
263
+ | Analyze finds blocking errors | Return to earliest affected phase |
264
+ | Implementation fails after 3 rounds | Escalate to user with analysis |
265
+ | Review fails after 2 rounds | Escalate with review findings |
266
+ | Full test suite has pre-existing failures | Warn user, isolate feature tests |
267
+ | Feature requires breaking changes | STOP, recommend ADR via `prizmkit.adr-manager` |
268
+
269
+ ---
270
+
271
+ ## Relationship to Other Skills
272
+
273
+ | Skill | Role in Feature Workflow |
274
+ |-------|------------------------|
275
+ | `prizmkit-specify` | Phase 1: structured spec generation |
276
+ | `prizmkit-clarify` | Phase 1 fallback: resolve ambiguities |
277
+ | `prizmkit-plan` | Phase 2: technical implementation plan |
278
+ | `prizmkit-tasks` | Phase 3: task breakdown |
279
+ | `prizmkit-analyze` | Phase 4: cross-document consistency |
280
+ | `prizmkit-implement` | Phase 5: TDD implementation |
281
+ | `prizmkit-code-review` | Phase 6: review and quality gate |
282
+ | `prizmkit-committer` | Phase 7: commit with `feat()` convention |
283
+ | `prizmkit-summarize` | Phase 7: archive to REGISTRY |
284
+ | `prizmkit-retrospective` | Optional: post-feature lessons learned |
285
+ | `prizmkit-bug-fix-workflow` | NOT used (separate pipeline for bugs) |
286
+ | `app-planner` | Pre-pipeline: interactive feature planning |
287
+
288
+ ---
289
+
290
+ ## Comparison with Bug Fix Pipeline
291
+
292
+ | Dimension | Feature Workflow | Bug Fix Pipeline |
293
+ |-----------|-----------------|-----------------|
294
+ | Input | Natural language requirement | Bug description / stack trace |
295
+ | Pipeline Phases | 7 (Fast Path: 5) | 5 (Fast Path: 3) |
296
+ | Artifact Docs | 3: spec.md + plan.md + tasks.md | 2: fix-plan.md + fix-report.md |
297
+ | Artifact Path | `.prizmkit/specs/<feature-slug>/` | `.prizmkit/bugfix/<bug-id>/` |
298
+ | Skills Chain | specify → plan → tasks → analyze → implement → review → commit + summarize | error-triage → bug-reproduce → implement → code-review → commit |
299
+ | Commit Prefix | `feat(<scope>):` | `fix(<scope>):` |
300
+ | REGISTRY Update | ✅ via summarize | ❌ not applicable |
301
+ | Resume Support | ✅ artifact-based detection | ❌ |
302
+
303
+ ## Path References
304
+
305
+ All internal asset paths MUST use `${SKILL_DIR}` placeholder for cross-IDE compatibility.
306
+
307
+ ## Output
308
+
309
+ - `spec.md` (Phase 1 artifact)
310
+ - `plan.md` (Phase 2 artifact)
311
+ - `tasks.md` (Phase 3 artifact)
312
+ - Consistency analysis report (Phase 4, conversation only)
313
+ - Implementation code + tests (Phase 5)
314
+ - Code review report (Phase 6, conversation only)
315
+ - Git commit with `feat(<scope>):` prefix (Phase 7)
316
+ - REGISTRY.md entry (Phase 7)
317
+ - Updated `.prizm-docs/` (if applicable)
@@ -70,7 +70,7 @@ PrizmKit produces two complementary knowledge layers:
70
70
  .prizmkit/specs/ → Feature "what to do" (workflow: spec → plan → tasks → code)
71
71
  ```
72
72
 
73
- ## Skill Inventory (32 skills)
73
+ ## Skill Inventory (34 skills)
74
74
 
75
75
  ### Foundation (3)
76
76
  - **prizm-kit** — Full-lifecycle dev toolkit entry point
@@ -80,7 +80,7 @@ PrizmKit produces two complementary knowledge layers:
80
80
  ### Spec-Driven Workflow (10)
81
81
  - **prizmkit-specify** — Create structured feature specifications from natural language
82
82
  - **prizmkit-clarify** — Interactive requirement clarification
83
- - **prizmkit-plan** — Generate technical plan + data model + API contracts
83
+ - **prizmkit-plan** — Generate technical plan (with data model & API contracts as inline sections)
84
84
  - **prizmkit-tasks** — Break plan into executable task list
85
85
  - **prizmkit-analyze** — Cross-document consistency analysis (spec ↔ plan ↔ tasks)
86
86
  - **prizmkit-implement** — Execute tasks following TDD approach
@@ -111,8 +111,10 @@ PrizmKit produces two complementary knowledge layers:
111
111
  - **prizmkit-onboarding-generator** — [Tier 2] Generate developer onboarding guides
112
112
  - **prizmkit-api-doc-generator** — [Tier 2] Extract API documentation from source code
113
113
 
114
- ### Pipeline & Companion (5)
114
+ ### Pipeline & Companion (7)
115
115
  - **prizmkit-bug-fix-workflow** — [Tier 1] End-to-end bug fix workflow: triage → reproduce → fix → verify → commit
116
+ - **feature-workflow** — [Tier 1] End-to-end feature workflow: specify → plan → tasks → analyze → implement → review → commit
117
+ - **refactor-workflow** — [Tier 1] End-to-end refactor workflow: analyze → plan → tasks → implement → review → commit
116
118
  - **app-planner** — Interactive app planning that produces feature-list.json for dev-pipeline
117
119
  - **bug-planner** — Interactive bug planning that produces bug-fix-list.json for bugfix-pipeline
118
120
  - **dev-pipeline-launcher** — Launch and manage the dev-pipeline from within a CLI session
@@ -2,12 +2,12 @@
2
2
  "hooks": {
3
3
  "UserPromptSubmit": [
4
4
  {
5
- "matcher": "(?i)\\b(commit|push|finish|ship|merge|pull request|pr)\\b|提交|推送|收尾|完成任务|合并|发版|发布",
5
+ "matcher": "\\b(commit|Commit|push|Push|finish|Finish|ship|Ship|merge|Merge|pull request|Pull Request|pr|PR)\\b|提交|推送|收尾|完成任务|合并|发版|发布",
6
6
  "hooks": [
7
7
  {
8
8
  "type": "prompt",
9
9
  "prompt": "You are a commit-intent detector for PrizmKit. Analyze the user prompt and determine if the user intends to COMMIT, PUSH, FINISH, SHIP, MERGE, or create a PULL REQUEST.\n\nUser prompt: $ARGUMENTS\n\nIF commit intent detected, respond with:\n{\"ok\": true, \"reason\": \"PRIZMKIT_DOC_UPDATE_REQUIRED: Before committing, you MUST update .prizm-docs/ per Prizm auto-update protocol. Steps: 1) Run git diff --cached --name-status. 2) Map changed files to modules via root.prizm MODULE_INDEX. 3) Read and update affected .prizm files (only changed sections). 4) Append to changelog.prizm. 5) Stage .prizm files with git add .prizm-docs/. 6) Then proceed with commit using prizmkit-committer workflow. RULES: Never rewrite entire .prizm files. Never add prose. Only update affected sections.\"}\n\nIF no commit intent, respond with:\n{\"ok\": true}\n\nRespond with JSON only. No explanation.",
10
- "timeout": 10
10
+ "timeout": 300
11
11
  }
12
12
  ]
13
13
  }
@@ -325,7 +325,7 @@ When `affected_feature` is non-empty:
325
325
  | Input Skill | `app-planner` (7-phase interactive) | `bug-planner` (multi-format parser) |
326
326
  | Input File | `feature-list.json` (F-NNN) | `bug-fix-list.json` (B-NNN) |
327
327
  | Schema Version | `dev-pipeline-feature-list-v1` | `dev-pipeline-bug-fix-list-v1` |
328
- | Pipeline Phases | 10 Phase (0-7 + init + cleanup) | 5 Phase (Fast Path: 3) |
328
+ | Pipeline Phases | 7 Phase (Fast Path: 5) | 5 Phase (Fast Path: 3) |
329
329
  | Artifact Docs | 3: spec.md + plan.md + tasks.md | 2: fix-plan.md + fix-report.md |
330
330
  | Artifact Path | `.prizmkit/specs/<feature-slug>/` | `.prizmkit/bugfix/<bug-id>/` |
331
331
  | Prompt Template | `bootstrap-prompt.md` | `bugfix-bootstrap-prompt.md` |
@@ -87,8 +87,25 @@ python3 ${SKILL_DIR}/scripts/manage_changelog.py add --type <type> --message "<d
87
87
  ```
88
88
 
89
89
  #### Step 5: Git Commit
90
+
91
+ 5a. Safety check before staging:
92
+ ```bash
93
+ git diff --name-only
94
+ git ls-files --others --exclude-standard
95
+ ```
96
+ Review the output for sensitive files. If any file matches these patterns, **STOP and warn the user**:
97
+ - `.env`, `.env.*`
98
+ - `*.key`, `*.pem`, `*.p12`
99
+ - `credentials.*`, `*secret*`
100
+ - `*.sqlite`, `*.db` (database files)
101
+
102
+ 5b. Stage and commit:
103
+ ```bash
104
+ git add -A
105
+ git diff --cached --name-only
106
+ ```
107
+ Review staged file list one final time, then:
90
108
  ```bash
91
- git add .
92
109
  git commit -m "<type>(<scope>): <description>"
93
110
  ```
94
111
  Follow Conventional Commits format.
@@ -104,7 +121,7 @@ Then verify working tree is clean:
104
121
  git status
105
122
  ```
106
123
  - If "nothing to commit, working tree clean": commit verified successfully, proceed
107
- - If there are uncommitted changes remaining: **STOP** and report error — all changes must be captured in the commit. Run `git add . && git commit --amend --no-edit` to include missed files, then re-verify
124
+ - If there are uncommitted changes remaining: **STOP** and report error — all changes must be captured in the commit. Run `git add -A && git commit --amend --no-edit` to include missed files, then re-verify
108
125
 
109
126
  #### Step 7: Optional Push
110
127
  Ask user: "Push to remote?"
@@ -112,6 +129,7 @@ Ask user: "Push to remote?"
112
129
  - No: Stop
113
130
 
114
131
  ### Error Handling
115
- - If git diff is empty but untracked files exist: run `git add -N .` first
132
+ - If git diff is empty but untracked files exist: run `git add -N .` first (respects .gitignore)
116
133
  - If CHANGELOG.md script fails: update manually or ask user
117
134
  - If .prizm-docs/ doesn't exist: skip Step 2 entirely (project not initialized)
135
+ - If sensitive files are detected during Step 5a safety check: warn user and do NOT stage them automatically
@@ -684,7 +684,7 @@ JSON:
684
684
  {
685
685
  "type": "prompt",
686
686
  "prompt": "You are a commit-intent detector for the Prizm documentation framework. Analyze the user prompt and determine if the user intends to COMMIT, PUSH, FINISH, SHIP, MERGE, or create a PULL REQUEST.\n\nUser prompt: $ARGUMENTS\n\nIF commit intent detected, respond with:\n{\"ok\": true, \"reason\": \"PRIZM_UPDATE_REQUIRED: Before committing, you MUST update .prizm-docs/. Steps: 1) Run git diff --cached --name-status. 2) Map changed files to modules via root.prizm MODULE_INDEX. 3) Read and update affected .prizm files (only changed sections). 4) Append to changelog.prizm. 5) Stage .prizm files. 6) Then commit. RULES: Never rewrite entire files. Never add prose. Only update affected sections.\"}\n\nIF no commit intent, respond with:\n{\"ok\": true}\n\nJSON only.",
687
- "timeout": 10
687
+ "timeout": 300
688
688
  }
689
689
  ]
690
690
  }