prizmkit 1.0.13 → 1.0.14

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 (77) hide show
  1. package/bin/create-prizmkit.js +4 -1
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/adapters/claude/command-adapter.js +35 -4
  4. package/bundled/adapters/claude/rules-adapter.js +6 -58
  5. package/bundled/adapters/claude/team-adapter.js +2 -2
  6. package/bundled/adapters/codebuddy/agent-adapter.js +0 -1
  7. package/bundled/adapters/codebuddy/rules-adapter.js +30 -0
  8. package/bundled/adapters/shared/frontmatter.js +3 -1
  9. package/bundled/dev-pipeline/README.md +13 -3
  10. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +10 -0
  11. package/bundled/dev-pipeline/launch-daemon.sh +18 -4
  12. package/bundled/dev-pipeline/lib/common.sh +105 -0
  13. package/bundled/dev-pipeline/run-bugfix.sh +57 -57
  14. package/bundled/dev-pipeline/run.sh +75 -59
  15. package/bundled/dev-pipeline/scripts/check-session-status.py +47 -2
  16. package/bundled/dev-pipeline/scripts/cleanup-logs.py +192 -0
  17. package/bundled/dev-pipeline/scripts/detect-stuck.py +15 -3
  18. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +32 -27
  19. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +23 -23
  20. package/bundled/dev-pipeline/scripts/update-feature-status.py +50 -2
  21. package/bundled/dev-pipeline/scripts/utils.py +22 -0
  22. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +18 -1
  23. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +19 -1
  24. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +18 -2
  25. package/bundled/dev-pipeline/templates/session-status-schema.json +7 -1
  26. package/bundled/dev-pipeline/tests/__init__.py +0 -0
  27. package/bundled/dev-pipeline/tests/conftest.py +133 -0
  28. package/bundled/dev-pipeline/tests/test_check_session.py +127 -0
  29. package/bundled/dev-pipeline/tests/test_cleanup_logs.py +119 -0
  30. package/bundled/dev-pipeline/tests/test_detect_stuck.py +207 -0
  31. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +181 -0
  32. package/bundled/dev-pipeline/tests/test_generate_prompt.py +190 -0
  33. package/bundled/dev-pipeline/tests/test_init_bugfix_pipeline.py +153 -0
  34. package/bundled/dev-pipeline/tests/test_init_pipeline.py +241 -0
  35. package/bundled/dev-pipeline/tests/test_update_bug_status.py +142 -0
  36. package/bundled/dev-pipeline/tests/test_update_feature_status.py +277 -0
  37. package/bundled/dev-pipeline/tests/test_utils.py +141 -0
  38. package/bundled/rules/USAGE.md +153 -0
  39. package/bundled/rules/_rules-metadata.json +43 -0
  40. package/bundled/rules/general/prefer-linux-commands.md +9 -0
  41. package/bundled/rules/prizm/prizm-commit-workflow.md +10 -0
  42. package/bundled/rules/prizm/prizm-documentation.md +19 -0
  43. package/bundled/rules/prizm/prizm-progressive-loading.md +11 -0
  44. package/bundled/skills/_metadata.json +130 -67
  45. package/bundled/skills/app-planner/SKILL.md +252 -499
  46. package/bundled/skills/app-planner/assets/evaluation-guide.md +44 -0
  47. package/bundled/skills/app-planner/scripts/validate-and-generate.py +143 -4
  48. package/bundled/skills/bug-planner/SKILL.md +58 -13
  49. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +5 -7
  50. package/bundled/skills/dev-pipeline-launcher/SKILL.md +16 -7
  51. package/bundled/skills/feature-workflow/SKILL.md +175 -234
  52. package/bundled/skills/prizm-kit/SKILL.md +17 -31
  53. package/bundled/skills/{prizmkit-adr-manager → prizmkit-tool-adr-manager}/SKILL.md +6 -7
  54. package/bundled/skills/{prizmkit-api-doc-generator → prizmkit-tool-api-doc-generator}/SKILL.md +4 -5
  55. package/bundled/skills/{prizmkit-bug-reproducer → prizmkit-tool-bug-reproducer}/SKILL.md +4 -5
  56. package/bundled/skills/{prizmkit-ci-cd-generator → prizmkit-tool-ci-cd-generator}/SKILL.md +4 -5
  57. package/bundled/skills/{prizmkit-db-migration → prizmkit-tool-db-migration}/SKILL.md +4 -5
  58. package/bundled/skills/{prizmkit-dependency-health → prizmkit-tool-dependency-health}/SKILL.md +3 -4
  59. package/bundled/skills/{prizmkit-deployment-strategy → prizmkit-tool-deployment-strategy}/SKILL.md +4 -5
  60. package/bundled/skills/{prizmkit-error-triage → prizmkit-tool-error-triage}/SKILL.md +4 -5
  61. package/bundled/skills/{prizmkit-log-analyzer → prizmkit-tool-log-analyzer}/SKILL.md +4 -5
  62. package/bundled/skills/{prizmkit-monitoring-setup → prizmkit-tool-monitoring-setup}/SKILL.md +4 -5
  63. package/bundled/skills/{prizmkit-onboarding-generator → prizmkit-tool-onboarding-generator}/SKILL.md +4 -5
  64. package/bundled/skills/{prizmkit-perf-profiler → prizmkit-tool-perf-profiler}/SKILL.md +4 -5
  65. package/bundled/skills/{prizmkit-security-audit → prizmkit-tool-security-audit}/SKILL.md +3 -4
  66. package/bundled/skills/{prizmkit-tech-debt-tracker → prizmkit-tool-tech-debt-tracker}/SKILL.md +3 -4
  67. package/bundled/skills/refactor-skill/SKILL.md +371 -0
  68. package/bundled/skills/refactor-workflow/SKILL.md +17 -119
  69. package/package.json +1 -1
  70. package/src/external-skills.js +71 -0
  71. package/src/index.js +62 -4
  72. package/src/metadata.js +36 -0
  73. package/src/scaffold.js +136 -32
  74. package/bundled/skills/prizmkit-bug-fix-workflow/SKILL.md +0 -356
  75. package/bundled/templates/claude-md-template.md +0 -38
  76. package/bundled/templates/codebuddy-md-template.md +0 -35
  77. /package/bundled/skills/{prizmkit-adr-manager → prizmkit-tool-adr-manager}/assets/adr-template.md +0 -0
@@ -1,580 +1,333 @@
1
1
  ---
2
2
  name: "app-planner"
3
- description: "Interactive app planning that produces feature-list.json for dev-pipeline. Invoke when user wants to plan an app, design features, or prepare for automated development."
3
+ description: "Interactive planning for both new apps and incremental features on existing apps. This skill should be used whenever users discuss app planning, feature scoping/re-prioritization, continuing a feature plan, or preparing a validated feature-list.json for dev-pipeline execution."
4
4
  ---
5
5
 
6
6
  # App Planner
7
7
 
8
- This skill guides an AI assistant through a structured, interactive conversation with the user to plan a new application from scratch. The final output is a validated `feature-list.json` file that serves as the input contract for the `dev-pipeline` module, which will autonomously implement each feature via multi-agent team sessions.
8
+ Plan deliverable features for dev-pipeline in two modes:
9
+ - **New App Planning**: create a plan from scratch
10
+ - **Incremental Feature Planning**: append new features to an existing app/plan
9
11
 
10
- ## Installation
11
-
12
- The `${SKILL_DIR}` placeholder represents the absolute path to this skill's directory. It is automatically resolved by the environment when the skill is invoked.
12
+ Always produce a validated `feature-list.json` that conforms to `dev-pipeline-feature-list`.
13
13
 
14
14
  ## When to Use
15
15
 
16
- **Trigger this skill when the user says any of the following (or similar):**
17
-
18
- - "Plan an app", "Design a new application", "I want to build an app"
19
- - "Create a feature list", "Prepare for dev-pipeline", "Generate feature-list.json"
20
- - "Let's plan what to build", "Help me scope out my project"
21
- - "I have an app idea", "Break down my app into features"
16
+ Trigger this skill for requests like:
17
+ - "规划应用", "设计项目", "Plan an app", "Design a new application"
18
+ - "给现有系统加功能", "继续规划", "Add features", "Continue planning"
19
+ - "准备 feature-list.json", "Prepare dev-pipeline input"
20
+ - "重排优先级", "拆分功能", "reprioritize/scope features"
22
21
 
23
- Chinese triggers (zhong wen chu fa):
24
- - "规划一个应用", "设计一个新项目", "帮我拆分功能"
25
- - "生成功能列表", "准备 dev-pipeline 输入"
22
+ Do NOT use this skill when:
23
+ - user only wants to run pipeline now (invoke `dev-pipeline-launcher`)
24
+ - user is debugging/refactoring unrelated to feature planning
26
25
 
27
- **Also trigger this skill when:**
26
+ ## Resource Loading Rules (Mandatory)
28
27
 
29
- - "Add new features to the plan", "Continue planning", "Plan next features"
30
- - "继续规划", "添加新功能到计划中"
28
+ `SKILL_DIR` definition:
29
+ - `SKILL_DIR` is the absolute path of this skill directory.
30
+ 1. **Choose scenario reference before planning**:
31
+ - New app → read `references/new-app-planning.md`
32
+ - Existing app incremental features → read `references/incremental-feature-planning.md`
31
33
 
32
- When adding features to an existing plan, read the existing `feature-list.json` first, then continue numbering from the next available F-NNN ID. Match the existing style (language, description detail level, acceptance criteria format).
34
+ 2. **Use shared quality examples as needed**:
35
+ - read `assets/planning-guide.md` for decomposition and acceptance criteria patterns
33
36
 
34
- **DO NOT use this skill when:**
37
+ 3. **Always validate output via script**:
38
+ - run:
39
+ ```bash
40
+ python3 ${SKILL_DIR}/scripts/validate-and-generate.py validate --input <output-path> --mode <new|incremental>
41
+ ```
35
42
 
36
- - The user is fixing a bug or doing a refactor
37
- - The user just wants to run the dev-pipeline (direct them to `./dev-pipeline/run.sh` instead)
43
+ 4. **Use script output as source of truth**:
44
+ - if validation fails, fix and re-run until pass
38
45
 
39
46
  ## Prerequisites
40
47
 
41
- Before starting the planning conversation, check for optional context files. These are NOT required -- the skill works on blank projects.
42
-
43
- 1. **Existing project context** (optional): If `.prizm-docs/root.prizm` exists, read it for architecture and tech stack context.
44
- 2. **Existing config** (optional): If `.prizmkit/config.json` exists, read it for pre-configured tech stack preferences.
45
- 3. **Existing spec** (optional): If the user mentions a specification document, read it and use it to pre-populate feature ideas.
46
-
47
- If none of these exist, proceed directly to Phase 1. Do not block on missing files.
48
-
49
- ## Interactive Planning Workflow
50
-
51
- CRITICAL: This is a conversation-driven skill. You MUST ask questions and wait for user responses at each phase. Do NOT generate the entire plan in one shot. The value of this skill is the iterative dialogue.
52
-
53
- ---
54
-
55
- ### Phase 1: App Vision (1-3 questions)
56
-
57
- **Goal**: Understand the core purpose, audience, and differentiation of the application.
58
-
59
- Ask these questions one at a time (or grouped if the user prefers concise interaction):
60
-
61
- 1. **What is the app?** -- "Describe the application you want to build. What problem does it solve?"
62
- 2. **Who are the target users?** -- "Who will use this app? What are their primary needs?"
63
- 3. **What makes it unique?** -- "What is the core value proposition? What differentiates it from existing solutions?"
64
-
65
- **AI Behavior:**
66
- - Summarize the user's vision back to them in 2-3 sentences before proceeding.
67
- - If the vision is vague, ask follow-up questions to clarify scope.
68
- - If the user provides a spec document, extract answers from it and confirm with the user.
69
-
70
- ---
71
-
72
- ### Phase 2: Tech Stack Decision (1-2 questions)
73
-
74
- **Goal**: Establish the technical foundation that will populate `global_context` in the output.
75
-
76
- Present a structured choice for each category. Suggest defaults based on the app type, but let the user override.
77
-
78
- **Categories to decide:**
79
-
80
- | Category | Common Options | Default Suggestion |
81
- |----------|---------------|-------------------|
82
- | Frontend | React/Next.js, Vue/Nuxt, Svelte/SvelteKit, Angular | Next.js 14 |
83
- | Backend | Express, FastAPI, Django, NestJS, Go/Gin | Express.js |
84
- | Database | PostgreSQL, MySQL, MongoDB, SQLite | PostgreSQL |
85
- | ORM | Prisma, TypeORM, Drizzle, SQLAlchemy | Prisma |
86
- | Auth | NextAuth, Clerk, Supabase Auth, custom JWT | NextAuth |
87
- | Design System | shadcn/ui, Ant Design, Material UI, Chakra UI | shadcn/ui + Tailwind CSS |
88
- | Testing | Jest + Playwright, Vitest + Cypress, pytest | Jest + Playwright |
89
- | Language | TypeScript, Python, Go | TypeScript |
90
-
91
- **AI Behavior:**
92
- - Present the table above (adapted to the app type) and let the user confirm or modify.
93
- - If the user has no preference, use the defaults.
94
- - Record the final tech stack -- it maps directly to `global_context` in the output.
95
- - If `.prizmkit/config.json` was read in Prerequisites, pre-fill from that config.
96
-
97
- ---
98
-
99
- ### Phase 3: Feature Brainstorming (iterative)
100
-
101
- **Goal**: Collaboratively build a comprehensive, well-structured feature list.
102
-
103
- **Step 3a: Initial Proposal**
104
-
105
- Based on the app vision and tech stack, propose an initial feature breakdown. Follow these rules:
106
-
107
- - Feature F-001 MUST be "Project Infrastructure Setup" (scaffolding, configs, CI basics). This is always the first feature with zero dependencies.
108
- - Feature F-002 is typically "User Authentication" (if applicable).
109
- - Subsequent features should follow a logical build order.
110
- - Aim for 5-12 features for an MVP. Fewer than 5 usually means features are too coarse. More than 15 usually means features are too granular.
111
-
112
- Present each feature as:
113
-
114
- ```
115
- F-001: Project Infrastructure Setup
116
- Description: Initialize the project with [framework], database connection, linting, and CI config.
117
- Complexity: medium
118
- Dependencies: (none)
119
- Acceptance Criteria:
120
- - [framework] app runs on expected port
121
- - Database connection verified
122
- - TypeScript compiles without errors
123
- - Linter and formatter configs applied
124
- ```
125
-
126
- **Step 3b: User Review**
127
-
128
- Ask the user to review the proposed features:
129
- - Add any missing features
130
- - Remove features that are out of scope
131
- - Modify descriptions or acceptance criteria
132
- - Split features that are too large
133
- - Merge features that are too small
134
-
135
- **Step 3c: Detail Refinement**
136
-
137
- For each feature (after the user approves the overall list), ensure:
138
-
139
- 1. **Description** is detailed enough for a development team to implement without additional context. It should describe WHAT to build, not HOW to build it.
140
- 2. **Acceptance Criteria** follow Given/When/Then style where applicable, with a minimum of 3 criteria per feature. Examples:
141
- - "Given a logged-in user, when they click 'Create Task', then a new task form appears"
142
- - "Users can register with email and password"
143
- - "API returns 401 for unauthenticated requests"
144
- 3. **Dependencies** are explicitly listed by F-NNN ID.
145
- 4. **Complexity** is estimated as low/medium/high.
146
-
147
- Iterate on Step 3b and 3c until the user says they are satisfied.
148
-
149
- ---
150
-
151
- ### Phase 4: Dependency Graph and Ordering
152
-
153
- **Goal**: Validate the dependency chain and confirm execution order.
154
-
155
- **Step 4a: Dependency Validation**
156
-
157
- Check the proposed dependencies for:
158
- - **No cycles**: Dependencies MUST form a Directed Acyclic Graph (DAG). If a cycle is detected, ask the user to resolve it.
159
- - **No orphans with unmet deps**: Every dependency target must exist in the feature list.
160
- - **F-001 has no dependencies**: The infrastructure feature is always the root.
161
-
162
- **Step 4b: Execution Order Visualization**
163
-
164
- Present the dependency chain as a text-based graph:
165
-
48
+ Before questions, check optional context files (never block if absent):
49
+ - `.prizm-docs/root.prizm` (architecture/project context)
50
+ - `.prizmkit/config.json` (existing stack preferences)
51
+ - existing `feature-list.json` (required for incremental mode)
52
+
53
+ Note:
54
+ - This skill **reads** `.prizmkit/config.json` if present.
55
+ - This skill does **not** create `.prizmkit/config.json` directly.
56
+ - Creation/update is handled by bootstrap/init flows (e.g., `prizmkit-init`, `dev-pipeline/scripts/init-dev-team.py`).
57
+
58
+ ## Scenario Routing
59
+
60
+ Classify user intent first:
61
+
62
+ ### Route A: New App Planning
63
+ Use when user starts from idea/blank slate or asks for initial end-to-end plan.
64
+
65
+ Actions:
66
+ 1. Load `references/new-app-planning.md`
67
+ 2. Run interactive planning phases
68
+ 3. Generate initial `feature-list.json`
69
+
70
+ ### Route B: Incremental Feature Planning
71
+ Use when user already has app/code/plan and asks to add or adjust features.
72
+
73
+ Actions:
74
+ 1. Load `references/incremental-feature-planning.md`
75
+ 2. Read existing `feature-list.json` first (if missing, ask whether to start new plan)
76
+ 3. Append features with next sequential `F-NNN` IDs
77
+ 4. Preserve style/language/detail consistency with existing plan
78
+
79
+ ## Core Workflow
80
+
81
+ Execute the selected scenario workflow in conversation mode with mandatory checkpoints:
82
+
83
+ ### Interactive Phases
84
+ 1. clarify business goal and scope
85
+ 2. confirm constraints and tech assumptions
86
+ 3. propose feature set with dependencies
87
+ 4. refine descriptions and acceptance criteria
88
+ 5. verify DAG/order/priorities
89
+ 6. build or append `feature-list.json`
90
+ 7. validate and fix until pass
91
+ 8. summarize final feature table
92
+
93
+ ### Checkpoints (Mandatory Gates)
94
+
95
+ Never skip checkpoints. If any checkpoint fails, follow error recovery flow (see §Error Recovery).
96
+
97
+ | Checkpoint | Artifact/State | Criteria | Phase |
98
+ |-----------|----------------|----------|-------|
99
+ | **CP-AP-1** | Vision Summary | Goal/users/differentiators confirmed by user | 1-2 |
100
+ | **CP-AP-2** | Feature Proposals | Feature set with titles+deps identified (pre-validation) | 3-5 |
101
+ | **CP-AP-3** | DAG Validity | No cycles, dependencies resolved (validation dry-run) | 6 |
102
+ | **CP-AP-4** | `feature-list.json` Generated | Schema validates, all required keys present | 6 |
103
+ | **CP-AP-5** | Final Validation Pass | Python script returns `"valid": true` with zero errors | 7 |
104
+
105
+ **Resume Detection**: See §Resume Support for checkpoint-based resumption.
106
+
107
+ ## Fast Path — Incremental Shortcuts
108
+
109
+ For simple incremental planning, skip detailed Phase 2-3 analysis to accelerate delivery:
110
+
111
+ ### Eligibility Criteria (ALL must apply)
112
+ - **Incremental mode only** not new app planning
113
+ - **Adding 1-2 features max** to existing plan
114
+ - **Each feature**: ≤5 acceptance criteria, <100 words description
115
+ - **Dependencies**: depends on ≤2 existing features (no chains)
116
+ - **Complexity**: "low" or "medium" only
117
+ - **No architectural changes** to existing tech stack
118
+
119
+ ### Fast Path Workflow
120
+ 1. Read existing `feature-list.json` and confirm scope
121
+ 2. Generate next sequential feature IDs
122
+ 3. Draft features (title + description + acceptance_criteria + dependencies)
123
+ 4. Run validation script immediately
124
+ 5. If valid → summarize and recommend next step
125
+ 6. If invalid → apply fixes, re-validate (max 2 attempts, then escalate to full workflow)
126
+
127
+ ### When NOT to Use Fast Path
128
+ - New app planning (always use full workflow)
129
+ - Adding >2 features in one session
130
+ - Features with complex interdependencies (>2 dependencies)
131
+ - High complexity features requiring architecture decisions
132
+ - Changes affecting >3 existing features
133
+
134
+ ### Example Fast Path Session
166
135
  ```
167
- F-001: Project Infrastructure Setup
168
- |
169
- +-- F-002: User Authentication
170
- | |
171
- | +-- F-003: Task CRUD Operations
172
- | |
173
- | +-- F-004: Project & Team Management
174
- | |
175
- | +-- F-005: Real-time Updates
176
- | |
177
- | +-- F-006: Analytics Dashboard (also depends on F-004)
136
+ User: "Add email verification to existing user module."
137
+ AI: [Detects incremental mode]
138
+ AI: [Checks existing plan: found 8 features, user module exists]
139
+ AI: [Qualifies for fast path: 1 feature, low complexity, ≤2 deps]
140
+ AI: "Fast path available. Drafting F-009..."
141
+ AI: [Validates immediately]
142
+ AI: "Ready to proceed to dev-pipeline."
178
143
  ```
179
144
 
180
- **Step 4c: Priority Assignment**
181
-
182
- Assign priority numbers (1 = highest) based on dependency order and user input. Features with no dependents and early in the chain get higher priority.
145
+ ## Output Rules
183
146
 
184
- Ask the user: "Does this execution order look correct? Any features you want prioritized differently?"
147
+ `feature-list.json` must satisfy:
148
+ - `$schema` = `dev-pipeline-feature-list-v1`
149
+ - non-empty `features`
150
+ - sequential feature IDs (`F-001`, `F-002`, ...)
151
+ - valid dependency DAG
152
+ - new items default `status: "pending"`
153
+ - English feature titles for stable slug generation
185
154
 
186
- ---
155
+ ## Next-Step Execution Policy (after planning)
187
156
 
188
- ### Phase 5: Granularity Decision
157
+ Recommend these three options in this strict order:
189
158
 
190
- **Goal**: Determine whether complex features need sub-feature decomposition.
191
-
192
- Apply these rules to each feature:
193
-
194
- | Condition | Action |
195
- |-----------|--------|
196
- | More than 8 acceptance criteria | Consider splitting into sub_features |
197
- | Touches more than 3 distinct modules (e.g., API + DB + UI + auth) | Consider splitting into sub_features |
198
- | Estimated complexity is "high" | Recommend sub_features with `session_granularity: "auto"` |
199
- | Infrastructure or setup feature | Always use `session_granularity: "feature"` |
200
- | Simple CRUD or utility feature | Use `session_granularity: "feature"` |
201
-
202
- When splitting, create sub_features with IDs like `F-004-A`, `F-004-B`, etc. Each sub_feature needs:
203
- - `id`: F-NNN-X pattern (X is uppercase letter)
204
- - `title`: concise title
205
- - `description`: what this sub-feature covers
206
-
207
- Present the granularity decisions to the user and get confirmation.
208
-
209
- ---
210
-
211
- ### Phase 6: Generate Output
212
-
213
- **Goal**: Produce the validated `feature-list.json` file.
214
-
215
- **Step 6a: Construct the JSON**
216
-
217
- Build the complete JSON object following this exact schema:
218
-
219
- ```json
220
- {
221
- "$schema": "dev-pipeline-feature-list-v1",
222
- "app_name": "<from Phase 1>",
223
- "app_description": "<1-2 sentence summary from Phase 1>",
224
- "created_at": "<current ISO 8601 datetime>",
225
- "created_by": "app-planner",
226
- "source_spec": "<path to spec file if one was used, otherwise omit>",
227
- "features": [
228
- {
229
- "id": "F-001",
230
- "title": "<feature title>",
231
- "description": "<detailed description>",
232
- "priority": 1,
233
- "estimated_complexity": "low | medium | high",
234
- "dependencies": [],
235
- "acceptance_criteria": [
236
- "<criterion 1>",
237
- "<criterion 2>",
238
- "<criterion 3>"
239
- ],
240
- "status": "pending",
241
- "session_granularity": "feature | sub_feature | auto",
242
- "sub_features": []
243
- }
244
- ],
245
- "global_context": {
246
- "tech_stack": "<from Phase 2, e.g. Next.js 14 + Express.js + PostgreSQL + Prisma>",
247
- "design_system": "<from Phase 2, e.g. shadcn/ui + Tailwind CSS>",
248
- "testing_strategy": "<from Phase 2, e.g. Jest (unit) + Playwright (e2e)>",
249
- "language": "<from Phase 2, e.g. TypeScript>"
250
- }
251
- }
252
- ```
253
-
254
- **Step 6b: Write and Validate**
255
-
256
- 1. Write the JSON to the project root `feature-list.json` (this is the default path that `dev-pipeline/run.sh` reads from). If a `feature-list.json` already exists, append new features to the existing `features` array (continuing from the last F-NNN ID) and update `global_context` if needed — do NOT overwrite the existing features.
257
- 2. Ask the user if they want a different output path before writing.
258
- 3. Run the validation script:
259
-
260
- ```bash
261
- python3 ${SKILL_DIR}/scripts/validate-and-generate.py --input <path-to-written-file> --output <final-output-path>
262
- ```
263
-
264
- 4. If validation fails, report the errors and fix them.
265
- 5. If validation succeeds, proceed to the summary.
266
-
267
- **Step 6c: Summary Table**
268
-
269
- Present a summary table of the plan:
270
-
271
- ```
272
- +-------+-----------------------------------+----------+--------+--------------+
273
- | ID | Title | Priority | Cmplx | Dependencies |
274
- +-------+-----------------------------------+----------+--------+--------------+
275
- | F-001 | Project Infrastructure Setup | 1 | medium | (none) |
276
- | F-002 | User Authentication | 2 | medium | F-001 |
277
- | F-003 | Task CRUD Operations | 3 | medium | F-002 |
278
- | ... | ... | ... | ... | ... |
279
- +-------+-----------------------------------+----------+--------+--------------+
280
- Total features: N | Estimated sessions: M
281
- ```
282
-
283
- Where "Estimated sessions" counts features plus sub_features (each sub_feature is one session when granularity is "auto").
284
-
285
- ---
286
-
287
- ### Phase 7: Integration with dev-pipeline
288
-
289
- **Goal**: Tell the user how to proceed.
290
-
291
- After the feature-list.json is generated and validated, present these next steps:
292
-
293
- 1. **Review the file**: "The feature list has been saved to `feature-list.json`. Please review it before running the pipeline."
294
-
295
- 2. **Run the pipeline**:
159
+ 1. **Preferred**: invoke `dev-pipeline-launcher` skill (natural-language handoff)
160
+ 2. **Fallback A**: run daemon wrapper
296
161
  ```bash
297
- ./dev-pipeline/run.sh run
162
+ ./dev-pipeline/launch-daemon.sh start feature-list.json
163
+ ./dev-pipeline/launch-daemon.sh status
298
164
  ```
299
-
300
- 3. **Monitor progress**:
165
+ 3. **Fallback B**: run direct foreground script
301
166
  ```bash
167
+ ./dev-pipeline/run.sh run
302
168
  ./dev-pipeline/run.sh status
303
169
  ```
304
170
 
305
- 4. **Adjust if needed**: "You can edit the feature-list.json manually at any time. The pipeline will pick up changes on the next iteration."
171
+ When launcher is available, do not prioritize raw scripts.
306
172
 
307
- If the dev-pipeline directory does not exist in the project, inform the user that they need to set it up first and point them to the dev-pipeline documentation.
173
+ ## Error Recovery
308
174
 
309
- ## Output Format Specification
175
+ Structured error handling for interrupted sessions and validation failures.
310
176
 
311
- The `feature-list.json` file is the input contract for `dev-pipeline/run.sh`. It MUST conform to the `dev-pipeline-feature-list-v1` schema. The file is read by:
177
+ ### Validation Failures
312
178
 
313
- 1. **`run.sh`** iterates features by dependency order, passes each to `generate-bootstrap-prompt.py`
314
- 2. **`generate-bootstrap-prompt.py`** — extracts feature fields and injects them into the bootstrap prompt template as `{{PLACEHOLDER}}` variables
315
- 3. **`update-feature-status.py`** — reads/writes `status` field to track pipeline progress
316
- 4. **`init-pipeline.py`** — validates the file and initializes pipeline state
179
+ When `python3 scripts/validate-and-generate.py validate --input <file> --mode <mode>` returns errors:
317
180
 
318
- ### File Location
181
+ #### Parse validation output
182
+ Script returns JSON with `"valid": false`, `"errors": [...]`, `"warnings": [...]`
319
183
 
320
- The file MUST be at **project root `feature-list.json`**. This is the default path that `run.sh` reads:
184
+ #### Decision Tree
321
185
 
322
- ```bash
323
- # run.sh defaults:
324
- main() {
325
- local feature_list="${1:-feature-list.json}"
326
- ...
327
- }
328
- ```
186
+ **if `error_count == 0` (warnings only):**
187
+ - Proceed with user approval
188
+ - Show warnings and ask: "Continue? (Y/n)"
329
189
 
330
- Usage:
331
- ```bash
332
- ./dev-pipeline/run.sh run # reads ./feature-list.json
333
- ./dev-pipeline/run.sh run feature-list.json # same (explicit)
334
- ./dev-pipeline/run.sh status # reads ./feature-list.json
335
- ```
190
+ **elif `error_count > 0` (critical errors):**
191
+
192
+ Group errors by type and apply targeted fixes:
336
193
 
337
- ### Top-Level Fields
338
-
339
- | Field | Type | Required | Description |
340
- |-------|------|----------|-------------|
341
- | `$schema` | string | Yes | Must be `"dev-pipeline-feature-list-v1"` |
342
- | `app_name` | string | Yes | Application name (min 1 char) |
343
- | `app_description` | string | No | Brief description of the application |
344
- | `created_at` | string | No | ISO 8601 datetime of creation |
345
- | `created_by` | string | No | Should be `"app-planner"` |
346
- | `source_spec` | string | No | Path to source specification file |
347
- | `features` | array | Yes | Array of feature objects (min 1) |
348
- | `global_context` | object | No | Shared context for all features |
349
-
350
- ### Feature Object Fields
351
-
352
- Each feature object maps to one `cbc` session (or multiple sessions if `session_granularity` is `"auto"` with sub_features). The pipeline extracts these fields into the bootstrap prompt template:
353
-
354
- | Field | Type | Required | Pipeline Usage (template placeholder) | Description |
355
- |-------|------|----------|--------------------------------------|-------------|
356
- | `id` | string | Yes | `{{FEATURE_ID}}` | Pattern: `F-NNN` (e.g., F-001, F-012). Used as directory key in `state/features/F-NNN/` |
357
- | `title` | string | Yes | `{{FEATURE_TITLE}}` | Concise English feature title. Also used to compute `{{FEATURE_SLUG}}` (e.g., "Shared UI Package Extraction" → `011-shared-ui-package-extraction`). The slug determines the `.prizmkit/specs/{slug}/` directory |
358
- | `description` | string | Yes | `{{FEATURE_DESCRIPTION}}` | Detailed implementation description in English. Injected verbatim into the bootstrap prompt. Must contain enough context for a dev team to implement without additional clarification. Include: component names, API endpoints, data models, file paths, behavior specs |
359
- | `priority` | integer | Yes | — | Execution priority (1 = highest). Pipeline processes features by dependency order, not strictly by priority, but priority is used as tiebreaker |
360
- | `estimated_complexity` | string | No | `{{COMPLEXITY}}`, `{{PIPELINE_MODE}}` | `"low"` → lite mode, `"medium"` → standard mode, `"high"` → full mode. Determines how many pipeline phases are executed (lite skips spec.md + analyze, standard runs all, full adds clarify) |
361
- | `dependencies` | array | Yes | `{{COMPLETED_DEPENDENCIES}}` | Array of F-NNN IDs this feature depends on. Pipeline will not start this feature until all dependencies have `status: "completed"`. Injected into prompt as a list of completed dependency names |
362
- | `acceptance_criteria` | array | Yes | `{{ACCEPTANCE_CRITERIA}}` | Array of testable criteria (min 3, recommend 5+ for medium/high). Injected as markdown bullet list into the bootstrap prompt. Each criterion should be independently verifiable |
363
- | `status` | string | Yes | — | Pipeline-managed: `"pending"` → `"in_progress"` → `"completed"` / `"failed"`. New features MUST be `"pending"`. Do not manually set to other values |
364
- | `session_granularity` | string | No | — | `"feature"` (default): one session for the whole feature. `"auto"`: pipeline may split into sub_feature sessions. `"sub_feature"`: always run sub_features as separate sessions |
365
- | `sub_features` | array | No | — | Array of sub-feature objects. Only used when `session_granularity` is `"auto"` or `"sub_feature"` |
366
-
367
- ### Sub-Feature Object Fields
368
-
369
- | Field | Type | Required | Description |
370
- |-------|------|----------|-------------|
371
- | `id` | string | Yes | Pattern: `F-NNN-X` (e.g., F-004-A, F-011-B). X is uppercase letter |
372
- | `title` | string | Yes | Sub-feature title |
373
- | `description` | string | Yes | What this sub-feature covers |
374
-
375
- ### Global Context Fields
376
-
377
- Injected as `{{GLOBAL_CONTEXT}}` into every bootstrap prompt (formatted as markdown key-value list):
378
-
379
- | Field | Type | Description |
380
- |-------|------|-------------|
381
- | `tech_stack` | string | Frameworks, runtimes, and databases |
382
- | `design_system` | string | UI framework and CSS approach |
383
- | `testing_strategy` | string | Testing tools and approach |
384
- | `language` | string | Programming language(s) |
385
- | Any additional keys | string | Deployment strategy, encryption, communication patterns, etc. |
386
-
387
- ### How Fields Flow Through the Pipeline
194
+ | Error Type | Symptom | Fix Offered | Auto-Fix? |
195
+ |-----------|---------|------------|-----------|
196
+ | **Schema mismatch** | `$schema` invalid, missing `app_name`, wrong `features` type | "Set `$schema` to `dev-pipeline-feature-list-v1`, `app_name` to string" | Yes |
197
+ | **Feature ID issues** | Invalid format (not `F-NNN`), duplicate IDs, undefined refs | "Suggest corrected IDs, show duplicates" | Yes |
198
+ | **Dependency errors** | Circular dependency, undefined target features | "Show cycle chain (e.g., `F-003 → F-005 → F-003`), suggest break point" | No |
199
+ | **Missing fields** | Feature missing required keys (title, description, AC) | "List each feature + missing keys, guide patch" | Partial |
200
+ | **Insufficient AC** | Feature has <2 acceptance criteria | "Show feature, suggest AC examples" | No |
201
+ | **Invalid values** | complexity not in [low/medium/high], status not pending | "Show field, valid values" | Yes |
202
+
203
+ #### Execution
388
204
 
389
205
  ```
390
- feature-list.json
391
-
392
- ├─ generate-bootstrap-prompt.py
393
- │ ├─ id {{FEATURE_ID}}
394
- │ ├─ title → {{FEATURE_TITLE}}, {{FEATURE_SLUG}} (computed: NNN-kebab-case-title)
395
- │ ├─ description{{FEATURE_DESCRIPTION}}
396
- │ ├─ acceptance_criteria → {{ACCEPTANCE_CRITERIA}} (markdown bullet list)
397
- │ ├─ dependencies {{COMPLETED_DEPENDENCIES}} (resolved to names + status)
398
- │ ├─ estimated_complexity {{COMPLEXITY}}, {{PIPELINE_MODE}} (low→lite, medium→standard, high→full)
399
- │ └─ global_context {{GLOBAL_CONTEXT}} (all key-value pairs)
400
-
401
- ├─ bootstrap-prompt.md (rendered template)
402
- │ └─ Fed to: cbc --print -y < bootstrap-prompt.md
403
- │ └─ prizm-dev-team session
404
- │ ├─ PM: generates .prizmkit/specs/{{FEATURE_SLUG}}/spec.md, plan.md, tasks.md
405
- │ ├─ Dev: implements code based on plan + tasks
406
- │ ├─ Reviewer: validates against acceptance_criteria
407
- │ └─ Coordinator: commits with feat({{FEATURE_ID}}): {{FEATURE_TITLE}}
408
-
409
- └─ update-feature-status.py
410
- └─ status: "pending" → "in_progress" → "completed" / "failed"
206
+ For auto-fixable errors:
207
+ 1. Show summary: "Found N schema/ID/format issues"
208
+ 2. Offer: auto-fix? (Y/n)
209
+ 3. Apply fix regenerate file
210
+ 4. Re-run validation
211
+ 5. If new errors loop (max 2 more attempts)
212
+
213
+ For manual fixes (dependencies, AC content):
214
+ 1. Show concise prompt: "Edit line X-Y in feature-list.json"
215
+ 2. Wait for user action
216
+ 3. Retry validation (max 2 more attempts)
217
+
218
+ if all_retries_exceeded:
219
+ Escalate: "After 3 attempts, validation still fails.
220
+ (a) Review file manually, OR
221
+ (b) Restart planning from Phase 1"
411
222
  ```
412
223
 
413
- ### Feature Slug Convention
224
+ ### Interrupted Planning Resume
414
225
 
415
- The pipeline computes a **feature slug** from `id` + `title` for the `.prizmkit/specs/` directory:
226
+ | Scenario | Detection | Action |
227
+ |----------|-----------|--------|
228
+ | Partial `feature-list.json` exists | File found in working dir | Read file, show summary, ask: "Resume from checkpoint or restart?" |
229
+ | Checkpoint CP-AP-4 passed | File generates valid schema | Offer: "Jump to Phase 7 (final validation)" |
230
+ | Checkpoint CP-AP-5 passed | Full validation passes | Offer: "Feature plan complete, proceed to dev-pipeline" |
231
+ | User restarts mid-session | User says "restart" | Return to Phase 1 Vision, or load previous checkpoint if requested |
232
+ | Max validation retries exceeded | 3 failed validation loops | Offer: (a) manual review, (b) restart from Phase 1 |
416
233
 
417
- ```
418
- F-003 + "Task CRUD Operations" → "003-task-crud-operations"
419
- ```
234
+ ### Incremental Mode Abort
420
235
 
421
- Rules:
422
- - Extract numeric part from id (F-011 011), zero-pad to 3 digits
423
- - Convert title to lowercase kebab-case (remove non-alphanumeric, spaces → hyphens)
424
- - Concatenate: `{NNN}-{kebab-title}`
236
+ If in Incremental mode but existing `feature-list.json` not found:
237
+ - Ask: "Start new plan or provide existing file?"
238
+ - If new plan chosen → switch to Route A (New App Planning)
239
+ - If existing file uploaded → continue Route B
425
240
 
426
- This slug is used as:
427
- - `.prizmkit/specs/{slug}/spec.md`
428
- - `.prizmkit/specs/{slug}/plan.md`
429
- - `.prizmkit/specs/{slug}/tasks.md`
430
- - Git commit: `feat(F-003): Task CRUD Operations`
241
+ ## Incremental Feature Planning — Style Matching
431
242
 
432
- ### Complexity Pipeline Mode Mapping
243
+ When appending features to an existing plan, preserve style and detail level automatically.
433
244
 
434
- The `estimated_complexity` field determines which pipeline phases are executed:
245
+ ### Style Detection (Automatic)
435
246
 
436
- | Complexity | Mode | Phases Run | When to Use |
437
- |-----------|------|------------|-------------|
438
- | `"low"` | lite | plan + tasks → implement → review → commit (skip spec, skip analyze) | Simple setup, config, or utility features |
439
- | `"medium"` | standard | spec + plan + tasks → analyze → implement → review → commit | Standard features with clear scope |
440
- | `"high"` | full | spec + clarify + plan + tasks → analyze → implement → review (3 fix rounds) → commit | Complex features touching multiple modules, requiring sub_features |
247
+ Before drafting new features, analyze existing plan:
441
248
 
442
- ## Quality Guidelines
249
+ 1. **Language Detection**
250
+ - Scan `title` and `description` fields
251
+ - If >70% English titles → default to English
252
+ - If >70% Chinese titles → suggest Chinese (or allow bilingual)
443
253
 
444
- These rules MUST be enforced when generating the feature list:
254
+ 2. **Description Density**
255
+ - Calculate avg word count per description
256
+ - If avg <30 words → draft concise descriptions
257
+ - If avg 30-80 words → draft standard detail
258
+ - If avg >80 words → draft detailed descriptions
445
259
 
446
- 1. **Minimum acceptance criteria**: Every feature MUST have at least 3 acceptance criteria. Aim for 5 on medium/high complexity features.
447
- 2. **Valid DAG**: Dependencies MUST NOT contain cycles. Run a topological sort check before finalizing.
448
- 3. **Root feature**: F-001 MUST have an empty dependencies array. It is always the infrastructure/setup feature.
449
- 4. **Implementable scope**: Each feature should be implementable in a single prizm-dev-team session. If it cannot be, split it into sub_features.
450
- 5. **Self-contained descriptions**: Feature descriptions MUST contain enough detail for a development team to implement the feature without asking clarifying questions. Include data models, API endpoints, and UI behavior where relevant. The description is injected verbatim into the bootstrap prompt — the dev agent reads only this text to understand what to build.
451
- 6. **No status assumptions**: All new features MUST have `"status": "pending"`. The dev-pipeline manages status transitions (`pending` → `in_progress` → `completed`/`failed`). Do NOT manually set status to `"completed"` or `"in_progress"` for new features.
452
- 7. **Consistent IDs**: Feature IDs MUST be sequential (F-001, F-002, ...). Sub-feature IDs MUST use the parent ID prefix (F-004-A, F-004-B). When appending to an existing feature list, continue from the next available ID (e.g., if F-010 exists, start new features from F-011).
453
- 8. **Dependency completeness**: Every ID referenced in a `dependencies` array MUST exist as a feature `id` in the same file.
454
- 9. **Style consistency**: When appending to an existing feature list, match the language (English/Chinese), description detail level, and acceptance criteria format of the existing features.
455
- 10. **English titles**: Feature `title` MUST be in English because the pipeline uses it to compute the feature slug for directory naming (`.prizmkit/specs/{slug}/`). Non-ASCII characters in the title will produce invalid directory names.
456
- 11. **Description language**: Feature `description` should use the same language as existing features in the file. When appending to an existing list, match the language and detail level of prior features.
260
+ 3. **Acceptance Criteria Patterns**
261
+ - Count avg AC per feature
262
+ - Identify dominant format (Given/When/Then Gherkin, BDD, or loose)
263
+ - Draft new AC in same format
457
264
 
458
- ## Validation Script Usage
265
+ 4. **Complexity Distribution**
266
+ - Count low/medium/high distribution in existing features
267
+ - Alert if new features deviate significantly (>20 percentile points)
268
+ - Suggest rebalancing if needed
459
269
 
460
- After constructing the feature-list.json, validate it:
270
+ ### Style Consistency Prompt
461
271
 
462
- ```bash
463
- python3 ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
464
- ```
272
+ If new features deviate significantly from detected style:
465
273
 
466
- The script performs:
467
- - JSON schema validation against `dev-pipeline-feature-list-v1`
468
- - Dependency cycle detection
469
- - ID format and uniqueness checks
470
- - Acceptance criteria minimum count enforcement
471
- - Dependency reference integrity checks
472
-
473
- On success, exits with code 0 and prints stats (total features, complexity distribution, max dependency depth).
474
- On failure, prints error details and exits with code 1.
475
-
476
- Note: Warnings about existing features having `status: "completed"` are expected when appending to an existing feature list — they apply only to new plans where all features should be `"pending"`.
477
-
478
- ## Example: Well-Formed Feature
479
-
480
- ```json
481
- {
482
- "id": "F-003",
483
- "title": "Task CRUD Operations",
484
- "description": "Core task management: create, read, update, delete tasks. Tasks have title, description, status (todo/in-progress/done), priority, due date, and assignee. The API should expose RESTful endpoints under /api/tasks. The UI should include a task list view with filtering by status and a task detail modal for editing.\n\nData model: Task { id: uuid, title: string, description: text, status: enum(todo/in-progress/done), priority: enum(low/medium/high), dueDate: datetime, assigneeId: uuid FK→User, createdAt: datetime, updatedAt: datetime }.\n\nAPI endpoints: GET /api/tasks (list with pagination, filtering). POST /api/tasks (create). GET /api/tasks/:id (read). PATCH /api/tasks/:id (partial update). DELETE /api/tasks/:id (soft delete).\n\nUI: Task list page with status filter tabs, sortable columns, and a slide-out detail panel for editing.",
485
- "priority": 3,
486
- "estimated_complexity": "high",
487
- "dependencies": ["F-002"],
488
- "acceptance_criteria": [
489
- "Create task with title, description, status, priority, due date, and assignee fields",
490
- "List tasks with server-side pagination (default 20 per page)",
491
- "Filter tasks by status, priority, and assignee via query parameters",
492
- "Update task fields individually via PATCH /api/tasks/:id",
493
- "Delete task with confirmation dialog and soft-delete in database",
494
- "Task validation enforced on both client form and server API",
495
- "API returns 404 for non-existent task IDs",
496
- "API returns 401 for unauthenticated requests"
497
- ],
498
- "status": "pending",
499
- "session_granularity": "auto",
500
- "sub_features": [
501
- {
502
- "id": "F-003-A",
503
- "title": "Task API & Data Model",
504
- "description": "Create Task database model with migrations. Implement all RESTful API endpoints with validation, pagination, filtering, and error handling."
505
- },
506
- {
507
- "id": "F-003-B",
508
- "title": "Task UI Components",
509
- "description": "Build task list page with filter tabs, sortable table, and slide-out detail panel. Connect to API with loading states and optimistic updates."
510
- }
511
- ]
512
- }
274
+ ```
275
+ "Your new features use avg X words/description, but existing features use Y.
276
+ Current ratio: low:M%, medium:N%, high:O%.
277
+ Adjust new features to match? (Y/n)"
513
278
  ```
514
279
 
515
- ## Integration with dev-pipeline
280
+ Accept user choice, then adjust draft accordingly before Phase 6 (JSON generation).
516
281
 
517
- ### Running the Pipeline
282
+ ## Resume Support
518
283
 
519
- After the feature-list.json is generated and validated:
284
+ App-planner sessions can be resumed from the last completed checkpoint without losing context.
520
285
 
521
- ```bash
522
- # Initialize pipeline state (first time only)
523
- python3 dev-pipeline/scripts/init-pipeline.py \
524
- --feature-list feature-list.json \
525
- --state-dir dev-pipeline/state
286
+ ### Detection Logic
526
287
 
527
- # Run all pending features
528
- ./dev-pipeline/run.sh run
288
+ Check for artifact files in working directory:
529
289
 
530
- # Run a single feature
531
- ./dev-pipeline/run.sh run F-003
290
+ | Artifacts Found | Last Completed Checkpoint | Next Phase | Resume Action |
291
+ |-----------------|--------------------------|-----------|----------------|
292
+ | None | (new session) | Phase 1: Vision | Start fresh planning |
293
+ | `feature-list.json` exists | CP-AP-4 (file generated) | Phase 7: Final validation | Offer to validate or extend |
294
+ | `feature-list.json` + validation passed | CP-AP-5 (validation pass) | Handoff: dev-pipeline | Offer: execute pipeline now |
295
+ | Partial state (incomplete file) | CP-AP-2 or CP-AP-3 | Next phase after last checkpoint | Resume interactive planning |
532
296
 
533
- # Dry-run: inspect generated prompt without executing
534
- ./dev-pipeline/run.sh run F-003 --dry-run
297
+ ### Resume Command (Project Structure)
535
298
 
536
- # Check status
537
- ./dev-pipeline/run.sh status
299
+ For projects using `.prizmkit/` structure:
538
300
 
539
- # Reset a failed feature for retry
540
- ./dev-pipeline/reset-feature.sh F-003 --clean --run
301
+ ```bash
302
+ # Explicit resume (if file is not in current directory):
303
+ app-planner --resume-from <path-to-existing-feature-list.json>
541
304
  ```
542
305
 
543
- ### Pipeline State Directory
544
-
545
- Runtime state is stored in `dev-pipeline/state/` (gitignored):
546
-
306
+ AI detects existing file → suggests:
547
307
  ```
548
- dev-pipeline/state/
549
- ├── pipeline.json # Pipeline run metadata
550
- ├── current-session.json # Currently executing session
551
- └── features/
552
- └── F-003/
553
- ├── status.json # Feature status, retry count
554
- └── sessions/
555
- └── F-003-20260305120000/
556
- ├── bootstrap-prompt.md # Generated prompt
557
- └── logs/
558
- └── session.log # Full cbc session output
308
+ "Existing plan found with N features, M newly added.
309
+ Resume incremental planning? (Y/n)"
559
310
  ```
560
311
 
561
- ### PrizmKit Artifacts (per feature)
312
+ ### Artifact Path Convention
562
313
 
563
- Each feature session generates artifacts in `.prizmkit/specs/{feature-slug}/`:
314
+ Recommended structure for feature planning artifacts:
564
315
 
565
316
  ```
566
- .prizmkit/specs/003-task-crud-operations/
567
- ├── spec.md # Feature specification (Phase 1)
568
- ├── plan.md # Implementation plan (Phase 2)
569
- ├── tasks.md # Task breakdown with [ ] checkboxes (Phase 3)
570
- ├── checklists/ # Quality checklists (optional)
571
- └── contracts/ # API contracts (optional)
317
+ .prizmkit/planning/
318
+ ├── feature-list.json # Primary output (always here)
319
+ ├── feature-list.validated.json # Checkpoint backup after CP-AP-5
320
+ └── <ISO-timestamp>.backup.json # Optional incremental backups
572
321
  ```
573
322
 
574
- ## Error Recovery
323
+ Mention this path when summarizing (Phase 8 handoff) to help users organize future sessions.
324
+
325
+ Maintainer note: evaluation workflow moved to `assets/evaluation-guide.md`.
575
326
 
576
- If the planning conversation is interrupted or the user wants to restart:
327
+ ## Handoff Message Template
577
328
 
578
- 1. **Resume**: If a partial `feature-list.json` exists at the output path, offer to load it and continue from where the user left off.
579
- 2. **Restart**: If the user explicitly says "start over" or "re-plan", discard any existing draft and begin from Phase 1.
580
- 3. **Amend**: If the user wants to modify a completed plan, load the existing file, present the current features, and allow targeted edits without re-doing the entire workflow.
329
+ After successful validation, report:
330
+ 1. output file path
331
+ 2. total features + newly added features
332
+ 3. dependency and priority highlights
333
+ 4. recommended next action: `dev-pipeline-launcher`