prizmkit 1.1.55 → 1.1.57

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.1.55",
3
- "bundledAt": "2026-05-25T01:36:43.012Z",
4
- "bundledFrom": "0664e65"
2
+ "frameworkVersion": "1.1.57",
3
+ "bundledAt": "2026-05-30T08:56:07.192Z",
4
+ "bundledFrom": "1692276"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.55",
2
+ "version": "1.1.57",
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.",
@@ -240,16 +240,54 @@ After Infrastructure configuration is complete (CP-AP-1.5), check whether the pr
240
240
 
241
241
  Rules are optional. If the user skips, AI uses general best practices freely — no reminders, no blocking.
242
242
 
243
- ### Step 1: Detect missing rules
243
+ ### Step 1: Detect which layers need rules
244
244
 
245
245
  1. Read `.prizmkit/config.json` to get `detected_layers` (written by `prizmkit-init` Phase 4.5).
246
- - If `detected_layers` field is absent or empty → skip this entire section, proceed to Prerequisites.
247
- 2. For each layer in `detected_layers`, check if `.prizmkit/rules/<layer>-rules.md` exists:
246
+ - If `detected_layers` is present and non-empty → use it directly, jump to step 3.
247
+ - If `detected_layers` is absent or empty → run self-detection (step 2). Do NOT skip rules configuration just because this field is missing — the project may still have layers that need rules.
248
+
249
+ 2. **Self-detection** (only when `detected_layers` is absent/empty from config.json):
250
+
251
+ Scan the project to determine which development layers exist. Combine signal matching with your own judgment — the signals below are a guide, not exhaustive.
252
+
253
+ | Layer | Where to Look | Signals |
254
+ |-------|---------------|---------|
255
+ | **frontend** | `package.json` deps | `react`, `vue`, `angular`, `next`, `nuxt`, `svelte`, `solid-js`, `preact`, `remix`, `astro`, `qwik` |
256
+ | **frontend** | `package.json` devDeps | `vite`, `webpack`, `parcel`, `turbo` |
257
+ | **frontend** | Directory | `src/components/`, `pages/`, `app/` with `.tsx`/`.jsx`/`.vue` files |
258
+ | **backend** | `package.json` deps | `express`, `fastify`, `koa`, `hono`, `nest` |
259
+ | **backend** | `pyproject.toml`/`requirements.txt` | `fastapi`, `django`, `flask`, `sanic`, `litestar` |
260
+ | **backend** | `go.mod` | `gin-gonic`, `echo`, `fiber`, `chi` |
261
+ | **backend** | `pom.xml`/`build.gradle` | `spring-boot`, `quarkus`, `micronaut`, `ktor` |
262
+ | **backend** | Directory | `routes/`, `controllers/`, `handlers/`, `api/` with server code |
263
+ | **database** | `package.json` deps | `prisma`, `typeorm`, `sequelize`, `mongoose`, `knex`, `drizzle-orm`, `kysely` |
264
+ | **database** | `pyproject.toml`/`requirements.txt` | `sqlalchemy`, `pony`, `peewee`, `tortoise-orm` |
265
+ | **database** | `go.mod` | `gorm`, `sqlx`, `sqlc`, `ent`, `bun` |
266
+ | **database** | Directory/Env | `migrations/`, `prisma/`, `alembic/`; `.env*` with `DATABASE_URL`, `DB_HOST`, `MONGO_URI` |
267
+ | **mobile** | File | `pubspec.yaml` (Flutter) |
268
+ | **mobile** | `package.json` deps | `react-native`, `expo` |
269
+ | **mobile** | Directory | Both `ios/*.xcodeproj` + `android/build.gradle` simultaneously |
270
+
271
+ **Apply your own judgment**: if you see clear evidence of a layer not covered above, include it. If a signal matches but context suggests it's misleading (e.g., a dependency present but not used as the primary tech), downgrade or ignore it.
272
+
273
+ After scanning, present findings via `AskUserQuestion`:
274
+
275
+ **Question**: "I detected these development layers: [list with brief evidence]. Is this correct?"
276
+ - **Yes, looks correct (Recommended)** — use detected layers
277
+ - **Mostly correct, adjust** — I'll note changes
278
+ - **No layers apply** — skip rules configuration (library/CLI project)
279
+
280
+ If user picks "No layers apply" → skip this entire section, proceed to Prerequisites.
281
+ If user picks "Mostly correct, adjust" → ask what to add, remove, or change, then reassemble `detected_layers`. Continue to step 3.
282
+ If user confirms → assemble `detected_layers` array and continue to step 3.
283
+
284
+ 3. For each layer in `detected_layers`, check if `.prizmkit/rules/<layer>-rules.md` exists:
248
285
  - `frontend` → `.prizmkit/rules/frontend-rules.md`
249
286
  - `backend` → `.prizmkit/rules/backend-rules.md`
250
287
  - `database` → `.prizmkit/rules/database-rules.md`
251
288
  - `mobile` → `.prizmkit/rules/mobile-rules.md`
252
- 3. Display status:
289
+
290
+ 4. Display status:
253
291
 
254
292
  ```
255
293
  Rules Status Check:
@@ -258,8 +296,8 @@ Rules are optional. If the user skips, AI uses general best practices freely —
258
296
  [missing] database-rules.md — database interaction detected, no rules configured
259
297
  ```
260
298
 
261
- 4. If all detected layers already have rules → skip to Prerequisites.
262
- 5. If missing rules found, proceed to Step 2.
299
+ 5. If all detected layers already have rules → skip to Prerequisites.
300
+ 6. If missing rules found, proceed to Step 2.
263
301
 
264
302
  ### Step 2: Ask configuration mode
265
303
 
@@ -323,7 +361,7 @@ After all selected layers are configured:
323
361
  2. **If root.prizm exists**:
324
362
  - Read the file.
325
363
  - Check if `RULES:` line exists:
326
- - If present: append new rules file paths to the existing line.
364
+ - If present: append new rules file paths to the existing line (check for duplicates first — skip paths already on the line).
327
365
  - If absent: add `RULES: .prizmkit/rules/<layer>-rules.md, ...` at the end (after PROJECT_BRIEF line).
328
366
  3. **If root.prizm does not exist** (e.g., project without prizm-docs init):
329
367
  - Create a minimal `root.prizm` with:
@@ -529,7 +567,7 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
529
567
  | **CP-AP-0** | Intent Confirmed | User confirmed session goal (produce / explore) | 1 |
530
568
  | **CP-AP-1** | Conventions Checked | Project conventions loaded or asked; `### Project Conventions` section in `CLAUDE.md` / `CODEBUDDY.md` up to date | 1 |
531
569
  | **CP-AP-1.5** | Infrastructure Checked | Infrastructure config loaded or asked; `### Infrastructure` section in `CLAUDE.md` / `CODEBUDDY.md` addressed — database, deployment **and cloud services** each configured or explicitly deferred | 1-2 |
532
- | **CP-AP-1.6** | Rules Configured | For each layer in `detected_layers`, rules file exists in `.prizmkit/rules/` or user explicitly skipped. `root.prizm` `RULES:` pointer up-to-date. | 2 |
570
+ | **CP-AP-1.6** | Rules Configured | For each detected layer (from config.json or self-detection), rules file exists in `.prizmkit/rules/` or user explicitly skipped. `root.prizm` `RULES:` pointer up-to-date. | 2 |
533
571
  | **CP-AP-2** | Vision Summary | Goal/users/differentiators confirmed by user. For brownfield: existing purpose confirmed or refined. | 1-2 |
534
572
  | **CP-AP-3** | Frontend Design Evaluated | For frontend projects: checked for existing UI/UX design system; user was asked if missing. **Auto-pass** for backend-only or non-UI projects. | 2 |
535
573
  | **CP-AP-4** | Project Brief Accumulated | `.prizmkit/plans/project-brief.md` exists at `.prizmkit/plans/` with at least 3 ideas listed. For brownfield: already-implemented items marked `[x]` count toward this total. | 3 |
@@ -32,7 +32,8 @@ The loop repeats until the Reviewer finds no issues or the max round limit is re
32
32
 
33
33
  1. **Read spec.md** from the artifact directory — extract goals and acceptance criteria.
34
34
  2. **Read plan.md** from the artifact directory — extract architecture decisions and completed tasks.
35
- 3. **Capture workspace diff**: run `git diff` (unstaged) + `git diff --cached` (staged) + `git status` to understand the full scope of changes. For new files in git status, note their paths for the Reviewer to read.
35
+ 3. **Read dev rules** (if configured): Read `.prizmkit/prizm-docs/root.prizm` and check for a `RULES:` line. If present, read all referenced `.prizmkit/rules/<layer>-rules.md` files. If a referenced file does not exist, skip it silently and continue. These define per-layer conventions that the code should follow.
36
+ 4. **Capture workspace diff**: run `git diff` (unstaged) + `git diff --cached` (staged) + `git status` to understand the full scope of changes. For new files in git status, note their paths for the Reviewer to read.
36
37
  - If no changes are detected, output PASS and stop.
37
38
 
38
39
  ## Phase 1: Review-Fix Loop
@@ -41,7 +42,7 @@ The loop repeats until the Reviewer finds no issues or the max round limit is re
41
42
  ┌─── Loop (max 3 rounds) ──────────────────────────────┐
42
43
  │ │
43
44
  │ Step 1: Spawn Reviewer Agent (read-only) │
44
- │ → Input: git diff + spec goals + plan decisions
45
+ │ → Input: git diff + spec goals + plan decisions + dev rules
45
46
  │ → Output: structured findings or PASS │
46
47
  │ │
47
48
  │ Step 2: Check result │
@@ -66,10 +67,10 @@ The loop repeats until the Reviewer finds no issues or the max round limit is re
66
67
 
67
68
  ### Step 1: Spawn Reviewer Agent
68
69
 
69
- Spawn a **read-only** agent (subagent_type: `Explore`) with the following prompt:
70
+ Include the dev rules read in Phase 0 step 3 in the `## Dev Rules` section of the prompt below. Spawn a **read-only** agent (subagent_type: `Explore`) with the following prompt:
70
71
 
71
72
  ```
72
- You are a code reviewer. Review workspace changes against the spec goals and plan decisions.
73
+ You are a code reviewer. Review workspace changes against the spec goals, plan decisions, and per-layer dev rules.
73
74
 
74
75
  ## Spec Goals
75
76
  {goals and acceptance criteria from spec.md}
@@ -77,6 +78,9 @@ You are a code reviewer. Review workspace changes against the spec goals and pla
77
78
  ## Plan Decisions
78
79
  {architecture decisions and task list from plan.md}
79
80
 
81
+ ## Dev Rules (per-layer conventions)
82
+ {rules from .prizmkit/rules/<layer>-rules.md, or "No custom dev rules configured — use general best practices."}
83
+
80
84
  ## Review Round
81
85
  Round {N}. {round_context}
82
86
 
@@ -97,6 +101,7 @@ Evaluate the changes across these dimensions (focus on what's relevant):
97
101
  3. **Completeness**: Files that should have been changed but weren't? Missing tests, types, imports, exports?
98
102
  4. **Consistency**: Do changes follow the project's existing patterns, naming conventions, and code style?
99
103
  5. **Security**: Hardcoded secrets, injection vulnerabilities, unsafe operations.
104
+ 6. **Rules compliance**: (Skip this dimension if no dev rules were provided.) Do changes follow the per-layer dev rules? Flag violations of framework conventions, naming patterns, state management, or other rules defined for that layer.
100
105
 
101
106
  ## Output Format
102
107
  Respond with EXACTLY this format:
@@ -108,7 +113,7 @@ Respond with EXACTLY this format:
108
113
 
109
114
  #### Finding N
110
115
  - **Severity**: high | medium | low
111
- - **Dimension**: goal-alignment | defect | completeness | consistency | security
116
+ - **Dimension**: goal-alignment | defect | completeness | consistency | security | rules-compliance
112
117
  - **Location**: filepath:line (or "project-level")
113
118
  - **Problem**: What is wrong and why it matters
114
119
  - **Suggestion**: Recommended fix approach
@@ -31,6 +31,7 @@ Before implementation, load context once:
31
31
 
32
32
  1. **Task context**: Read `plan.md` (including Tasks section) and `spec.md` from the artifact directory. If other companion documents exist in the directory (e.g., `refactor-analysis.md`), read them for additional context.
33
33
  2. **Architecture context**: Read `.prizmkit/prizm-docs/root.prizm` (L0 — project overview, module index, tech stack, conventions) and relevant L1/L2 docs for affected modules. Pay special attention to TRAPS (known pitfalls) and DECISIONS (architectural choices).
34
+ 3. **Dev rules** (if configured): Check `.prizmkit/prizm-docs/root.prizm` for a `RULES:` line — if present, read all referenced `.prizmkit/rules/<layer>-rules.md` files. If a referenced file does not exist, skip it silently and continue. These define per-layer conventions (frameworks, naming, patterns, state management, etc.) that AI must follow when generating code for that layer. Apply these rules during implementation — if a rule conflicts with what plan.md describes, call it out and ask the user.
34
35
 
35
36
  > `.prizmkit/prizm-docs/` uses a 3-level hierarchy: L0 (`root.prizm`) is the project-wide index. L1 (e.g., `auth.prizm`) covers a module — its key files, interfaces, dependencies, traps, and decisions. L2 is for sub-modules with their own complexity. Implement reads these docs to avoid repeating known mistakes; `/prizmkit-retrospective` is responsible for updating them after implementation.
36
37
 
@@ -181,8 +181,8 @@ Invoke prizmkit-prizm-docs (Init operation), passing the two-tier module structu
181
181
  - Generate `root.prizm` (L0) with project meta and MODULE_INDEX listing only top-level modules. If module count > 15, use MODULE_GROUPS format instead (group by functional domain).
182
182
  - For each module entry in MODULE_INDEX/MODULE_GROUPS, include keyword tags extracted from the module's source files — scan for: exported symbols, imported packages, domain terms in file/directory names. Format: `- module-name [tag1, tag2, tag3]: ...`. Tags help AI match user intent to relevant modules.
183
183
  - Generate L1 docs for top-level modules at `.prizmkit/prizm-docs/<M>.prizm` and for sub-modules at `.prizmkit/prizm-docs/<M>/<S>.prizm`
184
- - Create `changelog.prizm`
185
184
  - Skip L2 (lazy generation) — L2 is generated on first file modification, saving tokens upfront
185
+ - Do not create auxiliary `changelog.prizm` or date/time metadata fields; git history is the source of change history
186
186
 
187
187
  **Phase 6: Workspace Initialization**
188
188
  6a. Create `.prizmkit/` directory structure (if missing):
@@ -314,7 +314,7 @@ Modules discovered:
314
314
  Project brief: inferred from codebase → confirmed by user
315
315
  → .prizmkit/plans/project-brief.md
316
316
 
317
- Generated: root.prizm + 4 L1 docs + changelog.prizm
317
+ Generated: root.prizm + 4 L1 docs
318
318
  Saved: .prizmkit/config.json (tech_stack + detected_layers recorded)
319
319
 
320
320
  Next: Use /prizmkit-plan to start your first feature
@@ -86,7 +86,7 @@ OUTPUT: Migration report with list of source docs processed, generated .prizm fi
86
86
 
87
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
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, archive CHANGELOG entries older than 90 days.
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
90
  - **No git history available**: Fall back to filesystem timestamps for freshness checks; warn user that accuracy may be reduced.
91
91
 
92
92
  ### Key Protocols (reference)
@@ -104,7 +104,6 @@ Generated .prizmkit/prizm-docs/:
104
104
  routes.prizm (L1) — 12 files, 4 interfaces
105
105
  models.prizm (L1) — 8 files, 3 interfaces
106
106
  services.prizm (L1) — 15 files, 6 interfaces
107
- changelog.prizm — initial entry
108
107
  ```
109
108
 
110
109
  **Update after adding new API endpoint:**
@@ -113,5 +112,4 @@ Changed: src/routes/avatar.ts (A), src/models/user.ts (M)
113
112
  Updated: .prizmkit/prizm-docs/routes.prizm — added avatar.ts to KEY_FILES, new POST /api/avatar interface
114
113
  Updated: .prizmkit/prizm-docs/models.prizm — updated User interface with avatar_url field
115
114
  Skipped: .prizmkit/prizm-docs/services.prizm — no changes in services module
116
- Appended: changelog.prizm — "routes | add: avatar upload endpoint"
117
115
  ```
@@ -36,7 +36,7 @@ CORE_PRINCIPLES:
36
36
  - Progressive disclosure (load only what is needed)
37
37
  - Self-updating (docs stay fresh via commit-time hooks)
38
38
  - Universal (language and framework agnostic)
39
- - Append-only history (decisions and changelog never lose information)
39
+ - Durable project knowledge over auxiliary history (decisions, traps, interfaces, dependencies)
40
40
  - Size-enforced (hard limits per level prevent bloat)
41
41
  - Lazy L2 generation (detail docs created on first modification or deep read, not during init)
42
42
  - Rules hierarchy (root.prizm RULES are authoritative, module RULES supplement only)
@@ -61,9 +61,6 @@ LEVELS:
61
61
  FILE: .prizmkit/prizm-docs/<mirrored-path>/<submodule>.prizm
62
62
  CONTAINS: interface signatures, data flow, full rules, TRAPS, DECISIONS, domain-specific sections, rejected approaches
63
63
 
64
- - Changelog: Append-only change log. Loaded at L0. No size limit but keep last 50 entries.
65
- FILE: .prizmkit/prizm-docs/changelog.prizm
66
-
67
64
  ## 2.2 Directory Layout
68
65
 
69
66
  STRUCTURE: Mirrors source tree under .prizmkit/prizm-docs/
@@ -71,7 +68,6 @@ STRUCTURE: Mirrors source tree under .prizmkit/prizm-docs/
71
68
  EXAMPLE (Go project):
72
69
  .prizmkit/prizm-docs/
73
70
  root.prizm # L0
74
- changelog.prizm # L0
75
71
  internal/
76
72
  logic.prizm # L1 for internal/logic/
77
73
  model.prizm # L1 for internal/model/
@@ -92,7 +88,6 @@ EXAMPLE (Go project):
92
88
  EXAMPLE (JS/TS project):
93
89
  .prizmkit/prizm-docs/
94
90
  root.prizm # L0
95
- changelog.prizm # L0
96
91
  src/
97
92
  components.prizm # L1 for src/components/
98
93
  hooks.prizm # L1 for src/hooks/
@@ -104,7 +99,6 @@ EXAMPLE (JS/TS project):
104
99
  EXAMPLE (Python project):
105
100
  .prizmkit/prizm-docs/
106
101
  root.prizm # L0
107
- changelog.prizm # L0
108
102
  app/
109
103
  models.prizm # L1 for app/models/
110
104
  views.prizm # L1 for app/views/
@@ -286,9 +280,6 @@ TEMPLATE:
286
280
  - <decision made within this module> — <rationale>
287
281
  - REJECTED: <approach that was tried/considered and abandoned + why>
288
282
 
289
- CHANGELOG:
290
- - <verb>: <description of recent change to this module>
291
-
292
283
  DOMAIN_SPECIFIC_SECTION_EXAMPLES:
293
284
  - For state machines: STATES, TRIGGERS, TRANSITIONS
294
285
  - For API handlers: ENDPOINTS, REQUEST_FORMAT, RESPONSE_FORMAT, ERROR_CODES
@@ -312,23 +303,11 @@ CONSTRAINTS:
312
303
  - FILES lists all files, not just key ones
313
304
  - RULES may only SUPPLEMENT root.prizm RULES with module-specific exceptions, never contradict them
314
305
 
315
- ## 3.4 changelog.prizm
316
-
317
- TEMPLATE:
318
-
319
- CHANGELOG:
320
- - <module-path> | <verb>: <one-line description>
321
-
322
- VERBS: add, update, fix, remove, refactor, rename, deprecate
323
- RETENTION: Keep last 50 entries. Archive older entries to changelog-archive.prizm if needed.
324
- TEMPORAL_INFO: Git commit history is the authoritative source for when changes happened. No dates in changelog entries — git log on .prizmkit/prizm-docs/changelog.prizm provides the timeline.
306
+ ## 3.4 Metadata Policy
325
307
 
326
- EXAMPLE:
327
- CHANGELOG:
328
- - internal/logic/timer | add: retry logic with exponential backoff
329
- - internal/service/sso | update: create_robot handler validates chatbot config
330
- - internal/model/chatbot | add: DeepSeek provider model definition
331
- - internal/repo/rpc | fix: Hunyuan API timeout not respected
308
+ TEMPORAL_INFO: Git history is the authoritative source for change timing and edit history.
309
+ AUXILIARY_FIELDS: Do not generate CHANGELOG or UPDATED fields in .prizm files.
310
+ RATIONALE: Keep project memory focused on durable architecture, interfaces, dependencies, traps, rules, and decisions.
332
311
 
333
312
  ---
334
313
 
@@ -338,7 +317,6 @@ HEADERS: ALL CAPS followed by colon (MODULE:, FILES:, RESPONSIBILITY:, etc.)
338
317
  VALUES: Single space after colon, value on same line (KEY: value)
339
318
  LISTS: Dash-space prefix for items within a section (- item)
340
319
  POINTERS: Arrow notation (->) to reference other .prizm files
341
- CHANGELOG_SEPARATOR: Pipe (|) between module and description
342
320
  NESTING: Indent 2 spaces for sub-keys within a section
343
321
  COMMENTS: None. Every line carries information. No comments in .prizm files.
344
322
  TIMESTAMPS: No date/time fields in .prizm files. Git is the authoritative source for temporal information. Use `git log` or `git blame` on .prizm files when needed.
@@ -353,7 +331,6 @@ RULE: Mirror the source directory tree under .prizmkit/prizm-docs/
353
331
  RULE: L1 file for directory D = .prizmkit/prizm-docs/<D>.prizm
354
332
  RULE: L2 file for subdirectory D/S = .prizmkit/prizm-docs/<D>/<S>.prizm
355
333
  RULE: Root index = .prizmkit/prizm-docs/root.prizm (always)
356
- RULE: Changelog = .prizmkit/prizm-docs/changelog.prizm (always)
357
334
 
358
335
  ## 5.2 Examples
359
336
 
@@ -448,11 +425,11 @@ SUMMARY: Get changed files → map to modules → classify (A/D/M/R) → update
448
425
 
449
426
  DETAILED_STEPS: → ${SKILL_DIR}/references/op-update.md
450
427
 
451
- ## 7.3 Changelog Update
428
+ ## 7.3 Auxiliary Metadata Policy
452
429
 
453
- ALWAYS append to .prizmkit/prizm-docs/changelog.prizm after any doc update.
454
- FORMAT: - <module-path> | <verb>: <one-line description>
455
- VERBS: add, update, fix, remove, refactor, rename, deprecate
430
+ NEVER: Add CHANGELOG sections or changelog.prizm during doc sync.
431
+ NEVER: Add UPDATED/date/time fields to .prizm files.
432
+ RATIONALE: Git already provides history; .prizm files should store only durable project memory.
456
433
 
457
434
  ---
458
435
 
@@ -484,9 +461,9 @@ OPERATION: Init (invoked via prizmkit-prizm-docs skill)
484
461
  PRECONDITION: No .prizmkit/prizm-docs/ directory exists (or user confirms overwrite)
485
462
 
486
463
  INPUT: Project root directory
487
- OUTPUT: .prizmkit/prizm-docs/ with root.prizm, changelog.prizm, and L1 docs for discovered modules
464
+ OUTPUT: .prizmkit/prizm-docs/ with root.prizm and L1 docs for discovered modules
488
465
 
489
- SUMMARY: Detect project type → discover modules (MODULE_DISCOVERY_CRITERIA) → create mirrored directory structure → generate root.prizm (L0) → generate L1 docs → skip L2 (lazy) → create changelog → configure hook → validate → report.
466
+ SUMMARY: Detect project type → discover modules (MODULE_DISCOVERY_CRITERIA) → create mirrored directory structure → generate root.prizm (L0) → generate L1 docs → skip L2 (lazy) → configure hook → validate → report.
490
467
 
491
468
  DETAILED_STEPS: → ${SKILL_DIR}/references/op-init.md
492
469
 
@@ -13,7 +13,7 @@ STEPS:
13
13
  - HIERARCHY RULE: directory X inside top-level module M maps to .prizmkit/prizm-docs/<M>/<X>.prizm, never to .prizmkit/prizm-docs/<X>.prizm.
14
14
  - Exclude .git/, node_modules/, vendor/, build/, dist/, __pycache__/, target/, bin/, .claude/, .codebuddy/, .prizmkit/, .prizmkit/prizm-docs/, dev-pipeline/. If total module count > 30, ask user for include/exclude patterns.
15
15
  3. Create .prizmkit/prizm-docs/ directory structure mirroring the source tree exactly. For each top-level module M that has sub-modules, create the subdirectory .prizmkit/prizm-docs/<M>/.
16
- 4. Generate root.prizm (L0) with PROJECT, LANG, FRAMEWORK, BUILD, TEST, ENTRY, MODULE_INDEX with multi-level entries as needed for efficient navigation (constrained by 4KB limit), RULES extracted from CODEBUDDY.md/CLAUDE.md/README/linter configs, PATTERNS, and CROSS_CUTTING (cross-module concerns spanning 2+ modules). Set PRIZM_VERSION: 4. Max 4KB. No UPDATED timestamp — git tracks modification times.
16
+ 4. Generate root.prizm (L0) with PROJECT, LANG, FRAMEWORK, BUILD, TEST, ENTRY, MODULE_INDEX with multi-level entries as needed for efficient navigation (constrained by 4KB limit), RULES extracted from CODEBUDDY.md/CLAUDE.md/README/linter configs, PATTERNS, and CROSS_CUTTING (cross-module concerns spanning 2+ modules). Set PRIZM_VERSION: 4. Max 4KB. No date/time metadata fields — git tracks modification times.
17
17
  - If `.prizmkit/plans/project-brief.md` exists: add `PROJECT_BRIEF: .prizmkit/plans/project-brief.md` to root.prizm (generated by prizmkit-init). If not present, skip — prizmkit-init Phase 7 will add it later.
18
18
  - If module count > 15: use MODULE_GROUPS format instead of MODULE_INDEX — group modules by functional domain (3-8 domains, inferred from directory structure and module responsibilities). See prizm-docs-format.md for MODULE_GROUPS format.
19
19
  - For each module entry, auto-generate 3-6 keyword tags by scanning the module's key source files for: exported function/class names, imported library names, domain-specific terms in file/directory names. Add tags in square brackets after the module name (e.g., `- auth [login, session, jwt]: ...`). Tags are optional but recommended for projects with 10+ modules.
@@ -22,10 +22,9 @@ STEPS:
22
22
  - Sub-module S inside M → write .prizmkit/prizm-docs/<M>/<S>.prizm
23
23
  Each L1 includes MODULE (full relative path), FILES count, RESPONSIBILITY, SUBDIRS with pointers, KEY_FILES (5-10 most important), DEPENDENCIES (imports, imported-by, external), RULES (1-3 most critical only). L1 does NOT include INTERFACES, DATA_FLOW, TRAPS, or DECISIONS (those are L2, generated lazily). Max 4KB each.
24
24
  6. Skip L2 docs during init — L2 is created lazily on first file modification or when AI needs deep understanding (ON_DEEP_READ trigger). L2 contains behavioral detail: INTERFACES, DATA_FLOW, TRAPS, DECISIONS, full RULES, domain-specific sections.
25
- 7. Create changelog.prizm with initial entry: `- root | add: initialized prizm documentation framework`
26
- 8. Configure UserPromptSubmit hook in platform settings per ${SKILL_DIR}/assets/prizm-docs-format.md.md Section 11.
27
- 9. Validate all generated docs: size limits (L0 <= 4KB, L1 <= 4KB), pointer resolution (every -> reference resolves), no circular dependencies, KEY: value format compliance, no anti-patterns (prose, code blocks, markdown headers), L1 does not contain INTERFACES/DATA_FLOW/TRAPS/DECISIONS, no UPDATED timestamps (git is authority).
28
- 10. Report summary: modules discovered, L1 docs generated, files excluded, warnings.
25
+ 7. Configure UserPromptSubmit hook in platform settings per ${SKILL_DIR}/assets/prizm-docs-format.md.md Section 11.
26
+ 8. Validate all generated docs: size limits (L0 <= 4KB, L1 <= 4KB), pointer resolution (every -> reference resolves), no circular dependencies, KEY: value format compliance, no anti-patterns (prose, code blocks, markdown headers), L1 does not contain INTERFACES/DATA_FLOW/TRAPS/DECISIONS, no date/time metadata fields (git is authority).
27
+ 9. Report summary: modules discovered, L1 docs generated, files excluded, warnings.
29
28
 
30
29
  OUTPUT: List of generated files, module count, and validation results.
31
30
 
@@ -10,7 +10,6 @@ STEPS:
10
10
  3. Generate fresh L1 doc with full module analysis.
11
11
  4. Generate L2 docs for all sub-modules immediately (unlike init, rebuild generates L2 right away to capture current state).
12
12
  5. Update MODULE_INDEX (or MODULE_GROUPS) in root.prizm with new file counts and pointers. Re-evaluate grouping: if total module count > 15 and currently using MODULE_INDEX, convert to MODULE_GROUPS. Regenerate keyword tags for rebuilt modules. **Preserve** any `PROJECT_BRIEF:` line in root.prizm.
13
- 6. Append rebuild entry to changelog.prizm: `- <module-path> | refactor: rebuilt module documentation from scratch`
14
- 7. Validate regenerated docs against size limits and format rules.
13
+ 6. Validate regenerated docs against size limits and format rules.
15
14
 
16
15
  OUTPUT: Regenerated doc summary with before/after comparison.
@@ -8,12 +8,11 @@ STEPS:
8
8
  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.
9
9
  2. Map changed files to modules by matching against MODULE_INDEX or MODULE_GROUPS in root.prizm. Group changes by module.
10
10
  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.
11
- 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 or MODULE_GROUPS counts, CROSS_CUTTING) only if structural change. No UPDATED timestamps — git tracks modification times. **Preserve** any `PROJECT_BRIEF:` line in root.prizm — it is managed by prizmkit-init, not by this skill.
11
+ 4. Update affected docs: L2 first (KEY_FILES, INTERFACES, DATA_FLOW, DEPENDENCIES, TRAPS, DECISIONS), then L1 (FILES count, KEY_FILES, DEPENDENCIES — L1 does NOT contain INTERFACES/DATA_FLOW/TRAPS/DECISIONS), then L0 (MODULE_INDEX or MODULE_GROUPS counts, CROSS_CUTTING) only if structural change. No date/time metadata fields — git tracks modification times. **Preserve** any `PROJECT_BRIEF:` line in root.prizm — it is managed by prizmkit-init, not by this skill.
12
12
  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.
13
- 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 with sections: MODULE, FILES, RESPONSIBILITY, INTERFACES, DATA_FLOW, KEY_FILES, DEPENDENCIES, RULES, TRAPS, DECISIONS, CHANGELOG. Otherwise defer L2.
14
- 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 with sections: MODULE, FILES, RESPONSIBILITY, INTERFACES, DATA_FLOW, KEY_FILES, DEPENDENCIES, RULES, TRAPS, DECISIONS, CHANGELOG. This ensures Update fills documentation gaps left by previous sessions.
15
- 7. Append entries to changelog.prizm using format: `- <module-path> | <verb>: <description>`
16
- 8. Enforce size limits: L0 > 4KB -> consolidate. L1 > 4KB -> trim KEY_FILES descriptions, ensure RULES <= 3 entries. L2 > 5KB -> split or archive.
17
- 9. Stage updated .prizm files via `git add .prizmkit/prizm-docs/`
13
+ 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 with sections: MODULE, FILES, RESPONSIBILITY, INTERFACES, DATA_FLOW, KEY_FILES, DEPENDENCIES, RULES, TRAPS, DECISIONS. Otherwise defer L2.
14
+ 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 with sections: MODULE, FILES, RESPONSIBILITY, INTERFACES, DATA_FLOW, KEY_FILES, DEPENDENCIES, RULES, TRAPS, DECISIONS. This ensures Update fills documentation gaps left by previous sessions.
15
+ 7. Enforce size limits: L0 > 4KB -> consolidate. L1 > 4KB -> trim KEY_FILES descriptions, ensure RULES <= 3 entries. L2 > 5KB -> trim non-essential derived detail or split oversized cross-cutting detail.
16
+ 8. Stage updated .prizm files via `git add .prizmkit/prizm-docs/`
18
17
 
19
18
  OUTPUT: List of updated/created/skipped docs with reasons.
@@ -5,7 +5,7 @@ Check format compliance and consistency of all .prizm docs.
5
5
  PRECONDITION: .prizmkit/prizm-docs/ exists.
6
6
 
7
7
  STEPS:
8
- 1. FORMAT CHECK: Verify all .prizm files use KEY: value format. Flag any prose paragraphs, code blocks (```), markdown headers (##), emoji, ASCII art, or horizontal rules. Flag TRAPS entries missing severity prefix ([CRITICAL], [HIGH], or [LOW]). Note: [REVIEW] preceding severity (e.g., `[REVIEW][HIGH]`) is a valid temporary staleness marker, not a format violation.
8
+ 1. FORMAT CHECK: Verify all .prizm files use KEY: value format. Flag any prose paragraphs, code blocks (```), markdown headers (##), emoji, ASCII art, or horizontal rules. Flag TRAPS entries missing severity prefix ([CRITICAL], [HIGH], or [LOW]). Flag CHANGELOG/UPDATED/date-time metadata fields as auxiliary noise. Note: [REVIEW] preceding severity (e.g., `[REVIEW][HIGH]`) is a valid temporary staleness marker, not a format violation.
9
9
  2. SIZE CHECK: Verify size limits: L0 <= 4KB, L1 <= 4KB, L2 <= 5KB. Report files exceeding limits with current size.
10
10
  3. POINTER CHECK: Verify all arrow (->) references resolve to existing .prizm files. Report broken pointers.
11
11
  4. STALENESS CHECK: Compare git modification time of each .prizm file against source directory. Flag docs where source was modified more recently.
@@ -41,7 +41,7 @@ For initial doc setup, validation, or migration, use `/prizmkit-prizm-docs` inst
41
41
  Synchronize `.prizmkit/prizm-docs/` structure with actual codebase changes from this session.
42
42
  → Read `${SKILL_DIR}/references/structural-sync-steps.md` for the detailed procedure.
43
43
 
44
- **Key outputs**: Updated L1 file counts, L2 INTERFACES/DATA_FLOW, changelog entries, stale TRAPS cleanup.
44
+ **Key outputs**: Synced L1 file counts, L2 INTERFACES/DATA_FLOW, DEPENDENCIES, and stale TRAPS cleanup.
45
45
 
46
46
  ---
47
47
 
@@ -70,14 +70,9 @@ Inject newly discovered project knowledge (TRAPS, RULES, DECISIONS) into archite
70
70
 
71
71
  ---
72
72
 
73
- ## Final: Changelog + Stage
73
+ ## Final: Stage
74
74
 
75
- **3a.** Append to `.prizmkit/prizm-docs/changelog.prizm`:
76
- - Format: `<module-path> | <verb>: <one-line description>`
77
- - Verbs: add, update, fix, remove, refactor, rename, deprecate
78
- - One entry per meaningful change, not one per file
79
-
80
- **3b.** Stage all doc changes:
75
+ **3a.** Stage all doc changes:
81
76
  ```bash
82
77
  git add .prizmkit/prizm-docs/
83
78
  ```
@@ -87,5 +82,4 @@ git add .prizmkit/prizm-docs/
87
82
  ## Output
88
83
 
89
84
  - `.prizmkit/prizm-docs/*.prizm` — Structurally synced + TRAPS/RULES/DECISIONS enriched
90
- - `.prizmkit/prizm-docs/changelog.prizm` — Appended entries
91
85
  - All `.prizmkit/prizm-docs/` changes staged via `git add`
@@ -26,7 +26,7 @@ When writing TRAPS:
26
26
  - OPTIONAL: append `| STALE_IF: <glob>` when the TRAP is tightly coupled to specific files (for auto-expiry detection)
27
27
 
28
28
  **Consuming [REVIEW] markers** (from staleness check 1g):
29
- - If you encounter a TRAP prefixed with `[REVIEW]` (e.g., `[REVIEW][HIGH] ...`), verify whether the trap is still valid by checking the current code. If still valid: remove the `[REVIEW]` prefix, keeping the severity. If no longer relevant: delete the TRAP entry and append CHANGELOG.
29
+ - If you encounter a TRAP prefixed with `[REVIEW]` (e.g., `[REVIEW][HIGH] ...`), verify whether the trap is still valid by checking the current code. If still valid: remove the `[REVIEW]` prefix, keeping the severity. If no longer relevant: delete the TRAP entry.
30
30
 
31
31
  **RULES** — conventions established or constraints discovered:
32
32
  - Format: `- MUST/NEVER/PREFER: <rule>`
@@ -15,7 +15,7 @@ git diff HEAD --name-status
15
15
 
16
16
  **1d.** Update affected docs (bottom-up: L2 → L1 → L0):
17
17
 
18
- - **L2**: If L2 exists → update **only the sections affected by the diff files in this module**. For example, if only `api.js` changed: update its KEY_FILES entry, its INTERFACES (if exports changed), its DEPENDENCIES (if imports changed). Do NOT re-scan unchanged files in the module. 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 with these sections: MODULE, FILES, RESPONSIBILITY, INTERFACES, DATA_FLOW, KEY_FILES, DEPENDENCIES, RULES, TRAPS, DECISIONS, CHANGELOG. Populate **only from the diff files** (the Added/Modified files in this module from step 1a), not from the entire module directory.
18
+ - **L2**: If L2 exists → update **only the sections affected by the diff files in this module**. For example, if only `api.js` changed: update its KEY_FILES entry, its INTERFACES (if exports changed), its DEPENDENCIES (if imports changed). Do NOT re-scan unchanged files in the module. 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 with these sections: MODULE, FILES, RESPONSIBILITY, INTERFACES, DATA_FLOW, KEY_FILES, DEPENDENCIES, RULES, TRAPS, DECISIONS. Populate **only from the diff files** (the Added/Modified files in this module from step 1a), not from the entire module directory.
19
19
  - **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.
20
20
  - **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). **Preserve** any `PROJECT_BRIEF:` line — it is managed by prizmkit-init.
21
21
 
@@ -27,14 +27,14 @@ git diff HEAD --name-status
27
27
  **1f.** Enforce size limits:
28
28
  - L0 > 4KB → if using MODULE_INDEX with > 15 entries, convert to MODULE_GROUPS format (group by functional domain). Otherwise, consolidate MODULE_INDEX descriptions.
29
29
  - L1 > 4KB → trim KEY_FILES descriptions, ensure RULES <= 3 entries
30
- - L2 > 5KB → archive old CHANGELOG entries
30
+ - L2 > 5KB → trim non-essential detail, split oversized cross-cutting detail, or move derived context back to source references
31
31
 
32
32
  **SKIP structural sync if**: only internal implementation changed (no interface/dependency impact), only comments/whitespace, only .prizm files. **DO NOT skip** test file changes or bug fixes — they may reveal TRAPS worth capturing in L2.
33
33
 
34
34
  **1g. TRAPS staleness check** (only when an L2 doc's TRAPS section has > 10 entries):
35
35
 
36
36
  Perform a quick staleness scan on existing TRAPS to prevent unbounded accumulation:
37
- 1. If a TRAP has `STALE_IF:` and the glob-matched files no longer exist (verified via `ls`) → delete the TRAP entry, append CHANGELOG: `remove: archived stale TRAP - <summary>`
37
+ 1. If a TRAP has `STALE_IF:` and the glob-matched files no longer exist (verified via `ls`) → delete the TRAP entry
38
38
  2. If a TRAP has `REF:` → check if the referenced file still exists and the REF commit is less than 180 days old (via `git log --since="180 days ago" <hash> 2>/dev/null`). If the file is deleted OR the REF commit is older than 180 days → prepend `[REVIEW]` to the severity, signaling it needs verification during the next retrospective Job 2
39
39
  3. Process at most 5 of the oldest TRAPS per L2 doc per session (to bound context cost)
40
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.1.55",
3
+ "version": "1.1.57",
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": {