prizmkit 1.1.94 → 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/agents/prizm-dev-team-critic.md +57 -29
- package/bundled/agents/prizm-dev-team-dev.md +2 -14
- package/bundled/agents/prizm-dev-team-reviewer.md +40 -24
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +3 -2
- package/bundled/dev-pipeline/run-bugfix.sh +0 -10
- package/bundled/dev-pipeline/run-feature.sh +0 -10
- package/bundled/dev-pipeline/run-refactor.sh +0 -10
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +53 -7
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +9 -6
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +1 -3
- package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +3 -2
- package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +0 -9
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +5 -6
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +9 -6
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +1 -3
- package/bundled/rules/_rules-metadata.json +9 -3
- package/bundled/rules/general/agent-operational-rules.md +30 -0
- 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/feature-planner/SKILL.md +2 -2
- package/bundled/skills/feature-planner/references/error-recovery.md +1 -1
- package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
- package/bundled/skills/feature-planner/references/new-project-planning.md +1 -1
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +17 -26
- 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/feature-planner/SKILL.md +2 -2
- package/bundled/skills-windows/feature-planner/references/error-recovery.md +1 -1
- package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +1 -1
- package/bundled/skills-windows/feature-planner/references/new-project-planning.md +1 -1
- package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +17 -26
- 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/bundled/team/prizm-dev-team.json +6 -6
- package/package.json +1 -1
- /package/bundled/skills/app-planner/{assets → references}/app-design-guide.md +0 -0
|
@@ -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
|
|
|
@@ -285,7 +285,7 @@ For simple incremental planning, skip detailed Phase 2-3 analysis:
|
|
|
285
285
|
4. Draft features (title + description + acceptance_criteria + dependencies)
|
|
286
286
|
5. Write draft to `.prizmkit/plans/feature-list.draft.json`, then call the generate script:
|
|
287
287
|
```powershell
|
|
288
|
-
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
288
|
+
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
289
289
|
```
|
|
290
290
|
6. If valid → summarize and recommend next step
|
|
291
291
|
7. If invalid → apply fixes to the draft, re-run generate (max 2 attempts, then escalate to full workflow)
|
|
@@ -336,7 +336,7 @@ Key requirements:
|
|
|
336
336
|
1. Write a draft JSON to a temporary path (e.g., `.prizmkit/plans/feature-list.draft.json`)
|
|
337
337
|
2. Call the generate script to validate and produce the final file:
|
|
338
338
|
```powershell
|
|
339
|
-
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
339
|
+
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
340
340
|
```
|
|
341
341
|
The script fills in defaults (`$schema`, `created_at`, `created_by`), validates all fields, and writes the final file only if validation passes. If validation fails, fix the draft and retry.
|
|
342
342
|
|
|
@@ -4,7 +4,7 @@ Structured error handling for validation failures, interrupted sessions, and che
|
|
|
4
4
|
|
|
5
5
|
## Validation Failures
|
|
6
6
|
|
|
7
|
-
When `Invoke-PrizmPython scripts/validate-and-generate.py validate --input <file
|
|
7
|
+
When `Invoke-PrizmPython scripts/validate-and-generate.py validate --input <file>` returns errors:
|
|
8
8
|
|
|
9
9
|
### Parse validation output
|
|
10
10
|
Script returns JSON with `"valid": false`, `"errors": [...]`, `"warnings": [...]`
|
|
@@ -83,7 +83,7 @@ Keep dependency correctness as first constraint.
|
|
|
83
83
|
### Step 5: Validate
|
|
84
84
|
Run after defining `Invoke-PrizmPython` from the main `SKILL.md`:
|
|
85
85
|
```powershell
|
|
86
|
-
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
86
|
+
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
Fix and re-run until pass.
|
|
@@ -55,7 +55,7 @@ Split into `sub_features` when:
|
|
|
55
55
|
1. Write `feature-list.json`.
|
|
56
56
|
2. Run the command below after defining `Invoke-PrizmPython` from the main `SKILL.md`:
|
|
57
57
|
```powershell
|
|
58
|
-
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
58
|
+
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
59
59
|
```
|
|
60
60
|
3. Fix all errors, then re-run.
|
|
61
61
|
|
|
@@ -11,12 +11,16 @@ Commands:
|
|
|
11
11
|
grade Generate grading results from eval runs (for npm run skill:review)
|
|
12
12
|
|
|
13
13
|
Usage:
|
|
14
|
-
python3 validate-and-generate.py validate --input .prizmkit/plans/feature-list.json [--output validated.json]
|
|
14
|
+
python3 validate-and-generate.py validate --input .prizmkit/plans/feature-list.json [--output validated.json]
|
|
15
15
|
python3 validate-and-generate.py template --output .prizmkit/plans/feature-list.json
|
|
16
|
-
python3 validate-and-generate.py generate --input draft.json --output .prizmkit/plans/feature-list.json
|
|
16
|
+
python3 validate-and-generate.py generate --input draft.json --output .prizmkit/plans/feature-list.json
|
|
17
17
|
python3 validate-and-generate.py summary --input .prizmkit/plans/feature-list.json [--format markdown|json]
|
|
18
18
|
python3 validate-and-generate.py grade --workspace /.codebuddy/skill-evals/feature-planner-workspace --iteration iteration-1
|
|
19
19
|
|
|
20
|
+
Mode is determined automatically by --output path:
|
|
21
|
+
- Output file does NOT exist -> new plan (all features must be "pending")
|
|
22
|
+
- Output file already exists -> incremental append (existing features keep their status)
|
|
23
|
+
|
|
20
24
|
Python 3.6+ required. No external dependencies.
|
|
21
25
|
"""
|
|
22
26
|
|
|
@@ -38,8 +42,6 @@ VALID_STATUSES = {"pending", "in_progress", "completed", "failed", "skipped", "s
|
|
|
38
42
|
VALID_COMPLEXITIES = {"low", "medium", "high", "critical"}
|
|
39
43
|
VALID_PRIORITIES = {"critical", "high", "medium", "low"}
|
|
40
44
|
VALID_GRANULARITIES = {"feature", "sub_feature", "auto"}
|
|
41
|
-
VALID_PLANNING_MODES = {"new", "incremental"}
|
|
42
|
-
|
|
43
45
|
FEATURE_ID_RE = re.compile(r"^F-\d{3}(-[A-Z])?$")
|
|
44
46
|
SUB_FEATURE_ID_RE = re.compile(r"^F-\d{3}-[A-Z]$")
|
|
45
47
|
|
|
@@ -156,13 +158,11 @@ def _detect_cycles(features):
|
|
|
156
158
|
# ---------------------------------------------------------------------------
|
|
157
159
|
|
|
158
160
|
|
|
159
|
-
def validate_feature_list(data,
|
|
161
|
+
def validate_feature_list(data, is_new_plan=True):
|
|
160
162
|
"""Validate a parsed feature-list data structure.
|
|
161
163
|
|
|
162
164
|
Returns a dict with keys ``valid``, ``errors``, ``warnings``, ``stats``.
|
|
163
165
|
"""
|
|
164
|
-
if planning_mode not in VALID_PLANNING_MODES:
|
|
165
|
-
planning_mode = "new"
|
|
166
166
|
|
|
167
167
|
errors = []
|
|
168
168
|
warnings = []
|
|
@@ -299,7 +299,7 @@ def validate_feature_list(data, planning_mode="new"):
|
|
|
299
299
|
label, status, ", ".join(sorted(VALID_STATUSES))
|
|
300
300
|
)
|
|
301
301
|
)
|
|
302
|
-
if
|
|
302
|
+
if is_new_plan and status and status != "pending":
|
|
303
303
|
warnings.append(
|
|
304
304
|
"{}: status is '{}' (expected 'pending' for new plans)".format(label, status)
|
|
305
305
|
)
|
|
@@ -680,7 +680,9 @@ def cmd_validate(args):
|
|
|
680
680
|
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
681
681
|
return 2
|
|
682
682
|
|
|
683
|
-
|
|
683
|
+
# Validate input file exists -> incremental mode (existing features keep their status)
|
|
684
|
+
is_new_plan = False
|
|
685
|
+
result = validate_feature_list(data, is_new_plan=is_new_plan)
|
|
684
686
|
|
|
685
687
|
# Print results to stdout
|
|
686
688
|
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
@@ -758,9 +760,11 @@ def cmd_generate(args):
|
|
|
758
760
|
for feature in data.get("features", []):
|
|
759
761
|
feature.setdefault("status", "pending")
|
|
760
762
|
|
|
761
|
-
# Validate
|
|
762
|
-
|
|
763
|
-
|
|
763
|
+
# Validate. Mode is determined by whether --output file already exists:
|
|
764
|
+
# - does NOT exist -> new plan (all features must be "pending")
|
|
765
|
+
# - already exists -> incremental append (existing features keep their status)
|
|
766
|
+
is_new_plan = not os.path.exists(args.output)
|
|
767
|
+
result = validate_feature_list(data, is_new_plan=is_new_plan)
|
|
764
768
|
|
|
765
769
|
# Output validation result
|
|
766
770
|
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
@@ -856,7 +860,7 @@ def cmd_grade(args):
|
|
|
856
860
|
continue
|
|
857
861
|
|
|
858
862
|
# Run validation
|
|
859
|
-
result = validate_feature_list(data,
|
|
863
|
+
result = validate_feature_list(data, is_new_plan=True)
|
|
860
864
|
|
|
861
865
|
# Create grading entry
|
|
862
866
|
grade_entry = {
|
|
@@ -916,7 +920,6 @@ def main():
|
|
|
916
920
|
epilog=(
|
|
917
921
|
"Examples:\n"
|
|
918
922
|
" %(prog)s validate --input .prizmkit/plans/feature-list.json\n"
|
|
919
|
-
" %(prog)s validate --input .prizmkit/plans/feature-list.json --mode incremental\n"
|
|
920
923
|
" %(prog)s validate --input .prizmkit/plans/feature-list.json --output validated.json\n"
|
|
921
924
|
" %(prog)s template --output .prizmkit/plans/feature-list.json\n"
|
|
922
925
|
" %(prog)s generate --input draft.json --output .prizmkit/plans/feature-list.json\n"
|
|
@@ -938,12 +941,6 @@ def main():
|
|
|
938
941
|
p_validate.add_argument(
|
|
939
942
|
"--output", help="Path to write validated output (optional)"
|
|
940
943
|
)
|
|
941
|
-
p_validate.add_argument(
|
|
942
|
-
"--mode",
|
|
943
|
-
choices=["new", "incremental"],
|
|
944
|
-
default="new",
|
|
945
|
-
help="Validation mode (default: new)",
|
|
946
|
-
)
|
|
947
944
|
|
|
948
945
|
# -- template --
|
|
949
946
|
p_template = subparsers.add_parser(
|
|
@@ -965,12 +962,6 @@ def main():
|
|
|
965
962
|
p_generate.add_argument(
|
|
966
963
|
"--output", required=True, help="Path to write final feature-list.json"
|
|
967
964
|
)
|
|
968
|
-
p_generate.add_argument(
|
|
969
|
-
"--mode",
|
|
970
|
-
choices=["new", "incremental"],
|
|
971
|
-
default="new",
|
|
972
|
-
help="Validation mode (default: new)",
|
|
973
|
-
)
|
|
974
965
|
|
|
975
966
|
# -- summary --
|
|
976
967
|
p_summary = subparsers.add_parser(
|
|
@@ -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": []
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prizm-dev-team",
|
|
3
3
|
"team_name": "prizm-dev-team",
|
|
4
|
-
"description": "PrizmKit-integrated Multi-Agent software development team. 3 specialized agents (Dev, Reviewer, Critic) following PrizmKit spec-driven workflow with
|
|
4
|
+
"description": "PrizmKit-integrated Multi-Agent software development team. 3 specialized agents (Dev, Reviewer, Critic) following PrizmKit spec-driven workflow. Critic supports parallel 3-critic voting with distinct focus lenses.",
|
|
5
5
|
"lead": "orchestrator",
|
|
6
6
|
"communication": {
|
|
7
7
|
"protocol": "SendMessage",
|
|
8
8
|
"routing": "mesh",
|
|
9
|
-
"note": "Teammates communicate directly via SendMessage; key messages must also be sent to Orchestrator (the main
|
|
9
|
+
"note": "Teammates communicate directly via SendMessage; key messages must also be sent to Orchestrator (the main AI session). Critic agents operate independently in parallel — they do NOT read each other's reports."
|
|
10
10
|
},
|
|
11
11
|
"members": [
|
|
12
12
|
{
|
|
13
13
|
"name": "dev",
|
|
14
|
-
"role": "developer",
|
|
14
|
+
"role": "developer",
|
|
15
15
|
"agentDefinition": "prizm-dev-team-dev",
|
|
16
|
-
"prompt": "You are a Dev Agent of the prizm-dev-team. Follow /prizmkit-implement workflow with TDD. Read plan.md/spec.md, implement task-by-task, mark completed tasks [x].
|
|
16
|
+
"prompt": "You are a Dev Agent of the prizm-dev-team. Your complete behavior rules are in your agent definition. Follow /prizmkit-implement workflow with TDD. Read plan.md/spec.md, implement task-by-task, mark completed tasks [x].",
|
|
17
17
|
"subscriptions": ["*"]
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"name": "reviewer",
|
|
21
21
|
"role": "reviewer",
|
|
22
22
|
"agentDefinition": "prizm-dev-team-reviewer",
|
|
23
|
-
"prompt": "You are the Reviewer Agent of the prizm-dev-team. Run /prizmkit-code-review for diagnosis + fix strategy formulation
|
|
23
|
+
"prompt": "You are the Reviewer Agent of the prizm-dev-team. Your complete behavior rules are in your agent definition. Run /prizmkit-code-review for diagnosis + fix strategy formulation. You do NOT run tests — the Orchestrator handles testing.",
|
|
24
24
|
"subscriptions": ["*"]
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"name": "critic",
|
|
28
28
|
"role": "critic",
|
|
29
29
|
"agentDefinition": "prizm-dev-team-critic",
|
|
30
|
-
"prompt": "You are the Critic Agent of the prizm-dev-team. Challenge plans and implementations for project fitness, style consistency, robustness, and integration quality. Do NOT verify correctness — that is the Reviewer's job.
|
|
30
|
+
"prompt": "You are the Critic Agent of the prizm-dev-team. Your complete behavior rules are in your agent definition. Challenge plans and implementations for project fitness, style consistency, robustness, and integration quality. Supports parallel 3-critic voting mode. Do NOT verify correctness — that is the Reviewer's job.",
|
|
31
31
|
"subscriptions": ["*"]
|
|
32
32
|
}
|
|
33
33
|
]
|
package/package.json
CHANGED
|
File without changes
|