prizmkit 1.0.138 → 1.0.139
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-tier1.md +15 -18
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +9 -15
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +10 -18
- package/bundled/skills/prizmkit-implement/SKILL.md +4 -1
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +2 -2
- package/bundled/skills/prizmkit-retrospective/SKILL.md +5 -3
- package/package.json +1 -1
package/bundled/VERSION.json
CHANGED
|
@@ -130,7 +130,7 @@ grep -q '^/binary-name$' .gitignore || echo '/binary-name' >> .gitignore
|
|
|
130
130
|
```
|
|
131
131
|
Never commit compiled binaries, build output, or generated artifacts.
|
|
132
132
|
|
|
133
|
-
**
|
|
133
|
+
**3a.** Detect the test command and record baseline:
|
|
134
134
|
```bash
|
|
135
135
|
# Try in order, use first that exits 0
|
|
136
136
|
node --test tests/**/*.test.js 2>&1 | tail -3 # Node built-in
|
|
@@ -141,26 +141,22 @@ Record the working command as `TEST_CMD`. Then record baseline failures (if any)
|
|
|
141
141
|
$TEST_CMD 2>&1 | tee /tmp/test-baseline.txt | tail -20
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
144
|
+
**3b.** Run `/prizmkit-implement` — this handles the full implementation cycle:
|
|
145
|
+
- Reads plan.md Tasks section from `.prizmkit/specs/{{FEATURE_SLUG}}/`
|
|
146
|
+
- Reads context from `context-snapshot.md` (Prizm docs, TRAPS, file manifest)
|
|
147
|
+
- Implements task-by-task with TDD, marking each `[x]` immediately
|
|
148
|
+
- Creates/updates L2 `.prizm` docs when creating new modules or significantly modifying existing ones — AI selectively decides which modules warrant L2 based on complexity and importance
|
|
149
|
+
- Runs tests using `TEST_CMD` after each task
|
|
150
|
+
- Writes '## Implementation Log' to `context-snapshot.md`
|
|
149
151
|
|
|
150
|
-
After
|
|
151
|
-
1.
|
|
152
|
-
2.
|
|
153
|
-
3.
|
|
152
|
+
**3c.** After implement completes, verify:
|
|
153
|
+
1. All tasks in plan.md are `[x]`
|
|
154
|
+
2. Run the full test suite to ensure nothing is broken
|
|
155
|
+
3. Verify each acceptance criterion from Section 1 of context-snapshot.md is met — check mentally, do NOT re-read files you already wrote
|
|
156
|
+
4. If any criterion is not met, fix it now (max 2 fix rounds)
|
|
154
157
|
|
|
155
158
|
**CP-2**: All acceptance criteria met, all tests pass.
|
|
156
159
|
|
|
157
|
-
After verification, append to `context-snapshot.md`:
|
|
158
|
-
```
|
|
159
|
-
## Implementation Log
|
|
160
|
-
Files changed/created: [list]
|
|
161
|
-
Key decisions: [list]
|
|
162
|
-
```
|
|
163
|
-
|
|
164
160
|
{{IF_BROWSER_INTERACTION}}
|
|
165
161
|
### Phase 3.5: Browser Verification (playwright-cli)
|
|
166
162
|
|
|
@@ -188,7 +184,8 @@ If any step fails, log the failure and continue. Do NOT retry browser verificati
|
|
|
188
184
|
**4a.** Run `/prizmkit-retrospective` — maintains `.prizm-docs/` (architecture index):
|
|
189
185
|
1. **Structural sync**: Use `git diff --cached --name-status` to locate changed modules, update KEY_FILES/INTERFACES/DEPENDENCIES/file counts in affected `.prizm-docs/` files
|
|
190
186
|
2. **Architecture knowledge** (feature sessions only): Extract TRAPS/RULES/DECISIONS from completed work into `.prizm-docs/`
|
|
191
|
-
3.
|
|
187
|
+
3. **L2 coverage check**: For any module/sub-module with source files created or significantly modified in this session but no L2 `.prizm` doc — evaluate whether L2 is warranted and create if so. The current session has the best context for accurate KEY_FILES, TRAPS, and DECISIONS.
|
|
188
|
+
4. Stage doc changes: `git add .prizm-docs/`
|
|
192
189
|
⚠️ Do NOT commit here. Only stage.
|
|
193
190
|
|
|
194
191
|
**4b.** Stage all feature code explicitly (NEVER use `git add -A` or `git add .`):
|
|
@@ -194,20 +194,13 @@ Wait for Critic to return.
|
|
|
194
194
|
Spawn Dev subagent (Agent tool, subagent_type="prizm-dev-team-dev", run_in_background=false).
|
|
195
195
|
|
|
196
196
|
Prompt:
|
|
197
|
-
> "Read {{DEV_SUBAGENT_PATH}}. Implement feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}})
|
|
198
|
-
> **IMPORTANT**: Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST.
|
|
199
|
-
>
|
|
200
|
-
>
|
|
201
|
-
> 2.
|
|
202
|
-
> 3.
|
|
203
|
-
> 4.
|
|
204
|
-
> 5. After ALL tasks done, append '## Implementation Log' to context-snapshot.md with:
|
|
205
|
-
> - Files changed/created (with paths)
|
|
206
|
-
> - Key implementation decisions and rationale
|
|
207
|
-
> - Deviations from plan.md (if any)
|
|
208
|
-
> - Notable discoveries (unexpected behavior, hidden dependencies, new TRAPS)
|
|
209
|
-
> 6. Do NOT execute any git commands (no git add/commit/reset/push).
|
|
210
|
-
> 7. If `<TEST_CMD>` shows failures, check against BASELINE_FAILURES=`<BASELINE_FAILURES>`. Failures present in the baseline are pre-existing — list them explicitly in your COMPLETION_SIGNAL.
|
|
197
|
+
> "Read {{DEV_SUBAGENT_PATH}}. Implement feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
|
|
198
|
+
> **IMPORTANT**: Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has Prizm Context (TRAPS/RULES), Section 4 has File Manifest with paths and interfaces.
|
|
199
|
+
> ⚠️ DO NOT re-read source files already listed in Section 4 File Manifest unless you need implementation detail beyond the interface summary.
|
|
200
|
+
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full context.
|
|
201
|
+
> 2. Run `/prizmkit-implement` to execute the tasks in plan.md. Use `TEST_CMD=<TEST_CMD>` for testing. Baseline failures: `BASELINE_FAILURES=<BASELINE_FAILURES>`.
|
|
202
|
+
> 3. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
|
|
203
|
+
> 4. Do NOT execute any git commands (no git add/commit/reset/push).
|
|
211
204
|
> Do NOT exit until all tasks are [x] and the '## Implementation Log' section is written in context-snapshot.md."
|
|
212
205
|
|
|
213
206
|
Wait for Dev to return. All tasks must be `[x]`, tests pass.
|
|
@@ -302,7 +295,8 @@ If any step fails, log the failure and continue. Do NOT retry browser verificati
|
|
|
302
295
|
**6a.** Run `/prizmkit-retrospective` — maintains `.prizm-docs/` (architecture index):
|
|
303
296
|
1. **Structural sync**: Use `git diff --cached --name-status` to locate changed modules, update KEY_FILES/INTERFACES/DEPENDENCIES/file counts in affected `.prizm-docs/` files
|
|
304
297
|
2. **Architecture knowledge** (feature sessions only): Extract TRAPS/RULES/DECISIONS from completed work into `.prizm-docs/`
|
|
305
|
-
3.
|
|
298
|
+
3. **L2 coverage check**: For any module/sub-module with source files created or significantly modified in this session but no L2 `.prizm` doc — evaluate whether L2 is warranted and create if so. The current session has the best context for accurate KEY_FILES, TRAPS, and DECISIONS.
|
|
299
|
+
4. Stage doc changes: `git add .prizm-docs/`
|
|
306
300
|
⚠️ Do NOT commit here. Only stage.
|
|
307
301
|
|
|
308
302
|
**6b.** Stage all feature code explicitly (NEVER use `git add -A` or `git add .`):
|
|
@@ -274,20 +274,13 @@ grep -c '^\- \[ \]' .prizmkit/specs/{{FEATURE_SLUG}}/plan.md 2>/dev/null || echo
|
|
|
274
274
|
Spawn Dev agent (Agent tool, subagent_type="prizm-dev-team-dev", run_in_background=false).
|
|
275
275
|
|
|
276
276
|
Prompt:
|
|
277
|
-
> "Read {{DEV_SUBAGENT_PATH}}. Implement feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}})
|
|
278
|
-
> **IMPORTANT**: Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST.
|
|
279
|
-
>
|
|
280
|
-
>
|
|
281
|
-
> 2.
|
|
282
|
-
> 3.
|
|
283
|
-
> 4.
|
|
284
|
-
> 5. After ALL tasks done, append '## Implementation Log' to context-snapshot.md with:
|
|
285
|
-
> - Files changed/created (with paths)
|
|
286
|
-
> - Key implementation decisions and rationale
|
|
287
|
-
> - Deviations from plan.md (if any)
|
|
288
|
-
> - Notable discoveries (unexpected behavior, hidden dependencies, new TRAPS)
|
|
289
|
-
> 6. Do NOT execute any git commands (no git add/commit/reset/push).
|
|
290
|
-
> 7. If `<TEST_CMD>` shows failures, check against BASELINE_FAILURES=`<BASELINE_FAILURES>`. Failures present in the baseline are pre-existing — list them explicitly in your COMPLETION_SIGNAL.
|
|
277
|
+
> "Read {{DEV_SUBAGENT_PATH}}. Implement feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
|
|
278
|
+
> **IMPORTANT**: Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has Prizm Context (TRAPS/RULES), Section 4 has File Manifest with paths and interfaces.
|
|
279
|
+
> ⚠️ DO NOT re-read source files already listed in Section 4 File Manifest unless you need implementation detail beyond the interface summary.
|
|
280
|
+
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full context.
|
|
281
|
+
> 2. Run `/prizmkit-implement` to execute the tasks in plan.md. Use `TEST_CMD=<TEST_CMD>` for testing. Baseline failures: `BASELINE_FAILURES=<BASELINE_FAILURES>`.
|
|
282
|
+
> 3. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
|
|
283
|
+
> 4. Do NOT execute any git commands (no git add/commit/reset/push).
|
|
291
284
|
> Do NOT exit until all tasks are [x] and the '## Implementation Log' section is written in context-snapshot.md."
|
|
292
285
|
|
|
293
286
|
**Gate Check — Implementation Log**:
|
|
@@ -303,10 +296,8 @@ Wait for Dev to return. **If Dev times out before all tasks are `[x]`**:
|
|
|
303
296
|
> "Read {{DEV_SUBAGENT_PATH}}. You are resuming implementation of feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
|
|
304
297
|
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — Section 4 has File Manifest, 'Implementation Log' (if present) shows what was already done.
|
|
305
298
|
> 2. Run `git diff HEAD` to see actual code changes already made.
|
|
306
|
-
> 3.
|
|
307
|
-
> 4.
|
|
308
|
-
> 5. Append progress to '## Implementation Log' in context-snapshot.md.
|
|
309
|
-
> 6. Do NOT execute any git commands."
|
|
299
|
+
> 3. Run `/prizmkit-implement` to complete the remaining `[ ]` tasks. Use `TEST_CMD=<TEST_CMD>` for testing.
|
|
300
|
+
> 4. Do NOT execute any git commands."
|
|
310
301
|
3. Max 2 recovery retries. After 2 failures, orchestrator implements remaining tasks directly.
|
|
311
302
|
|
|
312
303
|
All tasks `[x]`, tests pass.
|
|
@@ -412,6 +403,7 @@ git log --oneline | grep "{{FEATURE_ID}}" | head -3
|
|
|
412
403
|
**6b.** Run `/prizmkit-retrospective` (**before commit**, maintains `.prizm-docs/` architecture index):
|
|
413
404
|
- **Structural sync**: update KEY_FILES/INTERFACES/DEPENDENCIES/file counts for changed modules
|
|
414
405
|
- **Architecture knowledge** (feature sessions only): extract TRAPS, RULES, DECISIONS from completed work into `.prizm-docs/`
|
|
406
|
+
- **L2 coverage check**: For any module/sub-module with source files created or significantly modified in this session but no L2 `.prizm` doc — evaluate whether L2 is warranted and create if so. The current session has the best context for accurate KEY_FILES, TRAPS, and DECISIONS.
|
|
415
407
|
- Stage doc changes: `git add .prizm-docs/`
|
|
416
408
|
⚠️ Do NOT commit here. Only stage.
|
|
417
409
|
- **For bug-fix sessions**: structural sync only, skip knowledge injection unless a genuinely new pitfall was discovered
|
|
@@ -39,7 +39,10 @@ Execute implementation by following the task breakdown in plan.md. Respects task
|
|
|
39
39
|
3. Check if checkpoint tasks are complete before proceeding to next phase
|
|
40
40
|
4. For each unchecked task in order:
|
|
41
41
|
a. If task has `[P]` marker, it can run in parallel with other `[P]` tasks in the same group
|
|
42
|
-
b. Read L2 doc for target file's module
|
|
42
|
+
b. Read L2 doc for target file's module. TRAPS save you from repeating known mistakes.
|
|
43
|
+
- If L2 exists: check TRAPS and DECISIONS before modifying files.
|
|
44
|
+
- If L2 does not exist and this task creates a new module directory or adds significant source files: create L2 using the L2 GENERATION TEMPLATE (see PRIZM-SPEC). Seed KEY_FILES and DEPENDENCIES from the files being created. TRAPS and DECISIONS can be minimal initially — `/prizmkit-retrospective` will enrich them.
|
|
45
|
+
- Judgment call: not every directory needs L2. Create L2 when the module has meaningful logic, non-obvious coupling, or design decisions worth preserving. Skip for trivial wrapper directories or single-config modules.
|
|
43
46
|
c. Apply TDD where applicable: write a failing test first, then implement until it passes. For UI components or configuration changes where unit tests don't apply, skip the test-first step.
|
|
44
47
|
d. Mark task as `[x]` in `plan.md` Tasks section immediately — not batched at the end. Immediate marking means the plan always reflects true progress, even if the session is interrupted.
|
|
45
48
|
e. After all tasks, append '## Implementation Log' to `context-snapshot.md` (if running in pipeline context): files changed/created, key decisions, notable discoveries.
|
|
@@ -76,7 +76,7 @@ STEPS:
|
|
|
76
76
|
3. Classify each change: A (added) -> new KEY_FILES entries. D (deleted) -> remove entries, update counts. M (modified) -> check dependency changes. R (renamed) -> update all path references.
|
|
77
77
|
4. Update affected docs: L2 first (KEY_FILES, INTERFACES, DATA_FLOW, DEPENDENCIES, TRAPS, CHANGELOG), then L1 (FILES count, KEY_FILES, DEPENDENCIES — L1 does NOT contain INTERFACES/DATA_FLOW/TRAPS/DECISIONS), then L0 (MODULE_INDEX counts, CROSS_CUTTING) only if structural change. No UPDATED timestamps — git tracks modification times.
|
|
78
78
|
5. Skip updates if: only internal implementation changed (no interface/dependency change), only comments/whitespace/formatting, only .prizm files changed. DO NOT skip test file changes or bug fixes — they may reveal TRAPS worth capturing in L2.
|
|
79
|
-
6. If new directory qualifies as a module (per MODULE_DISCOVERY_CRITERIA) and matches no existing module: create L1 immediately, add to MODULE_INDEX
|
|
79
|
+
6. If new directory qualifies as a module (per MODULE_DISCOVERY_CRITERIA) and matches no existing module: create L1 immediately, add to MODULE_INDEX. If the current diff includes Added or Modified source files in this module → also create L2 immediately using the L2 GENERATION TEMPLATE. Otherwise defer L2.
|
|
80
80
|
7. Append entries to changelog.prizm using format: `- YYYY-MM-DD | <module-path> | <verb>: <description>`
|
|
81
81
|
8. Enforce size limits: L0 > 4KB -> consolidate. L1 > 4KB -> trim KEY_FILES descriptions, ensure RULES <= 3 entries. L2 > 5KB -> split or archive.
|
|
82
82
|
9. Stage updated .prizm files via `git add .prizm-docs/`
|
|
@@ -162,7 +162,7 @@ When working in a project with .prizm-docs/:
|
|
|
162
162
|
|
|
163
163
|
- ON SESSION START: Always read .prizm-docs/root.prizm (L0). This is the project map.
|
|
164
164
|
- ON TASK: Read L1 docs for relevant modules referenced in MODULE_INDEX.
|
|
165
|
-
- ON FILE EDIT: Read L2 doc before modifying files. Check TRAPS and DECISIONS sections.
|
|
165
|
+
- ON FILE EDIT: Read L2 doc before modifying files. Check TRAPS and DECISIONS sections. If L2 does not exist and you are creating/modifying significant source files in this module → generate L2 using the L2 GENERATION TEMPLATE before proceeding.
|
|
166
166
|
- ON DEEP READ: If you need deep understanding of a module without modifying it, generate L2 if it doesn't exist.
|
|
167
167
|
- NEVER load all .prizm docs at once. Progressive loading saves tokens.
|
|
168
168
|
- BUDGET: Typical task should consume 3000-5000 tokens of Prizm docs total.
|
|
@@ -59,14 +59,16 @@ git diff --name-status
|
|
|
59
59
|
|
|
60
60
|
**1d.** Update affected docs (bottom-up: L2 → L1 → L0):
|
|
61
61
|
|
|
62
|
-
- **L2
|
|
62
|
+
- **L2**: If L2 exists → update KEY_FILES, INTERFACES, DATA_FLOW, DEPENDENCIES, CHANGELOG, TRAPS, DECISIONS. If L2 does NOT exist AND the module has Added or Modified source files in the current diff with meaningful logic (not trivial config) → create L2 using the L2 GENERATION TEMPLATE, then populate from source.
|
|
63
63
|
- **L1**: Update FILES count, KEY_FILES (if major files added/removed), DEPENDENCIES (if module-level deps changed). **L1 does NOT contain INTERFACES, DATA_FLOW, TRAPS, or DECISIONS** — those belong in L2 only.
|
|
64
64
|
- **L0 root.prizm**: Update MODULE_INDEX file counts only if counts changed. Update CROSS_CUTTING if cross-module concerns changed. Update only if structural change (module added/removed).
|
|
65
65
|
|
|
66
66
|
**1d-migrate.** Legacy TRAPS format migration (opportunistic):
|
|
67
67
|
While updating an affected L1/L2 doc, if you encounter TRAPS entries **without** a severity prefix (e.g., `- foo | FIX: bar` instead of `- [LOW] foo | FIX: bar`), prepend `[LOW]` as a conservative default. This clears legacy format debt incrementally — only in files already being touched, never as a bulk operation.
|
|
68
68
|
|
|
69
|
-
**1e.** If new directory qualifies as a module (per MODULE_DISCOVERY_CRITERIA in PRIZM-SPEC Section 9.1 Step 2) and matches no existing module:
|
|
69
|
+
**1e.** If new directory qualifies as a module (per MODULE_DISCOVERY_CRITERIA in PRIZM-SPEC Section 9.1 Step 2) and matches no existing module:
|
|
70
|
+
1. Create L1 doc immediately, add to MODULE_INDEX.
|
|
71
|
+
2. If the current diff includes Added or Modified source files with meaningful logic in this module → create L2 immediately using the L2 GENERATION TEMPLATE. Otherwise defer L2 to the next session that touches this module.
|
|
70
72
|
|
|
71
73
|
**1f.** Enforce size limits:
|
|
72
74
|
- L0 > 4KB → consolidate MODULE_INDEX
|
|
@@ -143,7 +145,7 @@ When writing TRAPS:
|
|
|
143
145
|
**QUALITY GATE**: Every item must answer: "If a new AI session reads only `.prizm-docs/` and this entry, does it gain actionable understanding?" If not, discard. Do not record trivially observable code patterns — the AI can read the code directly.
|
|
144
146
|
|
|
145
147
|
**2c.** Inject into the correct `.prizm-docs/` file:
|
|
146
|
-
- Module-level TRAPS/RULES/DECISIONS → the affected **L2** `.prizm` file
|
|
148
|
+
- Module-level TRAPS/RULES/DECISIONS → the affected **L2** `.prizm` file. If the target L2 does not exist, create it first using the L2 GENERATION TEMPLATE before injecting knowledge. (TRAPS/DECISIONS/RULES belong in L2, not L1.)
|
|
147
149
|
- Project-level RULES/PATTERNS → `root.prizm`
|
|
148
150
|
- Cross-module concerns spanning 2+ modules → `root.prizm` CROSS_CUTTING section
|
|
149
151
|
|