prizmkit 1.1.8 → 1.1.9
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/codebuddy/skill-adapter.js +21 -7
- package/bundled/agents/prizm-dev-team-reviewer.md +53 -173
- package/bundled/dev-pipeline/.env.example +45 -0
- package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +535 -0
- package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
- package/bundled/dev-pipeline/launch-bugfix-daemon.sh +57 -12
- package/bundled/dev-pipeline/launch-feature-daemon.sh +3 -1
- package/bundled/dev-pipeline/launch-refactor-daemon.sh +57 -12
- package/bundled/dev-pipeline/lib/branch.sh +6 -1
- package/bundled/dev-pipeline/lib/common.sh +71 -0
- package/bundled/dev-pipeline/lib/heartbeat.sh +2 -2
- package/bundled/dev-pipeline/retry-bugfix.sh +60 -23
- package/bundled/dev-pipeline/retry-feature.sh +47 -12
- package/bundled/dev-pipeline/retry-refactor.sh +105 -23
- package/bundled/dev-pipeline/run-bugfix.sh +265 -44
- package/bundled/dev-pipeline/run-feature.sh +35 -1
- package/bundled/dev-pipeline/run-refactor.sh +376 -51
- package/bundled/dev-pipeline/scripts/check-session-status.py +24 -1
- package/bundled/dev-pipeline/scripts/detect-stuck.py +195 -85
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +31 -19
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +19 -3
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +98 -11
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +30 -5
- package/bundled/dev-pipeline/scripts/init-pipeline.py +3 -3
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +15 -4
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -5
- package/bundled/dev-pipeline/scripts/patch-completion-notes.py +191 -0
- package/bundled/dev-pipeline/scripts/update-bug-status.py +159 -14
- package/bundled/dev-pipeline/scripts/update-feature-status.py +79 -37
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +343 -13
- package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +1 -1
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +7 -11
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +41 -7
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +27 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +43 -19
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +54 -26
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +5 -14
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +36 -25
- package/bundled/dev-pipeline/templates/feature-list-schema.json +23 -11
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +270 -0
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +10 -2
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +3 -1
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +1 -0
- package/bundled/dev-pipeline/templates/sections/feature-context.md +2 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +29 -2
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +22 -0
- package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +8 -6
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +7 -5
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
- package/bundled/skills/_metadata.json +5 -22
- package/bundled/skills/app-planner/SKILL.md +92 -66
- package/bundled/skills/app-planner/assets/app-design-guide.md +1 -1
- package/bundled/skills/app-planner/references/architecture-decisions.md +1 -1
- package/bundled/skills/app-planner/references/project-brief-guide.md +69 -66
- package/bundled/skills/bug-fix-workflow/SKILL.md +47 -4
- package/bundled/skills/bug-planner/SKILL.md +130 -188
- package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +43 -0
- package/bundled/skills/bug-planner/references/critic-and-verification.md +44 -0
- package/bundled/skills/bug-planner/references/error-recovery.md +73 -0
- package/bundled/skills/bug-planner/references/input-formats.md +53 -0
- package/bundled/skills/bug-planner/references/schema-validation.md +25 -0
- package/bundled/skills/bug-planner/references/severity-rules.md +16 -0
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +1 -5
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +5 -10
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +16 -3
- package/bundled/skills/feature-planner/SKILL.md +33 -122
- package/bundled/skills/feature-planner/assets/evaluation-guide.md +1 -1
- package/bundled/skills/feature-planner/assets/planning-guide.md +21 -5
- package/bundled/skills/feature-planner/references/browser-interaction.md +2 -4
- package/bundled/skills/feature-planner/references/completeness-review.md +57 -0
- package/bundled/skills/feature-planner/references/error-recovery.md +15 -34
- package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
- package/bundled/skills/feature-planner/references/new-project-planning.md +2 -2
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -2
- package/bundled/skills/feature-workflow/SKILL.md +3 -4
- package/bundled/skills/prizm-kit/SKILL.md +39 -49
- package/bundled/skills/prizmkit-code-review/SKILL.md +51 -64
- package/bundled/skills/prizmkit-code-review/rules/dimensions.md +85 -0
- package/bundled/skills/prizmkit-code-review/rules/fix-strategy.md +11 -11
- package/bundled/skills/prizmkit-committer/SKILL.md +3 -31
- package/bundled/skills/prizmkit-deploy/SKILL.md +34 -31
- package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +1 -1
- package/bundled/skills/prizmkit-implement/SKILL.md +35 -68
- package/bundled/skills/prizmkit-init/SKILL.md +112 -65
- package/bundled/skills/prizmkit-init/assets/project-brief-template.md +82 -0
- package/bundled/skills/prizmkit-plan/SKILL.md +120 -79
- package/bundled/skills/prizmkit-plan/assets/plan-template.md +28 -18
- package/bundled/skills/prizmkit-plan/assets/spec-template.md +28 -11
- package/bundled/skills/prizmkit-plan/references/clarify-guide.md +3 -3
- package/bundled/skills/prizmkit-plan/references/verification-checklist.md +60 -0
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +10 -81
- package/bundled/skills/prizmkit-prizm-docs/assets/{PRIZM-SPEC.md → prizm-docs-format.md} +41 -526
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +46 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +16 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +14 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +19 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +17 -0
- package/bundled/skills/prizmkit-retrospective/SKILL.md +27 -65
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -4
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +7 -25
- package/bundled/skills/recovery-workflow/SKILL.md +8 -8
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +17 -9
- package/bundled/skills/refactor-planner/SKILL.md +23 -41
- package/bundled/skills/refactor-workflow/SKILL.md +1 -2
- package/bundled/team/prizm-dev-team.json +1 -1
- package/bundled/{skills/prizm-kit/assets → templates}/project-memory-template.md +1 -1
- package/package.json +1 -1
- package/src/clean.js +0 -1
- package/src/gitignore-template.js +0 -1
- package/src/scaffold.js +10 -3
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +0 -5
- package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +0 -19
- package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +0 -19
- package/bundled/skills/app-planner/references/project-conventions.md +0 -93
- package/bundled/skills/prizmkit-analyze/SKILL.md +0 -207
- package/bundled/skills/prizmkit-code-review/rules/dimensions-bugfix.md +0 -25
- package/bundled/skills/prizmkit-code-review/rules/dimensions-feature.md +0 -43
- package/bundled/skills/prizmkit-code-review/rules/dimensions-refactor.md +0 -25
- package/bundled/skills/prizmkit-implement/references/deploy-guide-protocol.md +0 -69
- package/bundled/skills/prizmkit-verify/SKILL.md +0 -281
- package/bundled/skills/prizmkit-verify/scripts/verify-light.py +0 -402
|
@@ -51,59 +51,40 @@ if all_retries_exceeded:
|
|
|
51
51
|
|
|
52
52
|
## Resume Support
|
|
53
53
|
|
|
54
|
-
feature-planner sessions can be resumed from the last completed checkpoint
|
|
54
|
+
feature-planner sessions can be resumed from the last completed checkpoint when artifacts are found.
|
|
55
55
|
|
|
56
56
|
### Detection Logic
|
|
57
57
|
|
|
58
|
-
Check for artifact files in
|
|
58
|
+
Check for artifact files in `.prizmkit/plans/`:
|
|
59
59
|
|
|
60
|
-
| Artifacts Found |
|
|
61
|
-
|
|
62
|
-
| None |
|
|
63
|
-
| `feature-list.json` exists
|
|
64
|
-
| `feature-list.json` + validation passed |
|
|
65
|
-
|
|
|
66
|
-
| User restarts mid-session | User says "restart" | Return to Phase 1 Vision, or load previous checkpoint if requested |
|
|
67
|
-
| Max validation retries exceeded | 3 failed validation loops | Offer: (a) manual review, (b) restart from Phase 1 |
|
|
60
|
+
| Artifacts Found | Resume Action |
|
|
61
|
+
|-----------------|---------------|
|
|
62
|
+
| None | Start fresh planning (Phase 1) |
|
|
63
|
+
| `feature-list.json` exists but not validated | Offer to validate or extend (Phase 9) |
|
|
64
|
+
| `feature-list.json` + validation passed | Offer: handoff to `feature-pipeline-launcher` |
|
|
65
|
+
| `feature-list.draft.json` only | Resume interactive planning from last checkpoint |
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
For projects using `.prizmkit/` structure:
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
# Explicit resume (if file is not in current directory):
|
|
75
|
-
feature-planner --resume-from <path-to-existing-feature-list.json>
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
AI detects existing file → suggests:
|
|
79
|
-
```
|
|
80
|
-
"Existing plan found with N features, M newly added.
|
|
81
|
-
Resume incremental planning? (Y/n)"
|
|
82
|
-
```
|
|
67
|
+
When existing file detected, suggest:
|
|
68
|
+
> "Existing plan found with N features. Resume incremental planning? (Y/n)"
|
|
83
69
|
|
|
84
70
|
### Incremental Mode Abort
|
|
85
71
|
|
|
86
72
|
If in Incremental mode but existing `feature-list.json` not found:
|
|
87
73
|
- Ask: "Start new plan or provide existing file?"
|
|
88
74
|
- If new plan chosen → switch to Route A (New Feature Set)
|
|
89
|
-
- If existing file uploaded → continue Route B
|
|
90
75
|
|
|
91
76
|
### Artifact Path Convention
|
|
92
77
|
|
|
93
|
-
**CRITICAL PATH RULE**: `feature-list.json` MUST be written to `.prizmkit/plans/` directory
|
|
94
|
-
(unified artifact location).
|
|
95
|
-
|
|
96
|
-
Before writing, verify: `ls .prizmkit 2>/dev/null` — if this directory exists in the current
|
|
97
|
-
directory, you are at the project root. If not, create `.prizmkit/plans/` first (mkdir -p .prizmkit/plans).
|
|
78
|
+
**CRITICAL PATH RULE**: `feature-list.json` MUST be written to `.prizmkit/plans/` directory.
|
|
98
79
|
|
|
99
|
-
|
|
80
|
+
Before writing, verify the directory exists: `mkdir -p .prizmkit/plans`
|
|
100
81
|
|
|
101
82
|
```
|
|
102
83
|
<project-root>/
|
|
103
84
|
└── .prizmkit/plans/
|
|
104
|
-
├── feature-list.json # Primary output
|
|
105
|
-
├── feature-list.
|
|
85
|
+
├── feature-list.json # Primary output
|
|
86
|
+
├── feature-list.draft.json # Draft backup (Session Exit Gate)
|
|
106
87
|
└── <ISO-timestamp>.backup.json # Optional incremental backups
|
|
107
88
|
```
|
|
108
89
|
|
|
109
|
-
|
|
90
|
+
> **Note**: For cross-session workflow recovery (e.g., interrupted pipeline execution, branch-level state detection), use `recovery-workflow` instead. This error-recovery reference handles only within-session validation retries and checkpoint resumption.
|
|
@@ -109,4 +109,4 @@ Use concise prompts during interaction:
|
|
|
109
109
|
- [ ] Existing style preserved
|
|
110
110
|
- [ ] Dependency graph still DAG
|
|
111
111
|
- [ ] Validation passes
|
|
112
|
-
- [ ] Next step recommendation
|
|
112
|
+
- [ ] Next step recommendation: `feature-pipeline-launcher`
|
|
@@ -31,7 +31,7 @@ For each feature define:
|
|
|
31
31
|
- `id`
|
|
32
32
|
- `title`
|
|
33
33
|
- `description`
|
|
34
|
-
- `priority` — string: `"high"`, `"medium"`, or `"low"` (never numeric)
|
|
34
|
+
- `priority` — string: `"critical"`, `"high"`, `"medium"`, or `"low"` (never numeric)
|
|
35
35
|
- `estimated_complexity`
|
|
36
36
|
- `dependencies`
|
|
37
37
|
- `acceptance_criteria`
|
|
@@ -82,4 +82,4 @@ Split into `sub_features` when:
|
|
|
82
82
|
- [ ] IDs are sequential
|
|
83
83
|
- [ ] `status` initialized to `pending`
|
|
84
84
|
- [ ] Validation passes
|
|
85
|
-
- [ ] Next step recommendation
|
|
85
|
+
- [ ] Next step recommendation: `feature-pipeline-launcher`
|
|
@@ -34,7 +34,7 @@ SCHEMA_VERSION = "dev-pipeline-feature-list-v1"
|
|
|
34
34
|
|
|
35
35
|
VALID_STATUSES = {"pending", "in_progress", "completed", "failed", "skipped", "split", "auto_skipped"}
|
|
36
36
|
VALID_COMPLEXITIES = {"low", "medium", "high"}
|
|
37
|
-
VALID_PRIORITIES = {"high", "medium", "low"}
|
|
37
|
+
VALID_PRIORITIES = {"critical", "high", "medium", "low"}
|
|
38
38
|
VALID_GRANULARITIES = {"feature", "sub_feature", "auto"}
|
|
39
39
|
VALID_PLANNING_MODES = {"new", "incremental"}
|
|
40
40
|
|
|
@@ -446,7 +446,6 @@ def generate_template():
|
|
|
446
446
|
"project_description": "YOUR_PROJECT_DESCRIPTION",
|
|
447
447
|
"created_at": now,
|
|
448
448
|
"created_by": "feature-planner",
|
|
449
|
-
"source_spec": "",
|
|
450
449
|
"features": [
|
|
451
450
|
{
|
|
452
451
|
"id": "F-001",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "feature-workflow"
|
|
3
|
-
|
|
4
|
-
description: "One-stop entry point for feature development. Brainstorms requirements with the user until fully clarified, then orchestrates feature-planner → feature-pipeline-launcher → execution. Handles multi-feature batch development from a single request. Use this skill whenever the user wants to build an app, develop multiple features at once, or go from idea to running code in one step. Trigger on: 'build an app', 'develop features', 'implement all features', 'one-stop development', 'batch implement', 'build a new application', 'build a system', 'one-click complete', 'batch implement'. (project)"
|
|
3
|
+
description: "One-stop entry point for feature development. Brainstorms requirements with the user until fully clarified, then orchestrates feature-planner → feature-pipeline-launcher → execution. Handles multi-feature batch development from a single request. Use this skill whenever the user wants to build an app, develop multiple features at once, or go from idea to running code in one step. Trigger on: 'build an app', 'develop features', 'implement all features', 'one-stop development', 'batch implement', 'build a new application', 'build a system', 'one-click complete', 'batch implement'."
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Feature Workflow
|
|
@@ -240,7 +239,7 @@ Present this summary to the user and get explicit confirmation before proceeding
|
|
|
240
239
|
- Pass the structured requirements summary as input — NOT the raw user conversation
|
|
241
240
|
- For new projects: standard planning mode
|
|
242
241
|
- For existing projects with `--incremental`: incremental planning mode
|
|
243
|
-
- **Input**: Markdown requirements summary (feature descriptions,
|
|
242
|
+
- **Input**: Markdown requirements summary (feature descriptions, goals, constraints)
|
|
244
243
|
- **Output**: `.prizmkit/plans/feature-list.json` (schema: `dev-pipeline-feature-list-v1`) containing `project_name`, `features[]` with id (F-NNN), title, description, priority, dependencies, acceptance_criteria, status
|
|
245
244
|
|
|
246
245
|
2. **Interactive planning** (if feature-planner requires clarification):
|
|
@@ -398,7 +397,7 @@ While the pipeline runs, the user can continue the conversation:
|
|
|
398
397
|
| **Input** | Rough idea or requirements | Bug report / stack trace | Module / code target |
|
|
399
398
|
| **Output** | Multiple `feat()` commits | Single `fix()` commit | Single `refactor()` commit |
|
|
400
399
|
| **User verification** | Yes (Phase 1 brainstorm confirmation) | Yes (Phase 5) | Yes (Phase 5) |
|
|
401
|
-
| **Batch alternative** | (this is the batch flow) | `bug-planner` + `bugfix-pipeline-launcher` |
|
|
400
|
+
| **Batch alternative** | (this is the batch flow) | `bug-planner` + `bugfix-pipeline-launcher` | (this is the batch flow) |
|
|
402
401
|
|
|
403
402
|
---
|
|
404
403
|
|
|
@@ -1,61 +1,62 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "prizm-kit"
|
|
3
|
-
description: "Full-lifecycle dev toolkit index. Routes to the right PrizmKit skill for spec-driven development, Prizm docs, code quality, deployment, and knowledge management. Use when the user asks 'which command?', 'help', 'how do I start a feature', or '/prizmkit'.
|
|
3
|
+
description: "Full-lifecycle dev toolkit index. Routes to the right PrizmKit skill for spec-driven development, Prizm docs, code quality, deployment, and knowledge management. Use when the user asks 'which command?', 'help', 'how do I start a feature', 'get started', 'what tools', 'dev workflow', 'lifecycle', or '/prizmkit'. Use this as the entry point for the full PrizmKit development lifecycle."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PrizmKit — Full-Lifecycle Development Toolkit
|
|
7
7
|
|
|
8
|
+
## Task Execution Model
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
PrizmKit uses **headless mode** — each task runs as an independent AI CLI session with NO context carryover between tasks. Every session starts by reading docs and ends by maintaining docs.
|
|
10
11
|
|
|
11
|
-
**
|
|
12
|
+
**Per-task flow**:
|
|
12
13
|
```
|
|
13
|
-
read
|
|
14
|
-
↑ ↓
|
|
15
|
-
└────────────────────── next feature ←─────────────────────────┘
|
|
14
|
+
read docs → plan → implement → code-review → retrospective → committer
|
|
16
15
|
```
|
|
17
|
-
- New features or user-facing capabilities
|
|
18
|
-
- Multi-file coordinated changes
|
|
19
|
-
- Architectural decisions, data model or API changes
|
|
20
16
|
|
|
21
|
-
Each
|
|
17
|
+
Each task begins by reading context at two levels:
|
|
22
18
|
|
|
23
|
-
**
|
|
19
|
+
**Application level** (read every session):
|
|
20
|
+
- `.prizm-docs/root.prizm` — L0 project architecture index (modules, tech stack, conventions)
|
|
21
|
+
- `.prizmkit/plans/project-brief.md` — user's product vision checklist (generated by app-planner)
|
|
22
|
+
- `.prizmkit/config.json` — tech stack config, deploy strategy
|
|
23
|
+
|
|
24
|
+
**Task level** (read for the specific task):
|
|
25
|
+
- `spec.md` / `plan.md` — task specification and implementation plan
|
|
26
|
+
- `.prizm-docs/<module>.prizm` (L1/L2) — architecture docs for affected modules (TRAPS, DECISIONS, INTERFACES)
|
|
27
|
+
|
|
28
|
+
Each cycle produces spec, plan, and task artifacts that create a traceable record of what was built and why. `.prizm-docs/` stays in sync through retrospective, so the next session starts with up-to-date context.
|
|
29
|
+
|
|
30
|
+
**Fast path** — for small, well-scoped changes, always ask user whether to use fast path:
|
|
24
31
|
```
|
|
25
32
|
/prizmkit-plan → /prizmkit-implement → /prizmkit-committer
|
|
26
33
|
```
|
|
27
|
-
- Bug fixes with clear root cause
|
|
28
|
-
- Simple refactors (rename, extract)
|
|
29
|
-
- Documentation-only changes, test additions for existing code
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
### Development Scenarios
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
PrizmKit supports any development scenario through the same skill chain. `/prizmkit-plan` produces `spec.md` + `plan.md` regardless of the task type:
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
| Scenario | Artifacts | When to Use |
|
|
40
|
+
|----------|-----------|-------------|
|
|
41
|
+
| **Feature** | `spec.md` → `plan.md` → code | New functionality, UI, API, data model changes |
|
|
42
|
+
| **Bug Fix** | `spec.md` → `plan.md` → code | Complex defects, regressions, crash fixes. Simple bugs can use fast path directly. |
|
|
43
|
+
| **Refactor** | `spec.md` → `plan.md` → code | Restructure, extract, rename, performance. No behavior change. |
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
- Do NOT create new spec/plan/tasks under `.prizmkit/specs/` for bug fixes
|
|
39
|
-
- Do NOT update `.prizm-docs/` module docs for pure bug fixes (no interface/dependency change)
|
|
40
|
-
- Bug fix commits use `fix(<scope>):` prefix in Conventional Commits, not `feat:`
|
|
45
|
+
All three follow the same per-task flow. Detailed documentation policies (when to update `.prizm-docs/`, when to skip steps) are defined within each skill — not here.
|
|
41
46
|
|
|
42
|
-
|
|
47
|
+
### Best Practices for AI-Driven Development
|
|
43
48
|
|
|
44
|
-
|
|
49
|
+
**Monorepo structure recommended**: Keep frontend, backend, and shared libraries in one repository. AI needs visibility into the full call chain — cross-repo references are invisible to it. If you have a multi-repo setup, add all related repos to the AI workspace so module boundaries and API contracts are discoverable.
|
|
45
50
|
|
|
46
|
-
|
|
51
|
+
**Module organization**: Ensure every meaningful module has a `.prizm-docs/` L1 doc. AI reads TRAPS and DECISIONS before modifying files — undocumented modules get no guardrails.
|
|
47
52
|
|
|
48
|
-
|
|
49
|
-
.prizm-docs/ → Architecture Index (structure, interfaces, dependencies, traps, rules, decisions)
|
|
50
|
-
.prizmkit/specs/ → Feature artifacts (spec → plan → implement → review cycle)
|
|
51
|
-
```
|
|
53
|
+
**Small, focused tasks**: Break large features into tasks that can each be completed in one AI session. The pipeline handles this automatically via `/prizmkit-plan` task decomposition.
|
|
52
54
|
|
|
53
55
|
## Core Skill Reference
|
|
54
56
|
|
|
55
57
|
| Skill | Purpose | Trigger Phrases |
|
|
56
58
|
|-------|---------|-----------------|
|
|
57
59
|
| `/prizmkit-plan` | Specify + plan: natural language → spec.md → plan.md + tasks | "specify", "plan", "new feature", "I want to add...", "architect", "break it down" |
|
|
58
|
-
| `/prizmkit-analyze` | Cross-doc consistency check (read-only) | "analyze", "check consistency", "validate spec" |
|
|
59
60
|
| `/prizmkit-implement` | Execute plan.md tasks, write code (TDD) | "implement", "build", "code it", "start coding" |
|
|
60
61
|
| `/prizmkit-code-review` | Diagnose issues + produce Fix Instructions | "review", "check code", "is it ready to commit" |
|
|
61
62
|
| `/prizmkit-retrospective` | Sync .prizm-docs/ with code changes | "retrospective", "retro", "sync docs", "wrap up" |
|
|
@@ -67,25 +68,14 @@ PrizmKit produces two complementary knowledge layers:
|
|
|
67
68
|
**Reading guide**:
|
|
68
69
|
- Need code structure/modules/interfaces/traps/decisions? → `.prizm-docs/`
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- **Tier 1**: AI can perform well independently — these tasks align with AI's core strengths (documentation, code pattern analysis, test generation)
|
|
73
|
-
- **Tier 2**: Useful as guidance/checklist — AI provides static analysis and recommendations, but lacks access to real external tools (scanners, profilers, package registries, runtime environments)
|
|
74
|
-
- **Core skills** (no tier label): The foundational, documentation, spec-driven workflow, and commit skills that form PrizmKit's primary value
|
|
75
|
-
|
|
76
|
-
## Installation
|
|
77
|
-
|
|
78
|
-
**Option 1: npm CLI (recommended — works for both platforms)**
|
|
79
|
-
```bash
|
|
80
|
-
npx prizmkit init
|
|
81
|
-
```
|
|
82
|
-
Interactive installer auto-detects your platform and guides you through configuration.
|
|
83
|
-
|
|
84
|
-
**Option 2: Claude Code Plugin**
|
|
85
|
-
Install the `prizmkit` plugin via Claude Code's plugin system, then run `/prizmkit-init`.
|
|
71
|
+
## Quick Start (First-Time Setup)
|
|
86
72
|
|
|
87
|
-
|
|
73
|
+
1. `npx prizmkit install .` → installs skills, rules (`prizm-documentation.md`, `prizm-commit-workflow.md`), hooks, platform scaffolding
|
|
74
|
+
2. `/prizmkit-init` → scans project code, generates `.prizm-docs/`, detects tech stack, populates `.prizmkit/config.json`
|
|
75
|
+
3. `/prizmkit-plan` → specify your first feature → produces spec.md + plan.md
|
|
76
|
+
4. `/prizmkit-implement` → TDD implementation following the plan
|
|
77
|
+
5. `/prizmkit-code-review` → review before commit
|
|
78
|
+
6. `/prizmkit-retrospective` → sync `.prizm-docs/` with changes
|
|
79
|
+
7. `/prizmkit-committer` → safe Conventional Commit
|
|
88
80
|
|
|
89
|
-
|
|
90
|
-
- `assets/project-memory-template.md` for the project memory template
|
|
91
|
-
- The init skill creates `prizm-documentation.md` and `prizm-commit-workflow.md` rules
|
|
81
|
+
> **Note**: Rules and hooks are installed by `npx prizmkit install`, not by `/prizmkit-init`.
|
|
@@ -1,102 +1,89 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "prizmkit-code-review"
|
|
3
|
-
description: "Code review
|
|
3
|
+
description: "Code review against spec and plan. Diagnoses issues across multiple dimensions, produces findings with fix instructions. Use after /prizmkit-implement as quality gate. Trigger on: 'review', 'check code', 'code review', 'is it ready to commit'. (project)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PrizmKit Code Review
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
1. **Diagnostic Review** — read-only analysis producing findings with severity ratings
|
|
11
|
-
2. **Fix Strategy Formulation** — for each finding, produce actionable Fix Instructions
|
|
12
|
-
|
|
13
|
-
The review itself is read-only. Fix Instructions are structured guidance for the developer — the reviewer does not modify code.
|
|
8
|
+
Review code changes against the spec, plan, and project conventions. Produces a diagnostic report with findings and actionable fix instructions. The review itself is read-only — no source code is modified.
|
|
14
9
|
|
|
15
10
|
### When to Use
|
|
16
11
|
- After `/prizmkit-implement` to verify code quality before commit
|
|
17
12
|
- User says "review", "check code", "review my implementation"
|
|
18
13
|
- As a quality gate before `/prizmkit-committer`
|
|
19
14
|
|
|
20
|
-
|
|
15
|
+
### When NOT to Use
|
|
16
|
+
- Trivial changes (typo, single-line config) → commit directly
|
|
17
|
+
- No spec.md or plan.md exists → nothing to review against
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
|---|---|---|---|---|
|
|
24
|
-
| **Feature** | `spec.md` + `plan.md` (with Tasks) | `.prizmkit/specs/###-feature-name/` | Files exist + tasks completed | Run `/prizmkit-implement` |
|
|
25
|
-
| **Refactor** | `refactor-analysis.md` + `plan.md` (with Tasks) | `.prizmkit/refactor/<refactor-slug>/` | Files exist + tasks completed. Review against behavior preservation, not spec. | Run `/prizmkit-implement` in refactor mode |
|
|
26
|
-
| **Bugfix** | `fix-plan.md` | `.prizmkit/bugfix/<BUG_ID>/` | File exists + tasks completed. Review against bug description + reproduction test. | Run `/prizmkit-implement` in bugfix mode |
|
|
19
|
+
## Input
|
|
27
20
|
|
|
28
|
-
|
|
21
|
+
| Parameter | Required | Description |
|
|
22
|
+
|-----------|----------|-------------|
|
|
23
|
+
| `artifact_dir` | No | Directory containing spec.md + plan.md. If omitted, scan `.prizmkit/` subdirectories for the most recently modified directory with a `plan.md` whose tasks are all completed. |
|
|
29
24
|
|
|
30
|
-
##
|
|
25
|
+
## Context Loading
|
|
31
26
|
|
|
32
|
-
1. **
|
|
33
|
-
|
|
34
|
-
- If `refactor-analysis.md` exists → **Refactor mode**: read `refactor-analysis.md` + `plan.md` as baseline. Load `${SKILL_DIR}/rules/dimensions-refactor.md` for refactor-specific dimensions, **and also** `${SKILL_DIR}/rules/dimensions-feature.md` §3–§6 for standard dimensions (code quality, security, consistency, test coverage) that still apply.
|
|
35
|
-
- If `fix-plan.md` exists → **Bugfix mode**: read `fix-plan.md` as baseline. Load `${SKILL_DIR}/rules/dimensions-bugfix.md` for review dimensions.
|
|
36
|
-
- If none found → prompt user: "No review baseline found. Which workflow are you in? (feature/refactor/bugfix)"
|
|
37
|
-
2. Read **architecture index**: `.prizm-docs/root.prizm` RULES and PATTERNS for project conventions
|
|
38
|
-
3. Read **past decisions**: check DECISIONS sections in relevant `.prizm-docs/` L1/L2 files — helps verify implementation respects established conventions
|
|
39
|
-
4. Read '## Implementation Log' section of context-snapshot.md in the feature directory (if exists) — understand Dev's implementation decisions, trade-offs, and notable discoveries. This context helps distinguish intentional design choices from accidental patterns during review.
|
|
40
|
-
5. Scan all code files referenced in completed tasks
|
|
41
|
-
6. Review across all dimensions defined in the loaded rules file
|
|
42
|
-
7. Generate findings with severity: `CRITICAL` > `HIGH` > `MEDIUM` > `LOW`
|
|
27
|
+
1. **Task context**: Read `spec.md`, `plan.md`, and any companion documents (e.g., `refactor-analysis.md`) from the artifact directory.
|
|
28
|
+
2. **Architecture context**: Read `.prizm-docs/root.prizm` (L0) and relevant L1/L2 docs for affected modules — check RULES, PATTERNS, TRAPS, DECISIONS.
|
|
43
29
|
|
|
44
|
-
## Phase
|
|
30
|
+
## Phase 1: Diagnostic Review
|
|
45
31
|
|
|
46
|
-
|
|
32
|
+
1. **Identify changed files**: Extract file paths from completed tasks in plan.md, or use `git diff` against the branch base.
|
|
33
|
+
2. **Read changed files**: Scan all code files identified above.
|
|
34
|
+
3. **Review across dimensions**: Load `${SKILL_DIR}/rules/dimensions.md` and evaluate each applicable dimension. Dimensions are conditionally triggered based on what sections exist in spec.md — see the dimensions file for trigger conditions.
|
|
35
|
+
4. **Generate findings**: For each issue found, describe the problem, its location, which dimension it falls under, and why it matters.
|
|
36
|
+
5. If unsure whether something is a bug or intentional design, flag it with a note asking the developer to confirm.
|
|
47
37
|
|
|
48
|
-
|
|
38
|
+
## Phase 2: Fix Strategy
|
|
49
39
|
|
|
50
|
-
|
|
40
|
+
For each finding, load `${SKILL_DIR}/rules/fix-strategy.md` and produce structured Fix Instructions: Root Cause, Impact, Fix Strategy, Code Guidance, Verification Criteria.
|
|
51
41
|
|
|
52
|
-
|
|
42
|
+
## Reviewer Agent Mode
|
|
53
43
|
|
|
54
|
-
|
|
55
|
-
- `PASS`: No CRITICAL or HIGH findings
|
|
56
|
-
- `PASS WITH WARNINGS`: No CRITICAL findings, some HIGH findings
|
|
57
|
-
- `NEEDS FIXES`: Any CRITICAL findings present
|
|
44
|
+
When interactive session is available, offer the option to spawn an independent reviewer subagent:
|
|
58
45
|
|
|
59
|
-
|
|
46
|
+
1. Spawn a reviewer subagent with **read-only** permissions (Read, Glob, Grep, Bash for test commands only)
|
|
47
|
+
2. The subagent independently reviews changed files against spec/plan/dimensions and produces findings
|
|
48
|
+
3. The main agent receives findings and applies fixes
|
|
49
|
+
4. Re-spawn the subagent to verify fixes
|
|
50
|
+
5. Repeat until the subagent reports no more findings or the caller's maximum iteration limit is reached
|
|
60
51
|
|
|
61
|
-
|
|
52
|
+
In non-interactive mode, perform the review directly (no subagent).
|
|
62
53
|
|
|
63
|
-
##
|
|
54
|
+
## Output
|
|
64
55
|
|
|
65
|
-
|
|
56
|
+
Write `review-report.md` to the artifact directory:
|
|
66
57
|
|
|
67
58
|
```markdown
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
### Verdict: PASS | PASS_WITH_WARNINGS | NEEDS_FIXES
|
|
71
|
-
### Review Iteration: 1/5
|
|
72
|
-
### Summary: X findings (N critical, N high, N medium, N low)
|
|
59
|
+
# Review Report
|
|
73
60
|
|
|
74
|
-
|
|
61
|
+
## Verdict: PASS | NEEDS_FIXES
|
|
75
62
|
|
|
76
|
-
|
|
77
|
-
(finding format per ${SKILL_DIR}/rules/fix-strategy.md)
|
|
63
|
+
## Summary: X findings
|
|
78
64
|
|
|
79
|
-
|
|
80
|
-
...
|
|
65
|
+
## Findings
|
|
81
66
|
|
|
82
|
-
###
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
67
|
+
### Finding 1: Title
|
|
68
|
+
- Location: file:line
|
|
69
|
+
- Dimension: category
|
|
70
|
+
- Problem: what is wrong and why it matters
|
|
71
|
+
- Root Cause: explanation
|
|
72
|
+
- Impact: affected callers/dependents
|
|
73
|
+
- Fix Strategy: step-by-step
|
|
74
|
+
- Code Guidance: before/after snippet
|
|
75
|
+
- Verification: commands/checks to confirm
|
|
76
|
+
- Related: Finding N (if grouped)
|
|
87
77
|
```
|
|
88
78
|
|
|
89
|
-
|
|
79
|
+
- `PASS`: 0 findings
|
|
80
|
+
- `NEEDS_FIXES`: 1+ findings with fix instructions
|
|
90
81
|
|
|
91
|
-
|
|
82
|
+
Also output findings summary to conversation.
|
|
92
83
|
|
|
93
|
-
|
|
84
|
+
**HANDOFF:** `/prizmkit-retrospective` (if no findings) or apply fixes and re-review (if findings exist)
|
|
94
85
|
|
|
95
|
-
|
|
96
|
-
- **max_iterations = 5**: If `review_iteration >= 5`, you MUST proceed to `/prizmkit-retrospective` regardless of remaining findings. Log remaining issues as known technical debt: "Loop protection triggered — proceeding to retrospective with N unresolved findings (iterations: 5/5)."
|
|
97
|
-
- Unresolved findings should be recorded in the review report so they can be tracked as follow-up work.
|
|
98
|
-
- On re-review (iteration > 1): only check the specific Verification Criteria from previous Fix Instructions + scan for regressions. Do NOT re-run the full dimension review unless new code was added beyond the fix scope.
|
|
99
|
-
|
|
100
|
-
## Output
|
|
86
|
+
## References
|
|
101
87
|
|
|
102
|
-
|
|
88
|
+
- Review dimensions: `${SKILL_DIR}/rules/dimensions.md`
|
|
89
|
+
- Fix strategy formulation: `${SKILL_DIR}/rules/fix-strategy.md`
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Review Dimensions
|
|
2
|
+
|
|
3
|
+
Evaluate code changes across the following dimensions. Each dimension is either **always active** or **conditionally triggered** based on spec.md content.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## §1 Goal Compliance (always active)
|
|
8
|
+
|
|
9
|
+
Does code implement all goals and acceptance criteria from spec.md?
|
|
10
|
+
|
|
11
|
+
- Check every goal (G-N) in spec.md has a corresponding implementation
|
|
12
|
+
- Verify acceptance criteria are met
|
|
13
|
+
- Verify edge cases mentioned in spec are handled
|
|
14
|
+
- Confirm scope boundaries are respected (no over-implementation, no under-implementation)
|
|
15
|
+
|
|
16
|
+
## §2 Plan Adherence (always active)
|
|
17
|
+
|
|
18
|
+
Does implementation follow architectural decisions in plan.md?
|
|
19
|
+
|
|
20
|
+
- Check component structure matches plan's change approach
|
|
21
|
+
- Verify data model matches plan's schema design (if applicable)
|
|
22
|
+
- Confirm API contracts (endpoints, request/response) match plan (if applicable)
|
|
23
|
+
- Deviations may be improvements — flag for confirmation, not automatic rejection
|
|
24
|
+
|
|
25
|
+
## §3 Behavior Preservation (conditional: spec.md has `## Behavior Preservation`)
|
|
26
|
+
|
|
27
|
+
Observable behavior for existing functionality must remain unchanged.
|
|
28
|
+
|
|
29
|
+
- All existing tests still pass without modification
|
|
30
|
+
- Public API signatures are unchanged (parameter types, return types, error types)
|
|
31
|
+
- Side effects (logging, metrics, events) are preserved unless explicitly scoped for removal
|
|
32
|
+
- Edge case handling is preserved — changes often silently drop edge case branches
|
|
33
|
+
|
|
34
|
+
## §4 Code Quality (always active)
|
|
35
|
+
|
|
36
|
+
Naming, structure, complexity, DRY. Focus on maintainability.
|
|
37
|
+
|
|
38
|
+
- Function/variable names are descriptive and consistent with project conventions
|
|
39
|
+
- No unnecessary complexity (deep nesting, oversized functions)
|
|
40
|
+
- No copy-paste duplication that should be abstracted
|
|
41
|
+
- Error messages are informative for debugging
|
|
42
|
+
|
|
43
|
+
## §5 Security (always active)
|
|
44
|
+
|
|
45
|
+
Injection, auth/authz gaps, sensitive data exposure, insecure defaults.
|
|
46
|
+
|
|
47
|
+
- User input is validated and sanitized before use in queries, HTML, or commands
|
|
48
|
+
- Authentication and authorization checks are present on protected routes
|
|
49
|
+
- Sensitive data (passwords, tokens, PII) is not logged or exposed in responses
|
|
50
|
+
- Cryptographic operations use established libraries, not custom implementations
|
|
51
|
+
|
|
52
|
+
## §6 Consistency (always active)
|
|
53
|
+
|
|
54
|
+
Follows project patterns from `.prizm-docs/` PATTERNS and RULES sections.
|
|
55
|
+
|
|
56
|
+
- Code style matches existing codebase conventions
|
|
57
|
+
- Error handling follows established patterns
|
|
58
|
+
- File organization follows project structure conventions
|
|
59
|
+
- Naming conventions align with `.prizm-docs/` RULES
|
|
60
|
+
|
|
61
|
+
## §7 Test Coverage (always active)
|
|
62
|
+
|
|
63
|
+
Are critical paths tested?
|
|
64
|
+
|
|
65
|
+
- Happy path tests exist for each goal
|
|
66
|
+
- Error/edge case tests for critical paths
|
|
67
|
+
- Tests are deterministic (no flaky timing dependencies)
|
|
68
|
+
- Test names clearly describe what they verify
|
|
69
|
+
|
|
70
|
+
## §8 Fix Correctness (conditional: spec.md has `## Root Cause`)
|
|
71
|
+
|
|
72
|
+
The fix addresses the actual root cause, not just symptoms.
|
|
73
|
+
|
|
74
|
+
- The root cause identified in spec.md is addressed
|
|
75
|
+
- A regression test exists that would catch this issue if reintroduced
|
|
76
|
+
- The fix does not change behavior for non-affected inputs
|
|
77
|
+
- Related code paths are not inadvertently affected
|
|
78
|
+
|
|
79
|
+
## §9 Change Scope (conditional: spec.md `## Scope` emphasizes minimal change)
|
|
80
|
+
|
|
81
|
+
Only files directly related to the task are modified.
|
|
82
|
+
|
|
83
|
+
- No "while I'm here" changes mixed with the primary task
|
|
84
|
+
- If scope creep is detected, flag it — those changes belong in a separate commit
|
|
85
|
+
- Structural improvement (refactoring) is measured against stated goals, not unbounded
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Fix Strategy Formulation
|
|
2
2
|
|
|
3
|
-
For each finding from the Diagnostic Review
|
|
3
|
+
For each finding from the Diagnostic Review, produce actionable Fix Instructions.
|
|
4
4
|
|
|
5
5
|
## Per-Finding Analysis
|
|
6
6
|
|
|
@@ -14,7 +14,7 @@ Search the codebase for all callers/dependents of the affected code. List concre
|
|
|
14
14
|
Concrete step-by-step modification plan:
|
|
15
15
|
- What to change, where, and in what order
|
|
16
16
|
- Which project conventions to follow (reference `.prizm-docs/` RULES)
|
|
17
|
-
- Dependencies between fixes (
|
|
17
|
+
- Dependencies between fixes (Finding 1 must be done before Finding 3)
|
|
18
18
|
|
|
19
19
|
### 4. Code Guidance
|
|
20
20
|
Show before/after code snippets for the key change. Keep minimal — enough to unambiguate the approach, not a full implementation.
|
|
@@ -27,21 +27,21 @@ How to confirm the fix works:
|
|
|
27
27
|
|
|
28
28
|
## Finding Grouping
|
|
29
29
|
|
|
30
|
-
Group related findings that should be fixed together. If
|
|
30
|
+
Group related findings that should be fixed together. If Finding 1 and Finding 3 share the same root cause or affect the same code path, mark them as a group with a shared fix strategy. This prevents fixing symptoms individually only to have the underlying cause persist.
|
|
31
31
|
|
|
32
|
-
## Fix
|
|
32
|
+
## Fix Ordering
|
|
33
33
|
|
|
34
34
|
Order Fix Instructions by:
|
|
35
|
-
1. **Dependencies first** — if
|
|
36
|
-
2. **
|
|
37
|
-
3. **Grouped fixes together** — related findings are adjacent
|
|
35
|
+
1. **Dependencies first** — if Finding 2 depends on Finding 1, Finding 1 comes first
|
|
36
|
+
2. **Grouped fixes together** — related findings are adjacent
|
|
38
37
|
|
|
39
38
|
## Finding Format
|
|
40
39
|
|
|
41
40
|
```
|
|
42
|
-
|
|
41
|
+
### Finding N: Title
|
|
43
42
|
- Location: file:line
|
|
44
43
|
- Dimension: category
|
|
44
|
+
- Problem: what is wrong and why it matters
|
|
45
45
|
- Root Cause: explanation
|
|
46
46
|
- Impact: affected callers/dependents with file:line locations
|
|
47
47
|
- Fix Strategy:
|
|
@@ -55,7 +55,7 @@ Order Fix Instructions by:
|
|
|
55
55
|
- Verification:
|
|
56
56
|
- command to run
|
|
57
57
|
- expected output
|
|
58
|
-
- Related:
|
|
59
|
-
- Depends On:
|
|
60
|
-
- Blocks:
|
|
58
|
+
- Related: Finding X (if grouped)
|
|
59
|
+
- Depends On: Finding Y (if dependency)
|
|
60
|
+
- Blocks: Finding Z (if blocking)
|
|
61
61
|
```
|
|
@@ -16,8 +16,8 @@ description: "Pure git commit workflow with safety checks. Stages files, generat
|
|
|
16
16
|
|---|---|---|
|
|
17
17
|
| Uncommitted changes exist | `git status` shows modified/added/untracked files | Inform user "nothing to commit" and stop |
|
|
18
18
|
| `.prizm-docs/` synced (feature/refactor) | `/prizmkit-retrospective` has run | Run `/prizmkit-retrospective` first |
|
|
19
|
-
| Code review passed (pipeline mode) | `
|
|
20
|
-
|
|
|
19
|
+
| Code review passed (pipeline mode) | `review-report.md` in artifact directory has `## Verdict: PASS` | Run `/prizmkit-code-review` first |
|
|
20
|
+
| `.prizmkit/deploy.md` updated (if applicable) | If `/prizmkit-deploy` ran, `.prizmkit/deploy.md` is staged | Run `/prizmkit-deploy` or skip if no infrastructure changes |
|
|
21
21
|
|
|
22
22
|
### Workflow
|
|
23
23
|
|
|
@@ -31,7 +31,7 @@ git status
|
|
|
31
31
|
- If there are changes: proceed
|
|
32
32
|
|
|
33
33
|
#### Step 2: Generate Commit Message
|
|
34
|
-
Analyze the staged diff and context (spec title, plan summary
|
|
34
|
+
Analyze the staged diff and context (spec title, plan summary) to generate a concise Conventional Commits message. The message should capture the *what* and *why* of the change.
|
|
35
35
|
|
|
36
36
|
#### Step 3: Update CHANGELOG.md
|
|
37
37
|
If CHANGELOG.md exists in the project root, append an entry following Keep a Changelog format under the `[Unreleased]` section. Match the existing style in the file.
|
|
@@ -62,34 +62,6 @@ git status
|
|
|
62
62
|
```
|
|
63
63
|
- If "nothing to commit, working tree clean": commit verified successfully, proceed
|
|
64
64
|
|
|
65
|
-
#### Step 5.5: Generate Session Summary (for cross-session recovery)
|
|
66
|
-
|
|
67
|
-
After a successful commit, generate a lightweight handoff file for future sessions. Locate the artifact directory (`.prizmkit/specs/<feature-dir>/` for features, `.prizmkit/refactor/<slug>/` for refactors, `.prizmkit/bugfix/<id>/` for bugfixes) by checking which `plan.md` was used in this workflow.
|
|
68
|
-
|
|
69
|
-
If an artifact directory with `plan.md` is found, write `session-summary.md` in that directory:
|
|
70
|
-
|
|
71
|
-
```markdown
|
|
72
|
-
# Session Summary
|
|
73
|
-
## Completed Tasks
|
|
74
|
-
<list task IDs and one-line descriptions from plan.md [x] items>
|
|
75
|
-
|
|
76
|
-
## Files Changed
|
|
77
|
-
<list from `git diff HEAD~1 --name-only` of the commit just made>
|
|
78
|
-
|
|
79
|
-
## Key Decisions
|
|
80
|
-
<1-3 bullet points of non-obvious design choices made this session, referencing DECISIONS in .prizm-docs/ if applicable>
|
|
81
|
-
|
|
82
|
-
## Active TRAPS
|
|
83
|
-
<any CRITICAL or HIGH TRAPS relevant to the changed files, copied from .prizm-docs/ L2>
|
|
84
|
-
|
|
85
|
-
## Remaining Work
|
|
86
|
-
<list unchecked [ ] task IDs from plan.md, or "None — feature complete" if all done>
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Keep this file under 1.5KB. If no artifact directory with `plan.md` can be identified (e.g., ad-hoc commit), skip this step.
|
|
90
|
-
|
|
91
|
-
**Lifecycle**: `session-summary.md` is a local cross-session artifact — do NOT commit it to git. It exists only on disk for the next session to read. Overwrite any existing `session-summary.md` from a previous session — this file reflects only the most recent commit's state. In pipeline mode, this file will remain as an untracked file after commit; the pipeline runner should ignore it (it is not a sign of incomplete work).
|
|
92
|
-
|
|
93
65
|
#### Step 6: Optional Push
|
|
94
66
|
Ask user: "Push to remote?"
|
|
95
67
|
- Yes: `git push`
|