prizmkit 1.1.95 → 1.1.96
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/rules/general/agent-operational-rules.md +0 -38
- package/bundled/rules/general/cohesive-modeling.md +31 -18
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +2 -2
- package/bundled/skills/app-planner/references/project-state-detection.md +2 -2
- package/bundled/skills/bug-planner/SKILL.md +1 -2
- package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +3 -3
- package/bundled/skills/prizm-kit/SKILL.md +1 -1
- package/bundled/skills/prizmkit-deploy/SKILL.md +8 -8
- package/bundled/skills/prizmkit-deploy/references/database-setup.md +4 -4
- package/bundled/skills/prizmkit-deploy/references/deployment-modes.md +7 -7
- package/bundled/skills/prizmkit-deploy/references/dns-setup.md +7 -7
- package/bundled/skills/prizmkit-deploy/references/firewall-setup.md +5 -5
- package/bundled/skills/prizmkit-deploy/references/ssh-execution-flow.md +1 -1
- package/bundled/skills/prizmkit-deploy/references/ssl-setup.md +4 -4
- package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +1 -1
- package/bundled/skills/prizmkit-test/SKILL.md +2 -2
- package/bundled/skills/recovery-workflow/evals/evals.json +3 -3
- package/bundled/skills-windows/bug-planner/SKILL.md +1 -2
- package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +3 -3
- package/bundled/skills-windows/prizm-kit/SKILL.md +1 -1
- package/bundled/skills-windows/prizmkit-deploy/SKILL.md +8 -8
- package/bundled/skills-windows/prizmkit-deploy/references/database-setup.md +4 -4
- package/bundled/skills-windows/prizmkit-deploy/references/deployment-modes.md +7 -7
- package/bundled/skills-windows/prizmkit-deploy/references/dns-setup.md +7 -7
- package/bundled/skills-windows/prizmkit-deploy/references/firewall-setup.md +5 -5
- package/bundled/skills-windows/prizmkit-deploy/references/ssh-execution-flow.md +1 -1
- package/bundled/skills-windows/prizmkit-deploy/references/ssl-setup.md +4 -4
- package/bundled/skills-windows/prizmkit-prizm-docs/assets/prizm-docs-format.md +1 -1
- package/bundled/skills-windows/prizmkit-test/SKILL.md +2 -2
- package/bundled/skills-windows/recovery-workflow/evals/evals.json +3 -3
- package/package.json +1 -1
- /package/bundled/skills/app-planner/{assets → references}/app-design-guide.md +0 -0
package/bundled/VERSION.json
CHANGED
|
@@ -27,42 +27,4 @@ Before any Read with offset + limit:
|
|
|
27
27
|
|
|
28
28
|
Before editing a large file (>1000 lines), verify you know its current line count from the most recent tool_result. Old line counts from earlier turns may be stale if you have since edited the file.
|
|
29
29
|
|
|
30
|
-
## Consecutive Read Failures
|
|
31
30
|
|
|
32
|
-
If 3 consecutive Read calls to the same file return 'shorter than provided offset' or 'Wasted call':
|
|
33
|
-
- STOP all work on that file.
|
|
34
|
-
- Send ESCALATION with the file path, current line count, and the offsets you attempted.
|
|
35
|
-
- The orchestrator will provide the correct content.
|
|
36
|
-
|
|
37
|
-
## Test Output Hygiene
|
|
38
|
-
|
|
39
|
-
**Applies to: Dev Agent and any agent that runs tests.** Does NOT apply to Reviewer, Critic, or other agents that do not execute test commands.
|
|
40
|
-
|
|
41
|
-
When tests fail:
|
|
42
|
-
- Run the test command provided in your task assignment ONCE (e.g., `$TEST_CMD`, `npm test`, `pytest`, etc.).
|
|
43
|
-
- Capture output with `tee` (macOS/Linux) or `Tee-Object` (Windows/PowerShell) to a temp file.
|
|
44
|
-
- Then grep/Select-String that file for failure details.
|
|
45
|
-
- Never re-run the full test suite just to apply a different filter to its output.
|
|
46
|
-
|
|
47
|
-
**macOS/Linux**:
|
|
48
|
-
```bash
|
|
49
|
-
($TEST_CMD) 2>&1 | tee /tmp/test-out.txt | tail -20
|
|
50
|
-
grep -n "FAIL\|Error\|assert" /tmp/test-out.txt
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
**Windows/PowerShell**:
|
|
54
|
-
```powershell
|
|
55
|
-
& { {{TEST_CMD}} } 2>&1 | Tee-Object (Join-Path $env:TEMP "test-out.txt") | Select-Object -Last 20
|
|
56
|
-
Select-String -Path (Join-Path $env:TEMP "test-out.txt") -Pattern "FAIL|Error|assert"
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Note: `$TEST_CMD` / `{{TEST_CMD}}` is a placeholder set by the pipeline or orchestrator. Use whatever test command is provided in your task assignment. Do NOT hardcode a specific test tool — projects vary.
|
|
60
|
-
|
|
61
|
-
## Incremental Validation
|
|
62
|
-
|
|
63
|
-
**Applies to: Dev Agent.** Does NOT apply to Reviewer, Critic, or read-only agents.
|
|
64
|
-
|
|
65
|
-
After every 3 successful Edit operations on a file:
|
|
66
|
-
- Run the relevant test command for that file once.
|
|
67
|
-
- Validate your changes compile and behave correctly.
|
|
68
|
-
- Do not defer all testing to the end.
|
|
@@ -1,27 +1,40 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "Model variables/fields/concepts that always appear together as a cohesive whole, not scattered fragments"
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
When designing or understanding any system, if a group of variables, fields, or concepts always appear together and express the same semantic unit, they should be modeled as a single whole rather than scattered fragments:
|
|
6
6
|
|
|
7
|
-
- **Go** —
|
|
8
|
-
- **Java/Python** —
|
|
9
|
-
- **TypeScript** —
|
|
10
|
-
-
|
|
11
|
-
-
|
|
7
|
+
- **Go** — define a struct
|
|
8
|
+
- **Java/Python** — define a class
|
|
9
|
+
- **TypeScript** — define an interface/type
|
|
10
|
+
- **Config** — group into a nested config block
|
|
11
|
+
- **Module partitioning** — split into an independent module
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
The essence is the same principle: **highly cohesive things should be a single thing at the moment of modeling.**
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Trigger Scenarios
|
|
16
16
|
|
|
17
|
-
1.
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
20
|
-
4.
|
|
21
|
-
5.
|
|
17
|
+
1. Within a function/method parameter list, a few parameters are always passed together → extract into a parameter object
|
|
18
|
+
2. Multiple variables are always assigned, passed, and returned together → merge into a struct/class
|
|
19
|
+
3. A group of keys in a config file always appears in pairs/clusters → group into a nested config block
|
|
20
|
+
4. You find yourself repeatedly declaring the same set of fields across different files → extract a shared type/interface
|
|
21
|
+
5. Modifying one value requires synchronously modifying another → they belong to the same invariant and should be encapsulated together
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Anti-Patterns (Avoid)
|
|
24
24
|
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
25
|
+
- **Primitive Obsession**: using scattered string/number in place of meaningful types
|
|
26
|
+
- **Data Clumps**: the same group of data repeatedly appearing in parameter lists, return values, and variable declarations
|
|
27
|
+
- **Shotgun Surgery**: adding one field requires changing function signatures across N files
|
|
28
|
+
|
|
29
|
+
## How to Apply
|
|
30
|
+
|
|
31
|
+
- When you spot a trigger scenario, extract the cohesive group into a named unit in one pass — do not leave it for "later refactoring."
|
|
32
|
+
- Prefer immutability for the extracted unit to preserve the invariant across the codebase.
|
|
33
|
+
- Name the unit after the domain concept it represents, not the data it happens to contain (e.g., `Money`, not `AmountAndCurrency`).
|
|
34
|
+
- Apply the rule at the lowest level first (parameter object, struct), then propagate upward to interfaces and modules if the cohesion holds.
|
|
35
|
+
|
|
36
|
+
## Related Principles
|
|
37
|
+
|
|
38
|
+
- **Single Responsibility Principle** — a cohesive unit should have one reason to change.
|
|
39
|
+
- **Invariant Encapsulation** — bundle data that must satisfy a shared constraint so the constraint can be enforced in one place.
|
|
40
|
+
- **Tell, Don't Ask** — once grouped, expose behavior on the whole rather than dissecting it at call sites.
|
|
@@ -66,7 +66,7 @@ Do NOT use this skill when:
|
|
|
66
66
|
## Resource Loading Rules (Mandatory)
|
|
67
67
|
|
|
68
68
|
1. **App design reference** — always load at session start:
|
|
69
|
-
- Read `${SKILL_DIR}/
|
|
69
|
+
- Read `${SKILL_DIR}/references/app-design-guide.md` for vision templates and tech stack matrix
|
|
70
70
|
|
|
71
71
|
2. **Load on-demand references when triggered**:
|
|
72
72
|
- Architecture decisions emerged → read `${SKILL_DIR}/references/architecture-decisions.md`
|
|
@@ -218,7 +218,7 @@ Execute the planning workflow in conversation mode with mandatory checkpoints:
|
|
|
218
218
|
1.1 Confirm deliverable intent (→ Intent Confirmation — option-based)
|
|
219
219
|
1.2 **Requirement clarification** — for ANY unclear aspect of the user's vision, goals, target users, or scope, use option-based questions where possible. When common patterns exist, present them as choices. Only use open-ended questions for truly unique input (e.g., "describe your app idea"). Follow up with option-based clarifications.
|
|
220
220
|
2. Confirm constraints and tech assumptions
|
|
221
|
-
2.1 Tech stack selection — use `${SKILL_DIR}/
|
|
221
|
+
2.1 Tech stack selection — use `${SKILL_DIR}/references/app-design-guide.md` §2 decision matrix. Use `AskUserQuestion` for each major tech decision (framework, database, styling, etc.)
|
|
222
222
|
2.2 **Frontend design check** (for frontend projects) — scan for existing UI/UX design docs. If none found, use `AskUserQuestion`:
|
|
223
223
|
- Question: "No UI/UX design docs found. Would you like to establish design direction?"
|
|
224
224
|
- Options: "Establish design direction now (Recommended)", "Skip for now", "I have external designs"
|
|
@@ -32,7 +32,7 @@ Before ANY planning work, check if AI-essential project context files exist:
|
|
|
32
32
|
**If ANY are missing**, show the status table, then use `AskUserQuestion`:
|
|
33
33
|
|
|
34
34
|
**Question**: "Some AI context files are missing. These help AI understand your project — making planning much more effective. How would you like to proceed?"
|
|
35
|
-
- **Run project init first
|
|
35
|
+
- **Run project init first** — invoke `prizmkit-init` to scan your codebase and generate these files, then return to planning
|
|
36
36
|
- **Continue without init** — I'll scan the project manually during this session (less thorough)
|
|
37
37
|
- **Skip, I'll set these up later** — proceed with planning using only what's available
|
|
38
38
|
|
|
@@ -71,7 +71,7 @@ Show the summary as text, then use `AskUserQuestion`:
|
|
|
71
71
|
> **Architecture**: [e.g., monolithic, microservices, serverless]
|
|
72
72
|
|
|
73
73
|
**Question**: "Does this look correct?"
|
|
74
|
-
- **Yes, looks correct
|
|
74
|
+
- **Yes, looks correct** — proceed with planning
|
|
75
75
|
- **Mostly correct, with changes** — I'll note corrections
|
|
76
76
|
- **This is off** — let me describe the project
|
|
77
77
|
|
|
@@ -212,9 +212,8 @@ Before generating `.prizmkit/plans/bug-fix-list.json`, perform a holistic scan a
|
|
|
212
212
|
|
|
213
213
|
**Step 4 — Present review table**: Display the completeness assessment using the template in `${SKILL_DIR}/assets/bug-confirmation-template.md` (§Completeness Review Template).
|
|
214
214
|
|
|
215
|
-
For any items that need attention, ask targeted questions to fill gaps. Iterate until the user confirms all bugs are adequately described. Present
|
|
215
|
+
For any items that need attention, ask targeted questions to fill gaps. Iterate until the user confirms all bugs are adequately described. Present the prompt:
|
|
216
216
|
|
|
217
|
-
> "以上是完整性审查结果。需要补充的项目是否逐一补充?还是先跳过,之后再完善?"
|
|
218
217
|
> "Above is the completeness review. Items needing more detail — address them now, or proceed and refine later?"
|
|
219
218
|
|
|
220
219
|
Only proceed to Phase 5 after user confirms.
|
|
@@ -23,9 +23,9 @@ Present this after extracting and clarifying each bug:
|
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Then ask three confirmation questions:
|
|
26
|
-
1. "
|
|
27
|
-
2. "
|
|
28
|
-
3. "
|
|
26
|
+
1. "Is the description accurate? Any corrections?"
|
|
27
|
+
2. "Need to add more details? (reproduction steps, environment, related code locations, etc.)"
|
|
28
|
+
3. "Are the acceptance criteria specific enough that the pipeline can autonomously verify the fix?"
|
|
29
29
|
|
|
30
30
|
Only finalize the bug entry after user confirms all three points.
|
|
31
31
|
|
|
@@ -72,7 +72,7 @@ All three follow the same per-task flow. Detailed documentation policies (when t
|
|
|
72
72
|
| `/prizmkit-code-review` | Diagnose issues + produce Fix Instructions | "review", "check code", "is it ready to commit" |
|
|
73
73
|
| `/prizmkit-retrospective` | Sync .prizmkit/prizm-docs/ with code changes | "retrospective", "retro", "sync docs", "wrap up" |
|
|
74
74
|
| `/prizmkit-committer` | Safe git commit with Conventional Commits | "commit", "submit", "finish", "ship it" |
|
|
75
|
-
| `/prizmkit-test` | Generate + run tests, analyze coverage gaps, unified quality report | "test", "run tests", "check quality", "verify code", "
|
|
75
|
+
| `/prizmkit-test` | Generate + run tests, analyze coverage gaps, unified quality report | "test", "run tests", "check quality", "verify code", "add tests" |
|
|
76
76
|
| `/prizmkit-deploy` | Universal deployment gateway: SSH automation, cloud/Docker guided setup, status/logs/rollback | "deploy", "ship it", "go live", "rollback", "deploy status" |
|
|
77
77
|
| `/prizmkit-init` | Project bootstrap + .prizmkit/prizm-docs/ setup | "init", "initialize", "take over this project" |
|
|
78
78
|
| `/prizmkit-prizm-docs` | Doc management (init/status/rebuild/validate) | "check docs", "rebuild docs", "validate docs" |
|
|
@@ -204,14 +204,14 @@ The following sections define the SSH deployment adapter — the only fully-auto
|
|
|
204
204
|
After Discovery routes to SSH, **before** entering the configuration wizard, ask the user how they want to deploy.
|
|
205
205
|
|
|
206
206
|
**First question:**
|
|
207
|
-
> "
|
|
208
|
-
> - **A.
|
|
209
|
-
> - **B. CI/CD
|
|
207
|
+
> "How do you want to deploy to the server?"
|
|
208
|
+
> - **A. Direct Upload (quick start)** — build locally, transfer to server and start. Good for first deployment.
|
|
209
|
+
> - **B. CI/CD Auto-Deploy (recommended)** — configure GitHub Actions, then `git push` auto-deploys.
|
|
210
210
|
|
|
211
211
|
**If user chooses CI/CD, second question:**
|
|
212
|
-
> "CI/CD
|
|
213
|
-
> - **Push
|
|
214
|
-
> - **Pull
|
|
212
|
+
> "CI/CD has two modes:"
|
|
213
|
+
> - **Push mode** — GitHub Actions runner builds, SCP transfers to server. Low server load.
|
|
214
|
+
> - **Pull mode** — server pulls code and builds itself. Simpler config but requires a Deploy Key.
|
|
215
215
|
|
|
216
216
|
For detailed mode descriptions and the full Push/Pull comparison table, read `references/deployment-modes.md`.
|
|
217
217
|
|
|
@@ -306,7 +306,7 @@ After generating the workflow, verify: the first `git push` to the configured br
|
|
|
306
306
|
|
|
307
307
|
Before SSL, check if the user has a domain pointing to the server.
|
|
308
308
|
|
|
309
|
-
1. Ask: "
|
|
309
|
+
1. Ask: "Do you have a domain to bind to this project?" If no domain → skip DNS + SSL, note in deploy.md.
|
|
310
310
|
2. Check DNS: `dig +short <domain> A`. If resolved → proceed to SSL.
|
|
311
311
|
3. If not resolved: show the user DNS setup instructions. Full procedure in `references/dns-setup.md`.
|
|
312
312
|
|
|
@@ -360,7 +360,7 @@ If no previous release exists, rollback is not possible — state this clearly.
|
|
|
360
360
|
|
|
361
361
|
After a successful direct-upload deployment, proactively offer CI/CD setup:
|
|
362
362
|
|
|
363
|
-
> "
|
|
363
|
+
> "Deployment succeeded. Want me to set up CI/CD auto-deploy? After that, `git push` will auto-deploy."
|
|
364
364
|
|
|
365
365
|
If user agrees, ask push vs pull, then configure accordingly. If Pull mode: set up deploy key. If Push mode: add GitHub Actions secrets. Generate `deploy.yml` from `references/ci-cd-workflows.md`, update `deployStrategy` in config, write upgrade event to history.
|
|
366
366
|
|
|
@@ -6,9 +6,9 @@ Read this file when Discovery detected a database driver and the user wants AI-a
|
|
|
6
6
|
|
|
7
7
|
During Discovery Step 1 (Project Detection), database drivers were already scanned. If a driver was detected, ask after bootstrap tools are installed:
|
|
8
8
|
|
|
9
|
-
> "
|
|
10
|
-
> -
|
|
11
|
-
> -
|
|
9
|
+
> "Detected the project uses <PostgreSQL/MySQL/Redis>. Want me to install and configure it on the server?"
|
|
10
|
+
> - **Yes** → proceed with database installation
|
|
11
|
+
> - **No** → skip, record in deploy.md with note "database must be configured by user"
|
|
12
12
|
|
|
13
13
|
## PostgreSQL setup
|
|
14
14
|
|
|
@@ -21,7 +21,7 @@ sudo -u postgres psql -c "GRANT ALL ON DATABASE <project> TO <project>;"
|
|
|
21
21
|
|
|
22
22
|
- Generate a secure random password (32 chars, alphanumeric + symbols).
|
|
23
23
|
- Write the connection string to `.prizmkit/deploy/secrets.local.json`: `DATABASE_URL=postgresql://<project>:<password>@localhost:5432/<project>`.
|
|
24
|
-
- In deploy.md, write: "PostgreSQL
|
|
24
|
+
- In deploy.md, write: "PostgreSQL installed, connection info recorded in `.prizmkit/deploy/secrets.local.json` (not committed to git)".
|
|
25
25
|
|
|
26
26
|
## MySQL setup (future)
|
|
27
27
|
|
|
@@ -34,14 +34,14 @@ Best for: simple setup, servers with sufficient CPU/RAM, projects where build is
|
|
|
34
34
|
|
|
35
35
|
## Comparison
|
|
36
36
|
|
|
37
|
-
|
|
|
37
|
+
| Aspect | Push mode | Pull mode |
|
|
38
38
|
|------|----------|----------|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
| Deploy Key
|
|
44
|
-
|
|
|
39
|
+
| Build location | GitHub Actions runner | Server (local) |
|
|
40
|
+
| Server load | Low (runs app only) | High (build + run) |
|
|
41
|
+
| Config complexity | Medium (needs SCP transfer) | Low (SSH-triggered script only) |
|
|
42
|
+
| Best for | Low-spec servers, heavy builds | Simple setup, capable servers |
|
|
43
|
+
| Deploy Key required | No | Yes |
|
|
44
|
+
| Artifact transfer | SCP tarball | git pull (incremental) |
|
|
45
45
|
|
|
46
46
|
## Common ground between all modes
|
|
47
47
|
|
|
@@ -14,21 +14,21 @@ If not: continue below.
|
|
|
14
14
|
## Step 2 — DNS setup guidance
|
|
15
15
|
|
|
16
16
|
```
|
|
17
|
-
|
|
17
|
+
Domain <example.com> is not yet pointing to server <server-IP>.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Add the following record at your DNS provider (e.g., Alibaba Cloud, Cloudflare, Namecheap):
|
|
20
20
|
|
|
21
21
|
Type: A
|
|
22
22
|
Name: @
|
|
23
|
-
Value:
|
|
23
|
+
Value: <server-IP>
|
|
24
24
|
TTL: 600
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
To also support the www subdomain:
|
|
27
27
|
Type: A
|
|
28
28
|
Name: www
|
|
29
|
-
Value:
|
|
29
|
+
Value: <server-IP>
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Reply "done" when configured, and I'll verify and set up the SSL certificate.
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## Step 3 — Verify after user confirmation
|
|
@@ -39,4 +39,4 @@ If not: continue below.
|
|
|
39
39
|
|
|
40
40
|
## Edge case — IP-only deployment
|
|
41
41
|
|
|
42
|
-
If user has no domain: skip DNS + SSL sections. Generate a note in deploy.md: "
|
|
42
|
+
If user has no domain: skip DNS + SSL sections. Generate a note in deploy.md: "Project accessed via IP, no domain or HTTPS configured. Recommend purchasing a domain and running `/prizmkit-deploy setup-ssl`."
|
|
@@ -5,17 +5,17 @@ Read this file when the user wants AI-assisted firewall configuration during boo
|
|
|
5
5
|
## Flow
|
|
6
6
|
|
|
7
7
|
1. After core tools are installed, ask the user:
|
|
8
|
-
> "
|
|
8
|
+
> "Want me to configure the firewall (ufw)? Only necessary ports will be opened, improving server security."
|
|
9
9
|
|
|
10
10
|
2. If user declines: skip, record to deploy config.
|
|
11
11
|
|
|
12
12
|
3. If user agrees, ask which additional ports to open (beyond SSH/HTTP/HTTPS):
|
|
13
|
-
> "
|
|
13
|
+
> "By default only SSH(22), HTTP(80), HTTPS(443) are opened. Should the blue/green preview ports (3101/3102) also be opened? If you need other ports (e.g., for remote database management), list them together."
|
|
14
14
|
|
|
15
15
|
4. Collect ports, then ask:
|
|
16
|
-
> "
|
|
17
|
-
> - **A.
|
|
18
|
-
> - **B.
|
|
16
|
+
> "Firewall rules are ready. Should I apply them directly, or will you do it yourself?"
|
|
17
|
+
> - **A. You apply them** — AI runs ufw commands
|
|
18
|
+
> - **B. I'll do it myself** — output rule list, user executes manually
|
|
19
19
|
|
|
20
20
|
## Planned rules (output before executing)
|
|
21
21
|
|
|
@@ -4,7 +4,7 @@ Pipeline runs in strict order. Each group must complete before the next begins.
|
|
|
4
4
|
|
|
5
5
|
## Pre-flight — Change Summary
|
|
6
6
|
|
|
7
|
-
Show what will be deployed using `git log --oneline <last-deployed-commit>..HEAD`. If first deployment, show last 5 commits. If no new commits, warn "
|
|
7
|
+
Show what will be deployed using `git log --oneline <last-deployed-commit>..HEAD`. If first deployment, show last 5 commits. If no new commits, warn "No new code changes. Are you sure you want to redeploy?"
|
|
8
8
|
|
|
9
9
|
## Group 1 — Pre-flight & Prepare
|
|
10
10
|
|
|
@@ -15,11 +15,11 @@ Also check `/etc/hostname` for vendor patterns.
|
|
|
15
15
|
## Step 2 — Choose SSL strategy
|
|
16
16
|
|
|
17
17
|
- **Cloud vendor detected** → ask user:
|
|
18
|
-
> "
|
|
19
|
-
> - **A. Let's Encrypt
|
|
20
|
-
> - **B.
|
|
18
|
+
> "Detected the server is running on <cloud-vendor>. Which SSL approach?"
|
|
19
|
+
> - **A. Let's Encrypt free certificate (recommended)** — one command for permanent auto-renewal, hassle-free
|
|
20
|
+
> - **B. <cloud-vendor> native certificate** — manual download/config, 1-year validity requires manual renewal
|
|
21
21
|
>
|
|
22
|
-
>
|
|
22
|
+
> Choose A and I'll set it up for you; choose B and you'll need to download the certificate from the cloud console and tell me the path.
|
|
23
23
|
- **No cloud vendor / unknown** → use certbot directly, no choice needed.
|
|
24
24
|
|
|
25
25
|
## Step 3 — Certbot install & certificate request
|
|
@@ -544,7 +544,7 @@ JSON:
|
|
|
544
544
|
"hooks": {
|
|
545
545
|
"UserPromptSubmit": [
|
|
546
546
|
{
|
|
547
|
-
"matcher": "(?i)\\b(commit|push|finish|ship|merge|pull request|pr)\\b
|
|
547
|
+
"matcher": "(?i)\\b(commit|push|finish|ship|merge|pull request|pr)\\b",
|
|
548
548
|
"hooks": [
|
|
549
549
|
{
|
|
550
550
|
"type": "command",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "prizmkit-test"
|
|
3
|
-
description: "Full-stack test generation and orchestration. Detects architecture, discovers/runs existing tests, analyzes coverage gaps, generates missing unit/integration/E2E tests including business-specific boundary cases, validates every interface with a required boundary coverage matrix, and outputs a unified report. Use after completing development to verify quality before deploy. Trigger on: 'test', 'run tests', 'check quality', 'verify code', 'generate tests', 'test coverage', 'fill test gaps', 'boundary tests', 'edge cases', 'quality check', '
|
|
3
|
+
description: "Full-stack test generation and orchestration. Detects architecture, discovers/runs existing tests, analyzes coverage gaps, generates missing unit/integration/E2E tests including business-specific boundary cases, validates every interface with a required boundary coverage matrix, and outputs a unified report. Use after completing development to verify quality before deploy. Trigger on: 'test', 'run tests', 'check quality', 'verify code', 'generate tests', 'test coverage', 'fill test gaps', 'boundary tests', 'edge cases', 'quality check', 'add tests'. (project)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PrizmKit Test
|
|
@@ -11,7 +11,7 @@ A comprehensive test generation and orchestration skill. Discovers existing test
|
|
|
11
11
|
- After completing one or more features/refactors/bugfixes
|
|
12
12
|
- As a quality gate before deploy
|
|
13
13
|
- Project has a test framework installed but zero tests written (first-time test generation)
|
|
14
|
-
- User says "test", "run tests", "verify", "check quality", "
|
|
14
|
+
- User says "test", "run tests", "verify", "check quality", "add tests"
|
|
15
15
|
|
|
16
16
|
### When NOT to Use
|
|
17
17
|
- Project has no test framework AND no code to test
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
{
|
|
6
6
|
"id": 1,
|
|
7
7
|
"name": "bugfix-mid-fix",
|
|
8
|
-
"prompt": "session
|
|
8
|
+
"prompt": "My session broke, help me recover",
|
|
9
9
|
"expected_output": "Should auto-detect bug-fix-workflow from fix/B-001-* branch. Should detect fix-plan.md + code changes → infer Phase 5 (Review). Should display recovery report with workflow type, phase, artifacts, code stats. After user confirms, should invoke /prizmkit-code-review on existing changes.",
|
|
10
10
|
"setup_description": "Create fix/B-001-login-crash branch, .prizmkit/bugfix/B-001/fix-plan.md, modify 3 source files + 1 test file. No fix-report.md, no commits ahead of main.",
|
|
11
11
|
"files": []
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"id": 2,
|
|
15
15
|
"name": "bugfix-plan-only",
|
|
16
|
-
"prompt": "
|
|
16
|
+
"prompt": "Continue the previous work",
|
|
17
17
|
"expected_output": "Should auto-detect bug-fix-workflow from fix/B-002-* branch. Should detect fix-plan.md but no code changes → infer Phase 4 (Fix). Should read fix-plan.md and start implementing the fix.",
|
|
18
18
|
"setup_description": "Create fix/B-002-null-pointer branch, .prizmkit/bugfix/B-002/fix-plan.md with diagnosis and fix approach. No code changes.",
|
|
19
19
|
"files": []
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
{
|
|
38
38
|
"id": 5,
|
|
39
39
|
"name": "no-workflow-detected",
|
|
40
|
-
"prompt": "
|
|
40
|
+
"prompt": "recover",
|
|
41
41
|
"expected_output": "Should detect no workflow signatures in workspace. Should display guidance message suggesting /feature-workflow, /bug-fix-workflow, or /refactor-workflow. Should NOT attempt any recovery actions.",
|
|
42
42
|
"setup_description": "Clean workspace on main branch. No .prizmkit/plans/feature-list.json, no bug-fix artifacts, no .prizmkit/plans/refactor-list.json, no fix/* or feat/* or refactor/* branches.",
|
|
43
43
|
"files": []
|
|
@@ -239,9 +239,8 @@ Before generating `.prizmkit/plans/bug-fix-list.json`, perform a holistic scan a
|
|
|
239
239
|
|
|
240
240
|
**Step 4 — Present review table**: Display the completeness assessment using the template in `${SKILL_DIR}/assets/bug-confirmation-template.md` (§Completeness Review Template).
|
|
241
241
|
|
|
242
|
-
For any items that need attention, ask targeted questions to fill gaps. Iterate until the user confirms all bugs are adequately described. Present
|
|
242
|
+
For any items that need attention, ask targeted questions to fill gaps. Iterate until the user confirms all bugs are adequately described. Present the prompt:
|
|
243
243
|
|
|
244
|
-
> "以上是完整性审查结果。需要补充的项目是否逐一补充?还是先跳过,之后再完善?"
|
|
245
244
|
> "Above is the completeness review. Items needing more detail — address them now, or proceed and refine later?"
|
|
246
245
|
|
|
247
246
|
Only proceed to Phase 5 after user confirms.
|
|
@@ -23,9 +23,9 @@ Present this after extracting and clarifying each bug:
|
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Then ask three confirmation questions:
|
|
26
|
-
1. "
|
|
27
|
-
2. "
|
|
28
|
-
3. "
|
|
26
|
+
1. "Is the description accurate? Any corrections?"
|
|
27
|
+
2. "Need to add more details? (reproduction steps, environment, related code locations, etc.)"
|
|
28
|
+
3. "Are the acceptance criteria specific enough that the pipeline can autonomously verify the fix?"
|
|
29
29
|
|
|
30
30
|
Only finalize the bug entry after user confirms all three points.
|
|
31
31
|
|
|
@@ -72,7 +72,7 @@ All three follow the same per-task flow. Detailed documentation policies (when t
|
|
|
72
72
|
| `/prizmkit-code-review` | Diagnose issues + produce Fix Instructions | "review", "check code", "is it ready to commit" |
|
|
73
73
|
| `/prizmkit-retrospective` | Sync .prizmkit/prizm-docs/ with code changes | "retrospective", "retro", "sync docs", "wrap up" |
|
|
74
74
|
| `/prizmkit-committer` | Safe git commit with Conventional Commits | "commit", "submit", "finish", "ship it" |
|
|
75
|
-
| `/prizmkit-test` | Generate + run tests, analyze coverage gaps, unified quality report | "test", "run tests", "check quality", "verify code", "
|
|
75
|
+
| `/prizmkit-test` | Generate + run tests, analyze coverage gaps, unified quality report | "test", "run tests", "check quality", "verify code", "add tests" |
|
|
76
76
|
| `/prizmkit-deploy` | Universal deployment gateway: SSH automation, cloud/Docker guided setup, status/logs/rollback | "deploy", "ship it", "go live", "rollback", "deploy status" |
|
|
77
77
|
| `/prizmkit-init` | Project bootstrap + .prizmkit/prizm-docs/ setup | "init", "initialize", "take over this project" |
|
|
78
78
|
| `/prizmkit-prizm-docs` | Doc management (init/status/rebuild/validate) | "check docs", "rebuild docs", "validate docs" |
|
|
@@ -204,14 +204,14 @@ The following sections define the SSH deployment adapter — the only fully-auto
|
|
|
204
204
|
After Discovery routes to SSH, **before** entering the configuration wizard, ask the user how they want to deploy.
|
|
205
205
|
|
|
206
206
|
**First question:**
|
|
207
|
-
> "
|
|
208
|
-
> - **A.
|
|
209
|
-
> - **B. CI/CD
|
|
207
|
+
> "How do you want to deploy to the server?"
|
|
208
|
+
> - **A. Direct Upload (quick start)** — build locally, transfer to server and start. Good for first deployment.
|
|
209
|
+
> - **B. CI/CD Auto-Deploy (recommended)** — configure GitHub Actions, then `git push` auto-deploys.
|
|
210
210
|
|
|
211
211
|
**If user chooses CI/CD, second question:**
|
|
212
|
-
> "CI/CD
|
|
213
|
-
> - **Push
|
|
214
|
-
> - **Pull
|
|
212
|
+
> "CI/CD has two modes:"
|
|
213
|
+
> - **Push mode** — GitHub Actions runner builds, SCP transfers to server. Low server load.
|
|
214
|
+
> - **Pull mode** — server pulls code and builds itself. Simpler config but requires a Deploy Key.
|
|
215
215
|
|
|
216
216
|
For detailed mode descriptions and the full Push/Pull comparison table, read `references/deployment-modes.md`.
|
|
217
217
|
|
|
@@ -306,7 +306,7 @@ After generating the workflow, verify: the first `git push` to the configured br
|
|
|
306
306
|
|
|
307
307
|
Before SSL, check if the user has a domain pointing to the server.
|
|
308
308
|
|
|
309
|
-
1. Ask: "
|
|
309
|
+
1. Ask: "Do you have a domain to bind to this project?" If no domain → skip DNS + SSL, note in deploy.md.
|
|
310
310
|
2. Check DNS: `dig +short <domain> A`. If resolved → proceed to SSL.
|
|
311
311
|
3. If not resolved: show the user DNS setup instructions. Full procedure in `references/dns-setup.md`.
|
|
312
312
|
|
|
@@ -360,7 +360,7 @@ If no previous release exists, rollback is not possible — state this clearly.
|
|
|
360
360
|
|
|
361
361
|
After a successful direct-upload deployment, proactively offer CI/CD setup:
|
|
362
362
|
|
|
363
|
-
> "
|
|
363
|
+
> "Deployment succeeded. Want me to set up CI/CD auto-deploy? After that, `git push` will auto-deploy."
|
|
364
364
|
|
|
365
365
|
If user agrees, ask push vs pull, then configure accordingly. If Pull mode: set up deploy key. If Push mode: add GitHub Actions secrets. Generate `deploy.yml` from `references/ci-cd-workflows.md`, update `deployStrategy` in config, write upgrade event to history.
|
|
366
366
|
|
|
@@ -6,9 +6,9 @@ Read this file when Discovery detected a database driver and the user wants AI-a
|
|
|
6
6
|
|
|
7
7
|
During Discovery Step 1 (Project Detection), database drivers were already scanned. If a driver was detected, ask after bootstrap tools are installed:
|
|
8
8
|
|
|
9
|
-
> "
|
|
10
|
-
> -
|
|
11
|
-
> -
|
|
9
|
+
> "Detected the project uses <PostgreSQL/MySQL/Redis>. Want me to install and configure it on the server?"
|
|
10
|
+
> - **Yes** → proceed with database installation
|
|
11
|
+
> - **No** → skip, record in deploy.md with note "database must be configured by user"
|
|
12
12
|
|
|
13
13
|
## PostgreSQL setup
|
|
14
14
|
|
|
@@ -21,7 +21,7 @@ sudo -u postgres psql -c "GRANT ALL ON DATABASE <project> TO <project>;"
|
|
|
21
21
|
|
|
22
22
|
- Generate a secure random password (32 chars, alphanumeric + symbols).
|
|
23
23
|
- Write the connection string to `.prizmkit/deploy/secrets.local.json`: `DATABASE_URL=postgresql://<project>:<password>@localhost:5432/<project>`.
|
|
24
|
-
- In deploy.md, write: "PostgreSQL
|
|
24
|
+
- In deploy.md, write: "PostgreSQL installed, connection info recorded in `.prizmkit/deploy/secrets.local.json` (not committed to git)".
|
|
25
25
|
|
|
26
26
|
## MySQL setup (future)
|
|
27
27
|
|
|
@@ -34,14 +34,14 @@ Best for: simple setup, servers with sufficient CPU/RAM, projects where build is
|
|
|
34
34
|
|
|
35
35
|
## Comparison
|
|
36
36
|
|
|
37
|
-
|
|
|
37
|
+
| Aspect | Push mode | Pull mode |
|
|
38
38
|
|------|----------|----------|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
| Deploy Key
|
|
44
|
-
|
|
|
39
|
+
| Build location | GitHub Actions runner | Server (local) |
|
|
40
|
+
| Server load | Low (runs app only) | High (build + run) |
|
|
41
|
+
| Config complexity | Medium (needs SCP transfer) | Low (SSH-triggered script only) |
|
|
42
|
+
| Best for | Low-spec servers, heavy builds | Simple setup, capable servers |
|
|
43
|
+
| Deploy Key required | No | Yes |
|
|
44
|
+
| Artifact transfer | SCP tarball | git pull (incremental) |
|
|
45
45
|
|
|
46
46
|
## Common ground between all modes
|
|
47
47
|
|
|
@@ -14,21 +14,21 @@ If not: continue below.
|
|
|
14
14
|
## Step 2 — DNS setup guidance
|
|
15
15
|
|
|
16
16
|
```
|
|
17
|
-
|
|
17
|
+
Domain <example.com> is not yet pointing to server <server-IP>.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Add the following record at your DNS provider (e.g., Alibaba Cloud, Cloudflare, Namecheap):
|
|
20
20
|
|
|
21
21
|
Type: A
|
|
22
22
|
Name: @
|
|
23
|
-
Value:
|
|
23
|
+
Value: <server-IP>
|
|
24
24
|
TTL: 600
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
To also support the www subdomain:
|
|
27
27
|
Type: A
|
|
28
28
|
Name: www
|
|
29
|
-
Value:
|
|
29
|
+
Value: <server-IP>
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Reply "done" when configured, and I'll verify and set up the SSL certificate.
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## Step 3 — Verify after user confirmation
|
|
@@ -39,4 +39,4 @@ If not: continue below.
|
|
|
39
39
|
|
|
40
40
|
## Edge case — IP-only deployment
|
|
41
41
|
|
|
42
|
-
If user has no domain: skip DNS + SSL sections. Generate a note in deploy.md: "
|
|
42
|
+
If user has no domain: skip DNS + SSL sections. Generate a note in deploy.md: "Project accessed via IP, no domain or HTTPS configured. Recommend purchasing a domain and running `/prizmkit-deploy setup-ssl`."
|
|
@@ -5,17 +5,17 @@ Read this file when the user wants AI-assisted firewall configuration during boo
|
|
|
5
5
|
## Flow
|
|
6
6
|
|
|
7
7
|
1. After core tools are installed, ask the user:
|
|
8
|
-
> "
|
|
8
|
+
> "Want me to configure the firewall (ufw)? Only necessary ports will be opened, improving server security."
|
|
9
9
|
|
|
10
10
|
2. If user declines: skip, record to deploy config.
|
|
11
11
|
|
|
12
12
|
3. If user agrees, ask which additional ports to open (beyond SSH/HTTP/HTTPS):
|
|
13
|
-
> "
|
|
13
|
+
> "By default only SSH(22), HTTP(80), HTTPS(443) are opened. Should the blue/green preview ports (3101/3102) also be opened? If you need other ports (e.g., for remote database management), list them together."
|
|
14
14
|
|
|
15
15
|
4. Collect ports, then ask:
|
|
16
|
-
> "
|
|
17
|
-
> - **A.
|
|
18
|
-
> - **B.
|
|
16
|
+
> "Firewall rules are ready. Should I apply them directly, or will you do it yourself?"
|
|
17
|
+
> - **A. You apply them** — AI runs ufw commands
|
|
18
|
+
> - **B. I'll do it myself** — output rule list, user executes manually
|
|
19
19
|
|
|
20
20
|
## Planned rules (output before executing)
|
|
21
21
|
|
|
@@ -4,7 +4,7 @@ Pipeline runs in strict order. Each group must complete before the next begins.
|
|
|
4
4
|
|
|
5
5
|
## Pre-flight — Change Summary
|
|
6
6
|
|
|
7
|
-
Show what will be deployed using `git log --oneline <last-deployed-commit>..HEAD`. If first deployment, show last 5 commits. If no new commits, warn "
|
|
7
|
+
Show what will be deployed using `git log --oneline <last-deployed-commit>..HEAD`. If first deployment, show last 5 commits. If no new commits, warn "No new code changes. Are you sure you want to redeploy?"
|
|
8
8
|
|
|
9
9
|
## Group 1 — Pre-flight & Prepare
|
|
10
10
|
|
|
@@ -15,11 +15,11 @@ Also check `/etc/hostname` for vendor patterns.
|
|
|
15
15
|
## Step 2 — Choose SSL strategy
|
|
16
16
|
|
|
17
17
|
- **Cloud vendor detected** → ask user:
|
|
18
|
-
> "
|
|
19
|
-
> - **A. Let's Encrypt
|
|
20
|
-
> - **B.
|
|
18
|
+
> "Detected the server is running on <cloud-vendor>. Which SSL approach?"
|
|
19
|
+
> - **A. Let's Encrypt free certificate (recommended)** — one command for permanent auto-renewal, hassle-free
|
|
20
|
+
> - **B. <cloud-vendor> native certificate** — manual download/config, 1-year validity requires manual renewal
|
|
21
21
|
>
|
|
22
|
-
>
|
|
22
|
+
> Choose A and I'll set it up for you; choose B and you'll need to download the certificate from the cloud console and tell me the path.
|
|
23
23
|
- **No cloud vendor / unknown** → use certbot directly, no choice needed.
|
|
24
24
|
|
|
25
25
|
## Step 3 — Certbot install & certificate request
|
|
@@ -544,7 +544,7 @@ JSON:
|
|
|
544
544
|
"hooks": {
|
|
545
545
|
"UserPromptSubmit": [
|
|
546
546
|
{
|
|
547
|
-
"matcher": "(?i)\\b(commit|push|finish|ship|merge|pull request|pr)\\b
|
|
547
|
+
"matcher": "(?i)\\b(commit|push|finish|ship|merge|pull request|pr)\\b",
|
|
548
548
|
"hooks": [
|
|
549
549
|
{
|
|
550
550
|
"type": "command",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "prizmkit-test"
|
|
3
|
-
description: "Full-stack test generation and orchestration. Detects architecture, discovers/runs existing tests, analyzes coverage gaps, generates missing unit/integration/E2E tests including business-specific boundary cases, validates every interface with a required boundary coverage matrix, and outputs a unified report. Use after completing development to verify quality before deploy. Trigger on: 'test', 'run tests', 'check quality', 'verify code', 'generate tests', 'test coverage', 'fill test gaps', 'boundary tests', 'edge cases', 'quality check', '
|
|
3
|
+
description: "Full-stack test generation and orchestration. Detects architecture, discovers/runs existing tests, analyzes coverage gaps, generates missing unit/integration/E2E tests including business-specific boundary cases, validates every interface with a required boundary coverage matrix, and outputs a unified report. Use after completing development to verify quality before deploy. Trigger on: 'test', 'run tests', 'check quality', 'verify code', 'generate tests', 'test coverage', 'fill test gaps', 'boundary tests', 'edge cases', 'quality check', 'add tests'. (project)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PrizmKit Test
|
|
@@ -11,7 +11,7 @@ A comprehensive test generation and orchestration skill. Discovers existing test
|
|
|
11
11
|
- After completing one or more features/refactors/bugfixes
|
|
12
12
|
- As a quality gate before deploy
|
|
13
13
|
- Project has a test framework installed but zero tests written (first-time test generation)
|
|
14
|
-
- User says "test", "run tests", "verify", "check quality", "
|
|
14
|
+
- User says "test", "run tests", "verify", "check quality", "add tests"
|
|
15
15
|
|
|
16
16
|
### When NOT to Use
|
|
17
17
|
- Project has no test framework AND no code to test
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
{
|
|
6
6
|
"id": 1,
|
|
7
7
|
"name": "bugfix-mid-fix",
|
|
8
|
-
"prompt": "session
|
|
8
|
+
"prompt": "My session broke, help me recover",
|
|
9
9
|
"expected_output": "Should auto-detect bug-fix-workflow from fix/B-001-* branch. Should detect fix-plan.md + code changes → infer Phase 5 (Review). Should display recovery report with workflow type, phase, artifacts, code stats. After user confirms, should invoke /prizmkit-code-review on existing changes.",
|
|
10
10
|
"setup_description": "Create fix/B-001-login-crash branch, .prizmkit/bugfix/B-001/fix-plan.md, modify 3 source files + 1 test file. No fix-report.md, no commits ahead of main.",
|
|
11
11
|
"files": []
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"id": 2,
|
|
15
15
|
"name": "bugfix-plan-only",
|
|
16
|
-
"prompt": "
|
|
16
|
+
"prompt": "Continue the previous work",
|
|
17
17
|
"expected_output": "Should auto-detect bug-fix-workflow from fix/B-002-* branch. Should detect fix-plan.md but no code changes → infer Phase 4 (Fix). Should read fix-plan.md and start implementing the fix.",
|
|
18
18
|
"setup_description": "Create fix/B-002-null-pointer branch, .prizmkit/bugfix/B-002/fix-plan.md with diagnosis and fix approach. No code changes.",
|
|
19
19
|
"files": []
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
{
|
|
38
38
|
"id": 5,
|
|
39
39
|
"name": "no-workflow-detected",
|
|
40
|
-
"prompt": "
|
|
40
|
+
"prompt": "recover",
|
|
41
41
|
"expected_output": "Should detect no workflow signatures in workspace. Should display guidance message suggesting /feature-workflow, /bug-fix-workflow, or /refactor-workflow. Should NOT attempt any recovery actions.",
|
|
42
42
|
"setup_description": "Clean workspace on main branch. No .prizmkit/plans/feature-list.json, no bug-fix artifacts, no .prizmkit/plans/refactor-list.json, no fix/* or feat/* or refactor/* branches.",
|
|
43
43
|
"files": []
|
package/package.json
CHANGED
|
File without changes
|