prizmkit 1.1.78 → 1.1.79
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/skills/_metadata.json +1 -1
- package/bundled/skills-windows/prizm-kit/SKILL.md +81 -0
- package/bundled/skills-windows/prizmkit-code-review/SKILL.md +225 -0
- package/bundled/skills-windows/prizmkit-committer/SKILL.md +81 -0
- package/bundled/skills-windows/prizmkit-deploy/SKILL.md +468 -0
- package/bundled/skills-windows/prizmkit-deploy/references/ci-cd-workflows.md +115 -0
- package/bundled/skills-windows/prizmkit-deploy/references/cloud-platform-deploy.md +93 -0
- package/bundled/skills-windows/prizmkit-deploy/references/database-setup.md +46 -0
- package/bundled/skills-windows/prizmkit-deploy/references/deploy-config-schema.md +148 -0
- package/bundled/skills-windows/prizmkit-deploy/references/deploy-history-schema.md +62 -0
- package/bundled/skills-windows/prizmkit-deploy/references/deployment-modes.md +50 -0
- package/bundled/skills-windows/prizmkit-deploy/references/direct-upload.md +26 -0
- package/bundled/skills-windows/prizmkit-deploy/references/dns-setup.md +42 -0
- package/bundled/skills-windows/prizmkit-deploy/references/docker-deploy.md +31 -0
- package/bundled/skills-windows/prizmkit-deploy/references/firewall-setup.md +37 -0
- package/bundled/skills-windows/prizmkit-deploy/references/live-validation-notes.md +21 -0
- package/bundled/skills-windows/prizmkit-deploy/references/nginx-blue-green.md +59 -0
- package/bundled/skills-windows/prizmkit-deploy/references/ssl-setup.md +56 -0
- package/bundled/skills-windows/prizmkit-implement/SKILL.md +65 -0
- package/bundled/skills-windows/prizmkit-plan/SKILL.md +184 -0
- package/bundled/skills-windows/prizmkit-plan/assets/plan-template.md +115 -0
- package/bundled/skills-windows/prizmkit-plan/assets/spec-template.md +73 -0
- package/bundled/skills-windows/prizmkit-plan/references/clarify-guide.md +67 -0
- package/bundled/skills-windows/prizmkit-plan/references/verification-checklist.md +60 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/SKILL.md +115 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/assets/prizm-docs-format.md +613 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-init.md +45 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-rebuild.md +15 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-status.md +14 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-update.md +19 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-validate.md +17 -0
- package/bundled/skills-windows/prizmkit-retrospective/SKILL.md +87 -0
- package/bundled/skills-windows/prizmkit-retrospective/references/knowledge-injection-steps.md +50 -0
- package/bundled/skills-windows/prizmkit-retrospective/references/structural-sync-steps.md +43 -0
- package/bundled/skills-windows/prizmkit-test/SKILL.md +281 -0
- package/package.json +1 -1
package/bundled/VERSION.json
CHANGED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
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', 'get started', 'what tools', 'dev workflow', 'lifecycle', or '/prizmkit'. Use this as the entry point for the full PrizmKit development lifecycle."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PrizmKit — Full-Lifecycle Development Toolkit
|
|
7
|
+
|
|
8
|
+
## Task Execution Model
|
|
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.
|
|
11
|
+
|
|
12
|
+
**Per-task flow**:
|
|
13
|
+
```
|
|
14
|
+
read docs → plan → implement → code-review → retrospective → committer
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Each task begins by reading context at two levels:
|
|
18
|
+
|
|
19
|
+
**Application level** (read every session):
|
|
20
|
+
- `.prizmkit/prizm-docs/root.prizm` — L0 project architecture index (modules, tech stack, conventions)
|
|
21
|
+
- `.prizmkit/plans/project-brief.md` — user's product vision checklist (generated during project initialization)
|
|
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
|
+
- `.prizmkit/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. `.prizmkit/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:
|
|
31
|
+
```
|
|
32
|
+
/prizmkit-plan → /prizmkit-implement → /prizmkit-committer
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Development Scenarios
|
|
36
|
+
|
|
37
|
+
PrizmKit supports any development scenario through the same skill chain. `/prizmkit-plan` produces `spec.md` + `plan.md` regardless of the task type:
|
|
38
|
+
|
|
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. |
|
|
44
|
+
|
|
45
|
+
All three follow the same per-task flow. Detailed documentation policies (when to update `.prizmkit/prizm-docs/`, when to skip steps) are defined within each skill — not here.
|
|
46
|
+
|
|
47
|
+
### Best Practices for AI-Driven Development
|
|
48
|
+
|
|
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.
|
|
50
|
+
|
|
51
|
+
**Module organization**: Ensure every meaningful module has a `.prizmkit/prizm-docs/` L1 doc. AI reads TRAPS and DECISIONS before modifying files — undocumented modules get no guardrails.
|
|
52
|
+
|
|
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.
|
|
54
|
+
|
|
55
|
+
## Core Skill Reference
|
|
56
|
+
|
|
57
|
+
| Skill | Purpose | Trigger Phrases |
|
|
58
|
+
|-------|---------|-----------------|
|
|
59
|
+
| `/prizmkit-plan` | Specify + plan: natural language → spec.md → plan.md + tasks | "specify", "plan", "new feature", "I want to add...", "architect", "break it down" |
|
|
60
|
+
| `/prizmkit-implement` | Execute plan.md tasks, write code (TDD) | "implement", "build", "code it", "start coding" |
|
|
61
|
+
| `/prizmkit-code-review` | Diagnose issues + produce Fix Instructions | "review", "check code", "is it ready to commit" |
|
|
62
|
+
| `/prizmkit-retrospective` | Sync .prizmkit/prizm-docs/ with code changes | "retrospective", "retro", "sync docs", "wrap up" |
|
|
63
|
+
| `/prizmkit-committer` | Safe git commit with Conventional Commits | "commit", "submit", "finish", "ship it" |
|
|
64
|
+
| `/prizmkit-deploy` | Generate/update deployment documentation | "deploy docs", "deployment guide", "how to deploy" |
|
|
65
|
+
| `/prizmkit-init` | Project bootstrap + .prizmkit/prizm-docs/ setup | "init", "initialize", "take over this project" |
|
|
66
|
+
| `/prizmkit-prizm-docs` | Doc management (init/status/rebuild/validate) | "check docs", "rebuild docs", "validate docs" |
|
|
67
|
+
|
|
68
|
+
**Reading guide**:
|
|
69
|
+
- Need code structure/modules/interfaces/traps/decisions? → `.prizmkit/prizm-docs/`
|
|
70
|
+
|
|
71
|
+
## Quick Start (First-Time Setup)
|
|
72
|
+
|
|
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 `.prizmkit/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 `.prizmkit/prizm-docs/` with changes
|
|
79
|
+
7. `/prizmkit-committer` → safe Conventional Commit
|
|
80
|
+
|
|
81
|
+
> **Note**: Rules and hooks are installed by `npx prizmkit install`, not by `/prizmkit-init`.
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "prizmkit-code-review"
|
|
3
|
+
description: "Iterative review-fix loop against spec and plan. Spawns a read-only Reviewer agent, filters findings, then a Dev agent applies fixes. Loops until PASS (max 3 rounds). Use after /prizmkit-implement as quality gate. Trigger on: 'review', 'check code', 'code review', 'is it ready to commit'. (project)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PrizmKit Code Review
|
|
7
|
+
|
|
8
|
+
An iterative review-fix loop that reviews code changes against the spec and plan, then automatically fixes issues. Uses three separated roles:
|
|
9
|
+
|
|
10
|
+
- **Reviewer Agent** (read-only): analyzes git diff against spec goals and plan decisions, produces structured findings
|
|
11
|
+
- **Main Agent** (orchestrator): filters Reviewer findings for reasonableness, coordinates the loop
|
|
12
|
+
- **Dev Agent** (read-write): applies fixes for accepted findings
|
|
13
|
+
|
|
14
|
+
The loop repeats until the Reviewer finds no issues or the max round limit is reached.
|
|
15
|
+
|
|
16
|
+
### When to Use
|
|
17
|
+
- After `/prizmkit-implement` to verify code quality before commit
|
|
18
|
+
- User says "review", "check code", "review my implementation"
|
|
19
|
+
- As a quality gate before `/prizmkit-committer`
|
|
20
|
+
|
|
21
|
+
### When NOT to Use
|
|
22
|
+
- Trivial changes (typo, single-line config) → commit directly
|
|
23
|
+
- No spec.md or plan.md exists → nothing to review against
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
|
|
27
|
+
| Parameter | Required | Description |
|
|
28
|
+
|-----------|----------|-------------|
|
|
29
|
+
| `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. |
|
|
30
|
+
|
|
31
|
+
## Phase 0: Context Loading
|
|
32
|
+
|
|
33
|
+
1. **Read spec.md** from the artifact directory — extract goals and acceptance criteria.
|
|
34
|
+
2. **Read plan.md** from the artifact directory — extract architecture decisions and completed tasks.
|
|
35
|
+
3. **Read dev rules** (if configured): Read `.prizmkit/prizm-docs/root.prizm` and check for a `RULES:` line. If present, read all referenced `.prizmkit/rules/<layer>-rules.md` files. If a referenced file does not exist, skip it silently and continue. These define per-layer conventions that the code should follow.
|
|
36
|
+
4. **Capture workspace diff**: run `git diff` (unstaged) + `git diff --cached` (staged) + `git status` to understand the full scope of changes. For new files in git status, note their paths for the Reviewer to read.
|
|
37
|
+
- If no changes are detected, output PASS and stop.
|
|
38
|
+
|
|
39
|
+
## Phase 1: Review-Fix Loop
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
┌─── Loop (max 3 rounds) ──────────────────────────────┐
|
|
43
|
+
│ │
|
|
44
|
+
│ Step 1: Spawn Reviewer Agent (read-only) │
|
|
45
|
+
│ → Input: git diff + spec goals + plan decisions + dev rules│
|
|
46
|
+
│ → Output: structured findings or PASS │
|
|
47
|
+
│ │
|
|
48
|
+
│ Step 2: Check result │
|
|
49
|
+
│ → If PASS (no findings): exit loop │
|
|
50
|
+
│ │
|
|
51
|
+
│ Step 3: Main Agent filters findings │
|
|
52
|
+
│ → For each finding: accept (reasonable) or reject │
|
|
53
|
+
│ → If all rejected: exit loop │
|
|
54
|
+
│ │
|
|
55
|
+
│ Step 4: Spawn Dev Agent (read-write) │
|
|
56
|
+
│ → Input: accepted findings + spec/plan context │
|
|
57
|
+
│ → Output: fix report │
|
|
58
|
+
│ │
|
|
59
|
+
│ Step 5: Back to Step 1 │
|
|
60
|
+
│ │
|
|
61
|
+
│ Hard limit: exit after 3 rounds regardless │
|
|
62
|
+
│ → On max-round exhaustion: output a summary of all │
|
|
63
|
+
│ unresolved findings to the conversation, then write │
|
|
64
|
+
│ review-report.md with NEEDS_FIXES verdict. │
|
|
65
|
+
└────────────────────────────────────────────────────────┘
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Step 1: Spawn Reviewer Agent
|
|
69
|
+
|
|
70
|
+
Include the dev rules read in Phase 0 step 3 in the `## Dev Rules` section of the prompt below. Spawn a **read-only** agent (subagent_type: `Explore`) with the following prompt:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
You are a code reviewer. Review workspace changes against the spec goals, plan decisions, and per-layer dev rules.
|
|
74
|
+
|
|
75
|
+
## Spec Goals
|
|
76
|
+
{goals and acceptance criteria from spec.md}
|
|
77
|
+
|
|
78
|
+
## Plan Decisions
|
|
79
|
+
{architecture decisions and task list from plan.md}
|
|
80
|
+
|
|
81
|
+
## Dev Rules (per-layer conventions)
|
|
82
|
+
{rules from .prizmkit/rules/<layer>-rules.md, or "No custom dev rules configured — use general best practices."}
|
|
83
|
+
|
|
84
|
+
## Review Round
|
|
85
|
+
Round {N}. {round_context}
|
|
86
|
+
|
|
87
|
+
## What to Review
|
|
88
|
+
Run these commands to see the current workspace changes:
|
|
89
|
+
- `git diff` (unstaged changes)
|
|
90
|
+
- `git diff --cached` (staged changes)
|
|
91
|
+
- `git status` (new/deleted files)
|
|
92
|
+
|
|
93
|
+
For new files shown in git status, read their full content.
|
|
94
|
+
For modified files, read enough surrounding context to understand the change.
|
|
95
|
+
|
|
96
|
+
## Review Dimensions
|
|
97
|
+
Evaluate the changes across these dimensions (focus on what's relevant):
|
|
98
|
+
|
|
99
|
+
1. **Goal alignment**: Do the changes accomplish all goals from spec.md? Anything missing or off-target?
|
|
100
|
+
2. **Defects**: Logic bugs, missing error handling, boundary condition issues, incorrect behavior.
|
|
101
|
+
3. **Completeness**: Files that should have been changed but weren't? Missing tests, types, imports, exports?
|
|
102
|
+
4. **Consistency**: Do changes follow the project's existing patterns, naming conventions, and code style?
|
|
103
|
+
5. **Security**: Hardcoded secrets, injection vulnerabilities, unsafe operations.
|
|
104
|
+
6. **Rules compliance**: (Skip this dimension if no dev rules were provided.) Do changes follow the per-layer dev rules? Flag violations of framework conventions, naming patterns, state management, or other rules defined for that layer.
|
|
105
|
+
|
|
106
|
+
## Output Format
|
|
107
|
+
Respond with EXACTLY this format:
|
|
108
|
+
|
|
109
|
+
### Result: PASS | NEEDS_FIXES
|
|
110
|
+
|
|
111
|
+
### Findings
|
|
112
|
+
(If PASS, write "No issues found.")
|
|
113
|
+
|
|
114
|
+
#### Finding N
|
|
115
|
+
- **Severity**: high | medium | low
|
|
116
|
+
- **Dimension**: goal-alignment | defect | completeness | consistency | security | rules-compliance
|
|
117
|
+
- **Location**: filepath:line (or "project-level")
|
|
118
|
+
- **Problem**: What is wrong and why it matters
|
|
119
|
+
- **Suggestion**: Recommended fix approach
|
|
120
|
+
- **Verification**: How to confirm the fix is correct
|
|
121
|
+
|
|
122
|
+
### Summary
|
|
123
|
+
One to two sentences about the overall state of the changes.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Round context** varies by round:
|
|
127
|
+
- Round 1: "This is the first review. Examine all changes comprehensively."
|
|
128
|
+
- Round 2+: "Previous round found issues that were fixed. Focus on: (1) whether previous fixes are correct, (2) whether fixes introduced new problems, (3) any remaining issues. Do not re-report issues that have already been fixed."
|
|
129
|
+
|
|
130
|
+
### Step 2: Check Result
|
|
131
|
+
|
|
132
|
+
Parse the Reviewer Agent's output:
|
|
133
|
+
- If `Result: PASS` → exit loop, proceed to Phase 2.
|
|
134
|
+
- If `Result: NEEDS_FIXES` → extract findings and continue to Step 3.
|
|
135
|
+
|
|
136
|
+
### Step 3: Main Agent Filters Findings
|
|
137
|
+
|
|
138
|
+
Review each finding and decide whether it's reasonable. This prevents unnecessary or harmful changes.
|
|
139
|
+
|
|
140
|
+
**For each finding, evaluate:**
|
|
141
|
+
- Is this relevant to the current changes? (Reject findings about unmodified, unrelated code.)
|
|
142
|
+
- Is this a real problem or a subjective style preference? (Reject pure style preferences unless they violate clear project conventions.)
|
|
143
|
+
- Would fixing this improve the code without introducing risk? (Reject fixes that require large refactors outside scope.)
|
|
144
|
+
|
|
145
|
+
**Output per finding:**
|
|
146
|
+
- **Accepted**: The finding is reasonable — include it in the Dev Agent's task.
|
|
147
|
+
- **Rejected** (with reason): Brief explanation (e.g., "Out of scope", "Style preference, not a defect").
|
|
148
|
+
|
|
149
|
+
If all findings are rejected → exit loop, proceed to Phase 2.
|
|
150
|
+
|
|
151
|
+
### Step 4: Spawn Dev Agent
|
|
152
|
+
|
|
153
|
+
Spawn a **general-purpose** agent (read-write) with the following prompt:
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
You are a developer fixing code review findings. Apply each fix carefully without breaking existing functionality.
|
|
157
|
+
|
|
158
|
+
## Spec Context
|
|
159
|
+
{goals from spec.md for reference}
|
|
160
|
+
|
|
161
|
+
## Findings to Fix
|
|
162
|
+
{accepted findings list — each with Severity, Location, Problem, Suggestion, Verification}
|
|
163
|
+
|
|
164
|
+
## Instructions
|
|
165
|
+
1. Read each finding carefully.
|
|
166
|
+
2. For each finding:
|
|
167
|
+
a. Read the relevant code and understand the context.
|
|
168
|
+
b. Implement the fix based on the suggestion.
|
|
169
|
+
c. If a suggestion is not feasible (would break other functionality, technically impossible), explain why.
|
|
170
|
+
3. After all fixes, report what you did.
|
|
171
|
+
|
|
172
|
+
## Output Format
|
|
173
|
+
For each finding, report:
|
|
174
|
+
- **Finding N**: [fixed | unable-to-fix]
|
|
175
|
+
- **What was done**: Brief description
|
|
176
|
+
- **Files modified**: List of changed files
|
|
177
|
+
(If unable-to-fix, explain why)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
After the Dev Agent returns, record results and return to Step 1 for the next round.
|
|
181
|
+
|
|
182
|
+
## Phase 2: Output
|
|
183
|
+
|
|
184
|
+
Write `review-report.md` to the artifact directory:
|
|
185
|
+
|
|
186
|
+
```markdown
|
|
187
|
+
# Review Report
|
|
188
|
+
|
|
189
|
+
## Verdict: PASS
|
|
190
|
+
## Rounds: 2
|
|
191
|
+
## Total findings: 3 → Fixed: 2, Rejected: 1
|
|
192
|
+
|
|
193
|
+
## Round 1
|
|
194
|
+
Findings: 3 | Accepted: 2, Rejected: 1
|
|
195
|
+
|
|
196
|
+
### Finding 1: Missing null check in parseConfig
|
|
197
|
+
- Severity: high
|
|
198
|
+
- Dimension: defect
|
|
199
|
+
- Location: src/config.ts:42
|
|
200
|
+
- Problem: parseConfig crashes when input is undefined
|
|
201
|
+
- Status: fixed (round 1)
|
|
202
|
+
|
|
203
|
+
### Finding 2: Export missing from index.ts
|
|
204
|
+
- Severity: medium
|
|
205
|
+
- Dimension: completeness
|
|
206
|
+
- Location: src/index.ts
|
|
207
|
+
- Problem: New parseConfig function not exported
|
|
208
|
+
- Status: fixed (round 1)
|
|
209
|
+
|
|
210
|
+
### Finding 3: Consider renaming variable
|
|
211
|
+
- Severity: low
|
|
212
|
+
- Dimension: consistency
|
|
213
|
+
- Location: src/config.ts:15
|
|
214
|
+
- Problem: Variable `d` should be more descriptive
|
|
215
|
+
- Status: rejected — Style preference; existing code uses short names in this module
|
|
216
|
+
|
|
217
|
+
## Round 2: PASS — no new findings
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
- `PASS`: Reviewer returned no findings (or all remaining findings were rejected as unreasonable)
|
|
221
|
+
- `NEEDS_FIXES`: 3 rounds completed but unresolved findings remain
|
|
222
|
+
|
|
223
|
+
Also output a completion summary to conversation.
|
|
224
|
+
|
|
225
|
+
**HANDOFF:** `/prizmkit-retrospective` (if PASS) or inform the caller of remaining issues (if NEEDS_FIXES after max rounds)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "prizmkit-committer"
|
|
3
|
+
description: "Pure git commit workflow with safety checks. Stages files, generates Conventional Commits message, and commits. Does NOT modify .prizmkit/prizm-docs/ — run /prizmkit-retrospective first. Trigger on: 'commit', 'submit', 'finish', 'done', 'ship it'. (project)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PrizmKit Committer
|
|
7
|
+
|
|
8
|
+
### When to Use
|
|
9
|
+
- User says "commit", "submit", "finish", "done with this task", "ship it"
|
|
10
|
+
- After `/prizmkit-retrospective` has finished architecture sync
|
|
11
|
+
- The UserPromptSubmit hook will remind to use this skill when commit intent is detected
|
|
12
|
+
|
|
13
|
+
**PRECONDITION:**
|
|
14
|
+
|
|
15
|
+
| Required State | Check | If Missing |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| Uncommitted changes exist | `git status` shows modified/added/untracked files | Inform user "nothing to commit" and stop |
|
|
18
|
+
| `.prizmkit/prizm-docs/` synced (feature/refactor) | `/prizmkit-retrospective` has run | Run `/prizmkit-retrospective` first |
|
|
19
|
+
| Code review passed (pipeline mode) | `review-report.md` in artifact directory has `## Verdict: PASS` | Run `/prizmkit-code-review` first |
|
|
20
|
+
|
|
21
|
+
### Workflow
|
|
22
|
+
|
|
23
|
+
Follow these steps in order — skipping or reordering can stage sensitive files or commit without proper verification:
|
|
24
|
+
|
|
25
|
+
#### Step 1: Status Check
|
|
26
|
+
```powershell
|
|
27
|
+
git status
|
|
28
|
+
```
|
|
29
|
+
- If "nothing to commit, working tree clean": inform user and stop
|
|
30
|
+
- If there are changes: proceed
|
|
31
|
+
|
|
32
|
+
#### Step 2: Generate Commit Message
|
|
33
|
+
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.
|
|
34
|
+
|
|
35
|
+
#### Step 3: Update CHANGELOG.md
|
|
36
|
+
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.
|
|
37
|
+
|
|
38
|
+
#### Step 4: Git Commit
|
|
39
|
+
|
|
40
|
+
Stage changes using a safe strategy — **never use `git add .` or `git add -A`** as they may stage sensitive files (.env, credentials, secrets) or unintended changes:
|
|
41
|
+
|
|
42
|
+
1. Review untracked files with `git status`. Warn the user if any files match sensitive patterns (`.env*`, `*credential*`, `*secret*`, `*.pem`, `*.key`).
|
|
43
|
+
2. Stage tracked modified files: `git add -u`
|
|
44
|
+
3. For new files: stage explicitly by name after confirming they should be included.
|
|
45
|
+
4. Verify staged content with `git diff --cached --stat` before committing.
|
|
46
|
+
|
|
47
|
+
```powershell
|
|
48
|
+
git commit -m "<type>(<scope>): <description>"
|
|
49
|
+
```
|
|
50
|
+
Follow Conventional Commits format.
|
|
51
|
+
|
|
52
|
+
#### Step 5: Verification
|
|
53
|
+
```powershell
|
|
54
|
+
git log -1 --stat
|
|
55
|
+
```
|
|
56
|
+
Confirm the commit was recorded.
|
|
57
|
+
|
|
58
|
+
Then verify working tree is clean:
|
|
59
|
+
```powershell
|
|
60
|
+
git status
|
|
61
|
+
```
|
|
62
|
+
- If "nothing to commit, working tree clean": commit verified successfully, proceed
|
|
63
|
+
|
|
64
|
+
#### Step 6: Optional Push
|
|
65
|
+
Ask user: "Push to remote?"
|
|
66
|
+
- Yes: `git push`
|
|
67
|
+
- No: Stop
|
|
68
|
+
|
|
69
|
+
**Headless mode**: If the skill was invoked with `--headless` in the args (e.g., `/prizmkit-committer --headless feat(F-001): ...`), **SKIP this step entirely**. Do NOT ask the question. Do NOT push. Stop after Step 5 verification. Headless mode is used by autonomous pipeline sessions where there is no human to answer interactive prompts.
|
|
70
|
+
|
|
71
|
+
## Example
|
|
72
|
+
|
|
73
|
+
**Feature commit:**
|
|
74
|
+
```
|
|
75
|
+
git commit -m "feat(avatar): add user avatar upload with S3 storage"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Bug fix commit:**
|
|
79
|
+
```
|
|
80
|
+
git commit -m "fix(auth): handle null token in refresh flow"
|
|
81
|
+
```
|