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
@@ -1,26 +1,23 @@
1
1
  ---
2
2
  name: "app-planner"
3
- description: "Plan a new application through interactive conversation — capture vision, tech stack, constraints, and project brief. Use this skill when users say 'plan an app', 'design a new project', 'start from scratch', 'build a new application', or discuss app-level architecture and design. For adding features to existing projects, use feature-planner instead."
3
+ description: "Plan an application through interactive conversation — capture vision, tech stack, constraints, and project brief. Works for both new (greenfield) and existing (brownfield) projects that need app-level planning. Use this skill when users say 'plan an app', 'design a new project', 'start from scratch', 'build a new application', or discuss app-level architecture and design. Also use for existing projects that need a project brief or app-level context. For adding features to existing projects that already have a project brief, use feature-planner instead."
4
4
  ---
5
5
 
6
6
  # app planner
7
7
 
8
- Plan a new application from idea to actionable project context through interactive conversation:
8
+ Plan an application from idea to actionable project context through interactive conversation. Works for both **greenfield** (new) and **brownfield** (existing) projects:
9
9
  - Vision and problem statement
10
- - Tech stack selection
10
+ - Tech stack selection (or confirmation of existing stack)
11
11
  - Constraints and design direction
12
12
  - Architecture decision capture
13
13
  - Project brief accumulation (`.prizmkit/plans/project-brief.md`)
14
14
 
15
15
  This skill captures **what to build and why**. For **feature decomposition and `.prizmkit/plans/feature-list.json` generation**, hand off to `feature-planner`.
16
16
 
17
- For adding features to an **existing** project, use `feature-planner` directly.
17
+ For adding features to an **existing** project that already has a project brief, use `feature-planner` directly.
18
18
 
19
19
  ## Invocation Commitment (Hard Rule)
20
-
21
- **When the user invokes `/app-planner`, you MUST execute the app-planner workflow.** You must NEVER:
22
- - Decide on the user's behalf that the task "doesn't need app-planner"
23
- - Skip app-planner to jump directly to spec/plan/implement or any other skill
20
+ You must NEVER:
24
21
  - Bypass the interactive phases because you judge the task to be "simple"
25
22
 
26
23
  If you believe the task is better suited for a different workflow, you MUST:
@@ -35,23 +32,16 @@ If you believe the task is better suited for a different workflow, you MUST:
35
32
  - Create project scaffolding, directories, or boilerplate
36
33
  - Run build/install/test commands (npm init, pip install, etc.)
37
34
  - Execute any implementation action beyond writing planning artifacts
38
- - Generate `.prizmkit/plans/feature-list.json` — that is `feature-planner`'s responsibility
39
35
 
40
36
  **Your ONLY writable outputs are:**
41
37
  1. `.prizmkit/plans/project-brief.md` (`.prizmkit/plans/` — accumulated project context brief)
42
- 2. `.prizmkit/project-conventions.json` (project convention answers)
43
- 3. `.prizm-docs/root.prizm` (if architecture decisions are captured — see Architecture Decision Capture section)
44
- - Contains architecture decisions, tech stack rationale, and key constraints
45
- - Used as input by feature-planner and other workflows
46
- 4. Architecture decisions appended to `CLAUDE.md` / `CODEBUDDY.md` (with user consent)
47
- 5. Draft backups in `.prizmkit/planning/`
38
+ 2. Project conventions and architecture decisions appended to `CLAUDE.md` / `CODEBUDDY.md` (with user consent)
48
39
 
49
40
  **After planning is complete**, you MUST:
50
41
  1. Present the summary of captured vision, constraints, and decisions
51
42
  2. **Ask the user explicitly** whether they want to proceed to feature decomposition
52
- 3. If the user agrees → recommend invoking `feature-planner` to decompose into features and generate `.prizmkit/plans/feature-list.json`
53
- 4. If the user wants to continue exploring → stay in app-planner
54
- 5. **NEVER auto-execute** the pipeline, feature-planner, or any implementation step
43
+ 3. If the user wants to continue exploring stay in app-planner
44
+ 4. **NEVER auto-execute** the pipeline, feature-planner, or any implementation step
55
45
 
56
46
  ## When to Use
57
47
 
@@ -60,9 +50,12 @@ Trigger this skill for requests like:
60
50
  - "Start from scratch", "Build something new", "Create a new product"
61
51
  - "Help me figure out what to build", "Brainstorm an app idea"
62
52
  - "What tech stack should I use?", "Help me choose frameworks"
53
+ - "Create a project brief for my existing project"
54
+ - "Help me document what this project is about"
55
+ - "I have a codebase but no project plan yet"
63
56
 
64
57
  Do NOT use this skill when:
65
- - The user already has a project and wants to add features → use `feature-planner`
58
+ - The user already has a project brief and wants to add features → use `feature-planner`
66
59
  - The user wants to run the pipeline → use `feature-pipeline-launcher`
67
60
  - The user is debugging/refactoring or wants to write source code directly
68
61
 
@@ -78,11 +71,24 @@ Do NOT use this skill when:
78
71
  - During brainstorm Phase C → also read `${SKILL_DIR}/references/red-team-checklist.md`
79
72
 
80
73
  3. **Project conventions check** — after Intent Confirmation, before brainstorm or vision work:
81
- → Read `.prizmkit/project-conventions.json` if it exists
82
- Cross-reference with `${SKILL_DIR}/references/project-conventions.md` for the full question list
83
- For any convention with a `null` or missing value batch all unanswered questions into a single prompt
84
- Save answers to `.prizmkit/project-conventions.json`
85
- If all conventions are already answered skip silently
74
+ → Read `CLAUDE.md` / `CODEBUDDY.md` and check for `### Project Conventions` section
75
+ If section exists and all conventions are answered skip silently
76
+ If section is missing or incompleteask the following conventions as a single batched prompt:
77
+ - **UI Display Language** (`ui_language`): Primary language for the app's UI (e.g., English, 中文, 日本語). If non-English, confirm whether ALL UI text should use that language.
78
+ - **Multi-Language Support** (`i18n`): Whether i18n is needed. If yes, which target languages? If enabled, note i18n infrastructure early in dependency graph.
79
+ - **Date/Time/Currency**: Date format (YYYY-MM-DD, MM/DD/YYYY, etc.), timezone strategy (UTC storage + local display, user-selected, server only), currency format (if applicable).
80
+ - **Code & Git Language**: Language for code comments and git commit messages (default: English for both).
81
+ → Save answers to `CLAUDE.md` / `CODEBUDDY.md` under `### Project Conventions` section (format: one bullet per convention)
82
+ → Example output:
83
+ ```markdown
84
+ ### Project Conventions
85
+ - UI language: 中文
86
+ - i18n: disabled
87
+ - Date format: YYYY-MM-DD, timezone: UTC storage + local display
88
+ - Currency: CNY ¥
89
+ - Code comments: English
90
+ - Git commits: English
91
+ ```
86
92
 
87
93
  4. **Project brief accumulation** — throughout all interactive phases:
88
94
  → Read `${SKILL_DIR}/references/project-brief-guide.md` for template and rules
@@ -93,11 +99,7 @@ Do NOT use this skill when:
93
99
  Before questions, check optional context files (never block if absent):
94
100
  - `.prizm-docs/root.prizm` (architecture/project context)
95
101
  - `.prizmkit/config.json` (existing stack preferences and detected tech stack)
96
- - `.prizmkit/project-conventions.json` (previously answered project conventions)
97
- - If `.prizm-docs/root.prizm` is absent and the project has existing source code, scan the directory structure to understand the codebase layout:
98
- ```bash
99
- find . -maxdepth 2 -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/build/*' -not -path '*/__pycache__/*' -not -path '*/vendor/*' | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
100
- ```
102
+ - `CLAUDE.md` / `CODEBUDDY.md` `### Project Conventions` section (previously answered project conventions)
101
103
 
102
104
  **Tech stack auto-population from config.json:**
103
105
  - If `.prizmkit/config.json` contains a `tech_stack` object, use it to pre-fill tech assumptions.
@@ -123,13 +125,61 @@ After initial greeting, confirm the user's deliverable intent:
123
125
  - Run project conventions check first
124
126
  - Load `${SKILL_DIR}/references/brainstorm-guide.md` and follow its structured ideation process (Phases A-D)
125
127
  - Brainstorm Phase D output serves as the Vision Summary (CP-AP-2)
126
- - Continue with Phase 2 (constraints including frontend design check if applicable)
127
- - At Phase 2 completion, re-ask: "Ideas are taking shape. Ready to hand off to `feature-planner` for feature decomposition?"
128
- - If yesrecommend invoking `feature-planner`
129
- - If no offer to continue exploring (loop back to brainstorm or constraints), or save draft to `.prizmkit/planning/` and exit
128
+ - After brainstorm completes, ask: "Ideas are taking shape. Ready to hand off to `feature-planner` for feature decomposition, or continue refining?"
129
+ - If ready proceed to Phase 2 (constraints + frontend design check if applicable) then handoff
130
+ - If not ready continue exploring, or save draft to `.prizmkit/planning/` and exit
131
+ - **Checkpoints in explore mode**: CP-AP-0 (required), CP-AP-1 (required), CP-AP-2 (from brainstorm output), CP-AP-3 (only if user proceeds to Phase 2), CP-AP-4 and CP-AP-5 (only if user transitions to produce mode)
130
132
 
131
133
  3. **Session goal tracking**: Track the intent (`produce` or `explore`) throughout the session. If `explore`, always re-prompt before ending.
132
134
 
135
+ ## Project State Detection (after Intent Confirmation)
136
+
137
+ Detect whether this is a **greenfield** (new) or **brownfield** (existing) project and adapt the workflow accordingly.
138
+
139
+ ### Detection Signals
140
+
141
+ | Signal | Greenfield | Brownfield |
142
+ |--------|-----------|------------|
143
+ | `package.json` / `pyproject.toml` / `go.mod` / `Cargo.toml` / `pom.xml` | absent | present |
144
+ | `src/` or `app/` directory with source files | absent | present |
145
+ | `.git` with commit history | absent or initial commit only | present with history |
146
+ | Empty or near-empty directory | yes | no |
147
+
148
+ ### Greenfield Behavior (default)
149
+
150
+ Proceed with the standard Core Workflow — ask all questions from scratch.
151
+
152
+ ### Brownfield Behavior
153
+
154
+ When an existing project is detected:
155
+
156
+ 1. **Scan project structure** to understand the codebase layout:
157
+ ```bash
158
+ find . -maxdepth 2 -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/build/*' -not -path '*/__pycache__/*' -not -path '*/vendor/*' | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
159
+ ```
160
+
161
+ 2. **Read existing project metadata** to infer tech stack and purpose:
162
+ - `package.json` → name, description, dependencies, scripts
163
+ - `pyproject.toml` / `requirements.txt` → Python dependencies
164
+ - `go.mod` → Go module info
165
+ - `README.md` → project description and goals
166
+ - `.prizmkit/config.json` → previously detected tech stack
167
+ - `.prizm-docs/root.prizm` → existing architecture context
168
+
169
+ 3. **Present inferred summary** to the user:
170
+ > "I see this is a [framework] project using [language] with [key dependencies]. Here's what I inferred about the project: [summary]. Is this correct? Anything to add or change?"
171
+
172
+ 4. **Pre-fill where possible** — skip questions already answerable from the codebase:
173
+ - Phase 2 tech stack selection → largely pre-filled from dependencies
174
+ - Vision/problem statement → inferred from README or package description (user confirms)
175
+ - Existing features → note them as `[x]` items in project brief
176
+
177
+ 5. **Focus remaining questions** on what CANNOT be inferred:
178
+ - Target users and core value proposition
179
+ - Future direction and planned capabilities
180
+ - Non-functional requirements (performance, scale, security)
181
+ - Design direction (for frontend projects)
182
+
133
183
  ## Core Workflow
134
184
 
135
185
  Execute the planning workflow in conversation mode with mandatory checkpoints:
@@ -151,23 +201,20 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
151
201
  | Checkpoint | Artifact/State | Criteria | Phase |
152
202
  |-----------|----------------|----------|-------|
153
203
  | **CP-AP-0** | Intent Confirmed | User confirmed session goal (produce / explore) | 1 |
154
- | **CP-AP-1** | Conventions Checked | Project conventions loaded or asked; `.prizmkit/project-conventions.json` up to date | 1 |
155
- | **CP-AP-2** | Vision Summary | Goal/users/differentiators confirmed by user | 1-2 |
156
- | **CP-AP-3** | Frontend Design Evaluated | For frontend projects: checked for existing UI/UX design system; user was asked if missing | 2 |
157
- | **CP-AP-4** | Project Brief Accumulated | `.prizmkit/plans/project-brief.md` exists at `.prizmkit/plans/` with at least 3 ideas listed | 3 |
204
+ | **CP-AP-1** | Conventions Checked | Project conventions loaded or asked; `### Project Conventions` section in `CLAUDE.md` / `CODEBUDDY.md` up to date | 1 |
205
+ | **CP-AP-2** | Vision Summary | Goal/users/differentiators confirmed by user. For brownfield: existing purpose confirmed or refined. | 1-2 |
206
+ | **CP-AP-3** | Frontend Design Evaluated | For frontend projects: checked for existing UI/UX design system; user was asked if missing. **Auto-pass** for backend-only or non-UI projects. | 2 |
207
+ | **CP-AP-4** | Project Brief Accumulated | `.prizmkit/plans/project-brief.md` exists at `.prizmkit/plans/` with at least 3 ideas listed. For brownfield: already-implemented items marked `[x]` count toward this total. | 3 |
158
208
  | **CP-AP-5** | Handoff Ready | All app-level context captured; user confirmed readiness for feature decomposition | 4 |
159
209
 
160
210
  ## Architecture Decision Capture
161
211
 
162
212
  After Phase 2, if framework-shaping architecture decisions emerged during planning (tech stack, communication patterns, data model strategies — not individual feature details), read `${SKILL_DIR}/references/architecture-decisions.md` and follow the capture flow. Most sessions will NOT produce architecture decisions — only capture when genuinely impactful.
163
213
 
164
- **Handoff to feature-planner**: Captured architecture decisions MUST be written to `.prizm-docs/root.prizm` so that feature-planner can read them as context. This ensures all downstream planners (feature, bug, refactor) share consistent architectural understanding.
165
-
166
214
  **How it works**:
167
- 1. If decisions are captured → create `.prizm-docs/root.prizm` with decision summaries
168
- 2. Also append decisions to `CLAUDE.md` / `CODEBUDDY.md` for human reference
169
- 3. When feature-planner is invoked, it will read `.prizm-docs/root.prizm` as prerequisite context
170
- 4. Feature decomposition will respect captured architecture decisions (no conflicting tech choices)
215
+ 1. If decisions are captured → append to `CLAUDE.md` / `CODEBUDDY.md` under `### Architecture Decisions` section
216
+ 2. Feature-planner and other downstream skills read `CLAUDE.md` / `CODEBUDDY.md` as standard context, so they automatically receive these decisions
217
+ 3. Do NOT write directly to `.prizm-docs/root.prizm` — that file is maintained by `prizmkit-prizm-docs` and `prizmkit-retrospective`. If the project needs `.prizm-docs/`, recommend the user run `prizmkit-prizm-docs` init after planning.
171
218
 
172
219
  ## Project Brief Accumulation
173
220
 
@@ -175,26 +222,6 @@ During interactive planning, maintain a `.prizmkit/plans/project-brief.md` at `.
175
222
 
176
223
  → Read `${SKILL_DIR}/references/project-brief-guide.md` for full format and rules.
177
224
 
178
- **Format**: One idea per line, each starting with `[ ]`. Example:
179
- ```
180
- # Project Brief
181
-
182
- [x] 表示构想已在某个 feature 中实现完成
183
-
184
- --------
185
-
186
- [ ] B2B SaaS 餐饮库存管理平台,面向中小连锁餐厅
187
- [ ] 核心价值:通过预测性订货减少 30% 食物浪费
188
- [ ] 必须支持 iPad Safari 离线模式
189
- ```
190
-
191
- **Key rules**:
192
- - After each meaningful user response → append a new `[ ]` line
193
- - One idea, one sentence per line — no paragraphs
194
- - Max 500 words total
195
- - Must have at least 3 ideas listed before CP-AP-4
196
- - The pipeline will mark `[x]` and append file paths when features are implemented
197
-
198
225
  ## Session Exit Gate
199
226
 
200
227
  Prevent accidental session exit without completing the planning artifacts.
@@ -203,8 +230,7 @@ Prevent accidental session exit without completing the planning artifacts.
203
230
 
204
231
  Activate when ALL true:
205
232
  - Session goal = `produce`
206
- - `.prizmkit/plans/project-brief.md` has not been written or is incomplete (Vision section missing)
207
- - No architecture decisions captured yet (if any emerged)
233
+ - `.prizmkit/plans/project-brief.md` has not been written or is incomplete (fewer than 3 ideas listed)
208
234
 
209
235
  ### Gate Behavior
210
236
 
@@ -222,4 +248,4 @@ After all checkpoints pass, present a summary and recommend next steps:
222
248
  1. **Summary**: List captured vision, tech stack, constraints, architecture decisions, and project brief status
223
249
  2. **Primary recommendation**: Invoke `feature-planner` to decompose the application into features and generate `.prizmkit/plans/feature-list.json` (schema: `dev-pipeline-feature-list-v1`, uses `project_name` field for the app name)
224
250
  3. **Alternative**: If the user wants to continue refining the vision or constraints, stay in app-planner
225
- 4. **Artifacts produced**: List files written (`.prizmkit/plans/project-brief.md`, `.prizmkit/project-conventions.json`, architecture decisions if any)
251
+ 4. **Artifacts produced**: List files written (`.prizmkit/plans/project-brief.md`, project conventions and architecture decisions in `CLAUDE.md` / `CODEBUDDY.md`)
@@ -42,7 +42,7 @@ Use these tables to guide tech stack selection based on project requirements.
42
42
 
43
43
  | Framework | Best For | Ecosystem |
44
44
  |-----------|----------|-----------|
45
- | Next.js 14+ | Full-stack React, SSR, API routes | React ecosystem, Vercel |
45
+ | Next.js | Full-stack React, SSR, API routes | React ecosystem, Vercel |
46
46
  | Nuxt 3 | Full-stack Vue, SSR | Vue ecosystem |
47
47
  | SvelteKit | Performance-focused, smaller teams | Svelte ecosystem |
48
48
  | Remix | Nested routes, data loading | React ecosystem |
@@ -20,7 +20,7 @@ Only capture decisions that are **framework-shaping** — NOT individual feature
20
20
 
21
21
  ## When to Capture
22
22
 
23
- After Phase 5 (DAG verification), before Phase 6 (JSON generation). At this point decisions are settled.
23
+ After Phase 2 (Confirm constraints and tech assumptions), before Phase 3 (Capture architecture decisions and finalize project brief). At this point decisions are settled.
24
24
 
25
25
  ## How to Capture
26
26
 
@@ -1,79 +1,82 @@
1
- # Project Brief — Checklist Format Guide
1
+ # Project Brief Template
2
2
 
3
- > Capture the user's key product ideas as a simple checklist in `project-brief.md`. Each line is one idea. The dev-pipeline injects this file into every feature session so the AI understands the user's overall product vision.
3
+ > Capture the user's key product ideas as a simple checklist. Each line is one idea. This file is referenced by `root.prizm` (`PROJECT_BRIEF:`) so every new AI session automatically knows the project's goals.
4
4
 
5
- ## Purpose
5
+ ## File Location
6
6
 
7
- During `app-planner` conversation, the user describes what they want to build. `project-brief.md` distills these into a flat checklist — one idea per line. When `dev-pipeline` builds individual features, each session sees this checklist and understands the bigger picture.
7
+ `.prizmkit/plans/project-brief.md`
8
8
 
9
- ## Persistence
10
-
11
- - **File**: `project-brief.md` at `.prizmkit/plans/` (shared location with `feature-list.json`)
12
- - **Format**: Checklist — one idea per line, `[ ]` for pending, `[x]` for completed
13
- - **Size limit**: 500 words max (injected into every session's context window)
14
- - **Consumed by**: `dev-pipeline/scripts/generate-bootstrap-prompt.py` → `{{PROJECT_BRIEF}}` placeholder
15
-
16
- ## File Format
9
+ ## Format
17
10
 
18
11
  ```markdown
19
12
  # Project Brief
20
13
 
21
- [x] 表示构想已在某个 feature 中实现完成
22
-
23
- --------
24
-
25
- [ ] B2B SaaS 餐饮库存管理平台,面向中小连锁餐厅 (5-50 家门店)
26
- [ ] 核心价值:通过预测性订货减少 30% 食物浪费
27
- [ ] 必须支持 iPad Safari 离线模式,厨房平板 WiFi 不稳定
28
- [ ] 后端可部署到客户自有云(多租户但可自托管)
29
- [ ] RESTful API + JWT 认证,不用 GraphQL
30
- [ ] 使用 Supabase (PostgreSQL) 作为数据库和认证
31
- [ ] TailwindCSS + shadcn/ui 统一前端组件
32
- [ ] 所有金额用整数(分)存储,避免浮点精度问题
33
- [ ] Dashboard 在 3G 网络下 2 秒内加载
34
- [ ] 供应商集成 API 支持 webhook 回调
35
- [ ] 用户端中文界面,管理后台英文界面
14
+ [ ] Core product idea or constraint
15
+ [ ] Another product idea
16
+ [ ] Third idea — one sentence, no sub-bullets
17
+ [x] Already implemented feature -> src/feature/, src/utils/helper.ts
36
18
  ```
37
19
 
38
- ## Format Rules
20
+ ## Rules
39
21
 
40
22
  1. **First line**: `# Project Brief`
41
- 2. **Second line**: `[x] 表示构想已在某个 feature 中实现完成` — fixed legend
42
- 3. **Third line**: `--------`separator
43
- 4. **Remaining lines**: One idea per line, each starting with `[ ]`
44
- 5. Each line is **one sentence** no paragraphs, no sub-bullets
45
- 6. Language: match the user's language (Chinese or English)
46
-
47
- ## How app-planner Writes It
48
-
49
- During interactive conversation, after each meaningful user response (skip acknowledgments, yes/no):
50
- - Evaluate whether the response contains a product idea, constraint, design decision, or technical preference
51
- - If yes → append a new `[ ]` line to `project-brief.md`
52
- - Keep each line concise — one idea, one sentence
53
- - Merge or condense if approaching 500-word limit
54
-
55
- **First write**: Create the file with the header, legend, separator, and initial ideas.
56
- **Subsequent writes**: Append new `[ ]` lines only — do not rewrite existing lines.
57
-
58
- ## How the Pipeline Marks Completion
59
-
60
- When a feature session in `dev-pipeline` completes and its implementation addresses one or more ideas from the checklist:
61
- 1. Change `[ ]` to `[x]` for that idea
62
- 2. Append 1-2 key directory/file paths after the idea text, showing where it was implemented
63
-
64
- Example of a completed item:
65
- ```
66
- [x] RESTful API + JWT 认证,不用 GraphQL src/middleware/auth.ts, src/routes/api/
67
- ```
68
-
69
- ## Checkpoint
70
-
71
- Verified at **CP-AP-4**: Before handoff to `feature-planner`, `project-brief.md` must exist with at least 3 ideas listed.
72
-
73
- ## How the Pipeline Uses It
74
-
75
- `generate-bootstrap-prompt.py` reads `project-brief.md` and injects its content into the `{{PROJECT_BRIEF}}` section of every bootstrap prompt (tier1/tier2/tier3). The framing:
76
-
77
- > "Product ideas checklist from planning. Lines marked [x] are already implemented. When your feature touches any [ ] item, ensure alignment. After implementation, mark relevant items [x] and append the key file paths."
23
+ 2. **Remaining lines**: One idea per line, prefixed with `[ ]` (pending) or `[x]` (done)
24
+ 3. Each line is **one sentence** no paragraphs, no sub-bullets, no grouping headers
25
+ 4. Language: match the user's language (Chinese or English)
26
+ 5. **Size limit**: 500 words max (this file is injected into every session's context window)
27
+ 6. **Completion marking** (mandatory): When a brief item is implemented:
28
+ - Change `[ ]` to `[x]`
29
+ - Append `->` followed by the **key file or directory paths** that implement it
30
+ - List the most important 1-3 paths only (entry point, core module, or directory) — not every touched file
31
+ - Example: `[x] User authentication with OAuth -> src/auth/, src/middleware/auth.ts`
32
+ - This lets future AI sessions instantly locate the implementation without re-scanning
33
+
34
+ ## Brownfield Init
35
+
36
+ When initializing an existing project, AI infers the brief from:
37
+ - Generated `root.prizm` (tech stack, module structure)
38
+ - `README.md` (if exists)
39
+ - Package metadata (`package.json` description, `pyproject.toml`, etc.)
40
+
41
+ Then presents the draft to the user for confirmation and editing.
42
+
43
+ ## Greenfield Init
44
+
45
+ When initializing a new/empty project, use **progressive questioning** to fully understand the user's intent before generating the brief. Do NOT dump all questions at once — ask in rounds, adapting based on answers.
46
+
47
+ ### Round 1: Problem & Vision (required)
48
+ - What problem does this project solve? (or: what's the core idea?)
49
+ - Who is the target user / audience?
50
+
51
+ ### Round 2: Scope & Features (required)
52
+ - What are the 3-5 core features or capabilities? (ask user to list them)
53
+ - What is the MVP scope? (what's the minimum version that delivers value?)
54
+ - Are there any explicit non-goals? (things this project deliberately does NOT do)
55
+
56
+ ### Round 3: Technical Constraints (if user has preferences)
57
+ - Any preferred tech stack / language / framework?
58
+ - Any integration requirements? (third-party APIs, databases, auth providers)
59
+ - Deployment target? (web app, mobile, CLI, library, self-hosted, cloud)
60
+
61
+ ### Round 4: Clarification (adaptive — only if gaps remain)
62
+ If previous answers are vague or incomplete, probe deeper:
63
+ - "You mentioned X — can you give a concrete example of how a user would use it?"
64
+ - "Are there existing tools that do something similar? How is yours different?"
65
+ - "What does success look like for V1?"
66
+
67
+ ### Completion Criteria
68
+ Stop asking when ALL of these are clear:
69
+ 1. **Problem** — what pain point or opportunity this addresses
70
+ 2. **Users** — who will use it and in what context
71
+ 3. **Core features** — at least 3 concrete capabilities (not vague aspirations)
72
+ 4. **Boundaries** — what's in scope vs. out of scope for V1
73
+ 5. **Technical direction** — enough to populate `config.json` tech_stack (or explicitly deferred)
74
+
75
+ If the user gives short/vague answers, don't accept them — rephrase and ask again. A weak brief leads to weak specs downstream.
76
+
77
+ ### Generate & Confirm
78
+ Once all criteria are met:
79
+ 1. Generate brief in checklist format (see Format section above)
80
+ 2. Present to user with: "Here's what I captured — anything to add, remove, or change?"
81
+ 3. Apply edits and write to `.prizmkit/plans/project-brief.md`
78
82
 
79
- If the file does not exist, the placeholder is replaced with `(No project brief available)`.
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: "bug-fix-workflow"
3
- tier: companion
4
- description: "Interactive single-bug fix in current session. Guides through deep diagnosis Q&A → triage → reproduce → fix → review → commit without the background pipeline. Use this skill when the user wants to fix one specific bug right now, interactively. Trigger on: 'fix this bug', 'debug this', 'fix B-001', 'help me fix', 'let me fix this bug myself', 'fix this bug', 'interactive fix', 'manually fix bug'. (project)"
3
+ description: "Interactive single-bug fix in current session. Guides through deep diagnosis Q&A → triage → reproduce → fix → review → commit without the background pipeline. Use this skill when the user wants to fix one specific bug right now, interactively. Trigger on: 'fix this bug', 'debug this', 'fix B-001', 'help me fix', 'let me fix this bug myself', 'fix this bug', 'interactive fix', 'manually fix bug'."
5
4
  ---
6
5
 
7
6
  # Bug Fix Workflow
@@ -83,7 +82,7 @@ For trivial bugs with clear root cause and minimal scope:
83
82
 
84
83
  **Goal**: Fully understand the bug before touching any code. Vague bug reports lead to incorrect fixes that mask the real issue or introduce new bugs.
85
84
 
86
- **Fast Path Decision Point**: After initial information gathering (Step 1.1), evaluate the Fast Path Eligibility Criteria above. If ALL criteria are met, ask the user: "This looks like a straightforward fix. Use fast path? (Y/n)". If yes, skip directly to the Fast Path Workflow (branch setup already done in Phase 0). If no or uncertain, continue with full diagnosis.
85
+ **Fast Path Decision Point**: After initial information gathering (Step 1.1), evaluate the Fast Path Eligibility Criteria in Step 1.4. If ALL simple bug criteria are met, ask the user: "This looks like a straightforward fix. Use fast path? (Y/n)". If yes, skip directly to the Fast Path Workflow (branch setup already done in Phase 0). If no or uncertain, continue with full diagnosis.
87
86
 
88
87
  **CRITICAL RULE**: Ask as many questions as needed until the bug is fully understood. Do NOT rush into code. A misdiagnosed bug leads to a wrong fix, which is worse than no fix.
89
88
 
@@ -146,6 +145,35 @@ Ask the user: "Is this summary accurate? Any details to add?"
146
145
 
147
146
  ---
148
147
 
148
+ #### Step 1.4: Complexity Assessment
149
+
150
+ After confirming bug understanding, assess whether this bug needs structured planning:
151
+
152
+ **Simple bug → Fast Path** (ALL must be true):
153
+ - Root cause is immediately obvious (typo, missing null check, wrong variable name, off-by-one)
154
+ - Fix is ≤10 lines of code in a single file
155
+ - No cross-module impact
156
+ - Existing tests cover the affected path (or bug is in untested utility)
157
+ - No data model or API changes
158
+
159
+ → Proceed with Fast Path Workflow (Phase 0 branch already set up)
160
+
161
+ **Complex bug → Planning Path** (ANY is true):
162
+ - Cross-module impact (>2 files affected)
163
+ - Data model or API changes required
164
+ - Root cause is uncertain or multi-layered
165
+ - Fix requires structural changes
166
+ - Multiple interrelated symptoms
167
+
168
+ → Invoke `/prizmkit-plan` with `artifact_dir=.prizmkit/bugfix/<BUG_ID>/`:
169
+ 1. prizmkit-plan generates `spec.md` + `plan.md` under `.prizmkit/bugfix/<BUG_ID>/`
170
+ 2. Invoke `/prizmkit-implement` to execute the plan
171
+ 3. After implementation, resume this workflow at Phase 5 (Review)
172
+
173
+ Ask the user: "This bug appears [simple/complex]. Use [fast path/structured planning]? (Y/n)"
174
+
175
+ ---
176
+
149
177
  ### Phase 2: Triage
150
178
 
151
179
  **Goal**: Locate affected code, identify root cause, classify severity.
@@ -169,6 +197,8 @@ Ask the user: "Is this summary accurate? Any details to add?"
169
197
  ```
170
198
  Ask: "Does this diagnosis look right? Should I proceed with the fix?"
171
199
 
200
+ **CHECKPOINT CP-BFW-2**: Root cause identified and diagnosis confirmed by user.
201
+
172
202
  ### Phase 3: Reproduce
173
203
 
174
204
  **Goal**: Create a failing test that proves the bug exists.
@@ -186,6 +216,8 @@ If the bug is hard to reproduce automatically (e.g. environment-specific):
186
216
  - Write a manual reproduction checklist instead
187
217
  - Proceed to Phase 4 with the manual checklist
188
218
 
219
+ **CHECKPOINT CP-BFW-3**: Bug reproduction test written and confirmed failing.
220
+
189
221
  ### Phase 4: Fix
190
222
 
191
223
  **Goal**: Implement the minimal fix. Red test → green.
@@ -202,6 +234,8 @@ If the bug is hard to reproduce automatically (e.g. environment-specific):
202
234
  - Test results (reproduction + regression)
203
235
  - Ask: "Fix looks good? Any concerns?"
204
236
 
237
+ **CHECKPOINT CP-BFW-4**: Fix implemented and all tests passing (reproduction + regression).
238
+
205
239
  If the fix causes test regressions:
206
240
  - Show which tests broke and why
207
241
  - Revise the fix (max 3 attempts)
@@ -228,6 +262,8 @@ If the fix causes test regressions:
228
262
  Ready to commit.
229
263
  ```
230
264
 
265
+ **CHECKPOINT CP-BFW-5**: Code review completed and quality verified.
266
+
231
267
  ### Phase 6: User Verification
232
268
 
233
269
  **Goal**: Let the user verify the fix works as expected before committing.
@@ -244,6 +280,8 @@ If user reports the fix is NOT working:
244
280
  - Return to Phase 4 (max 2 more attempts)
245
281
  - If still failing: escalate with analysis
246
282
 
283
+ **CHECKPOINT CP-BFW-6**: Fix manually verified by user and working as expected.
284
+
247
285
  ---
248
286
 
249
287
  ### Phase 7: Commit & Merge
@@ -254,7 +292,10 @@ If user reports the fix is NOT working:
254
292
  - Commit message: `fix(<scope>): <description>`
255
293
  - Include both fix code and reproduction test
256
294
  - Do NOT push (user decides when to push)
257
- - Do NOT run `/prizmkit-retrospective` — bug fixes do not update `.prizm-docs/`
295
+ - **Bug Fix Documentation Policy**:
296
+ - DEFAULT: Run `/prizmkit-retrospective` with structural sync only (update file counts, interfaces, dependencies). Skip knowledge injection.
297
+ - UPDATE DOCS when bug fix causes: interface signature changes, dependency additions/removals, observable behavior changes to existing features, or newly discovered TRAPs (gotchas/pitfalls)
298
+ - When any of the above apply, run full `/prizmkit-retrospective` (Job 1 + Job 2)
258
299
  - `/prizmkit-committer` is a pure commit tool — it does NOT modify `.prizm-docs/` or any project files
259
300
  2. **Ask merge preference**:
260
301
  ```
@@ -278,6 +319,8 @@ If user reports the fix is NOT working:
278
319
  Or retry the pipeline to pick up remaining bugs.
279
320
  ```
280
321
 
322
+ **CHECKPOINT CP-BFW-7**: Fix committed and merge decision made.
323
+
281
324
  ## Resume — Interruption Recovery
282
325
 
283
326
  The workflow supports resuming from the last completed phase by detecting existing artifacts.