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.
Files changed (63) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/agents/prizm-dev-team-critic.md +57 -29
  3. package/bundled/agents/prizm-dev-team-dev.md +2 -14
  4. package/bundled/agents/prizm-dev-team-reviewer.md +40 -24
  5. package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +3 -2
  6. package/bundled/dev-pipeline/run-bugfix.sh +0 -10
  7. package/bundled/dev-pipeline/run-feature.sh +0 -10
  8. package/bundled/dev-pipeline/run-refactor.sh +0 -10
  9. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +53 -7
  10. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +9 -6
  11. package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +1 -1
  12. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +1 -3
  13. package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +3 -2
  14. package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +0 -9
  15. package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +5 -6
  16. package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +9 -6
  17. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +1 -1
  18. package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +1 -3
  19. package/bundled/rules/_rules-metadata.json +9 -3
  20. package/bundled/rules/general/agent-operational-rules.md +30 -0
  21. package/bundled/rules/general/cohesive-modeling.md +31 -18
  22. package/bundled/skills/_metadata.json +1 -1
  23. package/bundled/skills/app-planner/SKILL.md +2 -2
  24. package/bundled/skills/app-planner/references/project-state-detection.md +2 -2
  25. package/bundled/skills/bug-planner/SKILL.md +1 -2
  26. package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +3 -3
  27. package/bundled/skills/feature-planner/SKILL.md +2 -2
  28. package/bundled/skills/feature-planner/references/error-recovery.md +1 -1
  29. package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
  30. package/bundled/skills/feature-planner/references/new-project-planning.md +1 -1
  31. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +17 -26
  32. package/bundled/skills/prizm-kit/SKILL.md +1 -1
  33. package/bundled/skills/prizmkit-deploy/SKILL.md +8 -8
  34. package/bundled/skills/prizmkit-deploy/references/database-setup.md +4 -4
  35. package/bundled/skills/prizmkit-deploy/references/deployment-modes.md +7 -7
  36. package/bundled/skills/prizmkit-deploy/references/dns-setup.md +7 -7
  37. package/bundled/skills/prizmkit-deploy/references/firewall-setup.md +5 -5
  38. package/bundled/skills/prizmkit-deploy/references/ssh-execution-flow.md +1 -1
  39. package/bundled/skills/prizmkit-deploy/references/ssl-setup.md +4 -4
  40. package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +1 -1
  41. package/bundled/skills/prizmkit-test/SKILL.md +2 -2
  42. package/bundled/skills/recovery-workflow/evals/evals.json +3 -3
  43. package/bundled/skills-windows/bug-planner/SKILL.md +1 -2
  44. package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +3 -3
  45. package/bundled/skills-windows/feature-planner/SKILL.md +2 -2
  46. package/bundled/skills-windows/feature-planner/references/error-recovery.md +1 -1
  47. package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +1 -1
  48. package/bundled/skills-windows/feature-planner/references/new-project-planning.md +1 -1
  49. package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +17 -26
  50. package/bundled/skills-windows/prizm-kit/SKILL.md +1 -1
  51. package/bundled/skills-windows/prizmkit-deploy/SKILL.md +8 -8
  52. package/bundled/skills-windows/prizmkit-deploy/references/database-setup.md +4 -4
  53. package/bundled/skills-windows/prizmkit-deploy/references/deployment-modes.md +7 -7
  54. package/bundled/skills-windows/prizmkit-deploy/references/dns-setup.md +7 -7
  55. package/bundled/skills-windows/prizmkit-deploy/references/firewall-setup.md +5 -5
  56. package/bundled/skills-windows/prizmkit-deploy/references/ssh-execution-flow.md +1 -1
  57. package/bundled/skills-windows/prizmkit-deploy/references/ssl-setup.md +4 -4
  58. package/bundled/skills-windows/prizmkit-prizm-docs/assets/prizm-docs-format.md +1 -1
  59. package/bundled/skills-windows/prizmkit-test/SKILL.md +2 -2
  60. package/bundled/skills-windows/recovery-workflow/evals/evals.json +3 -3
  61. package/bundled/team/prizm-dev-team.json +6 -6
  62. package/package.json +1 -1
  63. /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 + Test — Reviewer Subagent
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. Run the full test suite using `{{TEST_CMD}}`. When running: `& { {{TEST_CMD}} } 2>&1 | Tee-Object (Join-Path $env:TEMP "review-test-out.txt") | Select-Object -Last 20`, then use Select-String on the file for details — do NOT re-run the suite multiple times.
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**: Tests pass, review complete.
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+tests — use direct Agent spawn for agents
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 Critic agents sequentially (each with mode="plan", run_in_background=false), each with a different focus lens:
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 + Test — Reviewer Agent
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. Run the full test suite using `{{TEST_CMD}}`. When running tests: `& { {{TEST_CMD}} } 2>&1 | Tee-Object (Join-Path $env:TEMP "review-test-out.txt") | Select-Object -Last 20`, then Select-String `(Join-Path $env:TEMP "review-test-out.txt")` for details — do NOT re-run the suite multiple times.
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**: Integration tests pass, review complete.
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 + test) — spawn agents directly via Agent tool
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 sequentially (each with mode="plan", run_in_background=false), each with a different focus lens:
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
- Run the full test suite: `& { {{TEST_CMD}} } 2>&1 | Tee-Object (Join-Path $env:TEMP "review-test-out.txt") | Select-Object -Last 20`
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 only",
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** — 定义 struct
8
- - **Java/Python** — 定义 class
9
- - **TypeScript** — 定义 interface/type
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
- - 基本类型偏执(Primitive Obsession):用散落的 string/number 代替有意义的类型
26
- - 数据泥团(Data Clumps):相同的一组数据在参数列表、返回值、变量声明中反复出现
27
- - 霰弹式修改(Shotgun Surgery):加一个字段需要改 N 个文件的函数签名
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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.94",
2
+ "version": "1.1.96",
3
3
  "skills": {
4
4
  "prizm-kit": {
5
5
  "description": "Full-lifecycle dev toolkit. Covers spec-driven development, Prizm context docs, code quality, debugging, deployment, and knowledge management.",
@@ -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}/assets/app-design-guide.md` for vision templates and tech stack matrix
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}/assets/app-design-guide.md` §2 decision matrix. Use `AskUserQuestion` for each major tech decision (framework, database, styling, etc.)
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 (Recommended)** — invoke `prizmkit-init` to scan your codebase and generate these files, then return to planning
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 (Recommended)** — proceed with planning
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 bilingual prompt:
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. "描述是否准确?是否需要修改?" / "Is the description accurate? Any corrections?"
27
- 2. "是否需要补充更多细节?(复现步骤、环境信息、相关代码位置等)" / "Need to add more details? (reproduction steps, environment, related code locations, etc.)"
28
- 3. "验证条件是否具体到 pipeline 可以自主判断修复成功?" / "Are the acceptance criteria specific enough that the pipeline can autonomously verify the fix?"
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 --mode incremental
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 --mode <new|incremental>
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> --mode <mode>` returns errors:
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 --mode incremental
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 --mode new
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] [--mode new|incremental]
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 [--mode new|incremental]
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, planning_mode="new"):
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 planning_mode == "new" and status and status != "pending":
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
- result = validate_feature_list(data, planning_mode=args.mode)
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
- mode = getattr(args, "mode", "new") or "new"
763
- result = validate_feature_list(data, planning_mode=mode)
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, planning_mode="new")
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 自动部署(推荐)**配置 GitHub Actions,以后 `git push` 自动部署。
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 模式** — GitHub Actions runner 编译,SCP 传到服务器。服务器压力小。
214
- > - **Pull 模式**服务器自己拉代码编译。配置更简单但需 Deploy Key
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: "你有没有域名要绑定到这个项目?" If no domain → skip DNS + SSL, note in deploy.md.
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
- > "部署成功。要不要顺手帮你配置 CI/CD 自动部署?以后 `git push` 就自动上线。"
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
- > "检测到项目使用了 <PostgreSQL/MySQL/Redis>,需要帮你在服务器上安装配置吗?"
10
- > - **需要**继续数据库安装
11
- > - **不需要**跳过,记录到 deploy.md,标注"数据库需用户自行配置"
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 已安装,连接信息已记录到 `.prizmkit/deploy/secrets.local.json`(不提交到 git".
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
- | 对比 | Push 模式 | Pull 模式 |
37
+ | Aspect | Push mode | Pull mode |
38
38
  |------|----------|----------|
39
- | 构建位置 | GitHub Actions runner | 服务器本地 |
40
- | 服务器压力 | 低(只运行应用) | 高(编译+运行) |
41
- | 配置复杂度 | 中(需 SCP 传产物) | 低(只需 SSH 触发脚本) |
42
- | 适合场景 | 服务器配置低、编译重 | 部署简单优先、服务器性能充裕 |
43
- | Deploy Key 需要 | 不需要 | 需要 |
44
- | 产物传输 | SCP tarball | git pull(仅增量) |
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
- 域名 <example.com> 还未指向服务器 <服务器IP>。
17
+ Domain <example.com> is not yet pointing to server <server-IP>.
18
18
 
19
- 请在 DNS 服务商(如阿里云、CloudflareNamecheap)添加以下记录:
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: <服务器IP>
23
+ Value: <server-IP>
24
24
  TTL: 600
25
25
 
26
- 如果要同时支持 www 子域名:
26
+ To also support the www subdomain:
27
27
  Type: A
28
28
  Name: www
29
- Value: <服务器IP>
29
+ Value: <server-IP>
30
30
 
31
- 配置完成后回复"好了",我继续检查并配 SSL 证书。
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: "项目通过 IP 访问,未配置域名和 HTTPS。建议购买域名后运行 `/prizmkit-deploy setup-ssl`。"
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`."