prizmkit 1.1.55 → 1.1.56

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.56",
3
+ "bundledAt": "2026-05-25T14:52:42.567Z",
4
+ "bundledFrom": "2846267"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.55",
2
+ "version": "1.1.56",
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.1.55",
3
+ "version": "1.1.56",
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": {