prizmkit 1.1.7 → 1.1.9

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 (132) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/codebuddy/skill-adapter.js +21 -7
  3. package/bundled/agents/prizm-dev-team-reviewer.md +53 -173
  4. package/bundled/dev-pipeline/.env.example +45 -0
  5. package/bundled/dev-pipeline/README.md +64 -64
  6. package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +535 -0
  7. package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
  8. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +64 -18
  9. package/bundled/dev-pipeline/launch-feature-daemon.sh +15 -12
  10. package/bundled/dev-pipeline/launch-refactor-daemon.sh +64 -18
  11. package/bundled/dev-pipeline/lib/branch.sh +6 -1
  12. package/bundled/dev-pipeline/lib/common.sh +71 -0
  13. package/bundled/dev-pipeline/lib/heartbeat.sh +2 -2
  14. package/bundled/dev-pipeline/reset-bug.sh +10 -9
  15. package/bundled/dev-pipeline/reset-feature.sh +9 -8
  16. package/bundled/dev-pipeline/reset-refactor.sh +10 -9
  17. package/bundled/dev-pipeline/retry-bugfix.sh +67 -29
  18. package/bundled/dev-pipeline/retry-feature.sh +54 -18
  19. package/bundled/dev-pipeline/retry-refactor.sh +112 -29
  20. package/bundled/dev-pipeline/run-bugfix.sh +281 -59
  21. package/bundled/dev-pipeline/run-feature.sh +53 -18
  22. package/bundled/dev-pipeline/run-refactor.sh +392 -66
  23. package/bundled/dev-pipeline/scripts/check-session-status.py +24 -1
  24. package/bundled/dev-pipeline/scripts/cleanup-logs.py +2 -2
  25. package/bundled/dev-pipeline/scripts/detect-stuck.py +195 -85
  26. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +57 -33
  27. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +25 -9
  28. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +104 -17
  29. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +34 -9
  30. package/bundled/dev-pipeline/scripts/init-pipeline.py +10 -10
  31. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +19 -8
  32. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -5
  33. package/bundled/dev-pipeline/scripts/patch-completion-notes.py +191 -0
  34. package/bundled/dev-pipeline/scripts/update-bug-status.py +167 -22
  35. package/bundled/dev-pipeline/scripts/update-feature-status.py +104 -62
  36. package/bundled/dev-pipeline/scripts/update-refactor-status.py +351 -21
  37. package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +1 -1
  38. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +7 -11
  39. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +41 -7
  40. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +27 -3
  41. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +43 -19
  42. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +54 -26
  43. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +6 -15
  44. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +36 -25
  45. package/bundled/dev-pipeline/templates/feature-list-schema.json +109 -31
  46. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +270 -0
  47. package/bundled/dev-pipeline/templates/refactor-list-schema.json +11 -3
  48. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +3 -1
  49. package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +1 -0
  50. package/bundled/dev-pipeline/templates/sections/feature-context.md +2 -0
  51. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +29 -2
  52. package/bundled/dev-pipeline/templates/sections/phase-commit.md +22 -0
  53. package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +2 -2
  54. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +8 -6
  55. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +7 -5
  56. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
  57. package/bundled/skills/_metadata.json +5 -22
  58. package/bundled/skills/app-planner/SKILL.md +98 -72
  59. package/bundled/skills/app-planner/assets/app-design-guide.md +1 -1
  60. package/bundled/skills/app-planner/references/architecture-decisions.md +1 -1
  61. package/bundled/skills/app-planner/references/project-brief-guide.md +69 -66
  62. package/bundled/skills/bug-fix-workflow/SKILL.md +52 -9
  63. package/bundled/skills/bug-planner/SKILL.md +139 -197
  64. package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +43 -0
  65. package/bundled/skills/bug-planner/references/critic-and-verification.md +44 -0
  66. package/bundled/skills/bug-planner/references/error-recovery.md +73 -0
  67. package/bundled/skills/bug-planner/references/input-formats.md +53 -0
  68. package/bundled/skills/bug-planner/references/schema-validation.md +25 -0
  69. package/bundled/skills/bug-planner/references/severity-rules.md +16 -0
  70. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +4 -8
  71. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +34 -39
  72. package/bundled/skills/feature-pipeline-launcher/SKILL.md +49 -36
  73. package/bundled/skills/feature-pipeline-launcher/scripts/preflight-check.py +3 -3
  74. package/bundled/skills/feature-planner/SKILL.md +53 -142
  75. package/bundled/skills/feature-planner/assets/evaluation-guide.md +1 -1
  76. package/bundled/skills/feature-planner/assets/planning-guide.md +21 -5
  77. package/bundled/skills/feature-planner/references/browser-interaction.md +2 -4
  78. package/bundled/skills/feature-planner/references/completeness-review.md +57 -0
  79. package/bundled/skills/feature-planner/references/error-recovery.md +16 -35
  80. package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
  81. package/bundled/skills/feature-planner/references/new-project-planning.md +2 -2
  82. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +19 -20
  83. package/bundled/skills/feature-workflow/SKILL.md +24 -25
  84. package/bundled/skills/prizm-kit/SKILL.md +39 -49
  85. package/bundled/skills/prizmkit-code-review/SKILL.md +51 -64
  86. package/bundled/skills/prizmkit-code-review/rules/dimensions.md +85 -0
  87. package/bundled/skills/prizmkit-code-review/rules/fix-strategy.md +11 -11
  88. package/bundled/skills/prizmkit-committer/SKILL.md +3 -31
  89. package/bundled/skills/prizmkit-deploy/SKILL.md +34 -31
  90. package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +1 -1
  91. package/bundled/skills/prizmkit-implement/SKILL.md +35 -68
  92. package/bundled/skills/prizmkit-init/SKILL.md +112 -65
  93. package/bundled/skills/prizmkit-init/assets/project-brief-template.md +82 -0
  94. package/bundled/skills/prizmkit-plan/SKILL.md +120 -79
  95. package/bundled/skills/prizmkit-plan/assets/plan-template.md +28 -18
  96. package/bundled/skills/prizmkit-plan/assets/spec-template.md +28 -11
  97. package/bundled/skills/prizmkit-plan/references/clarify-guide.md +3 -3
  98. package/bundled/skills/prizmkit-plan/references/verification-checklist.md +60 -0
  99. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +10 -81
  100. package/bundled/skills/prizmkit-prizm-docs/assets/{PRIZM-SPEC.md → prizm-docs-format.md} +41 -526
  101. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +46 -0
  102. package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +16 -0
  103. package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +14 -0
  104. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +19 -0
  105. package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +17 -0
  106. package/bundled/skills/prizmkit-retrospective/SKILL.md +27 -65
  107. package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -4
  108. package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +7 -25
  109. package/bundled/skills/recovery-workflow/SKILL.md +22 -22
  110. package/bundled/skills/recovery-workflow/evals/evals.json +5 -5
  111. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +43 -10
  112. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +48 -40
  113. package/bundled/skills/refactor-planner/SKILL.md +43 -61
  114. package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +17 -17
  115. package/bundled/skills/refactor-workflow/SKILL.md +23 -24
  116. package/bundled/team/prizm-dev-team.json +1 -1
  117. package/bundled/{skills/prizm-kit/assets → templates}/project-memory-template.md +1 -1
  118. package/package.json +1 -1
  119. package/src/clean.js +3 -4
  120. package/src/gitignore-template.js +7 -9
  121. package/src/scaffold.js +14 -5
  122. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +0 -5
  123. package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +0 -19
  124. package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +0 -19
  125. package/bundled/skills/app-planner/references/project-conventions.md +0 -93
  126. package/bundled/skills/prizmkit-analyze/SKILL.md +0 -207
  127. package/bundled/skills/prizmkit-code-review/rules/dimensions-bugfix.md +0 -25
  128. package/bundled/skills/prizmkit-code-review/rules/dimensions-feature.md +0 -43
  129. package/bundled/skills/prizmkit-code-review/rules/dimensions-refactor.md +0 -25
  130. package/bundled/skills/prizmkit-implement/references/deploy-guide-protocol.md +0 -69
  131. package/bundled/skills/prizmkit-verify/SKILL.md +0 -281
  132. package/bundled/skills/prizmkit-verify/scripts/verify-light.py +0 -402
@@ -11,16 +11,18 @@
11
11
 
12
12
  Wait for Reviewer to return.
13
13
 
14
- **Gate Check — Review Notes**:
15
- After Reviewer agent returns, verify the Review Notes were written:
14
+ **Gate Check — Review Report**:
15
+ After Reviewer agent returns, verify the review report was written:
16
16
  ```bash
17
- grep -q "## Review Notes" .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md && echo "GATE:PASS" || echo "GATE:MISSING"
17
+ grep -q "## Findings" .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md && echo "GATE:PASS" || echo "GATE:MISSING"
18
18
  ```
19
- If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write the '## Review Notes' section to context-snapshot.md with structured Fix Instructions. Include: verdict, findings with Root Cause/Impact/Fix Strategy/Code Guidance/Verification, and Re-Review Expectations."
19
+ If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write review-report.md to .prizmkit/specs/{{FEATURE_SLUG}}/ with findings."
20
20
 
21
- - If NEEDS_FIXES: spawn Dev to fix (Dev reads Fix Instructions in snapshot), re-run Review (max 3 rounds)
21
+ **Verdict decision** (L4 responsibility): Read review-report.md findings count. If findings exist NEEDS_FIXES. If no findings PASS.
22
22
 
23
- **CP-3**: Tests pass, verdict is not NEEDS_FIXES.
23
+ - If NEEDS_FIXES: spawn Dev to fix (Dev reads Fix Instructions in review-report.md), re-run Review (max 3 rounds)
24
+
25
+ **CP-3**: Tests pass, no unresolved findings.
24
26
 
25
27
 
26
28
  **Checkpoint update**: Update `workflow-checkpoint.json` — set step `prizmkit-code-review` to `"completed"`.
@@ -11,18 +11,20 @@
11
11
 
12
12
  Wait for Reviewer to return.
13
13
 
14
- **Gate Check — Review Notes**:
15
- After Reviewer agent returns, verify the Review Notes were written:
14
+ **Gate Check — Review Report**:
15
+ After Reviewer agent returns, verify the review report was written:
16
16
  ```bash
17
- grep -q "## Review Notes" .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md && echo "GATE:PASS" || echo "GATE:MISSING"
17
+ grep -q "## Findings" .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md && echo "GATE:PASS" || echo "GATE:MISSING"
18
18
  ```
19
- If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write the '## Review Notes' section to context-snapshot.md with structured Fix Instructions. Include: verdict, findings with Root Cause/Impact/Fix Strategy/Code Guidance/Verification, and Re-Review Expectations."
19
+ If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write review-report.md to .prizmkit/specs/{{FEATURE_SLUG}}/ with findings."
20
+
21
+ **Verdict decision** (L4 responsibility): Read review-report.md findings count. If findings exist → NEEDS_FIXES. If no findings → PASS.
20
22
 
21
23
  - If NEEDS_FIXES: spawn Dev to fix with this prompt:
22
24
  > {{AGENT_PROMPT_DEV_FIX}}
23
25
  Then re-run Review (max 3 rounds).
24
26
 
25
- **CP-3**: Integration tests pass, verdict is not NEEDS_FIXES.
27
+ **CP-3**: Integration tests pass, no unresolved findings.
26
28
 
27
29
 
28
30
  **Checkpoint update**: Update `workflow-checkpoint.json` — set step `prizmkit-code-review` to `"completed"`.
@@ -37,7 +37,7 @@ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing
37
37
  Identify the top-level source directories from the results.
38
38
  3. Scan the detected source directories for files related to this feature; read each one
39
39
  4. Write `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`:
40
- - **Section 1 — Feature Brief**: feature description + acceptance criteria (copy from above)
40
+ - **Section 1 — Task Brief**: task description + acceptance criteria (copy from above)
41
41
  - **Section 2 — Project Structure**: run the following to get a visual directory tree, then paste output:
42
42
  ```bash
43
43
  find . -maxdepth 2 -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/build/*' -not -path '*/__pycache__/*' -not -path '*/vendor/*' | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
@@ -67,8 +67,8 @@ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing
67
67
  ls .prizmkit/specs/{{FEATURE_SLUG}}/spec.md .prizmkit/specs/{{FEATURE_SLUG}}/plan.md 2>/dev/null
68
68
  ```
69
69
 
70
- - spec.md missing: Run `/prizmkit-plan` → generate spec.md. Resolve any `[NEEDS CLARIFICATION]` markers using the feature description — do NOT pause for interactive input.
71
- - plan.md missing: Run `/prizmkit-plan` → generate plan.md (architecture, components, interface design, data model, testing strategy, risk assessment, and Tasks section with `[ ]` checkboxes)
70
+ - spec.md missing: Run `/prizmkit-plan` → generate spec.md. Resolve any `[NEEDS CLARIFICATION]` markers using the task description — do NOT pause for interactive input.
71
+ - plan.md missing: Run `/prizmkit-plan` → generate plan.md (change approach, components, interface design, data model, testing strategy, risk assessment, and Tasks section with `[ ]` checkboxes)
72
72
 
73
73
  > All files go under `.prizmkit/specs/{{FEATURE_SLUG}}/`. Confirm each with `ls` after writing.
74
74
 
@@ -1,11 +1,11 @@
1
1
  {
2
- "version": "1.1.7",
2
+ "version": "1.1.9",
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.",
6
6
  "tier": "foundation",
7
7
  "category": "prizmkit-skill",
8
- "hasAssets": true,
8
+ "hasAssets": false,
9
9
  "hasScripts": false
10
10
  },
11
11
  "prizmkit-init": {
@@ -16,19 +16,12 @@
16
16
  "hasScripts": false
17
17
  },
18
18
  "prizmkit-plan": {
19
- "description": "Specify and plan features: natural language → spec.md → plan.md with architecture and executable tasks.",
19
+ "description": "Specify and plan tasks: natural language → spec.md → plan.md with architecture and executable tasks.",
20
20
  "tier": "1",
21
21
  "category": "prizmkit-skill",
22
22
  "hasAssets": true,
23
23
  "hasScripts": false
24
24
  },
25
- "prizmkit-analyze": {
26
- "description": "Cross-document consistency analysis for spec.md and plan.md. Check if spec and plan are aligned, validate documents before coding.",
27
- "tier": "1",
28
- "category": "prizmkit-skill",
29
- "hasAssets": false,
30
- "hasScripts": false
31
- },
32
25
  "prizmkit-implement": {
33
26
  "description": "Execute implementation following plan.md Tasks section with TDD approach.",
34
27
  "tier": "1",
@@ -65,19 +58,12 @@
65
58
  "hasScripts": false
66
59
  },
67
60
  "prizmkit-deploy": {
68
- "description": "Generate or update deployment documentation (DEPLOY.md) by scanning project state and deploy strategy. Fully autonomous.",
61
+ "description": "Generate or update deployment documentation (.prizmkit/deploy.md) by scanning project state and deploy strategy. On-demand skill.",
69
62
  "tier": "1",
70
63
  "category": "prizmkit-skill",
71
64
  "hasAssets": true,
72
65
  "hasScripts": false
73
66
  },
74
- "prizmkit-verify": {
75
- "description": "Automated framework verification for PrizmKit's 4-layer architecture. Checks structural integrity, contract consistency, and cross-scenario alignment.",
76
- "tier": "1",
77
- "category": "prizmkit-skill",
78
- "hasAssets": false,
79
- "hasScripts": true
80
- },
81
67
  "feature-workflow": {
82
68
  "description": "One-stop entry point for feature development. Orchestrates feature-planner → feature-pipeline-launcher → background execution. Handles multi-feature batch development from a single request.",
83
69
  "tier": "companion",
@@ -175,7 +161,6 @@
175
161
  "prizmkit-init",
176
162
  "prizmkit-prizm-docs",
177
163
  "prizmkit-plan",
178
- "prizmkit-analyze",
179
164
  "prizmkit-implement",
180
165
  "prizmkit-code-review",
181
166
  "prizmkit-committer",
@@ -191,8 +176,7 @@
191
176
  "refactor-planner",
192
177
  "refactor-pipeline-launcher",
193
178
  "bug-fix-workflow",
194
- "recovery-workflow",
195
- "prizmkit-verify"
179
+ "recovery-workflow"
196
180
  ]
197
181
  },
198
182
  "minimal": {
@@ -202,7 +186,6 @@
202
186
  "prizmkit-init",
203
187
  "prizmkit-prizm-docs",
204
188
  "prizmkit-plan",
205
- "prizmkit-analyze",
206
189
  "prizmkit-implement",
207
190
  "prizmkit-code-review",
208
191
  "prizmkit-committer",
@@ -1,26 +1,23 @@
1
1
  ---
2
2
  name: "app-planner"
3
- description: "Plan a new application through interactive conversation — capture vision, tech stack, constraints, and project brief. Use this skill when users say 'plan an app', 'design a new project', 'start from scratch', 'build a new application', or discuss app-level architecture and design. For adding features to existing projects, use feature-planner instead."
3
+ description: "Plan an application through interactive conversation — capture vision, tech stack, constraints, and project brief. Works for both new (greenfield) and existing (brownfield) projects that need app-level planning. Use this skill when users say 'plan an app', 'design a new project', 'start from scratch', 'build a new application', or discuss app-level architecture and design. Also use for existing projects that need a project brief or app-level context. For adding features to existing projects that already have a project brief, use feature-planner instead."
4
4
  ---
5
5
 
6
6
  # app planner
7
7
 
8
- Plan a new application from idea to actionable project context through interactive conversation:
8
+ Plan an application from idea to actionable project context through interactive conversation. Works for both **greenfield** (new) and **brownfield** (existing) projects:
9
9
  - Vision and problem statement
10
- - Tech stack selection
10
+ - Tech stack selection (or confirmation of existing stack)
11
11
  - Constraints and design direction
12
12
  - Architecture decision capture
13
- - Project brief accumulation (`project-brief.md`)
13
+ - Project brief accumulation (`.prizmkit/plans/project-brief.md`)
14
14
 
15
- This skill captures **what to build and why**. For **feature decomposition and `feature-list.json` generation**, hand off to `feature-planner`.
15
+ This skill captures **what to build and why**. For **feature decomposition and `.prizmkit/plans/feature-list.json` generation**, hand off to `feature-planner`.
16
16
 
17
- For adding features to an **existing** project, use `feature-planner` directly.
17
+ For adding features to an **existing** project that already has a project brief, use `feature-planner` directly.
18
18
 
19
19
  ## Invocation Commitment (Hard Rule)
20
-
21
- **When the user invokes `/app-planner`, you MUST execute the app-planner workflow.** You must NEVER:
22
- - Decide on the user's behalf that the task "doesn't need app-planner"
23
- - Skip app-planner to jump directly to spec/plan/implement or any other skill
20
+ You must NEVER:
24
21
  - Bypass the interactive phases because you judge the task to be "simple"
25
22
 
26
23
  If you believe the task is better suited for a different workflow, you MUST:
@@ -35,23 +32,16 @@ If you believe the task is better suited for a different workflow, you MUST:
35
32
  - Create project scaffolding, directories, or boilerplate
36
33
  - Run build/install/test commands (npm init, pip install, etc.)
37
34
  - Execute any implementation action beyond writing planning artifacts
38
- - Generate `feature-list.json` — that is `feature-planner`'s responsibility
39
35
 
40
36
  **Your ONLY writable outputs are:**
41
- 1. `project-brief.md` (project root — accumulated project context brief)
42
- 2. `.prizmkit/project-conventions.json` (project convention answers)
43
- 3. `.prizm-docs/root.prizm` (if architecture decisions are captured — see Architecture Decision Capture section)
44
- - Contains architecture decisions, tech stack rationale, and key constraints
45
- - Used as input by feature-planner and other workflows
46
- 4. Architecture decisions appended to `CLAUDE.md` / `CODEBUDDY.md` (with user consent)
47
- 5. Draft backups in `.prizmkit/planning/`
37
+ 1. `.prizmkit/plans/project-brief.md` (`.prizmkit/plans/` — accumulated project context brief)
38
+ 2. Project conventions and architecture decisions appended to `CLAUDE.md` / `CODEBUDDY.md` (with user consent)
48
39
 
49
40
  **After planning is complete**, you MUST:
50
41
  1. Present the summary of captured vision, constraints, and decisions
51
42
  2. **Ask the user explicitly** whether they want to proceed to feature decomposition
52
- 3. If the user agrees → recommend invoking `feature-planner` to decompose into features and generate `feature-list.json`
53
- 4. If the user wants to continue exploring → stay in app-planner
54
- 5. **NEVER auto-execute** the pipeline, feature-planner, or any implementation step
43
+ 3. If the user wants to continue exploring stay in app-planner
44
+ 4. **NEVER auto-execute** the pipeline, feature-planner, or any implementation step
55
45
 
56
46
  ## When to Use
57
47
 
@@ -60,9 +50,12 @@ Trigger this skill for requests like:
60
50
  - "Start from scratch", "Build something new", "Create a new product"
61
51
  - "Help me figure out what to build", "Brainstorm an app idea"
62
52
  - "What tech stack should I use?", "Help me choose frameworks"
53
+ - "Create a project brief for my existing project"
54
+ - "Help me document what this project is about"
55
+ - "I have a codebase but no project plan yet"
63
56
 
64
57
  Do NOT use this skill when:
65
- - The user already has a project and wants to add features → use `feature-planner`
58
+ - The user already has a project brief and wants to add features → use `feature-planner`
66
59
  - The user wants to run the pipeline → use `feature-pipeline-launcher`
67
60
  - The user is debugging/refactoring or wants to write source code directly
68
61
 
@@ -78,11 +71,24 @@ Do NOT use this skill when:
78
71
  - During brainstorm Phase C → also read `${SKILL_DIR}/references/red-team-checklist.md`
79
72
 
80
73
  3. **Project conventions check** — after Intent Confirmation, before brainstorm or vision work:
81
- → Read `.prizmkit/project-conventions.json` if it exists
82
- Cross-reference with `${SKILL_DIR}/references/project-conventions.md` for the full question list
83
- For any convention with a `null` or missing value batch all unanswered questions into a single prompt
84
- Save answers to `.prizmkit/project-conventions.json`
85
- If all conventions are already answered skip silently
74
+ → Read `CLAUDE.md` / `CODEBUDDY.md` and check for `### Project Conventions` section
75
+ If section exists and all conventions are answered skip silently
76
+ If section is missing or incompleteask the following conventions as a single batched prompt:
77
+ - **UI Display Language** (`ui_language`): Primary language for the app's UI (e.g., English, 中文, 日本語). If non-English, confirm whether ALL UI text should use that language.
78
+ - **Multi-Language Support** (`i18n`): Whether i18n is needed. If yes, which target languages? If enabled, note i18n infrastructure early in dependency graph.
79
+ - **Date/Time/Currency**: Date format (YYYY-MM-DD, MM/DD/YYYY, etc.), timezone strategy (UTC storage + local display, user-selected, server only), currency format (if applicable).
80
+ - **Code & Git Language**: Language for code comments and git commit messages (default: English for both).
81
+ → Save answers to `CLAUDE.md` / `CODEBUDDY.md` under `### Project Conventions` section (format: one bullet per convention)
82
+ → Example output:
83
+ ```markdown
84
+ ### Project Conventions
85
+ - UI language: 中文
86
+ - i18n: disabled
87
+ - Date format: YYYY-MM-DD, timezone: UTC storage + local display
88
+ - Currency: CNY ¥
89
+ - Code comments: English
90
+ - Git commits: English
91
+ ```
86
92
 
87
93
  4. **Project brief accumulation** — throughout all interactive phases:
88
94
  → Read `${SKILL_DIR}/references/project-brief-guide.md` for template and rules
@@ -93,11 +99,7 @@ Do NOT use this skill when:
93
99
  Before questions, check optional context files (never block if absent):
94
100
  - `.prizm-docs/root.prizm` (architecture/project context)
95
101
  - `.prizmkit/config.json` (existing stack preferences and detected tech stack)
96
- - `.prizmkit/project-conventions.json` (previously answered project conventions)
97
- - If `.prizm-docs/root.prizm` is absent and the project has existing source code, scan the directory structure to understand the codebase layout:
98
- ```bash
99
- find . -maxdepth 2 -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/build/*' -not -path '*/__pycache__/*' -not -path '*/vendor/*' | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
100
- ```
102
+ - `CLAUDE.md` / `CODEBUDDY.md` `### Project Conventions` section (previously answered project conventions)
101
103
 
102
104
  **Tech stack auto-population from config.json:**
103
105
  - If `.prizmkit/config.json` contains a `tech_stack` object, use it to pre-fill tech assumptions.
@@ -123,13 +125,61 @@ After initial greeting, confirm the user's deliverable intent:
123
125
  - Run project conventions check first
124
126
  - Load `${SKILL_DIR}/references/brainstorm-guide.md` and follow its structured ideation process (Phases A-D)
125
127
  - Brainstorm Phase D output serves as the Vision Summary (CP-AP-2)
126
- - Continue with Phase 2 (constraints including frontend design check if applicable)
127
- - At Phase 2 completion, re-ask: "Ideas are taking shape. Ready to hand off to `feature-planner` for feature decomposition?"
128
- - If yesrecommend invoking `feature-planner`
129
- - If no offer to continue exploring (loop back to brainstorm or constraints), or save draft to `.prizmkit/planning/` and exit
128
+ - After brainstorm completes, ask: "Ideas are taking shape. Ready to hand off to `feature-planner` for feature decomposition, or continue refining?"
129
+ - If ready proceed to Phase 2 (constraints + frontend design check if applicable) then handoff
130
+ - If not ready continue exploring, or save draft to `.prizmkit/planning/` and exit
131
+ - **Checkpoints in explore mode**: CP-AP-0 (required), CP-AP-1 (required), CP-AP-2 (from brainstorm output), CP-AP-3 (only if user proceeds to Phase 2), CP-AP-4 and CP-AP-5 (only if user transitions to produce mode)
130
132
 
131
133
  3. **Session goal tracking**: Track the intent (`produce` or `explore`) throughout the session. If `explore`, always re-prompt before ending.
132
134
 
135
+ ## Project State Detection (after Intent Confirmation)
136
+
137
+ Detect whether this is a **greenfield** (new) or **brownfield** (existing) project and adapt the workflow accordingly.
138
+
139
+ ### Detection Signals
140
+
141
+ | Signal | Greenfield | Brownfield |
142
+ |--------|-----------|------------|
143
+ | `package.json` / `pyproject.toml` / `go.mod` / `Cargo.toml` / `pom.xml` | absent | present |
144
+ | `src/` or `app/` directory with source files | absent | present |
145
+ | `.git` with commit history | absent or initial commit only | present with history |
146
+ | Empty or near-empty directory | yes | no |
147
+
148
+ ### Greenfield Behavior (default)
149
+
150
+ Proceed with the standard Core Workflow — ask all questions from scratch.
151
+
152
+ ### Brownfield Behavior
153
+
154
+ When an existing project is detected:
155
+
156
+ 1. **Scan project structure** to understand the codebase layout:
157
+ ```bash
158
+ find . -maxdepth 2 -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/build/*' -not -path '*/__pycache__/*' -not -path '*/vendor/*' | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
159
+ ```
160
+
161
+ 2. **Read existing project metadata** to infer tech stack and purpose:
162
+ - `package.json` → name, description, dependencies, scripts
163
+ - `pyproject.toml` / `requirements.txt` → Python dependencies
164
+ - `go.mod` → Go module info
165
+ - `README.md` → project description and goals
166
+ - `.prizmkit/config.json` → previously detected tech stack
167
+ - `.prizm-docs/root.prizm` → existing architecture context
168
+
169
+ 3. **Present inferred summary** to the user:
170
+ > "I see this is a [framework] project using [language] with [key dependencies]. Here's what I inferred about the project: [summary]. Is this correct? Anything to add or change?"
171
+
172
+ 4. **Pre-fill where possible** — skip questions already answerable from the codebase:
173
+ - Phase 2 tech stack selection → largely pre-filled from dependencies
174
+ - Vision/problem statement → inferred from README or package description (user confirms)
175
+ - Existing features → note them as `[x]` items in project brief
176
+
177
+ 5. **Focus remaining questions** on what CANNOT be inferred:
178
+ - Target users and core value proposition
179
+ - Future direction and planned capabilities
180
+ - Non-functional requirements (performance, scale, security)
181
+ - Design direction (for frontend projects)
182
+
133
183
  ## Core Workflow
134
184
 
135
185
  Execute the planning workflow in conversation mode with mandatory checkpoints:
@@ -151,50 +201,27 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
151
201
  | Checkpoint | Artifact/State | Criteria | Phase |
152
202
  |-----------|----------------|----------|-------|
153
203
  | **CP-AP-0** | Intent Confirmed | User confirmed session goal (produce / explore) | 1 |
154
- | **CP-AP-1** | Conventions Checked | Project conventions loaded or asked; `.prizmkit/project-conventions.json` up to date | 1 |
155
- | **CP-AP-2** | Vision Summary | Goal/users/differentiators confirmed by user | 1-2 |
156
- | **CP-AP-3** | Frontend Design Evaluated | For frontend projects: checked for existing UI/UX design system; user was asked if missing | 2 |
157
- | **CP-AP-4** | Project Brief Accumulated | `project-brief.md` exists at project root with at least 3 ideas listed | 3 |
204
+ | **CP-AP-1** | Conventions Checked | Project conventions loaded or asked; `### Project Conventions` section in `CLAUDE.md` / `CODEBUDDY.md` up to date | 1 |
205
+ | **CP-AP-2** | Vision Summary | Goal/users/differentiators confirmed by user. For brownfield: existing purpose confirmed or refined. | 1-2 |
206
+ | **CP-AP-3** | Frontend Design Evaluated | For frontend projects: checked for existing UI/UX design system; user was asked if missing. **Auto-pass** for backend-only or non-UI projects. | 2 |
207
+ | **CP-AP-4** | Project Brief Accumulated | `.prizmkit/plans/project-brief.md` exists at `.prizmkit/plans/` with at least 3 ideas listed. For brownfield: already-implemented items marked `[x]` count toward this total. | 3 |
158
208
  | **CP-AP-5** | Handoff Ready | All app-level context captured; user confirmed readiness for feature decomposition | 4 |
159
209
 
160
210
  ## Architecture Decision Capture
161
211
 
162
212
  After Phase 2, if framework-shaping architecture decisions emerged during planning (tech stack, communication patterns, data model strategies — not individual feature details), read `${SKILL_DIR}/references/architecture-decisions.md` and follow the capture flow. Most sessions will NOT produce architecture decisions — only capture when genuinely impactful.
163
213
 
164
- **Handoff to feature-planner**: Captured architecture decisions MUST be written to `.prizm-docs/root.prizm` so that feature-planner can read them as context. This ensures all downstream planners (feature, bug, refactor) share consistent architectural understanding.
165
-
166
214
  **How it works**:
167
- 1. If decisions are captured → create `.prizm-docs/root.prizm` with decision summaries
168
- 2. Also append decisions to `CLAUDE.md` / `CODEBUDDY.md` for human reference
169
- 3. When feature-planner is invoked, it will read `.prizm-docs/root.prizm` as prerequisite context
170
- 4. Feature decomposition will respect captured architecture decisions (no conflicting tech choices)
215
+ 1. If decisions are captured → append to `CLAUDE.md` / `CODEBUDDY.md` under `### Architecture Decisions` section
216
+ 2. Feature-planner and other downstream skills read `CLAUDE.md` / `CODEBUDDY.md` as standard context, so they automatically receive these decisions
217
+ 3. Do NOT write directly to `.prizm-docs/root.prizm` — that file is maintained by `prizmkit-prizm-docs` and `prizmkit-retrospective`. If the project needs `.prizm-docs/`, recommend the user run `prizmkit-prizm-docs` init after planning.
171
218
 
172
219
  ## Project Brief Accumulation
173
220
 
174
- During interactive planning, maintain a `project-brief.md` at the project root as a simple checklist of product ideas.
221
+ During interactive planning, maintain a `.prizmkit/plans/project-brief.md` at `.prizmkit/plans/` as a simple checklist of product ideas.
175
222
 
176
223
  → Read `${SKILL_DIR}/references/project-brief-guide.md` for full format and rules.
177
224
 
178
- **Format**: One idea per line, each starting with `[ ]`. Example:
179
- ```
180
- # Project Brief
181
-
182
- [x] 表示构想已在某个 feature 中实现完成
183
-
184
- --------
185
-
186
- [ ] B2B SaaS 餐饮库存管理平台,面向中小连锁餐厅
187
- [ ] 核心价值:通过预测性订货减少 30% 食物浪费
188
- [ ] 必须支持 iPad Safari 离线模式
189
- ```
190
-
191
- **Key rules**:
192
- - After each meaningful user response → append a new `[ ]` line
193
- - One idea, one sentence per line — no paragraphs
194
- - Max 500 words total
195
- - Must have at least 3 ideas listed before CP-AP-4
196
- - The pipeline will mark `[x]` and append file paths when features are implemented
197
-
198
225
  ## Session Exit Gate
199
226
 
200
227
  Prevent accidental session exit without completing the planning artifacts.
@@ -203,13 +230,12 @@ Prevent accidental session exit without completing the planning artifacts.
203
230
 
204
231
  Activate when ALL true:
205
232
  - Session goal = `produce`
206
- - `project-brief.md` has not been written or is incomplete (Vision section missing)
207
- - No architecture decisions captured yet (if any emerged)
233
+ - `.prizmkit/plans/project-brief.md` has not been written or is incomplete (fewer than 3 ideas listed)
208
234
 
209
235
  ### Gate Behavior
210
236
 
211
237
  When the session appears to be ending:
212
- 1. **Remind**: "You set out to produce a project plan but `project-brief.md` isn't complete yet."
238
+ 1. **Remind**: "You set out to produce a project plan but `.prizmkit/plans/project-brief.md` isn't complete yet."
213
239
  2. **Offer 3 options**:
214
240
  - **(a) Continue to completion**
215
241
  - **(b) Save draft & exit** — write current progress as draft to `.prizmkit/planning/`
@@ -220,6 +246,6 @@ When the session appears to be ending:
220
246
  After all checkpoints pass, present a summary and recommend next steps:
221
247
 
222
248
  1. **Summary**: List captured vision, tech stack, constraints, architecture decisions, and project brief status
223
- 2. **Primary recommendation**: Invoke `feature-planner` to decompose the application into features and generate `feature-list.json` (schema: `dev-pipeline-feature-list-v1`, uses `project_name` field for the app name)
249
+ 2. **Primary recommendation**: Invoke `feature-planner` to decompose the application into features and generate `.prizmkit/plans/feature-list.json` (schema: `dev-pipeline-feature-list-v1`, uses `project_name` field for the app name)
224
250
  3. **Alternative**: If the user wants to continue refining the vision or constraints, stay in app-planner
225
- 4. **Artifacts produced**: List files written (`project-brief.md`, `.prizmkit/project-conventions.json`, architecture decisions if any)
251
+ 4. **Artifacts produced**: List files written (`.prizmkit/plans/project-brief.md`, project conventions and architecture decisions in `CLAUDE.md` / `CODEBUDDY.md`)
@@ -42,7 +42,7 @@ Use these tables to guide tech stack selection based on project requirements.
42
42
 
43
43
  | Framework | Best For | Ecosystem |
44
44
  |-----------|----------|-----------|
45
- | Next.js 14+ | Full-stack React, SSR, API routes | React ecosystem, Vercel |
45
+ | Next.js | Full-stack React, SSR, API routes | React ecosystem, Vercel |
46
46
  | Nuxt 3 | Full-stack Vue, SSR | Vue ecosystem |
47
47
  | SvelteKit | Performance-focused, smaller teams | Svelte ecosystem |
48
48
  | Remix | Nested routes, data loading | React ecosystem |
@@ -20,7 +20,7 @@ Only capture decisions that are **framework-shaping** — NOT individual feature
20
20
 
21
21
  ## When to Capture
22
22
 
23
- After Phase 5 (DAG verification), before Phase 6 (JSON generation). At this point decisions are settled.
23
+ After Phase 2 (Confirm constraints and tech assumptions), before Phase 3 (Capture architecture decisions and finalize project brief). At this point decisions are settled.
24
24
 
25
25
  ## How to Capture
26
26
 
@@ -1,79 +1,82 @@
1
- # Project Brief — Checklist Format Guide
1
+ # Project Brief Template
2
2
 
3
- > Capture the user's key product ideas as a simple checklist in `project-brief.md`. Each line is one idea. The dev-pipeline injects this file into every feature session so the AI understands the user's overall product vision.
3
+ > Capture the user's key product ideas as a simple checklist. Each line is one idea. This file is referenced by `root.prizm` (`PROJECT_BRIEF:`) so every new AI session automatically knows the project's goals.
4
4
 
5
- ## Purpose
5
+ ## File Location
6
6
 
7
- During `app-planner` conversation, the user describes what they want to build. `project-brief.md` distills these into a flat checklist — one idea per line. When `dev-pipeline` builds individual features, each session sees this checklist and understands the bigger picture.
7
+ `.prizmkit/plans/project-brief.md`
8
8
 
9
- ## Persistence
10
-
11
- - **File**: `project-brief.md` at project root (same level as `feature-list.json`)
12
- - **Format**: Checklist — one idea per line, `[ ]` for pending, `[x]` for completed
13
- - **Size limit**: 500 words max (injected into every session's context window)
14
- - **Consumed by**: `dev-pipeline/scripts/generate-bootstrap-prompt.py` → `{{PROJECT_BRIEF}}` placeholder
15
-
16
- ## File Format
9
+ ## Format
17
10
 
18
11
  ```markdown
19
12
  # Project Brief
20
13
 
21
- [x] 表示构想已在某个 feature 中实现完成
22
-
23
- --------
24
-
25
- [ ] B2B SaaS 餐饮库存管理平台,面向中小连锁餐厅 (5-50 家门店)
26
- [ ] 核心价值:通过预测性订货减少 30% 食物浪费
27
- [ ] 必须支持 iPad Safari 离线模式,厨房平板 WiFi 不稳定
28
- [ ] 后端可部署到客户自有云(多租户但可自托管)
29
- [ ] RESTful API + JWT 认证,不用 GraphQL
30
- [ ] 使用 Supabase (PostgreSQL) 作为数据库和认证
31
- [ ] TailwindCSS + shadcn/ui 统一前端组件
32
- [ ] 所有金额用整数(分)存储,避免浮点精度问题
33
- [ ] Dashboard 在 3G 网络下 2 秒内加载
34
- [ ] 供应商集成 API 支持 webhook 回调
35
- [ ] 用户端中文界面,管理后台英文界面
14
+ [ ] Core product idea or constraint
15
+ [ ] Another product idea
16
+ [ ] Third idea — one sentence, no sub-bullets
17
+ [x] Already implemented feature -> src/feature/, src/utils/helper.ts
36
18
  ```
37
19
 
38
- ## Format Rules
20
+ ## Rules
39
21
 
40
22
  1. **First line**: `# Project Brief`
41
- 2. **Second line**: `[x] 表示构想已在某个 feature 中实现完成` — fixed legend
42
- 3. **Third line**: `--------`separator
43
- 4. **Remaining lines**: One idea per line, each starting with `[ ]`
44
- 5. Each line is **one sentence** no paragraphs, no sub-bullets
45
- 6. Language: match the user's language (Chinese or English)
46
-
47
- ## How app-planner Writes It
48
-
49
- During interactive conversation, after each meaningful user response (skip acknowledgments, yes/no):
50
- - Evaluate whether the response contains a product idea, constraint, design decision, or technical preference
51
- - If yes → append a new `[ ]` line to `project-brief.md`
52
- - Keep each line concise — one idea, one sentence
53
- - Merge or condense if approaching 500-word limit
54
-
55
- **First write**: Create the file with the header, legend, separator, and initial ideas.
56
- **Subsequent writes**: Append new `[ ]` lines only — do not rewrite existing lines.
57
-
58
- ## How the Pipeline Marks Completion
59
-
60
- When a feature session in `dev-pipeline` completes and its implementation addresses one or more ideas from the checklist:
61
- 1. Change `[ ]` to `[x]` for that idea
62
- 2. Append 1-2 key directory/file paths after the idea text, showing where it was implemented
63
-
64
- Example of a completed item:
65
- ```
66
- [x] RESTful API + JWT 认证,不用 GraphQL src/middleware/auth.ts, src/routes/api/
67
- ```
68
-
69
- ## Checkpoint
70
-
71
- Verified at **CP-AP-4**: Before handoff to `feature-planner`, `project-brief.md` must exist with at least 3 ideas listed.
72
-
73
- ## How the Pipeline Uses It
74
-
75
- `generate-bootstrap-prompt.py` reads `project-brief.md` and injects its content into the `{{PROJECT_BRIEF}}` section of every bootstrap prompt (tier1/tier2/tier3). The framing:
76
-
77
- > "Product ideas checklist from planning. Lines marked [x] are already implemented. When your feature touches any [ ] item, ensure alignment. After implementation, mark relevant items [x] and append the key file paths."
23
+ 2. **Remaining lines**: One idea per line, prefixed with `[ ]` (pending) or `[x]` (done)
24
+ 3. Each line is **one sentence** no paragraphs, no sub-bullets, no grouping headers
25
+ 4. Language: match the user's language (Chinese or English)
26
+ 5. **Size limit**: 500 words max (this file is injected into every session's context window)
27
+ 6. **Completion marking** (mandatory): When a brief item is implemented:
28
+ - Change `[ ]` to `[x]`
29
+ - Append `->` followed by the **key file or directory paths** that implement it
30
+ - List the most important 1-3 paths only (entry point, core module, or directory) — not every touched file
31
+ - Example: `[x] User authentication with OAuth -> src/auth/, src/middleware/auth.ts`
32
+ - This lets future AI sessions instantly locate the implementation without re-scanning
33
+
34
+ ## Brownfield Init
35
+
36
+ When initializing an existing project, AI infers the brief from:
37
+ - Generated `root.prizm` (tech stack, module structure)
38
+ - `README.md` (if exists)
39
+ - Package metadata (`package.json` description, `pyproject.toml`, etc.)
40
+
41
+ Then presents the draft to the user for confirmation and editing.
42
+
43
+ ## Greenfield Init
44
+
45
+ When initializing a new/empty project, use **progressive questioning** to fully understand the user's intent before generating the brief. Do NOT dump all questions at once — ask in rounds, adapting based on answers.
46
+
47
+ ### Round 1: Problem & Vision (required)
48
+ - What problem does this project solve? (or: what's the core idea?)
49
+ - Who is the target user / audience?
50
+
51
+ ### Round 2: Scope & Features (required)
52
+ - What are the 3-5 core features or capabilities? (ask user to list them)
53
+ - What is the MVP scope? (what's the minimum version that delivers value?)
54
+ - Are there any explicit non-goals? (things this project deliberately does NOT do)
55
+
56
+ ### Round 3: Technical Constraints (if user has preferences)
57
+ - Any preferred tech stack / language / framework?
58
+ - Any integration requirements? (third-party APIs, databases, auth providers)
59
+ - Deployment target? (web app, mobile, CLI, library, self-hosted, cloud)
60
+
61
+ ### Round 4: Clarification (adaptive — only if gaps remain)
62
+ If previous answers are vague or incomplete, probe deeper:
63
+ - "You mentioned X — can you give a concrete example of how a user would use it?"
64
+ - "Are there existing tools that do something similar? How is yours different?"
65
+ - "What does success look like for V1?"
66
+
67
+ ### Completion Criteria
68
+ Stop asking when ALL of these are clear:
69
+ 1. **Problem** — what pain point or opportunity this addresses
70
+ 2. **Users** — who will use it and in what context
71
+ 3. **Core features** — at least 3 concrete capabilities (not vague aspirations)
72
+ 4. **Boundaries** — what's in scope vs. out of scope for V1
73
+ 5. **Technical direction** — enough to populate `config.json` tech_stack (or explicitly deferred)
74
+
75
+ If the user gives short/vague answers, don't accept them — rephrase and ask again. A weak brief leads to weak specs downstream.
76
+
77
+ ### Generate & Confirm
78
+ Once all criteria are met:
79
+ 1. Generate brief in checklist format (see Format section above)
80
+ 2. Present to user with: "Here's what I captured — anything to add, remove, or change?"
81
+ 3. Apply edits and write to `.prizmkit/plans/project-brief.md`
78
82
 
79
- If the file does not exist, the placeholder is replaced with `(No project brief available)`.