prizmkit 1.0.139 → 1.0.141

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "frameworkVersion": "1.0.139",
3
- "bundledAt": "2026-03-28T16:00:11.932Z",
4
- "bundledFrom": "ce5323e"
2
+ "frameworkVersion": "1.0.141",
3
+ "bundledAt": "2026-03-28T22:33:06.813Z",
4
+ "bundledFrom": "555434f"
5
5
  }
@@ -101,11 +101,12 @@ prizm_detect_subagents() {
101
101
 
102
102
  local count=0
103
103
  if [[ "$USE_STREAM_JSON" == "true" ]]; then
104
- count=$(grep -c '"name"[[:space:]]*:[[:space:]]*"Agent"' "$session_log" 2>/dev/null || echo "0")
104
+ count=$(grep -c '"name"[[:space:]]*:[[:space:]]*"Agent"' "$session_log" 2>/dev/null) || true
105
105
  else
106
- count=$(grep -cE '(Tool: Agent|"tool":\s*"Agent"|tool_use.*Agent|subagent_type)' "$session_log" 2>/dev/null || echo "0")
106
+ count=$(grep -cE '(Tool: Agent|"tool":\s*"Agent"|tool_use.*Agent|subagent_type)' "$session_log" 2>/dev/null) || true
107
107
  fi
108
108
 
109
+ count=${count:-0}
109
110
  _SUBAGENT_COUNT=$count
110
111
  if [[ "$count" -gt 0 ]]; then
111
112
  log_info "Subagent calls detected in session: $count"
@@ -266,7 +266,7 @@ After all critics return, read all 3 reports:
266
266
 
267
267
  Before spawning Dev, check plan.md Tasks section:
268
268
  ```bash
269
- grep -c '^\- \[ \]' .prizmkit/specs/{{FEATURE_SLUG}}/plan.md 2>/dev/null || echo 0
269
+ grep -c '^\- \[ \]' .prizmkit/specs/{{FEATURE_SLUG}}/plan.md 2>/dev/null || true
270
270
  ```
271
271
  - If result is `0` (all tasks already `[x]`) → **SKIP Phase 4**, go directly to Phase 5. Do NOT spawn Dev.
272
272
  - If result is non-zero → spawn Dev agent below.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.138",
2
+ "version": "1.0.141",
3
3
  "skills": {
4
4
  "prizm-kit": {
5
5
  "description": "Full-lifecycle dev toolkit. Covers spec-driven development, Prizm context docs, code quality, debugging, deployment, and knowledge management.",
@@ -36,7 +36,7 @@ Project takeover and bootstrap skill. Scans any project (brownfield or greenfiel
36
36
  MODE DETECTION:
37
37
  - If `.prizm-docs/` exists: Ask user if they want to reinitialize or update
38
38
  - **Reinitialize**: overwrites `.prizm-docs/` and `config.json` tech_stack (fresh start)
39
- - **Update**: re-scans tech stack and merges changes into existing `config.json` (see Step 3b merge strategy); updates `root.prizm` TECH_STACK if changed; preserves existing `.prizm-docs/` L1/L2 docs
39
+ - **Update**: re-scans tech stack and merges changes into existing `config.json` (see Step 3b merge strategy); updates `root.prizm` TECH_STACK if changed; preserves existing `.prizm-docs/` L1/L2 docs; checks for missing L1/L2 docs and creates them for modules with source files (see Update Supplement below)
40
40
  - If project has source code: brownfield mode
41
41
  - If project is nearly empty: greenfield mode
42
42
 
@@ -242,6 +242,14 @@ Saved: .prizmkit/config.json (tech_stack recorded)
242
242
  Next: Use /prizmkit-specify to start your first feature
243
243
  ```
244
244
 
245
+ UPDATE SUPPLEMENT (runs after tech stack merge in Update mode):
246
+
247
+ 1. **Module scan**: Re-scan project directories using the same TWO-TIER model from Step 1. Compare discovered modules against existing MODULE_INDEX in root.prizm.
248
+ 2. **Missing L1 check**: For any discovered module with no corresponding L1 `.prizm` doc → create L1 immediately and add to MODULE_INDEX.
249
+ 3. **Missing L2 check**: For any module/sub-module that has source files with meaningful logic but no L2 `.prizm` doc → create L2 using the L2 GENERATION TEMPLATE. Judgment call: skip trivial wrapper directories or single-config modules.
250
+ 4. **Stale L1 check**: For existing L1 docs, verify FILES count and KEY_FILES are still accurate. Update if source directory contents have changed significantly.
251
+ 5. **Report**: Include in the Update report: modules added, L1 docs created, L2 docs created, stale docs refreshed.
252
+
245
253
  **Re-init after PrizmKit upgrade (existing config preserved):**
246
254
  ```
247
255
  $ /prizmkit-init
@@ -255,6 +263,11 @@ Tech stack changes detected:
255
263
  = language: TypeScript (unchanged)
256
264
  = frontend: React (unchanged)
257
265
 
266
+ Documentation gap-fill:
267
+ + app/share/[token].prizm (L2) — created (3 source files, meaningful logic)
268
+ = routes.prizm (L1) — up to date
269
+ ~ models.prizm (L1) — FILES count updated (8 → 10)
270
+
258
271
  Merged into .prizmkit/config.json (2 fields updated, user overrides preserved)
259
272
  ```
260
273
 
@@ -71,12 +71,13 @@ Update .prizm-docs/ to reflect recent code changes.
71
71
  PRECONDITION: .prizm-docs/ exists with root.prizm.
72
72
 
73
73
  STEPS:
74
- 1. Get changed files via `git diff --cached --name-status`. If nothing staged, use `git diff --name-status`. If no git changes at all, do full rescan comparing code against existing docs.
74
+ 1. Get changed files via `git diff --cached --name-status`. If nothing staged, use `git diff --name-status`. If no git changes at all, do full rescan comparing code against existing docs — this includes checking for modules that have source files but no L2 doc.
75
75
  2. Map changed files to modules by matching against MODULE_INDEX in root.prizm. Group changes by module.
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
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
+ 6a. **L2 gap check** (runs during full rescan mode only — when no git changes detected): For each existing module in MODULE_INDEX, check if L2 doc exists. If L2 is missing and the module has source files with meaningful logic (not trivial config/wrapper) → create L2 using the L2 GENERATION TEMPLATE. This ensures Update fills documentation gaps left by previous sessions.
80
81
  7. Append entries to changelog.prizm using format: `- YYYY-MM-DD | <module-path> | <verb>: <description>`
81
82
  8. Enforce size limits: L0 > 4KB -> consolidate. L1 > 4KB -> trim KEY_FILES descriptions, ensure RULES <= 3 entries. L2 > 5KB -> split or archive.
82
83
  9. Stage updated .prizm files via `git add .prizm-docs/`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.0.139",
3
+ "version": "1.0.141",
4
4
  "description": "Create a new PrizmKit-powered project with clean initialization — no framework dev files, just what you need.",
5
5
  "type": "module",
6
6
  "bin": {