prizmkit 1.1.1 → 1.1.4
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/agent-adapter.js +18 -0
- package/bundled/adapters/claude/command-adapter.js +1 -27
- package/bundled/agents/prizm-dev-team-critic.md +2 -0
- package/bundled/agents/prizm-dev-team-dev.md +2 -0
- package/bundled/agents/prizm-dev-team-reviewer.md +2 -0
- package/bundled/dev-pipeline/README.md +63 -63
- package/bundled/dev-pipeline/assets/feature-list-example.json +1 -1
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +1 -1
- package/bundled/dev-pipeline/{launch-daemon.sh → launch-feature-daemon.sh} +33 -33
- package/bundled/dev-pipeline/launch-refactor-daemon.sh +454 -0
- package/bundled/dev-pipeline/lib/branch.sh +1 -1
- package/bundled/dev-pipeline/reset-feature.sh +3 -3
- package/bundled/dev-pipeline/reset-refactor.sh +312 -0
- package/bundled/dev-pipeline/{retry-bug.sh → retry-bugfix.sh} +47 -59
- package/bundled/dev-pipeline/retry-feature.sh +41 -54
- package/bundled/dev-pipeline/retry-refactor.sh +358 -0
- package/bundled/dev-pipeline/run-bugfix.sh +41 -0
- package/bundled/dev-pipeline/{run.sh → run-feature.sh} +64 -31
- package/bundled/dev-pipeline/run-refactor.sh +787 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +398 -10
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +124 -0
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +419 -0
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +393 -0
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +726 -0
- package/bundled/dev-pipeline/templates/agent-prompts/critic-code-challenge.md +13 -0
- package/bundled/dev-pipeline/templates/agent-prompts/critic-plan-challenge.md +7 -0
- package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +7 -0
- package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +27 -0
- package/bundled/dev-pipeline/templates/agent-prompts/dev-resume.md +5 -0
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +5 -0
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +12 -0
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +33 -2
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +13 -9
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +16 -12
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +22 -4
- package/bundled/dev-pipeline/templates/feature-list-schema.json +1 -1
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +159 -0
- package/bundled/dev-pipeline/templates/sections/ac-verification-checklist.md +13 -0
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +36 -0
- package/bundled/dev-pipeline/templates/sections/failure-log-check.md +2 -1
- package/bundled/dev-pipeline/templates/sections/feature-context.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +11 -7
- package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +11 -7
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +5 -1
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-critic-code.md +11 -10
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +12 -10
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan.md +11 -9
- package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +10 -10
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +12 -16
- package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-plan-agent.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-plan-lite.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +11 -13
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +12 -20
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase0-init.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase0-test-baseline.md +3 -0
- package/bundled/dev-pipeline/templates/sections/resume-header.md +4 -1
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery.md +75 -0
- package/bundled/rules/prizm/prizm-commit-workflow.md +1 -0
- package/bundled/rules/prizm/prizm-documentation.md +15 -15
- package/bundled/rules/prizm/prizm-progressive-loading.md +2 -1
- package/bundled/skills/_metadata.json +33 -6
- package/bundled/skills/app-planner/SKILL.md +105 -320
- package/bundled/skills/app-planner/assets/app-design-guide.md +101 -0
- package/bundled/skills/app-planner/references/frontend-design-guide.md +1 -1
- package/bundled/skills/app-planner/references/project-brief-guide.md +49 -80
- package/bundled/skills/bug-fix-workflow/SKILL.md +2 -2
- package/bundled/skills/bug-planner/SKILL.md +68 -5
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +3 -2
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +19 -5
- package/bundled/skills/{dev-pipeline-launcher → feature-pipeline-launcher}/SKILL.md +32 -32
- package/bundled/skills/feature-planner/SKILL.md +337 -0
- package/bundled/skills/{app-planner → feature-planner}/assets/evaluation-guide.md +4 -4
- package/bundled/skills/{app-planner → feature-planner}/assets/planning-guide.md +3 -171
- package/bundled/skills/{app-planner → feature-planner}/references/browser-interaction.md +6 -5
- package/bundled/skills/feature-planner/references/decomposition-patterns.md +75 -0
- package/bundled/skills/{app-planner → feature-planner}/references/error-recovery.md +8 -8
- package/bundled/skills/{app-planner → feature-planner}/references/incremental-feature-planning.md +1 -1
- package/bundled/skills/{app-planner/references/new-app-planning.md → feature-planner/references/new-project-planning.md} +1 -1
- package/bundled/skills/{app-planner → feature-planner}/scripts/validate-and-generate.py +4 -4
- package/bundled/skills/feature-workflow/SKILL.md +23 -23
- package/bundled/skills/prizm-kit/SKILL.md +1 -3
- package/bundled/skills/prizm-kit/assets/project-memory-template.md +4 -2
- package/bundled/skills/prizmkit-analyze/SKILL.md +2 -5
- package/bundled/skills/prizmkit-code-review/SKILL.md +2 -2
- package/bundled/skills/prizmkit-committer/SKILL.md +32 -8
- package/bundled/skills/prizmkit-deploy/SKILL.md +1 -5
- package/bundled/skills/prizmkit-implement/SKILL.md +5 -51
- package/bundled/skills/prizmkit-init/SKILL.md +7 -78
- package/bundled/skills/prizmkit-plan/SKILL.md +1 -12
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +13 -28
- package/bundled/skills/prizmkit-prizm-docs/assets/PRIZM-SPEC.md +52 -1
- package/bundled/skills/prizmkit-retrospective/SKILL.md +12 -117
- package/bundled/skills/recovery-workflow/SKILL.md +168 -316
- package/bundled/skills/recovery-workflow/evals/evals.json +29 -13
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +232 -274
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +352 -0
- package/bundled/skills/refactor-planner/SKILL.md +436 -0
- package/bundled/skills/refactor-planner/assets/planning-guide.md +292 -0
- package/bundled/skills/refactor-planner/references/behavior-preservation.md +301 -0
- package/bundled/skills/refactor-planner/references/refactor-scoping-guide.md +221 -0
- package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +786 -0
- package/bundled/skills/refactor-workflow/SKILL.md +299 -319
- package/bundled/team/prizm-dev-team.json +1 -1
- package/package.json +1 -1
- package/src/clean.js +3 -3
- package/src/scaffold.js +6 -6
- package/bundled/skills/prizmkit-plan/assets/spec-template.md +0 -56
- package/bundled/skills/prizmkit-plan/references/clarify-guide.md +0 -67
- package/src/config.js +0 -504
- package/src/prompts.js +0 -210
- /package/bundled/skills/{dev-pipeline-launcher → feature-pipeline-launcher}/scripts/preflight-check.py +0 -0
|
@@ -5,18 +5,16 @@ description: "Incremental .prizm-docs/ maintainer. Performs two jobs: (1) struct
|
|
|
5
5
|
|
|
6
6
|
# PrizmKit Retrospective
|
|
7
7
|
|
|
8
|
-
All project knowledge is maintained in a single store:
|
|
9
|
-
|
|
10
8
|
| Store | Location | Content | Purpose |
|
|
11
9
|
|-------|----------|---------|---------|
|
|
12
10
|
| **Architecture Index** | `.prizm-docs/` | MODULE, FILES, INTERFACES, DEPENDENCIES, TRAPS, RULES, DECISIONS | AI quickly locates code structure, interfaces, known pitfalls, and key design decisions |
|
|
13
11
|
|
|
14
|
-
**This skill
|
|
12
|
+
**This skill handles both structural sync and knowledge injection in one pass:**
|
|
15
13
|
|
|
16
14
|
1. **Structural Sync** — reflect what changed in code → `.prizm-docs/` (KEY_FILES, INTERFACES, DEPENDENCIES, file counts)
|
|
17
|
-
2. **Architecture Knowledge** — inject TRAPS, RULES, and DECISIONS → `.prizm-docs
|
|
15
|
+
2. **Architecture Knowledge** — inject TRAPS, RULES, and DECISIONS → `.prizm-docs/`
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
For initial doc setup, validation, or migration, use `/prizmkit-prizm-docs` instead.
|
|
20
18
|
|
|
21
19
|
## When to Use
|
|
22
20
|
|
|
@@ -34,122 +32,19 @@ No other skill writes to `.prizm-docs/`. This is the sole writer during ongoing
|
|
|
34
32
|
|
|
35
33
|
---
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
### Steps
|
|
42
|
-
|
|
43
|
-
**1a.** Get changed files:
|
|
44
|
-
```bash
|
|
45
|
-
git diff --cached --name-status
|
|
46
|
-
```
|
|
47
|
-
If nothing staged, fallback:
|
|
48
|
-
```bash
|
|
49
|
-
git diff --name-status
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
**1b.** Read `.prizm-docs/root.prizm` to get MODULE_INDEX. Map each changed file to its module.
|
|
53
|
-
|
|
54
|
-
**1c.** Classify changes:
|
|
55
|
-
- `A` (added) → add to KEY_FILES, check for new INTERFACES
|
|
56
|
-
- `D` (deleted) → remove from KEY_FILES, update FILE count
|
|
57
|
-
- `M` (modified) → check if public interfaces or dependencies changed
|
|
58
|
-
- `R` (renamed) → update all path references
|
|
59
|
-
|
|
60
|
-
**1d.** Update affected docs (bottom-up: L2 → L1 → L0):
|
|
61
|
-
|
|
62
|
-
- **L2**: If L2 exists → update KEY_FILES, INTERFACES, DATA_FLOW, DEPENDENCIES, CHANGELOG, TRAPS, DECISIONS. If L2 does NOT exist AND the module has Added or Modified source files in the current diff with meaningful logic (not trivial config) → create L2 using the L2 GENERATION TEMPLATE, then populate from source.
|
|
63
|
-
- **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.
|
|
64
|
-
- **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).
|
|
65
|
-
|
|
66
|
-
**1d-migrate.** Legacy TRAPS format migration (opportunistic):
|
|
67
|
-
While updating an affected L1/L2 doc, if you encounter TRAPS entries **without** a severity prefix (e.g., `- foo | FIX: bar` instead of `- [LOW] foo | FIX: bar`), prepend `[LOW]` as a conservative default. This clears legacy format debt incrementally — only in files already being touched, never as a bulk operation.
|
|
68
|
-
|
|
69
|
-
**1e.** If new directory qualifies as a module (per MODULE_DISCOVERY_CRITERIA in PRIZM-SPEC Section 9.1 Step 2) and matches no existing module:
|
|
70
|
-
1. Create L1 doc immediately, add to MODULE_INDEX.
|
|
71
|
-
2. If the current diff includes Added or Modified source files with meaningful logic in this module → create L2 immediately using the L2 GENERATION TEMPLATE. Otherwise defer L2 to the next session that touches this module.
|
|
72
|
-
|
|
73
|
-
**1f.** Enforce size limits:
|
|
74
|
-
- L0 > 4KB → consolidate MODULE_INDEX
|
|
75
|
-
- L1 > 4KB → trim KEY_FILES descriptions, ensure RULES <= 3 entries
|
|
76
|
-
- L2 > 5KB → archive old CHANGELOG entries
|
|
77
|
-
|
|
78
|
-
**SKIP structural sync if**: only internal implementation changed (no interface/dependency impact), only comments/whitespace, only .prizm files. **DO NOT skip** test file changes or bug fixes — they may reveal TRAPS worth capturing in L2.
|
|
79
|
-
|
|
80
|
-
**1g. TRAPS staleness check** (only when an L2 doc's TRAPS section has > 10 entries):
|
|
35
|
+
### Job 1: Structural Sync (always runs)
|
|
36
|
+
Synchronize `.prizm-docs/` structure with actual codebase changes from this session.
|
|
37
|
+
→ Read `${SKILL_DIR}/references/structural-sync-steps.md` for the detailed 7-step procedure (1a–1g).
|
|
81
38
|
|
|
82
|
-
|
|
83
|
-
1. If a TRAP has `STALE_IF:` and the glob-matched files no longer exist (verified via `ls`) → delete the TRAP entry, append CHANGELOG: `remove: archived stale TRAP - <summary>`
|
|
84
|
-
2. If a TRAP has `REF:` → check if the referenced file still exists and the REF commit is less than 180 days old (via `git log --since="180 days ago" <hash> 2>/dev/null`). If the file is deleted OR the REF commit is older than 180 days → prepend `[REVIEW]` to the severity, signaling it needs verification during the next retrospective Job 2
|
|
85
|
-
3. Process at most 5 of the oldest TRAPS per L2 doc per session (to bound context cost)
|
|
86
|
-
|
|
87
|
-
This step is lightweight — it only triggers when TRAPS exceed 10 entries, and processes at most 5 per run.
|
|
39
|
+
**Key outputs**: Updated L1 file counts, L2 INTERFACES/DATA_FLOW, changelog entries, stale TRAPS cleanup.
|
|
88
40
|
|
|
89
41
|
---
|
|
90
42
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
`.prizm-docs/` is the **single source of project knowledge**: it tells AI *what code exists, how it connects, what pitfalls to avoid, and why key design choices were made*.
|
|
96
|
-
|
|
97
|
-
### When to run Job 2
|
|
98
|
-
|
|
99
|
-
- Feature completion (spec + plan + implementation done)
|
|
100
|
-
- Bugfix that reveals a non-obvious failure mode (the root cause is itself a TRAP)
|
|
101
|
-
- Refactor that revealed structural insights
|
|
102
|
-
- **Skip for**: trivial fixes, config changes, dependency bumps
|
|
103
|
-
|
|
104
|
-
### Steps
|
|
105
|
-
|
|
106
|
-
**2a.** Gather context — read the **actual code that was changed** plus any available artifacts:
|
|
107
|
-
|
|
108
|
-
- `git diff HEAD` — the real source of truth for what happened
|
|
109
|
-
- `.prizmkit/specs/###-feature-name/context-snapshot.md` — read the '## Implementation Log' section (Dev's changes, decisions, discoveries) and '## Review Notes' section (Reviewer's findings). These are the **preferred source** for pre-categorized decisions and findings. If these sections exist, prefer them over re-extracting from git diff.
|
|
110
|
-
- `.prizmkit/specs/###-feature-name/plan.md` — if feature work, read planned vs actual
|
|
111
|
-
- `.prizmkit/bugfix/<id>/fix-report.md` — if bugfix, read what was discovered
|
|
112
|
-
- `.prizmkit/specs/###-feature-name/failure-log.md` — if a previous session failed, read DISCOVERED_TRAPS. These are high-value TRAPS because they come from actual failures — prioritize injecting them into `.prizm-docs/`
|
|
113
|
-
- The relevant `.prizm-docs/` L1/L2 docs for affected modules
|
|
114
|
-
|
|
115
|
-
**2b.** Extract knowledge from what was **observed in code**, not invented:
|
|
116
|
-
|
|
117
|
-
**TRAPS** (highest priority) — things that look safe but break:
|
|
118
|
-
- Minimal format: `- [SEVERITY] <description> | FIX: <approach>`
|
|
119
|
-
- Full format: `- [SEVERITY] <description> | FIX: <approach> | REF: <hash> | STALE_IF: <glob>`
|
|
120
|
-
- Source: actual bugs hit, surprising behavior discovered in code, non-obvious coupling
|
|
121
|
-
|
|
122
|
-
**TRAPS severity classification**:
|
|
123
|
-
- `[CRITICAL]`: data loss, security, financial error, system crash
|
|
124
|
-
- `[HIGH]`: functional failure, silent error, interface incompatibility
|
|
125
|
-
- `[LOW]`: misleading naming, non-intuitive API, minor performance issue
|
|
126
|
-
|
|
127
|
-
When writing TRAPS:
|
|
128
|
-
- Severity prefix is MANDATORY (e.g., `[CRITICAL]`, `[HIGH]`, `[LOW]`)
|
|
129
|
-
- OPTIONAL: append `| REF: <7-char-hash>` when you know the relevant commit (for traceability)
|
|
130
|
-
- OPTIONAL: append `| STALE_IF: <glob>` when the TRAP is tightly coupled to specific files (for auto-expiry detection)
|
|
131
|
-
|
|
132
|
-
**Consuming [REVIEW] markers** (from staleness check 1g):
|
|
133
|
-
- If you encounter a TRAP prefixed with `[REVIEW]` (e.g., `[REVIEW][HIGH] ...`), verify whether the trap is still valid by checking the current code. If still valid: remove the `[REVIEW]` prefix, keeping the severity. If no longer relevant: delete the TRAP entry and append CHANGELOG.
|
|
134
|
-
|
|
135
|
-
**RULES** — conventions established or constraints discovered:
|
|
136
|
-
- Format: `- MUST/NEVER/PREFER: <rule>`
|
|
137
|
-
- Source: patterns that proved necessary during implementation
|
|
138
|
-
|
|
139
|
-
**DECISIONS** — key design choices that affect future development:
|
|
140
|
-
- Format: `- <what was decided> — <rationale>`
|
|
141
|
-
- Source: non-obvious design choices, interface conventions, cross-module contracts
|
|
142
|
-
- Only record decisions that a future AI session would benefit from knowing
|
|
143
|
-
- Do NOT record obvious implementation details that can be derived by reading the code
|
|
144
|
-
|
|
145
|
-
**QUALITY GATE**: Every item must answer: "If a new AI session reads only `.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.
|
|
146
|
-
|
|
147
|
-
**2c.** Inject into the correct `.prizm-docs/` file:
|
|
148
|
-
- 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.)
|
|
149
|
-
- Project-level RULES/PATTERNS → `root.prizm`
|
|
150
|
-
- Cross-module concerns spanning 2+ modules → `root.prizm` CROSS_CUTTING section
|
|
43
|
+
### Job 2: Knowledge Injection (conditional — skip for pure refactors)
|
|
44
|
+
Inject newly discovered project knowledge (TRAPS, RULES, DECISIONS) into architecture docs.
|
|
45
|
+
→ Read `${SKILL_DIR}/references/knowledge-injection-steps.md` for the detailed 3-step procedure (2a–2c).
|
|
151
46
|
|
|
152
|
-
**
|
|
47
|
+
**Key outputs**: New TRAPS entries, RULES updates, DECISIONS records in relevant L1/L2 docs and root.prizm.
|
|
153
48
|
|
|
154
49
|
---
|
|
155
50
|
|
|
@@ -178,7 +73,7 @@ In the dev-pipeline, this skill is the **single doc maintenance step** before co
|
|
|
178
73
|
implement → code-review → retrospective (architecture sync) → committer (pure commit)
|
|
179
74
|
```
|
|
180
75
|
|
|
181
|
-
The pipeline enforces a **docs pass condition**: `.prizm-docs/` must show changes in the final commit. This skill
|
|
76
|
+
The pipeline enforces a **docs pass condition**: `.prizm-docs/` must show changes in the final commit. This skill satisfies that requirement.
|
|
182
77
|
|
|
183
78
|
## HANDOFF Chain
|
|
184
79
|
|