prizmkit 1.1.78 → 1.1.79
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/skills/_metadata.json +1 -1
- package/bundled/skills-windows/prizm-kit/SKILL.md +81 -0
- package/bundled/skills-windows/prizmkit-code-review/SKILL.md +225 -0
- package/bundled/skills-windows/prizmkit-committer/SKILL.md +81 -0
- package/bundled/skills-windows/prizmkit-deploy/SKILL.md +468 -0
- package/bundled/skills-windows/prizmkit-deploy/references/ci-cd-workflows.md +115 -0
- package/bundled/skills-windows/prizmkit-deploy/references/cloud-platform-deploy.md +93 -0
- package/bundled/skills-windows/prizmkit-deploy/references/database-setup.md +46 -0
- package/bundled/skills-windows/prizmkit-deploy/references/deploy-config-schema.md +148 -0
- package/bundled/skills-windows/prizmkit-deploy/references/deploy-history-schema.md +62 -0
- package/bundled/skills-windows/prizmkit-deploy/references/deployment-modes.md +50 -0
- package/bundled/skills-windows/prizmkit-deploy/references/direct-upload.md +26 -0
- package/bundled/skills-windows/prizmkit-deploy/references/dns-setup.md +42 -0
- package/bundled/skills-windows/prizmkit-deploy/references/docker-deploy.md +31 -0
- package/bundled/skills-windows/prizmkit-deploy/references/firewall-setup.md +37 -0
- package/bundled/skills-windows/prizmkit-deploy/references/live-validation-notes.md +21 -0
- package/bundled/skills-windows/prizmkit-deploy/references/nginx-blue-green.md +59 -0
- package/bundled/skills-windows/prizmkit-deploy/references/ssl-setup.md +56 -0
- package/bundled/skills-windows/prizmkit-implement/SKILL.md +65 -0
- package/bundled/skills-windows/prizmkit-plan/SKILL.md +184 -0
- package/bundled/skills-windows/prizmkit-plan/assets/plan-template.md +115 -0
- package/bundled/skills-windows/prizmkit-plan/assets/spec-template.md +73 -0
- package/bundled/skills-windows/prizmkit-plan/references/clarify-guide.md +67 -0
- package/bundled/skills-windows/prizmkit-plan/references/verification-checklist.md +60 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/SKILL.md +115 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/assets/prizm-docs-format.md +613 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-init.md +45 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-rebuild.md +15 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-status.md +14 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-update.md +19 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-validate.md +17 -0
- package/bundled/skills-windows/prizmkit-retrospective/SKILL.md +87 -0
- package/bundled/skills-windows/prizmkit-retrospective/references/knowledge-injection-steps.md +50 -0
- package/bundled/skills-windows/prizmkit-retrospective/references/structural-sync-steps.md +43 -0
- package/bundled/skills-windows/prizmkit-test/SKILL.md +281 -0
- package/package.json +1 -1
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "prizmkit-plan"
|
|
3
|
+
description: "Specify and plan tasks: natural language → spec.md & plan.md with architecture and executable tasks. Use before /prizmkit-implement. Trigger on: 'specify', 'plan', 'new task', 'I want to add/build...', 'architect', 'design', 'break it down', 'create tasks'. (project)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PrizmKit Plan
|
|
7
|
+
|
|
8
|
+
A universal spec + plan generator. Takes a natural-language description of ANY development task (new feature, refactoring, bug fix, migration, etc.) and produces `spec.md` (WHAT/WHY) and `plan.md` (HOW) with executable tasks.
|
|
9
|
+
|
|
10
|
+
### When to Use
|
|
11
|
+
- Any non-trivial development task that benefits from written specification and planning
|
|
12
|
+
- Before `/prizmkit-implement` — to create the spec + task breakdown
|
|
13
|
+
- User says "specify", "plan", "new task", "I want to add...", "architect", "design", "break it down"
|
|
14
|
+
|
|
15
|
+
### When NOT to Use
|
|
16
|
+
- Config tweaks, typo fixes, trivial one-line changes → edit directly
|
|
17
|
+
- Simple changes where the developer already knows exactly what to do and the scope is ≤10 lines in a single file
|
|
18
|
+
|
|
19
|
+
## Input
|
|
20
|
+
|
|
21
|
+
| Parameter | Required | Description |
|
|
22
|
+
|-----------|----------|-------------|
|
|
23
|
+
| `description` | Yes | Natural-language description of the task |
|
|
24
|
+
| `artifact_dir` | No | Directory to write spec.md + plan.md into. If omitted, auto-generates under `.prizmkit/specs/` (see Phase 0 Step 2). |
|
|
25
|
+
|
|
26
|
+
## Execution
|
|
27
|
+
|
|
28
|
+
### Phase 0: Specify (→ spec.md)
|
|
29
|
+
|
|
30
|
+
**Skip condition**: If `spec.md` already exists in the artifact directory, skip to Phase 1.
|
|
31
|
+
|
|
32
|
+
**Steps:**
|
|
33
|
+
|
|
34
|
+
1. Gather input: read the task description. If no description is provided and interactive session is available, ask the user; otherwise abort with an error.
|
|
35
|
+
2. Determine artifact directory:
|
|
36
|
+
- If `artifact_dir` is provided → use it directly
|
|
37
|
+
- If not provided → scan `.prizmkit/specs/` for existing `###-*` directories, find highest numeric prefix, next = highest + 1 (zero-padded to 3 digits; start at `001` if empty). Create `.prizmkit/specs/###-task-slug/`
|
|
38
|
+
- Auto-generate 2-10 word task slug from description
|
|
39
|
+
3. Load project context: read `.prizmkit/prizm-docs/root.prizm` and relevant L1/L2 docs
|
|
40
|
+
4. Generate `spec.md` from template (`${SKILL_DIR}/assets/spec-template.md`):
|
|
41
|
+
- Fill sections based on the task description — all sections are optional, include only what is relevant
|
|
42
|
+
- `[NEEDS CLARIFICATION]` markers for all ambiguous items
|
|
43
|
+
5. **Database design detection**: If changes involve data persistence (new entities, fields, schema changes), add `## Data Model` section — scan existing schema files to extract naming conventions, ID strategy, constraint patterns. Mark uncertain decisions with `[NEEDS CLARIFICATION]`.
|
|
44
|
+
6. Run quality validation : all goals have criteria? scope defined? DB conventions documented (if applicable)?
|
|
45
|
+
7. **Auto-clarification**: If any `[NEEDS CLARIFICATION]` markers remain and interactive session is available, enter interactive clarification.
|
|
46
|
+
→ Read `${SKILL_DIR}/references/clarify-guide.md` for question strategy and update rules.
|
|
47
|
+
If non-interactive, resolve ambiguities by choosing the most conservative option and annotating the decision.
|
|
48
|
+
Resolve all markers before proceeding to Phase 1.
|
|
49
|
+
|
|
50
|
+
**Writing principles**: Focus on WHAT and WHY, never HOW. Every goal needs acceptance criteria. Scope boundaries must be explicit. Mark all genuine ambiguities — the clarification phase resolves them.
|
|
51
|
+
|
|
52
|
+
**Internal ID hygiene**: PrizmKit IDs (`F-001`, `B-001`, `R-001`), task IDs (`T-100`), session IDs, run IDs, branch names, absolute worktree paths, and `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths are internal tracking metadata. They may appear in specs, plans, commit messages, and non-memory pipeline artifacts, but must never be written to `.prizmkit/prizm-docs/`, user-visible product copy, UI text, API responses, or expected UI strings in tests. If a behavior is scoped to the current feature, describe the product behavior without the ID.
|
|
53
|
+
|
|
54
|
+
### Phase 1: Design (spec.md → plan.md)
|
|
55
|
+
|
|
56
|
+
**Precondition**: `spec.md` exists in the artifact directory.
|
|
57
|
+
|
|
58
|
+
**Steps:**
|
|
59
|
+
|
|
60
|
+
1. Read `spec.md` from the artifact directory
|
|
61
|
+
2. Load project context if not already loaded in Phase 0: read `.prizmkit/prizm-docs/root.prizm` and relevant L1/L2 docs
|
|
62
|
+
3. Resolve any remaining `[NEEDS CLARIFICATION]` by proposing solutions
|
|
63
|
+
4. Generate `plan.md` from template (`${SKILL_DIR}/assets/plan-template.md`):
|
|
64
|
+
- Change approach (how the changes integrate with existing system)
|
|
65
|
+
- Component / file changes
|
|
66
|
+
- Data model changes (with **database design gate** — read ALL existing schema files, ensure new schema follows existing patterns, resolve all DB ambiguities inline before proceeding)
|
|
67
|
+
- Interface design (API endpoints, request/response formats)
|
|
68
|
+
- Testing strategy
|
|
69
|
+
- Risk assessment
|
|
70
|
+
- Behavior preservation strategy (if the task modifies existing behavior — include what must remain unchanged and how to verify)
|
|
71
|
+
5. Cross-check: every goal in spec.md maps to plan components — unmapped goals = coverage gaps
|
|
72
|
+
6. Check alignment with `.prizmkit/prizm-docs/root.prizm` RULES section
|
|
73
|
+
|
|
74
|
+
### Phase 2: Task Generation (plan.md → Tasks section)
|
|
75
|
+
|
|
76
|
+
1. If interactive session is available, ask user for strategy; otherwise infer automatically: MVP-first / Incremental / Parallel
|
|
77
|
+
2. Append `## Tasks` section to `plan.md` using template in `${SKILL_DIR}/assets/plan-template.md`:
|
|
78
|
+
- Phases: Setup (T-001~T-009) → Foundation (T-010~T-099) → Core (T-100+) → Polish (T-900+)
|
|
79
|
+
- Each task: `- [ ] [T-NNN] [P?] [G-N?] Description — file: path/to/file`
|
|
80
|
+
- Checkpoint tasks between phases for validation
|
|
81
|
+
- Organize Core tasks by goals (G-1, G-2, ...) or by logical grouping appropriate to the task
|
|
82
|
+
3. Verify consistency and coverage → read `${SKILL_DIR}/references/verification-checklist.md` and run all checks. Fix any issues inline before output.
|
|
83
|
+
4. Output: `plan.md` path, summary of design decisions, task count.
|
|
84
|
+
|
|
85
|
+
**HANDOFF:** `/prizmkit-implement`
|
|
86
|
+
|
|
87
|
+
## Examples
|
|
88
|
+
|
|
89
|
+
### Example 1: New Feature
|
|
90
|
+
|
|
91
|
+
**Input:** "I want users to upload avatars"
|
|
92
|
+
|
|
93
|
+
**Phase 0 output:** `.prizmkit/specs/003-user-avatar/spec.md`
|
|
94
|
+
```markdown
|
|
95
|
+
# User Avatar Upload
|
|
96
|
+
## Overview
|
|
97
|
+
Allow registered users to upload and manage profile pictures.
|
|
98
|
+
## Goals
|
|
99
|
+
### G-1: Upload Avatar
|
|
100
|
+
As a registered user, I want to upload a profile picture,
|
|
101
|
+
so that other users can visually identify me.
|
|
102
|
+
**Acceptance Criteria:**
|
|
103
|
+
- Given I am on my profile page
|
|
104
|
+
- When I select an image file and click upload
|
|
105
|
+
- Then my avatar is updated and visible across the platform
|
|
106
|
+
## Scope
|
|
107
|
+
- **In scope:** Upload, display, remove avatar; image format validation
|
|
108
|
+
- **Out of scope:** Image cropping/editing, avatar history
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Phase 1-2 output:** `plan.md` excerpt:
|
|
112
|
+
```markdown
|
|
113
|
+
## Tasks
|
|
114
|
+
### Phase: Foundation (T-010~T-019)
|
|
115
|
+
- [ ] [T-010] [G-1] Add avatar_url field to User model — file: src/models/user.ts
|
|
116
|
+
- [ ] [T-011] [G-1] Create S3 upload utility — file: src/lib/s3.ts
|
|
117
|
+
### Phase: Core [P] (T-100~T-109)
|
|
118
|
+
- [ ] [T-100] [P] [G-1] POST /api/avatar upload endpoint — file: src/routes/avatar.ts
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Example 2: Refactoring
|
|
122
|
+
|
|
123
|
+
**Input:** "Extract shared auth middleware from the API routes"
|
|
124
|
+
|
|
125
|
+
**Phase 0 output:** `.prizmkit/specs/004-extract-auth-middleware/spec.md`
|
|
126
|
+
```markdown
|
|
127
|
+
# Extract Auth Middleware
|
|
128
|
+
## Overview
|
|
129
|
+
Consolidate duplicated authentication logic scattered across route files into a single shared middleware.
|
|
130
|
+
## Goals
|
|
131
|
+
### G-1: Extract Shared Authentication Logic
|
|
132
|
+
Consolidate duplicated auth checks from 5 route files into a single middleware module.
|
|
133
|
+
**Acceptance Criteria:**
|
|
134
|
+
- All existing auth-related tests pass without modification
|
|
135
|
+
- Auth logic exists in exactly one file (src/middleware/auth.ts)
|
|
136
|
+
- No route file contains inline token verification
|
|
137
|
+
## Scope
|
|
138
|
+
- **In scope:** src/routes/users.ts, orders.ts, admin.ts, payments.ts, profile.ts
|
|
139
|
+
- **Out of scope:** Authorization (role-based access), rate limiting
|
|
140
|
+
## Behavior Preservation
|
|
141
|
+
- All 23 existing API tests must pass unchanged
|
|
142
|
+
- Response formats and HTTP status codes must not change
|
|
143
|
+
- Error message strings must remain identical
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Example 3: Bug Fix
|
|
147
|
+
|
|
148
|
+
**Input:** "Login page crashes when API returns 401"
|
|
149
|
+
|
|
150
|
+
**Phase 0 output:** `.prizmkit/specs/005-login-401-crash/spec.md`
|
|
151
|
+
```markdown
|
|
152
|
+
# Fix: Login Crash on 401 Response
|
|
153
|
+
## Overview
|
|
154
|
+
Login page throws unhandled exception when auth API returns 401, causing a white screen.
|
|
155
|
+
## Goals
|
|
156
|
+
### G-1: Handle 401 Response Gracefully
|
|
157
|
+
When the auth API returns 401, display an error message instead of crashing.
|
|
158
|
+
**Acceptance Criteria:**
|
|
159
|
+
- Given user submits invalid credentials, When API returns 401, Then error message "Invalid credentials" is displayed
|
|
160
|
+
- Given user submits invalid credentials, When API returns 401, Then no unhandled exception is thrown
|
|
161
|
+
## Root Cause
|
|
162
|
+
- Error classification: Runtime
|
|
163
|
+
- Root cause: `AuthService.handleLogin()` at src/services/auth.ts:42 does not handle null token
|
|
164
|
+
- Affected files: src/services/auth.ts (L42), src/pages/login.tsx (L28)
|
|
165
|
+
## Scope
|
|
166
|
+
- **In scope:** Null handling in auth service, error display in login page
|
|
167
|
+
- **Out of scope:** Other HTTP error codes (403, 500), auth flow redesign
|
|
168
|
+
## Behavior Preservation
|
|
169
|
+
- All existing login success tests must pass unchanged
|
|
170
|
+
- Auth token flow for valid credentials must not change
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## References
|
|
174
|
+
|
|
175
|
+
- Spec template: `${SKILL_DIR}/assets/spec-template.md`
|
|
176
|
+
- Plan template: `${SKILL_DIR}/assets/plan-template.md`
|
|
177
|
+
- Clarification guide: `${SKILL_DIR}/references/clarify-guide.md`
|
|
178
|
+
- Verification checklist: `${SKILL_DIR}/references/verification-checklist.md`
|
|
179
|
+
|
|
180
|
+
## Output
|
|
181
|
+
|
|
182
|
+
| Directory | Files |
|
|
183
|
+
|---|---|
|
|
184
|
+
| `artifact_dir` (provided or auto-generated `.prizmkit/specs/###-slug/`) | `spec.md` + `plan.md` |
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Plan: [TITLE]
|
|
2
|
+
|
|
3
|
+
## Change Approach
|
|
4
|
+
[Description of the technical approach — how these changes integrate with the existing system]
|
|
5
|
+
|
|
6
|
+
## Component Design
|
|
7
|
+
|
|
8
|
+
### New Components
|
|
9
|
+
- [Component]: [Purpose]
|
|
10
|
+
|
|
11
|
+
### Modified Components
|
|
12
|
+
- [Component]: [What changes and why]
|
|
13
|
+
|
|
14
|
+
## Behavior Preservation Strategy
|
|
15
|
+
<!-- Include when the task modifies existing behavior. Delete if not applicable (e.g., greenfield feature). -->
|
|
16
|
+
<!-- Strategy: one of test-gate / snapshot / manual -->
|
|
17
|
+
<!-- test-gate: all tests must pass after each task -->
|
|
18
|
+
<!-- snapshot: before-after comparison of outputs -->
|
|
19
|
+
<!-- manual: reviewer verification at checkpoints -->
|
|
20
|
+
- Strategy: [test-gate / snapshot / manual]
|
|
21
|
+
- Baseline: [describe green test suite or snapshot state]
|
|
22
|
+
|
|
23
|
+
## Data Model
|
|
24
|
+
<!-- Include when changes involve database / data persistence. Delete if not applicable. -->
|
|
25
|
+
<!-- IMPORTANT: Read existing schema/model files BEFORE designing new tables -->
|
|
26
|
+
|
|
27
|
+
### Existing Schema Audit
|
|
28
|
+
<!-- List existing tables/models reviewed. Note observed conventions. -->
|
|
29
|
+
- Tables reviewed: [list tables examined]
|
|
30
|
+
- Naming convention: [snake_case/camelCase — document what existing schema uses]
|
|
31
|
+
- ID strategy: [UUID/auto-increment/CUID — match existing]
|
|
32
|
+
- Timestamp fields: [created_at/updated_at pattern — match existing]
|
|
33
|
+
- Soft delete: [yes/no, field name if applicable]
|
|
34
|
+
- Constraint patterns: [NOT NULL defaults, UNIQUE patterns, index conventions]
|
|
35
|
+
|
|
36
|
+
### Schema Changes
|
|
37
|
+
| Entity | Type | Fields | Constraints | Relationships | Migration Notes |
|
|
38
|
+
|--------|------|--------|-------------|---------------|-----------------|
|
|
39
|
+
| [name] | new/modify | [field: type, ...] | [NOT NULL, UNIQUE, INDEX, ...] | [FK → existing_table(id)] | [migration strategy] |
|
|
40
|
+
|
|
41
|
+
### Style Conformance Checklist
|
|
42
|
+
- [ ] Table/column naming matches existing conventions
|
|
43
|
+
- [ ] ID strategy consistent with existing tables
|
|
44
|
+
- [ ] Timestamp fields follow existing patterns
|
|
45
|
+
- [ ] Foreign key constraints and indexes defined
|
|
46
|
+
- [ ] Soft delete strategy matches existing pattern (if applicable)
|
|
47
|
+
- [ ] All fields have explicit nullability (NOT NULL or nullable)
|
|
48
|
+
|
|
49
|
+
### Unresolved Questions
|
|
50
|
+
<!-- NONE — all DB design questions must be resolved inline before proceeding to Tasks -->
|
|
51
|
+
|
|
52
|
+
## Interface Design
|
|
53
|
+
[API endpoints, request/response formats, module interfaces — include all details here]
|
|
54
|
+
|
|
55
|
+
## Integration Points
|
|
56
|
+
- [Service/Module]: [How integrated]
|
|
57
|
+
|
|
58
|
+
## Testing Strategy
|
|
59
|
+
- Unit: [Approach]
|
|
60
|
+
- Integration: [Approach]
|
|
61
|
+
- E2E: [Approach]
|
|
62
|
+
|
|
63
|
+
## Risk Assessment
|
|
64
|
+
| Risk | Impact | Mitigation |
|
|
65
|
+
|------|--------|------------|
|
|
66
|
+
| [Risk] | [H/M/L] | [Plan] |
|
|
67
|
+
|
|
68
|
+
## Deployment Considerations
|
|
69
|
+
<!-- Include when there is deployment impact (new services, infra, environment changes). Delete if not applicable. -->
|
|
70
|
+
|
|
71
|
+
### New Infrastructure Requirements
|
|
72
|
+
- [Component]: [Deployment target from config deploy_strategy] — [any special config needed]
|
|
73
|
+
|
|
74
|
+
### New Environment Variables
|
|
75
|
+
| Variable | Required | Description | Example |
|
|
76
|
+
|----------|----------|-------------|---------|
|
|
77
|
+
| [VAR_NAME] | yes/no | [Purpose] | [example value] |
|
|
78
|
+
|
|
79
|
+
### Deployment Impact
|
|
80
|
+
- [ ] No infrastructure changes needed (skip this section)
|
|
81
|
+
- [ ] New service/container required
|
|
82
|
+
- [ ] New environment variables added
|
|
83
|
+
- [ ] Database migration required in production
|
|
84
|
+
- [ ] CI/CD pipeline update needed
|
|
85
|
+
|
|
86
|
+
## Pre-Implementation Gates
|
|
87
|
+
- [ ] Spec coverage: all goals mapped to components
|
|
88
|
+
- [ ] Data model reviewed — existing schema conventions documented and followed (if applicable)
|
|
89
|
+
- [ ] All `[NEEDS CLARIFICATION]` items resolved
|
|
90
|
+
- [ ] Testing approach agreed
|
|
91
|
+
- [ ] Behavior preservation strategy defined (if modifying existing behavior)
|
|
92
|
+
- [ ] Root cause confirmed with reproduction test design (if fixing a defect)
|
|
93
|
+
|
|
94
|
+
## Tasks
|
|
95
|
+
|
|
96
|
+
### Strategy: [MVP-first | Incremental | Parallel]
|
|
97
|
+
|
|
98
|
+
### Phase: Setup
|
|
99
|
+
- [ ] [T-001] [Description] — file: [path]
|
|
100
|
+
|
|
101
|
+
### Phase: Foundation
|
|
102
|
+
- [ ] [T-010] [Description] — file: [path]
|
|
103
|
+
|
|
104
|
+
### Phase: Core
|
|
105
|
+
<!-- Organize by goals (G-1, G-2, ...) or by logical grouping appropriate to the task -->
|
|
106
|
+
- [ ] [T-100] [P] [G-1] [Task description] — file: [path]
|
|
107
|
+
|
|
108
|
+
### Phase: Polish
|
|
109
|
+
- [ ] [T-900] Final verification
|
|
110
|
+
- [ ] [T-901] Documentation update
|
|
111
|
+
|
|
112
|
+
### Checkpoints
|
|
113
|
+
- [ ] [CP-1] After Setup: project builds and tests pass
|
|
114
|
+
- [ ] [CP-2] After Foundation: base changes verified
|
|
115
|
+
- [ ] [CP-3] After each Core group: acceptance criteria pass
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# [TITLE]
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
[One paragraph describing the purpose and motivation]
|
|
5
|
+
|
|
6
|
+
## Goals
|
|
7
|
+
|
|
8
|
+
### G-1: [Goal Title]
|
|
9
|
+
[Goal description — use whatever format best suits the task:
|
|
10
|
+
- User Story format: "As a [role], I want [capability], so that [benefit]."
|
|
11
|
+
- Objective format: "Objective: [change to make]. Target state: [desired outcome]."
|
|
12
|
+
- Fix format: "Fix: [symptom]. Root cause: [brief cause]."
|
|
13
|
+
- Or any other clear format.]
|
|
14
|
+
|
|
15
|
+
**Acceptance Criteria:**
|
|
16
|
+
- [ ] [Criterion 1 — Given/When/Then, or a concrete verifiable statement]
|
|
17
|
+
|
|
18
|
+
## Scope
|
|
19
|
+
|
|
20
|
+
### In Scope
|
|
21
|
+
- [Item 1]
|
|
22
|
+
|
|
23
|
+
### Out of Scope
|
|
24
|
+
- [Item 1]
|
|
25
|
+
|
|
26
|
+
## Behavior Preservation
|
|
27
|
+
<!-- Include this section when the task modifies existing behavior (refactoring, bug fixes, migrations, etc.). Delete if not applicable. -->
|
|
28
|
+
- [What behavior / contracts / interfaces must remain unchanged]
|
|
29
|
+
- [Existing test suites that must continue to pass]
|
|
30
|
+
|
|
31
|
+
## Root Cause
|
|
32
|
+
<!-- Include this section when the task is fixing a defect. Delete if not applicable. -->
|
|
33
|
+
- Error classification: [Runtime / Network / Auth / Data / Logic / Config / External]
|
|
34
|
+
- Root cause: [specific code location and mechanism]
|
|
35
|
+
- Affected files: [file list with line numbers]
|
|
36
|
+
- Impact: [blast radius — which modules / features are affected]
|
|
37
|
+
|
|
38
|
+
## Dependencies
|
|
39
|
+
- [Dependency 1]: [Why needed]
|
|
40
|
+
|
|
41
|
+
## Data Model
|
|
42
|
+
<!-- Include this section when changes involve database / data persistence. Delete if not applicable. -->
|
|
43
|
+
|
|
44
|
+
### Existing Schema Reference
|
|
45
|
+
<!-- Read existing schema/model files BEFORE designing new tables. Document observed conventions here. -->
|
|
46
|
+
- Tables reviewed: [list existing tables related to this change]
|
|
47
|
+
- Naming convention: [snake_case/camelCase — match existing]
|
|
48
|
+
- ID strategy: [UUID/auto-increment — match existing]
|
|
49
|
+
- Timestamp pattern: [created_at/updated_at — match existing]
|
|
50
|
+
- Soft delete: [yes/no, field name — match existing]
|
|
51
|
+
|
|
52
|
+
### New/Modified Entities
|
|
53
|
+
| Entity | Type (new/modify) | Key Fields | Relationships | Constraints |
|
|
54
|
+
|--------|-------------------|------------|---------------|-------------|
|
|
55
|
+
| [entity_name] | new | [field: type] | [FK to existing_table] | [NOT NULL, UNIQUE, etc.] |
|
|
56
|
+
|
|
57
|
+
### Open Data Model Questions
|
|
58
|
+
<!-- All questions here MUST be resolved before /prizmkit-plan generates Tasks -->
|
|
59
|
+
- [NEEDS CLARIFICATION] [Any uncertain data model decisions — field types, nullability, relationships]
|
|
60
|
+
|
|
61
|
+
## Constraints
|
|
62
|
+
- [Constraint 1]
|
|
63
|
+
|
|
64
|
+
## Clarifications
|
|
65
|
+
[NEEDS CLARIFICATION]: [Ambiguous item]
|
|
66
|
+
|
|
67
|
+
## Review Checklist
|
|
68
|
+
- [ ] All goals have acceptance criteria
|
|
69
|
+
- [ ] Scope boundaries are clearly defined
|
|
70
|
+
- [ ] Dependencies are identified
|
|
71
|
+
- [ ] No implementation details (WHAT not HOW)
|
|
72
|
+
- [ ] Behavior preservation defined (if modifying existing behavior)
|
|
73
|
+
- [ ] Root cause identified with evidence (if fixing a defect)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Clarification Phase — Execution Guide
|
|
2
|
+
|
|
3
|
+
Invoked automatically during `/prizmkit-plan` Phase 0 (specify) when `[NEEDS CLARIFICATION]` markers exist, or during Phase 1 (design) when data model ambiguities arise.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Question Strategy
|
|
8
|
+
|
|
9
|
+
**Ask one question at a time.** Batching questions produces lower-quality answers.
|
|
10
|
+
|
|
11
|
+
For each question:
|
|
12
|
+
1. Cite the exact location in spec.md (e.g., "§Goals G-1 says..." or "§Scope says...")
|
|
13
|
+
2. State what is ambiguous and why it matters for implementation
|
|
14
|
+
3. Provide a **recommended answer** with rationale — gives the user a concrete starting point to accept, modify, or reject
|
|
15
|
+
|
|
16
|
+
**Prioritize by implementation impact** (highest first):
|
|
17
|
+
1. Data model (entities, relationships, field types, constraints, naming) — **hardest to change after code is written**
|
|
18
|
+
2. Functional scope boundaries
|
|
19
|
+
3. UX flow and error handling
|
|
20
|
+
4. Non-functional requirements (performance, security)
|
|
21
|
+
5. Edge cases and integration points
|
|
22
|
+
|
|
23
|
+
## Update Discipline
|
|
24
|
+
|
|
25
|
+
After **each** user answer:
|
|
26
|
+
- Immediately update `spec.md` (do not batch at the end)
|
|
27
|
+
- Remove the resolved `[NEEDS CLARIFICATION]` marker
|
|
28
|
+
- Re-evaluate for new ambiguities exposed by the answer
|
|
29
|
+
|
|
30
|
+
## No Limits Policy
|
|
31
|
+
|
|
32
|
+
**There is no cap on rounds or questions.** Keep asking until:
|
|
33
|
+
- All `[NEEDS CLARIFICATION]` markers are removed, AND
|
|
34
|
+
- No vague or underspecified areas remain, AND
|
|
35
|
+
- You are fully confident about the requirements
|
|
36
|
+
|
|
37
|
+
If the user's answer raises new questions — ask those too. If a previously-resolved item needs revisiting due to new context — go back.
|
|
38
|
+
|
|
39
|
+
## Early Termination
|
|
40
|
+
|
|
41
|
+
If the user says "done", "stop", or "enough" — end immediately and output a summary of:
|
|
42
|
+
- What was resolved
|
|
43
|
+
- What remains unclear (list any open `[NEEDS CLARIFICATION]` items)
|
|
44
|
+
|
|
45
|
+
## Example Exchange
|
|
46
|
+
|
|
47
|
+
**Question:**
|
|
48
|
+
> §Goals G-1 says "User can upload files" but doesn't specify file types or size limits.
|
|
49
|
+
>
|
|
50
|
+
> **Recommended:** Accept JPEG, PNG, PDF up to 10MB — covers common use cases without straining storage.
|
|
51
|
+
>
|
|
52
|
+
> Do you agree, or different constraints?
|
|
53
|
+
|
|
54
|
+
**User:** "Also allow SVG, make it 25MB"
|
|
55
|
+
|
|
56
|
+
**Action:** Update spec.md §Goals G-1 → `File upload: JPEG, PNG, PDF, SVG. Max 25MB per file.` Remove marker.
|
|
57
|
+
|
|
58
|
+
**Follow-up question triggered by answer:**
|
|
59
|
+
> SVGs can contain embedded scripts (XSS risk). Should uploaded SVGs be sanitized (strip `<script>` + event handlers), or restricted to trusted users only?
|
|
60
|
+
>
|
|
61
|
+
> **Recommended:** Sanitize all SVG uploads — allows all users to upload safely.
|
|
62
|
+
|
|
63
|
+
## Guidelines
|
|
64
|
+
|
|
65
|
+
- Stay at WHAT/WHY level — no implementation details (HOW) in spec
|
|
66
|
+
- If an answer contradicts an existing requirement, surface the conflict and ask which takes precedence
|
|
67
|
+
- If the user seems fatigued: "I have N more questions — continue now or later?" — but never silently stop with unresolved ambiguities
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Verification Checklist — Spec & Plan Consistency
|
|
2
|
+
|
|
3
|
+
Run this checklist after generating the Tasks section in plan.md. Fix any issues inline before outputting the final plan.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Coverage
|
|
8
|
+
|
|
9
|
+
- [ ] Every goal (G-N) in spec.md has at least one task in plan.md
|
|
10
|
+
- [ ] Every task has a target file path (`— file: path/to/file`)
|
|
11
|
+
- [ ] Risk assessment contains at least one risk with a mitigation plan
|
|
12
|
+
- [ ] If spec includes `## Behavior Preservation` → at least one verification task exists
|
|
13
|
+
- [ ] If spec includes `## Root Cause` → at least one reproduction test task exists
|
|
14
|
+
|
|
15
|
+
## Duplication Detection
|
|
16
|
+
|
|
17
|
+
- [ ] No near-duplicate requirements exist across spec.md sections (same intent, different wording)
|
|
18
|
+
- [ ] If duplicates found, consolidate to the clearer phrasing and remove the other
|
|
19
|
+
|
|
20
|
+
## Orphan Detection
|
|
21
|
+
|
|
22
|
+
- [ ] No task exists without a mapped goal (orphan task)
|
|
23
|
+
- [ ] No plan component exists without a corresponding spec requirement
|
|
24
|
+
|
|
25
|
+
## Ambiguity Scan
|
|
26
|
+
|
|
27
|
+
- [ ] No unresolved `[NEEDS CLARIFICATION]`, TBD, TODO, or `???` markers remain
|
|
28
|
+
- [ ] No vague criteria without measurable thresholds (e.g., "fast", "secure", "scalable", "intuitive" — replace with concrete numbers or conditions)
|
|
29
|
+
|
|
30
|
+
## Terminology Consistency
|
|
31
|
+
|
|
32
|
+
- [ ] Same concept uses the same name in both spec.md and plan.md (no terminology drift)
|
|
33
|
+
- [ ] Data entities referenced in plan.md exist in spec.md (and vice versa)
|
|
34
|
+
|
|
35
|
+
## Task Ordering
|
|
36
|
+
|
|
37
|
+
- [ ] No task references the output of a later task without an explicit dependency note
|
|
38
|
+
- [ ] Foundation tasks precede Core tasks that depend on them
|
|
39
|
+
- [ ] Checkpoint tasks exist between phases
|
|
40
|
+
|
|
41
|
+
## Rules Alignment
|
|
42
|
+
|
|
43
|
+
- [ ] No spec or plan element conflicts with `.prizmkit/prizm-docs/root.prizm` RULES MUST/NEVER directives
|
|
44
|
+
- [ ] Tech stack choices in plan.md match `.prizmkit/prizm-docs/root.prizm` TECH_STACK (if defined)
|
|
45
|
+
|
|
46
|
+
## Database Design (skip if no Data Model section)
|
|
47
|
+
|
|
48
|
+
- [ ] New entity/field naming follows conventions documented in "Existing Schema Audit"
|
|
49
|
+
- [ ] All fields have explicit nullability (NOT NULL or nullable)
|
|
50
|
+
- [ ] Foreign key constraints and indexes are defined
|
|
51
|
+
- [ ] ID strategy and timestamp patterns match existing tables
|
|
52
|
+
- [ ] No unresolved questions remain in Data Model "Unresolved Questions" section
|
|
53
|
+
- [ ] Style Conformance Checklist in plan.md is fully checked
|
|
54
|
+
|
|
55
|
+
## Action on Failure
|
|
56
|
+
|
|
57
|
+
If any check fails:
|
|
58
|
+
1. Fix the issue directly in spec.md or plan.md
|
|
59
|
+
2. Re-run the failed checks only
|
|
60
|
+
3. Do not proceed to output until all checks pass
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "prizmkit-prizm-docs"
|
|
3
|
+
description: "Project documentation specification and standard for AI-optimized progressive context loading. Defines the .prizmkit/prizm-docs/ 3-level hierarchy (L0/L1/L2), format rules, size limits, and loading protocol. Use this skill to: bootstrap docs for new projects (init), check doc freshness (status), regenerate stale modules (rebuild), validate format compliance (validate), or migrate existing docs (migrate). For incremental doc updates after code changes, use /prizmkit-retrospective instead — it is the sole writer of .prizmkit/prizm-docs/ during development. Trigger on: 'initialize docs', 'check doc status', 'rebuild docs', 'validate docs', 'migrate docs', 'docs are stale', 'prizm docs'. (project)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Prizm Docs - AI Documentation Framework
|
|
7
|
+
|
|
8
|
+
Full specification: ${SKILL_DIR}/assets/prizm-docs-format.md
|
|
9
|
+
|
|
10
|
+
## Intent Routing
|
|
11
|
+
|
|
12
|
+
This skill handles 6 operations. When invoked, determine the user's intent and execute the matching operation:
|
|
13
|
+
|
|
14
|
+
| User Intent | Operation | Trigger Phrases |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| Bootstrap new project docs | **Init** | "initialize docs", "set up prizm docs", "bootstrap documentation" |
|
|
17
|
+
| Sync docs after code changes | **Update** | "update docs", "sync documentation", "docs are stale" |
|
|
18
|
+
| Check doc freshness | **Status** | "check docs", "are docs up to date", "doc status" |
|
|
19
|
+
| Regenerate module docs | **Rebuild** | "rebuild docs for X", "regenerate module docs" |
|
|
20
|
+
| Check format compliance | **Validate** | "validate docs", "check doc format", "docs valid?" |
|
|
21
|
+
| Convert existing docs | **Migrate** | "migrate docs", "convert docs to prizm format" |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Role Clarification
|
|
26
|
+
|
|
27
|
+
**This skill vs `/prizmkit-retrospective`**:
|
|
28
|
+
|
|
29
|
+
| Aspect | `/prizmkit-prizm-docs` | `/prizmkit-retrospective` |
|
|
30
|
+
|--------|----------------------|--------------------------|
|
|
31
|
+
| **Role** | Documentation SPECIFICATION + BOOTSTRAP | Incremental WRITER during development |
|
|
32
|
+
| **When** | Project setup, health checks, migrations | After feature completion, before commit |
|
|
33
|
+
| **Writes** | Initial .prizmkit/prizm-docs/ structure (init, rebuild, migrate) | Incremental updates to existing .prizmkit/prizm-docs/ |
|
|
34
|
+
| **Reads** | Source code structure (for init/rebuild) | git diff + code changes (for sync) |
|
|
35
|
+
| **Knowledge** | Defines format rules, size limits, loading protocol | Extracts TRAPS/RULES/DECISIONS into `.prizmkit/prizm-docs/` |
|
|
36
|
+
|
|
37
|
+
**Key principle**: `/prizmkit-prizm-docs` defines WHAT the docs should look like and bootstraps them. `/prizmkit-retrospective` is the SOLE WRITER that keeps docs in sync with code during ongoing development.
|
|
38
|
+
|
|
39
|
+
## Operation: Init
|
|
40
|
+
|
|
41
|
+
Bootstrap .prizmkit/prizm-docs/ for the current project.
|
|
42
|
+
PRECONDITION: No .prizmkit/prizm-docs/ directory exists, or user confirms overwrite.
|
|
43
|
+
→ Read `${SKILL_DIR}/references/op-init.md` for detailed steps.
|
|
44
|
+
|
|
45
|
+
## Operation: Update
|
|
46
|
+
|
|
47
|
+
Update .prizmkit/prizm-docs/ to reflect recent code changes.
|
|
48
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists with root.prizm.
|
|
49
|
+
→ Read `${SKILL_DIR}/references/op-update.md` for detailed steps.
|
|
50
|
+
|
|
51
|
+
## Operation: Status
|
|
52
|
+
|
|
53
|
+
Check freshness of all .prizm docs.
|
|
54
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists with root.prizm.
|
|
55
|
+
→ Read `${SKILL_DIR}/references/op-status.md` for detailed steps.
|
|
56
|
+
|
|
57
|
+
## Operation: Rebuild
|
|
58
|
+
|
|
59
|
+
Regenerate docs for a specific module from scratch. Requires a module path argument.
|
|
60
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists. Module path is valid.
|
|
61
|
+
→ Read `${SKILL_DIR}/references/op-rebuild.md` for detailed steps.
|
|
62
|
+
|
|
63
|
+
## Operation: Validate
|
|
64
|
+
|
|
65
|
+
Check format compliance and consistency of all .prizm docs.
|
|
66
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists.
|
|
67
|
+
→ Read `${SKILL_DIR}/references/op-validate.md` for detailed steps.
|
|
68
|
+
|
|
69
|
+
## Operation: Migrate
|
|
70
|
+
|
|
71
|
+
Convert existing documentation to .prizmkit/prizm-docs/ format.
|
|
72
|
+
PRECONDITION: Existing docs/ or docs/AI_CONTEXT/ directory. No .prizmkit/prizm-docs/ (or user confirms overwrite).
|
|
73
|
+
|
|
74
|
+
STEPS:
|
|
75
|
+
1. DISCOVER existing docs: Scan docs/, docs/AI_CONTEXT/, README.md, ARCHITECTURE.md, and any structured documentation files.
|
|
76
|
+
2. EXTRACT information from existing docs: project metadata, module descriptions, architecture patterns, rules, decisions, dependencies.
|
|
77
|
+
3. MAP existing doc content to Prizm levels: project-wide info -> L0 root.prizm, module-level info -> L1 docs (MODULE, FILES, RESPONSIBILITY, KEY_FILES, DEPENDENCIES), detailed module info -> L2 docs (INTERFACES, DATA_FLOW, TRAPS, DECISIONS, domain-specific sections).
|
|
78
|
+
4. CONVERT prose content to KEY: value format. Strip markdown formatting, tables, diagrams. Condense explanatory text into single-line values.
|
|
79
|
+
5. GENERATE .prizmkit/prizm-docs/ structure following standard init procedure but seeded with extracted information instead of scanning source code alone.
|
|
80
|
+
6. VALIDATE migrated docs against Prizm format rules and size limits.
|
|
81
|
+
7. REPORT migration summary: files processed, content mapped, information that could not be automatically converted (requires manual review).
|
|
82
|
+
|
|
83
|
+
OUTPUT: Migration report with list of source docs processed, generated .prizm files, and any manual review items.
|
|
84
|
+
|
|
85
|
+
## Error Handling
|
|
86
|
+
|
|
87
|
+
- **root.prizm is corrupted or invalid format**: Back up the existing file, then run Rebuild on all modules to regenerate from source code.
|
|
88
|
+
- **Broken pointers (-> references to non-existent files)**: Create the missing .prizm file if the source module exists; remove the pointer if the source module was deleted.
|
|
89
|
+
- **Size limit exceeded**: For L0, consolidate MODULE_INDEX entries. For L1, move implementation details to L2. For L2, trim non-essential derived detail and keep only durable project knowledge.
|
|
90
|
+
- **No git history available**: Fall back to filesystem timestamps for freshness checks; warn user that accuracy may be reduced.
|
|
91
|
+
|
|
92
|
+
### Key Protocols (reference)
|
|
93
|
+
For detailed protocol specifications, see prizm-docs-format.md:
|
|
94
|
+
- Progressive Loading: Section 6.1
|
|
95
|
+
- Auto-Update: Section 7.1
|
|
96
|
+
- RULES hierarchy: Section 3.1
|
|
97
|
+
|
|
98
|
+
## Examples
|
|
99
|
+
|
|
100
|
+
**Init output (Node.js project):**
|
|
101
|
+
```
|
|
102
|
+
Generated .prizmkit/prizm-docs/:
|
|
103
|
+
root.prizm (L0) — 3 modules in MODULE_INDEX
|
|
104
|
+
routes.prizm (L1) — 12 files, 4 interfaces
|
|
105
|
+
models.prizm (L1) — 8 files, 3 interfaces
|
|
106
|
+
services.prizm (L1) — 15 files, 6 interfaces
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Update after adding new API endpoint:**
|
|
110
|
+
```
|
|
111
|
+
Changed: src/routes/avatar.ts (A), src/models/user.ts (M)
|
|
112
|
+
Updated: .prizmkit/prizm-docs/routes.prizm — added avatar.ts to KEY_FILES, new POST /api/avatar interface
|
|
113
|
+
Updated: .prizmkit/prizm-docs/models.prizm — updated User interface with avatar_url field
|
|
114
|
+
Skipped: .prizmkit/prizm-docs/services.prizm — no changes in services module
|
|
115
|
+
```
|