prizmkit 1.1.57 → 1.1.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create-prizmkit.js +8 -6
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/codex/agent-adapter.js +38 -0
- package/bundled/adapters/codex/paths.js +27 -0
- package/bundled/adapters/codex/rules-adapter.js +30 -0
- package/bundled/adapters/codex/settings-adapter.js +27 -0
- package/bundled/adapters/codex/skill-adapter.js +65 -0
- package/bundled/adapters/codex/team-adapter.js +37 -0
- package/bundled/dev-pipeline/.env.example +2 -1
- package/bundled/dev-pipeline/README.md +10 -7
- package/bundled/dev-pipeline/lib/common.sh +278 -37
- package/bundled/dev-pipeline/run-bugfix.sh +10 -61
- package/bundled/dev-pipeline/run-feature.sh +10 -78
- package/bundled/dev-pipeline/run-recovery.sh +10 -46
- package/bundled/dev-pipeline/run-refactor.sh +10 -61
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +17 -7
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -3
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +9 -3
- package/bundled/dev-pipeline/scripts/utils.py +6 -4
- package/bundled/dev-pipeline-windows/.env.example +28 -0
- package/bundled/dev-pipeline-windows/README.md +30 -0
- package/bundled/dev-pipeline-windows/SCHEMA_ANALYSIS.md +525 -0
- package/bundled/dev-pipeline-windows/assets/feature-list-example.json +146 -0
- package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +138 -0
- package/bundled/dev-pipeline-windows/launch-bugfix-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/launch-feature-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/launch-refactor-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/lib/common.ps1 +432 -0
- package/bundled/dev-pipeline-windows/lib/daemon.ps1 +140 -0
- package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +446 -0
- package/bundled/dev-pipeline-windows/lib/reset.ps1 +87 -0
- package/bundled/dev-pipeline-windows/reset-bug.ps1 +9 -0
- package/bundled/dev-pipeline-windows/reset-feature.ps1 +9 -0
- package/bundled/dev-pipeline-windows/reset-refactor.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-bugfix.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-feature.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-recovery.ps1 +76 -0
- package/bundled/dev-pipeline-windows/run-refactor.ps1 +9 -0
- package/bundled/dev-pipeline-windows/scripts/check-session-status.py +228 -0
- package/bundled/dev-pipeline-windows/scripts/cleanup-logs.py +192 -0
- package/bundled/dev-pipeline-windows/scripts/detect-stuck.py +530 -0
- package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +1737 -0
- package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +685 -0
- package/bundled/dev-pipeline-windows/scripts/generate-recovery-prompt.py +805 -0
- package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +763 -0
- package/bundled/dev-pipeline-windows/scripts/init-bugfix-pipeline.py +316 -0
- package/bundled/dev-pipeline-windows/scripts/init-dev-team.py +134 -0
- package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +380 -0
- package/bundled/dev-pipeline-windows/scripts/init-refactor-pipeline.py +399 -0
- package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +388 -0
- package/bundled/dev-pipeline-windows/scripts/patch-completion-notes.py +191 -0
- package/bundled/dev-pipeline-windows/scripts/update-bug-status.py +864 -0
- package/bundled/dev-pipeline-windows/scripts/update-checkpoint.py +173 -0
- package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +1501 -0
- package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +1073 -0
- package/bundled/dev-pipeline-windows/scripts/utils.py +542 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/critic-plan-challenge.md +7 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-fix.md +7 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +30 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-resume.md +5 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +7 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +46 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bug-fix-list-schema.json +263 -0
- package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +320 -0
- package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +237 -0
- package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +331 -0
- package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +270 -0
- package/bundled/dev-pipeline-windows/templates/sections/ac-verification-checklist.md +13 -0
- package/bundled/dev-pipeline-windows/templates/sections/checkpoint-system.md +91 -0
- package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +33 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-agent.md +10 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-full.md +12 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-lite.md +7 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-agent.md +8 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-full.md +9 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-lite.md +6 -0
- package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +21 -0
- package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +31 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +72 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +63 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +62 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +71 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +64 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +23 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +24 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +12 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +53 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +32 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +37 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +50 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +52 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +29 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +77 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase0-init.md +13 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +23 -0
- package/bundled/dev-pipeline-windows/templates/sections/session-context.md +5 -0
- package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +6 -0
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-agent.md +67 -0
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-lite.md +58 -0
- package/bundled/dev-pipeline-windows/templates/session-status-schema.json +83 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +26 -18
- package/bundled/skills/app-planner/references/architecture-decisions.md +9 -5
- package/bundled/skills/app-planner/references/frontend-design-guide.md +1 -1
- package/bundled/skills/feature-planner/SKILL.md +9 -2
- package/bundled/skills/prizmkit-init/SKILL.md +7 -6
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +2 -0
- package/bundled/skills-windows/app-planner/SKILL.md +639 -0
- package/bundled/skills-windows/app-planner/assets/app-design-guide.md +101 -0
- package/bundled/skills-windows/app-planner/references/architecture-decisions.md +52 -0
- package/bundled/skills-windows/app-planner/references/brainstorm-guide.md +101 -0
- package/bundled/skills-windows/app-planner/references/frontend-design-guide.md +71 -0
- package/bundled/skills-windows/app-planner/references/project-brief-guide.md +82 -0
- package/bundled/skills-windows/app-planner/references/red-team-checklist.md +40 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +609 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/fixed-rules.md +285 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/question-bank.md +249 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/template.md +173 -0
- package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +373 -0
- package/bundled/skills-windows/app-planner/references/rules/database/fixed-rules.md +211 -0
- package/bundled/skills-windows/app-planner/references/rules/database/question-bank.md +184 -0
- package/bundled/skills-windows/app-planner/references/rules/database/template.md +158 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +810 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/fixed-rules.md +188 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +302 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +320 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +639 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/fixed-rules.md +290 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/question-bank.md +232 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/template.md +175 -0
- package/bundled/skills-windows/bug-fix-workflow/SKILL.md +415 -0
- package/bundled/skills-windows/bug-planner/SKILL.md +395 -0
- package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +43 -0
- package/bundled/skills-windows/bug-planner/references/critic-and-verification.md +44 -0
- package/bundled/skills-windows/bug-planner/references/error-recovery.md +73 -0
- package/bundled/skills-windows/bug-planner/references/input-formats.md +53 -0
- package/bundled/skills-windows/bug-planner/references/schema-validation.md +25 -0
- package/bundled/skills-windows/bug-planner/references/severity-rules.md +16 -0
- package/bundled/skills-windows/bug-planner/scripts/validate-bug-list.py +322 -0
- package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +380 -0
- package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +441 -0
- package/bundled/skills-windows/feature-pipeline-launcher/scripts/preflight-check.py +462 -0
- package/bundled/skills-windows/feature-planner/SKILL.md +401 -0
- package/bundled/skills-windows/feature-planner/assets/evaluation-guide.md +64 -0
- package/bundled/skills-windows/feature-planner/assets/planning-guide.md +214 -0
- package/bundled/skills-windows/feature-planner/references/browser-interaction.md +59 -0
- package/bundled/skills-windows/feature-planner/references/completeness-review.md +57 -0
- package/bundled/skills-windows/feature-planner/references/decomposition-patterns.md +75 -0
- package/bundled/skills-windows/feature-planner/references/error-recovery.md +90 -0
- package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +112 -0
- package/bundled/skills-windows/feature-planner/references/new-project-planning.md +85 -0
- package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +1029 -0
- package/bundled/skills-windows/feature-workflow/SKILL.md +531 -0
- package/bundled/skills-windows/prizmkit-init/SKILL.md +356 -0
- package/bundled/skills-windows/prizmkit-init/assets/project-brief-template.md +82 -0
- package/bundled/skills-windows/prizmkit-init/references/config-schema.md +68 -0
- package/bundled/skills-windows/prizmkit-init/references/rules/layer-detection.md +41 -0
- package/bundled/skills-windows/prizmkit-init/references/tech-stack-catalog.md +13 -0
- package/bundled/skills-windows/prizmkit-init/references/update-supplement.md +9 -0
- package/bundled/skills-windows/recovery-workflow/SKILL.md +456 -0
- package/bundled/skills-windows/recovery-workflow/evals/evals.json +46 -0
- package/bundled/skills-windows/recovery-workflow/scripts/detect-recovery-state.py +544 -0
- package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +406 -0
- package/bundled/skills-windows/refactor-planner/SKILL.md +540 -0
- package/bundled/skills-windows/refactor-planner/assets/planning-guide.md +292 -0
- package/bundled/skills-windows/refactor-planner/references/behavior-preservation.md +301 -0
- package/bundled/skills-windows/refactor-planner/references/refactor-scoping-guide.md +221 -0
- package/bundled/skills-windows/refactor-planner/scripts/validate-and-generate-refactor.py +858 -0
- package/bundled/skills-windows/refactor-workflow/SKILL.md +503 -0
- package/package.json +3 -2
- package/src/clean.js +73 -2
- package/src/config.js +159 -50
- package/src/detect-platform.js +16 -8
- package/src/external-skills.js +26 -19
- package/src/index.js +31 -9
- package/src/manifest.js +6 -2
- package/src/metadata.js +43 -5
- package/src/platforms.js +36 -0
- package/src/prompts.js +31 -6
- package/src/runtimes.js +20 -0
- package/src/scaffold.js +314 -110
- package/src/upgrade.js +81 -41
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Feature Planning Reference Guide
|
|
2
|
+
|
|
3
|
+
This guide provides structured templates and patterns for writing high-quality feature descriptions, acceptance criteria, complexity estimates, dependency graphs, and session granularity decisions. Use during feature-planner sessions.
|
|
4
|
+
|
|
5
|
+
For app-level design references (vision templates, tech stack matrix), see `app-planner/assets/app-design-guide.md`. For feature decomposition patterns (CRUD, SaaS, Social, E-commerce), see `${SKILL_DIR}/references/decomposition-patterns.md`.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Feature Description Writing Guide
|
|
10
|
+
|
|
11
|
+
Feature descriptions are the **primary input** for autonomous pipeline sessions. A thin description forces the AI to guess — producing worse code. Invest in rich descriptions upfront.
|
|
12
|
+
|
|
13
|
+
### Minimum Word Counts
|
|
14
|
+
|
|
15
|
+
| Complexity | Hard Minimum (error) | Recommended Minimum (warning below) |
|
|
16
|
+
|------------|---------------------|-------------------------------------|
|
|
17
|
+
| low | 15 | 30+ |
|
|
18
|
+
| medium | 15 | 50+ |
|
|
19
|
+
| high | 15 | 80+ |
|
|
20
|
+
| critical | 15 | 100+ |
|
|
21
|
+
|
|
22
|
+
Below 15 words is a validation error. Below the recommended minimum triggers a warning.
|
|
23
|
+
|
|
24
|
+
**There is NO upper limit** — the more detail the better. Rich descriptions prevent the AI from guessing, producing higher quality code. Always aim to describe the feature as thoroughly as possible: what to build, how it should behave, what data it touches, and what edge cases to handle.
|
|
25
|
+
|
|
26
|
+
### What to Include
|
|
27
|
+
|
|
28
|
+
Every description should cover these aspects (adapt per feature type):
|
|
29
|
+
|
|
30
|
+
1. **What to build** — concrete deliverables (API endpoints, UI pages/components, CLI commands, data models)
|
|
31
|
+
2. **Key behaviors** — business rules, validation, state transitions, workflows
|
|
32
|
+
3. **Integration points** — which existing modules, services, or APIs it connects to
|
|
33
|
+
4. **Data model** — entities, relationships, key fields, storage approach (when applicable)
|
|
34
|
+
5. **Error/edge cases** — failure modes, empty states, limits, unauthorized access
|
|
35
|
+
|
|
36
|
+
### Good vs Bad Examples
|
|
37
|
+
|
|
38
|
+
**Bad** (17 words — too thin):
|
|
39
|
+
```
|
|
40
|
+
"Build user authentication with login and registration. Support email/password and social login options."
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Good** (78 words — implementation-ready):
|
|
44
|
+
```
|
|
45
|
+
"Implement user authentication with email/password registration and login. Create a User model with fields: id, email (unique), password_hash, display_name, created_at, last_login. Build POST /api/auth/register (validate email format, enforce 8+ char password, check uniqueness, hash with bcrypt, return JWT), POST /api/auth/login (verify credentials, issue JWT with 7-day expiry), and GET /api/auth/me (return current user from JWT). Add auth middleware that validates JWT on protected routes. Handle errors: duplicate email (409), invalid credentials (401), expired token (401)."
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Bad** (12 words):
|
|
49
|
+
```
|
|
50
|
+
"Create the main dashboard page showing project overview and recent activity."
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Good** (65 words):
|
|
54
|
+
```
|
|
55
|
+
"Build a dashboard page at /dashboard as the post-login landing screen. Display: (1) summary cards showing total projects count, active tasks count, and recent activity count; (2) a recent activity feed listing the last 10 actions across all projects with timestamps; (3) a quick-access project list showing the 5 most recently updated projects. Fetch data via GET /api/dashboard/summary. Show loading skeleton on initial load, empty state when user has no projects."
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Headless Execution Requirements
|
|
59
|
+
|
|
60
|
+
Feature descriptions are consumed by **autonomous AI sessions running in headless mode** — no human is available to clarify ambiguities. This raises the bar for description quality:
|
|
61
|
+
|
|
62
|
+
**Must include for headless readiness:**
|
|
63
|
+
1. **Concrete deliverables** — specific files, endpoints, components, or models to create
|
|
64
|
+
2. **Integration points** — which existing APIs to call, which models to import, which modules to extend
|
|
65
|
+
3. **Key behaviors** — validation rules, state transitions, error codes, edge cases
|
|
66
|
+
|
|
67
|
+
**Dependency descriptions:**
|
|
68
|
+
When a feature depends on others, explicitly state what it needs from them:
|
|
69
|
+
- ✅ "Uses the User model (id, email, display_name) from F-001 to create a foreign key user_id on the Project model"
|
|
70
|
+
- ❌ "depends on F-001" — the AI won't know what F-001 built
|
|
71
|
+
|
|
72
|
+
**Self-test:** Read the description as if you have no other context. Could you implement it without asking a single question? If not, add more detail.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Acceptance Criteria Writing Guide
|
|
77
|
+
|
|
78
|
+
Acceptance criteria define what "done" means for a feature. They should be specific, testable, and unambiguous.
|
|
79
|
+
|
|
80
|
+
### Format: Given/When/Then
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Given [precondition/context]
|
|
84
|
+
When [action performed]
|
|
85
|
+
Then [expected outcome]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Examples by Feature Type
|
|
89
|
+
|
|
90
|
+
**Authentication:**
|
|
91
|
+
|
|
92
|
+
- Given a new user, When they submit a valid registration form, Then an account is created and a confirmation email is sent.
|
|
93
|
+
- Given a registered user, When they enter correct credentials, Then they are logged in and redirected to the dashboard.
|
|
94
|
+
- Given a logged-in user, When their session expires, Then they are redirected to the login page with a message.
|
|
95
|
+
|
|
96
|
+
**CRUD Operations:**
|
|
97
|
+
|
|
98
|
+
- Given an authenticated user, When they create a new [entity] with valid data, Then the entity is saved and appears in the list.
|
|
99
|
+
- Given an entity list, When the user applies filters, Then only matching entities are displayed.
|
|
100
|
+
- Given an entity owner, When they delete the entity, Then it is removed after confirmation.
|
|
101
|
+
|
|
102
|
+
**Real-time:**
|
|
103
|
+
|
|
104
|
+
- Given two users viewing the same board, When one makes a change, Then the other sees it within 2 seconds without a page refresh.
|
|
105
|
+
- Given a user is offline, When they reconnect, Then missing updates are synced.
|
|
106
|
+
|
|
107
|
+
### Writing Principles
|
|
108
|
+
|
|
109
|
+
1. **One behavior per criterion.** Each criterion tests exactly one thing.
|
|
110
|
+
2. **No implementation details.** Criteria describe what, not how. Say "user is redirected" not "React Router navigates to /dashboard."
|
|
111
|
+
3. **Include edge cases.** Cover invalid input, unauthorized access, empty states, and error conditions.
|
|
112
|
+
4. **Be measurable.** Where performance matters, include specific thresholds (e.g., "within 2 seconds").
|
|
113
|
+
5. **Keep the count manageable.** A feature with more than 8 acceptance criteria may need to be split into sub-features.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Complexity Estimation Guide
|
|
118
|
+
|
|
119
|
+
| Complexity | Characteristics | Typical Scope | Pipeline Tier |
|
|
120
|
+
|------------|----------------|---------------|---------------|
|
|
121
|
+
| low | Single module, straightforward CRUD, minimal UI | 1-2 API endpoints, 1-2 pages | lite (1 agent) |
|
|
122
|
+
| medium | Multiple modules, business logic, moderate UI | 3-5 API endpoints, 2-4 pages | lite (1 agent) |
|
|
123
|
+
| high | Cross-cutting concerns, complex state, advanced UI | 5+ API endpoints, complex interactions | standard (3 agents) |
|
|
124
|
+
| critical | Architectural changes, 10+ files, multi-module API surface changes | System-wide refactoring, new infrastructure + app logic | full (5 agents + critic) |
|
|
125
|
+
|
|
126
|
+
### Complexity Red Flags
|
|
127
|
+
|
|
128
|
+
Consider splitting a feature if it exhibits any of the following:
|
|
129
|
+
|
|
130
|
+
- More than 8 acceptance criteria.
|
|
131
|
+
- Touches more than 3 distinct modules or layers.
|
|
132
|
+
- Requires both frontend and backend architectural decisions.
|
|
133
|
+
- Involves third-party service integration AND non-trivial business logic.
|
|
134
|
+
- Contains both real-time and batch processing requirements.
|
|
135
|
+
- Needs new infrastructure (e.g., message queue, search index) AND application logic.
|
|
136
|
+
|
|
137
|
+
### Estimation Consistency Rules
|
|
138
|
+
|
|
139
|
+
- If a feature is marked as "low" complexity, it should not have more than 5 acceptance criteria.
|
|
140
|
+
- If a feature is marked as "high" complexity, it should have a clear justification (e.g., "involves payment processing with webhook handling and idempotency").
|
|
141
|
+
- Use "critical" complexity only for features requiring architectural changes that touch 10+ files, involve cross-module API surface changes, or need multi-critic voting for safety.
|
|
142
|
+
- When in doubt, estimate higher -- it is better to over-allocate than to under-allocate.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Dependency Graph Rules
|
|
147
|
+
|
|
148
|
+
These rules ensure the feature dependency graph is valid and buildable.
|
|
149
|
+
|
|
150
|
+
1. **F-001 has zero dependencies.** The first feature is always infrastructure or project setup. It must be buildable from scratch with no preconditions.
|
|
151
|
+
|
|
152
|
+
2. **No circular dependencies.** Dependencies MUST form a directed acyclic graph (DAG). If A depends on B and B depends on A, restructure the features.
|
|
153
|
+
|
|
154
|
+
3. **Minimal dependency sets.** Each feature should depend only on the features it directly needs. Do not add transitive dependencies explicitly. If F-003 depends on F-002 and F-002 depends on F-001, then F-003 does NOT need to list F-001 as a dependency.
|
|
155
|
+
|
|
156
|
+
4. **Auth comes early.** Most features depend on authentication. Place auth-related features (registration, login, session management) as early in the graph as possible, typically F-002.
|
|
157
|
+
|
|
158
|
+
5. **Data model before display.** Features that create or define data entities must precede features that display, search, or manipulate that data.
|
|
159
|
+
|
|
160
|
+
6. **Infrastructure before everything.** Database setup, project scaffolding, CI/CD configuration, and environment setup belong in F-001.
|
|
161
|
+
|
|
162
|
+
7. **Independent features can be parallel.** If two features share no dependencies on each other, they can be built in parallel. The dependency graph should reflect this by not artificially linking them.
|
|
163
|
+
|
|
164
|
+
### Validation Checklist
|
|
165
|
+
|
|
166
|
+
- [ ] F-001 has an empty dependency list.
|
|
167
|
+
- [ ] No feature depends on itself.
|
|
168
|
+
- [ ] No circular dependency chains exist.
|
|
169
|
+
- [ ] Every feature ID referenced in a dependency list is defined in the plan.
|
|
170
|
+
- [ ] The graph can be topologically sorted (i.e., there exists a valid build order).
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Session Granularity Decision Rules
|
|
175
|
+
|
|
176
|
+
Session granularity determines whether a feature is implemented in a single coding session or split across multiple sub-feature sessions.
|
|
177
|
+
|
|
178
|
+
### Decision Table
|
|
179
|
+
|
|
180
|
+
| Condition | Granularity | Notes |
|
|
181
|
+
|-----------|-------------|-------|
|
|
182
|
+
| Acceptance criteria <= 5 | `feature` | Single session can handle it |
|
|
183
|
+
| Acceptance criteria 6-8 | `feature` or `auto` | Use judgment based on complexity |
|
|
184
|
+
| Acceptance criteria > 8 | `auto` | Define sub_features |
|
|
185
|
+
| Touches <= 2 modules | `feature` | Focused enough for one session |
|
|
186
|
+
| Touches 3+ modules | `auto` | Split by module boundary |
|
|
187
|
+
| Complexity "low" | `feature` | Always single session |
|
|
188
|
+
| Complexity "high" + many criteria | `auto` | Always consider splitting |
|
|
189
|
+
|
|
190
|
+
### Sub-Feature Naming Convention
|
|
191
|
+
|
|
192
|
+
When using `auto` granularity with sub-features, name each sub-feature with the parent feature ID as a prefix:
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
F-003-A: Backend API for [entity] CRUD
|
|
196
|
+
F-003-B: Frontend UI for [entity] management
|
|
197
|
+
F-003-C: Integration tests for [entity] workflows
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Sub-Feature Design Principles
|
|
201
|
+
|
|
202
|
+
1. **Independently testable.** Each sub-feature should produce a verifiable result on its own. A backend API sub-feature can be tested via API calls without the frontend.
|
|
203
|
+
|
|
204
|
+
2. **Single concern.** Each sub-feature focuses on one layer or aspect: backend API, frontend UI, data migration, integration, etc.
|
|
205
|
+
|
|
206
|
+
3. **Clear boundaries.** The interface between sub-features should be well-defined (e.g., API contracts between backend and frontend sub-features).
|
|
207
|
+
|
|
208
|
+
4. **Ordered when necessary.** Sub-features within a feature may have internal ordering (e.g., backend before frontend), but this should be captured in the sub-feature dependencies.
|
|
209
|
+
|
|
210
|
+
### When NOT to Split
|
|
211
|
+
|
|
212
|
+
- If the feature is inherently atomic (e.g., "add a favicon" or "configure environment variables").
|
|
213
|
+
- If splitting would create sub-features that are too small to justify a separate session (fewer than 2 acceptance criteria each).
|
|
214
|
+
- If the feature involves tightly coupled frontend and backend logic where splitting would require extensive mocking.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Browser Interaction Planning
|
|
2
|
+
|
|
3
|
+
For web apps with UI, features that involve user-facing pages or interactive flows can optionally include a `browser_interaction` field. This enables the dev-pipeline to verify UI behavior automatically after implementation using the configured browser tool (`playwright-cli` or `opencli`).
|
|
4
|
+
|
|
5
|
+
## Browser Tool Selection (Mandatory — Ask User)
|
|
6
|
+
|
|
7
|
+
Before auto-generating `browser_interaction` for features, you MUST ask the user which browser tool to use as the project default via `AskUserQuestion`:
|
|
8
|
+
|
|
9
|
+
**Question**: "Which browser verification tool should this project use by default?"
|
|
10
|
+
- **Auto — AI chooses per feature (Recommended)** — `playwright-cli` for local UI, `opencli` for authenticated flows. AI decides per-feature at planning time.
|
|
11
|
+
- **playwright-cli** — isolated browser instance, no login state. Best for local dev server, forms, components.
|
|
12
|
+
- **opencli** — reuses Chrome's logged-in sessions via Browser Bridge. Best for OAuth, third-party dashboards, SSO.
|
|
13
|
+
|
|
14
|
+
Store the user's choice as the project-level default. Individual features can still override (see Tool Selection per Feature below).
|
|
15
|
+
|
|
16
|
+
## How to Capture
|
|
17
|
+
|
|
18
|
+
During Phase 4.2, auto-generate `browser_interaction` for all qualifying features (see SKILL.md §Browser Interaction Planning for auto-detection rules). Present a **batch summary** to the user showing which features received `browser_interaction` — do NOT ask per-feature. The user can opt out specific features from the summary.
|
|
19
|
+
|
|
20
|
+
For each qualifying feature, generate the `browser_interaction` object:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"browser_interaction": {
|
|
25
|
+
"tool": "auto",
|
|
26
|
+
"verify_steps": [
|
|
27
|
+
"Verify login form renders with email and password fields",
|
|
28
|
+
"Verify valid credentials redirect to dashboard",
|
|
29
|
+
"Verify invalid password shows error message"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Field Rules
|
|
36
|
+
|
|
37
|
+
- `tool` selects the browser verification tool. Values: `"playwright-cli"`, `"opencli"`, `"auto"` (default).
|
|
38
|
+
- **`"auto"`** (default): AI chooses at runtime based on available tools and scenario. Recommended for most cases.
|
|
39
|
+
- **`"playwright-cli"`**: Isolated browser instance, no login state. Best for local dev server verification, form testing, component rendering checks.
|
|
40
|
+
- **`"opencli"`**: Reuses Chrome's logged-in sessions via Browser Bridge. Best for verifying third-party integrations (OAuth callbacks, API dashboards), features requiring real authentication state, or pages behind SSO.
|
|
41
|
+
|
|
42
|
+
| Scenario | Recommended `tool` |
|
|
43
|
+
|----------|-------------------|
|
|
44
|
+
| Local dev server, pure frontend components | `playwright-cli` |
|
|
45
|
+
| Needs real login state (e.g., OAuth redirect page) | `opencli` |
|
|
46
|
+
| Third-party API integration dashboard verification | `opencli` |
|
|
47
|
+
| Headless CI environment | `playwright-cli` |
|
|
48
|
+
| Unsure / mixed scenarios | `auto` |
|
|
49
|
+
|
|
50
|
+
- `verify_steps` are **verification goals**, not specific tool commands. Describe WHAT to verify, not HOW to verify it. The pipeline AI will:
|
|
51
|
+
1. Auto-detect the dev server start command from project config (`package.json`, `Makefile`, etc.)
|
|
52
|
+
2. Start the server and discover the URL/port at runtime
|
|
53
|
+
3. Use `playwright-cli snapshot` to discover real element refs
|
|
54
|
+
4. Decide the concrete click/fill/assert operations itself
|
|
55
|
+
This works better than prescribing URLs/commands at planning time because: (1) ports may differ across environments, (2) element refs don't exist yet, (3) UI structure may change during implementation, (4) the AI has full context of the actual code when it runs verification.
|
|
56
|
+
- **Good**: `"Verify login form accepts valid credentials and redirects to dashboard"`
|
|
57
|
+
- **Bad**: `"click <ref> — click login button"` (guesses at refs that don't exist yet)
|
|
58
|
+
- Do NOT specify `url`, `setup_command`, or `port` — the AI detects these at runtime from the actual project configuration
|
|
59
|
+
- An empty `browser_interaction: {}` object (no verify_steps) is valid — the AI will explore the app and verify the feature works as expected
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Pre-Generation Completeness Review
|
|
2
|
+
|
|
3
|
+
Before generating `.prizmkit/plans/feature-list.json`, review the full feature set holistically. Individual features may look fine in isolation but have gaps when viewed together.
|
|
4
|
+
|
|
5
|
+
## Step 1: Description Adequacy Scan
|
|
6
|
+
|
|
7
|
+
For each feature, evaluate against the word-count thresholds in `planning-guide.md`:
|
|
8
|
+
- Does the description cover: what to build, key behaviors, integration points, data model (if applicable), error/edge cases?
|
|
9
|
+
- Is the description specific enough for an AI coding session to implement without guessing?
|
|
10
|
+
- Flag any feature below the recommended minimum word count for its complexity level (30+/50+/80+/100+ words for low/medium/high/critical). There is no upper limit — more detail is always better.
|
|
11
|
+
|
|
12
|
+
**Implementation clarity check** — Every feature description will be consumed by an autonomous AI session. Verify each description specifies:
|
|
13
|
+
1. Concrete deliverables (files to create, endpoints to build, components to implement, models to define)
|
|
14
|
+
2. Key behaviors and business rules (validation, state transitions, error handling)
|
|
15
|
+
3. Integration points with other modules (which APIs to call, which models to use)
|
|
16
|
+
|
|
17
|
+
**Dependency context check** — If the feature depends on others, the description should reference what it needs from them:
|
|
18
|
+
- Good: "Uses User model from F-001 to link projects to users via userId foreign key"
|
|
19
|
+
- Bad: "depends on F-001" (too vague)
|
|
20
|
+
|
|
21
|
+
**Ambiguity check** — Flag vague phrases:
|
|
22
|
+
- Bad: "Create a nice dashboard" (what components? what data? what layout?)
|
|
23
|
+
- Good: "Create dashboard at /dashboard with: (1) summary cards showing total projects count, active tasks count; (2) recent activity feed (last 10 items); (3) quick-access project list (5 most recent). Fetch data via GET /api/dashboard/summary."
|
|
24
|
+
|
|
25
|
+
If any feature description is unclear, **expand it now** before generating the output file.
|
|
26
|
+
|
|
27
|
+
## Step 2: Cross-Feature Completeness Check
|
|
28
|
+
|
|
29
|
+
Look at the feature set as a whole:
|
|
30
|
+
- **Implied functionality gaps**: Does feature A's acceptance criteria assume a capability that no other feature provides?
|
|
31
|
+
- **Missing integration seams**: If two features share data or interact at runtime, is the interface specified?
|
|
32
|
+
- **Scope leaks**: Does any feature's description reference functionality outside the agreed scope?
|
|
33
|
+
|
|
34
|
+
## Step 3: Present Review to User
|
|
35
|
+
|
|
36
|
+
Show a structured summary table:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
Feature | Description | Cross-Feature | Recommendation
|
|
40
|
+
| Adequacy | Issues |
|
|
41
|
+
F-001 | ✓ (65 words)| — | Ready
|
|
42
|
+
F-002 | ⚠ (28 words)| — | Expand: add API endpoints, error handling
|
|
43
|
+
F-003 | ✓ (52 words)| Assumes email from | Clarify: who sends the notification?
|
|
44
|
+
| | F-006 (not yet defined)|
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then ask if any features need further discussion.
|
|
48
|
+
|
|
49
|
+
## Step 4: Interactive Supplementation
|
|
50
|
+
|
|
51
|
+
For each feature the user wants to discuss:
|
|
52
|
+
1. Ask targeted questions about the unclear aspects
|
|
53
|
+
2. Propose concrete description supplements
|
|
54
|
+
3. Update the feature description with agreed details
|
|
55
|
+
4. Re-check: does the supplement resolve the gap?
|
|
56
|
+
|
|
57
|
+
Continue until the user confirms all features are implementation-ready. Fixing thin descriptions here costs minutes; fixing misimplemented features downstream costs hours.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Feature Decomposition Patterns
|
|
2
|
+
|
|
3
|
+
Use these patterns as starting points when breaking an app into features. Adapt them to the specific project.
|
|
4
|
+
|
|
5
|
+
For app-level design references (vision templates, tech stack decision matrix), see `app-planner/assets/app-design-guide.md`.
|
|
6
|
+
|
|
7
|
+
## Pattern A: CRUD-Based App
|
|
8
|
+
|
|
9
|
+
Examples: CMS, project management tools, inventory systems.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
F-001: Infrastructure Setup (no deps)
|
|
13
|
+
F-002: User Authentication (deps: F-001)
|
|
14
|
+
F-003: Core Entity CRUD (deps: F-002)
|
|
15
|
+
F-004: Entity Relationships (deps: F-003)
|
|
16
|
+
F-005: Search & Filtering (deps: F-003)
|
|
17
|
+
F-006: Notifications (deps: F-003)
|
|
18
|
+
F-007: Admin Dashboard (deps: F-004, F-005)
|
|
19
|
+
F-008: Analytics & Reporting (deps: F-007)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Pattern B: SaaS Platform
|
|
23
|
+
|
|
24
|
+
Examples: subscription services, multi-tenant tools, B2B products.
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
F-001: Infrastructure + Multi-tenant Setup (no deps)
|
|
28
|
+
F-002: User Auth + Organization Management (deps: F-001)
|
|
29
|
+
F-003: Core Product Feature (deps: F-002)
|
|
30
|
+
F-004: Subscription & Billing (deps: F-002)
|
|
31
|
+
F-005: Usage Tracking & Limits (deps: F-003, F-004)
|
|
32
|
+
F-006: Admin Portal (deps: F-005)
|
|
33
|
+
F-007: API & Integrations (deps: F-003)
|
|
34
|
+
F-008: Analytics Dashboard (deps: F-006, F-007)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Pattern C: Social/Community App
|
|
38
|
+
|
|
39
|
+
Examples: forums, social networks, community platforms.
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
F-001: Infrastructure Setup (no deps)
|
|
43
|
+
F-002: User Auth + Profiles (deps: F-001)
|
|
44
|
+
F-003: Content Creation (posts/media) (deps: F-002)
|
|
45
|
+
F-004: Social Graph (follow/friend) (deps: F-002)
|
|
46
|
+
F-005: Feed Algorithm (deps: F-003, F-004)
|
|
47
|
+
F-006: Interactions (likes, comments) (deps: F-003)
|
|
48
|
+
F-007: Real-time Messaging (deps: F-004)
|
|
49
|
+
F-008: Notifications (deps: F-005, F-006, F-007)
|
|
50
|
+
F-009: Discovery & Search (deps: F-005)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Pattern D: E-commerce App
|
|
54
|
+
|
|
55
|
+
Examples: online stores, marketplaces, booking platforms.
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
F-001: Infrastructure Setup (no deps)
|
|
59
|
+
F-002: User Auth (deps: F-001)
|
|
60
|
+
F-003: Product Catalog (deps: F-001)
|
|
61
|
+
F-004: Shopping Cart (deps: F-002, F-003)
|
|
62
|
+
F-005: Checkout & Payment (deps: F-004)
|
|
63
|
+
F-006: Order Management (deps: F-005)
|
|
64
|
+
F-007: Inventory Management (deps: F-003)
|
|
65
|
+
F-008: Reviews & Ratings (deps: F-002, F-003)
|
|
66
|
+
F-009: Search & Recommendations (deps: F-003, F-008)
|
|
67
|
+
F-010: Admin Dashboard (deps: F-006, F-007)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Decomposition Guidelines
|
|
71
|
+
|
|
72
|
+
- Every app starts with an infrastructure/setup feature (F-001) that has zero dependencies.
|
|
73
|
+
- Authentication almost always comes second unless the app is fully public.
|
|
74
|
+
- Group related functionality into single features rather than splitting too finely. A feature should represent a coherent unit of user-facing value.
|
|
75
|
+
- If a pattern does not match the app being planned, combine elements from multiple patterns or define a custom decomposition from scratch.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Error Recovery & Resume Support
|
|
2
|
+
|
|
3
|
+
Structured error handling for validation failures, interrupted sessions, and checkpoint-based resumption.
|
|
4
|
+
|
|
5
|
+
## Validation Failures
|
|
6
|
+
|
|
7
|
+
When `Invoke-PrizmPython scripts/validate-and-generate.py validate --input <file> --mode <mode>` returns errors:
|
|
8
|
+
|
|
9
|
+
### Parse validation output
|
|
10
|
+
Script returns JSON with `"valid": false`, `"errors": [...]`, `"warnings": [...]`
|
|
11
|
+
|
|
12
|
+
### Decision Tree
|
|
13
|
+
|
|
14
|
+
**if `error_count == 0` (warnings only):**
|
|
15
|
+
- Proceed with user approval
|
|
16
|
+
- Show warnings and ask: "Continue? (Y/n)"
|
|
17
|
+
|
|
18
|
+
**elif `error_count > 0` (critical errors):**
|
|
19
|
+
|
|
20
|
+
Group errors by type and apply targeted fixes:
|
|
21
|
+
|
|
22
|
+
| Error Type | Symptom | Fix Offered | Auto-Fix? |
|
|
23
|
+
|-----------|---------|------------|-----------|
|
|
24
|
+
| **Schema mismatch** | `$schema` invalid, missing `project_name`, wrong `features` type | "Set `$schema` to `dev-pipeline-feature-list-v1`, `project_name` to string" | Yes |
|
|
25
|
+
| **Feature ID issues** | Invalid format (not `F-NNN`), duplicate IDs, undefined refs | "Suggest corrected IDs, show duplicates" | Yes |
|
|
26
|
+
| **Dependency errors** | Circular dependency, undefined target features | "Show cycle chain (e.g., `F-003 → F-005 → F-003`), suggest break point" | No |
|
|
27
|
+
| **Missing fields** | Feature missing required keys (title, description, AC) | "List each feature + missing keys, guide patch" | Partial |
|
|
28
|
+
| **Insufficient AC** | Feature has <2 acceptance criteria | "Show feature, suggest AC examples" | No |
|
|
29
|
+
| **Invalid values** | complexity not in [low/medium/high/critical], status not pending | "Show field, valid values" | Yes |
|
|
30
|
+
|
|
31
|
+
### Execution
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
For auto-fixable errors:
|
|
35
|
+
1. Show summary: "Found N schema/ID/format issues"
|
|
36
|
+
2. Offer: auto-fix? (Y/n)
|
|
37
|
+
3. Apply fix → regenerate file
|
|
38
|
+
4. Re-run validation
|
|
39
|
+
5. If new errors → loop (max 2 more attempts)
|
|
40
|
+
|
|
41
|
+
For manual fixes (dependencies, AC content):
|
|
42
|
+
1. Show concise prompt: "Edit line X-Y in feature-list.json"
|
|
43
|
+
2. Wait for user action
|
|
44
|
+
3. Retry validation (max 2 more attempts)
|
|
45
|
+
|
|
46
|
+
if all_retries_exceeded:
|
|
47
|
+
→ Escalate: "After 3 attempts, validation still fails.
|
|
48
|
+
(a) Review file manually, OR
|
|
49
|
+
(b) Restart planning from Phase 1"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Resume Support
|
|
53
|
+
|
|
54
|
+
feature-planner sessions can be resumed from the last completed checkpoint when artifacts are found.
|
|
55
|
+
|
|
56
|
+
### Detection Logic
|
|
57
|
+
|
|
58
|
+
Check for artifact files in `.prizmkit/plans/`:
|
|
59
|
+
|
|
60
|
+
| Artifacts Found | Resume Action |
|
|
61
|
+
|-----------------|---------------|
|
|
62
|
+
| None | Start fresh planning (Phase 1) |
|
|
63
|
+
| `feature-list.json` exists but not validated | Offer to validate or extend (Phase 9) |
|
|
64
|
+
| `feature-list.json` + validation passed | Offer: handoff to `feature-pipeline-launcher` |
|
|
65
|
+
| `feature-list.draft.json` only | Resume interactive planning from last checkpoint |
|
|
66
|
+
|
|
67
|
+
When existing file detected, suggest:
|
|
68
|
+
> "Existing plan found with N features. Resume incremental planning? (Y/n)"
|
|
69
|
+
|
|
70
|
+
### Incremental Mode Abort
|
|
71
|
+
|
|
72
|
+
If in Incremental mode but existing `feature-list.json` not found:
|
|
73
|
+
- Ask: "Start new plan or provide existing file?"
|
|
74
|
+
- If new plan chosen → switch to Route A (New Feature Set)
|
|
75
|
+
|
|
76
|
+
### Artifact Path Convention
|
|
77
|
+
|
|
78
|
+
**CRITICAL PATH RULE**: `feature-list.json` MUST be written to `.prizmkit/plans/` directory.
|
|
79
|
+
|
|
80
|
+
Before writing, verify the directory exists: `New-Item -ItemType Directory -Force -Path .prizmkit/plans | Out-Null`
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
<project-root>/
|
|
84
|
+
└── .prizmkit/plans/
|
|
85
|
+
├── feature-list.json # Primary output
|
|
86
|
+
├── feature-list.draft.json # Draft backup (Session Exit Gate)
|
|
87
|
+
└── <ISO-timestamp>.backup.json # Optional incremental backups
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
> **Note**: For cross-session workflow recovery (e.g., interrupted pipeline execution, branch-level state detection), use `recovery-workflow` instead. This error-recovery reference handles only within-session validation retries and checkpoint resumption.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Incremental Feature Planning Reference
|
|
2
|
+
|
|
3
|
+
Use this reference when the user adds features to an existing app/plan.
|
|
4
|
+
|
|
5
|
+
## Pre-Checks
|
|
6
|
+
|
|
7
|
+
1. Read existing `feature-list.json`.
|
|
8
|
+
2. Determine current max ID and continue from next `F-NNN`.
|
|
9
|
+
3. **Detect existing writing style** (see §Style Detection below).
|
|
10
|
+
4. Preserve compatibility with existing dependency structure.
|
|
11
|
+
5. **Project conventions** — handled by the main SKILL.md flow (rule #6) before incremental planning begins. No additional action needed here; conventions are loaded automatically.
|
|
12
|
+
|
|
13
|
+
If `feature-list.json` is missing, ask whether to initialize a new plan.
|
|
14
|
+
|
|
15
|
+
## Style Detection (Automatic)
|
|
16
|
+
|
|
17
|
+
Before drafting new features, analyze existing plan to preserve consistency:
|
|
18
|
+
|
|
19
|
+
1. **Language Detection**
|
|
20
|
+
- Scan `title` and `description` fields
|
|
21
|
+
- If >70% English titles → default to English
|
|
22
|
+
- If >70% Chinese titles → suggest Chinese (or allow bilingual)
|
|
23
|
+
|
|
24
|
+
2. **Description Density**
|
|
25
|
+
- Calculate avg word count per description
|
|
26
|
+
- If avg <30 words → draft concise descriptions
|
|
27
|
+
- If avg 30-80 words → draft standard detail
|
|
28
|
+
- If avg >80 words → draft detailed descriptions
|
|
29
|
+
|
|
30
|
+
3. **Acceptance Criteria Patterns**
|
|
31
|
+
- Count avg AC per feature
|
|
32
|
+
- Identify dominant format (Given/When/Then Gherkin, BDD, or loose)
|
|
33
|
+
- Draft new AC in same format
|
|
34
|
+
|
|
35
|
+
4. **Complexity Distribution**
|
|
36
|
+
- Count low/medium/high distribution in existing features
|
|
37
|
+
- Alert if new features deviate significantly (>20 percentile points)
|
|
38
|
+
- Suggest rebalancing if needed
|
|
39
|
+
|
|
40
|
+
### Style Consistency Prompt
|
|
41
|
+
|
|
42
|
+
If new features deviate significantly from detected style:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
"Your new features use avg X words/description, but existing features use Y.
|
|
46
|
+
Current ratio: low:M%, medium:N%, high:O%.
|
|
47
|
+
Adjust new features to match? (Y/n)"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Accept user choice, then adjust draft accordingly before JSON generation.
|
|
51
|
+
|
|
52
|
+
## Incremental Planning Flow
|
|
53
|
+
|
|
54
|
+
### Step 1: Clarify Increment Scope
|
|
55
|
+
Capture:
|
|
56
|
+
- business objective of the new increment
|
|
57
|
+
- affected existing modules/features
|
|
58
|
+
- timeline or priority constraints
|
|
59
|
+
|
|
60
|
+
### Step 2: Impact Mapping
|
|
61
|
+
For each candidate feature, identify:
|
|
62
|
+
- upstream dependencies
|
|
63
|
+
- downstream impacts
|
|
64
|
+
- risk hotspots (auth, data migration, API compatibility)
|
|
65
|
+
|
|
66
|
+
### Step 3: Append Features
|
|
67
|
+
Append new items only (do not rewrite old validated features unless user asks).
|
|
68
|
+
|
|
69
|
+
For each new feature:
|
|
70
|
+
- assign next ID
|
|
71
|
+
- set `status: "pending"`
|
|
72
|
+
- link dependencies to existing IDs where needed
|
|
73
|
+
- keep title in English
|
|
74
|
+
- **write rich descriptions** (see `planning-guide.md` §4):
|
|
75
|
+
- minimum 15 words (validation error below this)
|
|
76
|
+
- recommended minimum: 30+ (low), 50+ (medium), 80+ (high), 100+ (critical) — no upper limit, more detail is always better
|
|
77
|
+
- include: what to build, key behaviors, integration points, data model, error/edge cases
|
|
78
|
+
|
|
79
|
+
### Step 4: Rebalance Priority
|
|
80
|
+
Allow priority updates for both old and new features if user requests reprioritization.
|
|
81
|
+
Keep dependency correctness as first constraint.
|
|
82
|
+
|
|
83
|
+
### Step 5: Validate
|
|
84
|
+
Run after defining `Invoke-PrizmPython` from the main `SKILL.md`:
|
|
85
|
+
```powershell
|
|
86
|
+
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json --mode incremental
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Fix and re-run until pass.
|
|
90
|
+
|
|
91
|
+
## Merge/Rewrite Rules
|
|
92
|
+
|
|
93
|
+
- Default: append only
|
|
94
|
+
- Rewrite existing features only when user explicitly asks
|
|
95
|
+
- Never break valid IDs/references
|
|
96
|
+
- Never set new features to `in_progress` or `completed`
|
|
97
|
+
|
|
98
|
+
## Practical Prompts
|
|
99
|
+
|
|
100
|
+
Use concise prompts during interaction:
|
|
101
|
+
- "What is the goal of this increment? Which user problem is the priority?"
|
|
102
|
+
- "Which existing Feature IDs do these new features depend on?"
|
|
103
|
+
- "Do you want to reprioritize at the same time, or just append to the current sequence?"
|
|
104
|
+
|
|
105
|
+
## Final Delivery Checklist
|
|
106
|
+
|
|
107
|
+
- [ ] Existing file read before edits
|
|
108
|
+
- [ ] New IDs continue sequence
|
|
109
|
+
- [ ] Existing style preserved
|
|
110
|
+
- [ ] Dependency graph still DAG
|
|
111
|
+
- [ ] Validation passes
|
|
112
|
+
- [ ] Next step recommendation: `feature-pipeline-launcher`
|