prizmkit 1.1.8 → 1.1.10

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 (123) 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/SCHEMA_ANALYSIS.md +535 -0
  6. package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
  7. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +57 -12
  8. package/bundled/dev-pipeline/launch-feature-daemon.sh +3 -1
  9. package/bundled/dev-pipeline/launch-refactor-daemon.sh +57 -12
  10. package/bundled/dev-pipeline/lib/branch.sh +6 -1
  11. package/bundled/dev-pipeline/lib/common.sh +71 -0
  12. package/bundled/dev-pipeline/lib/heartbeat.sh +2 -2
  13. package/bundled/dev-pipeline/retry-bugfix.sh +60 -23
  14. package/bundled/dev-pipeline/retry-feature.sh +47 -12
  15. package/bundled/dev-pipeline/retry-refactor.sh +105 -23
  16. package/bundled/dev-pipeline/run-bugfix.sh +265 -44
  17. package/bundled/dev-pipeline/run-feature.sh +35 -1
  18. package/bundled/dev-pipeline/run-refactor.sh +376 -51
  19. package/bundled/dev-pipeline/scripts/check-session-status.py +24 -1
  20. package/bundled/dev-pipeline/scripts/detect-stuck.py +195 -85
  21. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +31 -19
  22. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +19 -3
  23. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +98 -11
  24. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +30 -5
  25. package/bundled/dev-pipeline/scripts/init-pipeline.py +3 -3
  26. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +15 -4
  27. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -5
  28. package/bundled/dev-pipeline/scripts/patch-completion-notes.py +191 -0
  29. package/bundled/dev-pipeline/scripts/update-bug-status.py +159 -14
  30. package/bundled/dev-pipeline/scripts/update-feature-status.py +79 -37
  31. package/bundled/dev-pipeline/scripts/update-refactor-status.py +343 -13
  32. package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +1 -1
  33. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +7 -11
  34. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +41 -7
  35. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +27 -3
  36. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +43 -19
  37. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +54 -26
  38. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +5 -14
  39. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +36 -25
  40. package/bundled/dev-pipeline/templates/feature-list-schema.json +23 -11
  41. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +270 -0
  42. package/bundled/dev-pipeline/templates/refactor-list-schema.json +10 -2
  43. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +3 -1
  44. package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +1 -0
  45. package/bundled/dev-pipeline/templates/sections/feature-context.md +2 -0
  46. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +29 -2
  47. package/bundled/dev-pipeline/templates/sections/phase-commit.md +22 -0
  48. package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +2 -2
  49. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +8 -6
  50. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +7 -5
  51. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
  52. package/bundled/skills/_metadata.json +5 -22
  53. package/bundled/skills/app-planner/SKILL.md +92 -66
  54. package/bundled/skills/app-planner/assets/app-design-guide.md +1 -1
  55. package/bundled/skills/app-planner/references/architecture-decisions.md +1 -1
  56. package/bundled/skills/app-planner/references/project-brief-guide.md +69 -66
  57. package/bundled/skills/bug-fix-workflow/SKILL.md +47 -4
  58. package/bundled/skills/bug-planner/SKILL.md +130 -188
  59. package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +43 -0
  60. package/bundled/skills/bug-planner/references/critic-and-verification.md +44 -0
  61. package/bundled/skills/bug-planner/references/error-recovery.md +73 -0
  62. package/bundled/skills/bug-planner/references/input-formats.md +53 -0
  63. package/bundled/skills/bug-planner/references/schema-validation.md +25 -0
  64. package/bundled/skills/bug-planner/references/severity-rules.md +16 -0
  65. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +1 -5
  66. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +5 -10
  67. package/bundled/skills/feature-pipeline-launcher/SKILL.md +16 -3
  68. package/bundled/skills/feature-planner/SKILL.md +33 -122
  69. package/bundled/skills/feature-planner/assets/evaluation-guide.md +1 -1
  70. package/bundled/skills/feature-planner/assets/planning-guide.md +21 -5
  71. package/bundled/skills/feature-planner/references/browser-interaction.md +2 -4
  72. package/bundled/skills/feature-planner/references/completeness-review.md +57 -0
  73. package/bundled/skills/feature-planner/references/error-recovery.md +15 -34
  74. package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
  75. package/bundled/skills/feature-planner/references/new-project-planning.md +2 -2
  76. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -2
  77. package/bundled/skills/feature-workflow/SKILL.md +3 -4
  78. package/bundled/skills/prizm-kit/SKILL.md +39 -49
  79. package/bundled/skills/prizmkit-code-review/SKILL.md +51 -64
  80. package/bundled/skills/prizmkit-code-review/rules/dimensions.md +85 -0
  81. package/bundled/skills/prizmkit-code-review/rules/fix-strategy.md +11 -11
  82. package/bundled/skills/prizmkit-committer/SKILL.md +3 -31
  83. package/bundled/skills/prizmkit-deploy/SKILL.md +34 -31
  84. package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +1 -1
  85. package/bundled/skills/prizmkit-implement/SKILL.md +35 -68
  86. package/bundled/skills/prizmkit-init/SKILL.md +112 -65
  87. package/bundled/skills/prizmkit-init/assets/project-brief-template.md +82 -0
  88. package/bundled/skills/prizmkit-plan/SKILL.md +120 -79
  89. package/bundled/skills/prizmkit-plan/assets/plan-template.md +28 -18
  90. package/bundled/skills/prizmkit-plan/assets/spec-template.md +28 -11
  91. package/bundled/skills/prizmkit-plan/references/clarify-guide.md +3 -3
  92. package/bundled/skills/prizmkit-plan/references/verification-checklist.md +60 -0
  93. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +10 -81
  94. package/bundled/skills/prizmkit-prizm-docs/assets/{PRIZM-SPEC.md → prizm-docs-format.md} +41 -526
  95. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +46 -0
  96. package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +16 -0
  97. package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +14 -0
  98. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +19 -0
  99. package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +17 -0
  100. package/bundled/skills/prizmkit-retrospective/SKILL.md +27 -65
  101. package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -4
  102. package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +7 -25
  103. package/bundled/skills/recovery-workflow/SKILL.md +8 -8
  104. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +17 -9
  105. package/bundled/skills/refactor-planner/SKILL.md +23 -41
  106. package/bundled/skills/refactor-workflow/SKILL.md +1 -2
  107. package/bundled/team/prizm-dev-team.json +1 -1
  108. package/bundled/{skills/prizm-kit/assets → templates}/project-memory-template.md +1 -1
  109. package/package.json +1 -1
  110. package/src/clean.js +0 -1
  111. package/src/gitignore-template.js +0 -1
  112. package/src/scaffold.js +10 -3
  113. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +0 -5
  114. package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +0 -19
  115. package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +0 -19
  116. package/bundled/skills/app-planner/references/project-conventions.md +0 -93
  117. package/bundled/skills/prizmkit-analyze/SKILL.md +0 -207
  118. package/bundled/skills/prizmkit-code-review/rules/dimensions-bugfix.md +0 -25
  119. package/bundled/skills/prizmkit-code-review/rules/dimensions-feature.md +0 -43
  120. package/bundled/skills/prizmkit-code-review/rules/dimensions-refactor.md +0 -25
  121. package/bundled/skills/prizmkit-implement/references/deploy-guide-protocol.md +0 -69
  122. package/bundled/skills/prizmkit-verify/SKILL.md +0 -281
  123. package/bundled/skills/prizmkit-verify/scripts/verify-light.py +0 -402
@@ -1,73 +1,76 @@
1
1
  ---
2
2
  name: "prizmkit-deploy"
3
- description: "Generate or update DEPLOY.md with local dev setup, testing, production deployment, and rollback procedures. Fully autonomous. Use after /prizmkit-retrospective, before /prizmkit-committer. Trigger on: 'deploy docs', 'deployment guide', 'how to deploy', 'DEPLOY.md'. (project)"
3
+ description: "Generate or update .prizmkit/deploy.md with local dev setup, testing, production deployment, and rollback procedures. On-demand skill trigger when deployment docs are needed. Trigger on: 'deploy docs', 'deployment guide', 'how to deploy', 'deploy.md'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Deploy
7
7
 
8
8
  ### When to Use
9
- - After `/prizmkit-retrospective` and before `/prizmkit-committer` to complete documentation before commit
10
- - After a batch of features has been implemented and reviewed
11
9
  - When the project has no deployment documentation yet
12
10
  - When new infrastructure components have been added (new database, cache, message queue, etc.)
11
+ - When deployment-related configuration has changed significantly
12
+ - When explicitly requested by user or caller
13
13
 
14
14
  ### When NOT to Use
15
- - Mid-feature development (deployment docs should reflect reviewed, stable code)
16
- - For actual deployment execution (this skill only produces docs)
17
- - Fast-path bug fixes (no deployment doc update needed)
15
+ - For actual deployment execution (this skill only produces documentation)
16
+ - When only application logic changed with no infra/config impact
18
17
 
19
- ### Pipeline Safety
20
- - **Fully autonomous** — no user interaction required at any step
18
+ > **On-demand skill** — not part of the default `plan → implement → code-review → retrospective → committer` chain. Invoke independently when deployment documentation needs creation or update.
19
+
20
+ ### PRECONDITION
21
+ - Project contains deployable artifacts (at least one of: `package.json`, `Dockerfile`, `Makefile`, `go.mod`, `Cargo.toml`, `pyproject.toml`, or equivalent)
22
+
23
+ ## Context Loading
24
+
25
+ 1. **Architecture context**: Read `.prizm-docs/root.prizm` → identify modules with deployment-relevant components (APIs, services, workers)
26
+ 2. **Project config**: Read `.prizmkit/config.json` for `deploy_strategy` and `tech_stack`
27
+ - If `.prizmkit/config.json` does not exist → proceed without it, infer from project file scanning. Log warning: "No .prizmkit/config.json found — inferring deployment strategy from project files."
28
+ 3. **Module detail**: Read relevant `.prizm-docs/<module>.prizm` L1/L2 for INTERFACES and DEPENDENCIES sections that inform deployment topology
21
29
 
22
30
  ## Execution Steps
23
31
 
24
- **Phase 1 — Context Gathering:**
25
- 1. Read `.prizmkit/config.json`:
26
- - `deploy_strategy` — user's confirmed deployment approach (may be absent)
27
- - `tech_stack` — detected or user-provided technology stack
28
- - **If `.prizmkit/config.json` does not exist**: proceed without it — infer deployment approach entirely from project file scanning in steps 2-3. Log a warning: "No .prizmkit/config.json found — inferring deployment strategy from project files. Run `/prizmkit-init` to generate config."
29
- 2. Scan project for deployment-related files:
32
+ **Phase 1 — Project Scanning:**
33
+ 1. Scan project for deployment-related files:
30
34
  - Container: `Dockerfile`, `docker-compose.yml`, `.dockerignore`
31
35
  - Cloud platforms: `vercel.json`, `netlify.toml`, `fly.toml`, `app.yaml` (GCP), `appspec.yml` (AWS)
32
36
  - CI/CD: `.github/workflows/`, `.gitlab-ci.yml`, `Jenkinsfile`, `bitbucket-pipelines.yml`
33
37
  - Package managers: `package.json` scripts (start, build, preview), `Makefile`, `Procfile`
34
38
  - Infrastructure as Code: `terraform/`, `pulumi/`, `cdk/`, `serverless.yml`
35
- 3. Scan source code for environment variable references:
39
+ 2. Scan source code for environment variable references:
36
40
  - Grep for `process.env.`, `os.environ`, `os.Getenv`, `env::var`, `System.getenv`
37
41
  - Cross-reference with `.env.example`, `.env.template`, or `.env.sample` if they exist
38
42
  - Catalog all env vars with their usage context
39
- 4. Check for existing `DEPLOY.md` (or `docs/deployment.md`, `docs/DEPLOY.md`)
40
- 5. Read recent git log to identify newly added infrastructure components since last deploy doc update:
41
- - If `DEPLOY.md` exists → use `git log -1 --format=%H -- DEPLOY.md` to find the last commit that touched it, then `git diff <that-commit>..HEAD` to identify new infra files
42
- - If `DEPLOY.md` does not exist → treat all infrastructure as "new"
43
+ 3. Check for existing `.prizmkit/deploy.md`
44
+ 4. If `.prizmkit/deploy.md` exists → use `git log` to identify infra changes since last update; otherwise treat all infrastructure as "new"
43
45
 
44
46
  **Phase 2 — Document Generation:**
45
- 6. If NO existing deploy doc:
46
- - Generate full `DEPLOY.md` from template (`${SKILL_DIR}/assets/deploy-template.md`)
47
+ 5. If NO existing deploy doc:
48
+ - Generate `.prizmkit/deploy.md` from template (`${SKILL_DIR}/assets/deploy-template.md`)
47
49
  - Fill all sections based on scanned project state
48
50
  - If `deploy_strategy` exists in config → use it as the authoritative deployment approach
49
- - If `deploy_strategy` is absent → infer from detected files (Dockerfile → Docker-based, vercel.json → Vercel, etc.) and note "Inferred from project files — confirm with `/prizmkit-plan` on next feature"
50
- 7. If existing deploy doc found:
51
+ - If `deploy_strategy` is absent → infer from detected files (Dockerfile → Docker-based, vercel.json → Vercel, etc.) and note "Inferred from project files"
52
+ 6. If existing deploy doc found:
51
53
  - Compare current project state against documented state
52
54
  - Identify gaps: new env vars not documented, new services not covered, outdated commands
53
55
  - Apply incremental updates — preserve user-written sections, only add/update auto-detectable content
54
56
  - Mark updated sections with `<!-- Updated by prizmkit-deploy -->` comment
55
57
 
56
58
  **Phase 3 — Validation:**
57
- 8. Verify completeness checklist:
59
+ 7. Verify completeness checklist:
58
60
  - [ ] All detected env vars are documented with descriptions
59
61
  - [ ] Local development setup commands are runnable (check referenced scripts/commands exist)
60
62
  - [ ] Build command documented and exists in package.json/Makefile
61
- - [ ] Production deployment steps match `deploy_strategy` in config
63
+ - [ ] Production deployment steps match `deploy_strategy` in config (if configured)
62
64
  - [ ] Health check or verification step is included
63
- 9. If any checklist item fails, add a `## TODO` section at the bottom listing what needs manual completion
64
- 10. Output: `DEPLOY.md` path, summary of sections generated/updated, list of TODOs if any
65
+ 8. If any checklist item fails, add a `## TODO` section at the bottom listing what needs manual completion
66
+ 9. If interactive session is available show summary and ask if user wants to review before finishing
67
+ 10. Output: `.prizmkit/deploy.md` path, summary of sections generated/updated, list of TODOs if any
65
68
 
66
- **HANDOFF:** `/prizmkit-committer` — commit all changes including the updated `DEPLOY.md`.
69
+ **HANDOFF:** `/prizmkit-committer` — commit changes including `.prizmkit/deploy.md`.
67
70
 
68
71
  ## Document Sections
69
72
 
70
- The generated `DEPLOY.md` includes these sections (skip any that don't apply to the project):
73
+ The generated deploy doc includes these sections (skip any that don't apply to the project):
71
74
 
72
75
  | Section | Content | Source |
73
76
  |---------|---------|--------|
@@ -84,7 +87,7 @@ The generated `DEPLOY.md` includes these sections (skip any that don't apply to
84
87
 
85
88
  ## Incremental Update Rules
86
89
 
87
- When updating an existing `DEPLOY.md`:
90
+ When updating an existing `.prizmkit/deploy.md`:
88
91
  - **NEVER delete** user-written content (sections without `<!-- Updated by prizmkit-deploy -->` markers)
89
92
  - **ADD** newly detected env vars to the Environment Variables table
90
93
  - **ADD** new services/components to Production Deployment
@@ -99,7 +102,7 @@ When updating an existing `DEPLOY.md`:
99
102
  - Project has `Dockerfile`, `docker-compose.yml`, `package.json` with build script
100
103
  - 12 env vars detected in source code, `.env.example` has 8
101
104
 
102
- **Output:** `DEPLOY.md` with all sections filled, plus TODO:
105
+ **Output:** `.prizmkit/deploy.md` with all sections filled, plus TODO:
103
106
  ```
104
107
  ## TODO
105
108
  - [ ] 4 environment variables found in code but missing from `.env.example`: `REDIS_URL`, `SMTP_HOST`, `SMTP_PORT`, `SENTRY_DSN`
@@ -1,5 +1,5 @@
1
1
  # Deployment Guide: [PROJECT_NAME]
2
- <!-- Replace [PROJECT_NAME] with: project_name from feature-list.json, or name from package.json, or the project root directory name (in that priority order) -->
2
+ <!-- Replace [PROJECT_NAME] with: name from package.json, or the project root directory name -->
3
3
 
4
4
  > Generated by PrizmKit Deploy
5
5
 
@@ -1,87 +1,55 @@
1
1
  ---
2
2
  name: "prizmkit-implement"
3
- description: "Execute plan.md tasks with TDD approach. Respects task ordering and dependencies. Use after /prizmkit-plan (or /prizmkit-analyze). Trigger on: 'implement', 'build', 'code it', 'start coding', 'execute', 'write the code'. (project)"
3
+ description: "Execute plan.md tasks with TDD approach. Respects task ordering and dependencies. Use after /prizmkit-plan. Trigger on: 'implement', 'build', 'code it', 'start coding', 'execute', 'write the code'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Implement
7
7
 
8
8
  ### When to Use
9
- - After `/prizmkit-plan` (or `/prizmkit-analyze`) when ready to write code
9
+ - After `/prizmkit-plan` when ready to write code
10
10
  - User says "implement", "build", "code it", "start coding", "develop"
11
11
  - For fast-path: user describes a simple change directly (fast-path skips specify, but still requires a simplified plan.md with Tasks section)
12
12
 
13
13
  **PRECONDITION:**
14
14
 
15
- | Mode | Required Artifact | Directory | Check | If Missing |
16
- |---|---|---|---|---|
17
- | **Feature** (default) | `plan.md` with Tasks section | `.prizmkit/specs/###-feature-name/` | File exists + unchecked tasks | Run `/prizmkit-plan` |
18
- | **Refactor** | `plan.md` with Tasks section | `.prizmkit/refactor/<refactor-slug>/` | File exists + unchecked tasks | Run `/prizmkit-plan` in refactor mode |
19
- | **Bugfix** | `plan.md` with Tasks section | `.prizmkit/bugfix/<BUG_ID>/` | File exists + unchecked tasks | Run `/prizmkit-plan` in bugfix mode |
20
-
21
- **Auto-detect**: If the calling workflow passes an explicit artifact directory, use that. Otherwise scan `.prizmkit/` subdirectories for the most recently modified `plan.md` with unchecked tasks.
22
-
23
- ## Execution Steps
24
-
25
- 1. **Detect mode and read context**:
26
- - Locate `plan.md` (check the artifact directory passed by the calling workflow, or auto-detect per PRECONDITION above)
27
- - Read `plan.md` (including Tasks section)
28
- - Read the companion input document for full context:
29
- - **Feature mode**: read `spec.md` in the same directory
30
- - **Refactor mode**: read `refactor-analysis.md` in the same directory — pay special attention to Scope Boundary (do not implement changes outside scope) and Baseline Tests (all must still pass)
31
- - **Bugfix mode**: read `fix-plan.md` in the same directory
32
- 2. Load project context use the most efficient source available (check in this order):
33
- - If `context-snapshot.md` exists in the feature directory read it. Section 3 has Prizm docs + TRAPS. Section 4 has File Manifest (Tier-2/3) or full source (Tier-1). Read source files on-demand as directed by the manifest.
34
- - Else if `session-summary.md` exists in the feature directory → read it for quick context recovery (completed tasks, key decisions, active TRAPS). Then load only the L1/L2 docs for modules listed in "Files Changed" — skip unrelated modules.
35
- - Otherwise **self-service context fallback**:
36
- 1. Read **architecture index**: `.prizm-docs/root.prizm` and relevant L1/L2 for affected modules. Pay special attention to TRAPS and DECISIONS.
37
- 2. Scan needed source files
38
- 3. Check if checkpoint tasks are complete before proceeding to next phase
39
- 4. For each unchecked task in order:
40
- a. If task has `[P]` marker, it can run in parallel with other `[P]` tasks in the same group
41
- b. Read L2 doc for target file's module. TRAPS save you from repeating known mistakes.
42
- - If L2 exists: check TRAPS and DECISIONS before modifying files.
43
- - If L2 does not exist and this task creates a new module directory or adds significant source files: create L2 using the L2 GENERATION TEMPLATE (see PRIZM-SPEC). Seed KEY_FILES and DEPENDENCIES from the files being created. TRAPS and DECISIONS can be minimal initially `/prizmkit-retrospective` will enrich them.
44
- - Judgment call: not every directory needs L2. Create L2 when the module has meaningful logic, non-obvious coupling, or design decisions worth preserving. Skip for trivial wrapper directories or single-config modules.
45
- c. Apply TDD where applicable: write a failing test first, then implement until it passes. For UI components or configuration changes where unit tests don't apply, skip the test-first step.
46
- d. Mark task as `[x]` in `plan.md` Tasks section immediately — not batched at the end. Immediate marking means the plan always reflects true progress, even if the session is interrupted.
47
- e. After all tasks, append '## Implementation Log' to `context-snapshot.md` (if running in pipeline context): files changed/created, key decisions, notable discoveries.
48
- f. Error handling: sequential tasks stop on failure (later tasks may depend on this one). Parallel `[P]` tasks continue — report all failures at the end.
49
- 5. At each checkpoint: verify build passes and tests pass. Checkpoints catch integration errors early — skipping them means cascading failures in later phases that are much harder to debug.
50
- 6. After all tasks: run full test suite
51
- 7. **Deploy guide update** — only when dependency manifests (package.json, requirements.txt, etc.) changed during this task.
52
- → Read `${SKILL_DIR}/references/deploy-guide-protocol.md` and follow its protocol.
53
- 8. Output implementation summary with pass/fail status
54
-
55
- ## Task Format in plan.md
56
-
57
- Tasks in plan.md look like this:
58
- ```markdown
59
- ## Tasks
60
-
61
- ### Phase 1: Data Layer
62
- - [ ] Create User model with avatar field in src/models/user.ts
63
- - [ ] Add S3 upload utility in src/lib/s3.ts
64
- - [x] ~~Set up database migration~~ (already done)
65
-
66
- ### Phase 2: API [P]
67
- - [ ] [P] POST /api/avatar endpoint in src/routes/avatar.ts
68
- - [ ] [P] DELETE /api/avatar endpoint in src/routes/avatar.ts
69
-
70
- ### Phase 3: UI
71
- - [ ] Avatar upload component in src/components/AvatarUpload.tsx
72
- - [ ] CP: Integration checkpoint — full test suite must pass
73
- ```
74
-
75
- - `[ ]` / `[x]` — unchecked / completed
76
- - `[P]` — can run in parallel with other `[P]` tasks in the same phase
77
- - `CP:` — checkpoint where build + tests must pass before continuing
15
+ | Required Artifact | Check | If Missing |
16
+ |---|---|---|
17
+ | `plan.md` with Tasks section | File exists + unchecked tasks | Run `/prizmkit-plan` |
18
+ | `spec.md` | File exists in same directory as plan.md | Run `/prizmkit-plan` |
19
+
20
+ **Artifact directory**: Accept `artifact_dir` from caller. If not provided, scan `.prizmkit/` subdirectories for the most recently modified `plan.md` with unchecked tasks.
21
+
22
+ ## Input
23
+
24
+ | Parameter | Required | Description |
25
+ |-----------|----------|-------------|
26
+ | `artifact_dir` | No | Directory containing spec.md + plan.md. If omitted, auto-detect per precondition above. |
27
+
28
+ ## Context Loading
29
+
30
+ Before implementation, load context once:
31
+
32
+ 1. **Task context**: Read `plan.md` (including Tasks section) and `spec.md` from the artifact directory. If other companion documents exist in the directory (e.g., `refactor-analysis.md`), read them for additional context.
33
+ 2. **Architecture context**: Read `.prizm-docs/root.prizm` (L0 project overview, module index, tech stack, conventions) and relevant L1/L2 docs for affected modules. Pay special attention to TRAPS (known pitfalls) and DECISIONS (architectural choices).
34
+
35
+ > `.prizm-docs/` uses a 3-level hierarchy: L0 (`root.prizm`) is the project-wide index. L1 (e.g., `auth.prizm`) covers a module — its key files, interfaces, dependencies, traps, and decisions. L2 is for sub-modules with their own complexity. Implement reads these docs to avoid repeating known mistakes; `/prizmkit-retrospective` is responsible for updating them after implementation.
36
+
37
+ ## Execution
38
+
39
+ For each unchecked task in plan.md, in order:
40
+
41
+ 1. Read L1/L2 doc for the target file's module — check TRAPS and DECISIONS before modifying files
42
+ 2. Apply TDD where applicable: write a failing test first, then implement until it passes. For UI components or configuration changes where unit tests don't apply, skip the test-first step.
43
+ 3. Mark task as `[x]` in `plan.md` immediately after completion not batched at the end. Immediate marking means plan.md always reflects true progress, even if the session is interrupted.
44
+ 4. **Parallel tasks**: If task has `[P]` marker, it can run in parallel with other `[P]` tasks in the same group. Sequential tasks stop on failure (later tasks may depend on this one). Parallel `[P]` tasks continue report all failures at the end.
45
+ 5. **Checkpoint tasks** (`CP:` prefix in plan.md): When a checkpoint task is reached, verify build passes and tests pass before continuing. Checkpoints catch integration errors early skipping them means cascading failures in later phases.
46
+ 6. After all tasks complete: run full test suite.
78
47
 
79
48
  ## Recovery
80
49
 
81
50
  If a session is interrupted mid-implementation:
82
51
  - Completed tasks are already marked `[x]` in plan.md (because we mark immediately)
83
- - Resume by re-running `/prizmkit-implement` — it picks up from the first unchecked task
84
- - context-snapshot.md persists across sessions for consistent context
52
+ - Resume by re-running `/prizmkit-implement` — it picks up from the first unchecked `[ ]` task
85
53
 
86
54
  **HANDOFF:** `/prizmkit-code-review`
87
55
 
@@ -89,5 +57,4 @@ If a session is interrupted mid-implementation:
89
57
 
90
58
  - Code files created/modified as specified in plan.md Tasks section
91
59
  - `plan.md` Tasks section updated with completion markers `[x]`
92
- - `DEPLOY.md` created/updated (only when new frameworks/tools were added)
93
60
  - Implementation summary output to conversation
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: "prizmkit-init"
3
- description: "Project takeover and bootstrap. Scans any project, generates Prizm docs, configures hooks. Use this skill whenever a user opens a new project for the first time, says 'initialize', 'set up PrizmKit', 'take over this project', 'bootstrap', 'scan this codebase', 'init', or when .prizm-docs/ doesn't exist yet. Also use when PrizmKit was just installed via npx but not yet initialized. (project)"
3
+ description: "Project takeover and bootstrap. Scans any project, generates Prizm docs and project brief. Use this skill whenever a user opens a new project for the first time, says 'initialize', 'set up PrizmKit', 'take over this project', 'bootstrap', 'scan this codebase', 'init', or when .prizm-docs/ doesn't exist yet. Also use when PrizmKit was just installed via npx but not yet initialized. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Init
7
7
 
8
- Project takeover and bootstrap skill. Scans any project (brownfield or greenfield), generates Prizm documentation, and configures platform-specific hooks for documentation sync. Supports CodeBuddy, Claude Code, and dual-platform installations.
8
+ Project takeover and bootstrap skill. Scans any project (brownfield or greenfield), generates Prizm documentation and project brief. Supports CodeBuddy, Claude Code, and dual-platform installations.
9
9
 
10
10
  ### When to Use
11
11
  - Taking over a new project (brownfield or greenfield)
@@ -14,35 +14,58 @@ Project takeover and bootstrap skill. Scans any project (brownfield or greenfiel
14
14
  - After `npx prizmkit install` when project has no `.prizm-docs/`
15
15
 
16
16
  ### When NOT to Use
17
- - `.prizm-docs/` already exists and is up to date → use `/prizmkit-prizm-docs` (Update) instead
18
- - User just wants to update stale docs → use `/prizmkit-prizm-docs` (Update or Rebuild)
19
- - User wants to start a feature → skip init if already initialized, go to `/prizmkit-plan`
17
+ - All artifacts exist and are up to date → use `/prizmkit-prizm-docs` (Update) instead if you only want to resync docs
18
+ - User just wants to update stale docs → use `/prizmkit-prizm-docs` (Update or Rebuild) instead (faster, targeted)
19
+ - User wants to start a feature on an already-initialized project → skip init, go to `/prizmkit-plan`
20
20
 
21
21
  ### Error Handling
22
- - If `.prizm-docs/` already exists: ask user if they want to reinitialize (overwrites) or update (preserves)
22
+ - If artifacts already exist: idempotent status check offers regenerate/skip choices (see Phase 3: Idempotent Status Check)
23
23
  - If no source files found in any directory: fall back to greenfield mode
24
- - If platform cannot be detected: ask user explicitly which platform(s) to configure
25
24
 
26
25
  ## Execution Steps
27
26
 
28
- **PLATFORM DETECTION (before anything else):**
29
- 1. Check for platform indicators in the current environment:
30
- - CodeBuddy: `.codebuddy/` directory exists, or running inside `cbc` session
31
- - Claude Code: `.claude/` directory exists, or running inside `claude` session
32
- - Both: Both directories exist
33
- - Unknown: Neither exists — ask the user which platform(s) to configure
34
- 2. Store detected platform in `.prizmkit/config.json` as `"platform": "codebuddy" | "claude" | "both"`
35
-
36
- MODE DETECTION:
37
- - If `.prizm-docs/` exists: Ask user if they want to reinitialize or update
38
- - **Reinitialize**: overwrites `.prizm-docs/` and `config.json` tech_stack (fresh start)
39
- - **Update**: re-scans tech stack and merges changes into existing `config.json` (see Step 3b merge strategy); updates `root.prizm` TECH_STACK if changed; preserves existing `.prizm-docs/` L1/L2 docs; checks for missing L1/L2 docs and creates them for modules with source files (see Update Supplement below)
27
+ **Phase 1: Platform Detection**
28
+ 1. Detect which platform is running (CodeBuddy or Claude Code) via AI CLI environment.
29
+ 2. Hold detected platform value in memory written to disk in Phase 6 along with other config fields.
30
+
31
+ **Phase 2: Mode Detection**
40
32
  - If project has source code: brownfield mode
41
33
  - If project is nearly empty: greenfield mode
42
34
 
35
+ **Phase 3: Idempotent Status Check**
36
+
37
+ Scan all init artifacts and display their status:
38
+
39
+ | Artifact | Path | Check |
40
+ |----------|------|-------|
41
+ | Prizm docs | `.prizm-docs/` | Directory exists + `root.prizm` present |
42
+ | Runtime config | `.prizmkit/config.json` | File exists |
43
+ | Project brief | `.prizmkit/plans/project-brief.md` | File exists |
44
+
45
+ Display status table to user:
46
+ ```
47
+ Init Status Check:
48
+ [exists] .prizm-docs/ (N files)
49
+ [exists] .prizmkit/config.json
50
+ [missing] .prizmkit/plans/project-brief.md
51
+ ```
52
+
53
+ - **If all missing**: skip interaction, proceed to generate everything.
54
+ - **If some exist**: ask user once:
55
+ - **[A] Regenerate all** — overwrite all existing artifacts (fresh start)
56
+ - **[B] Only generate missing** — skip existing, fill gaps (default)
57
+ - **[C] Pick per item** — ask for each existing artifact: regenerate or skip
58
+
59
+ Each subsequent phase checks its artifact's action before executing:
60
+ - `action == skip` → output "Skipped (exists)" and move on
61
+ - `action == generate | regenerate` → run normally
62
+ - **Special case for `.prizm-docs/`**:
63
+ - `skip` = **Update** mode: preserve existing L1/L2 docs, re-scan tech stack, merge changes, check for missing docs (see `${SKILL_DIR}/references/update-supplement.md`)
64
+ - `regenerate` = **Reinitialize**: overwrite everything
65
+
43
66
  BROWNFIELD WORKFLOW (existing project):
44
67
 
45
- **Step 1: Project Scanning**
68
+ **Phase 4: Project Scanning**
46
69
  1. Detect tech stack from build files (`package.json`, `requirements.txt`, `go.mod`, `pom.xml`, `Cargo.toml`, etc.)
47
70
  2. Map directory structure using a TWO-TIER model — flat structures lose the nesting relationships that AI needs to navigate the codebase:
48
71
  - TOP-LEVEL modules: directories directly under project root that contain source files or sub-directories with source files (e.g. `src/`, `internal/`, `lib/`)
@@ -68,8 +91,8 @@ BROWNFIELD WORKFLOW (existing project):
68
91
 
69
92
  **IMPORTANT**: Not all projects have all fields. A pure backend API will have no `frontend_framework` or `frontend_styling`. A library may have no database. Only record what is actually detected — never generate empty or placeholder values.
70
93
 
71
- **Step 2: Prizm Documentation Generation**
72
- Invoke prizmkit-prizm-docs (Init operation), passing the two-tier module structure from Step 1:
94
+ **Phase 5: Prizm Documentation Generation**
95
+ Invoke prizmkit-prizm-docs (Init operation), passing the two-tier module structure from Phase 4:
73
96
  - Create `.prizm-docs/` directory structure mirroring the source tree (sub-module dirs become subdirectories under `.prizm-docs/<top-level>/`)
74
97
  - Generate `root.prizm` (L0) with project meta and MODULE_INDEX listing only top-level modules. If module count > 15, use MODULE_GROUPS format instead (group by functional domain).
75
98
  - For each module entry in MODULE_INDEX/MODULE_GROUPS, include keyword tags extracted from the module's source files — scan for: exported symbols, imported packages, domain terms in file/directory names. Format: `- module-name [tag1, tag2, tag3]: ...`. Tags help AI match user intent to relevant modules.
@@ -77,25 +100,53 @@ Invoke prizmkit-prizm-docs (Init operation), passing the two-tier module structu
77
100
  - Create `changelog.prizm`
78
101
  - Skip L2 (lazy generation) — L2 is generated on first file modification, saving tokens upfront
79
102
 
80
- **Step 3: PrizmKit Workspace Initialization**
81
- 3a. Create `.prizmkit/` directory:
103
+ **Phase 6: Workspace Initialization**
104
+ 6a. Create `.prizmkit/` directory structure (if missing):
82
105
  - `.prizmkit/config.json` (adoption_mode, speckit_hooks_enabled, platform)
83
106
  - `.prizmkit/specs/` (empty)
107
+ - `.prizmkit/plans/` (empty — needed by Phase 7 and future pipeline tasks)
84
108
 
85
- 3b. Write detected tech stack to `.prizmkit/config.json`:
109
+ 6b. Write detected tech stack to `.prizmkit/config.json`:
86
110
  → Read `${SKILL_DIR}/references/config-schema.md` for merge strategy, field definitions, and examples.
87
111
 
88
- **Step 4: Hook & Settings Configuration**
89
-
90
- 4a. Read or create platform settings file (`.codebuddy/settings.json` or `.claude/settings.json`)
91
- 4b. Add UserPromptSubmit and PostToolUse hooks for automatic prizm-docs reminders
92
- 4c. For Claude Code: also add `permissions` entries and `.claude/rules/` for documentation enforcement:
93
- - `.claude/rules/prizm-documentation.md` (glob-scoped source file rules)
94
- - `.claude/rules/prizm-commit-workflow.md` (commit workflow enforcement)
95
- 4d. Preserve any existing hooks and settings — never overwrite user's custom configuration
96
-
97
- **Step 5: Report**
98
- Output summary: platform detected, tech stack detected (with detail), modules discovered, L1 docs generated, platform-specific configuration applied, next recommended steps.
112
+ **Phase 7: Project Brief Generation**
113
+
114
+ If action for project brief == skip, output "Project brief: skipped (exists)" and proceed to Phase 8 (Report).
115
+
116
+ Otherwise, generate a project brief to capture the user's overall product vision. This file is referenced by `root.prizm` so every new AI session understands the project goals.
117
+
118
+ Read `${SKILL_DIR}/assets/project-brief-template.md` for the brief format rules and checklist template.
119
+
120
+ **Brownfield** (existing codebase):
121
+ 1. Infer project goals from:
122
+ - Generated `root.prizm` (tech stack, module structure, module groups)
123
+ - `README.md` (if exists)
124
+ - Package metadata (`package.json` description, `pyproject.toml`, etc.)
125
+ - Quick scan of key entry points identified in L1 docs
126
+ 2. Generate a draft in the checklist format defined in the template
127
+ 3. Present the draft to the user and ask:
128
+ - Is this inference correct?
129
+ - Anything to add, remove, or modify?
130
+ 4. Apply user edits and write to `.prizmkit/plans/project-brief.md`
131
+
132
+ **Greenfield** (new/empty project):
133
+ 1. Use **progressive questioning** (defined in template) to fully understand the user's intent:
134
+ - Round 1: Problem & Vision → Round 2: Scope & Features → Round 3: Technical Constraints → Round 4: Clarification (adaptive)
135
+ - Stop when completion criteria are met: problem, users, core features, boundaries, and technical direction are all clear
136
+ - If answers are vague, probe deeper — don't accept shallow responses
137
+ 2. Generate brief from answers in checklist format
138
+ 3. Present to user for confirmation/editing
139
+ 4. Write to `.prizmkit/plans/project-brief.md`
140
+
141
+ **After writing the brief**:
142
+ - Check if `root.prizm` already contains a `PROJECT_BRIEF:` line
143
+ - If exact match `PROJECT_BRIEF: .prizmkit/plans/project-brief.md` exists: skip (already correct)
144
+ - If `PROJECT_BRIEF:` exists with a different path: warn user and ask to confirm update or keep old path
145
+ - If not present: add `PROJECT_BRIEF: .prizmkit/plans/project-brief.md` at the end of `root.prizm`, after all standard sections
146
+ - This ensures every AI session that loads L0 knows to read the project brief
147
+
148
+ **Phase 8: Report**
149
+ Output summary: platform detected, tech stack detected (with detail), modules discovered, L1 docs generated, project brief status, next recommended steps.
99
150
 
100
151
  Tech stack report format (only show detected fields, adapt to project type):
101
152
  ```
@@ -114,37 +165,16 @@ Adapt fields to match project type — only show detected fields.
114
165
 
115
166
  Saved to: `.prizmkit/config.json` → `tech_stack` field
116
167
 
117
- Include platform-specific guidance:
118
- - CodeBuddy: "Use `/prizmkit-plan` to start your first feature"
119
- - Claude Code: "Use `/prizmkit-plan` to start your first feature"
168
+ Next step: "Use `/prizmkit-plan` to start your first feature"
120
169
 
121
170
  GREENFIELD WORKFLOW (new project):
122
- - Skip Step 1 (no code to scan) — but ask the user about their intended tech stack:
171
+ - Skip Phase 4 (no code to scan) — but ask the user about their intended tech stack:
123
172
  - "What language/framework will you use?" (e.g. React + Node.js, Python + FastAPI, etc.)
124
173
  - Record answers in `config.json` `tech_stack` with `"_auto_detected": false` (user-provided, not auto-detected)
125
174
  - If user is unsure, skip tech_stack — it can be populated later on re-init after code exists
126
- - Step 2: Create minimal `.prizm-docs/` with just `root.prizm` skeleton (populate TECH_STACK from user answers if provided)
127
- - Steps 3-5: Same as brownfield (Step 5 Report recommends starting with specify for first feature)
128
-
129
- ### Gradual Adoption Path
130
- After init, PrizmKit operates in phases:
131
- - **Passive** (default): Generates docs, doesn't enforce workflow
132
- - **Advisory**: Suggests improvements, flags issues (enable in config)
133
- - **Active**: Enforces spec-driven workflow for new features (enable in config)
134
-
135
- User can change mode in `.prizmkit/config.json`: `"adoption_mode": "passive" | "advisory" | "active"`
136
-
137
- ### Platform Reference
138
-
139
- | Concept | CodeBuddy | Claude Code |
140
- |---------|-----------|-------------|
141
- | Command invocation | `/prizmkit-xxx` | `/prizmkit-xxx` |
142
- | Project knowledge | `.prizm-docs/` | `.prizm-docs/` |
143
- | Settings | `.codebuddy/settings.json` | `.claude/settings.json` |
144
- | Skills/Commands | `.codebuddy/skills/` | `.claude/commands/` |
145
- | Agents | `.codebuddy/agents/` | `.claude/agents/` |
146
- | Rules | hooks in settings.json | `.claude/rules/*.md` |
147
- | CLI command | `cbc` | `claude` |
175
+ - Phase 5: Create minimal `.prizm-docs/` with just `root.prizm` skeleton (populate TECH_STACK from user answers if provided)
176
+ - Phase 7: Generate project brief (greenfield flow ask user about project goals, see Phase 7 above)
177
+ - Phases 6, 8: Same as brownfield (Phase 8 Report recommends `/prizmkit-plan` for first feature)
148
178
 
149
179
  ## Example
150
180
 
@@ -153,6 +183,12 @@ User can change mode in `.prizmkit/config.json`: `"adoption_mode": "passive" | "
153
183
  $ /prizmkit-init
154
184
 
155
185
  Platform detected: Claude Code
186
+ Init Status Check:
187
+ [missing] .prizm-docs/
188
+ [missing] .prizmkit/config.json
189
+ [missing] .prizmkit/plans/project-brief.md
190
+ → All missing, generating everything.
191
+
156
192
  Mode: Brownfield (154 source files found)
157
193
 
158
194
  Tech stack detected:
@@ -171,8 +207,10 @@ Modules discovered:
171
207
  src/services/ → .prizm-docs/services.prizm (15 files)
172
208
  src/middleware/ → .prizm-docs/middleware.prizm (5 files)
173
209
 
210
+ Project brief: inferred from codebase → confirmed by user
211
+ → .prizmkit/plans/project-brief.md
212
+
174
213
  Generated: root.prizm + 4 L1 docs + changelog.prizm
175
- Configured: .claude/rules/ (2 files), hooks in settings.json
176
214
  Saved: .prizmkit/config.json (tech_stack recorded)
177
215
 
178
216
  Next: Use /prizmkit-plan to start your first feature
@@ -185,8 +223,14 @@ UPDATE SUPPLEMENT (runs after tech stack merge in Update mode):
185
223
  ```
186
224
  $ /prizmkit-init
187
225
 
188
- .prizm-docs/ already exists. Reinitialize or update?
189
- > Update (preserve existing docs)
226
+ Init Status Check:
227
+ [exists] .prizm-docs/ (12 files)
228
+ [exists] .prizmkit/config.json
229
+ [missing] .prizmkit/plans/project-brief.md
230
+
231
+ Missing items will be generated.
232
+ For existing items: [A] Regenerate all [B] Only generate missing (default) [C] Pick per item
233
+ > B (Only generate missing)
190
234
 
191
235
  Tech stack changes detected:
192
236
  + bundler: Vite (newly detected)
@@ -199,5 +243,8 @@ Documentation gap-fill:
199
243
  = routes.prizm (L1) — up to date
200
244
  ~ models.prizm (L1) — FILES count updated (8 → 10)
201
245
 
246
+ Project brief: inferred from codebase → confirmed by user
247
+ → .prizmkit/plans/project-brief.md (generated)
248
+
202
249
  Merged into .prizmkit/config.json (2 fields updated, user overrides preserved)
203
250
  ```
@@ -0,0 +1,82 @@
1
+ # Project Brief Template
2
+
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
+
5
+ ## File Location
6
+
7
+ `.prizmkit/plans/project-brief.md`
8
+
9
+ ## Format
10
+
11
+ ```markdown
12
+ # Project Brief
13
+
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
18
+ ```
19
+
20
+ ## Rules
21
+
22
+ 1. **First line**: `# Project Brief`
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`
82
+