prizmkit 1.1.58 → 1.1.61
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/bin/create-prizmkit.js +8 -6
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/codex/agent-adapter.js +38 -0
- package/bundled/adapters/codex/paths.js +27 -0
- package/bundled/adapters/codex/rules-adapter.js +30 -0
- package/bundled/adapters/codex/settings-adapter.js +27 -0
- package/bundled/adapters/codex/skill-adapter.js +65 -0
- package/bundled/adapters/codex/team-adapter.js +37 -0
- package/bundled/agents/prizm-dev-team-dev.md +6 -5
- package/bundled/dev-pipeline/.env.example +2 -1
- package/bundled/dev-pipeline/README.md +10 -7
- package/bundled/dev-pipeline/lib/common.sh +278 -37
- package/bundled/dev-pipeline/run-bugfix.sh +10 -61
- package/bundled/dev-pipeline/run-feature.sh +10 -78
- package/bundled/dev-pipeline/run-recovery.sh +10 -46
- package/bundled/dev-pipeline/run-refactor.sh +10 -61
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +17 -7
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -3
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +9 -3
- package/bundled/dev-pipeline/scripts/utils.py +6 -4
- package/bundled/dev-pipeline-windows/.env.example +28 -0
- package/bundled/dev-pipeline-windows/README.md +30 -0
- package/bundled/dev-pipeline-windows/SCHEMA_ANALYSIS.md +525 -0
- package/bundled/dev-pipeline-windows/assets/feature-list-example.json +146 -0
- package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +138 -0
- package/bundled/dev-pipeline-windows/launch-bugfix-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/launch-feature-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/launch-refactor-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/lib/common.ps1 +432 -0
- package/bundled/dev-pipeline-windows/lib/daemon.ps1 +140 -0
- package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +446 -0
- package/bundled/dev-pipeline-windows/lib/reset.ps1 +87 -0
- package/bundled/dev-pipeline-windows/reset-bug.ps1 +9 -0
- package/bundled/dev-pipeline-windows/reset-feature.ps1 +9 -0
- package/bundled/dev-pipeline-windows/reset-refactor.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-bugfix.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-feature.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-recovery.ps1 +76 -0
- package/bundled/dev-pipeline-windows/run-refactor.ps1 +9 -0
- package/bundled/dev-pipeline-windows/scripts/check-session-status.py +228 -0
- package/bundled/dev-pipeline-windows/scripts/cleanup-logs.py +192 -0
- package/bundled/dev-pipeline-windows/scripts/detect-stuck.py +530 -0
- package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +1737 -0
- package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +685 -0
- package/bundled/dev-pipeline-windows/scripts/generate-recovery-prompt.py +805 -0
- package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +763 -0
- package/bundled/dev-pipeline-windows/scripts/init-bugfix-pipeline.py +316 -0
- package/bundled/dev-pipeline-windows/scripts/init-dev-team.py +134 -0
- package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +380 -0
- package/bundled/dev-pipeline-windows/scripts/init-refactor-pipeline.py +399 -0
- package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +388 -0
- package/bundled/dev-pipeline-windows/scripts/patch-completion-notes.py +191 -0
- package/bundled/dev-pipeline-windows/scripts/update-bug-status.py +864 -0
- package/bundled/dev-pipeline-windows/scripts/update-checkpoint.py +173 -0
- package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +1501 -0
- package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +1073 -0
- package/bundled/dev-pipeline-windows/scripts/utils.py +542 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/critic-plan-challenge.md +7 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-fix.md +7 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +30 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-resume.md +5 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +7 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +46 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bug-fix-list-schema.json +263 -0
- package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +320 -0
- package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +237 -0
- package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +331 -0
- package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +270 -0
- package/bundled/dev-pipeline-windows/templates/sections/ac-verification-checklist.md +13 -0
- package/bundled/dev-pipeline-windows/templates/sections/checkpoint-system.md +91 -0
- package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +33 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-agent.md +10 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-full.md +12 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-lite.md +7 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-agent.md +8 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-full.md +9 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-lite.md +6 -0
- package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +21 -0
- package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +31 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +72 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +63 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +62 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +71 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +64 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +23 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +24 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +12 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +53 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +32 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +37 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +50 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +52 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +29 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +77 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase0-init.md +13 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +23 -0
- package/bundled/dev-pipeline-windows/templates/sections/session-context.md +5 -0
- package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +6 -0
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-agent.md +67 -0
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-lite.md +58 -0
- package/bundled/dev-pipeline-windows/templates/session-status-schema.json +83 -0
- package/bundled/rules/prizm/prizm-documentation.md +2 -4
- package/bundled/rules/prizm/prizm-progressive-loading.md +2 -1
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +24 -16
- package/bundled/skills/app-planner/references/architecture-decisions.md +9 -5
- package/bundled/skills/app-planner/references/frontend-design-guide.md +1 -1
- package/bundled/skills/feature-planner/SKILL.md +9 -2
- package/bundled/skills/prizmkit-implement/SKILL.md +1 -0
- package/bundled/skills/prizmkit-init/SKILL.md +8 -7
- package/bundled/skills/prizmkit-init/references/config-schema.md +3 -1
- package/bundled/skills/prizmkit-plan/SKILL.md +2 -0
- package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +6 -1
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +2 -2
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +2 -1
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +2 -2
- package/bundled/skills/prizmkit-retrospective/SKILL.md +2 -0
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +2 -0
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +2 -0
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +2 -0
- package/bundled/skills-windows/app-planner/SKILL.md +639 -0
- package/bundled/skills-windows/app-planner/assets/app-design-guide.md +101 -0
- package/bundled/skills-windows/app-planner/references/architecture-decisions.md +52 -0
- package/bundled/skills-windows/app-planner/references/brainstorm-guide.md +101 -0
- package/bundled/skills-windows/app-planner/references/frontend-design-guide.md +71 -0
- package/bundled/skills-windows/app-planner/references/project-brief-guide.md +82 -0
- package/bundled/skills-windows/app-planner/references/red-team-checklist.md +40 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +609 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/fixed-rules.md +285 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/question-bank.md +249 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/template.md +173 -0
- package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +373 -0
- package/bundled/skills-windows/app-planner/references/rules/database/fixed-rules.md +211 -0
- package/bundled/skills-windows/app-planner/references/rules/database/question-bank.md +184 -0
- package/bundled/skills-windows/app-planner/references/rules/database/template.md +158 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +810 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/fixed-rules.md +188 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +302 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +320 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +639 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/fixed-rules.md +290 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/question-bank.md +232 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/template.md +175 -0
- package/bundled/skills-windows/bug-fix-workflow/SKILL.md +415 -0
- package/bundled/skills-windows/bug-planner/SKILL.md +395 -0
- package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +43 -0
- package/bundled/skills-windows/bug-planner/references/critic-and-verification.md +44 -0
- package/bundled/skills-windows/bug-planner/references/error-recovery.md +73 -0
- package/bundled/skills-windows/bug-planner/references/input-formats.md +53 -0
- package/bundled/skills-windows/bug-planner/references/schema-validation.md +25 -0
- package/bundled/skills-windows/bug-planner/references/severity-rules.md +16 -0
- package/bundled/skills-windows/bug-planner/scripts/validate-bug-list.py +322 -0
- package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +380 -0
- package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +441 -0
- package/bundled/skills-windows/feature-pipeline-launcher/scripts/preflight-check.py +462 -0
- package/bundled/skills-windows/feature-planner/SKILL.md +401 -0
- package/bundled/skills-windows/feature-planner/assets/evaluation-guide.md +64 -0
- package/bundled/skills-windows/feature-planner/assets/planning-guide.md +214 -0
- package/bundled/skills-windows/feature-planner/references/browser-interaction.md +59 -0
- package/bundled/skills-windows/feature-planner/references/completeness-review.md +57 -0
- package/bundled/skills-windows/feature-planner/references/decomposition-patterns.md +75 -0
- package/bundled/skills-windows/feature-planner/references/error-recovery.md +90 -0
- package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +112 -0
- package/bundled/skills-windows/feature-planner/references/new-project-planning.md +85 -0
- package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +1029 -0
- package/bundled/skills-windows/feature-workflow/SKILL.md +531 -0
- package/bundled/skills-windows/prizmkit-init/SKILL.md +356 -0
- package/bundled/skills-windows/prizmkit-init/assets/project-brief-template.md +82 -0
- package/bundled/skills-windows/prizmkit-init/references/config-schema.md +70 -0
- package/bundled/skills-windows/prizmkit-init/references/rules/layer-detection.md +41 -0
- package/bundled/skills-windows/prizmkit-init/references/tech-stack-catalog.md +13 -0
- package/bundled/skills-windows/prizmkit-init/references/update-supplement.md +9 -0
- package/bundled/skills-windows/recovery-workflow/SKILL.md +456 -0
- package/bundled/skills-windows/recovery-workflow/evals/evals.json +46 -0
- package/bundled/skills-windows/recovery-workflow/scripts/detect-recovery-state.py +544 -0
- package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +406 -0
- package/bundled/skills-windows/refactor-planner/SKILL.md +540 -0
- package/bundled/skills-windows/refactor-planner/assets/planning-guide.md +292 -0
- package/bundled/skills-windows/refactor-planner/references/behavior-preservation.md +301 -0
- package/bundled/skills-windows/refactor-planner/references/refactor-scoping-guide.md +221 -0
- package/bundled/skills-windows/refactor-planner/scripts/validate-and-generate-refactor.py +858 -0
- package/bundled/skills-windows/refactor-workflow/SKILL.md +503 -0
- package/bundled/templates/hooks/diff-prizm-docs.sh +1 -1
- package/bundled/templates/hooks/prizm-pre-commit.sh +53 -4
- package/bundled/templates/hooks/validate-prizm-docs.sh +62 -7
- package/bundled/templates/project-memory-template.md +2 -1
- package/package.json +3 -2
- package/src/clean.js +73 -2
- package/src/config.js +167 -50
- package/src/detect-platform.js +15 -9
- package/src/external-skills.js +26 -19
- package/src/index.js +28 -10
- package/src/manifest.js +6 -2
- package/src/metadata.js +43 -5
- package/src/platforms.js +38 -0
- package/src/prompts.js +50 -9
- package/src/runtimes.js +20 -0
- package/src/scaffold.js +447 -114
- package/src/upgrade.js +87 -44
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Dev-Pipeline Session Status",
|
|
4
|
+
"description": "Schema for session-status.json written by agent at session end",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["session_id", "feature_id", "status", "timestamp"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"session_id": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"minLength": 1
|
|
11
|
+
},
|
|
12
|
+
"feature_id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^F-\\d{3}(-[A-Z])?$"
|
|
15
|
+
},
|
|
16
|
+
"status": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": ["success", "partial", "failed", "commit_missing", "docs_missing", "merge_conflict"]
|
|
19
|
+
},
|
|
20
|
+
"completed_phases": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "integer",
|
|
24
|
+
"minimum": 0,
|
|
25
|
+
"maximum": 7
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"current_phase": {
|
|
29
|
+
"type": "integer",
|
|
30
|
+
"minimum": 0,
|
|
31
|
+
"maximum": 7
|
|
32
|
+
},
|
|
33
|
+
"checkpoint_reached": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^CP-[0-3]$"
|
|
36
|
+
},
|
|
37
|
+
"tasks_completed": {
|
|
38
|
+
"type": "integer",
|
|
39
|
+
"minimum": 0
|
|
40
|
+
},
|
|
41
|
+
"tasks_total": {
|
|
42
|
+
"type": "integer",
|
|
43
|
+
"minimum": 0
|
|
44
|
+
},
|
|
45
|
+
"errors": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": ["message"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"phase": { "type": "integer" },
|
|
52
|
+
"type": { "type": "string" },
|
|
53
|
+
"message": { "type": "string" },
|
|
54
|
+
"recoverable": { "type": "boolean" }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"can_resume": {
|
|
59
|
+
"type": "boolean"
|
|
60
|
+
},
|
|
61
|
+
"docs_maintained": {
|
|
62
|
+
"type": "boolean"
|
|
63
|
+
},
|
|
64
|
+
"retrospective_done": {
|
|
65
|
+
"type": "boolean"
|
|
66
|
+
},
|
|
67
|
+
"resume_from_phase": {
|
|
68
|
+
"type": ["integer", "null"]
|
|
69
|
+
},
|
|
70
|
+
"artifacts": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"properties": {
|
|
73
|
+
"spec_path": { "type": "string" },
|
|
74
|
+
"plan_path": { "type": "string" },
|
|
75
|
+
"context_snapshot_path": { "type": "string" }
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"timestamp": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"format": "date-time"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -22,6 +22,7 @@ FORMAT RULES (enforced by pre-commit hook — violations block commit):
|
|
|
22
22
|
- KEY: value pairs and dash-prefixed lists only
|
|
23
23
|
- PROHIBITED: prose paragraphs, markdown headers (##/###), code blocks (```), emoji, ASCII art
|
|
24
24
|
- No UPDATED timestamps — git is the authoritative source for temporal information
|
|
25
|
+
- PROHIBITED: CHANGELOG sections/files, UPDATED/date metadata, feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, and `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths
|
|
25
26
|
- This format is designed for AI token efficiency, not human readability. Do not add human-friendly formatting.
|
|
26
27
|
|
|
27
28
|
SIZE LIMITS (hard — pre-commit hook blocks commits exceeding these):
|
|
@@ -32,7 +33,7 @@ SIZE LIMITS (hard — pre-commit hook blocks commits exceeding these):
|
|
|
32
33
|
SIZE OVERFLOW HANDLING:
|
|
33
34
|
- L0 approaching 4KB: if MODULE_INDEX has > 15 entries, convert to MODULE_GROUPS format (group by domain). Otherwise consolidate descriptions, keep only top-5 RULES, remove PATTERNS detail.
|
|
34
35
|
- L1 approaching 4KB: trim KEY_FILES descriptions, ensure RULES <= 3 entries, move detail to L2
|
|
35
|
-
- L2 approaching 5KB:
|
|
36
|
+
- L2 approaching 5KB: remove stale or trivially derivable entries; never create changelog-archive.prizm
|
|
36
37
|
- NEVER exceed hard limits — pre-commit hook will block the commit
|
|
37
38
|
|
|
38
39
|
REQUIRED FIELDS PER LEVEL:
|
|
@@ -58,7 +59,6 @@ L2 detail.prizm:
|
|
|
58
59
|
- DEPENDENCIES
|
|
59
60
|
- INTERFACES
|
|
60
61
|
- TRAPS (with severity prefix: [CRITICAL], [HIGH], or [LOW])
|
|
61
|
-
- CHANGELOG
|
|
62
62
|
|
|
63
63
|
L2 GENERATION TEMPLATE (use when AI first touches a sub-module with no L2 doc):
|
|
64
64
|
|
|
@@ -74,7 +74,5 @@ INTERFACES:
|
|
|
74
74
|
- <exported function/class>: <signature and purpose>
|
|
75
75
|
TRAPS:
|
|
76
76
|
- [LOW] <gotcha, race condition, or non-obvious coupling> | FIX: <approach>
|
|
77
|
-
CHANGELOG:
|
|
78
|
-
- root | add: initial L2 documentation
|
|
79
77
|
|
|
80
78
|
TRAPS is critical — always record gotchas, race conditions, non-obvious behavior, and surprising coupling between modules. Every TRAP must have a severity prefix ([CRITICAL], [HIGH], or [LOW]).
|
|
@@ -9,4 +9,5 @@ This project uses PrizmKit's progressive loading protocol:
|
|
|
9
9
|
- ON FILE EDIT: Read L2 (`.prizmkit/prizm-docs/<module>/<submodule>.prizm`) before modifying
|
|
10
10
|
- NEVER load all .prizm docs at once
|
|
11
11
|
- Arrow notation (->) in .prizm files indicates load pointers
|
|
12
|
-
-
|
|
12
|
+
- .prizm files do not contain CHANGELOG sections/files, UPDATED/date metadata, feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths
|
|
13
|
+
- Update stale durable knowledge in place; git history is the change log
|
|
@@ -35,11 +35,19 @@ If you believe the task is better suited for a different workflow, you MUST:
|
|
|
35
35
|
|
|
36
36
|
**Your ONLY writable outputs are:**
|
|
37
37
|
1. `.prizmkit/plans/project-brief.md` (`.prizmkit/plans/` — accumulated project context brief)
|
|
38
|
-
2. Project conventions and architecture decisions appended to `CLAUDE.md` / `CODEBUDDY.md` (with user consent)
|
|
39
|
-
3. Infrastructure configuration (database conventions, deployment config, **cloud services**) appended to `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section
|
|
38
|
+
2. Project conventions and architecture decisions appended to `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` (with user consent)
|
|
39
|
+
3. Infrastructure configuration (database conventions, deployment config, **cloud services**) appended to `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section
|
|
40
40
|
4. `.prizmkit/rules/<layer>-rules.md` — per-layer development rules generated by Rules Configuration
|
|
41
41
|
5. `.prizmkit/prizm-docs/root.prizm` — `RULES:` pointer line only (not other root.prizm content; created minimally if absent)
|
|
42
42
|
|
|
43
|
+
**Project instruction file selection**:
|
|
44
|
+
- If `.prizmkit/manifest.json` exists, use its `platform` field as the source of truth.
|
|
45
|
+
- Codex → `AGENTS.md`
|
|
46
|
+
- Claude Code → `CLAUDE.md`
|
|
47
|
+
- CodeBuddy → `CODEBUDDY.md`
|
|
48
|
+
- `all` → all three files.
|
|
49
|
+
- Only when the manifest is missing, fall back to installed PrizmKit-owned platform files such as `.codex/agents/*.toml`, `.claude/commands/prizm-kit.md`, or `.codebuddy/skills/prizm-kit/SKILL.md`. Do not treat a generic `.agents/` directory as Codex.
|
|
50
|
+
|
|
43
51
|
**After planning is complete**, you MUST:
|
|
44
52
|
1. Present the summary of captured project-level context (vision, conventions, architecture decisions, project brief)
|
|
45
53
|
2. List the artifacts produced and suggest possible next steps (e.g., `feature-planner`, `prizmkit-plan`, etc.) — but do NOT auto-invoke any of them
|
|
@@ -74,7 +82,7 @@ Do NOT use this skill when:
|
|
|
74
82
|
- During brainstorm Phase C → also read `${SKILL_DIR}/references/red-team-checklist.md`
|
|
75
83
|
|
|
76
84
|
3. **Project conventions discovery** — after Intent Confirmation, before brainstorm or vision work:
|
|
77
|
-
→ Read `CLAUDE.md` / `CODEBUDDY.md` and check for `### Project Conventions` section
|
|
85
|
+
→ Read `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` and check for `### Project Conventions` section
|
|
78
86
|
→ If section exists and covers the project well → skip silently
|
|
79
87
|
→ If section is missing or incomplete → run the **AI-driven convention discovery** below:
|
|
80
88
|
|
|
@@ -123,12 +131,12 @@ Do NOT use this skill when:
|
|
|
123
131
|
- Propose as many conventions as the project genuinely needs, but don't pad with irrelevant ones
|
|
124
132
|
- The "Anything I missed?" question is NOT the end — if the user adds items, ask follow-up `AskUserQuestion` calls to clarify those too
|
|
125
133
|
|
|
126
|
-
→ Save answers to `CLAUDE.md` / `CODEBUDDY.md` under `### Project Conventions` section (format: one bullet per convention)
|
|
134
|
+
→ Save answers to `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` under `### Project Conventions` section (format: one bullet per convention)
|
|
127
135
|
→ Output format will naturally vary per project — that is the intended behavior
|
|
128
136
|
|
|
129
137
|
**Infrastructure Convention Discovery (Database + Deployment)**
|
|
130
138
|
|
|
131
|
-
After project conventions are captured, check `CLAUDE.md` / `CODEBUDDY.md` for `### Infrastructure` section:
|
|
139
|
+
After project conventions are captured, check `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` for `### Infrastructure` section:
|
|
132
140
|
|
|
133
141
|
- If `### Infrastructure` section does not exist → this project was not initialized with prizmkit-init's Phase 4.6. Treat as if both database and deployment are undecided — run full inquiry below.
|
|
134
142
|
- If `<!-- infrastructure: deferred -->` → user explicitly skipped at init time. Ask: "During project init you deferred infrastructure decisions. Would you like to configure them now?" (options: "Yes — configure now (Recommended)", "Skip — decide later")
|
|
@@ -195,7 +203,7 @@ Do NOT use this skill when:
|
|
|
195
203
|
Use `AskUserQuestion` for both rounds. Each question MUST include a "Skip — decide later" option.
|
|
196
204
|
|
|
197
205
|
**After infrastructure inquiry**:
|
|
198
|
-
- Update `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section with all collected information. Replace `<!-- deferred -->` markers with real values. Preserve any existing values that were confirmed unchanged. Full format:
|
|
206
|
+
- Update `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section with all collected information. Replace `<!-- deferred -->` markers with real values. Preserve any existing values that were confirmed unchanged. Full format:
|
|
199
207
|
```markdown
|
|
200
208
|
### Infrastructure
|
|
201
209
|
|
|
@@ -228,7 +236,7 @@ Do NOT use this skill when:
|
|
|
228
236
|
- [vendor]: [service type]
|
|
229
237
|
<!-- If user picked "None" in Round 1, replace this block with: cloud-services: none -->
|
|
230
238
|
```
|
|
231
|
-
- Items still marked "Skip — decide later" remain as `<!-- [topic]: deferred -->` in
|
|
239
|
+
- Items still marked "Skip — decide later" remain as `<!-- [topic]: deferred -->` in the selected project instruction file for `prizmkit-deploy` to pick up later.
|
|
232
240
|
|
|
233
241
|
4. **Project brief accumulation** — throughout all interactive phases:
|
|
234
242
|
→ Read `${SKILL_DIR}/references/project-brief-guide.md` for template and rules
|
|
@@ -383,8 +391,8 @@ Proceed to Prerequisites and continue the app-planner workflow.
|
|
|
383
391
|
Before questions, check optional context files (never block if absent):
|
|
384
392
|
- `.prizmkit/prizm-docs/root.prizm` (architecture/project context)
|
|
385
393
|
- `.prizmkit/config.json` (existing stack preferences and detected tech stack)
|
|
386
|
-
- `CLAUDE.md` / `CODEBUDDY.md` `### Project Conventions` section (previously answered project conventions)
|
|
387
|
-
- `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section (database and deployment config from prizmkit-init or previous app-planner run)
|
|
394
|
+
- `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Project Conventions` section (previously answered project conventions)
|
|
395
|
+
- `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` section (database and deployment config from prizmkit-init or previous app-planner run)
|
|
388
396
|
|
|
389
397
|
**Tech stack auto-population from config.json:**
|
|
390
398
|
- If `.prizmkit/config.json` contains a `tech_stack` object, use it to pre-fill tech assumptions.
|
|
@@ -565,8 +573,8 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
|
|
|
565
573
|
| Checkpoint | Artifact/State | Criteria | Phase |
|
|
566
574
|
|-----------|----------------|----------|-------|
|
|
567
575
|
| **CP-AP-0** | Intent Confirmed | User confirmed session goal (produce / explore) | 1 |
|
|
568
|
-
| **CP-AP-1** | Conventions Checked | Project conventions loaded or asked; `### Project Conventions` section in `CLAUDE.md` / `CODEBUDDY.md` up to date | 1 |
|
|
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 |
|
|
576
|
+
| **CP-AP-1** | Conventions Checked | Project conventions loaded or asked; `### Project Conventions` section in `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` up to date | 1 |
|
|
577
|
+
| **CP-AP-1.5** | Infrastructure Checked | Infrastructure config loaded or asked; `### Infrastructure` section in `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` addressed — database, deployment **and cloud services** each configured or explicitly deferred | 1-2 |
|
|
570
578
|
| **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 |
|
|
571
579
|
| **CP-AP-2** | Vision Summary | Goal/users/differentiators confirmed by user. For brownfield: existing purpose confirmed or refined. | 1-2 |
|
|
572
580
|
| **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 |
|
|
@@ -578,8 +586,8 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
|
|
|
578
586
|
After Phase 2, if framework-shaping architecture decisions emerged during planning (tech stack, communication patterns, data model strategies — not individual feature details), read `${SKILL_DIR}/references/architecture-decisions.md` and follow the capture flow. Most sessions will NOT produce architecture decisions — only capture when genuinely impactful.
|
|
579
587
|
|
|
580
588
|
**How it works**:
|
|
581
|
-
1. If decisions are captured → append to `CLAUDE.md` / `CODEBUDDY.md` under `### Architecture Decisions` section
|
|
582
|
-
2. Downstream skills (feature-planner, prizmkit-plan, etc.) read `CLAUDE.md` / `CODEBUDDY.md` as standard context, so they automatically receive these decisions
|
|
589
|
+
1. If decisions are captured → append to `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` under `### Architecture Decisions` section
|
|
590
|
+
2. Downstream skills (feature-planner, prizmkit-plan, etc.) read `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` as standard context, so they automatically receive these decisions
|
|
583
591
|
3. Do NOT write architecture decision content directly to `.prizmkit/prizm-docs/root.prizm` — that file is maintained by `prizmkit-prizm-docs` and `prizmkit-retrospective`. (The `RULES:` pointer line is managed by Rules Configuration, not by this section.) If the project needs `.prizmkit/prizm-docs/`, recommend the user run `prizmkit-prizm-docs` init after planning.
|
|
584
592
|
|
|
585
593
|
## Project Brief Accumulation
|
|
@@ -612,10 +620,10 @@ When the session appears to be ending:
|
|
|
612
620
|
After all checkpoints pass, present a summary and end the session:
|
|
613
621
|
|
|
614
622
|
1. **Summary** (as text): List all project-level artifacts produced:
|
|
615
|
-
- Project conventions → `CLAUDE.md` / `CODEBUDDY.md` `### Project Conventions`
|
|
616
|
-
- Infrastructure config → `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` (database conventions + deployment config)
|
|
623
|
+
- Project conventions → `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Project Conventions`
|
|
624
|
+
- Infrastructure config → `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Infrastructure` (database conventions + deployment config)
|
|
617
625
|
- Tech stack → `.prizmkit/config.json`
|
|
618
|
-
- Architecture decisions (if any) → `CLAUDE.md` / `CODEBUDDY.md` `### Architecture Decisions`
|
|
626
|
+
- Architecture decisions (if any) → `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Architecture Decisions`
|
|
619
627
|
- Dev rules (if configured) → `.prizmkit/rules/<layer>-rules.md` (with `root.prizm` `RULES:` pointer)
|
|
620
628
|
- Project brief → `.prizmkit/plans/project-brief.md`
|
|
621
629
|
|
|
@@ -25,10 +25,14 @@ After Phase 2 (Confirm constraints and tech assumptions), before Phase 3 (Captur
|
|
|
25
25
|
## How to Capture
|
|
26
26
|
|
|
27
27
|
1. **Detect platform** — determine which project instruction file to update:
|
|
28
|
-
- `.
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
28
|
+
- If `.prizmkit/manifest.json` exists, read `platform` and use it as the source of truth.
|
|
29
|
+
- `codex` → append to `AGENTS.md`
|
|
30
|
+
- `claude` → append to `CLAUDE.md`
|
|
31
|
+
- `codebuddy` → append to `CODEBUDDY.md`
|
|
32
|
+
- `all` → append to all three files. Legacy manifests may contain `both`; treat it as read-only compatibility and append to `CLAUDE.md` and `CODEBUDDY.md` only when encountered.
|
|
33
|
+
- Only when the manifest is missing, fall back to PrizmKit-owned install artifacts: `.codex/agents/*.toml`, `.claude/commands/prizm-kit.md`, `.codebuddy/skills/prizm-kit/SKILL.md`.
|
|
34
|
+
- Do not treat a generic `.agents/` directory as Codex; it may contain unrelated third-party skills.
|
|
35
|
+
- If no platform can be determined, skip (no project instruction file).
|
|
32
36
|
|
|
33
37
|
2. **Check for existing section** — read the target file and look for `### Architecture Decisions` heading:
|
|
34
38
|
- If heading exists → append new entries below it (avoid duplicates with existing entries)
|
|
@@ -43,6 +47,6 @@ After Phase 2 (Confirm constraints and tech assumptions), before Phase 3 (Captur
|
|
|
43
47
|
```
|
|
44
48
|
|
|
45
49
|
4. **User confirmation** — before writing, show the collected decisions and ask:
|
|
46
|
-
> "These architecture decisions were identified during planning. Record them to [CLAUDE.md / CODEBUDDY.md]? (Y/n)"
|
|
50
|
+
> "These architecture decisions were identified during planning. Record them to [AGENTS.md / CLAUDE.md / CODEBUDDY.md]? (Y/n)"
|
|
47
51
|
|
|
48
52
|
If user declines, skip without further prompting.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Create distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics.
|
|
4
4
|
|
|
5
|
-
**app-planner context**: In the planning phase, use this guide to establish **design direction decisions** (aesthetic tone, typography approach, color strategy, layout philosophy). Do NOT produce CSS, code, or implementation artifacts — capture the design direction as decisions in the project instruction file (`CLAUDE.md` / `CODEBUDDY.md`). Downstream implementation skills will consume these decisions when building features.
|
|
5
|
+
**app-planner context**: In the planning phase, use this guide to establish **design direction decisions** (aesthetic tone, typography approach, color strategy, layout philosophy). Do NOT produce CSS, code, or implementation artifacts — capture the design direction as decisions in the project instruction file (`AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md`). Downstream implementation skills will consume these decisions when building features.
|
|
6
6
|
|
|
7
7
|
Load this guide **only when the feature involves frontend/UI work**. Skip for backend-only or infrastructure features.
|
|
8
8
|
|
|
@@ -111,10 +111,17 @@ Before questions, check optional context files (never block if absent):
|
|
|
111
111
|
- `.prizmkit/config.json` (existing stack preferences and detected tech stack)
|
|
112
112
|
- `.prizmkit/plans/project-brief.md` (project context from app-planner, if available)
|
|
113
113
|
- existing `.prizmkit/plans/feature-list.json` (required for incremental mode)
|
|
114
|
-
- `CLAUDE.md`
|
|
114
|
+
- Platform instruction file: use the `platform` field in `.prizmkit/manifest.json` as source of truth when present (`codex` → `AGENTS.md`, `claude` → `CLAUDE.md`, `codebuddy` → `CODEBUDDY.md`, `all` → read every matching file). Legacy manifests may contain `both`; treat it as read-only compatibility and read `CLAUDE.md` plus `CODEBUDDY.md` only when encountered.
|
|
115
115
|
- If `.prizmkit/prizm-docs/root.prizm` is absent and the project has existing source code, scan the directory structure to understand the codebase layout:
|
|
116
116
|
```bash
|
|
117
|
-
find . -maxdepth 2 -type d
|
|
117
|
+
find . -maxdepth 2 -type d \
|
|
118
|
+
-not -path '*/node_modules/*' -not -path '*/.git/*' \
|
|
119
|
+
-not -path '*/dist/*' -not -path '*/build/*' \
|
|
120
|
+
-not -path '*/__pycache__/*' -not -path '*/vendor/*' \
|
|
121
|
+
-not -path '*/.agents/*' -not -path '*/.codex/*' \
|
|
122
|
+
-not -path '*/.claude/*' -not -path '*/.codebuddy/*' \
|
|
123
|
+
-not -path '*/.prizmkit/*' \
|
|
124
|
+
| sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|
|
118
125
|
```
|
|
119
126
|
|
|
120
127
|
**Tech stack from config.json:**
|
|
@@ -41,6 +41,7 @@ For each unchecked task in plan.md, in order:
|
|
|
41
41
|
|
|
42
42
|
1. Read L1/L2 doc for the target file's module — check TRAPS and DECISIONS before modifying files
|
|
43
43
|
2. Apply TDD where applicable: write a failing test first, then implement until it passes. For UI components or configuration changes where unit tests don't apply, skip the test-first step.
|
|
44
|
+
- **Internal ID hygiene**: Do not place PrizmKit feature/bug/refactor IDs (`F-001`, `B-001`, `R-001`), task IDs, session IDs, run IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths in `.prizmkit/prizm-docs/`, user-visible UI text, API responses, emails, notifications, or tests that assert visible product copy. Translate internal references into durable product/domain language before writing memory docs, tests, or UI copy.
|
|
44
45
|
- **Cover three paths for each function**: happy path (valid inputs producing expected behavior), edge cases (boundary values specific to the parameter type and domain — e.g., zero/min/max for numeric, empty collection, boundary index), and error conditions (inputs that should trigger error handling). Determine edge cases from the function's parameter types and domain logic, not from a fixed checklist. If a function has no edge or error paths, don't force them.
|
|
45
46
|
- **No redundant tests**: Check if a test for this behavior already exists before writing. Each test must verify a uniquely different code path — don't write multiple tests that exercise the same logic.
|
|
46
47
|
- **Test your own code only**: Don't test framework behavior, third-party library internals, or language built-ins. For library calls, test the integration point (correct parameters passed, return value correctly handled), not the library itself.
|
|
@@ -5,7 +5,7 @@ description: "Project takeover and bootstrap. Scans any project, generates Prizm
|
|
|
5
5
|
|
|
6
6
|
# PrizmKit Init
|
|
7
7
|
|
|
8
|
-
Project takeover and bootstrap skill. Scans any project (brownfield or greenfield), generates Prizm documentation and project brief. Supports
|
|
8
|
+
Project takeover and bootstrap skill. Scans any project (brownfield or greenfield), generates Prizm documentation and project brief. Supports Codex, Claude Code, CodeBuddy, and multi-platform installations.
|
|
9
9
|
|
|
10
10
|
### When to Use
|
|
11
11
|
- Taking over a new project (brownfield or greenfield)
|
|
@@ -25,7 +25,7 @@ Project takeover and bootstrap skill. Scans any project (brownfield or greenfiel
|
|
|
25
25
|
## Execution Steps
|
|
26
26
|
|
|
27
27
|
**Phase 1: Platform Detection**
|
|
28
|
-
1. Detect which platform is running (
|
|
28
|
+
1. Detect which platform is running (Codex, Claude Code, or CodeBuddy) via AI CLI environment.
|
|
29
29
|
2. Hold detected platform value in memory — written to disk in Phase 6 along with other config fields.
|
|
30
30
|
|
|
31
31
|
**Phase 2: Mode Detection**
|
|
@@ -71,14 +71,15 @@ BROWNFIELD WORKFLOW (existing project):
|
|
|
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
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/`
|
|
74
|
+
- Exclude: `.git/`, `node_modules/`, `vendor/`, `build/`, `dist/`, `__pycache__/`, `target/`, `bin/`, `.agents/`, `.codex/`, `.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 \
|
|
78
78
|
-not -path '*/node_modules/*' -not -path '*/.git/*' \
|
|
79
79
|
-not -path '*/dist/*' -not -path '*/build/*' \
|
|
80
80
|
-not -path '*/__pycache__/*' -not -path '*/vendor/*' \
|
|
81
|
-
|
|
81
|
+
-not -path '*/.agents/*' -not -path '*/.codex/*' \
|
|
82
|
+
-not -path '*/.claude/*' -not -path '*/.codebuddy/*' \
|
|
82
83
|
-not -path '*/.prizmkit/*' -not -path '*/target/*' \
|
|
83
84
|
| sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|
|
84
85
|
```
|
|
@@ -138,7 +139,7 @@ Detect database and deployment signals, then ask 1-2 brief questions. This phase
|
|
|
138
139
|
- If "SaaS platform": follow up with platform selection (Vercel / Railway / Fly.io / Cloudflare / AWS / Other)
|
|
139
140
|
|
|
140
141
|
3. **Write results**:
|
|
141
|
-
- Append `### Infrastructure` section to `CLAUDE.md`
|
|
142
|
+
- Append `### Infrastructure` section to the detected platform instruction file (`AGENTS.md` for Codex, `CLAUDE.md` for Claude Code, `CODEBUDDY.md` for CodeBuddy) with detection results and user answers. Format:
|
|
142
143
|
```markdown
|
|
143
144
|
### Infrastructure
|
|
144
145
|
|
|
@@ -182,7 +183,7 @@ Invoke prizmkit-prizm-docs (Init operation), passing the two-tier module structu
|
|
|
182
183
|
- 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
184
|
- 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
185
|
- Skip L2 (lazy generation) — L2 is generated on first file modification, saving tokens upfront
|
|
185
|
-
- Do not create auxiliary `changelog.prizm
|
|
186
|
+
- Do not create auxiliary `changelog.prizm`, CHANGELOG sections/files, UPDATED/date metadata, feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths; git history is the source of change history
|
|
186
187
|
|
|
187
188
|
**Phase 6: Workspace Initialization**
|
|
188
189
|
6a. Create `.prizmkit/` directory structure (if missing):
|
|
@@ -300,7 +301,7 @@ Layer Detection:
|
|
|
300
301
|
Infrastructure Quick Scan:
|
|
301
302
|
Database: PostgreSQL (Prisma) — detected from dependencies
|
|
302
303
|
Deployment: Vercel — detected from vercel.json
|
|
303
|
-
→ Written to
|
|
304
|
+
→ Written to the detected platform instruction file `### Infrastructure`
|
|
304
305
|
|
|
305
306
|
Rules Quick Entry:
|
|
306
307
|
Matched layers: frontend (React), backend (Express.js), database (Prisma) → keeping default rules
|
|
@@ -19,11 +19,13 @@ Handles re-init without losing user edits:
|
|
|
19
19
|
| Field | Type | Description |
|
|
20
20
|
|-------|------|-------------|
|
|
21
21
|
| `adoption_mode` | string | `"passive"` \| `"advisory"` \| `"active"` |
|
|
22
|
-
| `platform` | string | `"codebuddy"` \| `"claude"` \| `"
|
|
22
|
+
| `platform` | string | `"codebuddy"` \| `"claude"` \| `"codex"` \| `"all"` |
|
|
23
23
|
| `tech_stack` | object | Detected or user-provided tech stack |
|
|
24
24
|
| `tech_stack._auto_detected` | boolean | `true` if auto-detected, `false` if user-provided |
|
|
25
25
|
| `detected_layers` | string[] | Development layers detected in the project. Written by prizmkit-init Phase 4.5. Used to determine available rule configuration options. Values: `frontend` / `backend` / `database` / `mobile`. Empty array when no layers detected or user skipped rules. Always updated on every init run based on fresh code detection — not gated by `_auto_detected` (see Merge Strategy above). |
|
|
26
26
|
|
|
27
|
+
Legacy manifests may still contain `both` for read-only migration compatibility. New config writes must use `codebuddy`, `claude`, `codex`, or `all`.
|
|
28
|
+
|
|
27
29
|
## Examples
|
|
28
30
|
|
|
29
31
|
Fullstack project:
|
|
@@ -49,6 +49,8 @@ A universal spec + plan generator. Takes a natural-language description of ANY d
|
|
|
49
49
|
|
|
50
50
|
**Writing principles**: Focus on WHAT and WHY, never HOW. Every goal needs acceptance criteria. Scope boundaries must be explicit. Mark all genuine ambiguities — the clarification phase resolves them.
|
|
51
51
|
|
|
52
|
+
**Internal ID hygiene**: PrizmKit IDs (`F-001`, `B-001`, `R-001`), task IDs (`T-100`), session IDs, run IDs, branch names, absolute worktree paths, and `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths are internal tracking metadata. They may appear in specs, plans, commit messages, and non-memory pipeline artifacts, but must never be written to `.prizmkit/prizm-docs/`, user-visible product copy, UI text, API responses, or expected UI strings in tests. If a behavior is scoped to the current feature, describe the product behavior without the ID.
|
|
53
|
+
|
|
52
54
|
### Phase 1: Design (spec.md → plan.md)
|
|
53
55
|
|
|
54
56
|
**Precondition**: `spec.md` exists in the artifact directory.
|
|
@@ -37,6 +37,7 @@ CORE_PRINCIPLES:
|
|
|
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
|
+
- Memory hygiene over traceability noise (no CHANGELOG sections/files, UPDATED/date metadata, feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths)
|
|
40
41
|
- Size-enforced (hard limits per level prevent bloat)
|
|
41
42
|
- Lazy L2 generation (detail docs created on first modification or deep read, not during init)
|
|
42
43
|
- Rules hierarchy (root.prizm RULES are authoritative, module RULES supplement only)
|
|
@@ -294,7 +295,7 @@ CONSTRAINTS:
|
|
|
294
295
|
- DATA_FLOW: describes how data moves through the module (moved here from L1 in V4)
|
|
295
296
|
- RULES: full module-specific rules list (L1 only has a 1-3 item summary)
|
|
296
297
|
- DOMAIN-SPECIFIC SECTIONS are flexible, not prescribed
|
|
297
|
-
- DECISIONS
|
|
298
|
+
- DECISIONS records durable rationale only; update or remove stale entries in place when code reality changes
|
|
298
299
|
- TRAPS section is CRITICAL for preventing AI from making known mistakes
|
|
299
300
|
- TRAPS entries MUST have severity prefix ([CRITICAL], [HIGH], or [LOW]). [REVIEW] may precede severity as a temporary staleness marker.
|
|
300
301
|
- TRAPS optional fields: append `| REF: <7-char-hash>` for traceability, `| STALE_IF: <glob>` for auto-expiry detection
|
|
@@ -307,6 +308,7 @@ CONSTRAINTS:
|
|
|
307
308
|
|
|
308
309
|
TEMPORAL_INFO: Git history is the authoritative source for change timing and edit history.
|
|
309
310
|
AUXILIARY_FIELDS: Do not generate CHANGELOG or UPDATED fields in .prizm files.
|
|
311
|
+
WORKFLOW_METADATA: Do not write feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths into .prizm files.
|
|
310
312
|
RATIONALE: Keep project memory focused on durable architecture, interfaces, dependencies, traps, rules, and decisions.
|
|
311
313
|
|
|
312
314
|
---
|
|
@@ -429,6 +431,7 @@ DETAILED_STEPS: → ${SKILL_DIR}/references/op-update.md
|
|
|
429
431
|
|
|
430
432
|
NEVER: Add CHANGELOG sections or changelog.prizm during doc sync.
|
|
431
433
|
NEVER: Add UPDATED/date/time fields to .prizm files.
|
|
434
|
+
NEVER: Add workflow metadata such as feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths.
|
|
432
435
|
RATIONALE: Git already provides history; .prizm files should store only durable project memory.
|
|
433
436
|
|
|
434
437
|
---
|
|
@@ -446,6 +449,8 @@ NEVER: Stale information (update or delete, never leave outdated entries)
|
|
|
446
449
|
NEVER: Full file contents or large code blocks (summarize purpose and interfaces)
|
|
447
450
|
NEVER: TODO items or future plans (those belong in issue trackers)
|
|
448
451
|
NEVER: Session-specific context or conversation history (docs are session-independent)
|
|
452
|
+
NEVER: Workflow metadata such as feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths
|
|
453
|
+
NEVER: CHANGELOG sections, changelog.prizm, or update-history sections
|
|
449
454
|
NEVER: Flowcharts, diagrams, mermaid blocks, or ASCII art (wastes tokens, AI cannot parse visually)
|
|
450
455
|
NEVER: Markdown headers (## / ###) inside .prizm files (use ALL CAPS KEY: format instead)
|
|
451
456
|
NEVER: Rewrite entire .prizm files on update (modify only affected sections)
|
|
@@ -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 CHANGELOG sections/files, UPDATED/date metadata, feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths — git tracks history.
|
|
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.
|
|
@@ -23,7 +23,7 @@ STEPS:
|
|
|
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. 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
|
|
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 CHANGELOG sections/files, no UPDATED/date metadata, no feature/bug/refactor/task/session/run/pipeline/workflow IDs, no branch names, no absolute worktree paths, and no `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths.
|
|
27
27
|
9. Report summary: modules discovered, L1 docs generated, files excluded, warnings.
|
|
28
28
|
|
|
29
29
|
OUTPUT: List of generated files, module count, and validation results.
|
|
@@ -8,11 +8,12 @@ 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, 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.
|
|
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. Do not write CHANGELOG sections/files, UPDATED/date metadata, feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths — git tracks history. **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
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
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
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
|
+
7a. Validate memory hygiene: no CHANGELOG/UPDATED fields, no workflow metadata, no L1 behavioral sections.
|
|
16
17
|
8. Stage updated .prizm files via `git add .prizmkit/prizm-docs/`
|
|
17
18
|
|
|
18
19
|
OUTPUT: List of updated/created/skipped docs with reasons.
|
|
@@ -5,12 +5,12 @@ 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]). Flag CHANGELOG/UPDATED/date
|
|
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 sections/files, UPDATED/date metadata, feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, and `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths 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.
|
|
12
12
|
5. COMPLETENESS CHECK: Verify root.prizm has all required fields (PRIZM_VERSION, PROJECT, LANG, MODULE_INDEX or MODULE_GROUPS). Verify L1 docs have MODULE, FILES, RESPONSIBILITY, DEPENDENCIES (no INTERFACES/TRAPS/DECISIONS). Verify L2 docs have MODULE, FILES, KEY_FILES, DEPENDENCIES, INTERFACES, TRAPS.
|
|
13
|
-
6. ANTI-PATTERN CHECK: Flag duplicate information across levels, implementation details in L0/L1, TODO items, session-specific context.
|
|
13
|
+
6. ANTI-PATTERN CHECK: Flag duplicate information across levels, implementation details in L0/L1, TODO items, session-specific context, changelog/history sections, and workflow metadata.
|
|
14
14
|
7. RULES HIERARCHY CHECK: Verify L1/L2 RULES do not contradict root.prizm RULES. L1/L2 may only supplement with module-specific exceptions.
|
|
15
15
|
8. TRAPS STALENESS CHECK: For each L2 doc where TRAPS section has more than 8 entries, verify that TRAPS include staleness metadata (`STALE_IF:` or `REF:` fields). Flag TRAPS without any staleness metadata as `NEEDS_METADATA` — these are not auto-removed, but flagged for the next `/prizmkit-retrospective` to enrich with `STALE_IF:` globs or `REF:` hashes.
|
|
16
16
|
|
|
@@ -43,6 +43,8 @@ Synchronize `.prizmkit/prizm-docs/` structure with actual codebase changes from
|
|
|
43
43
|
|
|
44
44
|
**Key outputs**: Synced L1 file counts, L2 INTERFACES/DATA_FLOW, DEPENDENCIES, and stale TRAPS cleanup.
|
|
45
45
|
|
|
46
|
+
**Memory hygiene**: `.prizmkit/prizm-docs/` must not contain CHANGELOG sections/files, UPDATED/date metadata, feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths. Convert artifact-scoped wording into durable product/domain language before writing.
|
|
47
|
+
|
|
46
48
|
---
|
|
47
49
|
|
|
48
50
|
### Job 2: Knowledge Injection (conditional)
|
|
@@ -40,6 +40,8 @@ When writing TRAPS:
|
|
|
40
40
|
|
|
41
41
|
**QUALITY GATE**: Every item must answer: "If a new AI session reads only `.prizmkit/prizm-docs/` and this entry, does it gain actionable understanding?" If not, discard. Do not record trivially observable code patterns — the AI can read the code directly.
|
|
42
42
|
|
|
43
|
+
**MEMORY HYGIENE GATE**: Before writing any `.prizmkit/prizm-docs/` entry, remove or translate workflow metadata. Never write CHANGELOG sections/files, UPDATED/date metadata, feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths. If source artifacts say "fixed in B-001" or "implemented in F-003", write only the durable product/domain fact.
|
|
44
|
+
|
|
43
45
|
**2c.** Inject into the correct `.prizmkit/prizm-docs/` file:
|
|
44
46
|
- Module-level TRAPS/RULES/DECISIONS → the affected **L2** `.prizm` file. If the target L2 does not exist, create it first using the L2 GENERATION TEMPLATE before injecting knowledge. (TRAPS/DECISIONS/RULES belong in L2, not L1.)
|
|
45
47
|
- Project-level RULES/PATTERNS → `root.prizm` (respect the current format — MODULE_INDEX or MODULE_GROUPS — do not convert between them during injection)
|
|
@@ -19,6 +19,8 @@ git diff HEAD --name-status
|
|
|
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
|
|
|
22
|
+
**Memory hygiene**: During L0/L1/L2 updates, do not write CHANGELOG sections/files, UPDATED/date metadata, feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths. Update durable sections in place; git history is the change log.
|
|
23
|
+
|
|
22
24
|
**1e.** If new directory qualifies as a module and matches no existing module:
|
|
23
25
|
- A directory qualifies as a module if any of: contains source files forming a logical unit, contains entry/config/interface files, contains qualifying sub-modules, or is referenced by multiple modules as dependency.
|
|
24
26
|
- Create L1 doc immediately, add to MODULE_INDEX.
|