prizmkit 1.1.29 → 1.1.31

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "frameworkVersion": "1.1.29",
3
- "bundledAt": "2026-04-12T12:45:35.203Z",
4
- "bundledFrom": "4dc0cee"
2
+ "frameworkVersion": "1.1.31",
3
+ "bundledAt": "2026-04-12T23:16:11.230Z",
4
+ "bundledFrom": "543cd94"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.29",
2
+ "version": "1.1.31",
3
3
  "skills": {
4
4
  "prizm-kit": {
5
5
  "description": "Full-lifecycle dev toolkit. Covers spec-driven development, Prizm context docs, code quality, debugging, deployment, and knowledge management.",
@@ -36,6 +36,8 @@ If you believe the task is better suited for a different workflow, you MUST:
36
36
  **Your ONLY writable outputs are:**
37
37
  1. `.prizmkit/plans/project-brief.md` (`.prizmkit/plans/` — accumulated project context brief)
38
38
  2. Project conventions and architecture decisions appended to `CLAUDE.md` / `CODEBUDDY.md` (with user consent)
39
+ 3. Infrastructure configuration (database conventions + deployment config) appended to `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section
40
+ 4. `.prizmkit/deploy.md` — deployment documentation (created or updated with infrastructure config)
39
41
 
40
42
  **After planning is complete**, you MUST:
41
43
  1. Present the summary of captured project-level context (vision, conventions, architecture decisions, project brief)
@@ -123,6 +125,83 @@ Do NOT use this skill when:
123
125
  → Save answers to `CLAUDE.md` / `CODEBUDDY.md` under `### Project Conventions` section (format: one bullet per convention)
124
126
  → Output format will naturally vary per project — that is the intended behavior
125
127
 
128
+ **Infrastructure Convention Discovery (Database + Deployment)**
129
+
130
+ After project conventions are captured, check `CLAUDE.md` / `CODEBUDDY.md` for `### Infrastructure` section:
131
+
132
+ - If `### Infrastructure` section does not exist → this project was not initialized with prizmkit-init's Phase 4.5. Treat as if both database and deployment are undecided — run full inquiry below.
133
+ - If `<!-- infrastructure: deferred -->` → user explicitly skipped at init time. Ask: "During project init you deferred infrastructure decisions. Would you like to configure them now?" (options: "Yes — configure now (Recommended)", "Skip — decide later")
134
+ - If `<!-- database: deferred -->` → only database was deferred, run database inquiry only
135
+ - If `<!-- deployment: deferred -->` or deployment section is missing → run deployment inquiry only
136
+ - If both sections exist with real values → read existing config, present as "Already decided", ask: "Anything to change?" If no → skip to next phase.
137
+
138
+ **Database Convention Deep Inquiry** (AI-driven, context-aware — select from pool based on project):
139
+
140
+ AI analyzes the detected database type, ORM, and tech stack, then selects relevant questions from this pool. Do NOT ask all questions — only those that matter for THIS project:
141
+
142
+ 1. **Table naming convention**: snake_case / camelCase / PascalCase; prefix convention (e.g., `t_`, `tbl_`, none). For brownfield: detect from existing migration files or schema and present as "Already decided" with override option.
143
+ 2. **Field naming convention**: snake_case / camelCase; common fields convention — are `created_at`, `updated_at`, `deleted_at` (soft delete) required on all tables? What about `id` vs `uuid` column naming?
144
+ 3. **Migration conventions**:
145
+ - File storage directory (e.g., `db/migrations/`, `prisma/migrations/`, `alembic/versions/`)
146
+ - Naming rule (timestamp prefix `20240101_create_users`, sequence prefix `001_create_users`, ORM auto-generated)
147
+ - Migration tool (ORM built-in / Flyway / Liquibase / golang-migrate / manual SQL)
148
+ - For brownfield: detect existing migration directory and naming pattern, present as "Already decided"
149
+ 4. **Primary key strategy**: Auto-increment integer / UUID v4 / ULID / Snowflake ID / Other
150
+ 5. **Index naming convention**: e.g., `idx_{table}_{column}`, `ix_{table}_{column}`, or ORM default
151
+ 6. **Environment separation**: dev/test/prod database separation strategy; connection config management (env vars / config files / secret manager)
152
+
153
+ Use `AskUserQuestion` for each batch (up to 4 questions per call). For brownfield projects, show detected patterns as recommended options. Each question MUST include a "Skip — decide later" option.
154
+
155
+ **Deployment Configuration Deep Inquiry** (AI-driven, context-aware):
156
+
157
+ Read the existing `### Infrastructure` → `#### Deployment` section for the deployment target, then ask relevant follow-up questions:
158
+
159
+ 1. **Deployment target refinement**:
160
+ - Own server: SSH access method (key-based / password), OS (Ubuntu / CentOS / other), Docker installed?
161
+ - SaaS platform: specific platform confirmation, existing account and project? Already deployed before?
162
+ - Container: orchestration method (Docker Compose / K8s / ECS / Cloud Run)
163
+ 2. **Existing infrastructure**:
164
+ - Remote machine availability — IP/domain? Existing server configuration?
165
+ - Existing CI/CD pipeline — GitHub Actions / GitLab CI / Jenkins / other? Already configured?
166
+ - Domain name and SSL — already owned? DNS provider? SSL management (Let's Encrypt / platform-managed / other)?
167
+ 3. **AI-assisted deployment**:
168
+ - Whether AI should help execute deploy commands (via SaaS CLI like `vercel deploy`, `fly deploy`, `railway up`, `docker push`, or SSH remote commands)
169
+ - If yes: collect necessary info — API token storage method (env var name, e.g., `VERCEL_TOKEN`), project name/ID on the platform, target environment (production / staging)
170
+ - Explicitly inform: "AI will show each command and wait for your confirmation before executing"
171
+ 4. **Environment variable management**: production env var strategy (SaaS platform dashboard / `.env.production` committed to repo / secret manager like AWS Secrets Manager, Vault / CI/CD secrets)
172
+
173
+ Use `AskUserQuestion` for each batch. Each question MUST include a "Skip — decide later" option.
174
+
175
+ **After infrastructure inquiry**:
176
+ - Update `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section with all collected information. Replace `<!-- deferred -->` markers with real values. Preserve any existing values that were confirmed unchanged. Full format:
177
+ ```markdown
178
+ ### Infrastructure
179
+
180
+ #### Database
181
+ - **Type**: [database type]
182
+ - **ORM**: [ORM name]
183
+ - **Table naming**: [convention, e.g., snake_case, no prefix]
184
+ - **Field naming**: [convention]; common fields: [list]
185
+ - **Primary key**: [strategy]
186
+ - **Migration directory**: [path]
187
+ - **Migration naming**: [rule]
188
+ - **Index naming**: [convention]
189
+ - **Environment separation**: [strategy]
190
+
191
+ #### Deployment
192
+ - **Target**: [platform/method]
193
+ - **AI-assisted deploy**: [yes/no]
194
+ - **Domain**: [domain or "not configured"]
195
+ - **SSL**: [management method]
196
+ - **CI/CD**: [tool or "not configured"]
197
+ - **Env var management**: [strategy]
198
+
199
+ #### Deployment Credentials Reference
200
+ - [platform]: [token/auth method description]
201
+ ```
202
+ - Update `.prizmkit/deploy.md` if it exists — append deployment details to relevant sections (Prerequisites, Production Deployment, Environment Variables). If it does not exist, create it from the `prizmkit-deploy` template with known information filled in.
203
+ - Items still marked "Skip — decide later" remain as `<!-- [topic]: deferred -->` in CLAUDE.md for `prizmkit-deploy` to pick up later.
204
+
126
205
  4. **Project brief accumulation** — throughout all interactive phases:
127
206
  → Read `${SKILL_DIR}/references/project-brief-guide.md` for template and rules
128
207
  → Update after each meaningful user response containing business intent, constraints, or design decisions
@@ -133,6 +212,7 @@ Before questions, check optional context files (never block if absent):
133
212
  - `.prizm-docs/root.prizm` (architecture/project context)
134
213
  - `.prizmkit/config.json` (existing stack preferences and detected tech stack)
135
214
  - `CLAUDE.md` / `CODEBUDDY.md` `### Project Conventions` section (previously answered project conventions)
215
+ - `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section (database and deployment config from prizmkit-init or previous app-planner run)
136
216
 
137
217
  **Tech stack auto-population from config.json:**
138
218
  - If `.prizmkit/config.json` contains a `tech_stack` object, use it to pre-fill tech assumptions.
@@ -314,10 +394,11 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
314
394
  |-----------|----------------|----------|-------|
315
395
  | **CP-AP-0** | Intent Confirmed | User confirmed session goal (produce / explore) | 1 |
316
396
  | **CP-AP-1** | Conventions Checked | Project conventions loaded or asked; `### Project Conventions` section in `CLAUDE.md` / `CODEBUDDY.md` up to date | 1 |
397
+ | **CP-AP-1.5** | Infrastructure Checked | Infrastructure config loaded or asked; `### Infrastructure` section in `CLAUDE.md` / `CODEBUDDY.md` addressed — configured or explicitly deferred | 1-2 |
317
398
  | **CP-AP-2** | Vision Summary | Goal/users/differentiators confirmed by user. For brownfield: existing purpose confirmed or refined. | 1-2 |
318
399
  | **CP-AP-3** | Frontend Design Evaluated | For frontend projects: checked for existing UI/UX design system; user was asked if missing. **Auto-pass** for backend-only or non-UI projects. | 2 |
319
400
  | **CP-AP-4** | Project Brief Accumulated | `.prizmkit/plans/project-brief.md` exists at `.prizmkit/plans/` with at least 3 ideas listed. For brownfield: already-implemented items marked `[x]` count toward this total. | 3 |
320
- | **CP-AP-5** | Planning Complete | All project-level context captured: conventions, tech stack, architecture decisions, project brief finalized | 4 |
401
+ | **CP-AP-5** | Planning Complete | All project-level context captured: conventions, infrastructure config, tech stack, architecture decisions, project brief finalized | 4 |
321
402
 
322
403
  ## Architecture Decision Capture
323
404
 
@@ -359,8 +440,10 @@ After all checkpoints pass, present a summary and end the session:
359
440
 
360
441
  1. **Summary** (as text): List all project-level artifacts produced:
361
442
  - Project conventions → `CLAUDE.md` / `CODEBUDDY.md` `### Project Conventions`
443
+ - Infrastructure config → `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` (database conventions + deployment config)
362
444
  - Tech stack → `.prizmkit/config.json`
363
445
  - Architecture decisions (if any) → `CLAUDE.md` / `CODEBUDDY.md` `### Architecture Decisions`
446
+ - Deployment docs → `.prizmkit/deploy.md` (if created/updated)
364
447
  - Project brief → `.prizmkit/plans/project-brief.md`
365
448
 
366
449
  2. **Suggest possible next steps** (as text, NOT auto-invoked):
@@ -368,5 +451,6 @@ After all checkpoints pass, present a summary and end the session:
368
451
  > - `feature-planner` — decompose the project into features and generate `feature-list.json`
369
452
  > - `prizmkit-plan` — start working on a specific feature directly
370
453
  > - `prizmkit-prizm-docs` — initialize or update project documentation
454
+ > - `prizmkit-deploy` — supplement infrastructure config or execute deployment (if AI-assisted deploy was configured)
371
455
 
372
456
  **Do NOT invoke any of these.** The user decides what to do next, in their own time.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "prizmkit-deploy"
3
- description: "Generate or update .prizmkit/deploy.md with local dev setup, testing, production deployment, and rollback procedures. On-demand skill — trigger when deployment docs are needed. Trigger on: 'deploy docs', 'deployment guide', 'how to deploy', 'deploy.md'. (project)"
3
+ description: "Generate or update .prizmkit/deploy.md with local dev setup, testing, production deployment, and rollback procedures. Can also supplement infrastructure config and execute deployments via SaaS CLI. On-demand skill — trigger when deployment docs are needed or user wants to deploy. Trigger on: 'deploy docs', 'deployment guide', 'how to deploy', 'deploy.md', 'deploy my app', 'help me deploy'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Deploy
@@ -9,13 +9,14 @@ description: "Generate or update .prizmkit/deploy.md with local dev setup, testi
9
9
  - When the project has no deployment documentation yet
10
10
  - When new infrastructure components have been added (new database, cache, message queue, etc.)
11
11
  - When deployment-related configuration has changed significantly
12
+ - When the user wants to supplement or update infrastructure config (database conventions, deployment settings) that was deferred during init or app-planner
13
+ - When the user wants AI-assisted deployment execution
12
14
  - When explicitly requested by user or caller
13
15
 
14
16
  ### When NOT to Use
15
- - For actual deployment execution (this skill only produces documentation)
16
17
  - When only application logic changed with no infra/config impact
17
18
 
18
- > **On-demand skill** — not part of the default `plan → implement → code-review → retrospective → committer` chain. Invoke independently when deployment documentation needs creation or update.
19
+ > **On-demand skill** — not part of the default `plan → implement → code-review → retrospective → committer` chain. Invoke independently when deployment documentation needs creation or update, or when user wants to deploy.
19
20
 
20
21
  ### PRECONDITION
21
22
  - Project contains deployable artifacts (at least one of: `package.json`, `Dockerfile`, `Makefile`, `go.mod`, `Cargo.toml`, `pyproject.toml`, or equivalent)
@@ -26,9 +27,67 @@ description: "Generate or update .prizmkit/deploy.md with local dev setup, testi
26
27
  2. **Project config**: Read `.prizmkit/config.json` for `deploy_strategy` and `tech_stack`
27
28
  - If `.prizmkit/config.json` does not exist → proceed without it, infer from project file scanning. Log warning: "No .prizmkit/config.json found — inferring deployment strategy from project files."
28
29
  3. **Module detail**: Read relevant `.prizm-docs/<module>.prizm` L1/L2 for INTERFACES and DEPENDENCIES sections that inform deployment topology
30
+ 4. **Infrastructure config**: Read `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section for database conventions and deployment configuration collected by `prizmkit-init` or `app-planner`
31
+
32
+ ## Invocation Mode Detection
33
+
34
+ This skill behaves differently depending on how it is invoked:
35
+
36
+ - **User-invoked** (default): user calls `/prizmkit-deploy` directly → display current infrastructure config, allow modifications/supplements, then generate docs and optionally execute deployment
37
+ - **Auto-invoked** (via pipeline or other skill, with `--auto` or `--pipeline` flag): use existing config from `CLAUDE.md` / `CODEBUDDY.md` and `.prizmkit/deploy.md` as-is, no interactive questions → generate/update docs only
38
+
39
+ Pipeline launcher scripts pass the `--auto` flag automatically. If no flag is present, treat as user-invoked.
29
40
 
30
41
  ## Execution Steps
31
42
 
43
+ **Phase 0 — Configuration Check & Supplement** (user-invoked only — skip entirely if auto-invoked):
44
+
45
+ 1. Read `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section
46
+ 2. Read `.prizmkit/deploy.md` if it exists
47
+ 3. **Assess configuration completeness**:
48
+
49
+ **If `### Infrastructure` section is missing entirely**:
50
+ - Show: "No infrastructure configuration found. Let's set it up."
51
+ - Run full database inquiry + full deployment inquiry (see question pools below)
52
+
53
+ **If partial configuration exists** (some fields answered, some still deferred — e.g., database configured but `<!-- deployment: deferred -->` present):
54
+ - Display current config summary showing both answered and deferred items
55
+ - Run inquiry for deferred topics only, preserve existing answered items unchanged
56
+
57
+ **If `<!-- infrastructure: deferred -->` marker found**:
58
+ - Show: "Infrastructure configuration was deferred during project setup."
59
+ - Ask: "Would you like to configure it now?" (options: "Yes — configure now (Recommended)", "Skip — keep deferred")
60
+ - If yes → run full database inquiry + full deployment inquiry
61
+
62
+ **If `<!-- database: deferred -->` found**:
63
+ - Run database inquiry only
64
+
65
+ **If deployment section is missing or `<!-- deployment: deferred -->`**:
66
+ - Run deployment inquiry only
67
+
68
+ **If both sections exist with real values**:
69
+ - Display current config summary
70
+ - Ask: "Would you like to update any infrastructure settings?" (options: "Looks good — proceed (Recommended)", "Update database config", "Update deployment config", "Update both")
71
+
72
+ 4. **Database inquiry** (same question pool as app-planner — AI selects relevant questions):
73
+ - Table naming convention (snake_case / camelCase / PascalCase, prefix)
74
+ - Field naming convention (common fields: created_at, updated_at, deleted_at)
75
+ - Migration conventions (directory, naming rule, migration tool)
76
+ - Primary key strategy (auto-increment / UUID / ULID / Snowflake)
77
+ - Index naming convention
78
+ - Environment separation (dev/test/prod, connection config)
79
+
80
+ 5. **Deployment inquiry** (same question pool as app-planner — AI selects relevant questions):
81
+ - Deployment target refinement (own server details / SaaS platform / container orchestration)
82
+ - Existing infrastructure (remote machines, CI/CD, domain, SSL)
83
+ - AI-assisted deployment (whether AI should execute deploy commands, credentials info)
84
+ - Environment variable management strategy
85
+
86
+ 6. **Write results**:
87
+ - Update `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section — replace `<!-- deferred -->` markers with real values, preserve unchanged values
88
+ - Update `#### Deployment Credentials Reference` section if new auth methods were collected during inquiry
89
+ - Update `.prizmkit/deploy.md` with new information
90
+
32
91
  **Phase 1 — Project Scanning:**
33
92
  1. Scan project for deployment-related files:
34
93
  - Container: `Dockerfile`, `docker-compose.yml`, `.dockerignore`
@@ -66,6 +125,49 @@ description: "Generate or update .prizmkit/deploy.md with local dev setup, testi
66
125
  9. If interactive session is available → show summary and ask if user wants to review before finishing
67
126
  10. Output: `.prizmkit/deploy.md` path, summary of sections generated/updated, list of TODOs if any
68
127
 
128
+ **Phase 4 — Deployment Execution** (conditional):
129
+
130
+ **Trigger**: Read `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` → `#### Deployment` → `**AI-assisted deploy**` field. Only execute this phase if the value is `yes`.
131
+
132
+ If `AI-assisted deploy` is `no` or not present → skip Phase 4 entirely, proceed to HANDOFF.
133
+
134
+ **Execution flow**:
135
+
136
+ 1. **Read deployment config** from `.prizmkit/deploy.md` (Production Deployment section, Platform-Specific Deploy Commands section, AI Deploy Playbook section)
137
+ 2. **Build command sequence** based on the deployment target:
138
+
139
+ | Target | Command Sequence |
140
+ |--------|-----------------|
141
+ | Vercel | `vercel --version` → `vercel deploy --prod` |
142
+ | Railway | `railway --version` → `railway up` |
143
+ | Fly.io | `fly version` → `fly deploy` |
144
+ | Docker + registry | `docker build -t {tag} .` → `docker push {tag}` |
145
+ | Docker + SSH | `docker build -t {tag} .` → `docker save` → `scp` → `ssh docker load && docker run` |
146
+ | Custom | Read custom commands from deploy.md |
147
+
148
+ 3. **Pre-flight checks**:
149
+ - Verify CLI tools are installed (run version commands)
150
+ - Verify authentication (check if logged in to the platform)
151
+ - If auth missing: show instructions for how to authenticate (e.g., "Run `vercel login` or set `VERCEL_TOKEN` env var") and stop
152
+
153
+ 4. **Execute with user confirmation** (safety mechanism):
154
+ - Display the full command list to the user before executing anything
155
+ - Ask: "Ready to execute these deployment commands?" (options: "Yes — execute step by step", "Let me review first", "Cancel")
156
+ - Execute one command at a time:
157
+ - Show the command about to be executed
158
+ - Wait for user confirmation (implicit: proceed; explicit: user can say "skip" or "stop")
159
+ - Execute the command
160
+ - Show output (stdout + stderr)
161
+ - If command fails → **stop immediately**, show error details, suggest remediation
162
+ - If command succeeds → proceed to next command
163
+ - **Sensitive operations**: if a command involves API tokens, secrets, or irreversible actions (e.g., production database migration), add an explicit warning and require user to type confirmation
164
+
165
+ 5. **Post-deployment verification**:
166
+ - If Health Check section exists in deploy.md → run the health check commands
167
+ - Show deployment result summary: success/failure, URL (if SaaS platform returns one), any warnings
168
+
169
+ 6. **Output**: Deployment execution report — commands executed, results, any errors encountered
170
+
69
171
  **HANDOFF:** `/prizmkit-committer` — commit changes including `.prizmkit/deploy.md`.
70
172
 
71
173
  ## Document Sections
@@ -39,6 +39,35 @@ cp .env.example .env
39
39
  # [Local services startup]
40
40
  ```
41
41
 
42
+ ## Database Setup
43
+ <!-- Skip if project does not use a database -->
44
+
45
+ ### Database Type
46
+ [PostgreSQL / MySQL / MongoDB / SQLite / etc.]
47
+
48
+ ### Initial Setup
49
+ ```bash
50
+ # [Database creation commands]
51
+ # [Initial migration or schema setup]
52
+ ```
53
+
54
+ ### Run Migrations
55
+ ```bash
56
+ # [Migration command, e.g., npx prisma migrate deploy, alembic upgrade head]
57
+ ```
58
+
59
+ ### Seed Data
60
+ ```bash
61
+ # [Seed command if applicable, or "No seed data configured"]
62
+ ```
63
+
64
+ ### Database Conventions
65
+ <!-- Auto-populated from CLAUDE.md ### Infrastructure → #### Database -->
66
+ <!-- Filled progressively: basic info from prizmkit-init, detailed conventions from app-planner, verified by prizmkit-deploy -->
67
+ - Table naming: [convention]
68
+ - Migration directory: [path]
69
+ - Migration naming: [rule]
70
+
42
71
  ## Testing
43
72
 
44
73
  ### Run Tests
@@ -97,6 +126,56 @@ cp .env.example .env
97
126
  |-------|-------------------|-----------------|
98
127
  | [check name] | [endpoint or command] | [expected output] |
99
128
 
129
+ ## Platform-Specific Deploy Commands
130
+ <!-- Auto-populated based on deployment target from CLAUDE.md ### Infrastructure → #### Deployment -->
131
+ <!-- Filled progressively: basic target from prizmkit-init, detailed config from app-planner, verified by prizmkit-deploy -->
132
+
133
+ ### [Platform Name]
134
+ ```bash
135
+ # Pre-flight
136
+ [version check command]
137
+ [auth check command]
138
+
139
+ # Deploy
140
+ [deploy command]
141
+
142
+ # Verify
143
+ [post-deploy verification command]
144
+ ```
145
+
146
+ ## AI Deploy Playbook
147
+ <!-- Used by prizmkit-deploy Phase 4 when AI-assisted deploy is enabled -->
148
+ <!-- This section is auto-generated — do not edit manually unless you want to customize the sequence -->
149
+
150
+ ### Pre-flight Checklist
151
+ - [ ] CLI tool installed: [tool name + version command]
152
+ - [ ] Authentication verified: [auth check command or "logged in via [method]"]
153
+ - [ ] Environment variables set: [list of required env vars for deployment]
154
+ - [ ] Build successful: [build command]
155
+
156
+ ### Command Sequence
157
+ <!-- Ordered list of commands AI will execute step-by-step with user confirmation -->
158
+ 1. `[command 1]` — [what it does]
159
+ 2. `[command 2]` — [what it does]
160
+ 3. `[command 3]` — [what it does]
161
+
162
+ ### Post-Deploy Verification
163
+ - [ ] Health check: [command or URL]
164
+ - [ ] Smoke test: [manual or automated check]
165
+
166
+ ### Rollback (if deploy fails)
167
+ ```bash
168
+ # [Rollback command specific to the platform]
169
+ ```
170
+
171
+ ## Deployment Credentials Reference
172
+ <!-- This information is stored in CLAUDE.md / CODEBUDDY.md ### Infrastructure → #### Deployment Credentials Reference -->
173
+ <!-- Listed here for quick reference during deployment execution -->
174
+
175
+ | Platform | Auth Method | Location |
176
+ |----------|------------|----------|
177
+ | [platform] | [method, e.g., API token, SSH key, CLI login] | [where stored, e.g., VERCEL_TOKEN env var] |
178
+
100
179
  ## Troubleshooting
101
180
 
102
181
  | Symptom | Cause | Fix |
@@ -91,6 +91,65 @@ BROWNFIELD WORKFLOW (existing project):
91
91
 
92
92
  **IMPORTANT**: Not all projects have all fields. A pure backend API will have no `frontend_framework` or `frontend_styling`. A library may have no database. Only record what is actually detected — never generate empty or placeholder values.
93
93
 
94
+ **Phase 4.5: Infrastructure Quick Scan**
95
+
96
+ Detect database and deployment signals, then ask 1-2 brief questions. This phase is **optional** — users can skip and configure later via `app-planner` or `/prizmkit-deploy`.
97
+
98
+ - **BROWNFIELD**: Auto-detect infrastructure signals from existing files, then ask 1-2 brief questions (pre-filled with detection results)
99
+ - **GREENFIELD**: No auto-detection possible — ask the 2 brief questions directly (database need and deployment target)
100
+
101
+ 1. **Auto-detect infrastructure signals** (no user interaction):
102
+ - **Database signals**: ORM/database client dependencies in `package.json`, `requirements.txt`, `go.mod`, `Cargo.toml`, `pyproject.toml` (look for: prisma, typeorm, sequelize, mongoose, sqlalchemy, django, gorm, diesel, sqlx, pg, mysql2, etc.); directories named `migrations/`, `db/`, `schema/`, `prisma/`; environment variables `DATABASE_URL`, `DB_HOST`, `DB_NAME`, `MONGO_URI` in `.env*` files
103
+ - **Deployment signals**: `Dockerfile`, `docker-compose.yml`, `vercel.json`, `fly.toml`, `railway.json`, `netlify.toml`, `cloudflare.json`, `.github/workflows/`, `Procfile`, `app.yaml`, `serverless.yml`, `terraform/`, `pulumi/`
104
+
105
+ 2. **Brief inquiry** (using `AskUserQuestion`, max 2 questions):
106
+
107
+ **Question 1 — Database**:
108
+ - If database signals detected: pre-fill with detected info
109
+ - Question: "Does your project use a database?"
110
+ - Options:
111
+ - "Yes — {detected ORM/DB}" (if detected, mark as Recommended)
112
+ - "Yes — different database" (let user specify)
113
+ - "No database needed"
114
+ - "Skip — decide later"
115
+ - If "Yes": follow up to confirm database type (MySQL / PostgreSQL / MongoDB / SQLite / Other) — skip this follow-up if already clear from detection
116
+
117
+ **Question 2 — Deployment target**:
118
+ - If deployment signals detected: pre-fill with detected info
119
+ - Question: "Where will this project be deployed?"
120
+ - Options:
121
+ - "{Detected platform}" (if detected, e.g., "Vercel" from vercel.json, mark as Recommended)
122
+ - "Own server / VPS"
123
+ - "SaaS platform" (if no specific platform detected)
124
+ - "Container (Docker / K8s)"
125
+ - "Skip — decide later"
126
+ - If "SaaS platform": follow up with platform selection (Vercel / Railway / Fly.io / Cloudflare / AWS / Other)
127
+
128
+ 3. **Write results**:
129
+ - Append `### Infrastructure` section to `CLAUDE.md` (or `CODEBUDDY.md` based on detected platform) with detection results and user answers. Format:
130
+ ```markdown
131
+ ### Infrastructure
132
+
133
+ #### Database
134
+ - **Type**: [PostgreSQL / MySQL / MongoDB / SQLite / none]
135
+ - **ORM**: [detected ORM or "none detected"]
136
+
137
+ #### Deployment
138
+ - **Target**: [platform name or "undecided"]
139
+ ```
140
+ → This is intentionally minimal (Quick Scan). Full conventions and deployment details will be added by app-planner or prizmkit-deploy later.
141
+ - Create `.prizmkit/deploy.md` skeleton from `prizmkit-deploy` template if it does not exist, pre-filling known sections (Prerequisites, basic deployment method)
142
+ - If user selects "Skip — decide later" for BOTH topics: write deferred marker instead:
143
+ ```markdown
144
+ ### Infrastructure
145
+ <!-- infrastructure: deferred -->
146
+ ```
147
+ - If user skips only one topic, write the answered one normally and mark the skipped one:
148
+ ```markdown
149
+ #### Database
150
+ <!-- database: deferred -->
151
+ ```
152
+
94
153
  **Phase 5: Prizm Documentation Generation**
95
154
  Invoke prizmkit-prizm-docs (Init operation), passing the two-tier module structure from Phase 4:
96
155
  - Create `.prizm-docs/` directory structure mirroring the source tree (sub-module dirs become subdirectories under `.prizm-docs/<top-level>/`)
@@ -172,6 +231,7 @@ GREENFIELD WORKFLOW (new project):
172
231
  - "What language/framework will you use?" (e.g. React + Node.js, Python + FastAPI, etc.)
173
232
  - Record answers in `config.json` `tech_stack` with `"_auto_detected": false` (user-provided, not auto-detected)
174
233
  - If user is unsure, skip tech_stack — it can be populated later on re-init after code exists
234
+ - Phase 4.5: Run Infrastructure Quick Scan — in greenfield mode, no auto-detection is possible, so only ask the 2 brief questions (database need and deployment target). If user is unsure, skip — these can be configured later via `app-planner` or `/prizmkit-deploy`.
175
235
  - Phase 5: Create minimal `.prizm-docs/` with just `root.prizm` skeleton (populate TECH_STACK from user answers if provided)
176
236
  - Phase 7: Generate project brief (greenfield flow — ask user about project goals, see Phase 7 above)
177
237
  - Phases 6, 8: Same as brownfield (Phase 8 Report recommends `/prizmkit-plan` for first feature)
@@ -201,6 +261,12 @@ Tech stack detected:
201
261
  Bundler: Vite
202
262
  Project type: fullstack
203
263
 
264
+ Infrastructure Quick Scan:
265
+ Database: PostgreSQL (Prisma) — detected from dependencies
266
+ Deployment: Vercel — detected from vercel.json
267
+ → Written to CLAUDE.md ### Infrastructure
268
+ → Created .prizmkit/deploy.md skeleton
269
+
204
270
  Modules discovered:
205
271
  src/routes/ → .prizm-docs/routes.prizm (12 files)
206
272
  src/models/ → .prizm-docs/models.prizm (8 files)
@@ -22,27 +22,18 @@ User says:
22
22
 
23
23
  ## Pipeline Recovery (Recommended)
24
24
 
25
- For reliable recovery that completes ALL remaining phases autonomously, use the shell-driven pipeline:
25
+ **IMPORTANT**: In Phase 1.3, you MUST present the user with a choice between pipeline recovery (`run-recovery.sh`) and interactive recovery. **NEVER skip this choice. NEVER decide for the user.** The pipeline approach is recommended because it generates a comprehensive bootstrap prompt that explicitly lists every remaining phase with full instructions, ensuring the AI completes the full workflow — not just the implementation part.
26
26
 
27
- ```bash
28
- # Auto-detect and recover (with confirmation)
29
- ./dev-pipeline/run-recovery.sh
30
-
31
- # Detection report only (no execution)
32
- ./dev-pipeline/run-recovery.sh detect
33
-
34
- # Generate prompt without executing (inspect it)
35
- ./dev-pipeline/run-recovery.sh run --dry-run
36
-
37
- # Skip confirmation (for scripted/daemon use)
38
- ./dev-pipeline/run-recovery.sh run --yes
27
+ Pipeline commands (for reference — Phase 1.3 will present these as a selectable option):
39
28
 
40
- # Override AI model
41
- ./dev-pipeline/run-recovery.sh run --model claude-opus-4.6
29
+ ```bash
30
+ ./dev-pipeline/run-recovery.sh # Auto-detect and recover
31
+ ./dev-pipeline/run-recovery.sh detect # Detection report only
32
+ ./dev-pipeline/run-recovery.sh run --dry-run # Generate prompt, don't execute
33
+ ./dev-pipeline/run-recovery.sh run --yes # Skip confirmation
34
+ ./dev-pipeline/run-recovery.sh run --model <model> # Override AI model
42
35
  ```
43
36
 
44
- The pipeline approach generates a comprehensive bootstrap prompt that explicitly lists every remaining phase with full instructions, ensuring the AI completes the full workflow — not just the implementation part.
45
-
46
37
  ### When to use pipeline vs interactive recovery
47
38
 
48
39
  | Scenario | Approach |
@@ -74,10 +65,10 @@ recovery-workflow
74
65
  │ ├── Based on artifact presence → infer current phase
75
66
  │ └── No match → reject and guide user
76
67
 
77
- ├── Phase 1: Report + user confirmation
68
+ ├── Phase 1: Report + user choice
78
69
  │ ├── Display detection results
79
70
  │ ├── If code changes exist → run test suite
80
- │ └── User confirms "continue" proceed
71
+ │ └── User chooses: run-recovery.sh (recommended) | interactive | start fresh
81
72
 
82
73
  └── Phase 2: Execute remaining steps
83
74
  ├── Read target workflow's SKILL.md
@@ -169,18 +160,55 @@ Include test results in the report:
169
160
  - How many tests pass/fail
170
161
  - If failures exist — which tests and why
171
162
 
172
- ### 1.3 Ask User to Confirm
163
+ ### 1.3 Ask User to Choose Recovery Approach
164
+
165
+ **User choice required (mandatory)** — Use `AskUserQuestion` to present interactive selectable options. **NEVER skip this step. NEVER choose for the user.**
173
166
 
174
167
  ```
175
- Ready to resume from Phase 5 (Review). Continue?
168
+ AskUserQuestion:
169
+ question: "Interrupted {workflow_type} detected at Phase {N} ({phase_name}). How would you like to recover?"
170
+ header: "Recovery"
171
+ options:
172
+ - label: "Run recovery script (Recommended)"
173
+ description: "Execute ./dev-pipeline/run-recovery.sh — autonomously completes ALL remaining phases (review, commit, merge, etc.) via a dedicated AI session with explicit phase instructions"
174
+ - label: "Copy command and run manually"
175
+ description: "I'll give you the exact shell command to paste into your terminal — you run it yourself outside this session"
176
+ - label: "Resume interactively in this session"
177
+ description: "Continue from Phase {N} within this conversation — more control, but may not complete all phases if session is interrupted again"
178
+ - label: "Start fresh"
179
+ description: "Discard interrupted work and restart the original workflow from scratch"
176
180
  ```
177
181
 
178
- If the user declines, suggest alternatives:
179
- - "Use `/bug-fix-workflow` to start fresh"
180
- - "Use `/feature-workflow` to start fresh"
181
- - "Use `/refactor-workflow` to start fresh"
182
+ **If "Run recovery script"** Execute the pipeline recovery:
183
+ ```bash
184
+ ./dev-pipeline/run-recovery.sh
185
+ ```
186
+ The script handles everything: detection, confirmation, prompt generation, session spawn, and post-session validation. **End this skill after launching the script** — do not proceed to Phase 2.
187
+
188
+ **If "Copy command and run manually"** → Output the command for the user to copy and run in their own terminal:
189
+ ```
190
+ To recover, run this command in your project root:
191
+
192
+ ./dev-pipeline/run-recovery.sh
193
+
194
+ Or with options:
195
+ ./dev-pipeline/run-recovery.sh run --dry-run # Preview the recovery prompt first
196
+ ./dev-pipeline/run-recovery.sh run --yes # Skip confirmation
197
+ ./dev-pipeline/run-recovery.sh run --model <model> # Specify AI model
198
+ ```
199
+ **End this skill** — do not proceed to Phase 2. The user will run the command themselves.
200
+
201
+ **If "Resume interactively"** → Continue to Phase 2 below (execute remaining steps in this session).
202
+
203
+ **If "Start fresh"** → Suggest the appropriate original workflow skill:
204
+ - bug-fix-workflow → `/bug-fix-workflow`
205
+ - feature-workflow → `/feature-workflow`
206
+ - refactor-workflow → `/refactor-workflow`
207
+ End this skill.
208
+
209
+ **NEVER proceed to Phase 2 without explicit user selection via `AskUserQuestion`. Do NOT render options as plain text — the user must be able to click/select.**
182
210
 
183
- **CHECKPOINT CP-REC-1**: User confirmed recovery.
211
+ **CHECKPOINT CP-REC-1**: User chose recovery approach.
184
212
 
185
213
  ---
186
214
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.1.29",
3
+ "version": "1.1.31",
4
4
  "description": "Create a new PrizmKit-powered project with clean initialization — no framework dev files, just what you need.",
5
5
  "type": "module",
6
6
  "bin": {