prizmkit 1.0.0 → 1.0.1

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 (89) hide show
  1. package/bundled/VERSION.json +5 -0
  2. package/bundled/adapters/claude/agent-adapter.js +108 -0
  3. package/bundled/adapters/claude/command-adapter.js +104 -0
  4. package/bundled/adapters/claude/paths.js +35 -0
  5. package/bundled/adapters/claude/rules-adapter.js +77 -0
  6. package/bundled/adapters/claude/settings-adapter.js +73 -0
  7. package/bundled/adapters/claude/team-adapter.js +183 -0
  8. package/bundled/adapters/codebuddy/agent-adapter.js +43 -0
  9. package/bundled/adapters/codebuddy/paths.js +29 -0
  10. package/bundled/adapters/codebuddy/settings-adapter.js +47 -0
  11. package/bundled/adapters/codebuddy/skill-adapter.js +68 -0
  12. package/bundled/adapters/codebuddy/team-adapter.js +46 -0
  13. package/bundled/adapters/shared/frontmatter.js +77 -0
  14. package/bundled/agents/prizm-dev-team-coordinator.md +142 -0
  15. package/bundled/agents/prizm-dev-team-dev.md +99 -0
  16. package/bundled/agents/prizm-dev-team-pm.md +114 -0
  17. package/bundled/agents/prizm-dev-team-reviewer.md +119 -0
  18. package/bundled/dev-pipeline/README.md +482 -0
  19. package/bundled/dev-pipeline/assets/feature-list-example.json +147 -0
  20. package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +138 -0
  21. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +425 -0
  22. package/bundled/dev-pipeline/launch-daemon.sh +549 -0
  23. package/bundled/dev-pipeline/reset-feature.sh +209 -0
  24. package/bundled/dev-pipeline/retry-bug.sh +344 -0
  25. package/bundled/dev-pipeline/retry-feature.sh +338 -0
  26. package/bundled/dev-pipeline/run-bugfix.sh +638 -0
  27. package/bundled/dev-pipeline/run.sh +845 -0
  28. package/bundled/dev-pipeline/scripts/check-session-status.py +158 -0
  29. package/bundled/dev-pipeline/scripts/detect-stuck.py +385 -0
  30. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +598 -0
  31. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +402 -0
  32. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +294 -0
  33. package/bundled/dev-pipeline/scripts/init-dev-team.py +134 -0
  34. package/bundled/dev-pipeline/scripts/init-pipeline.py +335 -0
  35. package/bundled/dev-pipeline/scripts/update-bug-status.py +748 -0
  36. package/bundled/dev-pipeline/scripts/update-feature-status.py +1076 -0
  37. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +262 -0
  38. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +159 -0
  39. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +291 -0
  40. package/bundled/dev-pipeline/templates/feature-list-schema.json +112 -0
  41. package/bundled/dev-pipeline/templates/session-status-schema.json +77 -0
  42. package/bundled/skills/_metadata.json +267 -0
  43. package/bundled/skills/app-planner/SKILL.md +580 -0
  44. package/bundled/skills/app-planner/assets/planning-guide.md +313 -0
  45. package/bundled/skills/app-planner/scripts/validate-and-generate.py +758 -0
  46. package/bundled/skills/bug-planner/SKILL.md +235 -0
  47. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +252 -0
  48. package/bundled/skills/dev-pipeline-launcher/SKILL.md +223 -0
  49. package/bundled/skills/prizm-kit/SKILL.md +151 -0
  50. package/bundled/skills/prizm-kit/assets/claude-md-template.md +38 -0
  51. package/bundled/skills/prizm-kit/assets/codebuddy-md-template.md +35 -0
  52. package/bundled/skills/prizm-kit/assets/hooks/prizm-commit-hook.json +15 -0
  53. package/bundled/skills/prizmkit-adr-manager/SKILL.md +68 -0
  54. package/bundled/skills/prizmkit-adr-manager/assets/adr-template.md +26 -0
  55. package/bundled/skills/prizmkit-analyze/SKILL.md +194 -0
  56. package/bundled/skills/prizmkit-api-doc-generator/SKILL.md +56 -0
  57. package/bundled/skills/prizmkit-bug-fix-workflow/SKILL.md +351 -0
  58. package/bundled/skills/prizmkit-bug-reproducer/SKILL.md +62 -0
  59. package/bundled/skills/prizmkit-ci-cd-generator/SKILL.md +54 -0
  60. package/bundled/skills/prizmkit-clarify/SKILL.md +52 -0
  61. package/bundled/skills/prizmkit-code-review/SKILL.md +70 -0
  62. package/bundled/skills/prizmkit-committer/SKILL.md +117 -0
  63. package/bundled/skills/prizmkit-db-migration/SKILL.md +65 -0
  64. package/bundled/skills/prizmkit-dependency-health/SKILL.md +123 -0
  65. package/bundled/skills/prizmkit-deployment-strategy/SKILL.md +58 -0
  66. package/bundled/skills/prizmkit-error-triage/SKILL.md +55 -0
  67. package/bundled/skills/prizmkit-implement/SKILL.md +47 -0
  68. package/bundled/skills/prizmkit-init/SKILL.md +156 -0
  69. package/bundled/skills/prizmkit-log-analyzer/SKILL.md +55 -0
  70. package/bundled/skills/prizmkit-monitoring-setup/SKILL.md +75 -0
  71. package/bundled/skills/prizmkit-onboarding-generator/SKILL.md +70 -0
  72. package/bundled/skills/prizmkit-perf-profiler/SKILL.md +55 -0
  73. package/bundled/skills/prizmkit-plan/SKILL.md +54 -0
  74. package/bundled/skills/prizmkit-plan/assets/plan-template.md +37 -0
  75. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +140 -0
  76. package/bundled/skills/prizmkit-prizm-docs/assets/PRIZM-SPEC.md +943 -0
  77. package/bundled/skills/prizmkit-retrospective/SKILL.md +79 -0
  78. package/bundled/skills/prizmkit-security-audit/SKILL.md +130 -0
  79. package/bundled/skills/prizmkit-specify/SKILL.md +52 -0
  80. package/bundled/skills/prizmkit-specify/assets/spec-template.md +37 -0
  81. package/bundled/skills/prizmkit-summarize/SKILL.md +51 -0
  82. package/bundled/skills/prizmkit-summarize/assets/registry-template.md +18 -0
  83. package/bundled/skills/prizmkit-tasks/SKILL.md +50 -0
  84. package/bundled/skills/prizmkit-tasks/assets/tasks-template.md +21 -0
  85. package/bundled/skills/prizmkit-tech-debt-tracker/SKILL.md +139 -0
  86. package/bundled/team/prizm-dev-team.json +47 -0
  87. package/bundled/templates/claude-md-template.md +38 -0
  88. package/bundled/templates/codebuddy-md-template.md +35 -0
  89. package/package.json +2 -1
@@ -0,0 +1,580 @@
1
+ ---
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."
4
+ ---
5
+
6
+ # App Planner
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.
9
+
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.
13
+
14
+ ## When to Use
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"
22
+
23
+ Chinese triggers (zhong wen chu fa):
24
+ - "规划一个应用", "设计一个新项目", "帮我拆分功能"
25
+ - "生成功能列表", "准备 dev-pipeline 输入"
26
+
27
+ **Also trigger this skill when:**
28
+
29
+ - "Add new features to the plan", "Continue planning", "Plan next features"
30
+ - "继续规划", "添加新功能到计划中"
31
+
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).
33
+
34
+ **DO NOT use this skill when:**
35
+
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)
38
+
39
+ ## Prerequisites
40
+
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
+
166
+ ```
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)
178
+ ```
179
+
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.
183
+
184
+ Ask the user: "Does this execution order look correct? Any features you want prioritized differently?"
185
+
186
+ ---
187
+
188
+ ### Phase 5: Granularity Decision
189
+
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**:
296
+ ```bash
297
+ ./dev-pipeline/run.sh run
298
+ ```
299
+
300
+ 3. **Monitor progress**:
301
+ ```bash
302
+ ./dev-pipeline/run.sh status
303
+ ```
304
+
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."
306
+
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.
308
+
309
+ ## Output Format Specification
310
+
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:
312
+
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
317
+
318
+ ### File Location
319
+
320
+ The file MUST be at **project root `feature-list.json`**. This is the default path that `run.sh` reads:
321
+
322
+ ```bash
323
+ # run.sh defaults:
324
+ main() {
325
+ local feature_list="${1:-feature-list.json}"
326
+ ...
327
+ }
328
+ ```
329
+
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
+ ```
336
+
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
388
+
389
+ ```
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"
411
+ ```
412
+
413
+ ### Feature Slug Convention
414
+
415
+ The pipeline computes a **feature slug** from `id` + `title` for the `.prizmkit/specs/` directory:
416
+
417
+ ```
418
+ F-003 + "Task CRUD Operations" → "003-task-crud-operations"
419
+ ```
420
+
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}`
425
+
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`
431
+
432
+ ### Complexity → Pipeline Mode Mapping
433
+
434
+ The `estimated_complexity` field determines which pipeline phases are executed:
435
+
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 |
441
+
442
+ ## Quality Guidelines
443
+
444
+ These rules MUST be enforced when generating the feature list:
445
+
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.
457
+
458
+ ## Validation Script Usage
459
+
460
+ After constructing the feature-list.json, validate it:
461
+
462
+ ```bash
463
+ python3 ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
464
+ ```
465
+
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
+ }
513
+ ```
514
+
515
+ ## Integration with dev-pipeline
516
+
517
+ ### Running the Pipeline
518
+
519
+ After the feature-list.json is generated and validated:
520
+
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
526
+
527
+ # Run all pending features
528
+ ./dev-pipeline/run.sh run
529
+
530
+ # Run a single feature
531
+ ./dev-pipeline/run.sh run F-003
532
+
533
+ # Dry-run: inspect generated prompt without executing
534
+ ./dev-pipeline/run.sh run F-003 --dry-run
535
+
536
+ # Check status
537
+ ./dev-pipeline/run.sh status
538
+
539
+ # Reset a failed feature for retry
540
+ ./dev-pipeline/reset-feature.sh F-003 --clean --run
541
+ ```
542
+
543
+ ### Pipeline State Directory
544
+
545
+ Runtime state is stored in `dev-pipeline/state/` (gitignored):
546
+
547
+ ```
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
559
+ ```
560
+
561
+ ### PrizmKit Artifacts (per feature)
562
+
563
+ Each feature session generates artifacts in `.prizmkit/specs/{feature-slug}/`:
564
+
565
+ ```
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)
572
+ ```
573
+
574
+ ## Error Recovery
575
+
576
+ If the planning conversation is interrupted or the user wants to restart:
577
+
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.