prizmkit 1.0.120 → 1.0.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +8 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +21 -0
- package/bundled/skills/prizmkit-analyze/SKILL.md +8 -0
- package/bundled/skills/prizmkit-clarify/SKILL.md +1 -0
- package/bundled/skills/prizmkit-implement/SKILL.md +49 -1
- package/bundled/skills/prizmkit-plan/SKILL.md +6 -0
- package/bundled/skills/prizmkit-plan/assets/plan-template.md +30 -2
- package/bundled/skills/prizmkit-retrospective/SKILL.md +3 -133
- package/bundled/skills/prizmkit-specify/SKILL.md +12 -2
- package/bundled/skills/prizmkit-specify/assets/spec-template.md +19 -0
- package/package.json +1 -1
package/bundled/VERSION.json
CHANGED
|
@@ -129,6 +129,14 @@ ls .prizmkit/specs/{{FEATURE_SLUG}}/plan.md 2>/dev/null
|
|
|
129
129
|
|
|
130
130
|
If either missing, write them yourself:
|
|
131
131
|
- `plan.md`: architecture — components, interfaces, data flow, files to create/modify, testing approach, and a Tasks section with `[ ]` checkboxes ordered by dependency
|
|
132
|
+
|
|
133
|
+
**Database Design Gate** (if feature involves data persistence — new tables, schema changes, new entities):
|
|
134
|
+
Before proceeding past CP-1, verify:
|
|
135
|
+
1. Plan.md Data Model section references existing schema/model files (scan for `*.prisma`, `*.sql`, `migrations/`, `models/`, `*.entity.*` files; read them if not already in context-snapshot)
|
|
136
|
+
2. All new tables/fields follow existing naming conventions, ID strategy, timestamp patterns, and constraint style
|
|
137
|
+
3. No `[NEEDS CLARIFICATION]` remains in Data Model section — resolve by reading existing code and making a conservative choice that matches existing patterns. Document the resolution in plan.md.
|
|
138
|
+
4. If a DB design decision genuinely cannot be resolved from existing code alone, document the assumption made and flag it in the Implementation Log for user review.
|
|
139
|
+
|
|
132
140
|
**CP-1**: plan.md exists with Tasks section.
|
|
133
141
|
|
|
134
142
|
### Phase 3: Implement — Dev Subagent
|
|
@@ -11,6 +11,26 @@ Plan deliverable features for dev-pipeline in two modes:
|
|
|
11
11
|
|
|
12
12
|
Always produce a validated `feature-list.json` that conforms to `dev-pipeline-feature-list`.
|
|
13
13
|
|
|
14
|
+
## Scope Boundary (Hard Rule)
|
|
15
|
+
|
|
16
|
+
**This skill is PLANNING ONLY.** You must NEVER:
|
|
17
|
+
- Create, modify, or delete source code files (*.js, *.ts, *.py, *.go, *.html, *.css, etc.)
|
|
18
|
+
- Create project scaffolding, directories, or boilerplate
|
|
19
|
+
- Run build/install/test commands (npm init, pip install, etc.)
|
|
20
|
+
- Execute any implementation action beyond writing `feature-list.json`
|
|
21
|
+
|
|
22
|
+
**Your ONLY writable outputs are:**
|
|
23
|
+
1. `feature-list.json` (project root)
|
|
24
|
+
2. Architecture decisions appended to `CLAUDE.md` / `CODEBUDDY.md` (with user consent, see §Architecture Decision Capture)
|
|
25
|
+
3. Draft backups in `.prizmkit/planning/`
|
|
26
|
+
|
|
27
|
+
**After planning is complete**, you MUST:
|
|
28
|
+
1. Present the summary and recommended next step
|
|
29
|
+
2. **Ask the user explicitly** whether they want to proceed to execution
|
|
30
|
+
3. If the user agrees → recommend invoking `dev-pipeline-launcher` or running `run.sh` (do NOT execute it yourself)
|
|
31
|
+
4. If the user wants to adjust → continue refining `feature-list.json`
|
|
32
|
+
5. **NEVER auto-execute** the pipeline, launcher, or any implementation step
|
|
33
|
+
|
|
14
34
|
## When to Use
|
|
15
35
|
|
|
16
36
|
Trigger this skill for requests like:
|
|
@@ -22,6 +42,7 @@ Trigger this skill for requests like:
|
|
|
22
42
|
Do NOT use this skill when:
|
|
23
43
|
- user only wants to run pipeline now (invoke `dev-pipeline-launcher`)
|
|
24
44
|
- user is debugging/refactoring unrelated to feature planning
|
|
45
|
+
- user wants to write or modify source code directly
|
|
25
46
|
|
|
26
47
|
## Resource Loading Rules (Mandatory)
|
|
27
48
|
|
|
@@ -107,6 +107,14 @@ Focus on high-signal findings. Limit to **50 findings total**; aggregate remaind
|
|
|
107
107
|
- Task ordering contradictions (e.g., integration tasks before foundational setup without dependency note)
|
|
108
108
|
- Conflicting requirements (e.g., one requires REST while other specifies GraphQL)
|
|
109
109
|
|
|
110
|
+
#### G. Database Design Consistency (when plan.md has Data Model section)
|
|
111
|
+
- New entity/field naming inconsistent with existing schema conventions documented in "Existing Schema Audit"
|
|
112
|
+
- Missing constraints (NOT NULL, UNIQUE, FK, INDEX) on fields where existing similar tables define them
|
|
113
|
+
- Unresolved `[NEEDS CLARIFICATION]` in Data Model section → **CRITICAL** (must be resolved before implementation)
|
|
114
|
+
- Style Conformance Checklist items unchecked → **HIGH** (design not verified against existing conventions)
|
|
115
|
+
- New tables with no foreign key relationship to any existing table (orphan table warning — may indicate missing business logic)
|
|
116
|
+
- Missing migration strategy for schema changes that affect existing data
|
|
117
|
+
|
|
110
118
|
### Step 5: Severity Assignment
|
|
111
119
|
|
|
112
120
|
Use this heuristic to prioritize findings:
|
|
@@ -23,6 +23,7 @@ Interactive requirement clarification that resolves ambiguities in feature speci
|
|
|
23
23
|
1. Read `spec.md` from `.prizmkit/specs/###-feature-name/`
|
|
24
24
|
2. Scan for `[NEEDS CLARIFICATION]` markers and underspecified areas
|
|
25
25
|
3. Categorize ambiguities by dimension and prioritize — address the ones that would most affect architecture and data model first, since those are hardest to change later:
|
|
26
|
+
- Data model (what entities, relationships, constraints?) — **highest priority when DB changes are involved**: field types, nullability, naming conventions, relationships, and constraint patterns must all be resolved before plan finalization. Unresolved DB design decisions during implementation lead to expensive rework.
|
|
26
27
|
- Functional scope (what does it do?)
|
|
27
28
|
- Data model (what entities, relationships?)
|
|
28
29
|
- UX flow (what does the user see?)
|
|
@@ -46,7 +46,54 @@ Execute implementation by following the task breakdown in plan.md. Respects task
|
|
|
46
46
|
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.
|
|
47
47
|
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.
|
|
48
48
|
6. After all tasks: run full test suite
|
|
49
|
-
7.
|
|
49
|
+
7. **Deploy guide update** (only when new frameworks/tools were added):
|
|
50
|
+
- Check if any dependency manifests were modified in this session:
|
|
51
|
+
```bash
|
|
52
|
+
git diff --name-only HEAD -- package.json requirements*.txt Pipfile pyproject.toml go.mod Cargo.toml pom.xml build.gradle Gemfile composer.json docker-compose*.yml Dockerfile .tool-versions 2>/dev/null
|
|
53
|
+
```
|
|
54
|
+
- If no manifest files changed → skip this step entirely
|
|
55
|
+
- If manifest files changed, scan for **newly added** dependencies (not version bumps):
|
|
56
|
+
```bash
|
|
57
|
+
git diff -U0 HEAD -- package.json requirements*.txt Pipfile pyproject.toml go.mod Cargo.toml pom.xml build.gradle Gemfile composer.json docker-compose*.yml Dockerfile .tool-versions 2>/dev/null | grep '^\+' | grep -v '^\+\+\+' | head -30
|
|
58
|
+
```
|
|
59
|
+
- For each genuinely new framework/tool, record in `deploy_guide.md` at project root:
|
|
60
|
+
|
|
61
|
+
| Field | Description | Source |
|
|
62
|
+
|-------|-------------|--------|
|
|
63
|
+
| **Name** | Framework/tool name | Package name from manifest |
|
|
64
|
+
| **Version** | Installed version or constraint | Version spec from manifest |
|
|
65
|
+
| **Purpose** | Why it was introduced | You just added it — you know why |
|
|
66
|
+
| **Install Command** | How to install locally | Standard install command for the ecosystem |
|
|
67
|
+
| **Key Config** | Config files or env vars needed | Config files you just created/modified |
|
|
68
|
+
| **Notes** | Setup gotchas, required services | Docker services, manual steps, env vars |
|
|
69
|
+
|
|
70
|
+
- Template for `deploy_guide.md`:
|
|
71
|
+
```markdown
|
|
72
|
+
# Deploy Guide
|
|
73
|
+
|
|
74
|
+
> Auto-maintained by PrizmKit. Manual edits are preserved.
|
|
75
|
+
> Last updated: YYYY-MM-DD
|
|
76
|
+
|
|
77
|
+
## Frameworks & Tools
|
|
78
|
+
|
|
79
|
+
### <Framework Name>
|
|
80
|
+
|
|
81
|
+
- **Version**: <version constraint>
|
|
82
|
+
- **Purpose**: <why this framework is used>
|
|
83
|
+
- **Install**:
|
|
84
|
+
```bash
|
|
85
|
+
<install command>
|
|
86
|
+
```
|
|
87
|
+
- **Key Config**:
|
|
88
|
+
- `<config file or env var>`: <description>
|
|
89
|
+
- **Notes**:
|
|
90
|
+
- <any setup gotchas, required external services, manual steps>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
- **Update rules**: create file if absent; append new sections if file exists; update version if framework already documented; preserve manually added content; keep entries sorted alphabetically
|
|
94
|
+
- **Filter out**: patch version bumps of existing deps, dev-only tools needing no setup (linters, formatters), transitive/lock-file-only changes
|
|
95
|
+
- Stage the file: `git add deploy_guide.md`
|
|
96
|
+
8. Output implementation summary with pass/fail status
|
|
50
97
|
|
|
51
98
|
## Task Format in plan.md
|
|
52
99
|
|
|
@@ -85,4 +132,5 @@ If a session is interrupted mid-implementation:
|
|
|
85
132
|
|
|
86
133
|
- Code files created/modified as specified in plan.md Tasks section
|
|
87
134
|
- `plan.md` Tasks section updated with completion markers `[x]`
|
|
135
|
+
- `deploy_guide.md` created/updated (only when new frameworks/tools were added)
|
|
88
136
|
- Implementation summary output to conversation
|
|
@@ -46,6 +46,12 @@ Generate a comprehensive technical implementation plan from a feature specificat
|
|
|
46
46
|
- Architecture approach (how feature fits into existing structure)
|
|
47
47
|
- Component design (new/modified components)
|
|
48
48
|
- Data model changes (new entities, modified schemas)
|
|
49
|
+
- **Database design gate** (when feature involves DB changes):
|
|
50
|
+
1. Read ALL existing schema/migration/model files to understand current conventions (naming, constraints, relationships, ID strategy, timestamps)
|
|
51
|
+
2. Ensure new schema follows existing patterns — do NOT introduce new conventions unless explicitly justified
|
|
52
|
+
3. Verify every new table/field has: purpose, type, constraints, and relationship to existing entities
|
|
53
|
+
4. If any data model decision is uncertain → mark as `[NEEDS CLARIFICATION]` and resolve via `/prizmkit-clarify` BEFORE generating the Tasks section
|
|
54
|
+
5. **RULE**: The Tasks section MUST NOT be generated until all `[NEEDS CLARIFICATION]` items in Data Model are resolved. Unresolved DB design leads to implementation rework that is expensive to fix after code is written.
|
|
49
55
|
- Interface design (API endpoints, request/response formats, module interfaces)
|
|
50
56
|
- Integration points (external services, internal modules)
|
|
51
57
|
- Testing strategy (unit, integration, e2e)
|
|
@@ -12,7 +12,34 @@
|
|
|
12
12
|
- [Component]: [What changes and why]
|
|
13
13
|
|
|
14
14
|
## Data Model
|
|
15
|
-
|
|
15
|
+
<!-- Skip this section if the feature does not involve database changes -->
|
|
16
|
+
<!-- IMPORTANT: Read existing schema/model files BEFORE designing new tables -->
|
|
17
|
+
|
|
18
|
+
### Existing Schema Audit
|
|
19
|
+
<!-- List existing tables/models reviewed. Note observed conventions. -->
|
|
20
|
+
- Tables reviewed: [list tables examined]
|
|
21
|
+
- Naming convention: [snake_case/camelCase — document what existing schema uses]
|
|
22
|
+
- ID strategy: [UUID/auto-increment/CUID — match existing]
|
|
23
|
+
- Timestamp fields: [created_at/updated_at pattern — match existing]
|
|
24
|
+
- Soft delete: [yes/no, field name if applicable]
|
|
25
|
+
- Constraint patterns: [NOT NULL defaults, UNIQUE patterns, index conventions]
|
|
26
|
+
|
|
27
|
+
### Schema Changes
|
|
28
|
+
| Entity | Type | Fields | Constraints | Relationships | Migration Notes |
|
|
29
|
+
|--------|------|--------|-------------|---------------|-----------------|
|
|
30
|
+
| [name] | new/modify | [field: type, ...] | [NOT NULL, UNIQUE, INDEX, ...] | [FK → existing_table(id)] | [migration strategy] |
|
|
31
|
+
|
|
32
|
+
### Style Conformance Checklist
|
|
33
|
+
- [ ] Table/column naming matches existing conventions
|
|
34
|
+
- [ ] ID strategy consistent with existing tables
|
|
35
|
+
- [ ] Timestamp fields follow existing patterns
|
|
36
|
+
- [ ] Foreign key constraints and indexes defined
|
|
37
|
+
- [ ] Soft delete strategy matches existing pattern (if applicable)
|
|
38
|
+
- [ ] All fields have explicit nullability (NOT NULL or nullable)
|
|
39
|
+
|
|
40
|
+
### Unresolved Questions
|
|
41
|
+
<!-- NONE — all DB design questions must be resolved before proceeding to Tasks -->
|
|
42
|
+
<!-- If any remain, run /prizmkit-clarify to resolve them first -->
|
|
16
43
|
|
|
17
44
|
## Interface Design
|
|
18
45
|
[API endpoints, request/response formats, module interfaces — include all details here]
|
|
@@ -32,7 +59,8 @@
|
|
|
32
59
|
|
|
33
60
|
## Pre-Implementation Gates
|
|
34
61
|
- [ ] Spec coverage: all user stories mapped to components
|
|
35
|
-
- [ ] Data model reviewed
|
|
62
|
+
- [ ] Data model reviewed — existing schema conventions documented and followed
|
|
63
|
+
- [ ] All Data Model `[NEEDS CLARIFICATION]` items resolved (mandatory for DB features)
|
|
36
64
|
- [ ] API contracts defined
|
|
37
65
|
- [ ] Testing approach agreed
|
|
38
66
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "prizmkit-retrospective"
|
|
3
|
-
description: "Incremental .prizm-docs/ maintainer
|
|
3
|
+
description: "Incremental .prizm-docs/ maintainer. Performs two jobs: (1) structural sync — update .prizm-docs/ KEY_FILES/INTERFACES/DEPENDENCIES, (2) architecture knowledge — inject TRAPS/RULES/DECISIONS into .prizm-docs/. All project knowledge lives in .prizm-docs/ . Run after code review passes and before committing. Trigger on: 'retrospective', 'retro', 'update docs', 'sync docs', 'wrap up', 'done with feature', 'feature complete'. (project)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PrizmKit Retrospective
|
|
@@ -11,11 +11,10 @@ All project knowledge is maintained in a single store:
|
|
|
11
11
|
|-------|----------|---------|---------|
|
|
12
12
|
| **Architecture Index** | `.prizm-docs/` | MODULE, FILES, INTERFACES, DEPENDENCIES, TRAPS, RULES, DECISIONS | AI quickly locates code structure, interfaces, known pitfalls, and key design decisions |
|
|
13
13
|
|
|
14
|
-
**This skill performs
|
|
14
|
+
**This skill performs two jobs in one pass:**
|
|
15
15
|
|
|
16
16
|
1. **Structural Sync** — reflect what changed in code → `.prizm-docs/` (KEY_FILES, INTERFACES, DEPENDENCIES, file counts)
|
|
17
17
|
2. **Architecture Knowledge** — inject TRAPS, RULES, and DECISIONS → `.prizm-docs/`. All knowledge is consolidated in `.prizm-docs/`.
|
|
18
|
-
3. **Deploy Guide** — detect new frameworks/tools and record setup instructions → `deploy_guide.md`
|
|
19
18
|
|
|
20
19
|
No other skill writes to `.prizm-docs/`. This is the sole writer during ongoing development. For initial doc setup, validation, or migration, use `/prizmkit-prizm-docs` instead.
|
|
21
20
|
|
|
@@ -151,132 +150,6 @@ When writing TRAPS:
|
|
|
151
150
|
|
|
152
151
|
---
|
|
153
152
|
|
|
154
|
-
## Job 3: Deploy Guide Maintenance (`deploy_guide.md`)
|
|
155
|
-
|
|
156
|
-
When new frameworks or tools that require **manual setup steps** are introduced, record them in `deploy_guide.md` at the project root. This ensures installation, configuration, and deployment knowledge is systematically documented for the team.
|
|
157
|
-
|
|
158
|
-
### When to Run Job 3
|
|
159
|
-
|
|
160
|
-
Run this job **only when new frameworks/tools are detected** in the current changeset. Skip entirely if no new framework was introduced.
|
|
161
|
-
|
|
162
|
-
### Step 3-1: Detect New Frameworks
|
|
163
|
-
|
|
164
|
-
From the `git diff --cached` (or `git diff`) output already collected in Job 1, check for newly added entries in dependency manifest files:
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
# Check for newly added dependencies in common manifest files
|
|
168
|
-
git diff --cached -U0 -- package.json requirements*.txt Pipfile pyproject.toml go.mod Cargo.toml pom.xml build.gradle Gemfile composer.json docker-compose*.yml Dockerfile .tool-versions 2>/dev/null | grep '^\+' | grep -v '^\+\+\+' | head -30
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
**Trigger conditions** (ANY match → proceed to Step 3-2):
|
|
172
|
-
- New dependency added to `package.json` (dependencies/devDependencies)
|
|
173
|
-
- New package in `requirements.txt`, `pyproject.toml`, `Pipfile`, `go.mod`, `Cargo.toml`, `pom.xml`, `build.gradle`, `Gemfile`, `composer.json`
|
|
174
|
-
- New service in `docker-compose*.yml` (e.g., database, cache, message queue)
|
|
175
|
-
- New `Dockerfile` created or base image changed
|
|
176
|
-
- New system tool in `.tool-versions`, `.nvmrc`, `.python-version`
|
|
177
|
-
- New CI/CD configuration file added (`.github/workflows/*.yml`, `.gitlab-ci.yml`, `Jenkinsfile`)
|
|
178
|
-
|
|
179
|
-
**Filter out** (do NOT record):
|
|
180
|
-
- Patch version bumps of existing dependencies (e.g., `1.2.3` → `1.2.4`)
|
|
181
|
-
- Dev-only tools that need no manual setup (linters, formatters, type checkers)
|
|
182
|
-
- Transitive dependencies (lock file changes without manifest changes)
|
|
183
|
-
|
|
184
|
-
### Step 3-2: Record Framework Info
|
|
185
|
-
|
|
186
|
-
For each detected new framework/tool, gather the following information from the code changes and dependency files:
|
|
187
|
-
|
|
188
|
-
| Field | Description | Source |
|
|
189
|
-
|-------|-------------|--------|
|
|
190
|
-
| **Name** | Framework/tool name | Package name from manifest |
|
|
191
|
-
| **Version** | Installed version or constraint | Version spec from manifest |
|
|
192
|
-
| **Purpose** | Why it was introduced | Infer from code usage, feature context, or commit message |
|
|
193
|
-
| **Install Command** | How to install locally | Standard install command for the ecosystem |
|
|
194
|
-
| **Key Config** | Config files or env vars needed | Scan for new config files, `.env` entries, or env references in code |
|
|
195
|
-
| **Notes** | Setup gotchas, required services, manual steps | Infer from Dockerfile, docker-compose, README references, or TRAPS |
|
|
196
|
-
|
|
197
|
-
### Step 3-3: Update `deploy_guide.md`
|
|
198
|
-
|
|
199
|
-
Write or append to `deploy_guide.md` at the project root using this template:
|
|
200
|
-
|
|
201
|
-
```markdown
|
|
202
|
-
# Deploy Guide
|
|
203
|
-
|
|
204
|
-
> Auto-maintained by PrizmKit retrospective. Manual edits are preserved.
|
|
205
|
-
> Last updated: YYYY-MM-DD
|
|
206
|
-
|
|
207
|
-
## Frameworks & Tools
|
|
208
|
-
|
|
209
|
-
### <Framework Name>
|
|
210
|
-
|
|
211
|
-
- **Version**: <version constraint>
|
|
212
|
-
- **Purpose**: <why this framework is used>
|
|
213
|
-
- **Install**:
|
|
214
|
-
```bash
|
|
215
|
-
<install command>
|
|
216
|
-
```
|
|
217
|
-
- **Key Config**:
|
|
218
|
-
- `<config file or env var>`: <description>
|
|
219
|
-
- **Notes**:
|
|
220
|
-
- <any setup gotchas, required external services, manual steps>
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
**Update rules**:
|
|
224
|
-
- If `deploy_guide.md` does not exist → create it with the header and first framework entry
|
|
225
|
-
- If `deploy_guide.md` exists → check if the framework already has a section (match by `### <Name>` heading). If yes, update version and any changed config. If no, append a new section.
|
|
226
|
-
- Preserve any manually added content (sections not matching the template are left untouched)
|
|
227
|
-
- Keep entries sorted alphabetically by framework name within `## Frameworks & Tools`
|
|
228
|
-
|
|
229
|
-
**Stage the file**:
|
|
230
|
-
```bash
|
|
231
|
-
git add deploy_guide.md
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
### Example
|
|
235
|
-
|
|
236
|
-
After adding PostgreSQL via docker-compose and Prisma ORM to a Node.js project:
|
|
237
|
-
|
|
238
|
-
```markdown
|
|
239
|
-
# Deploy Guide
|
|
240
|
-
|
|
241
|
-
> Auto-maintained by PrizmKit retrospective. Manual edits are preserved.
|
|
242
|
-
> Last updated: 2026-03-27
|
|
243
|
-
|
|
244
|
-
## Frameworks & Tools
|
|
245
|
-
|
|
246
|
-
### PostgreSQL
|
|
247
|
-
|
|
248
|
-
- **Version**: 16
|
|
249
|
-
- **Purpose**: Primary relational database for user data, orders, and product catalog
|
|
250
|
-
- **Install**:
|
|
251
|
-
```bash
|
|
252
|
-
docker compose up -d postgres
|
|
253
|
-
```
|
|
254
|
-
- **Key Config**:
|
|
255
|
-
- `DATABASE_URL` (env): PostgreSQL connection string, format `postgresql://user:pass@host:5432/dbname`
|
|
256
|
-
- `docker-compose.yml`: Service `postgres` with volume `pgdata`
|
|
257
|
-
- **Notes**:
|
|
258
|
-
- Requires Docker running locally
|
|
259
|
-
- Run `npx prisma migrate deploy` after first start to initialize schema
|
|
260
|
-
|
|
261
|
-
### Prisma
|
|
262
|
-
|
|
263
|
-
- **Version**: ^5.20.0
|
|
264
|
-
- **Purpose**: ORM for type-safe database access and schema migrations
|
|
265
|
-
- **Install**:
|
|
266
|
-
```bash
|
|
267
|
-
npm install prisma @prisma/client
|
|
268
|
-
npx prisma generate
|
|
269
|
-
```
|
|
270
|
-
- **Key Config**:
|
|
271
|
-
- `prisma/schema.prisma`: Database schema definition
|
|
272
|
-
- `DATABASE_URL` (env): Shared with PostgreSQL connection
|
|
273
|
-
- **Notes**:
|
|
274
|
-
- After schema changes: `npx prisma migrate dev --name <description>`
|
|
275
|
-
- Generate client after pull: `npx prisma generate`
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
---
|
|
279
|
-
|
|
280
153
|
## Final: Changelog + Stage
|
|
281
154
|
|
|
282
155
|
**3a.** Append to `.prizm-docs/changelog.prizm`:
|
|
@@ -287,8 +160,6 @@ After adding PostgreSQL via docker-compose and Prisma ORM to a Node.js project:
|
|
|
287
160
|
**3b.** Stage all doc changes:
|
|
288
161
|
```bash
|
|
289
162
|
git add .prizm-docs/
|
|
290
|
-
# Stage deploy guide if it was created/updated
|
|
291
|
-
git add deploy_guide.md 2>/dev/null || true
|
|
292
163
|
```
|
|
293
164
|
|
|
294
165
|
**3c.** Handoff:
|
|
@@ -318,5 +189,4 @@ The pipeline enforces a **docs pass condition**: `.prizm-docs/` must show change
|
|
|
318
189
|
|
|
319
190
|
- `.prizm-docs/*.prizm` — Structurally synced + TRAPS/RULES/DECISIONS enriched
|
|
320
191
|
- `.prizm-docs/changelog.prizm` — Appended entries
|
|
321
|
-
-
|
|
322
|
-
- All `.prizm-docs/` changes and `deploy_guide.md` staged via `git add`
|
|
192
|
+
- All `.prizm-docs/` changes staged via `git add`
|
|
@@ -39,11 +39,21 @@ Create structured feature specifications from natural language descriptions. Thi
|
|
|
39
39
|
- Scope boundaries (In scope / Out of scope)
|
|
40
40
|
- Dependencies and constraints
|
|
41
41
|
- `[NEEDS CLARIFICATION]` markers for ambiguous items (max 3)
|
|
42
|
-
7.
|
|
42
|
+
7. **Database design detection**: If the feature involves data persistence (new entities, new fields, schema changes), add a `## Data Model` section to spec.md (see template):
|
|
43
|
+
- Scan for existing database schema files to understand current conventions:
|
|
44
|
+
```bash
|
|
45
|
+
find . -maxdepth 4 -type f \( -name "*.prisma" -o -name "*.sql" -o -path "*/migrations/*" -o -path "*/models/*" -o -name "schema.*" -o -name "*.entity.*" \) -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/__pycache__/*' | head -20
|
|
46
|
+
```
|
|
47
|
+
- Read existing schema/model files to extract conventions: naming style (snake_case vs camelCase), ID strategy (UUID vs auto-increment), timestamp patterns, soft-delete approach, constraint patterns, relationship patterns
|
|
48
|
+
- Document in spec.md Data Model section: existing schema reference, new entities needed, relationships to existing tables
|
|
49
|
+
- Mark uncertain fields or relationships with `[NEEDS CLARIFICATION]` — these MUST be resolved before planning
|
|
50
|
+
- **RULE**: Never design new tables in isolation — always reference existing schema to maintain style consistency
|
|
51
|
+
8. Run internal quality validation loop (max 3 iterations):
|
|
43
52
|
- Check: All user stories have acceptance criteria?
|
|
44
53
|
- Check: Scope boundaries clearly defined?
|
|
45
54
|
- Check: No more than 3 `[NEEDS CLARIFICATION]` markers?
|
|
46
|
-
|
|
55
|
+
- Check: If Data Model section exists, are existing schema conventions documented?
|
|
56
|
+
9. Output: `spec.md` path and summary
|
|
47
57
|
|
|
48
58
|
## Writing Principles
|
|
49
59
|
|
|
@@ -24,6 +24,25 @@
|
|
|
24
24
|
## Dependencies
|
|
25
25
|
- [Dependency 1]: [Why needed]
|
|
26
26
|
|
|
27
|
+
## Data Model (if feature involves database changes)
|
|
28
|
+
|
|
29
|
+
### Existing Schema Reference
|
|
30
|
+
<!-- Read existing schema/model files BEFORE designing new tables. Document observed conventions here. -->
|
|
31
|
+
- Tables reviewed: [list existing tables related to this feature]
|
|
32
|
+
- Naming convention: [snake_case/camelCase — match existing]
|
|
33
|
+
- ID strategy: [UUID/auto-increment — match existing]
|
|
34
|
+
- Timestamp pattern: [created_at/updated_at — match existing]
|
|
35
|
+
- Soft delete: [yes/no, field name — match existing]
|
|
36
|
+
|
|
37
|
+
### New/Modified Entities
|
|
38
|
+
| Entity | Type (new/modify) | Key Fields | Relationships | Constraints |
|
|
39
|
+
|--------|-------------------|------------|---------------|-------------|
|
|
40
|
+
| [entity_name] | new | [field: type] | [FK to existing_table] | [NOT NULL, UNIQUE, etc.] |
|
|
41
|
+
|
|
42
|
+
### Open Data Model Questions
|
|
43
|
+
<!-- All questions here MUST be resolved before /prizmkit-plan generates Tasks -->
|
|
44
|
+
- [NEEDS CLARIFICATION] [Any uncertain data model decisions — field types, nullability, relationships]
|
|
45
|
+
|
|
27
46
|
## Constraints
|
|
28
47
|
- [Constraint 1]
|
|
29
48
|
|