prizmkit 1.0.144 → 1.0.148

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.
@@ -37,6 +37,7 @@ The user chose this skill intentionally. Respect that choice.
37
37
  1. `feature-list.json` (project root)
38
38
  2. Architecture decisions appended to `CLAUDE.md` / `CODEBUDDY.md` (with user consent, see §Architecture Decision Capture)
39
39
  3. Draft backups in `.prizmkit/planning/`
40
+ 4. `.prizmkit/project-conventions.json` (project convention answers, see §Project Conventions Check)
40
41
 
41
42
  **After planning is complete**, you MUST:
42
43
  1. Present the summary and recommended next step
@@ -71,13 +72,35 @@ Do NOT use this skill when the user only wants to run the pipeline (`dev-pipelin
71
72
  - Architecture decisions emerged → read `references/architecture-decisions.md`
72
73
  - Browser interaction fields needed → read `references/browser-interaction.md`
73
74
 
74
- 4. **Always validate output via script**:
75
+ 4. **Brainstorm deep-dive** If the user chooses to continue discussing or exploring ideas before finalizing features (e.g., during Intent Confirmation the user selects "just explore ideas", or at any point says "let's discuss more" / "I want to think through this"):
76
+ → read `references/brainstorm-guide.md` and follow its four-phase structured ideation process (Assess Clarity → Understand → Explore Approaches → Capture Design)
77
+ → During Phase C (Explore Approaches), also read `references/red-team-checklist.md` for adversarial critique of each approach
78
+ → When brainstorm Phase D produces a "Capture Design" summary, use it as the Vision Summary (fulfilling CP-AP-2) and proceed to Phase 2 (constraints and tech assumptions)
79
+
80
+ 5. **Frontend / UI design check** — Evaluate during Phase 2 (constraints and tech assumptions), after tech stack is confirmed. If the project has a frontend framework:
81
+ → Check project root for existing UI/UX design docs (scan for files matching: `design-system*`, `style-guide*`, `ui-guide*`, `ux-guide*`, `theme*`)
82
+ → Also search the active CLI's project instruction file (`CLAUDE.md` / `CODEBUDDY.md`) for keywords: "UI", "UX", "design system", "style guide", "theme", "typography", "color palette"
83
+ → If unified design guidance is found → use it as constraint for feature descriptions
84
+ → If NO unified design guidance found → ask user: "项目中未找到统一的 UI/UX 设计规范。是否需要在特性规划前先建立一套 UI/UX 设计方向?(No unified UI/UX design system found. Would you like to establish one before feature planning?)"
85
+ → If yes → read `references/frontend-design-guide.md` and conduct a design direction session. Capture the result in the project instruction file (with user consent).
86
+ → If no → proceed without; individual features may still define their own UI approach.
87
+
88
+ 6. **Project conventions check** — After Intent Confirmation (CP-AP-0), before brainstorm or Phase 1 vision work. This runs regardless of session goal (produce or explore):
89
+ → Read `.prizmkit/project-conventions.json` if it exists
90
+ → If the file exists but cannot be parsed as valid JSON → warn user ("conventions file is corrupted, will re-ask all questions"), treat all conventions as unanswered
91
+ → Cross-reference with `references/project-conventions.md` for the full question list
92
+ → For any convention with a `null` or missing value → batch all unanswered questions into a single prompt to the user
93
+ → Save answers to `.prizmkit/project-conventions.json` (create `.prizmkit/` directory if needed — this is an allowed writable output)
94
+ → If all conventions are already answered → skip silently, do not re-ask
95
+ → Use convention answers as context when writing feature descriptions and proposing features (see `references/project-conventions.md` §How Conventions Are Used)
96
+
97
+ 7. **Always validate output via script**:
75
98
  - run:
76
99
  ```bash
77
100
  python3 ${SKILL_DIR}/scripts/validate-and-generate.py validate --input <output-path> --mode <new|incremental>
78
101
  ```
79
102
 
80
- 5. **Use script output as source of truth**:
103
+ 8. **Use script output as source of truth**:
81
104
  - if validation fails, fix and re-run until pass
82
105
 
83
106
  ## Prerequisites
@@ -85,6 +108,7 @@ Do NOT use this skill when the user only wants to run the pipeline (`dev-pipelin
85
108
  Before questions, check optional context files (never block if absent):
86
109
  - `.prizm-docs/root.prizm` (architecture/project context)
87
110
  - `.prizmkit/config.json` (existing stack preferences and detected tech stack)
111
+ - `.prizmkit/project-conventions.json` (previously answered project conventions — see §Resource Loading Rules #6)
88
112
  - existing `feature-list.json` (required for incremental mode)
89
113
  - If `.prizm-docs/root.prizm` is absent and the project has existing source code, scan the directory structure to understand the codebase layout:
90
114
  ```bash
@@ -134,7 +158,10 @@ After scenario routing, immediately confirm the user's deliverable intent:
134
158
  2. **Route by answer**:
135
159
  - **"Produce feature-list.json"** → Continue to Core Workflow. Set session goal = `produce`.
136
160
  - **"Just explore ideas"** → Enter **Exploration Mode**:
137
- - Run Phases 1-5 normally (vision, constraints, feature proposals, refinement, DAG)
161
+ - Run project conventions check first (CP-AP-1) same as produce mode
162
+ - Load `references/brainstorm-guide.md` and follow its structured ideation process (Phases A-D)
163
+ - Brainstorm Phase D output serves as the Vision Summary (CP-AP-2)
164
+ - Continue with Phase 2 (constraints — including frontend design check CP-AP-3 if applicable), then Phases 3-5 normally
138
165
  - At Phase 5 completion, re-ask: "Ideas are taking shape. Ready to generate `feature-list.json` now?"
139
166
  - If yes → continue to Phase 6
140
167
  - If no → summarize discussion, suggest saving notes, end session
@@ -153,10 +180,10 @@ Execute the selected scenario workflow in conversation mode with mandatory check
153
180
  3. propose feature set with dependencies
154
181
  4. refine descriptions and acceptance criteria
155
182
  4.1 **per-feature clarification** — for each feature, if the description, acceptance criteria, or scope is vague or could be interpreted multiple ways, ask the user to clarify before finalizing. Continue until every feature has unambiguous, implementation-ready details.
156
- 4.2 **browser interaction evaluation** (mandatory for fullstack/frontend projects) — see §Browser Interaction Planning below. For each feature with UI-related acceptance criteria, you MUST ask the user whether to add `browser_interaction`. Do NOT skip or defer this step.
183
+ 4.2 **browser interaction** (mandatory for fullstack/frontend projects) — see §Browser Interaction Planning below. Qualifying features get `browser_interaction` by default. Only confirm with the user as a batch summary; do NOT ask per-feature.
157
184
  5. verify DAG/order/priorities
158
185
  6. build or append `feature-list.json`
159
- 7. ask whether to enable adversarial critic review for high/critical features
186
+ 7. apply default testing strategy (see §Testing Defaults below)
160
187
  8. validate and fix until pass
161
188
  9. summarize final feature table
162
189
 
@@ -164,16 +191,20 @@ Execute the selected scenario workflow in conversation mode with mandatory check
164
191
 
165
192
  Checkpoints catch cascading errors early — skipping one means the next phase builds on unvalidated assumptions, which compounds into much harder debugging later.
166
193
 
194
+ Note: Checkpoint numbers (CP-AP-N) are sequential identifiers for the gate, NOT phase numbers. See the "Phase" column for the corresponding workflow phase.
195
+
167
196
  | Checkpoint | Artifact/State | Criteria | Phase |
168
197
  |-----------|----------------|----------|-------|
169
198
  | **CP-AP-0** | Intent Confirmed | User confirmed session goal (produce / explore) | 1 |
170
- | **CP-AP-1** | Vision Summary | Goal/users/differentiators confirmed by user | 1-2 |
171
- | **CP-AP-2** | Feature Proposals | Feature set with titles+deps identified (pre-validation) | 3-5 |
172
- | **CP-AP-3** | DAG Validity | No cycles, dependencies resolved (validation dry-run) | 6 |
173
- | **CP-AP-3.2** | Browser Interaction Evaluated | For each feature with UI acceptance criteria: user was asked about browser verification | 4 |
174
- | **CP-AP-3.5** | Critic Decision | User decided on critic review for high/critical features | 7 |
175
- | **CP-AP-4** | `feature-list.json` Generated | Schema validates, all required keys present | 6-7 |
176
- | **CP-AP-5** | Final Validation Pass | Python script returns `"valid": true` with zero errors | 8 |
199
+ | **CP-AP-1** | Conventions Checked | Project conventions loaded or asked; `.prizmkit/project-conventions.json` up to date | 1 |
200
+ | **CP-AP-2** | Vision Summary | Goal/users/differentiators confirmed by user | 1-2 |
201
+ | **CP-AP-3** | Frontend Design Evaluated | For frontend projects: checked for existing UI/UX design system; user was asked if missing | 2 |
202
+ | **CP-AP-4** | Feature Proposals | Feature set with titles+deps identified (pre-validation) | 3-5 |
203
+ | **CP-AP-5** | DAG Validity | No cycles, dependencies resolved (validation dry-run) | 5 |
204
+ | **CP-AP-5.1** | Browser Interaction Applied | Qualifying features have `browser_interaction` field; user confirmed or opted out | 4 |
205
+ | **CP-AP-5.2** | Testing Defaults Applied | All features have appropriate `critic`, `critic_count`, and testing expectations per §Testing Defaults | 7 |
206
+ | **CP-AP-6** | `feature-list.json` Generated | Schema validates, all required keys present | 6-7 |
207
+ | **CP-AP-7** | Final Validation Pass | Python script returns `"valid": true` with zero errors | 8 |
177
208
 
178
209
  **Resume Detection**: If existing artifacts are found, read `references/error-recovery.md` §Resume Support for checkpoint-based resumption.
179
210
 
@@ -224,11 +255,11 @@ AI: "Ready to proceed to dev-pipeline."
224
255
 
225
256
  ## Browser Interaction Planning
226
257
 
227
- For fullstack/frontend projects, evaluate each feature for automated browser verification via `browser_interaction`. This is a **mandatory evaluation step** (Phase 4.2), not an optional suggestion.
258
+ For fullstack/frontend projects, qualifying features get `browser_interaction` **by default**. This is not opt-in it is the standard.
228
259
 
229
260
  ### Auto-Detection Rule
230
261
 
231
- A feature **qualifies** for browser interaction evaluation when ALL of these are true:
262
+ A feature **qualifies** for browser interaction when ALL of these are true:
232
263
  1. `global_context.frontend_framework` exists (project has a frontend)
233
264
  2. The feature's `acceptance_criteria` contain UI-related keywords: click, button, modal, page, form, display, navigate, tab, input, opens, shows, renders, visible, redirect, download, upload, preview, select, toggle, dropdown, popup, toast, menu
234
265
 
@@ -237,21 +268,19 @@ A feature is **exempt** when ANY of these are true:
237
268
  - It is config/setup/infrastructure
238
269
  - It has `status: "completed"` (already implemented)
239
270
 
240
- ### Mandatory Prompt (Phase 4.2)
241
-
242
- For EACH qualifying feature, you MUST ask:
243
-
244
- > "Feature {F-XXX} has UI behavior in its acceptance criteria. Add browser verification so the pipeline can auto-check it after implementation? (Y/n)"
271
+ ### Default Behavior (Phase 4.2)
245
272
 
246
- - If **yes** read `references/browser-interaction.md` for the `browser_interaction` object format and field rules. Generate the field for this feature.
247
- - If **no** record the decision and move on. No field is added.
248
- - If **user says no to all** skip remaining features (batch decline). Record that user declined browser verification globally.
273
+ 1. **Auto-generate** `browser_interaction` for ALL qualifying features. Read `references/browser-interaction.md` for the object format and field rules.
274
+ 2. **Present a summary** to the user showing which features received `browser_interaction`:
275
+ > "以下 N 个前端特性已自动添加 browser_interaction 用于 Playwright 自动验证:F-002, F-004, F-007。如需移除某个特性的浏览器验证,请告知。"
276
+ 3. **User can opt-OUT** specific features — remove the field for declined features.
277
+ 4. If **user opts out entirely** ("remove all browser verification") → remove all fields and record the decision.
249
278
 
250
- **You must NOT skip this prompt for qualifying features.** The checkpoint CP-AP-3.2 verifies this step was completed.
279
+ **You must NOT skip this step for qualifying features.** The checkpoint CP-AP-5.1 verifies this step was completed.
251
280
 
252
- ### When NOT to evaluate
281
+ ### When NOT to add
253
282
 
254
- **Do NOT prompt for**: backend-only features, config/setup features, or non-UI features. These are automatically exempt — no user prompt needed.
283
+ **Do NOT add for**: backend-only features, config/setup features, or non-UI features. These are automatically exempt.
255
284
 
256
285
  ## Output Rules
257
286
 
@@ -264,11 +293,64 @@ For EACH qualifying feature, you MUST ask:
264
293
  - new items default `status: "pending"`
265
294
  - English feature titles for stable slug generation
266
295
  - `model` field is optional — omitting it means the pipeline uses $MODEL env or CLI default
267
- - `critic` field is optional (boolean). If user requested adversarial critic review during planning, set `"critic": true` for relevant features. Omitting defaults to `false`.
268
- - `critic_count` field is optional (integer, 1 or 3). If omitted, defaults to 1 (single critic). Set to 3 for multi-critic voting mode on critical features.
269
- - `browser_interaction` field is optional (object). If user opted for browser verification during planning, set for features with UI behavior. Requires `playwright-cli` to be installed.
296
+ - `critic` field defaults based on priority: `true` for high/medium priority features, `false` for low. User can override.
297
+ - `critic_count` field defaults based on priority: `3` (multi-critic voting) for high priority, `1` (single critic) for medium. User can override.
298
+ - `browser_interaction` field is auto-generated for qualifying frontend features (see §Browser Interaction Planning). Requires `playwright-cli` to be installed.
270
299
  - **descriptions must be implementation-ready** — minimum 15 words (error), recommended 30/50/80 words for low/medium/high complexity (warning). See `planning-guide.md` §4 for what to include.
271
300
 
301
+ ## Testing Defaults (Phase 7)
302
+
303
+ All three testing mechanisms are **enabled by default** to maximize quality. The user can opt out of any mechanism, but the default is comprehensive testing.
304
+
305
+ ### 1. Test File Generation (TDD)
306
+
307
+ Every feature is expected to include tests. When writing feature descriptions, explicitly state testing expectations:
308
+
309
+ | Complexity | Default Testing Expectation |
310
+ |------------|----------------------------|
311
+ | low | Unit tests for core logic |
312
+ | medium | Unit tests + integration tests for key flows |
313
+ | high | Unit tests + integration tests + edge case coverage |
314
+
315
+ **In the feature description**, include a line like:
316
+ - "Include unit tests for [key functions/modules]."
317
+ - "Include integration tests verifying [API endpoints / data flows]."
318
+
319
+ This ensures the downstream `prizmkit-implement` skill (which uses TDD) has clear guidance on what tests to write.
320
+
321
+ ### 2. Browser Verification (Playwright)
322
+
323
+ See §Browser Interaction Planning above. Default: **ON** for all qualifying frontend features.
324
+
325
+ ### 3. Adversarial Critic Review (Multi-Agent)
326
+
327
+ Default assignments based on feature priority:
328
+
329
+ | Priority | `critic` | `critic_count` | Rationale |
330
+ |----------|----------|----------------|-----------|
331
+ | high | `true` | `3` | Multi-critic voting — catches more issues for critical features |
332
+ | medium | `true` | `1` | Single critic review — balanced cost/quality |
333
+ | low | `false` | (omitted) | Skip critic — simple features don't warrant the overhead |
334
+
335
+ After applying defaults, present a summary to the user:
336
+ > "已为 N 个 high/medium 优先级特性启用代码评审 (critic):high 优先级使用 3-agent 投票模式,medium 使用单 agent 评审。如需调整请告知。"
337
+
338
+ The user can override any assignment (enable/disable critic, change critic_count) before finalizing.
339
+
340
+ ### Summary Presentation
341
+
342
+ At Phase 7, present a consolidated testing summary table:
343
+
344
+ ```
345
+ Feature | TDD Tests | Playwright | Critic
346
+ F-001 | unit | — | —
347
+ F-002 | unit+integration | ✓ | 3-agent
348
+ F-003 | unit+integration | ✓ | 1-agent
349
+ F-004 | unit | — | —
350
+ ```
351
+
352
+ Ask: "以上是各特性的默认测试配置。如需调整请告知,否则将按此配置生成 feature-list.json。"
353
+
272
354
  ## Next-Step Execution Policy (after planning)
273
355
 
274
356
  Recommend these three options in this strict order:
@@ -32,7 +32,7 @@ from datetime import datetime, timezone
32
32
 
33
33
  SCHEMA_VERSION = "dev-pipeline-feature-list-v1"
34
34
 
35
- VALID_STATUSES = {"pending", "in_progress", "completed", "failed", "skipped", "split"}
35
+ VALID_STATUSES = {"pending", "in_progress", "completed", "failed", "skipped", "split", "auto_skipped"}
36
36
  VALID_COMPLEXITIES = {"low", "medium", "high"}
37
37
  VALID_PRIORITIES = {"high", "medium", "low"}
38
38
  VALID_GRANULARITIES = {"feature", "sub_feature", "auto"}
@@ -38,6 +38,7 @@ For fast-path changes, you can directly generate a simplified plan.md, then use
38
38
  /prizmkit-implement → executes tasks in order, marks [x] as done
39
39
  /prizmkit-code-review → diagnoses issues + produces Fix Instructions
40
40
  /prizmkit-retrospective → syncs .prizm-docs/ with code changes
41
+ /prizmkit-deploy → generates/updates DEPLOY.md with deployment procedures
41
42
  /prizmkit-committer → commits feat(avatar): add upload
42
43
  ```
43
44
 
@@ -83,6 +84,7 @@ PrizmKit produces two complementary knowledge layers:
83
84
  | `/prizmkit-code-review` | Diagnose issues + produce Fix Instructions | "review", "check code", "is it ready to commit" |
84
85
  | `/prizmkit-retrospective` | Sync .prizm-docs/ with code changes | "retrospective", "retro", "sync docs", "wrap up" |
85
86
  | `/prizmkit-committer` | Safe git commit with Conventional Commits | "commit", "submit", "finish", "ship it" |
87
+ | `/prizmkit-deploy` | Generate/update deployment documentation | "deploy docs", "deployment guide", "how to deploy" |
86
88
  | `/prizmkit-init` | Project bootstrap + .prizm-docs/ setup | "init", "initialize", "take over this project" |
87
89
  | `/prizmkit-prizm-docs` | Doc management (init/status/rebuild/validate) | "check docs", "rebuild docs", "validate docs" |
88
90
 
@@ -93,7 +95,7 @@ PrizmKit produces two complementary knowledge layers:
93
95
 
94
96
  - **Tier 1**: AI can perform well independently — these tasks align with AI's core strengths (documentation, code pattern analysis, test generation)
95
97
  - **Tier 2**: Useful as guidance/checklist — AI provides static analysis and recommendations, but lacks access to real external tools (scanners, profilers, package registries, runtime environments)
96
- - **Core skills** (no tier label): The 12 foundational, documentation, spec-driven workflow, and commit skills that form PrizmKit's primary value
98
+ - **Core skills** (no tier label): The foundational, documentation, spec-driven workflow, and commit skills that form PrizmKit's primary value
97
99
 
98
100
  ## Installation
99
101
 
@@ -7,7 +7,7 @@ description: "Pure git commit workflow with safety checks. Stages files, analyze
7
7
 
8
8
  Pure git commit workflow. Analyzes changes, generates a Conventional Commits message, performs safety checks, and commits.
9
9
 
10
- **This skill is a pure git commit tool. It does NOT modify any project files — no `.prizm-docs/`, no source code.** It only reads diffs, generates a commit message, and commits. For feature/refactor workflows, run `/prizmkit-retrospective` before this skill to sync `.prizm-docs/` (architecture index with TRAPS/RULES/DECISIONS). For bug fixes, skip retrospective entirely bug fixes do not update `.prizm-docs/`.
10
+ **This skill is a pure git commit tool. It does NOT modify any project files — no `.prizm-docs/`, no source code.** It only reads diffs, generates a commit message, and commits. For feature/refactor workflows, run `/prizmkit-retrospective` (and optionally `/prizmkit-deploy` if new infrastructure was introduced) before this skill. For bug fixes, skip retrospective and deploy entirely.
11
11
 
12
12
  ### When to Use
13
13
  - User says "commit", "submit", "finish", "done with this task", "ship it"
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: "prizmkit-deploy"
3
+ description: "Generate or update deployment documentation based on project state and deploy strategy. Produces DEPLOY.md with local dev setup, testing, production deployment, and rollback procedures. Fully autonomous — no user interaction required. Use after /prizmkit-retrospective and before /prizmkit-committer. Trigger on: 'deploy docs', 'deployment guide', 'how to deploy', 'generate deploy', 'update deploy'. (project)"
4
+ ---
5
+
6
+ # PrizmKit Deploy
7
+
8
+ Generate or update deployment documentation by scanning the project's actual state and reading the deployment strategy from `.prizmkit/config.json`. Produces a `DEPLOY.md` at the project root covering local development, testing, production deployment, and rollback.
9
+
10
+ **This skill generates documentation — it does NOT execute any deployment operations.**
11
+
12
+ ### When to Use
13
+ - After `/prizmkit-retrospective` and before `/prizmkit-committer` to complete documentation before commit
14
+ - After a batch of features has been implemented and reviewed
15
+ - When the project has no deployment documentation yet
16
+ - When new infrastructure components have been added (new database, cache, message queue, etc.)
17
+
18
+ ### When NOT to Use
19
+ - Mid-feature development (deployment docs should reflect reviewed, stable code)
20
+ - For actual deployment execution (this skill only produces docs)
21
+ - Fast-path bug fixes (no deployment doc update needed)
22
+
23
+ ### Pipeline Safety
24
+ - **Fully autonomous** — no user interaction required at any step
25
+
26
+ ## Execution Steps
27
+
28
+ **Phase 1 — Context Gathering:**
29
+ 1. Read `.prizmkit/config.json`:
30
+ - `deploy_strategy` — user's confirmed deployment approach (may be absent)
31
+ - `tech_stack` — detected or user-provided technology stack
32
+ 2. Scan project for deployment-related files:
33
+ - Container: `Dockerfile`, `docker-compose.yml`, `.dockerignore`
34
+ - Cloud platforms: `vercel.json`, `netlify.toml`, `fly.toml`, `app.yaml` (GCP), `appspec.yml` (AWS)
35
+ - CI/CD: `.github/workflows/`, `.gitlab-ci.yml`, `Jenkinsfile`, `bitbucket-pipelines.yml`
36
+ - Package managers: `package.json` scripts (start, build, preview), `Makefile`, `Procfile`
37
+ - Infrastructure as Code: `terraform/`, `pulumi/`, `cdk/`, `serverless.yml`
38
+ 3. Scan source code for environment variable references:
39
+ - Grep for `process.env.`, `os.environ`, `os.Getenv`, `env::var`, `System.getenv`
40
+ - Cross-reference with `.env.example`, `.env.template`, or `.env.sample` if they exist
41
+ - Catalog all env vars with their usage context
42
+ 4. Check for existing `DEPLOY.md` (or `docs/deployment.md`, `docs/DEPLOY.md`)
43
+ 5. Read recent git log to identify newly added infrastructure components since last deploy doc update:
44
+ - If `DEPLOY.md` exists → use `git log -1 --format=%H -- DEPLOY.md` to find the last commit that touched it, then `git diff <that-commit>..HEAD` to identify new infra files
45
+ - If `DEPLOY.md` does not exist → treat all infrastructure as "new"
46
+
47
+ **Phase 2 — Document Generation:**
48
+ 6. If NO existing deploy doc:
49
+ - Generate full `DEPLOY.md` from template (`${SKILL_DIR}/assets/deploy-template.md`)
50
+ - Fill all sections based on scanned project state
51
+ - If `deploy_strategy` exists in config → use it as the authoritative deployment approach
52
+ - If `deploy_strategy` is absent → infer from detected files (Dockerfile → Docker-based, vercel.json → Vercel, etc.) and note "Inferred from project files — confirm with `/prizmkit-plan` on next feature"
53
+ 7. If existing deploy doc found:
54
+ - Compare current project state against documented state
55
+ - Identify gaps: new env vars not documented, new services not covered, outdated commands
56
+ - Apply incremental updates — preserve user-written sections, only add/update auto-detectable content
57
+ - Mark updated sections with `<!-- Updated by prizmkit-deploy -->` comment
58
+
59
+ **Phase 3 — Validation:**
60
+ 8. Verify completeness checklist:
61
+ - [ ] All detected env vars are documented with descriptions
62
+ - [ ] Local development setup commands are runnable (check referenced scripts/commands exist)
63
+ - [ ] Build command documented and exists in package.json/Makefile
64
+ - [ ] Production deployment steps match `deploy_strategy` in config
65
+ - [ ] Health check or verification step is included
66
+ 9. If any checklist item fails, add a `## TODO` section at the bottom listing what needs manual completion
67
+ 10. Output: `DEPLOY.md` path, summary of sections generated/updated, list of TODOs if any
68
+
69
+ **HANDOFF:** `/prizmkit-committer` — commit all changes including the updated `DEPLOY.md`.
70
+
71
+ ## Document Sections
72
+
73
+ The generated `DEPLOY.md` includes these sections (skip any that don't apply to the project):
74
+
75
+ | Section | Content | Source |
76
+ |---------|---------|--------|
77
+ | Prerequisites | Required tools, versions, accounts | `tech_stack` from config + detected tooling |
78
+ | Environment Variables | Full list with descriptions and examples | Source code scan + `.env.example` |
79
+ | Local Development | Clone, install, configure, run locally | `package.json` scripts, `Makefile`, `docker-compose` |
80
+ | Testing | Run tests locally, staging test procedures | `tech_stack.testing` + test scripts |
81
+ | Build | Build commands and output artifacts | Build tool config (Vite, Webpack, Go build, etc.) |
82
+ | Production Deployment | Step-by-step deployment procedure | `deploy_strategy` from config |
83
+ | CI/CD | Pipeline overview and trigger conditions | Detected CI/CD config files |
84
+ | Rollback | How to revert a bad deployment | Inferred from deployment method |
85
+ | Health Check | How to verify deployment succeeded | API routes, health endpoints, smoke tests |
86
+ | Troubleshooting | Common deployment issues and fixes | Generated from known patterns per tech stack |
87
+
88
+ ## Incremental Update Rules
89
+
90
+ When updating an existing `DEPLOY.md`:
91
+ - **NEVER delete** user-written content (sections without `<!-- Updated by prizmkit-deploy -->` markers)
92
+ - **ADD** newly detected env vars to the Environment Variables table
93
+ - **ADD** new services/components to Production Deployment
94
+ - **UPDATE** version numbers and commands if they changed in config files
95
+ - **APPEND** new troubleshooting entries for newly added tech stack components
96
+ - **PRESERVE** custom sections the user may have added (e.g., team-specific procedures)
97
+
98
+ ## Example
99
+
100
+ **Input state:**
101
+ - `config.json` has `deploy_strategy: { primary: "docker", components: { app: "Docker → AWS ECS", db: "RDS PostgreSQL" } }`
102
+ - Project has `Dockerfile`, `docker-compose.yml`, `package.json` with build script
103
+ - 12 env vars detected in source code, `.env.example` has 8
104
+
105
+ **Output:** `DEPLOY.md` with all sections filled, plus TODO:
106
+ ```
107
+ ## TODO
108
+ - [ ] 4 environment variables found in code but missing from `.env.example`: `REDIS_URL`, `SMTP_HOST`, `SMTP_PORT`, `SENTRY_DSN`
109
+ - [ ] No health check endpoint detected — consider adding `GET /health`
110
+ ```
111
+
112
+ IMPORTANT: Use `${SKILL_DIR}` placeholder for all path references. Never hardcode absolute paths.
@@ -0,0 +1,108 @@
1
+ # Deployment Guide: [PROJECT_NAME]
2
+ <!-- Replace [PROJECT_NAME] with: app_name from feature-list.json, or name from package.json, or the project root directory name (in that priority order) -->
3
+
4
+ > Generated by PrizmKit Deploy
5
+
6
+ ## Prerequisites
7
+
8
+ | Tool | Version | Install |
9
+ |------|---------|---------|
10
+ | [tool] | [version] | [install command or link] |
11
+
12
+ ## Environment Variables
13
+
14
+ | Variable | Required | Description | Default | Example |
15
+ |----------|----------|-------------|---------|---------|
16
+ | [VAR_NAME] | yes/no | [Purpose] | [default or n/a] | [example value] |
17
+
18
+ **Setup:**
19
+ ```bash
20
+ cp .env.example .env
21
+ # Edit .env with your values
22
+ ```
23
+
24
+ ## Local Development
25
+
26
+ ### First-time Setup
27
+ ```bash
28
+ # [Clone + install steps]
29
+ ```
30
+
31
+ ### Run Locally
32
+ ```bash
33
+ # [Start command]
34
+ ```
35
+
36
+ ### Local Services
37
+ <!-- If docker-compose or similar is used for local dependencies -->
38
+ ```bash
39
+ # [Local services startup]
40
+ ```
41
+
42
+ ## Testing
43
+
44
+ ### Run Tests
45
+ ```bash
46
+ # [Test commands]
47
+ ```
48
+
49
+ ### Staging / Pre-production
50
+ <!-- How to test against a staging environment -->
51
+ - Staging URL: [URL or "not configured"]
52
+ - Deploy to staging: [command or process]
53
+
54
+ ## Build
55
+
56
+ ```bash
57
+ # [Build command]
58
+ ```
59
+
60
+ **Output:** [where build artifacts go, e.g. `dist/`, `build/`, binary path]
61
+
62
+ ## Production Deployment
63
+
64
+ ### Deployment Method
65
+ <!-- Filled from deploy_strategy in config -->
66
+ [Description of production deployment approach]
67
+
68
+ ### Step-by-step
69
+ 1. [Step 1]
70
+ 2. [Step 2]
71
+ 3. [Step 3]
72
+
73
+ ### Post-deployment Verification
74
+ ```bash
75
+ # [Health check or smoke test command]
76
+ ```
77
+
78
+ ## CI/CD
79
+ <!-- Skip if no CI/CD config detected -->
80
+
81
+ | Pipeline | Trigger | Action |
82
+ |----------|---------|--------|
83
+ | [pipeline name] | [trigger event] | [what it does] |
84
+
85
+ ## Rollback
86
+
87
+ ### How to Rollback
88
+ 1. [Rollback step 1]
89
+ 2. [Rollback step 2]
90
+
91
+ ### When to Rollback
92
+ - [Criteria that warrant a rollback]
93
+
94
+ ## Health Check
95
+
96
+ | Check | Endpoint / Command | Expected Result |
97
+ |-------|-------------------|-----------------|
98
+ | [check name] | [endpoint or command] | [expected output] |
99
+
100
+ ## Troubleshooting
101
+
102
+ | Symptom | Cause | Fix |
103
+ |---------|-------|-----|
104
+ | [symptom] | [likely cause] | [resolution steps] |
105
+
106
+ ## TODO
107
+ <!-- Auto-generated: items that need manual attention -->
108
+ - [ ] [items prizmkit-deploy could not auto-fill]
@@ -58,19 +58,41 @@ Generate a comprehensive technical implementation plan from a feature specificat
58
58
  - Risk assessment
59
59
  6. Cross-check plan against spec: every user story should map to plan components — unmapped stories mean the plan has coverage gaps that will surface during implementation
60
60
  7. Check alignment with project rules from `.prizm-docs/root.prizm` RULES section — violating project rules causes CRITICAL findings in the analyze phase
61
+ 8. **Deployment strategy check:**
62
+ - Read `.prizmkit/config.json` `deploy_strategy` field (if `config.json` does not exist, treat as "no deploy_strategy")
63
+ - Compare tech stack used in this plan (from Architecture Approach, Integration Points, Data Model) against the stored strategy
64
+ - **No `deploy_strategy` in config** → first time: ask user for deployment approach (e.g. Docker, Vercel, static hosting, traditional server, cloud platform, etc.) → write to `config.json` as `deploy_strategy` object with `"_user_confirmed": true`. If `config.json` does not exist, create `.prizmkit/` directory and `config.json` with the `deploy_strategy` field (preserve any existing fields if the file already exists).
65
+ - **`deploy_strategy` exists, no new tech stack** → skip (no question asked)
66
+ - **`deploy_strategy` exists, new tech stack detected** (e.g. plan introduces Redis, message queue, new database) → ask user only about the deployment approach for the new component → merge into existing `deploy_strategy`
67
+ - Store format in `config.json`:
68
+ ```json
69
+ {
70
+ "deploy_strategy": {
71
+ "primary": "docker",
72
+ "components": {
73
+ "app": "Docker container → AWS ECS",
74
+ "database": "RDS PostgreSQL",
75
+ "cache": "ElastiCache Redis"
76
+ },
77
+ "notes": "user-provided context about their deployment",
78
+ "_user_confirmed": true
79
+ }
80
+ }
81
+ ```
82
+ - This step is **skipped entirely in fast-path mode** (bug fixes / simple refactors do not affect deployment)
61
83
 
62
84
  **Phase 2 — Task Generation:**
63
- 8. Ask user for implementation strategy (or infer from context): MVP-first / Incremental / Parallel
64
- 9. Append `## Tasks` section to `plan.md` using the tasks template at the end of `${SKILL_DIR}/assets/plan-template.md`:
65
- - Organized by phases: Setup(T-001~T-009) → Foundational(T-010~T-099) → User Stories(T-100+) → Polish(T-900+)
66
- - Each task: `- [ ] [T-NNN] [P?] [US?] Description — file: path/to/file`
67
- - `[P]` marker for tasks that can run in parallel within their phase
68
- - Checkpoint tasks between phases for validation
69
- 10. Verify coverage and traceability:
85
+ 9. Ask user for implementation strategy (or infer from context): MVP-first / Incremental / Parallel
86
+ 10. Append `## Tasks` section to `plan.md` using the tasks template at the end of `${SKILL_DIR}/assets/plan-template.md`:
87
+ - Organized by phases: Setup(T-001~T-009) → Foundational(T-010~T-099) → User Stories(T-100+) → Polish(T-900+)
88
+ - Each task: `- [ ] [T-NNN] [P?] [US?] Description — file: path/to/file`
89
+ - `[P]` marker for tasks that can run in parallel within their phase
90
+ - Checkpoint tasks between phases for validation
91
+ 11. Verify coverage and traceability:
70
92
  - Every user story maps to at least one task — orphan stories become orphan features
71
93
  - Every task references a target file path — pathless tasks leave implementers guessing where to write code
72
94
  - Risk assessment includes at least one risk with mitigation — helps the implementer prepare for known challenges
73
- 11. Output: `plan.md` path, summary of design decisions, and task count
95
+ 12. Output: `plan.md` path, summary of design decisions, and task count
74
96
 
75
97
  **Task ID Conventions:**
76
98
  - Task IDs use zero-padded numbering: `[T-001]`, `[T-010]`, `[T-100]` — this ensures consistent sorting and visual alignment
@@ -57,6 +57,25 @@
57
57
  |------|--------|------------|
58
58
  | [Risk] | [H/M/L] | [Plan] |
59
59
 
60
+ ## Deployment Considerations
61
+ <!-- Skip this section if the feature does not affect deployment (no new services, infra, or environment changes) -->
62
+ <!-- Only fill when: new external service added, new database/cache introduced, new env vars required, or infra topology changes -->
63
+
64
+ ### New Infrastructure Requirements
65
+ - [Component]: [Deployment target from config deploy_strategy] — [any special config needed]
66
+
67
+ ### New Environment Variables
68
+ | Variable | Required | Description | Example |
69
+ |----------|----------|-------------|---------|
70
+ | [VAR_NAME] | yes/no | [Purpose] | [example value] |
71
+
72
+ ### Deployment Impact
73
+ - [ ] No infrastructure changes needed (skip this section)
74
+ - [ ] New service/container required
75
+ - [ ] New environment variables added
76
+ - [ ] Database migration required in production
77
+ - [ ] CI/CD pipeline update needed
78
+
60
79
  ## Pre-Implementation Gates
61
80
  - [ ] Spec coverage: all user stories mapped to components
62
81
  - [ ] Data model reviewed — existing schema conventions documented and followed
@@ -185,7 +185,9 @@ The pipeline enforces a **docs pass condition**: `.prizm-docs/` must show change
185
185
  | From | To | Condition |
186
186
  |------|----|-----------|
187
187
  | `prizmkit-code-review` | **this skill** | Review passes or work is complete |
188
- | **this skill** | `prizmkit-committer` | Architecture synced, ready to commit |
188
+ | **this skill** | `prizmkit-deploy` (conditional) | Architecture synced; deploy only if new tech stack detected |
189
+ | **this skill** | `prizmkit-committer` (direct) | Architecture synced, no deployment doc update needed |
190
+ | `prizmkit-deploy` | `prizmkit-committer` | Deploy docs updated, ready to commit |
189
191
  | `prizmkit-committer` | — | Committed |
190
192
 
191
193
  ## Output