prizmkit 1.1.56 → 1.1.58
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/app-planner/SKILL.md +2 -2
- package/bundled/skills/prizmkit-init/SKILL.md +2 -2
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +1 -3
- package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +11 -34
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +4 -5
- package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +1 -2
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +5 -6
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +1 -1
- package/bundled/skills/prizmkit-retrospective/SKILL.md +3 -9
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +1 -1
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +3 -3
- package/package.json +1 -1
package/bundled/VERSION.json
CHANGED
|
@@ -429,8 +429,8 @@ This applies to:
|
|
|
429
429
|
After initial greeting, use `AskUserQuestion` to confirm intent:
|
|
430
430
|
|
|
431
431
|
**Question**: "What would you like to do?"
|
|
432
|
-
- **
|
|
433
|
-
- **
|
|
432
|
+
- **Explore ideas first (Recommended)** — brainstorm and refine ideas before committing to a plan
|
|
433
|
+
- **Produce a project plan** — define vision, tech stack, and constraints → generates project-brief.md for pipeline use
|
|
434
434
|
- **Generate project context only** — for an existing project that needs a project brief without full planning
|
|
435
435
|
|
|
436
436
|
Route by answer:
|
|
@@ -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
|
|
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,
|
|
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
|
-
-
|
|
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
|
|
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
|
-
|
|
327
|
-
|
|
328
|
-
|
|
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
|
|
428
|
+
## 7.3 Auxiliary Metadata Policy
|
|
452
429
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
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
|
|
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) →
|
|
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
|
|
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.
|
|
26
|
-
8.
|
|
27
|
-
9.
|
|
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.
|
|
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,
|
|
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
|
|
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
|
|
15
|
-
7.
|
|
16
|
-
8.
|
|
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**:
|
|
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:
|
|
73
|
+
## Final: Stage
|
|
74
74
|
|
|
75
|
-
**3a.**
|
|
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
|
|
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
|
|
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 →
|
|
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
|
|
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
|
|