prizmkit 1.0.19 → 1.0.21

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.19",
3
- "bundledAt": "2026-03-15T15:17:35.921Z",
4
- "bundledFrom": "7fb7d0a"
2
+ "frameworkVersion": "1.0.21",
3
+ "bundledAt": "2026-03-15T16:24:08.378Z",
4
+ "bundledFrom": "db1bf04"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.19",
2
+ "version": "1.0.21",
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.",
@@ -34,16 +34,20 @@ BROWNFIELD WORKFLOW (existing project):
34
34
 
35
35
  **Step 1: Project Scanning**
36
36
  1. Detect tech stack from build files (`package.json`, `requirements.txt`, `go.mod`, `pom.xml`, `Cargo.toml`, etc.)
37
- 2. Map directory structure identify source directories, test directories, config files
37
+ 2. Map directory structure using a TWO-TIER model do NOT flatten:
38
+ - TOP-LEVEL modules: directories directly under project root that contain source files or sub-directories with source files (e.g. `dev-pipeline/`, `src/`, `internal/`)
39
+ - SUB-MODULES: directories INSIDE a top-level module (e.g. `dev-pipeline/scripts/`, `dev-pipeline/lib/`)
40
+ - A sub-module is NEVER treated as a top-level module, even if it has many files
41
+ - Exclude: `.git/`, `node_modules/`, `vendor/`, `build/`, `dist/`, `__pycache__/`, `.claude/`, `.codebuddy/`, `.prizmkit/`, `.prizm-docs/`
38
42
  3. Identify entry points by language convention
39
43
  4. Catalog dependencies (external packages)
40
44
  5. Count source files per directory
41
45
 
42
46
  **Step 2: Prizm Documentation Generation**
43
- 2a. Invoke prizmkit-prizm-docs `prizmkit.doc.init` algorithm:
44
- - Create `.prizm-docs/` directory structure
45
- - Generate `root.prizm` (L0) with project meta and module index
46
- - Generate L1 docs for all discovered modules
47
+ 2a. Invoke prizmkit-prizm-docs `prizmkit.doc.init` algorithm, passing the two-tier module structure from Step 1:
48
+ - Create `.prizm-docs/` directory structure mirroring the source tree (sub-module dirs become subdirectories under `.prizm-docs/<top-level>/`)
49
+ - Generate `root.prizm` (L0) with project meta and MODULE_INDEX listing ONLY top-level modules
50
+ - Generate L1 docs for top-level modules at `.prizm-docs/<M>.prizm` and for sub-modules at `.prizm-docs/<M>/<S>.prizm`
47
51
  - Create `changelog.prizm`
48
52
  - Skip L2 (lazy generation)
49
53
 
@@ -17,10 +17,17 @@ PRECONDITION: No .prizm-docs/ directory exists, or user confirms overwrite.
17
17
 
18
18
  STEPS:
19
19
  1. Detect project type by scanning for build system files (go.mod, package.json, requirements.txt, Cargo.toml, pom.xml, *.csproj). Identify primary language, framework, build command, test command, and entry points.
20
- 2. Discover modules by finding directories with 3+ source files. Recognize common patterns (controllers/, services/, models/, components/, hooks/, utils/, lib/, pkg/, internal/, cmd/, api/, routes/, middleware/). Exclude vendor/, node_modules/, .git/, build/, dist/, __pycache__/, target/, bin/. If module count > 30, ask user for include/exclude patterns.
21
- 3. Create .prizm-docs/ directory structure mirroring the source tree.
22
- 4. Generate root.prizm (L0) with PROJECT, LANG, FRAMEWORK, BUILD, TEST, ENTRY, MODULE_INDEX with arrow pointers, RULES extracted from CODEBUDDY.md/README/linter configs, and PATTERNS. Set PRIZM_VERSION: 2, UPDATED: today's date. Max 4KB.
23
- 5. Generate L1 .prizm files for each discovered module. Each L1 includes MODULE, FILES count, RESPONSIBILITY, SUBDIRS with pointers, KEY_FILES (5-10 most important), INTERFACES (public/exported only), DEPENDENCIES (imports, imported-by, external), RULES, DATA_FLOW. Max 3KB each.
20
+ 2. Discover modules in TWO tiers DO NOT FLATTEN the directory hierarchy:
21
+ - TOP-LEVEL modules: directories directly under project root (or under src/ for src-based layouts) that contain 3+ source files OR contain sub-directories with 3+ source files. These go into MODULE_INDEX.
22
+ - SUB-MODULES: directories INSIDE a top-level module that contain 3+ source files. These are NOT top-level modules they are listed in the parent L1 doc's SUBDIRS section only.
23
+ - HIERARCHY RULE: if directory X lives inside top-level module M, it maps to .prizm-docs/<M>/<X>.prizm NEVER to .prizm-docs/<X>.prizm.
24
+ - Exclude vendor/, node_modules/, .git/, build/, dist/, __pycache__/, target/, bin/. If top-level module count > 30, ask user for include/exclude patterns.
25
+ 3. Create .prizm-docs/ directory structure mirroring the source tree exactly. For each top-level module M that has sub-modules, create the subdirectory .prizm-docs/<M>/. NEVER place a sub-module's .prizm file at the .prizm-docs/ root.
26
+ 4. Generate root.prizm (L0) with PROJECT, LANG, FRAMEWORK, BUILD, TEST, ENTRY, MODULE_INDEX listing ONLY top-level modules with arrow pointers to .prizm-docs/<M>.prizm, RULES extracted from CODEBUDDY.md/CLAUDE.md/README/linter configs, and PATTERNS. Sub-modules must NOT appear in MODULE_INDEX. Set PRIZM_VERSION: 2, UPDATED: today's date. Max 4KB.
27
+ 5. Generate L1 .prizm files for ALL modules (top-level and sub-modules), each at its correct mirrored path:
28
+ - Top-level module M → write .prizm-docs/<M>.prizm (include SUBDIRS section with pointers to sub-module docs)
29
+ - Sub-module S inside M → write .prizm-docs/<M>/<S>.prizm
30
+ Each L1 includes MODULE (full relative path), FILES count, RESPONSIBILITY, SUBDIRS with pointers (for top-level only), KEY_FILES (5-10 most important), INTERFACES (public/exported only), DEPENDENCIES (imports, imported-by, external), RULES, DATA_FLOW. Max 3KB each.
24
31
  6. DO NOT generate L2 docs during init. L2 is created lazily on first file modification in a sub-module, or when AI needs deep understanding of a module (ON_DEEP_READ trigger).
25
32
  7. Create changelog.prizm with initial entry: `- YYYY-MM-DD | root | add: initialized prizm documentation framework`
26
33
  8. Configure UserPromptSubmit hook in .codebuddy/settings.json per ${SKILL_DIR}/assets/PRIZM-SPEC.md Section 11.
@@ -468,33 +468,62 @@ STEPS:
468
468
  - Java: *Application.java, Main.java
469
469
 
470
470
  2. DISCOVER_MODULES:
471
- SCAN source directories:
472
- - Find directories containing 3+ source files of the primary language
473
- - Recognize common patterns: controllers/, services/, models/, components/, hooks/, utils/, lib/, pkg/, internal/, cmd/, api/, routes/, middleware/
474
- - Each qualifying directory = one module candidate
471
+ SCAN source directories, preserving the tree structure (DO NOT FLATTEN):
472
+
473
+ a. IDENTIFY TOP-LEVEL modules: directories directly under project root (or directly under src/ for src-based layouts) that either:
474
+ - Contain 3+ source files of the primary language, OR
475
+ - Contain sub-directories that each have 3+ source files
476
+ RESULT: top_modules = [dev-pipeline, src, internal, app, ...]
477
+
478
+ b. IDENTIFY SUB-MODULES: for each top-level module M, find directories INSIDE M that contain 3+ source files
479
+ RESULT: sub_modules[M] = [scripts, lib, templates, ...] (relative names, not full paths)
480
+
481
+ c. HIERARCHY RULE: if directory X lives inside top-level module M, X is a sub-module of M — NOT a separate top-level module.
482
+ WRONG: dev-pipeline/scripts/ treated as top-level module -> .prizm-docs/scripts.prizm
483
+ CORRECT: dev-pipeline/scripts/ is a sub-module of dev-pipeline -> .prizm-docs/dev-pipeline/scripts.prizm
484
+
485
+ d. MODULE_INDEX in root.prizm lists ONLY top-level modules from step 2a.
486
+ Sub-modules appear in their parent's L1 doc SUBDIRS section, not in MODULE_INDEX.
487
+
475
488
  - EXCLUDE: vendor/, node_modules/, .git/, build/, dist/, __pycache__/, target/, bin/
476
- IF module count > 30: ASK user for include/exclude patterns
489
+ IF top-level module count > 30: ASK user for include/exclude patterns
477
490
 
478
491
  3. CREATE_DIRECTORY_STRUCTURE:
479
492
  Create .prizm-docs/ directory
480
- Create subdirectories mirroring source module tree
493
+ For each top-level module M that has sub-modules: create .prizm-docs/<M>/ directory
494
+ RULE: .prizm-docs/ directory tree must mirror the source directory tree exactly
495
+ EXAMPLE:
496
+ source: dev-pipeline/scripts/ -> prizm: .prizm-docs/dev-pipeline/scripts.prizm
497
+ source: dev-pipeline/lib/ -> prizm: .prizm-docs/dev-pipeline/lib.prizm
498
+ source: dev-pipeline/ -> prizm: .prizm-docs/dev-pipeline.prizm
499
+ NEVER create .prizm-docs/scripts.prizm for a directory that lives at dev-pipeline/scripts/
481
500
 
482
501
  4. GENERATE_ROOT (L0):
483
502
  Fill: PROJECT, LANG, FRAMEWORK, BUILD, TEST, ENTRY from step 1
484
- Build: MODULE_INDEX from step 2 (one entry per module with file count and pointer)
485
- Extract: RULES from existing CODEBUDDY.md, README, .editorconfig, linter configs
503
+ Build: MODULE_INDEX — list ONLY top-level modules from step 2a, one entry per module with pointer to .prizm-docs/<M>.prizm
504
+ NEVER list sub-modules in MODULE_INDEX (sub-modules are navigated via L1 SUBDIRS pointers)
505
+ Extract: RULES from existing CODEBUDDY.md, CLAUDE.md, README, .editorconfig, linter configs
486
506
  Extract: PATTERNS from common code patterns observed in step 2
487
507
  Set: PRIZM_VERSION: 2, UPDATED: today's date
488
508
 
489
509
  5. GENERATE_L1_DOCS:
490
- FOR EACH module in MODULE_INDEX:
491
- SCAN module directory:
492
- - Count all source files
510
+ FOR EACH top-level module M in MODULE_INDEX:
511
+ SCAN M directory:
512
+ - Count all source files (direct files only, not recursive)
493
513
  - Identify exported/public interfaces (language-specific: exported funcs in Go, export in JS/TS, public in Java, pub in Rust)
494
514
  - Trace import/require/use statements for DEPENDENCIES
495
- - Identify subdirectories for SUBDIRS
515
+ - List sub-modules from step 2b in SUBDIRS with pointers: .prizm-docs/<M>/<sub>.prizm
496
516
  - Identify 5-10 most important files for KEY_FILES
497
- WRITE: .prizm-docs/<mirrored-path>.prizm
517
+ WRITE: .prizm-docs/<M>.prizm
518
+
519
+ FOR EACH sub-module S of top-level module M:
520
+ SCAN M/S directory:
521
+ - Count all source files in S
522
+ - Identify exported/public interfaces within S
523
+ - Trace dependencies within S
524
+ - Identify key files in S
525
+ WRITE: .prizm-docs/<M>/<S>.prizm
526
+ NOTE: This is still an L1 doc (module index level), written at the mirrored sub-path
498
527
 
499
528
  6. SKIP_L2:
500
529
  DO NOT generate L2 docs during initialization.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
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": {