prizmkit 1.0.45 → 1.0.66

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 (67) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/claude/agent-adapter.js +2 -1
  3. package/bundled/adapters/claude/command-adapter.js +3 -3
  4. package/bundled/agents/prizm-dev-team-dev.md +1 -1
  5. package/bundled/dev-pipeline/README.md +6 -8
  6. package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +24 -19
  7. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +2 -2
  8. package/bundled/dev-pipeline/launch-daemon.sh +2 -2
  9. package/bundled/dev-pipeline/lib/branch.sh +76 -0
  10. package/bundled/dev-pipeline/run-bugfix.sh +58 -149
  11. package/bundled/dev-pipeline/run.sh +60 -153
  12. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +17 -4
  13. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +2 -2
  14. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +16 -27
  15. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +20 -32
  16. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +32 -53
  17. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +29 -41
  18. package/bundled/dev-pipeline/templates/session-status-schema.json +1 -1
  19. package/bundled/dev-pipeline/tests/conftest.py +19 -126
  20. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +207 -0
  21. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +128 -141
  22. package/bundled/dev-pipeline/tests/test_utils.py +51 -110
  23. package/bundled/rules/prizm/prizm-commit-workflow.md +3 -3
  24. package/bundled/skills/_metadata.json +15 -16
  25. package/bundled/skills/app-planner/SKILL.md +8 -7
  26. package/bundled/skills/bug-fix-workflow/SKILL.md +171 -0
  27. package/bundled/skills/bug-planner/SKILL.md +25 -33
  28. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +156 -0
  29. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +5 -7
  30. package/bundled/skills/dev-pipeline-launcher/SKILL.md +4 -6
  31. package/bundled/skills/feature-workflow/SKILL.md +25 -42
  32. package/bundled/skills/prizm-kit/SKILL.md +61 -23
  33. package/bundled/skills/prizm-kit/assets/{claude-md-template.md → project-memory-template.md} +3 -3
  34. package/bundled/skills/prizmkit-analyze/SKILL.md +44 -33
  35. package/bundled/skills/prizmkit-clarify/SKILL.md +40 -30
  36. package/bundled/skills/prizmkit-code-review/SKILL.md +58 -45
  37. package/bundled/skills/prizmkit-committer/SKILL.md +30 -68
  38. package/bundled/skills/prizmkit-implement/SKILL.md +60 -28
  39. package/bundled/skills/prizmkit-init/SKILL.md +57 -66
  40. package/bundled/skills/prizmkit-plan/SKILL.md +60 -23
  41. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +74 -19
  42. package/bundled/skills/prizmkit-prizm-docs/assets/PRIZM-SPEC.md +23 -23
  43. package/bundled/skills/prizmkit-retrospective/SKILL.md +142 -65
  44. package/bundled/skills/prizmkit-retrospective/assets/retrospective-template.md +13 -0
  45. package/bundled/skills/prizmkit-specify/SKILL.md +69 -15
  46. package/bundled/skills/refactor-workflow/SKILL.md +116 -52
  47. package/bundled/team/prizm-dev-team.json +2 -2
  48. package/package.json +1 -1
  49. package/src/scaffold.js +4 -4
  50. package/bundled/dev-pipeline/lib/worktree.sh +0 -164
  51. package/bundled/dev-pipeline/tests/__init__.py +0 -0
  52. package/bundled/dev-pipeline/tests/test_check_session.py +0 -131
  53. package/bundled/dev-pipeline/tests/test_cleanup_logs.py +0 -119
  54. package/bundled/dev-pipeline/tests/test_detect_stuck.py +0 -207
  55. package/bundled/dev-pipeline/tests/test_generate_prompt.py +0 -190
  56. package/bundled/dev-pipeline/tests/test_init_bugfix_pipeline.py +0 -153
  57. package/bundled/dev-pipeline/tests/test_init_pipeline.py +0 -241
  58. package/bundled/dev-pipeline/tests/test_update_bug_status.py +0 -142
  59. package/bundled/dev-pipeline/tests/test_update_feature_status.py +0 -338
  60. package/bundled/dev-pipeline/tests/test_worktree.py +0 -236
  61. package/bundled/dev-pipeline/tests/test_worktree_integration.py +0 -796
  62. package/bundled/skills/prizm-kit/assets/codebuddy-md-template.md +0 -35
  63. package/bundled/skills/prizm-kit/assets/hooks/prizm-commit-hook.json +0 -15
  64. package/bundled/skills/prizmkit-summarize/SKILL.md +0 -51
  65. package/bundled/skills/prizmkit-summarize/assets/registry-template.md +0 -18
  66. package/bundled/templates/hooks/commit-intent-claude.json +0 -26
  67. /package/bundled/templates/hooks/{commit-intent-codebuddy.json → commit-intent.json} +0 -0
@@ -0,0 +1,156 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Validate bug-fix-list.json against the PrizmKit bug-fix-list schema.
4
+
5
+ Usage:
6
+ python3 validate-bug-list.py [bug-fix-list.json] [--feature-list feature-list.json]
7
+
8
+ Exit codes:
9
+ 0 = valid
10
+ 1 = validation errors found
11
+ 2 = file not found or JSON parse error
12
+ """
13
+
14
+ import json
15
+ import sys
16
+ import os
17
+ import re
18
+
19
+ VALID_SEVERITIES = {"critical", "high", "medium", "low"}
20
+ VALID_SOURCE_TYPES = {"stack_trace", "user_report", "failed_test", "log_pattern", "monitoring_alert"}
21
+ VALID_VERIFICATION_TYPES = {"automated", "manual", "hybrid"}
22
+ VALID_STATUSES = {"pending", "in_progress", "fixed", "failed", "skipped", "needs_info"}
23
+ BUG_ID_PATTERN = re.compile(r"^B-\d{3}$")
24
+
25
+
26
+ def validate(bug_list_path, feature_list_path=None):
27
+ errors = []
28
+ warnings = []
29
+
30
+ # Load bug-fix-list.json
31
+ try:
32
+ with open(bug_list_path) as f:
33
+ data = json.load(f)
34
+ except FileNotFoundError:
35
+ print(f"ERROR: File not found: {bug_list_path}", file=sys.stderr)
36
+ return 2
37
+ except json.JSONDecodeError as e:
38
+ print(f"ERROR: Invalid JSON in {bug_list_path}: {e}", file=sys.stderr)
39
+ return 2
40
+
41
+ # Load feature-list.json (optional, for cross-reference)
42
+ feature_ids = set()
43
+ if feature_list_path:
44
+ try:
45
+ with open(feature_list_path) as f:
46
+ fl_data = json.load(f)
47
+ feature_ids = {f.get("id") for f in fl_data.get("features", [])}
48
+ except (FileNotFoundError, json.JSONDecodeError):
49
+ warnings.append(f"Could not load feature-list.json at {feature_list_path}")
50
+
51
+ # Top-level required fields
52
+ if "$schema" not in data:
53
+ errors.append("Missing required field: $schema")
54
+ elif data["$schema"] != "dev-pipeline-bug-fix-list-v1":
55
+ errors.append(f"Invalid $schema: expected 'dev-pipeline-bug-fix-list-v1', got '{data['$schema']}'")
56
+
57
+ if not data.get("project_name"):
58
+ errors.append("Missing or empty required field: project_name")
59
+
60
+ bugs = data.get("bugs", [])
61
+ if not bugs:
62
+ errors.append("Missing or empty required field: bugs")
63
+
64
+ # Per-bug validation
65
+ seen_ids = set()
66
+ seen_priorities = set()
67
+
68
+ for i, bug in enumerate(bugs):
69
+ prefix = f"bugs[{i}]"
70
+
71
+ # Required fields
72
+ bug_id = bug.get("id", "")
73
+ if not bug_id:
74
+ errors.append(f"{prefix}: missing required field 'id'")
75
+ elif not BUG_ID_PATTERN.match(bug_id):
76
+ errors.append(f"{prefix}: id '{bug_id}' does not match pattern B-NNN")
77
+
78
+ if bug_id in seen_ids:
79
+ errors.append(f"{prefix}: duplicate bug id '{bug_id}'")
80
+ seen_ids.add(bug_id)
81
+
82
+ if not bug.get("title"):
83
+ errors.append(f"{prefix} ({bug_id}): missing required field 'title'")
84
+
85
+ if not bug.get("description"):
86
+ errors.append(f"{prefix} ({bug_id}): missing required field 'description'")
87
+
88
+ severity = bug.get("severity", "")
89
+ if severity not in VALID_SEVERITIES:
90
+ errors.append(f"{prefix} ({bug_id}): invalid severity '{severity}' — must be one of {VALID_SEVERITIES}")
91
+
92
+ # error_source
93
+ error_source = bug.get("error_source", {})
94
+ source_type = error_source.get("type", "") if isinstance(error_source, dict) else ""
95
+ if source_type not in VALID_SOURCE_TYPES:
96
+ errors.append(f"{prefix} ({bug_id}): invalid error_source.type '{source_type}' — must be one of {VALID_SOURCE_TYPES}")
97
+
98
+ # verification_type
99
+ vtype = bug.get("verification_type", "")
100
+ if vtype not in VALID_VERIFICATION_TYPES:
101
+ errors.append(f"{prefix} ({bug_id}): invalid verification_type '{vtype}' — must be one of {VALID_VERIFICATION_TYPES}")
102
+
103
+ # acceptance_criteria
104
+ ac = bug.get("acceptance_criteria", [])
105
+ if not ac or not isinstance(ac, list):
106
+ errors.append(f"{prefix} ({bug_id}): missing or empty acceptance_criteria array")
107
+
108
+ # status
109
+ status = bug.get("status", "")
110
+ if status not in VALID_STATUSES:
111
+ errors.append(f"{prefix} ({bug_id}): invalid status '{status}' — must be one of {VALID_STATUSES}")
112
+
113
+ # Priority uniqueness
114
+ priority = bug.get("priority")
115
+ if priority is not None:
116
+ if priority in seen_priorities:
117
+ warnings.append(f"{prefix} ({bug_id}): duplicate priority {priority}")
118
+ seen_priorities.add(priority)
119
+
120
+ # Cross-reference affected_feature
121
+ affected_feature = bug.get("affected_feature")
122
+ if affected_feature and feature_ids and affected_feature not in feature_ids:
123
+ warnings.append(f"{prefix} ({bug_id}): affected_feature '{affected_feature}' not found in feature-list.json")
124
+
125
+ # Output results
126
+ if errors:
127
+ print(f"VALIDATION FAILED — {len(errors)} error(s), {len(warnings)} warning(s)\n")
128
+ for e in errors:
129
+ print(f" ERROR: {e}")
130
+ for w in warnings:
131
+ print(f" WARN: {w}")
132
+ return 1
133
+ else:
134
+ bug_count = len(bugs)
135
+ severity_counts = {}
136
+ for b in bugs:
137
+ s = b.get("severity", "unknown")
138
+ severity_counts[s] = severity_counts.get(s, 0) + 1
139
+ sev_str = ", ".join(f"{k}={v}" for k, v in sorted(severity_counts.items()))
140
+ print(f"VALIDATION PASSED — {bug_count} bugs ({sev_str})")
141
+ if warnings:
142
+ for w in warnings:
143
+ print(f" WARN: {w}")
144
+ return 0
145
+
146
+
147
+ if __name__ == "__main__":
148
+ bug_list = sys.argv[1] if len(sys.argv) > 1 else "bug-fix-list.json"
149
+ feature_list = None
150
+
151
+ if "--feature-list" in sys.argv:
152
+ idx = sys.argv.index("--feature-list")
153
+ if idx + 1 < len(sys.argv):
154
+ feature_list = sys.argv[idx + 1]
155
+
156
+ sys.exit(validate(bug_list, feature_list))
@@ -1,17 +1,15 @@
1
1
  ---
2
2
  name: "bugfix-pipeline-launcher"
3
- description: "Launch and manage the bugfix pipeline from within a cbc session. Start pipeline in background, monitor logs, check status, stop pipeline. Invoke when user wants to start fixing bugs, run the bugfix pipeline, or check bugfix progress. (project)"
3
+ description: "Launch and manage the bugfix pipeline from within an AI CLI session. Start pipeline in background, monitor logs, check status, stop pipeline. Use this skill whenever the user wants to start fixing bugs, run the bugfix pipeline, check bugfix progress, or stop the bugfix pipeline. Trigger on: 'start fixing bugs', 'run bugfix pipeline', 'bugfix status', 'stop bug fix', '启动 bug 修复', '开始修复 bug', '修复进度', '停止修复'. (project)"
4
4
  ---
5
5
 
6
6
  # Bugfix-Pipeline Launcher
7
7
 
8
- Launch the autonomous bug fix pipeline from within a cbc conversation. The pipeline runs as a fully detached background process -- closing the cbc session does NOT stop the pipeline.
8
+ Launch the autonomous bug fix pipeline from within an AI CLI conversation. The pipeline runs as a fully detached background process -- closing the AI CLI session does NOT stop the pipeline.
9
9
 
10
- ### Mandatory Execution Mode (MUST)
10
+ ### Execution Mode
11
11
 
12
- - Always use daemon mode via `dev-pipeline/launch-bugfix-daemon.sh` for start/stop/status/log actions.
13
- - NEVER run `dev-pipeline/run-bugfix.sh run ...` directly from this skill.
14
- - Reason: foreground `run-bugfix.sh` can be terminated by AI CLI command timeout (e.g. cbc 120s), while daemon mode survives session timeout.
12
+ Always use daemon mode via `dev-pipeline/launch-bugfix-daemon.sh` for start/stop/status/log actions. Foreground `run-bugfix.sh` can be terminated by AI CLI command timeout, while daemon mode survives session timeout — this prevents half-finished bug fixes that leave the codebase in an inconsistent state.
15
13
 
16
14
  ### When to Use
17
15
 
@@ -248,7 +246,7 @@ SESSION_TIMEOUT=3600 dev-pipeline/retry-bug.sh B-001 bug-fix-list.json
248
246
  ### Integration Notes
249
247
 
250
248
  - **After bug-planner**: This is the natural next step. When user finishes bug planning and has `bug-fix-list.json`, suggest launching the bugfix pipeline.
251
- - **Session independence**: The bugfix pipeline runs completely detached. User can close cbc, open a new session later, and use this skill to check progress or stop the pipeline.
249
+ - **Session independence**: The bugfix pipeline runs completely detached. User can close the AI CLI, open a new session later, and use this skill to check progress or stop the pipeline.
252
250
  - **Single instance**: Only one bugfix pipeline can run at a time. The PID file prevents duplicates.
253
251
  - **Feature pipeline coexistence**: Bugfix and feature pipelines use separate state directories (`bugfix-state/` vs `state/`), so they can run simultaneously without conflict.
254
252
  - **State preservation**: Stopping and restarting the bugfix pipeline resumes from where it left off -- completed bugs are not re-fixed.
@@ -1,17 +1,15 @@
1
1
  ---
2
2
  name: "dev-pipeline-launcher"
3
- description: "Launch and manage the dev-pipeline from within an AI CLI session. Start pipeline in background, monitor logs, check status, stop pipeline. Invoke when user wants to start building features, run the pipeline, or check pipeline progress. (project)"
3
+ description: "Launch and manage the dev-pipeline from within an AI CLI session. Start pipeline in background, monitor logs, check status, stop pipeline. Use this skill whenever the user wants to start building features, run the pipeline, check pipeline progress, retry features, or stop the pipeline. Trigger on: 'run pipeline', 'start pipeline', 'start building', 'pipeline status', 'stop pipeline', 'retry feature', '启动流水线', '开始实现', '流水线状态', '停止流水线'. (project)"
4
4
  ---
5
5
 
6
6
  # Dev-Pipeline Launcher
7
7
 
8
8
  Launch the autonomous development pipeline from within an AI CLI conversation. The pipeline runs as a fully detached background process -- closing the AI CLI session does NOT stop the pipeline.
9
9
 
10
- ### Mandatory Execution Mode (MUST)
10
+ ### Execution Mode
11
11
 
12
- - Always use daemon mode via `dev-pipeline/launch-daemon.sh` for start/stop/status/log actions.
13
- - NEVER run `dev-pipeline/run.sh run ...` directly from this skill.
14
- - Reason: foreground `run.sh` can be terminated by AI CLI command timeout (e.g. cbc 120s, claude may vary), while daemon mode survives session timeout.
12
+ Always use daemon mode via `dev-pipeline/launch-daemon.sh` for start/stop/status/log actions. Foreground `run.sh` can be terminated by AI CLI session timeout, while daemon mode survives session closure — this prevents half-finished features that leave the codebase in an inconsistent state.
15
13
 
16
14
  ### When to Use
17
15
 
@@ -284,4 +282,4 @@ Notes:
284
282
  - **Single instance**: Only one pipeline can run at a time. The PID file prevents duplicates.
285
283
  - **Pipeline coexistence**: Feature and bugfix pipelines use separate state directories (`state/` vs `bugfix-state/`), so they can run simultaneously without conflict.
286
284
  - **State preservation**: Stopping and restarting the pipeline resumes from where it left off -- completed features are not re-run.
287
- - **HANDOFF**: After pipeline completes all features, suggest running `prizmkit-code-review` for overall review, or `prizmkit-summarize` to archive.
285
+ - **HANDOFF**: After pipeline completes all features, suggest running `prizmkit-retrospective` for project memory update, or ask user what's next.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: "feature-workflow"
3
3
  tier: companion
4
- description: "One-stop entry point for feature development. Orchestrates app-planner → dev-pipeline-launcher → background execution. Handles multi-feature batch development from a single request. (project)"
4
+ description: "One-stop entry point for feature development. Orchestrates app-planner → dev-pipeline-launcher → background execution. Handles multi-feature batch development from a single request. Use this skill whenever the user wants to build an app, develop multiple features at once, or go from idea to running code in one step. Trigger on: 'build an app', 'develop features', 'implement all features', 'one-stop development', 'batch implement', '开发一个新应用', '构建系统', '一键完成', '批量实现'. (project)"
5
5
  ---
6
6
 
7
7
  # Feature Workflow
@@ -28,7 +28,7 @@ User says:
28
28
  ## Overview
29
29
 
30
30
  ```
31
- prizmkit.feature <需求描述>
31
+ feature-workflow <需求描述>
32
32
 
33
33
  ├── Phase 1: Plan → app-planner → feature-list.json
34
34
 
@@ -58,48 +58,31 @@ With this skill, users can:
58
58
 
59
59
  ---
60
60
 
61
- ## Commands
61
+ ## Input Modes
62
62
 
63
- ### prizmkit.feature \<需求描述\>
63
+ **Mode A: From natural language requirements** (default)
64
64
 
65
- One-stop feature development from natural language requirements.
66
-
67
- **INPUT**: Natural language description of the project or features. Can be:
65
+ Natural language description of the project or features. Can be:
68
66
  - A project vision: "开发一个任务管理 App,支持用户登录、任务增删改查、任务分类"
69
67
  - A batch of features: "实现用户注册、登录、找回密码这三个功能"
70
68
  - An incremental request: "给现有系统追加用户头像上传和昵称修改功能"
71
69
 
72
- **FLOW**:
73
- 1. Invoke `app-planner` with the description
74
- 2. After feature-list.json is generated, invoke `dev-pipeline-launcher`
75
- 3. Monitor and report progress
76
-
77
- ### prizmkit.feature --from \<feature-list.json\>
78
-
79
- Skip planning, directly launch pipeline from existing feature-list.json.
80
-
81
- **USE WHEN**:
82
- - feature-list.json already exists
83
- - User wants to restart/resume pipeline execution
84
-
85
- **FLOW**:
86
- 1. Skip `app-planner` (file already exists)
87
- 2. Invoke `dev-pipeline-launcher` directly
88
- 3. Monitor and report progress
70
+ Flow: app-planner → dev-pipeline-launcher → monitor
89
71
 
90
- ### prizmkit.feature \<需求描述\> --incremental
72
+ **Mode B: From existing feature-list.json**
91
73
 
92
- Add new features to an existing project (incremental mode).
74
+ When user says "run pipeline from existing file" or feature-list.json already exists:
75
+ - Skip `app-planner` (file already exists)
76
+ - Invoke `dev-pipeline-launcher` directly
77
+ - Monitor and report progress
93
78
 
94
- **USE WHEN**:
95
- - Project already has features implemented
96
- - User wants to add new features to existing codebase
79
+ **Mode C: Incremental (add to existing project)**
97
80
 
98
- **FLOW**:
99
- 1. Invoke `app-planner` in incremental mode (reads existing feature-list.json)
100
- 2. Append new features to existing list
101
- 3. Invoke `dev-pipeline-launcher`
102
- 4. Monitor and report progress
81
+ When user says "add features to existing project" or the project already has features:
82
+ - Invoke `app-planner` in incremental mode (reads existing feature-list.json)
83
+ - Append new features to existing list
84
+ - Invoke `dev-pipeline-launcher`
85
+ - Monitor and report progress
103
86
 
104
87
  ---
105
88
 
@@ -248,18 +231,18 @@ While the pipeline runs in background, the user can continue the conversation:
248
231
 
249
232
  | Dimension | feature-workflow | bug-fix-workflow | refactor-workflow |
250
233
  |-----------|-----------------|------------------|-------------------|
251
- | **Purpose** | New features (batch) | Bug fixes (batch) | Code restructuring |
252
- | **Planning Skill** | `app-planner` | `bug-planner` | None (direct invocation) |
253
- | **Launcher Skill** | `dev-pipeline-launcher` | `bugfix-pipeline-launcher` | None (in-session) |
254
- | **Input** | Requirements description | Bug reports / logs | Module / code target |
255
- | **Output** | Multiple `feat()` commits | Multiple `fix()` commits | Single `refactor()` commit |
256
- | **Execution Mode** | Background daemon | Background daemon | In-session |
234
+ | **Purpose** | New features (batch) | Single bug fix (interactive) | Code restructuring |
235
+ | **Planning Skill** | `app-planner` | None (triage built-in) | None (analysis built-in) |
236
+ | **Execution** | Background daemon | In-session, interactive | In-session |
237
+ | **Input** | Requirements description | Bug report / stack trace | Module / code target |
238
+ | **Output** | Multiple `feat()` commits | Single `fix()` commit | Single `refactor()` commit |
239
+ | **Batch alternative** | (this is the batch flow) | `bug-planner` + `bugfix-pipeline-launcher` | N/A |
257
240
 
258
241
  ---
259
242
 
260
243
  ## Path References
261
244
 
262
- All internal asset paths MUST use `${SKILL_DIR}` placeholder for cross-IDE compatibility.
245
+ All internal asset paths use `${SKILL_DIR}` placeholder for cross-IDE compatibility.
263
246
 
264
247
  ## Output
265
248
 
@@ -267,4 +250,4 @@ All internal asset paths MUST use `${SKILL_DIR}` placeholder for cross-IDE compa
267
250
  - Background pipeline running (Phase 2)
268
251
  - Progress updates (Phase 3)
269
252
  - Multiple git commits with `feat(<scope>):` prefix
270
- - Updated `REGISTRY.md` (via prizmkit.summarize per feature)
253
+ - Updated `.prizm-docs/` (via prizmkit-retrospective per feature)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "prizm-kit"
3
- description: "Full-lifecycle dev toolkit. Covers spec-driven development, Prizm context docs, code quality, debugging, deployment, and knowledge management. Use 'prizmkit.*' for help. (project)"
3
+ description: "Full-lifecycle dev toolkit. Covers spec-driven development, Prizm context docs, code quality, debugging, deployment, and knowledge management. Use this skill whenever the user asks about PrizmKit workflow, wants to know which command to use, or needs help choosing between full workflow and fast path. Trigger on: '/prizmkit', 'prizmkit help', 'which prizmkit command', 'how do I start a feature'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit — Full-Lifecycle Development Toolkit
@@ -25,22 +25,47 @@ PrizmKit is a comprehensive, independent AI development toolkit that covers the
25
25
  - Architectural decisions
26
26
  - Data model or API changes
27
27
 
28
- **Use fast path (implement -> commit directly):**
28
+ The full workflow generates spec, plan, and task artifacts that create a traceable record of what was built and why — this matters for future maintainability and AI context loading.
29
+
30
+ **Use fast path (plan → implement → commit):**
29
31
  - Bug fixes with clear root cause
30
32
  - Single-file config or typo fixes
31
33
  - Simple refactors (rename, extract)
32
34
  - Documentation-only changes
33
35
  - Test additions for existing code
34
36
 
35
- For fast-path changes, you can directly use the implement command with inline task description, then the commit command.
36
- - CodeBuddy: `prizmkit.implement` → `prizmkit.commit`
37
- - Claude Code: `/prizmkit-implement` `/prizmkit-committer`
37
+ The fast path skips specify and analyze but still generates a simplified plan.md (with Tasks section) so that implement has a task list to follow.
38
+
39
+ For fast-path changes, you can directly generate a simplified plan.md, then use implement and commit commands.
40
+
41
+ ## Workflow Example
42
+
43
+ **Full workflow** for adding a user avatar upload feature:
44
+ ```
45
+ /prizmkit-specify → writes .prizmkit/specs/001-avatar-upload/spec.md
46
+ /prizmkit-plan → writes plan.md with tasks (architecture, data model, API, UI)
47
+ /prizmkit-analyze → checks spec↔plan consistency, finds gaps
48
+ /prizmkit-implement → executes tasks in order, marks [x] as done
49
+ /prizmkit-code-review → reviews against spec, outputs PASS/NEEDS FIXES
50
+ /prizmkit-retrospective → syncs .prizm-docs/ with code changes
51
+ /prizmkit-committer → commits feat(avatar): add upload
52
+ ```
53
+
54
+ **Fast path** for fixing a null pointer bug:
55
+ ```
56
+ /prizmkit-plan → "fix null check in UserService.getAvatar()" (simplified plan.md)
57
+ /prizmkit-implement → executes tasks from plan.md
58
+ /prizmkit-committer → commits fix(user): handle null avatar gracefully
59
+ ```
60
+
61
+ ### Fast Path Commands
62
+ `/prizmkit-plan` → `/prizmkit-implement` → `/prizmkit-committer`
38
63
 
39
64
  ### Bug Fix Documentation Policy
40
65
 
41
66
  **Bug fixes MUST NOT create new documentation entries.** Bug fixes are refinements of incomplete existing features — they complete what was already planned, not introduce new functionality. Specifically:
42
67
 
43
- - Do NOT run `prizmkit.summarize` for bug fix commits (no new REGISTRY.md entries)
68
+ - Run `/prizmkit-retrospective` with structural sync only (Job 1) for bug fix commits skip knowledge injection unless genuinely new TRAP discovered
44
69
  - Do NOT create new spec/plan/tasks under `.prizmkit/specs/` for bug fixes
45
70
  - Do NOT update `.prizm-docs/` module docs for pure bug fixes (no interface/dependency change)
46
71
  - Bug fix commits use `fix(<scope>):` prefix in Conventional Commits, not `feat:`
@@ -53,7 +78,7 @@ PrizmKit produces two complementary knowledge layers:
53
78
 
54
79
  ```
55
80
  .prizm-docs/ → Project "what is" (static: structure, interfaces, rules, traps, decisions)
56
- .prizmkit/specs/ → Feature "what to do" (workflow: spec → plan → tasks → code)
81
+ .prizmkit/specs/ → Feature "what to do" (workflow: spec → plan → code(implement))
57
82
  ```
58
83
 
59
84
  ## Skill Inventory
@@ -61,18 +86,17 @@ PrizmKit produces two complementary knowledge layers:
61
86
  ### Foundation (3)
62
87
  - **prizm-kit** — Full-lifecycle dev toolkit entry point
63
88
  - **prizmkit-init** — Project takeover: scan → assess → generate docs → initialize
64
- - **prizmkit-prizm-docs** — Prizm documentation framework: `prizmkit.doc.init`, `prizmkit.doc.update`, `prizmkit.doc.status`, `prizmkit.doc.rebuild`, `prizmkit.doc.validate`, `prizmkit.doc.migrate`
89
+ - **prizmkit-prizm-docs** — Prizm documentation framework with 6 operations: init, update, status, rebuild, validate, migrate
65
90
 
66
- ### Spec-Driven Workflow (9)
91
+ ### Spec-Driven Workflow (8)
67
92
  - **prizmkit-specify** — Create structured feature specifications from natural language
68
93
  - **prizmkit-clarify** — Interactive requirement clarification
69
94
  - **prizmkit-plan** — Generate technical plan with data model, API contracts, and executable task breakdown (all in one plan.md)
70
95
  - **prizmkit-analyze** — Cross-document consistency analysis (spec ↔ plan ↔ tasks)
71
96
  - **prizmkit-implement** — Execute tasks following TDD approach
72
97
  - **prizmkit-code-review** — Review code against spec and plan
73
- - **prizmkit-summarize** — Archive completed features to REGISTRY.md
74
- - **prizmkit-committer** — Commit workflow with automatic Prizm doc update
75
- - **prizmkit-retrospective** — Post-feature learning: extract lessons → update Prizm docs
98
+ - **prizmkit-retrospective** — Sole .prizm-docs/ maintainer: structural sync + knowledge injection (TRAPS/RULES/DECISIONS)
99
+ - **prizmkit-committer** — Pure git commit: diff analysis, safety checks, Conventional Commits
76
100
 
77
101
  ### Quality Assurance (5)
78
102
  - **prizmkit-tool-tech-debt-tracker** — [Tier 1] Technical debt identification and tracking via code pattern analysis
@@ -96,13 +120,29 @@ PrizmKit produces two complementary knowledge layers:
96
120
  - **prizmkit-tool-onboarding-generator** — [Tier 2] Generate developer onboarding guides
97
121
  - **prizmkit-tool-api-doc-generator** — [Tier 2] Extract API documentation from source code
98
122
 
99
- ### Pipeline & Companion (6)
100
- - **feature-workflow** — [Tier 1] End-to-end feature workflow: specify → plan → analyze implement review → commit
101
- - **refactor-workflow** — [Tier 1] End-to-end refactor workflow: analyze → plan → implement → review → commit
123
+ ### Pipeline & Companion (7)
124
+ - **feature-workflow** — One-stop feature development: plan → launch pipelinemonitor
125
+ - **refactor-workflow** — End-to-end refactor: analyze → plan → implement → review → commit
102
126
  - **app-planner** — Interactive app planning that produces feature-list.json for dev-pipeline
103
127
  - **bug-planner** — Interactive bug planning that produces bug-fix-list.json for bugfix-pipeline
104
- - **dev-pipeline-launcher** — Launch and manage the dev-pipeline from within a CLI session
105
- - **bugfix-pipeline-launcher** — Launch and manage the bugfix pipeline from within a CLI session
128
+ - **bug-fix-workflow** — Interactive single-bug fix in current session (triage reproduce → fix → review → commit)
129
+ - **dev-pipeline-launcher** — Launch and manage the feature dev-pipeline (background daemon)
130
+ - **bugfix-pipeline-launcher** — Launch and manage the bugfix pipeline (background daemon)
131
+
132
+ ### Scenario Decision Tree
133
+
134
+ Not sure which skill to use? Follow this:
135
+
136
+ | I want to... | Use this |
137
+ |---|---|
138
+ | Build a new app or batch of features from scratch | `feature-workflow` (one-stop) |
139
+ | Plan features first, then decide when to build | `app-planner` → `dev-pipeline-launcher` |
140
+ | Launch pipeline for an existing feature-list.json | `dev-pipeline-launcher` |
141
+ | Fix multiple bugs in batch | `bug-planner` → `bugfix-pipeline-launcher` |
142
+ | Fix one specific bug right now, interactively | `bug-fix-workflow` |
143
+ | Refactor/restructure code without changing behavior | `refactor-workflow` |
144
+ | Add a single small feature (spec → plan → implement) | `/prizmkit-specify` → `/prizmkit-plan` → `/prizmkit-implement` |
145
+ | Quick bug fix or config change | Fast path: `/prizmkit-plan` → `/prizmkit-implement` → `/prizmkit-committer` |
106
146
 
107
147
  ### Tier Definitions
108
148
 
@@ -128,10 +168,8 @@ python3 ${SKILL_DIR}/scripts/install-prizmkit.py --target <project-skills-dir>
128
168
 
129
169
  ## Hook / Rules Configuration
130
170
 
131
- **CodeBuddy:** Uses native `type: prompt` hooks for automatic doc updates before commits.
132
- The hook is configured automatically by `prizmkit-init`. See `assets/hooks/prizm-commit-hook.json`.
133
-
134
- **Claude Code:** Uses `.claude/rules/` glob-scoped markdown files for automatic enforcement.
135
- Rules are created automatically by `prizmkit-init` (or `/prizmkit-init`). See:
136
- - `assets/claude-md-template.md` for the project memory template
171
+ Both CodeBuddy and Claude Code use unified commands for automatic doc updates and commit enforcement.
172
+ Hooks and rules are configured automatically by `prizmkit-init`. See:
173
+ - `core/templates/hooks/commit-intent.json` for the commit hook template
174
+ - `assets/project-memory-template.md` for the project memory template
137
175
  - The init skill creates `prizm-documentation.md` and `prizm-commit-workflow.md` rules
@@ -10,8 +10,8 @@ This project uses PrizmKit with the Prizm documentation system for AI-optimized
10
10
 
11
11
  ### Auto-Update Protocol
12
12
  - BEFORE EVERY COMMIT: Update affected `.prizm-docs/` files
13
- - The `.claude/rules/` files will enforce this automatically
14
- - Use `/prizmkit-committer` command for the complete commit workflow
13
+ - Platform hooks (rules or UserPromptSubmit) will remind you automatically
14
+ - Use `/prizmkit-committer` for the complete commit workflow
15
15
 
16
16
  ### Doc Format Rules
17
17
  - All `.prizm` files use KEY: value format, not prose
@@ -32,7 +32,7 @@ Run `/prizm-kit` to see all available PrizmKit commands.
32
32
  Not every change needs the full spec -> plan workflow. Use fast path for:
33
33
  - Bug fixes with clear root cause, config tweaks, typo fixes, simple refactors
34
34
  - Documentation-only changes, test additions for existing code
35
- - Directly use `/prizmkit-implement` with inline task description, then `/prizmkit-committer`
35
+ - Fast path: `/prizmkit-plan` (simplified) `/prizmkit-implement` `/prizmkit-committer`
36
36
 
37
37
  Use the full workflow (/prizmkit-specify -> /prizmkit-plan -> /prizmkit-analyze -> /prizmkit-implement) for:
38
38
  - New features, multi-file coordinated changes, architectural decisions, data model or API changes
@@ -1,30 +1,24 @@
1
1
  ---
2
2
  name: "prizmkit-analyze"
3
- description: "Cross-document consistency analysis for spec.md, plan.md, and tasks.md. Detects duplications, ambiguities, gaps, and rule conflicts. Read-only. (project)"
3
+ description: "Cross-document consistency analysis for spec.md and plan.md (including Tasks section). Detects duplications, ambiguities, gaps, and rule conflicts. Read-only. Use this skill to check if spec and plan are aligned, validate documents before coding, or as a quality gate after planning. Trigger on: 'analyze', 'check consistency', 'validate spec', 'review plan', 'is the spec ready', 'check if spec and plan are aligned', 'validate documents before coding'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Analyze
7
7
 
8
- Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md before implementation. Identifies duplications, ambiguities, underspecified items, rule conflicts, and coverage gaps.
8
+ Perform a non-destructive cross-artifact consistency and quality analysis across spec.md and plan.md (including Tasks section) before implementation. Identifies duplications, ambiguities, underspecified items, rule conflicts, and coverage gaps.
9
9
 
10
10
  ### When to Use
11
- - After `prizmkit.plan` to validate spec-plan-tasks alignment before implementation
11
+ - After `/prizmkit-plan` to validate spec-plan-tasks alignment before implementation
12
12
  - User says "analyze", "check consistency", "validate spec", "review plan"
13
- - Before `prizmkit.implement` as a quality gate
14
-
15
- ## Commands
16
-
17
- ### prizmkit.analyze
18
-
19
- Cross-document consistency analysis.
13
+ - Before `/prizmkit-implement` as a quality gate
20
14
 
21
15
  **PRECONDITION:** `spec.md` and `plan.md` exist in `.prizmkit/specs/###-feature-name/`. `plan.md` must include a Tasks section.
22
16
 
23
17
  ## Operating Constraints
24
18
 
25
- **STRICTLY READ-ONLY**: Do **not** modify any files. Output a structured analysis report to conversation only. Offer an optional remediation plan (user must explicitly approve before any edits).
19
+ **Read-only analysis**: Do not modify any files. The analysis output goes to conversation only, with an optional remediation plan the user must explicitly approve. This separation matters because the user needs to understand what's wrong before deciding what to change — auto-fixing consistency issues often introduces new ones.
26
20
 
27
- **Prizm Rules Authority**: The project rules in `.prizm-docs/root.prizm` RULES section are **non-negotiable** within this analysis scope. Rule conflicts are automatically CRITICAL severity and require adjustment of the spec, plan, or tasks not dilution or silent ignoring of the rule. If a rule itself needs to change, that must occur via a separate `prizmkit.doc.update`.
21
+ **Prizm Rules take precedence**: The project rules in `.prizm-docs/root.prizm` RULES section are the source of truth. If a spec or plan element conflicts with a MUST/NEVER directive, the spec/plan needs to change, not the rule. This prevents well-intentioned features from silently violating project-wide constraints. If a rule itself is wrong, that's a separate conversation via prizmkit-prizm-docs (Update operation).
28
22
 
29
23
  ## Execution Steps
30
24
 
@@ -34,10 +28,9 @@ Locate the current feature directory in `.prizmkit/specs/###-feature-name/` by c
34
28
 
35
29
  Derive absolute paths:
36
30
  - SPEC = `.prizmkit/specs/###-feature-name/spec.md`
37
- - PLAN = `.prizmkit/specs/###-feature-name/plan.md`
38
- - TASKS = `.prizmkit/specs/###-feature-name/tasks.md` (optional)
31
+ - PLAN = `.prizmkit/specs/###-feature-name/plan.md` (must include a Tasks section)
39
32
 
40
- Abort with an error message if spec.md or plan.md is missing — instruct the user to run the missing prerequisite command (`prizmkit.specify` or `prizmkit.plan`).
33
+ Abort with an error message if spec.md or plan.md is missing — instruct the user to run the missing prerequisite command (`/prizmkit-specify` or `/prizmkit-plan`).
41
34
 
42
35
  ### Step 2: Load Artifacts (Progressive Disclosure)
43
36
 
@@ -152,13 +145,13 @@ Output a Markdown report (**no file writes**) with the following structure:
152
145
 
153
146
  At end of report, output a concise Next Actions block:
154
147
 
155
- - If CRITICAL issues exist: **Recommend resolving before `prizmkit.implement`**
148
+ - If CRITICAL issues exist: **Recommend resolving before `/prizmkit-implement`**
156
149
  - If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
157
150
  - Provide explicit command suggestions:
158
- - "Run `prizmkit.specify` to refine requirements"
159
- - "Run `prizmkit.plan` to adjust architecture or tasks"
160
- - "Edit tasks.md to add coverage for requirement X"
161
- - "Proceed to `prizmkit.implement`" (if clean)
151
+ - "Run `/prizmkit-specify` to refine requirements"
152
+ - "Run `/prizmkit-plan` to adjust architecture or tasks"
153
+ - "Edit plan.md Tasks section to add coverage for requirement X"
154
+ - "Proceed to `/prizmkit-implement`" (if clean)
162
155
 
163
156
  ### Step 8: Offer Remediation
164
157
 
@@ -167,19 +160,37 @@ Ask the user: "Would you like me to suggest concrete remediation edits for the t
167
160
  ## Operating Principles
168
161
 
169
162
  ### Context Efficiency
170
- - **Minimal high-signal tokens**: Focus on actionable findings, not exhaustive documentation
171
- - **Progressive disclosure**: Load artifacts incrementally; don't dump all content into analysis
172
- - **Token-efficient output**: Limit findings table to 50 rows; summarize overflow
173
- - **Deterministic results**: Rerunning without changes should produce consistent IDs and counts
174
-
175
- ### Analysis Guidelines
176
- - **NEVER modify files** (this is read-only analysis)
177
- - **NEVER hallucinate missing sections** (if absent, report them accurately)
178
- - **Prioritize Prizm Rules violations** (these are always CRITICAL)
179
- - **Use examples over exhaustive rules** (cite specific instances, not generic patterns)
180
- - **Report zero issues gracefully** (emit success report with coverage statistics)
181
-
182
- **HANDOFF:** `prizmkit.implement` (if clean) or `prizmkit.specify` / `prizmkit.plan` (if issues found)
163
+ - Focus on actionable findings, not exhaustive documentation — the goal is to surface problems, not prove you read everything
164
+ - Load artifacts incrementally; reading all content upfront wastes tokens on sections irrelevant to the feature
165
+ - Cap findings at 50 rows to keep the report scannable; summarize overflow with counts
166
+ - Rerunning without changes should produce consistent IDs and counts (deterministic)
167
+
168
+ ### Analysis Approach
169
+ - Do not modify files read-only analysis ensures artifacts remain stable for the implement phase
170
+ - If a section is absent, report it accurately rather than guessing what it might contain
171
+ - Prizm Rules violations are always CRITICAL — they represent project-wide constraints that outrank individual feature decisions
172
+ - Cite specific instances rather than generic patterns "spec §2.1 says REST but plan §Architecture says GraphQL" is more useful than "terminology inconsistency found"
173
+ - If zero issues found, report success with coverage statistics — a clean report is valuable confirmation
174
+
175
+ ## Example Finding
176
+
177
+ ```
178
+ | ID | Category | Severity | Location(s) | Summary | Recommendation |
179
+ |----|----------|----------|-------------|---------|----------------|
180
+ | D1 | Rules Alignment | CRITICAL | plan.md §Architecture | Plan specifies SQLite but root.prizm RULES has "MUST: use PostgreSQL for all persistent storage" | Change plan to use PostgreSQL or request rule amendment via prizmkit-prizm-docs |
181
+ | E1 | Coverage Gap | HIGH | spec.md §FR-3 | "User can export reports as PDF" has no corresponding task in plan.md Tasks section | Add export task to Phase 3 of plan.md |
182
+ ```
183
+
184
+ **HANDOFF:** `/prizmkit-implement` (if clean) or `/prizmkit-specify` / `/prizmkit-plan` (if issues found)
185
+
186
+ ## Loop Protection
187
+
188
+ In unattended pipeline mode, the analyze→fix→analyze cycle can loop indefinitely if issues keep reappearing. To prevent this:
189
+
190
+ - Track an `analyze_iteration` counter starting at 1. Each re-run of this skill after remediation increments the counter.
191
+ - **max_iterations = 5**: If `analyze_iteration >= 5`, you MUST proceed to `/prizmkit-implement` regardless of remaining findings. Log a warning: "Loop protection triggered — proceeding to implement with N unresolved findings (iterations: 5/5)."
192
+ - Unresolved findings from the final iteration should be noted in the handoff so that `/prizmkit-code-review` can catch them downstream.
193
+ - This guard exists because some findings oscillate (fixing one re-introduces another) and blocking forever is worse than proceeding with known issues.
183
194
 
184
195
  ## Output
185
196