prizmkit 1.1.40 → 1.1.41
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.
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +1 -1
- package/bundled/dev-pipeline/run-bugfix.sh +74 -0
- package/bundled/dev-pipeline/run-feature.sh +74 -0
- package/bundled/dev-pipeline/run-refactor.sh +74 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +0 -6
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +0 -23
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +0 -23
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +0 -23
- package/bundled/dev-pipeline/tests/test-deploy-safety.sh +223 -0
- package/bundled/skills/_metadata.json +3 -3
- package/bundled/skills/app-planner/SKILL.md +0 -3
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +8 -2
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +8 -2
- package/bundled/skills/prizmkit-committer/SKILL.md +0 -1
- package/bundled/skills/prizmkit-deploy/SKILL.md +491 -209
- package/bundled/skills/prizmkit-deploy/references/cloud-platform-deploy.md +93 -0
- package/bundled/skills/prizmkit-deploy/references/deploy-config-schema.md +147 -0
- package/bundled/skills/prizmkit-deploy/references/deploy-history-schema.md +62 -0
- package/bundled/skills/prizmkit-deploy/references/docker-deploy.md +31 -0
- package/bundled/skills/prizmkit-deploy/references/nginx-blue-green.md +59 -0
- package/bundled/skills/prizmkit-init/SKILL.md +0 -2
- package/bundled/skills/prizmkit-plan/SKILL.md +0 -3
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +8 -2
- package/package.json +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +0 -31
- package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +0 -187
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Cloud Platform Deployment Path
|
|
2
|
+
|
|
3
|
+
Guided deployment for Vercel, Netlify, Fly.io, and similar cloud platforms. Full automation isn't available — these platforms require browser-based authentication — but the skill provides structured CLI assistance.
|
|
4
|
+
|
|
5
|
+
## Detect and Validate
|
|
6
|
+
|
|
7
|
+
1. Check if the platform CLI is installed: `vercel --version`, `netlify --version`, `fly version`.
|
|
8
|
+
2. If missing, guide the user to install: `npm install -g vercel` or link to docs.
|
|
9
|
+
3. Check authentication: `vercel whoami`, `netlify status`. If not logged in, guide the user through `vercel login`.
|
|
10
|
+
4. Read the platform config file (`vercel.json`, `netlify.toml`, `fly.toml`) to understand existing settings.
|
|
11
|
+
|
|
12
|
+
## Generate Configuration
|
|
13
|
+
|
|
14
|
+
1. If no platform config file exists, generate one based on project detection:
|
|
15
|
+
- **Next.js on Vercel**: minimal config — Vercel auto-detects Next.js. Generate `vercel.json` only if custom rewrites/redirects are needed.
|
|
16
|
+
- **Static site on Netlify**: generate `netlify.toml` with build command and publish directory.
|
|
17
|
+
- **Any on Fly.io**: generate `fly.toml` with app name, builder, and HTTP service config.
|
|
18
|
+
2. Set environment variables via the platform CLI: `vercel env add`, `netlify env:set`.
|
|
19
|
+
3. Document all env vars needed (from Discovery Step 1 scan).
|
|
20
|
+
|
|
21
|
+
## Deploy and Verify
|
|
22
|
+
|
|
23
|
+
1. Run the platform deploy command: `vercel deploy --prod`, `netlify deploy --prod`, `fly deploy`.
|
|
24
|
+
2. If the command requires interactive input, run it and show output to the user.
|
|
25
|
+
3. After deploy, run health checks against the production URL.
|
|
26
|
+
4. Write a deploy-history event recording: platform, project name, deploy URL, commit SHA, timestamp.
|
|
27
|
+
|
|
28
|
+
## Operations
|
|
29
|
+
|
|
30
|
+
| Command | Vercel | Netlify | Fly.io |
|
|
31
|
+
|---------|--------|---------|--------|
|
|
32
|
+
| status | `vercel list` | `netlify status` | `fly status` |
|
|
33
|
+
| logs | `vercel logs` | `netlify logs` | `fly logs` |
|
|
34
|
+
| rollback | `vercel rollback` | `netlify rollback` | `fly rollback` |
|
|
35
|
+
| env | `vercel env ls` | `netlify env:list` | `fly secrets list` |
|
|
36
|
+
|
|
37
|
+
Platform rollback is instant — no release-based rollback needed.
|
|
38
|
+
|
|
39
|
+
## Platform-Specific Patterns
|
|
40
|
+
|
|
41
|
+
### Vercel
|
|
42
|
+
|
|
43
|
+
Vercel auto-detects Next.js projects — no config file required for basic deployments. Generate `vercel.json` only for custom rewrites, redirects, or headers.
|
|
44
|
+
|
|
45
|
+
Key behaviors:
|
|
46
|
+
- Next.js: framework auto-detected, build command and output directory inferred automatically
|
|
47
|
+
- Static sites: set build command and output directory via `vercel.json` or CLI
|
|
48
|
+
- Env vars: `vercel env add <KEY>` (supports `production`, `preview`, `development` environments)
|
|
49
|
+
- Deploy preview: every branch gets a preview URL automatically (if connected via GitHub)
|
|
50
|
+
|
|
51
|
+
### Netlify
|
|
52
|
+
|
|
53
|
+
Netlify requires explicit build and publish configuration. Use `netlify.toml`:
|
|
54
|
+
|
|
55
|
+
```toml
|
|
56
|
+
[build]
|
|
57
|
+
command = "npm run build"
|
|
58
|
+
publish = "dist"
|
|
59
|
+
|
|
60
|
+
[[redirects]]
|
|
61
|
+
from = "/*"
|
|
62
|
+
to = "/index.html"
|
|
63
|
+
status = 200
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Key behaviors:
|
|
67
|
+
- SPA redirects: the catch-all redirect above is essential for client-side routing
|
|
68
|
+
- Env vars: `netlify env:set <KEY> <VALUE>` (per-context: `production`, `deploy-preview`, `branch-deploy`)
|
|
69
|
+
- Branch deploys: every branch gets a deploy-preview URL automatically (if connected via GitHub)
|
|
70
|
+
|
|
71
|
+
### Fly.io
|
|
72
|
+
|
|
73
|
+
Fly.io requires a `fly.toml` with app name, builder, and HTTP service config:
|
|
74
|
+
|
|
75
|
+
```toml
|
|
76
|
+
app = "<app-name>"
|
|
77
|
+
primary_region = "lhr"
|
|
78
|
+
|
|
79
|
+
[build]
|
|
80
|
+
builder = "dockerfile"
|
|
81
|
+
|
|
82
|
+
[http_service]
|
|
83
|
+
internal_port = 3000
|
|
84
|
+
force_https = true
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Key behaviors:
|
|
88
|
+
- Builder: `dockerfile` (default, uses Dockerfile) or `static` (static site hosting)
|
|
89
|
+
- Secrets: `fly secrets set <KEY>=<VALUE>` for runtime environment variables
|
|
90
|
+
- Scale: `fly scale count <N>` to adjust VM instances
|
|
91
|
+
- Volumes: for persistent data, configure `[mounts]` in fly.toml
|
|
92
|
+
|
|
93
|
+
**Note**: These are minimum-viable platform references; browser-based authentication remains a user-action step. Enriched platform coverage is planned for future iterations.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# deploy.config.json Schema
|
|
2
|
+
|
|
3
|
+
This file is the machine-readable deployment configuration. Always read it before executing any deploy operation.
|
|
4
|
+
|
|
5
|
+
## Top-Level Structure
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"version": 1,
|
|
10
|
+
"project": "project-name",
|
|
11
|
+
"deploymentMode": "ssh",
|
|
12
|
+
"defaults": { ... },
|
|
13
|
+
"environments": { ... },
|
|
14
|
+
"servers": [ ... ],
|
|
15
|
+
"repository": { ... },
|
|
16
|
+
"apps": [ ... ],
|
|
17
|
+
"nginx": { ... },
|
|
18
|
+
"env": { ... }
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## defaults
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"releaseRetention": 5,
|
|
27
|
+
"credentialMode": "ai-assisted|user-managed",
|
|
28
|
+
"secretStorage": "ask-every-time|encrypted-local|plaintext-local|user-managed-on-server-only",
|
|
29
|
+
"rollbackOnFailure": true,
|
|
30
|
+
"headlessDefaultEnvironment": "test"
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## environments
|
|
35
|
+
|
|
36
|
+
Keyed by environment name. Each entry:
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"dev": {
|
|
40
|
+
"server": "server-id",
|
|
41
|
+
"allowHeadless": true,
|
|
42
|
+
"confirmBeforeDeploy": false
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## servers
|
|
48
|
+
|
|
49
|
+
Array of server objects:
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"id": "prod-1",
|
|
53
|
+
"host": "IP or hostname",
|
|
54
|
+
"port": 22,
|
|
55
|
+
"bootstrapUser": "root",
|
|
56
|
+
"runtimeUser": "deploy",
|
|
57
|
+
"roles": ["web"],
|
|
58
|
+
"validated": {
|
|
59
|
+
"ssh": true|false,
|
|
60
|
+
"bootstrap": true|false,
|
|
61
|
+
"runtimeUser": true|false,
|
|
62
|
+
"tools": {
|
|
63
|
+
"node": "version",
|
|
64
|
+
"npm": "version",
|
|
65
|
+
"pm2": "version",
|
|
66
|
+
"nginx": "version",
|
|
67
|
+
"git": "version"
|
|
68
|
+
},
|
|
69
|
+
"directories": true|false,
|
|
70
|
+
"deployKey": true|false
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## repository
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"url": "git@github.com:owner/repo.git",
|
|
80
|
+
"branch": "master",
|
|
81
|
+
"auth": "deploy-key|ssh-agent|token",
|
|
82
|
+
"validated": {
|
|
83
|
+
"clone": true|false
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## apps
|
|
89
|
+
|
|
90
|
+
Array of app objects:
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"id": "web",
|
|
94
|
+
"path": ".",
|
|
95
|
+
"runtime": "pm2",
|
|
96
|
+
"packageManager": "npm",
|
|
97
|
+
"installCommand": "npm ci",
|
|
98
|
+
"buildCommand": "npm run build",
|
|
99
|
+
"startCommand": "npm run start",
|
|
100
|
+
"ports": {
|
|
101
|
+
"blue": 3101,
|
|
102
|
+
"green": 3102
|
|
103
|
+
},
|
|
104
|
+
"healthChecks": [
|
|
105
|
+
{ "name": "home", "url": "/", "expectedStatus": [200] },
|
|
106
|
+
{ "name": "login", "url": "/login", "expectedStatus": [200, 302] }
|
|
107
|
+
],
|
|
108
|
+
"activeColor": "blue",
|
|
109
|
+
"pm2Process": "prizm-ideas-blue"
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## nginx
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"enabled": true,
|
|
118
|
+
"managed": true,
|
|
119
|
+
"firstChangeRequiresConfirmation": true,
|
|
120
|
+
"domain": null,
|
|
121
|
+
"ipFallback": true,
|
|
122
|
+
"currentUpstream": "127.0.0.1:3101"
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## env
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"strategy": "ai-assisted|user-managed",
|
|
131
|
+
"required": ["VAR_NAME"],
|
|
132
|
+
"secrets": ["SECRET_NAME"],
|
|
133
|
+
"validated": {
|
|
134
|
+
"allRequiredPresent": true|false
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Validation Rules
|
|
140
|
+
|
|
141
|
+
- `version` must be present (always 1 for first version)
|
|
142
|
+
- `servers` must have at least one entry with host and bootstrapUser
|
|
143
|
+
- `repository.url` must be present
|
|
144
|
+
- `apps` must have at least one entry
|
|
145
|
+
- `apps[*].ports.blue` and `apps[*].ports.green` must differ
|
|
146
|
+
- `apps[*].healthChecks` should have at least one entry
|
|
147
|
+
- Environment referenced in `environments` must have a matching server in `servers`
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Deploy History Record Schema
|
|
2
|
+
|
|
3
|
+
Each event in `.prizmkit/deploy/deploy-history/<id>.json` follows this schema:
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"eventId": "<releaseId or event id>",
|
|
8
|
+
"eventType": "deploy|rollback|status|validation|failed-deploy|user-aborted|takeover|adapter-gap",
|
|
9
|
+
"timestamp": "<ISO 8601>",
|
|
10
|
+
"serverId": "<server id from deploy.config.json>",
|
|
11
|
+
"appIds": ["<app ids involved>"],
|
|
12
|
+
"branch": "<git branch>",
|
|
13
|
+
"commitSha": "<full or short commit SHA>",
|
|
14
|
+
"releasePath": "<full server path, e.g. /var/www/prizm-ideas/releases/20260430-22783a3>",
|
|
15
|
+
"previousReleasePath": "<previous release path or null for first deploy>",
|
|
16
|
+
"targetPort": 3101,
|
|
17
|
+
"targetColor": "blue|green",
|
|
18
|
+
"previousPort": 3102,
|
|
19
|
+
"phases": {
|
|
20
|
+
"preflight": "success|failed|skipped",
|
|
21
|
+
"prepareRelease": "success|failed|skipped",
|
|
22
|
+
"fetchCode": "success|failed|skipped",
|
|
23
|
+
"installDependencies": "success|failed|skipped",
|
|
24
|
+
"build": "success|failed|skipped",
|
|
25
|
+
"stageRuntime": "success|failed|skipped",
|
|
26
|
+
"healthCheck": "success|failed|skipped",
|
|
27
|
+
"switchTraffic": "success|failed|skipped",
|
|
28
|
+
"verifyLive": "success|failed|skipped",
|
|
29
|
+
"cleanupOldReleases": "success|failed|skipped",
|
|
30
|
+
"recordHistory": "success|failed|skipped"
|
|
31
|
+
},
|
|
32
|
+
"healthCheckResults": [
|
|
33
|
+
{
|
|
34
|
+
"name": "home",
|
|
35
|
+
"url": "/",
|
|
36
|
+
"expected": [200],
|
|
37
|
+
"actual": 200,
|
|
38
|
+
"pass": true
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"rollbackResult": null,
|
|
42
|
+
"logPath": "<server log path>",
|
|
43
|
+
"operatorMode": "ai-assisted|user-managed",
|
|
44
|
+
"notes": "<human-readable summary of what happened>"
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Field Notes
|
|
49
|
+
|
|
50
|
+
- `eventId`: Use `<releaseId>` for deploy events, `<releaseId>-rollback` for rollbacks.
|
|
51
|
+
- `eventType`: Use `failed-deploy` when deploy fails before traffic switch, `deploy` when it succeeds. Use `adapter-gap` when no adapter exists for the detected project type or target — include `detectedProjectType`, `missingAdapter`, and `fallbackOutput` in the record.
|
|
52
|
+
- `phases`: Only include phases that were attempted. Skip phases that were never reached.
|
|
53
|
+
- `healthCheckResults`: Include all configured health checks. `pass` = actual status matches one of the expected status codes.
|
|
54
|
+
- `rollbackResult`: `null` for non-rollback events, `"success"` or `"failed"` for rollbacks.
|
|
55
|
+
- `notes`: Keep concise but include any anomalies or manual interventions.
|
|
56
|
+
|
|
57
|
+
## What NOT to record
|
|
58
|
+
|
|
59
|
+
- Raw secret values or API keys — never.
|
|
60
|
+
- Unsalted hashes of secret values — inferable with rainbow tables.
|
|
61
|
+
- Passphrases or decryption keys — even if hashed.
|
|
62
|
+
- Full environment variable values — presence metadata only (e.g., `{"SUPABASE_KEY": {"present": true}}`).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Docker Deployment Path
|
|
2
|
+
|
|
3
|
+
Guided deployment when a `Dockerfile` or `docker-compose.yml` is detected, or the user requests Docker deployment.
|
|
4
|
+
|
|
5
|
+
## Detect and Configure
|
|
6
|
+
|
|
7
|
+
1. Read `Dockerfile` — extract base image, exposed ports, build steps.
|
|
8
|
+
2. Read `docker-compose.yml` if present — extract services, volumes, environment, ports.
|
|
9
|
+
3. Identify image name: from compose project name or repo directory name.
|
|
10
|
+
4. Identify port mappings: from `EXPOSE`, `ports:` in compose, or ask the user.
|
|
11
|
+
|
|
12
|
+
## Build and Deploy
|
|
13
|
+
|
|
14
|
+
1. Build: `docker build -t <project>:<releaseId> .` or `docker compose build`.
|
|
15
|
+
2. Check for running containers with the same name: `docker ps -a --filter name=<project>`.
|
|
16
|
+
3. If a previous container exists:
|
|
17
|
+
- For blue/green on a server with Nginx: start new container on different port, health check, switch upstream.
|
|
18
|
+
- For single-container setup: stop old, start new — warn about brief downtime.
|
|
19
|
+
4. Start: `docker run -d --name <project>-<releaseId> -p <port>:<port> <project>:<releaseId>` or `docker compose up -d`.
|
|
20
|
+
5. Health check the new container.
|
|
21
|
+
6. Write deploy-history event.
|
|
22
|
+
|
|
23
|
+
## Operations
|
|
24
|
+
|
|
25
|
+
| Command | Docker CLI |
|
|
26
|
+
|---------|-----------|
|
|
27
|
+
| status | `docker ps --filter name=<project>` |
|
|
28
|
+
| logs | `docker logs <container-name> --tail 100` |
|
|
29
|
+
| restart | `docker restart <container-name>` |
|
|
30
|
+
| rollback | `docker stop <new-container> && docker start <old-container>` |
|
|
31
|
+
| cleanup | `docker image prune -a --filter "label=project=<project>"` |
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Nginx Blue/Green Configuration Template
|
|
2
|
+
|
|
3
|
+
## Server Block Template
|
|
4
|
+
|
|
5
|
+
```nginx
|
|
6
|
+
# PrizmKit Managed: <project> — DO NOT EDIT MANUALLY
|
|
7
|
+
upstream <project>_backend {
|
|
8
|
+
server 127.0.0.1:<activePort>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
server {
|
|
12
|
+
listen 80 default_server;
|
|
13
|
+
server_name _;
|
|
14
|
+
|
|
15
|
+
# PrizmKit managed marker: <project>
|
|
16
|
+
location / {
|
|
17
|
+
proxy_pass http://<project>_backend;
|
|
18
|
+
proxy_http_version 1.1;
|
|
19
|
+
proxy_set_header Host $host;
|
|
20
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
21
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
22
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Traffic Switch Procedure
|
|
28
|
+
|
|
29
|
+
When switching from one color to another:
|
|
30
|
+
|
|
31
|
+
1. Update the `upstream` block: change `server 127.0.0.1:<oldPort>` to `server 127.0.0.1:<newPort>`
|
|
32
|
+
2. Run `nginx -t` to validate syntax
|
|
33
|
+
3. If syntax check passes: `systemctl reload nginx`
|
|
34
|
+
4. If syntax check fails: DO NOT reload. Abort the switch. Report the error.
|
|
35
|
+
|
|
36
|
+
## Managed Marker
|
|
37
|
+
|
|
38
|
+
All PrizmKit-generated Nginx config must contain:
|
|
39
|
+
```
|
|
40
|
+
# PrizmKit Managed: <project> — DO NOT EDIT MANUALLY
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Before modifying any server block that lacks this marker, ask for user confirmation.
|
|
44
|
+
|
|
45
|
+
## First-Time Setup
|
|
46
|
+
|
|
47
|
+
- Disable default nginx site: `rm -f /etc/nginx/sites-enabled/default`
|
|
48
|
+
- Create new config: `/etc/nginx/sites-available/<project>`
|
|
49
|
+
- Symlink: `ln -sf /etc/nginx/sites-available/<project> /etc/nginx/sites-enabled/<project>`
|
|
50
|
+
- Test: `nginx -t`
|
|
51
|
+
- Reload: `systemctl reload nginx`
|
|
52
|
+
|
|
53
|
+
## Rediscovery of Active Port
|
|
54
|
+
|
|
55
|
+
If `deploy-metadata.json` is missing, rediscover the active upstream port from Nginx config:
|
|
56
|
+
```
|
|
57
|
+
grep "server 127.0.0.1:" /etc/nginx/sites-available/<project>
|
|
58
|
+
```
|
|
59
|
+
Then match the port against configured blue/green ports to determine active color.
|
|
@@ -138,7 +138,6 @@ Detect database and deployment signals, then ask 1-2 brief questions. This phase
|
|
|
138
138
|
- **Target**: [platform name or "undecided"]
|
|
139
139
|
```
|
|
140
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
141
|
- If user selects "Skip — decide later" for BOTH topics: write deferred marker instead:
|
|
143
142
|
```markdown
|
|
144
143
|
### Infrastructure
|
|
@@ -265,7 +264,6 @@ Infrastructure Quick Scan:
|
|
|
265
264
|
Database: PostgreSQL (Prisma) — detected from dependencies
|
|
266
265
|
Deployment: Vercel — detected from vercel.json
|
|
267
266
|
→ Written to CLAUDE.md ### Infrastructure
|
|
268
|
-
→ Created .prizmkit/deploy.md skeleton
|
|
269
267
|
|
|
270
268
|
Modules discovered:
|
|
271
269
|
src/routes/ → .prizm-docs/routes.prizm (12 files)
|
|
@@ -68,9 +68,6 @@ A universal spec + plan generator. Takes a natural-language description of ANY d
|
|
|
68
68
|
- Behavior preservation strategy (if the task modifies existing behavior — include what must remain unchanged and how to verify)
|
|
69
69
|
5. Cross-check: every goal in spec.md maps to plan components — unmapped goals = coverage gaps
|
|
70
70
|
6. Check alignment with `.prizm-docs/root.prizm` RULES section
|
|
71
|
-
7. **Deployment strategy check** (skip if no deployment impact):
|
|
72
|
-
- Read `.prizmkit/config.json` `deploy_strategy` field
|
|
73
|
-
- No strategy and new infra needed → ask user, write to config.json
|
|
74
71
|
|
|
75
72
|
### Phase 2: Task Generation (plan.md → Tasks section)
|
|
76
73
|
|
|
@@ -176,6 +176,10 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
176
176
|
- Off (default) — Skip adversarial review
|
|
177
177
|
- On — Enable adversarial critic review: an independent AI agent reviews the refactor plan for completeness and the implementation for regressions, missed edge cases, and behavior violations. Adds ~5-10 min per refactor task.
|
|
178
178
|
|
|
179
|
+
**Question 4 — Deploy after completion?** (multiSelect: false):
|
|
180
|
+
- No (default) — Skip deployment after pipeline completes
|
|
181
|
+
- Yes — Run /prizmkit-deploy automatically after all refactors complete successfully (`ENABLE_DEPLOY=1`). Deployment is blocked if any refactor did not complete successfully (status not 'completed' or manually 'skipped').
|
|
182
|
+
|
|
179
183
|
Default Critic to Off unless refactor items have `priority: "critical"` (in which case default to On).
|
|
180
184
|
|
|
181
185
|
**Environment variable mapping** (for translating user responses → env vars):
|
|
@@ -190,6 +194,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
190
194
|
| Critic: On | `ENABLE_CRITIC=true` |
|
|
191
195
|
| Timeout: value | `SESSION_TIMEOUT=<seconds>` |
|
|
192
196
|
| Stop on failure: On | `STOP_ON_FAILURE=1` |
|
|
197
|
+
| Deploy: Yes | `ENABLE_DEPLOY=1` |
|
|
193
198
|
|
|
194
199
|
**Advanced environment variables** (not exposed in interactive menu, pass via `--env`):
|
|
195
200
|
|
|
@@ -214,7 +219,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
214
219
|
```
|
|
215
220
|
With all options:
|
|
216
221
|
```bash
|
|
217
|
-
VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 MAX_RETRIES=5 SESSION_TIMEOUT=3600 \
|
|
222
|
+
VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 MAX_RETRIES=5 SESSION_TIMEOUT=3600 ENABLE_DEPLOY=1 \
|
|
218
223
|
dev-pipeline/run-refactor.sh run .prizmkit/plans/refactor-list.json
|
|
219
224
|
```
|
|
220
225
|
|
|
@@ -225,7 +230,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
225
230
|
With all options:
|
|
226
231
|
```bash
|
|
227
232
|
dev-pipeline/launch-refactor-daemon.sh start .prizmkit/plans/refactor-list.json \
|
|
228
|
-
--env "VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 MAX_RETRIES=5"
|
|
233
|
+
--env "VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 MAX_RETRIES=5 ENABLE_DEPLOY=1"
|
|
229
234
|
```
|
|
230
235
|
|
|
231
236
|
**Manual mode**: Print the assembled command(s) and **stop here**. Do not execute anything. Do not proceed to step 8.
|
|
@@ -367,6 +372,7 @@ Notes:
|
|
|
367
372
|
| All refactors blocked/failed | Show status, suggest recovery: `dev-pipeline/reset-refactor.sh <R-XXX> --clean --run .prizmkit/plans/refactor-list.json` |
|
|
368
373
|
| `playwright-cli` not installed | Browser verification skipped for playwright refactors (non-blocking). Suggest: `npm install -g @playwright/cli@latest && playwright-cli install --skills` |
|
|
369
374
|
| `opencli` not installed | Browser verification skipped for opencli refactors (non-blocking). Install opencli for Chrome session-based browser verification |
|
|
375
|
+
| Deploy session failed | Pipeline completed but deploy session exited non-zero. Check `.prizmkit/state/refactor/deploy/<session_id>/logs/session.log`. Retry manually: `/prizmkit-deploy`. |
|
|
370
376
|
| Permission denied on script | Run `chmod +x dev-pipeline/launch-refactor-daemon.sh dev-pipeline/run-refactor.sh` |
|
|
371
377
|
|
|
372
378
|
### Integration Notes
|
package/package.json
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
### Local Deploy Verification
|
|
2
|
-
|
|
3
|
-
You just implemented this feature — you know the project's tech stack and build tools.
|
|
4
|
-
|
|
5
|
-
1. **Build**: Run the project's build/compile commands. If a required tool is missing, install it first.
|
|
6
|
-
2. **Fix**: If build fails with code errors (type errors, missing imports, config issues), fix them (max 2 rounds), then re-verify.
|
|
7
|
-
3. **Assess and record** — append to context-snapshot.md:
|
|
8
|
-
- **ALL builds pass** → `## Deploy Verification: PASS` — proceed to commit
|
|
9
|
-
- **Some builds fail with fixable errors** → fix and re-verify (already handled in step 2)
|
|
10
|
-
- **Cannot build locally** (missing system-level deps you cannot install) → Record: `## Deploy Verification: PARTIAL — missing system deps (see below)`
|
|
11
|
-
|
|
12
|
-
Deploy verification does NOT block the commit, but you MUST attempt it.
|
|
13
|
-
|
|
14
|
-
**Smoke test** (only if build passed and project can be started):
|
|
15
|
-
1. Start the project locally (e.g., `make dev`, `npm start`, `go run .`, etc.)
|
|
16
|
-
2. Verify basic functionality: hit key endpoints, check health routes, confirm the UI loads
|
|
17
|
-
3. Stop the server process you started — do NOT leave it running
|
|
18
|
-
4. Record smoke test results in `## Deploy Verification` section
|
|
19
|
-
|
|
20
|
-
If the project cannot be started locally (e.g., requires external services, databases, credentials), skip the smoke test and note why.
|
|
21
|
-
|
|
22
|
-
**Deploy documentation update** — Run `/prizmkit-deploy` ONLY if this feature introduced new infrastructure or deployment-affecting changes:
|
|
23
|
-
- New database, cache, message queue, or external service dependency
|
|
24
|
-
- New environment variables required
|
|
25
|
-
- New build steps or deployment configuration (Dockerfile, CI/CD, cloud config)
|
|
26
|
-
- Changed ports, protocols, or service topology
|
|
27
|
-
|
|
28
|
-
If none of the above apply (pure application logic change), skip `/prizmkit-deploy`.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
**Checkpoint update**: Update `workflow-checkpoint.json` — set step `deploy-verification` to `"completed"`.
|