prizmkit 1.1.42 → 1.1.47
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/adapters/claude/settings-adapter.js +4 -4
- package/bundled/adapters/codebuddy/settings-adapter.js +1 -1
- package/bundled/agents/prizm-dev-team-critic.md +9 -9
- package/bundled/agents/prizm-dev-team-dev.md +13 -13
- package/bundled/agents/prizm-dev-team-reviewer.md +2 -2
- package/bundled/dev-pipeline/.env.example +6 -6
- package/bundled/dev-pipeline/README.md +32 -32
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +1 -1
- package/bundled/dev-pipeline/launch-bugfix-daemon.sh +6 -3
- package/bundled/dev-pipeline/launch-feature-daemon.sh +6 -3
- package/bundled/dev-pipeline/launch-refactor-daemon.sh +6 -3
- package/bundled/dev-pipeline/lib/common.sh +36 -7
- package/bundled/dev-pipeline/reset-bug.sh +9 -7
- package/bundled/dev-pipeline/reset-feature.sh +9 -7
- package/bundled/dev-pipeline/reset-refactor.sh +9 -7
- package/bundled/dev-pipeline/run-bugfix.sh +25 -24
- package/bundled/dev-pipeline/run-feature.sh +29 -32
- package/bundled/dev-pipeline/run-recovery.sh +22 -4
- package/bundled/dev-pipeline/run-refactor.sh +27 -28
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +14 -14
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -4
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +18 -12
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +9 -4
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -1
- package/bundled/dev-pipeline/scripts/update-bug-status.py +9 -1
- package/bundled/dev-pipeline/scripts/update-feature-status.py +13 -1
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +9 -1
- package/bundled/dev-pipeline/templates/agent-prompts/critic-plan-challenge.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +2 -2
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +8 -8
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +11 -11
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +9 -9
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +6 -6
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +5 -5
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +6 -6
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase0-init.md +1 -1
- package/bundled/dev-pipeline/tests/test-path-resolution.sh +100 -0
- package/bundled/rules/USAGE.md +2 -2
- package/bundled/rules/_rules-metadata.json +1 -1
- package/bundled/rules/prizm/prizm-commit-workflow.md +1 -1
- package/bundled/rules/prizm/prizm-documentation.md +4 -4
- package/bundled/rules/prizm/prizm-progressive-loading.md +3 -3
- package/bundled/skills/_metadata.json +4 -4
- package/bundled/skills/app-planner/SKILL.md +35 -7
- package/bundled/skills/bug-fix-workflow/SKILL.md +6 -6
- package/bundled/skills/bug-planner/SKILL.md +5 -5
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +21 -21
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +21 -21
- package/bundled/skills/feature-planner/SKILL.md +5 -5
- package/bundled/skills/feature-workflow/SKILL.md +8 -8
- package/bundled/skills/prizm-kit/SKILL.md +10 -10
- package/bundled/skills/prizmkit-committer/SKILL.md +2 -2
- package/bundled/skills/prizmkit-implement/SKILL.md +2 -2
- package/bundled/skills/prizmkit-init/SKILL.md +17 -18
- package/bundled/skills/prizmkit-plan/SKILL.md +3 -3
- package/bundled/skills/prizmkit-plan/references/verification-checklist.md +2 -2
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +17 -17
- package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +45 -45
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +9 -9
- package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +1 -1
- package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +2 -2
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +3 -3
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +1 -1
- package/bundled/skills/prizmkit-retrospective/SKILL.md +10 -10
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -3
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +1 -1
- package/bundled/skills/recovery-workflow/SKILL.md +15 -15
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +0 -1
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +21 -21
- package/bundled/skills/refactor-planner/SKILL.md +6 -6
- package/bundled/skills/refactor-workflow/SKILL.md +9 -9
- package/bundled/team/prizm-dev-team.json +1 -1
- package/bundled/templates/hooks/commit-intent.json +2 -2
- package/bundled/templates/hooks/diff-prizm-docs.sh +8 -8
- package/bundled/templates/hooks/prizm-pre-commit.sh +4 -4
- package/bundled/templates/hooks/validate-prizm-docs.sh +4 -4
- package/bundled/templates/project-memory-template.md +4 -4
- package/package.json +1 -1
- package/src/clean.js +1 -3
- package/src/config.js +1 -1
- package/src/gitignore-template.js +4 -59
- package/src/scaffold.js +12 -11
- package/src/upgrade.js +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "prizmkit-init"
|
|
3
|
-
description: "Project takeover and bootstrap. Scans any project, generates Prizm docs and project brief. Use this skill whenever a user opens a new project for the first time, says 'initialize', 'set up PrizmKit', 'take over this project', 'bootstrap', 'scan this codebase', 'init', or when .prizm-docs/ doesn't exist yet. Also use when PrizmKit was just installed via npx but not yet initialized. (project)"
|
|
3
|
+
description: "Project takeover and bootstrap. Scans any project, generates Prizm docs and project brief. Use this skill whenever a user opens a new project for the first time, says 'initialize', 'set up PrizmKit', 'take over this project', 'bootstrap', 'scan this codebase', 'init', or when .prizmkit/prizm-docs/ doesn't exist yet. Also use when PrizmKit was just installed via npx but not yet initialized. (project)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PrizmKit Init
|
|
@@ -11,7 +11,7 @@ Project takeover and bootstrap skill. Scans any project (brownfield or greenfiel
|
|
|
11
11
|
- Taking over a new project (brownfield or greenfield)
|
|
12
12
|
- User says "initialize PrizmKit", "set up PrizmKit", "take over this project"
|
|
13
13
|
- First time using PrizmKit on a project
|
|
14
|
-
- After `npx prizmkit install` when project has no `.prizm-docs/`
|
|
14
|
+
- After `npx prizmkit install` when project has no `.prizmkit/prizm-docs/`
|
|
15
15
|
|
|
16
16
|
### When NOT to Use
|
|
17
17
|
- All artifacts exist and are up to date → use `/prizmkit-prizm-docs` (Update) instead if you only want to resync docs
|
|
@@ -38,14 +38,14 @@ Scan all init artifacts and display their status:
|
|
|
38
38
|
|
|
39
39
|
| Artifact | Path | Check |
|
|
40
40
|
|----------|------|-------|
|
|
41
|
-
| Prizm docs | `.prizm-docs/` | Directory exists + `root.prizm` present |
|
|
41
|
+
| Prizm docs | `.prizmkit/prizm-docs/` | Directory exists + `root.prizm` present |
|
|
42
42
|
| Runtime config | `.prizmkit/config.json` | File exists |
|
|
43
43
|
| Project brief | `.prizmkit/plans/project-brief.md` | File exists |
|
|
44
44
|
|
|
45
45
|
Display status table to user:
|
|
46
46
|
```
|
|
47
47
|
Init Status Check:
|
|
48
|
-
[exists] .prizm-docs/ (N files)
|
|
48
|
+
[exists] .prizmkit/prizm-docs/ (N files)
|
|
49
49
|
[exists] .prizmkit/config.json
|
|
50
50
|
[missing] .prizmkit/plans/project-brief.md
|
|
51
51
|
```
|
|
@@ -59,7 +59,7 @@ Init Status Check:
|
|
|
59
59
|
Each subsequent phase checks its artifact's action before executing:
|
|
60
60
|
- `action == skip` → output "Skipped (exists)" and move on
|
|
61
61
|
- `action == generate | regenerate` → run normally
|
|
62
|
-
- **Special case for `.prizm-docs/`**:
|
|
62
|
+
- **Special case for `.prizmkit/prizm-docs/`**:
|
|
63
63
|
- `skip` = **Update** mode: preserve existing L1/L2 docs, re-scan tech stack, merge changes, check for missing docs (see `${SKILL_DIR}/references/update-supplement.md`)
|
|
64
64
|
- `regenerate` = **Reinitialize**: overwrite everything
|
|
65
65
|
|
|
@@ -70,8 +70,8 @@ BROWNFIELD WORKFLOW (existing project):
|
|
|
70
70
|
2. Map directory structure using a TWO-TIER model — flat structures lose the nesting relationships that AI needs to navigate the codebase:
|
|
71
71
|
- TOP-LEVEL modules: directories directly under project root that contain source files or sub-directories with source files (e.g. `src/`, `internal/`, `lib/`)
|
|
72
72
|
- SUB-MODULES: directories INSIDE a top-level module (e.g. `src/routes/`, `src/models/`)
|
|
73
|
-
- A sub-module maps to `.prizm-docs/<M>/<S>.prizm`, never to `.prizm-docs/<S>.prizm` — flattening would create ambiguous paths when two modules have identically-named sub-modules
|
|
74
|
-
- Exclude: `.git/`, `node_modules/`, `vendor/`, `build/`, `dist/`, `__pycache__/`, `target/`, `bin/`, `.claude/`, `.codebuddy/`, `.prizmkit
|
|
73
|
+
- A sub-module maps to `.prizmkit/prizm-docs/<M>/<S>.prizm`, never to `.prizmkit/prizm-docs/<S>.prizm` — flattening would create ambiguous paths when two modules have identically-named sub-modules
|
|
74
|
+
- Exclude: `.git/`, `node_modules/`, `vendor/`, `build/`, `dist/`, `__pycache__/`, `target/`, `bin/`, `.claude/`, `.codebuddy/`, `.prizmkit/`
|
|
75
75
|
- **Scan command** — run this to get a 2-level directory tree (excludes noise directories):
|
|
76
76
|
```bash
|
|
77
77
|
find . -maxdepth 2 -type d \
|
|
@@ -79,8 +79,7 @@ BROWNFIELD WORKFLOW (existing project):
|
|
|
79
79
|
-not -path '*/dist/*' -not -path '*/build/*' \
|
|
80
80
|
-not -path '*/__pycache__/*' -not -path '*/vendor/*' \
|
|
81
81
|
-not -path '*/.claude/*' -not -path '*/.codebuddy/*' \
|
|
82
|
-
-not -path '*/.prizmkit/*' -not -path '
|
|
83
|
-
-not -path '*/dev-pipeline/*' -not -path '*/target/*' \
|
|
82
|
+
-not -path '*/.prizmkit/*' -not -path '*/target/*' \
|
|
84
83
|
| sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|
|
85
84
|
```
|
|
86
85
|
3. Identify entry points by language convention
|
|
@@ -151,10 +150,10 @@ Detect database and deployment signals, then ask 1-2 brief questions. This phase
|
|
|
151
150
|
|
|
152
151
|
**Phase 5: Prizm Documentation Generation**
|
|
153
152
|
Invoke prizmkit-prizm-docs (Init operation), passing the two-tier module structure from Phase 4:
|
|
154
|
-
- Create `.prizm-docs/` directory structure mirroring the source tree (sub-module dirs become subdirectories under `.prizm-docs/<top-level>/`)
|
|
153
|
+
- Create `.prizmkit/prizm-docs/` directory structure mirroring the source tree (sub-module dirs become subdirectories under `.prizmkit/prizm-docs/<top-level>/`)
|
|
155
154
|
- 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).
|
|
156
155
|
- 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.
|
|
157
|
-
- Generate L1 docs for top-level modules at `.prizm-docs/<M>.prizm` and for sub-modules at `.prizm-docs/<M>/<S>.prizm`
|
|
156
|
+
- Generate L1 docs for top-level modules at `.prizmkit/prizm-docs/<M>.prizm` and for sub-modules at `.prizmkit/prizm-docs/<M>/<S>.prizm`
|
|
158
157
|
- Create `changelog.prizm`
|
|
159
158
|
- Skip L2 (lazy generation) — L2 is generated on first file modification, saving tokens upfront
|
|
160
159
|
|
|
@@ -231,7 +230,7 @@ GREENFIELD WORKFLOW (new project):
|
|
|
231
230
|
- Record answers in `config.json` `tech_stack` with `"_auto_detected": false` (user-provided, not auto-detected)
|
|
232
231
|
- If user is unsure, skip tech_stack — it can be populated later on re-init after code exists
|
|
233
232
|
- Phase 4.5: Run Infrastructure Quick Scan — in greenfield mode, no auto-detection is possible, so only ask the 2 brief questions (database need and deployment target). If user is unsure, skip — these can be configured later via `app-planner` or `/prizmkit-deploy`.
|
|
234
|
-
- Phase 5: Create minimal `.prizm-docs/` with just `root.prizm` skeleton (populate TECH_STACK from user answers if provided)
|
|
233
|
+
- Phase 5: Create minimal `.prizmkit/prizm-docs/` with just `root.prizm` skeleton (populate TECH_STACK from user answers if provided)
|
|
235
234
|
- Phase 7: Generate project brief (greenfield flow — ask user about project goals, see Phase 7 above)
|
|
236
235
|
- Phases 6, 8: Same as brownfield (Phase 8 Report recommends `/prizmkit-plan` for first feature)
|
|
237
236
|
|
|
@@ -243,7 +242,7 @@ $ /prizmkit-init
|
|
|
243
242
|
|
|
244
243
|
Platform detected: Claude Code
|
|
245
244
|
Init Status Check:
|
|
246
|
-
[missing] .prizm-docs/
|
|
245
|
+
[missing] .prizmkit/prizm-docs/
|
|
247
246
|
[missing] .prizmkit/config.json
|
|
248
247
|
[missing] .prizmkit/plans/project-brief.md
|
|
249
248
|
→ All missing, generating everything.
|
|
@@ -266,10 +265,10 @@ Infrastructure Quick Scan:
|
|
|
266
265
|
→ Written to CLAUDE.md ### Infrastructure
|
|
267
266
|
|
|
268
267
|
Modules discovered:
|
|
269
|
-
src/routes/ → .prizm-docs/routes.prizm (12 files)
|
|
270
|
-
src/models/ → .prizm-docs/models.prizm (8 files)
|
|
271
|
-
src/services/ → .prizm-docs/services.prizm (15 files)
|
|
272
|
-
src/middleware/ → .prizm-docs/middleware.prizm (5 files)
|
|
268
|
+
src/routes/ → .prizmkit/prizm-docs/routes.prizm (12 files)
|
|
269
|
+
src/models/ → .prizmkit/prizm-docs/models.prizm (8 files)
|
|
270
|
+
src/services/ → .prizmkit/prizm-docs/services.prizm (15 files)
|
|
271
|
+
src/middleware/ → .prizmkit/prizm-docs/middleware.prizm (5 files)
|
|
273
272
|
|
|
274
273
|
Project brief: inferred from codebase → confirmed by user
|
|
275
274
|
→ .prizmkit/plans/project-brief.md
|
|
@@ -288,7 +287,7 @@ UPDATE SUPPLEMENT (runs after tech stack merge in Update mode):
|
|
|
288
287
|
$ /prizmkit-init
|
|
289
288
|
|
|
290
289
|
Init Status Check:
|
|
291
|
-
[exists] .prizm-docs/ (12 files)
|
|
290
|
+
[exists] .prizmkit/prizm-docs/ (12 files)
|
|
292
291
|
[exists] .prizmkit/config.json
|
|
293
292
|
[missing] .prizmkit/plans/project-brief.md
|
|
294
293
|
|
|
@@ -36,7 +36,7 @@ A universal spec + plan generator. Takes a natural-language description of ANY d
|
|
|
36
36
|
- If `artifact_dir` is provided → use it directly
|
|
37
37
|
- If not provided → scan `.prizmkit/specs/` for existing `###-*` directories, find highest numeric prefix, next = highest + 1 (zero-padded to 3 digits; start at `001` if empty). Create `.prizmkit/specs/###-task-slug/`
|
|
38
38
|
- Auto-generate 2-10 word task slug from description
|
|
39
|
-
3. Load project context: read `.prizm-docs/root.prizm` and relevant L1/L2 docs
|
|
39
|
+
3. Load project context: read `.prizmkit/prizm-docs/root.prizm` and relevant L1/L2 docs
|
|
40
40
|
4. Generate `spec.md` from template (`${SKILL_DIR}/assets/spec-template.md`):
|
|
41
41
|
- Fill sections based on the task description — all sections are optional, include only what is relevant
|
|
42
42
|
- `[NEEDS CLARIFICATION]` markers for all ambiguous items
|
|
@@ -56,7 +56,7 @@ A universal spec + plan generator. Takes a natural-language description of ANY d
|
|
|
56
56
|
**Steps:**
|
|
57
57
|
|
|
58
58
|
1. Read `spec.md` from the artifact directory
|
|
59
|
-
2. Load project context if not already loaded in Phase 0: read `.prizm-docs/root.prizm` and relevant L1/L2 docs
|
|
59
|
+
2. Load project context if not already loaded in Phase 0: read `.prizmkit/prizm-docs/root.prizm` and relevant L1/L2 docs
|
|
60
60
|
3. Resolve any remaining `[NEEDS CLARIFICATION]` by proposing solutions
|
|
61
61
|
4. Generate `plan.md` from template (`${SKILL_DIR}/assets/plan-template.md`):
|
|
62
62
|
- Change approach (how the changes integrate with existing system)
|
|
@@ -67,7 +67,7 @@ A universal spec + plan generator. Takes a natural-language description of ANY d
|
|
|
67
67
|
- Risk assessment
|
|
68
68
|
- Behavior preservation strategy (if the task modifies existing behavior — include what must remain unchanged and how to verify)
|
|
69
69
|
5. Cross-check: every goal in spec.md maps to plan components — unmapped goals = coverage gaps
|
|
70
|
-
6. Check alignment with `.prizm-docs/root.prizm` RULES section
|
|
70
|
+
6. Check alignment with `.prizmkit/prizm-docs/root.prizm` RULES section
|
|
71
71
|
|
|
72
72
|
### Phase 2: Task Generation (plan.md → Tasks section)
|
|
73
73
|
|
|
@@ -40,8 +40,8 @@ Run this checklist after generating the Tasks section in plan.md. Fix any issues
|
|
|
40
40
|
|
|
41
41
|
## Rules Alignment
|
|
42
42
|
|
|
43
|
-
- [ ] No spec or plan element conflicts with `.prizm-docs/root.prizm` RULES MUST/NEVER directives
|
|
44
|
-
- [ ] Tech stack choices in plan.md match `.prizm-docs/root.prizm` TECH_STACK (if defined)
|
|
43
|
+
- [ ] No spec or plan element conflicts with `.prizmkit/prizm-docs/root.prizm` RULES MUST/NEVER directives
|
|
44
|
+
- [ ] Tech stack choices in plan.md match `.prizmkit/prizm-docs/root.prizm` TECH_STACK (if defined)
|
|
45
45
|
|
|
46
46
|
## Database Design (skip if no Data Model section)
|
|
47
47
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "prizmkit-prizm-docs"
|
|
3
|
-
description: "Project documentation specification and standard for AI-optimized progressive context loading. Defines the .prizm-docs/ 3-level hierarchy (L0/L1/L2), format rules, size limits, and loading protocol. Use this skill to: bootstrap docs for new projects (init), check doc freshness (status), regenerate stale modules (rebuild), validate format compliance (validate), or migrate existing docs (migrate). For incremental doc updates after code changes, use /prizmkit-retrospective instead — it is the sole writer of .prizm-docs/ during development. Trigger on: 'initialize docs', 'check doc status', 'rebuild docs', 'validate docs', 'migrate docs', 'docs are stale', 'prizm docs'. (project)"
|
|
3
|
+
description: "Project documentation specification and standard for AI-optimized progressive context loading. Defines the .prizmkit/prizm-docs/ 3-level hierarchy (L0/L1/L2), format rules, size limits, and loading protocol. Use this skill to: bootstrap docs for new projects (init), check doc freshness (status), regenerate stale modules (rebuild), validate format compliance (validate), or migrate existing docs (migrate). For incremental doc updates after code changes, use /prizmkit-retrospective instead — it is the sole writer of .prizmkit/prizm-docs/ during development. Trigger on: 'initialize docs', 'check doc status', 'rebuild docs', 'validate docs', 'migrate docs', 'docs are stale', 'prizm docs'. (project)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Prizm Docs - AI Documentation Framework
|
|
@@ -30,53 +30,53 @@ This skill handles 6 operations. When invoked, determine the user's intent and e
|
|
|
30
30
|
|--------|----------------------|--------------------------|
|
|
31
31
|
| **Role** | Documentation SPECIFICATION + BOOTSTRAP | Incremental WRITER during development |
|
|
32
32
|
| **When** | Project setup, health checks, migrations | After feature completion, before commit |
|
|
33
|
-
| **Writes** | Initial .prizm-docs/ structure (init, rebuild, migrate) | Incremental updates to existing .prizm-docs/ |
|
|
33
|
+
| **Writes** | Initial .prizmkit/prizm-docs/ structure (init, rebuild, migrate) | Incremental updates to existing .prizmkit/prizm-docs/ |
|
|
34
34
|
| **Reads** | Source code structure (for init/rebuild) | git diff + code changes (for sync) |
|
|
35
|
-
| **Knowledge** | Defines format rules, size limits, loading protocol | Extracts TRAPS/RULES/DECISIONS into `.prizm-docs/` |
|
|
35
|
+
| **Knowledge** | Defines format rules, size limits, loading protocol | Extracts TRAPS/RULES/DECISIONS into `.prizmkit/prizm-docs/` |
|
|
36
36
|
|
|
37
37
|
**Key principle**: `/prizmkit-prizm-docs` defines WHAT the docs should look like and bootstraps them. `/prizmkit-retrospective` is the SOLE WRITER that keeps docs in sync with code during ongoing development.
|
|
38
38
|
|
|
39
39
|
## Operation: Init
|
|
40
40
|
|
|
41
|
-
Bootstrap .prizm-docs/ for the current project.
|
|
42
|
-
PRECONDITION: No .prizm-docs/ directory exists, or user confirms overwrite.
|
|
41
|
+
Bootstrap .prizmkit/prizm-docs/ for the current project.
|
|
42
|
+
PRECONDITION: No .prizmkit/prizm-docs/ directory exists, or user confirms overwrite.
|
|
43
43
|
→ Read `${SKILL_DIR}/references/op-init.md` for detailed steps.
|
|
44
44
|
|
|
45
45
|
## Operation: Update
|
|
46
46
|
|
|
47
|
-
Update .prizm-docs/ to reflect recent code changes.
|
|
48
|
-
PRECONDITION: .prizm-docs/ exists with root.prizm.
|
|
47
|
+
Update .prizmkit/prizm-docs/ to reflect recent code changes.
|
|
48
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists with root.prizm.
|
|
49
49
|
→ Read `${SKILL_DIR}/references/op-update.md` for detailed steps.
|
|
50
50
|
|
|
51
51
|
## Operation: Status
|
|
52
52
|
|
|
53
53
|
Check freshness of all .prizm docs.
|
|
54
|
-
PRECONDITION: .prizm-docs/ exists with root.prizm.
|
|
54
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists with root.prizm.
|
|
55
55
|
→ Read `${SKILL_DIR}/references/op-status.md` for detailed steps.
|
|
56
56
|
|
|
57
57
|
## Operation: Rebuild
|
|
58
58
|
|
|
59
59
|
Regenerate docs for a specific module from scratch. Requires a module path argument.
|
|
60
|
-
PRECONDITION: .prizm-docs/ exists. Module path is valid.
|
|
60
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists. Module path is valid.
|
|
61
61
|
→ Read `${SKILL_DIR}/references/op-rebuild.md` for detailed steps.
|
|
62
62
|
|
|
63
63
|
## Operation: Validate
|
|
64
64
|
|
|
65
65
|
Check format compliance and consistency of all .prizm docs.
|
|
66
|
-
PRECONDITION: .prizm-docs/ exists.
|
|
66
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists.
|
|
67
67
|
→ Read `${SKILL_DIR}/references/op-validate.md` for detailed steps.
|
|
68
68
|
|
|
69
69
|
## Operation: Migrate
|
|
70
70
|
|
|
71
|
-
Convert existing documentation to .prizm-docs/ format.
|
|
72
|
-
PRECONDITION: Existing docs/ or docs/AI_CONTEXT/ directory. No .prizm-docs/ (or user confirms overwrite).
|
|
71
|
+
Convert existing documentation to .prizmkit/prizm-docs/ format.
|
|
72
|
+
PRECONDITION: Existing docs/ or docs/AI_CONTEXT/ directory. No .prizmkit/prizm-docs/ (or user confirms overwrite).
|
|
73
73
|
|
|
74
74
|
STEPS:
|
|
75
75
|
1. DISCOVER existing docs: Scan docs/, docs/AI_CONTEXT/, README.md, ARCHITECTURE.md, and any structured documentation files.
|
|
76
76
|
2. EXTRACT information from existing docs: project metadata, module descriptions, architecture patterns, rules, decisions, dependencies.
|
|
77
77
|
3. MAP existing doc content to Prizm levels: project-wide info -> L0 root.prizm, module-level info -> L1 docs (MODULE, FILES, RESPONSIBILITY, KEY_FILES, DEPENDENCIES), detailed module info -> L2 docs (INTERFACES, DATA_FLOW, TRAPS, DECISIONS, domain-specific sections).
|
|
78
78
|
4. CONVERT prose content to KEY: value format. Strip markdown formatting, tables, diagrams. Condense explanatory text into single-line values.
|
|
79
|
-
5. GENERATE .prizm-docs/ structure following standard init procedure but seeded with extracted information instead of scanning source code alone.
|
|
79
|
+
5. GENERATE .prizmkit/prizm-docs/ structure following standard init procedure but seeded with extracted information instead of scanning source code alone.
|
|
80
80
|
6. VALIDATE migrated docs against Prizm format rules and size limits.
|
|
81
81
|
7. REPORT migration summary: files processed, content mapped, information that could not be automatically converted (requires manual review).
|
|
82
82
|
|
|
@@ -99,7 +99,7 @@ For detailed protocol specifications, see prizm-docs-format.md:
|
|
|
99
99
|
|
|
100
100
|
**Init output (Node.js project):**
|
|
101
101
|
```
|
|
102
|
-
Generated .prizm-docs/:
|
|
102
|
+
Generated .prizmkit/prizm-docs/:
|
|
103
103
|
root.prizm (L0) — 3 modules in MODULE_INDEX
|
|
104
104
|
routes.prizm (L1) — 12 files, 4 interfaces
|
|
105
105
|
models.prizm (L1) — 8 files, 3 interfaces
|
|
@@ -110,8 +110,8 @@ Generated .prizm-docs/:
|
|
|
110
110
|
**Update after adding new API endpoint:**
|
|
111
111
|
```
|
|
112
112
|
Changed: src/routes/avatar.ts (A), src/models/user.ts (M)
|
|
113
|
-
Updated: .prizm-docs/routes.prizm — added avatar.ts to KEY_FILES, new POST /api/avatar interface
|
|
114
|
-
Updated: .prizm-docs/models.prizm — updated User interface with avatar_url field
|
|
115
|
-
Skipped: .prizm-docs/services.prizm — no changes in services module
|
|
113
|
+
Updated: .prizmkit/prizm-docs/routes.prizm — added avatar.ts to KEY_FILES, new POST /api/avatar interface
|
|
114
|
+
Updated: .prizmkit/prizm-docs/models.prizm — updated User interface with avatar_url field
|
|
115
|
+
Skipped: .prizmkit/prizm-docs/services.prizm — no changes in services module
|
|
116
116
|
Appended: changelog.prizm — "routes | add: avatar upload endpoint"
|
|
117
117
|
```
|
|
@@ -3,7 +3,7 @@ PURPOSE: AI-only documentation framework for vibe coding projects
|
|
|
3
3
|
AUDIENCE: AI agents (not humans)
|
|
4
4
|
FORMAT: KEY: value pairs, ALL CAPS section headers, arrow pointers
|
|
5
5
|
FILE_EXT: .prizm
|
|
6
|
-
DOC_ROOT: .prizm-docs/
|
|
6
|
+
DOC_ROOT: .prizmkit/prizm-docs/
|
|
7
7
|
LICENSE: MIT
|
|
8
8
|
|
|
9
9
|
---
|
|
@@ -49,27 +49,27 @@ CORE_PRINCIPLES:
|
|
|
49
49
|
|
|
50
50
|
LEVELS:
|
|
51
51
|
- L0: Root index. ALWAYS loaded at session start. Max 4KB.
|
|
52
|
-
FILE: .prizm-docs/root.prizm
|
|
52
|
+
FILE: .prizmkit/prizm-docs/root.prizm
|
|
53
53
|
CONTAINS: project meta, module index with pointers, build commands, tech stack, top rules
|
|
54
54
|
|
|
55
55
|
- L1: Structural index. Loaded ON DEMAND when AI works in a module area. Max 4KB each.
|
|
56
|
-
FILE: .prizm-docs/<mirrored-path>.prizm (mirrors source directory structure)
|
|
56
|
+
FILE: .prizmkit/prizm-docs/<mirrored-path>.prizm (mirrors source directory structure)
|
|
57
57
|
CONTAINS: module responsibility, subdirs with pointers, key files, dependency graph, critical rules summary (1-3 only)
|
|
58
58
|
DOES NOT CONTAIN: interface signatures, data flow, TRAPS, DECISIONS (those belong in L2)
|
|
59
59
|
|
|
60
60
|
- L2: Behavioral detail. Loaded when AI modifies files in that module OR needs deep understanding. Max 5KB each.
|
|
61
|
-
FILE: .prizm-docs/<mirrored-path>/<submodule>.prizm
|
|
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
64
|
- Changelog: Append-only change log. Loaded at L0. No size limit but keep last 50 entries.
|
|
65
|
-
FILE: .prizm-docs/changelog.prizm
|
|
65
|
+
FILE: .prizmkit/prizm-docs/changelog.prizm
|
|
66
66
|
|
|
67
67
|
## 2.2 Directory Layout
|
|
68
68
|
|
|
69
|
-
STRUCTURE: Mirrors source tree under .prizm-docs/
|
|
69
|
+
STRUCTURE: Mirrors source tree under .prizmkit/prizm-docs/
|
|
70
70
|
|
|
71
71
|
EXAMPLE (Go project):
|
|
72
|
-
.prizm-docs/
|
|
72
|
+
.prizmkit/prizm-docs/
|
|
73
73
|
root.prizm # L0
|
|
74
74
|
changelog.prizm # L0
|
|
75
75
|
internal/
|
|
@@ -90,7 +90,7 @@ EXAMPLE (Go project):
|
|
|
90
90
|
sso.prizm # L2 for internal/service/sso/
|
|
91
91
|
|
|
92
92
|
EXAMPLE (JS/TS project):
|
|
93
|
-
.prizm-docs/
|
|
93
|
+
.prizmkit/prizm-docs/
|
|
94
94
|
root.prizm # L0
|
|
95
95
|
changelog.prizm # L0
|
|
96
96
|
src/
|
|
@@ -102,7 +102,7 @@ EXAMPLE (JS/TS project):
|
|
|
102
102
|
dashboard.prizm # L2 for src/components/dashboard/
|
|
103
103
|
|
|
104
104
|
EXAMPLE (Python project):
|
|
105
|
-
.prizm-docs/
|
|
105
|
+
.prizmkit/prizm-docs/
|
|
106
106
|
root.prizm # L0
|
|
107
107
|
changelog.prizm # L0
|
|
108
108
|
app/
|
|
@@ -116,8 +116,8 @@ EXAMPLE (Python project):
|
|
|
116
116
|
|
|
117
117
|
## 2.3 Git Configuration
|
|
118
118
|
|
|
119
|
-
COMMIT: .prizm-docs/ MUST be committed to git alongside source code
|
|
120
|
-
RATIONALE: .prizm-docs/ is shared project knowledge that all team members (human and AI) benefit from.
|
|
119
|
+
COMMIT: .prizmkit/prizm-docs/ MUST be committed to git alongside source code
|
|
120
|
+
RATIONALE: .prizmkit/prizm-docs/ is shared project knowledge that all team members (human and AI) benefit from.
|
|
121
121
|
|
|
122
122
|
---
|
|
123
123
|
|
|
@@ -145,7 +145,7 @@ TEMPLATE:
|
|
|
145
145
|
- infra: <infrastructure: databases, queues, caches, etc.>
|
|
146
146
|
|
|
147
147
|
MODULE_INDEX:
|
|
148
|
-
- <source-path>: <file-count> files. <one-line description>. -> .prizm-docs/<mirrored-path>.prizm
|
|
148
|
+
- <source-path>: <file-count> files. <one-line description>. -> .prizmkit/prizm-docs/<mirrored-path>.prizm
|
|
149
149
|
(Multi-level entries allowed for efficient navigation. No hard depth limit — constrained by L0 4KB.
|
|
150
150
|
If navigating from L0 to a target module requires 3+ hops, add intermediate entries here.)
|
|
151
151
|
|
|
@@ -162,7 +162,7 @@ TEMPLATE:
|
|
|
162
162
|
|
|
163
163
|
CROSS_CUTTING:
|
|
164
164
|
- <concern-name>: <one-line description>. Modules: <affected-module-list>.
|
|
165
|
-
(Optional: -> .prizm-docs/cross-cutting/<name>.prizm for detailed cross-cutting doc.
|
|
165
|
+
(Optional: -> .prizmkit/prizm-docs/cross-cutting/<name>.prizm for detailed cross-cutting doc.
|
|
166
166
|
Only record concerns spanning 2+ modules. Single-module patterns go in that module's RULES.)
|
|
167
167
|
|
|
168
168
|
DECISIONS:
|
|
@@ -184,10 +184,10 @@ When MODULE_INDEX would exceed 15 entries, replace it with MODULE_GROUPS to stay
|
|
|
184
184
|
|
|
185
185
|
MODULE_GROUPS:
|
|
186
186
|
<domain-name>:
|
|
187
|
-
- <module>: <file-count> files. <one-line description>. -> .prizm-docs/<module>.prizm
|
|
188
|
-
- <module>: <file-count> files. <one-line description>. -> .prizm-docs/<module>.prizm
|
|
187
|
+
- <module>: <file-count> files. <one-line description>. -> .prizmkit/prizm-docs/<module>.prizm
|
|
188
|
+
- <module>: <file-count> files. <one-line description>. -> .prizmkit/prizm-docs/<module>.prizm
|
|
189
189
|
<domain-name>:
|
|
190
|
-
- <module>: <file-count> files. <one-line description>. -> .prizm-docs/<module>.prizm
|
|
190
|
+
- <module>: <file-count> files. <one-line description>. -> .prizmkit/prizm-docs/<module>.prizm
|
|
191
191
|
|
|
192
192
|
CONSTRAINTS for MODULE_GROUPS:
|
|
193
193
|
- Exactly ONE of MODULE_INDEX or MODULE_GROUPS must be present in root.prizm (not both)
|
|
@@ -202,9 +202,9 @@ CONSTRAINTS for MODULE_GROUPS:
|
|
|
202
202
|
Entries may include keyword tags for AI intent matching:
|
|
203
203
|
|
|
204
204
|
MODULE_INDEX:
|
|
205
|
-
- auth [login, session, jwt, oauth]: 12 files. Authentication and authorization. -> .prizm-docs/auth.prizm
|
|
206
|
-
- payments [stripe, billing, subscription]: 8 files. Payment processing. -> .prizm-docs/payments.prizm
|
|
207
|
-
- users: 6 files. User management. -> .prizm-docs/users.prizm
|
|
205
|
+
- auth [login, session, jwt, oauth]: 12 files. Authentication and authorization. -> .prizmkit/prizm-docs/auth.prizm
|
|
206
|
+
- payments [stripe, billing, subscription]: 8 files. Payment processing. -> .prizmkit/prizm-docs/payments.prizm
|
|
207
|
+
- users: 6 files. User management. -> .prizmkit/prizm-docs/users.prizm
|
|
208
208
|
|
|
209
209
|
Tags are optional, enclosed in square brackets after the module name. They contain lowercase keywords that describe the module's domain concepts. AI matches user requirement descriptions against tags to identify relevant modules before loading L1. Tags are auto-generated during Init from module source content (function names, imports, domain terms) and refined during Rebuild.
|
|
210
210
|
|
|
@@ -217,7 +217,7 @@ TEMPLATE:
|
|
|
217
217
|
RESPONSIBILITY: <one-line>
|
|
218
218
|
|
|
219
219
|
SUBDIRS:
|
|
220
|
-
- <name>/: <one-line description>. -> .prizm-docs/<child-path>.prizm
|
|
220
|
+
- <name>/: <one-line description>. -> .prizmkit/prizm-docs/<child-path>.prizm
|
|
221
221
|
|
|
222
222
|
KEY_FILES:
|
|
223
223
|
- <filename>: <role/purpose>
|
|
@@ -321,7 +321,7 @@ TEMPLATE:
|
|
|
321
321
|
|
|
322
322
|
VERBS: add, update, fix, remove, refactor, rename, deprecate
|
|
323
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 .prizm-docs/changelog.prizm provides the timeline.
|
|
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.
|
|
325
325
|
|
|
326
326
|
EXAMPLE:
|
|
327
327
|
CHANGELOG:
|
|
@@ -349,28 +349,28 @@ TIMESTAMPS: No date/time fields in .prizm files. Git is the authoritative source
|
|
|
349
349
|
|
|
350
350
|
## 5.1 Mapping Algorithm
|
|
351
351
|
|
|
352
|
-
RULE: Mirror the source directory tree under .prizm-docs/
|
|
353
|
-
RULE: L1 file for directory D = .prizm-docs/<D>.prizm
|
|
354
|
-
RULE: L2 file for subdirectory D/S = .prizm-docs/<D>/<S>.prizm
|
|
355
|
-
RULE: Root index = .prizm-docs/root.prizm (always)
|
|
356
|
-
RULE: Changelog = .prizm-docs/changelog.prizm (always)
|
|
352
|
+
RULE: Mirror the source directory tree under .prizmkit/prizm-docs/
|
|
353
|
+
RULE: L1 file for directory D = .prizmkit/prizm-docs/<D>.prizm
|
|
354
|
+
RULE: L2 file for subdirectory D/S = .prizmkit/prizm-docs/<D>/<S>.prizm
|
|
355
|
+
RULE: Root index = .prizmkit/prizm-docs/root.prizm (always)
|
|
356
|
+
RULE: Changelog = .prizmkit/prizm-docs/changelog.prizm (always)
|
|
357
357
|
|
|
358
358
|
## 5.2 Examples
|
|
359
359
|
|
|
360
360
|
SOURCE_PATH L1_PRIZM_FILE L2_PRIZM_FILES
|
|
361
|
-
internal/logic/ .prizm-docs/internal/logic.prizm .prizm-docs/internal/logic/*.prizm
|
|
362
|
-
internal/logic/session/ (described in L1 logic.prizm SUBDIRS) .prizm-docs/internal/logic/session.prizm
|
|
363
|
-
internal/repo/store/ (described in L1 repo.prizm SUBDIRS) .prizm-docs/internal/repo/store.prizm
|
|
364
|
-
src/components/ .prizm-docs/src/components.prizm .prizm-docs/src/components/*.prizm
|
|
365
|
-
src/components/auth/ (described in L1 components.prizm) .prizm-docs/src/components/auth.prizm
|
|
366
|
-
app/services/ .prizm-docs/app/services.prizm .prizm-docs/app/services/*.prizm
|
|
361
|
+
internal/logic/ .prizmkit/prizm-docs/internal/logic.prizm .prizmkit/prizm-docs/internal/logic/*.prizm
|
|
362
|
+
internal/logic/session/ (described in L1 logic.prizm SUBDIRS) .prizmkit/prizm-docs/internal/logic/session.prizm
|
|
363
|
+
internal/repo/store/ (described in L1 repo.prizm SUBDIRS) .prizmkit/prizm-docs/internal/repo/store.prizm
|
|
364
|
+
src/components/ .prizmkit/prizm-docs/src/components.prizm .prizmkit/prizm-docs/src/components/*.prizm
|
|
365
|
+
src/components/auth/ (described in L1 components.prizm) .prizmkit/prizm-docs/src/components/auth.prizm
|
|
366
|
+
app/services/ .prizmkit/prizm-docs/app/services.prizm .prizmkit/prizm-docs/app/services/*.prizm
|
|
367
367
|
|
|
368
368
|
## 5.3 Discovery Rule
|
|
369
369
|
|
|
370
370
|
FOR any source file at path P:
|
|
371
|
-
1. Walk up directory tree to find the first ancestor D where .prizm-docs/<D>.prizm exists
|
|
371
|
+
1. Walk up directory tree to find the first ancestor D where .prizmkit/prizm-docs/<D>.prizm exists
|
|
372
372
|
2. That file is the L1 doc for this source file
|
|
373
|
-
3. If P is inside a subdirectory S of D, check if .prizm-docs/<D>/<S>.prizm exists for L2
|
|
373
|
+
3. If P is inside a subdirectory S of D, check if .prizmkit/prizm-docs/<D>/<S>.prizm exists for L2
|
|
374
374
|
4. If no .prizm doc found, the module is undocumented (may need prizmkit-prizm-docs Update operation)
|
|
375
375
|
|
|
376
376
|
---
|
|
@@ -380,7 +380,7 @@ FOR any source file at path P:
|
|
|
380
380
|
## 6.1 When to Load
|
|
381
381
|
|
|
382
382
|
ON_SESSION_START:
|
|
383
|
-
ALWAYS: Read .prizm-docs/root.prizm (L0) if it exists
|
|
383
|
+
ALWAYS: Read .prizmkit/prizm-docs/root.prizm (L0) if it exists
|
|
384
384
|
PURPOSE: Get the project map, understand architecture, know where to look
|
|
385
385
|
|
|
386
386
|
ON_TASK_RECEIVED:
|
|
@@ -450,7 +450,7 @@ DETAILED_STEPS: → ${SKILL_DIR}/references/op-update.md
|
|
|
450
450
|
|
|
451
451
|
## 7.3 Changelog Update
|
|
452
452
|
|
|
453
|
-
ALWAYS append to .prizm-docs/changelog.prizm after any doc update.
|
|
453
|
+
ALWAYS append to .prizmkit/prizm-docs/changelog.prizm after any doc update.
|
|
454
454
|
FORMAT: - <module-path> | <verb>: <one-line description>
|
|
455
455
|
VERBS: add, update, fix, remove, refactor, rename, deprecate
|
|
456
456
|
|
|
@@ -481,10 +481,10 @@ NEVER: TRAPS entries without severity prefix ([CRITICAL], [HIGH], or [LOW])
|
|
|
481
481
|
## 9.1 Algorithm
|
|
482
482
|
|
|
483
483
|
OPERATION: Init (invoked via prizmkit-prizm-docs skill)
|
|
484
|
-
PRECONDITION: No .prizm-docs/ directory exists (or user confirms overwrite)
|
|
484
|
+
PRECONDITION: No .prizmkit/prizm-docs/ directory exists (or user confirms overwrite)
|
|
485
485
|
|
|
486
486
|
INPUT: Project root directory
|
|
487
|
-
OUTPUT: .prizm-docs/ with root.prizm, changelog.prizm, and L1 docs for discovered modules
|
|
487
|
+
OUTPUT: .prizmkit/prizm-docs/ with root.prizm, changelog.prizm, and L1 docs for discovered modules
|
|
488
488
|
|
|
489
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.
|
|
490
490
|
|
|
@@ -505,7 +505,7 @@ A directory does NOT qualify if ALL of the following are true:
|
|
|
505
505
|
|
|
506
506
|
HIERARCHY RULE: if directory X lives inside top-level module M, X is a sub-module of M — NOT a separate top-level module.
|
|
507
507
|
|
|
508
|
-
EXCLUDE: .git/, node_modules/, vendor/, build/, dist/, __pycache__/, target/, bin/, .claude/, .codebuddy/, .prizmkit/, .prizm-docs/, dev-pipeline/
|
|
508
|
+
EXCLUDE: .git/, node_modules/, vendor/, build/, dist/, __pycache__/, target/, bin/, .claude/, .codebuddy/, .prizmkit/, .prizmkit/prizm-docs/, dev-pipeline/
|
|
509
509
|
|
|
510
510
|
## 9.2 Post-Init Behavior
|
|
511
511
|
|
|
@@ -513,13 +513,13 @@ After initialization, L2 docs are created incrementally:
|
|
|
513
513
|
|
|
514
514
|
ON_MODIFY trigger:
|
|
515
515
|
- First time AI modifies a file in sub-module S within module M:
|
|
516
|
-
IF .prizm-docs/<M>/<S>.prizm does not exist:
|
|
516
|
+
IF .prizmkit/prizm-docs/<M>/<S>.prizm does not exist:
|
|
517
517
|
AI reads the source files in S, generates L2 doc, then proceeds with modification
|
|
518
518
|
- This ensures L2 docs have real depth, written when AI has actual context
|
|
519
519
|
|
|
520
520
|
ON_DEEP_READ trigger:
|
|
521
521
|
- When AI needs to deeply understand a module but not modify it (e.g., code review, architecture analysis, dependency tracing, explaining complex logic):
|
|
522
|
-
IF .prizm-docs/<M>/<S>.prizm does not exist:
|
|
522
|
+
IF .prizmkit/prizm-docs/<M>/<S>.prizm does not exist:
|
|
523
523
|
AI reads the source files in S, generates L2 doc for future reference
|
|
524
524
|
- This ensures L2 docs are available for read-heavy analysis tasks, not just modifications
|
|
525
525
|
- RATIONALE: Some tasks require deep understanding without editing (reviewing PRs, answering architecture questions, tracing bugs). Generating L2 during these tasks captures valuable context.
|
|
@@ -534,12 +534,12 @@ The Prizm skill is defined at: ${SKILL_DIR}/SKILL.md
|
|
|
534
534
|
|
|
535
535
|
OPERATIONS (all invoked via the prizmkit-prizm-docs skill):
|
|
536
536
|
|
|
537
|
-
Init - Bootstrap .prizm-docs/ for a new project. → ${SKILL_DIR}/references/op-init.md
|
|
537
|
+
Init - Bootstrap .prizmkit/prizm-docs/ for a new project. → ${SKILL_DIR}/references/op-init.md
|
|
538
538
|
Update - Sync docs with code changes. → ${SKILL_DIR}/references/op-update.md
|
|
539
539
|
Status - Check freshness of all docs. → ${SKILL_DIR}/references/op-status.md
|
|
540
540
|
Rebuild - Regenerate docs for a specific module. → ${SKILL_DIR}/references/op-rebuild.md
|
|
541
541
|
Validate - Check format compliance and consistency. → ${SKILL_DIR}/references/op-validate.md
|
|
542
|
-
Migrate - Convert existing docs to .prizm-docs/ format. Steps inline in SKILL.md.
|
|
542
|
+
Migrate - Convert existing docs to .prizmkit/prizm-docs/ format. Steps inline in SKILL.md.
|
|
543
543
|
|
|
544
544
|
---
|
|
545
545
|
|
|
@@ -566,7 +566,7 @@ JSON:
|
|
|
566
566
|
"hooks": [
|
|
567
567
|
{
|
|
568
568
|
"type": "command",
|
|
569
|
-
"command": "echo 'PRIZMKIT_MAINTENANCE_REQUIRED: Before committing, you MUST run /prizmkit-retrospective. It maintains .prizm-docs/ architecture index — structural sync (KEY_FILES, INTERFACES, DEPENDENCIES) + TRAPS/RULES/DECISIONS injection. After retrospective completes, proceed with /prizmkit-committer for the actual git commit.'"
|
|
569
|
+
"command": "echo 'PRIZMKIT_MAINTENANCE_REQUIRED: Before committing, you MUST run /prizmkit-retrospective. It maintains .prizmkit/prizm-docs/ architecture index — structural sync (KEY_FILES, INTERFACES, DEPENDENCIES) + TRAPS/RULES/DECISIONS injection. After retrospective completes, proceed with /prizmkit-committer for the actual git commit.'"
|
|
570
570
|
}
|
|
571
571
|
]
|
|
572
572
|
}
|
|
@@ -594,7 +594,7 @@ For other AI coding assistants:
|
|
|
594
594
|
- Continue: Use .continue/config.json customInstructions
|
|
595
595
|
- Generic: Add the auto-update protocol text to whatever system prompt or rules file the tool supports
|
|
596
596
|
|
|
597
|
-
The core requirement is: before any commit operation, AI must update affected .prizm-docs/ files.
|
|
597
|
+
The core requirement is: before any commit operation, AI must update affected .prizmkit/prizm-docs/ files.
|
|
598
598
|
|
|
599
599
|
---
|
|
600
600
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Operation: Init — Detailed Steps
|
|
2
2
|
|
|
3
|
-
Bootstrap .prizm-docs/ for the current project.
|
|
3
|
+
Bootstrap .prizmkit/prizm-docs/ for the current project.
|
|
4
4
|
|
|
5
|
-
PRECONDITION: No .prizm-docs/ directory exists, or user confirms overwrite.
|
|
5
|
+
PRECONDITION: No .prizmkit/prizm-docs/ directory exists, or user confirms overwrite.
|
|
6
6
|
|
|
7
7
|
STEPS:
|
|
8
8
|
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.
|
|
@@ -10,16 +10,16 @@ STEPS:
|
|
|
10
10
|
- A directory qualifies as a module if it contains source files forming a logical unit, contains entry/config/interface files, contains qualifying sub-modules, or is referenced by multiple modules as a dependency.
|
|
11
11
|
- TOP-LEVEL modules: directories directly under project root (or under src/ for src-based layouts) that qualify.
|
|
12
12
|
- SUB-MODULES: directories INSIDE a top-level module that qualify. Listed in the parent L1 doc's SUBDIRS section.
|
|
13
|
-
- HIERARCHY RULE: directory X inside top-level module M maps to .prizm-docs/<M>/<X>.prizm, never to .prizm-docs/<X>.prizm.
|
|
14
|
-
- Exclude .git/, node_modules/, vendor/, build/, dist/, __pycache__/, target/, bin/, .claude/, .codebuddy/, .prizmkit/, .prizm-docs/, dev-pipeline/. If total module count > 30, ask user for include/exclude patterns.
|
|
15
|
-
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>/.
|
|
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
|
+
- 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
|
+
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
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.
|
|
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.
|
|
20
20
|
5. Generate L1 .prizm files (structural index only) for ALL modules, each at its correct mirrored path:
|
|
21
|
-
- Top-level module M → write .prizm-docs/<M>.prizm (include SUBDIRS section with pointers to sub-module docs)
|
|
22
|
-
- Sub-module S inside M → write .prizm-docs/<M>/<S>.prizm
|
|
21
|
+
- Top-level module M → write .prizmkit/prizm-docs/<M>.prizm (include SUBDIRS section with pointers to sub-module docs)
|
|
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
25
|
7. Create changelog.prizm with initial entry: `- root | add: initialized prizm documentation framework`
|
|
@@ -35,12 +35,12 @@ After initialization, L2 docs are created incrementally:
|
|
|
35
35
|
|
|
36
36
|
ON_MODIFY trigger:
|
|
37
37
|
- First time AI modifies a file in sub-module S within module M:
|
|
38
|
-
IF .prizm-docs/<M>/<S>.prizm does not exist:
|
|
38
|
+
IF .prizmkit/prizm-docs/<M>/<S>.prizm does not exist:
|
|
39
39
|
AI reads the source files in S, generates L2 doc, then proceeds with modification
|
|
40
40
|
- This ensures L2 docs have real depth, written when AI has actual context
|
|
41
41
|
|
|
42
42
|
ON_DEEP_READ trigger:
|
|
43
43
|
- When AI needs to deeply understand a module but not modify it (e.g., code review, architecture analysis, dependency tracing, explaining complex logic):
|
|
44
|
-
IF .prizm-docs/<M>/<S>.prizm does not exist:
|
|
44
|
+
IF .prizmkit/prizm-docs/<M>/<S>.prizm does not exist:
|
|
45
45
|
AI reads the source files in S, generates L2 doc for future reference
|
|
46
46
|
- This ensures L2 docs are available for read-heavy analysis tasks, not just modifications
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Regenerate docs for a specific module from scratch. Requires a module path argument.
|
|
4
4
|
|
|
5
|
-
PRECONDITION: .prizm-docs/ exists. Module path is valid.
|
|
5
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists. Module path is valid.
|
|
6
6
|
|
|
7
7
|
STEPS:
|
|
8
8
|
1. Delete existing L1 and all L2 docs for the specified module.
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Check freshness of all .prizm docs.
|
|
4
4
|
|
|
5
|
-
PRECONDITION: .prizm-docs/ exists with root.prizm.
|
|
5
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists with root.prizm.
|
|
6
6
|
|
|
7
7
|
STEPS:
|
|
8
|
-
1. Get last git modification time of root.prizm via `git log -1 --format="%ai" -- .prizm-docs/root.prizm`.
|
|
8
|
+
1. Get last git modification time of root.prizm via `git log -1 --format="%ai" -- .prizmkit/prizm-docs/root.prizm`.
|
|
9
9
|
2. Count commits since that time via `git log --since="<timestamp>" --oneline | wc -l`.
|
|
10
10
|
3. For each L1/L2 doc, compare git modification time of the .prizm file (`git log -1 --format="%ai" -- <prizm-file>`) against latest git modification of source files in that module (`git log -1 --format="%ai" -- <module-path>/`).
|
|
11
11
|
4. Classify each doc as: FRESH (prizm file updated after latest source change), STALE (source changed more recently than prizm file), MISSING (module exists but no .prizm doc).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Operation: Update — Detailed Steps
|
|
2
2
|
|
|
3
|
-
Update .prizm-docs/ to reflect recent code changes.
|
|
3
|
+
Update .prizmkit/prizm-docs/ to reflect recent code changes.
|
|
4
4
|
|
|
5
|
-
PRECONDITION: .prizm-docs/ exists with root.prizm.
|
|
5
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists with root.prizm.
|
|
6
6
|
|
|
7
7
|
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.
|
|
@@ -14,6 +14,6 @@ STEPS:
|
|
|
14
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
15
|
7. Append entries to changelog.prizm using format: `- <module-path> | <verb>: <description>`
|
|
16
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 .prizm-docs/`
|
|
17
|
+
9. Stage updated .prizm files via `git add .prizmkit/prizm-docs/`
|
|
18
18
|
|
|
19
19
|
OUTPUT: List of updated/created/skipped docs with reasons.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Check format compliance and consistency of all .prizm docs.
|
|
4
4
|
|
|
5
|
-
PRECONDITION: .prizm-docs/ exists.
|
|
5
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists.
|
|
6
6
|
|
|
7
7
|
STEPS:
|
|
8
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.
|