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
|
@@ -220,7 +220,7 @@ Wait for Reviewer to return.
|
|
|
220
220
|
**CP-2**: No CRITICAL issues.
|
|
221
221
|
|
|
222
222
|
{{IF_CRITIC_ENABLED}}
|
|
223
|
-
### Phase 3.5: Plan Challenge — Critic Agent
|
|
223
|
+
### Phase 3.5: Plan Challenge — Critic Agent(s)
|
|
224
224
|
|
|
225
225
|
**Guard**: Verify critic agent file exists before spawning:
|
|
226
226
|
```powershell
|
|
@@ -290,7 +290,7 @@ Gate requirements:
|
|
|
290
290
|
- Only after a valid `PASS`, write the report path to `.prizmkit/specs/{{FEATURE_SLUG}}/test-report-path.txt` and append a 3-5 bullet `## PrizmKit Test Gate` summary to `context-snapshot.md`.
|
|
291
291
|
- If the report verdict is `NEEDS_FIXES`, fix in-scope implementation/test issues and rerun `/prizmkit-test`. If the report is `BLOCKED`, missing, stale, or for the wrong scope/artifact dir, write `failure-log.md` and stop for recovery.
|
|
292
292
|
|
|
293
|
-
### Phase 5: Review
|
|
293
|
+
### Phase 5: Review — Reviewer Subagent
|
|
294
294
|
|
|
295
295
|
Spawn Reviewer subagent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false).
|
|
296
296
|
|
|
@@ -302,8 +302,7 @@ Prompt:
|
|
|
302
302
|
> 2. Read `.prizmkit/specs/{{FEATURE_SLUG}}/plan.md` for architecture decisions and completed tasks
|
|
303
303
|
> 3. Read `.prizmkit/specs/{{FEATURE_SLUG}}/test-report-path.txt`, then read the referenced `/prizmkit-test` report. Review generated/updated tests, `In-Scope Failures`, `Baseline Failures`, `Out of Scope Gaps`, boundary coverage if present, and the report verdict.
|
|
304
304
|
> 4. Run /prizmkit-code-review with artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/. The skill runs an internal review-fix loop (Reviewer → filter → Dev fix, max 3 rounds) and writes review-report.md.
|
|
305
|
-
> 5.
|
|
306
|
-
> 6. review-report.md will be written to .prizmkit/specs/{{FEATURE_SLUG}}/ by prizmkit-code-review.
|
|
305
|
+
> 5. Do NOT run test suites — the Orchestrator already ran prizmkit-test. Focus on code review and fix strategy.
|
|
307
306
|
> Report: verdict (PASS/NEEDS_FIXES), number of rounds, findings fixed/rejected."
|
|
308
307
|
|
|
309
308
|
Wait for Reviewer to return.
|
|
@@ -323,7 +322,7 @@ Read `review-report.md` and check the Verdict:
|
|
|
323
322
|
- `PASS` → proceed to next phase
|
|
324
323
|
- `NEEDS_FIXES` → the skill exhausted its max rounds; log the remaining findings and proceed
|
|
325
324
|
|
|
326
|
-
**CP-3**:
|
|
325
|
+
**CP-3**: Review complete.
|
|
327
326
|
|
|
328
327
|
{{IF_BROWSER_INTERACTION}}
|
|
329
328
|
### Phase 5.5: Browser Verification — MANDATORY
|
|
@@ -696,7 +695,7 @@ Remove-Item -Force -ErrorAction SilentlyContinue .prizmkit/specs/{{FEATURE_SLUG}
|
|
|
696
695
|
|
|
697
696
|
## Reminders
|
|
698
697
|
|
|
699
|
-
- Tier 2: orchestrator builds context+plan, Analyzer checks consistency, Dev implements, Reviewer reviews
|
|
698
|
+
- Tier 2: orchestrator builds context+plan, Analyzer checks consistency, Dev implements, Reviewer reviews — use direct Agent spawn for agents
|
|
700
699
|
- Build context-snapshot.md FIRST; all subagents read it instead of re-reading source files
|
|
701
700
|
- context-snapshot.md is append-only: orchestrator writes Sections 1-4, Dev appends Implementation Log, Reviewer appends Review Notes
|
|
702
701
|
- Gate checks enforce Implementation Log and Review Notes are written before proceeding
|
|
@@ -266,7 +266,9 @@ Prompt:
|
|
|
266
266
|
|
|
267
267
|
**If {{CRITIC_COUNT}} = 3 → Multi-Critic Voting** (skip Single Critic above):
|
|
268
268
|
|
|
269
|
-
Spawn 3
|
|
269
|
+
**IMPORTANT**: Spawn all 3 Critics in PARALLEL (issue all 3 Agent tool calls in the SAME message turn). Do NOT wait for one before spawning the next.
|
|
270
|
+
|
|
271
|
+
Spawn Critic-A, Critic-B, Critic-C simultaneously (each with mode="plan", run_in_background=false):
|
|
270
272
|
|
|
271
273
|
Critic-A prompt (append to base prompt above):
|
|
272
274
|
> "**Focus Lens: Architecture & Scalability.** Prioritize: architectural pattern fit, scalability implications, over-engineering risks, component boundary design.
|
|
@@ -280,6 +282,8 @@ Critic-C prompt (append to base prompt above):
|
|
|
280
282
|
> "**Focus Lens: Security & Performance.** Prioritize: security attack surface, authentication/authorization gaps, performance bottlenecks, resource leaks.
|
|
281
283
|
> Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report-C.md`."
|
|
282
284
|
|
|
285
|
+
Spawn failure cap: for team/config/lock errors, each Critic retries at most once. If 2 or more Critics fail to spawn after retry, perform the plan challenge inline and record the fallback.
|
|
286
|
+
|
|
283
287
|
After all critics return, read all 3 reports:
|
|
284
288
|
- Challenge raised by **2/3 or more** critics → **must respond** (adjust plan or justify why not)
|
|
285
289
|
- Challenge raised by **1/3 only** → logged in context-snapshot but not blocking
|
|
@@ -351,7 +355,7 @@ Gate requirements:
|
|
|
351
355
|
- Only after a valid `PASS`, write the report path to `.prizmkit/specs/{{FEATURE_SLUG}}/test-report-path.txt` and append a 3-5 bullet `## PrizmKit Test Gate` summary to `context-snapshot.md`.
|
|
352
356
|
- If the report verdict is `NEEDS_FIXES`, fix in-scope implementation/test issues and rerun `/prizmkit-test`. If the report is `BLOCKED`, missing, stale, or for the wrong scope/artifact dir, write `failure-log.md` and stop for recovery.
|
|
353
357
|
|
|
354
|
-
### Phase 5: Review
|
|
358
|
+
### Phase 5: Review — Reviewer Agent
|
|
355
359
|
|
|
356
360
|
Spawn Reviewer agent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false).
|
|
357
361
|
|
|
@@ -363,8 +367,7 @@ Prompt:
|
|
|
363
367
|
> 2. Read `.prizmkit/specs/{{FEATURE_SLUG}}/plan.md` for architecture decisions and completed tasks
|
|
364
368
|
> 3. Read `.prizmkit/specs/{{FEATURE_SLUG}}/test-report-path.txt`, then read the referenced `/prizmkit-test` report. Review generated/updated tests, `In-Scope Failures`, `Baseline Failures`, `Out of Scope Gaps`, boundary coverage if present, and the report verdict.
|
|
365
369
|
> 4. Run /prizmkit-code-review with artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/. The skill runs an internal review-fix loop (Reviewer → filter → Dev fix, max 3 rounds) and writes review-report.md.
|
|
366
|
-
> 5.
|
|
367
|
-
> 6. review-report.md will be written to .prizmkit/specs/{{FEATURE_SLUG}}/ by prizmkit-code-review.
|
|
370
|
+
> 5. Do NOT run test suites — the Orchestrator already ran prizmkit-test. Focus on code review and fix strategy.
|
|
368
371
|
> Report: verdict (PASS/NEEDS_FIXES), number of rounds, findings fixed/rejected."
|
|
369
372
|
|
|
370
373
|
Wait for Reviewer to return.
|
|
@@ -384,7 +387,7 @@ Read `review-report.md` and check the Verdict:
|
|
|
384
387
|
- `PASS` → proceed to next phase
|
|
385
388
|
- `NEEDS_FIXES` → the skill exhausted its max rounds; log the remaining findings and proceed
|
|
386
389
|
|
|
387
|
-
**CP-3**:
|
|
390
|
+
**CP-3**: Review complete.
|
|
388
391
|
|
|
389
392
|
{{IF_BROWSER_INTERACTION}}
|
|
390
393
|
### Phase 5.5: Browser Verification — MANDATORY
|
|
@@ -774,7 +777,7 @@ Remove-Item -Force -ErrorAction SilentlyContinue .prizmkit/specs/{{FEATURE_SLUG}
|
|
|
774
777
|
|
|
775
778
|
## Reminders
|
|
776
779
|
|
|
777
|
-
- Tier 3: full team — Dev (implementation) → Reviewer (review
|
|
780
|
+
- Tier 3: full team — Dev (implementation) → Reviewer (review) — spawn agents directly via Agent tool
|
|
778
781
|
- context-snapshot.md is append-only: orchestrator writes Sections 1-4, Dev appends Implementation Log, Reviewer appends Review Notes
|
|
779
782
|
- Gate checks enforce Implementation Log and Review Notes are written before proceeding
|
|
780
783
|
- Do NOT use `run_in_background=true` when spawning agents
|
|
@@ -32,7 +32,7 @@ If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent n
|
|
|
32
32
|
|
|
33
33
|
**If {{CRITIC_COUNT}} = 3 → Multi-Critic Voting** (skip Single Critic above):
|
|
34
34
|
|
|
35
|
-
Spawn 3 Critic agents
|
|
35
|
+
Spawn 3 Critic agents in PARALLEL (issue all 3 Agent tool calls in the SAME message turn). Do NOT wait for one before spawning the next. Each with mode="plan", run_in_background=false:
|
|
36
36
|
|
|
37
37
|
Critic-A prompt (append to base prompt above):
|
|
38
38
|
> "**Focus Lens: Architecture & Scalability.** Prioritize: architectural pattern fit, scalability implications, over-engineering risks, component boundary design.
|
|
@@ -23,9 +23,7 @@ Read `review-report.md` and check the Verdict:
|
|
|
23
23
|
- `PASS` → proceed to next phase
|
|
24
24
|
- `NEEDS_FIXES` → the skill exhausted its max rounds; log the remaining findings and proceed (do not retry externally)
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
**CP-3**: Review complete, report written, and the Test Failure Recovery Protocol's Success Rule is satisfied.
|
|
26
|
+
**CP-3**: Review complete, report written.
|
|
29
27
|
|
|
30
28
|
|
|
31
29
|
**Checkpoint update**: Run the update script to set step `prizmkit-code-review` to `"completed"`:
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
"general/cohesive-modeling": {
|
|
21
21
|
"description": "Group co-occurring variables/fields/concepts into a cohesive unit (struct/class/interface)",
|
|
22
22
|
"tags": ["general", "design"]
|
|
23
|
+
},
|
|
24
|
+
"general/agent-operational-rules": {
|
|
25
|
+
"description": "Framework-level operational rules for all agents — Edit failure recovery, Read offset safety, test output hygiene, incremental validation",
|
|
26
|
+
"tags": ["general", "agent", "operational"]
|
|
23
27
|
}
|
|
24
28
|
},
|
|
25
29
|
"presets": {
|
|
@@ -30,14 +34,16 @@
|
|
|
30
34
|
"prizm/prizm-commit-workflow",
|
|
31
35
|
"prizm/prizm-progressive-loading",
|
|
32
36
|
"general/prefer-linux-commands",
|
|
33
|
-
"general/cohesive-modeling"
|
|
37
|
+
"general/cohesive-modeling",
|
|
38
|
+
"general/agent-operational-rules"
|
|
34
39
|
]
|
|
35
40
|
},
|
|
36
41
|
"minimal": {
|
|
37
|
-
"description": "Minimal: progressive loading + general rules
|
|
42
|
+
"description": "Minimal: progressive loading + general rules + operational rules",
|
|
38
43
|
"rules": [
|
|
39
44
|
"prizm/prizm-progressive-loading",
|
|
40
|
-
"general/prefer-linux-commands"
|
|
45
|
+
"general/prefer-linux-commands",
|
|
46
|
+
"general/agent-operational-rules"
|
|
41
47
|
]
|
|
42
48
|
},
|
|
43
49
|
"none": {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-operational-rules
|
|
3
|
+
description: Framework-level operational rules for AI agents — handling Edit failures, Read offsets, test output hygiene, and escalation. These apply to all agents regardless of role.
|
|
4
|
+
tags: [general, agent, operational]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agent Operational Rules
|
|
8
|
+
|
|
9
|
+
These rules apply to ALL agents in the PrizmKit ecosystem. They cover common operational patterns that prevent wasted context and infinite loops.
|
|
10
|
+
|
|
11
|
+
## Edit Failure Recovery
|
|
12
|
+
|
|
13
|
+
When an Edit call fails with 'String to replace not found':
|
|
14
|
+
1. STOP editing immediately — do NOT retry the same Edit.
|
|
15
|
+
2. Run `grep -n` to locate the exact line of the target text.
|
|
16
|
+
3. Read with offset = max(grep_line - 20, 0), limit = 50.
|
|
17
|
+
4. Copy the exact text from the Read result into the Edit old_string.
|
|
18
|
+
5. Never guess or extrapolate an offset — grep first, then read, then edit.
|
|
19
|
+
|
|
20
|
+
## Read Offset Safety
|
|
21
|
+
|
|
22
|
+
Before any Read with offset + limit:
|
|
23
|
+
- Compute offset + limit. If the last tool_result for this file shows it has N lines, offset MUST be < N.
|
|
24
|
+
- Never request an offset >= known file length.
|
|
25
|
+
|
|
26
|
+
## Stale Line Counts (Large Files)
|
|
27
|
+
|
|
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
|
+
|
|
30
|
+
|
|
@@ -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
|
|
|
@@ -266,7 +266,7 @@ For simple incremental planning, skip detailed Phase 2-3 analysis:
|
|
|
266
266
|
4. Draft features (title + description + acceptance_criteria + dependencies)
|
|
267
267
|
5. Write draft to `.prizmkit/plans/feature-list.draft.json`, then call the generate script:
|
|
268
268
|
```bash
|
|
269
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
269
|
+
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
270
270
|
```
|
|
271
271
|
6. If valid → summarize and recommend next step
|
|
272
272
|
7. If invalid → apply fixes to the draft, re-run generate (max 2 attempts, then escalate to full workflow)
|
|
@@ -317,7 +317,7 @@ Key requirements:
|
|
|
317
317
|
1. Write a draft JSON to a temporary path (e.g., `.prizmkit/plans/feature-list.draft.json`)
|
|
318
318
|
2. Call the generate script to validate and produce the final file:
|
|
319
319
|
```bash
|
|
320
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
320
|
+
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
321
321
|
```
|
|
322
322
|
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.
|
|
323
323
|
|
|
@@ -4,7 +4,7 @@ Structured error handling for validation failures, interrupted sessions, and che
|
|
|
4
4
|
|
|
5
5
|
## Validation Failures
|
|
6
6
|
|
|
7
|
-
When `python3 scripts/validate-and-generate.py validate --input <file
|
|
7
|
+
When `python3 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:
|
|
85
85
|
```bash
|
|
86
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
86
|
+
python3 ${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:
|
|
57
57
|
```bash
|
|
58
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
58
|
+
python3 ${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`."
|