prizmkit 1.1.78 → 1.1.80
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/dev-pipeline/scripts/init-pipeline.py +2 -0
- package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +2 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +10 -347
- package/bundled/skills/app-planner/references/infrastructure-convention-discovery.md +108 -0
- package/bundled/skills/app-planner/references/project-conventions-discovery.md +59 -0
- package/bundled/skills/app-planner/references/project-state-detection.md +88 -0
- package/bundled/skills/app-planner/references/rules-configuration.md +46 -0
- package/bundled/skills/bug-fix-workflow/SKILL.md +1 -30
- package/bundled/skills/bug-fix-workflow/references/bug-diagnosis.md +66 -0
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +3 -40
- package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +49 -0
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +3 -46
- package/bundled/skills/feature-pipeline-launcher/references/configuration.md +55 -0
- package/bundled/skills/feature-workflow/SKILL.md +5 -121
- package/bundled/skills/feature-workflow/references/brainstorm-guide.md +137 -0
- package/bundled/skills/prizm-kit/SKILL.md +11 -0
- package/bundled/skills/prizmkit-code-review/SKILL.md +66 -135
- package/bundled/skills/prizmkit-code-review/references/dev-agent-prompt.md +30 -0
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +31 -0
- package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +62 -0
- package/bundled/skills/prizmkit-code-review/scripts/check_loop.py +186 -0
- package/bundled/skills/prizmkit-committer/SKILL.md +6 -0
- package/bundled/skills/prizmkit-deploy/SKILL.md +48 -72
- package/bundled/skills/prizmkit-deploy/references/data-safety-examples.md +120 -0
- package/bundled/skills/prizmkit-deploy/references/ssh-bootstrap-flow.md +49 -0
- package/bundled/skills/prizmkit-deploy/references/ssh-execution-flow.md +41 -0
- package/bundled/skills/prizmkit-deploy/references/ssh-takeover.md +20 -0
- package/bundled/skills/prizmkit-implement/SKILL.md +6 -0
- package/bundled/skills/prizmkit-plan/SKILL.md +1 -83
- package/bundled/skills/prizmkit-plan/references/examples.md +85 -0
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +13 -0
- package/bundled/skills/prizmkit-test/SKILL.md +3 -151
- package/bundled/skills/prizmkit-test/references/examples.md +70 -0
- package/bundled/skills/prizmkit-test/references/test-generation-steps.md +49 -0
- package/bundled/skills/prizmkit-test/references/test-report-template.md +42 -0
- package/bundled/skills/recovery-workflow/SKILL.md +1 -30
- package/bundled/skills/recovery-workflow/references/detection.md +58 -0
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +3 -45
- package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +54 -0
- package/bundled/skills/refactor-planner/SKILL.md +9 -149
- package/bundled/skills/refactor-planner/references/fast-path.md +59 -0
- package/bundled/skills/refactor-planner/references/planning-phases.md +135 -0
- package/bundled/skills/refactor-workflow/SKILL.md +4 -103
- package/bundled/skills/refactor-workflow/references/brainstorm-guide.md +116 -0
- package/bundled/skills-windows/app-planner/SKILL.md +10 -349
- package/bundled/skills-windows/app-planner/references/infrastructure-convention-discovery.md +108 -0
- package/bundled/skills-windows/app-planner/references/project-conventions-discovery.md +59 -0
- package/bundled/skills-windows/app-planner/references/project-state-detection.md +90 -0
- package/bundled/skills-windows/app-planner/references/rules-configuration.md +46 -0
- package/bundled/skills-windows/bug-fix-workflow/SKILL.md +1 -30
- package/bundled/skills-windows/bug-fix-workflow/references/bug-diagnosis.md +66 -0
- package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +2 -29
- package/bundled/skills-windows/bugfix-pipeline-launcher/references/configuration.md +49 -0
- package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +2 -35
- package/bundled/skills-windows/feature-pipeline-launcher/references/configuration.md +55 -0
- package/bundled/skills-windows/feature-workflow/SKILL.md +5 -121
- package/bundled/skills-windows/feature-workflow/references/brainstorm-guide.md +137 -0
- package/bundled/skills-windows/prizm-kit/SKILL.md +92 -0
- package/bundled/skills-windows/prizmkit-code-review/SKILL.md +156 -0
- package/bundled/skills-windows/prizmkit-code-review/references/dev-agent-prompt.md +30 -0
- package/bundled/skills-windows/prizmkit-code-review/references/review-report-template.md +31 -0
- package/bundled/skills-windows/prizmkit-code-review/references/reviewer-agent-prompt.md +62 -0
- package/bundled/skills-windows/prizmkit-code-review/scripts/check_loop.py +186 -0
- package/bundled/skills-windows/prizmkit-committer/SKILL.md +87 -0
- package/bundled/skills-windows/prizmkit-deploy/SKILL.md +444 -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/data-safety-examples.md +120 -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/ssh-bootstrap-flow.md +49 -0
- package/bundled/skills-windows/prizmkit-deploy/references/ssh-execution-flow.md +41 -0
- package/bundled/skills-windows/prizmkit-deploy/references/ssh-takeover.md +20 -0
- package/bundled/skills-windows/prizmkit-deploy/references/ssl-setup.md +56 -0
- package/bundled/skills-windows/prizmkit-implement/SKILL.md +71 -0
- package/bundled/skills-windows/prizmkit-plan/SKILL.md +102 -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/examples.md +85 -0
- package/bundled/skills-windows/prizmkit-plan/references/verification-checklist.md +60 -0
- package/bundled/skills-windows/prizmkit-prizm-docs/SKILL.md +128 -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 +133 -0
- package/bundled/skills-windows/prizmkit-test/references/examples.md +70 -0
- package/bundled/skills-windows/prizmkit-test/references/test-generation-steps.md +49 -0
- package/bundled/skills-windows/prizmkit-test/references/test-report-template.md +42 -0
- package/bundled/skills-windows/recovery-workflow/SKILL.md +1 -52
- package/bundled/skills-windows/recovery-workflow/references/detection.md +58 -0
- package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +2 -32
- package/bundled/skills-windows/refactor-pipeline-launcher/references/configuration.md +54 -0
- package/bundled/skills-windows/refactor-planner/SKILL.md +9 -149
- package/bundled/skills-windows/refactor-planner/references/fast-path.md +59 -0
- package/bundled/skills-windows/refactor-planner/references/planning-phases.md +135 -0
- package/bundled/skills-windows/refactor-workflow/SKILL.md +4 -103
- package/bundled/skills-windows/refactor-workflow/references/brainstorm-guide.md +116 -0
- package/package.json +1 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Reviewer Agent Prompt Template
|
|
2
|
+
|
|
3
|
+
Used in Phase 1 Step 1 of `/prizmkit-code-review`. The orchestrator fills `{goals}`, `{plan decisions}`, `{dev rules}`, `{round N}`, and `{round_context}` before spawning the Reviewer Agent.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
You are a code reviewer. Review workspace changes against the spec goals, plan decisions, and per-layer dev rules.
|
|
7
|
+
|
|
8
|
+
## Spec Goals
|
|
9
|
+
{goals and acceptance criteria from spec.md}
|
|
10
|
+
|
|
11
|
+
## Plan Decisions
|
|
12
|
+
{architecture decisions and task list from plan.md}
|
|
13
|
+
|
|
14
|
+
## Dev Rules (per-layer conventions)
|
|
15
|
+
{rules from .prizmkit/rules/<layer>-rules.md, or "No custom dev rules configured — use general best practices."}
|
|
16
|
+
|
|
17
|
+
## Review Round
|
|
18
|
+
Round {N}. {round_context}
|
|
19
|
+
|
|
20
|
+
## What to Review
|
|
21
|
+
Run these commands to see the current workspace changes:
|
|
22
|
+
- `git diff` (unstaged changes)
|
|
23
|
+
- `git diff --cached` (staged changes)
|
|
24
|
+
- `git status` (new/deleted files)
|
|
25
|
+
|
|
26
|
+
For new files shown in git status, read their full content.
|
|
27
|
+
For modified files, read enough surrounding context to understand the change.
|
|
28
|
+
|
|
29
|
+
## Review Dimensions
|
|
30
|
+
Evaluate the changes across these dimensions (focus on what's relevant):
|
|
31
|
+
|
|
32
|
+
1. **Goal alignment**: Do the changes accomplish all goals from spec.md? Anything missing or off-target?
|
|
33
|
+
2. **Defects**: Logic bugs, missing error handling, boundary condition issues, incorrect behavior.
|
|
34
|
+
3. **Completeness**: Files that should have been changed but weren't? Missing tests, types, imports, exports?
|
|
35
|
+
4. **Consistency**: Do changes follow the project's existing patterns, naming conventions, and code style?
|
|
36
|
+
5. **Security**: Hardcoded secrets, injection vulnerabilities, unsafe operations.
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
## Output Format
|
|
40
|
+
Respond with EXACTLY this format:
|
|
41
|
+
|
|
42
|
+
### Result: PASS | NEEDS_FIXES
|
|
43
|
+
|
|
44
|
+
### Findings
|
|
45
|
+
(If PASS, write "No issues found.")
|
|
46
|
+
|
|
47
|
+
#### Finding N
|
|
48
|
+
- **Severity**: high | medium | low
|
|
49
|
+
- **Dimension**: goal-alignment | defect | completeness | consistency | security | rules-compliance
|
|
50
|
+
- **Location**: filepath:line (or "project-level")
|
|
51
|
+
- **Problem**: What is wrong and why it matters
|
|
52
|
+
- **Suggestion**: Recommended fix approach
|
|
53
|
+
- **Verification**: How to confirm the fix is correct
|
|
54
|
+
|
|
55
|
+
### Summary
|
|
56
|
+
One to two sentences about the overall state of the changes.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Round Context
|
|
60
|
+
|
|
61
|
+
- Round 1: "This is the first review. Examine all changes comprehensively."
|
|
62
|
+
- 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."
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Loop Exit Gatekeeper for prizmkit-code-review skill.
|
|
4
|
+
|
|
5
|
+
Stateless design: all loop state is passed via stdin and returned via stdout.
|
|
6
|
+
The caller (AI model) tracks `findings_history` and `max_rounds` between calls.
|
|
7
|
+
No runtime files are created — the script is a pure function over JSON.
|
|
8
|
+
|
|
9
|
+
The model supplies the current round in each call — the script does not auto-increment
|
|
10
|
+
rounds, because the gate is called twice per loop iteration (after Reviewer returns
|
|
11
|
+
and after Main Agent filters), and only the model knows when a full cycle completes.
|
|
12
|
+
|
|
13
|
+
Usage:
|
|
14
|
+
echo '{"reviewer_result":"NEEDS_FIXES","accepted_count":2,"findings_count":5,"round":1,"findings_history":[],"max_rounds":3,"filtering_done":true}' | python3 check_loop.py
|
|
15
|
+
|
|
16
|
+
Input JSON schema:
|
|
17
|
+
{
|
|
18
|
+
"reviewer_result": "PASS" | "NEEDS_FIXES",
|
|
19
|
+
"accepted_count": int,
|
|
20
|
+
"findings_count": int,
|
|
21
|
+
"round": int,
|
|
22
|
+
"findings_history": [int, ...],
|
|
23
|
+
"max_rounds": int,
|
|
24
|
+
"filtering_done": bool
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
Output JSON schema:
|
|
28
|
+
{
|
|
29
|
+
"endLoop": bool,
|
|
30
|
+
"reason": str,
|
|
31
|
+
"verdict": "PASS" | "NEEDS_FIXES" | null,
|
|
32
|
+
"round": int,
|
|
33
|
+
"maxRounds": int,
|
|
34
|
+
"divergenceWarning": bool,
|
|
35
|
+
"findings_history": [int, ...]
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
Exit conditions (checked in order):
|
|
39
|
+
1. Reviewer returned PASS → endLoop=true, verdict=PASS
|
|
40
|
+
2. NEEDS_FIXES before filtering → endLoop=false, wait for filtering
|
|
41
|
+
3. Filtered findings all rejected → endLoop=true, verdict=PASS
|
|
42
|
+
4. Max rounds reached after filtering → endLoop=true, verdict=NEEDS_FIXES
|
|
43
|
+
5. Otherwise → endLoop=false
|
|
44
|
+
|
|
45
|
+
Divergence detection:
|
|
46
|
+
If findings_count strictly increases for 3 consecutive rounds, set divergenceWarning=true.
|
|
47
|
+
This is a warning only — it does not force loop exit.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
import json
|
|
51
|
+
import sys
|
|
52
|
+
|
|
53
|
+
DEFAULT_MAX_ROUNDS = 3
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def check_divergence(findings_history):
|
|
57
|
+
"""Return True if the last 3 entries in findings_history are strictly increasing."""
|
|
58
|
+
if len(findings_history) < 3:
|
|
59
|
+
return False
|
|
60
|
+
last_three = findings_history[-3:]
|
|
61
|
+
return last_three[0] < last_three[1] < last_three[2]
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def record_findings_count(findings_history, current_round, findings_count):
|
|
65
|
+
"""Record findings_count once per round index, updating duplicate calls for the same round."""
|
|
66
|
+
if current_round <= 0:
|
|
67
|
+
return findings_history
|
|
68
|
+
|
|
69
|
+
target_index = current_round - 1
|
|
70
|
+
while len(findings_history) < target_index:
|
|
71
|
+
findings_history.append(0)
|
|
72
|
+
|
|
73
|
+
if len(findings_history) == target_index:
|
|
74
|
+
findings_history.append(findings_count)
|
|
75
|
+
else:
|
|
76
|
+
findings_history[target_index] = findings_count
|
|
77
|
+
|
|
78
|
+
return findings_history
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def check_exit_condition(data):
|
|
82
|
+
"""Determine whether the loop should exit. Pure function — no side effects.
|
|
83
|
+
|
|
84
|
+
Round is model-supplied — the script does not auto-increment it because
|
|
85
|
+
the gate is called twice per loop iteration (after Step 2 and Step 3).
|
|
86
|
+
"""
|
|
87
|
+
reviewer_result = data.get("reviewer_result")
|
|
88
|
+
accepted_count = data.get("accepted_count", 0)
|
|
89
|
+
findings_count = data.get("findings_count", 0)
|
|
90
|
+
current_round = data.get("round", 0)
|
|
91
|
+
findings_history = list(data.get("findings_history", []))
|
|
92
|
+
max_rounds = data.get("max_rounds", DEFAULT_MAX_ROUNDS)
|
|
93
|
+
filtering_done = data.get("filtering_done", reviewer_result == "PASS")
|
|
94
|
+
|
|
95
|
+
findings_history = record_findings_count(
|
|
96
|
+
findings_history, current_round, findings_count
|
|
97
|
+
)
|
|
98
|
+
divergence_warning = check_divergence(findings_history)
|
|
99
|
+
|
|
100
|
+
# Condition 1: Reviewer returned PASS
|
|
101
|
+
if reviewer_result == "PASS":
|
|
102
|
+
return {
|
|
103
|
+
"endLoop": True,
|
|
104
|
+
"reason": f"Round {current_round}: Reviewer returned PASS",
|
|
105
|
+
"verdict": "PASS",
|
|
106
|
+
"round": current_round,
|
|
107
|
+
"maxRounds": max_rounds,
|
|
108
|
+
"divergenceWarning": False,
|
|
109
|
+
"findings_history": findings_history,
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
# Condition 2: Reviewer returned findings, but filtering has not happened yet
|
|
113
|
+
if reviewer_result == "NEEDS_FIXES" and not filtering_done:
|
|
114
|
+
return {
|
|
115
|
+
"endLoop": False,
|
|
116
|
+
"reason": f"Round {current_round}: reviewer returned findings; filter before applying exit conditions",
|
|
117
|
+
"verdict": None,
|
|
118
|
+
"round": current_round,
|
|
119
|
+
"maxRounds": max_rounds,
|
|
120
|
+
"divergenceWarning": divergence_warning,
|
|
121
|
+
"findings_history": findings_history,
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
# Condition 3: All findings rejected after filtering
|
|
125
|
+
if reviewer_result == "NEEDS_FIXES" and accepted_count == 0:
|
|
126
|
+
return {
|
|
127
|
+
"endLoop": True,
|
|
128
|
+
"reason": f"Round {current_round}: all findings rejected by main agent",
|
|
129
|
+
"verdict": "PASS",
|
|
130
|
+
"round": current_round,
|
|
131
|
+
"maxRounds": max_rounds,
|
|
132
|
+
"divergenceWarning": False,
|
|
133
|
+
"findings_history": findings_history,
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
# Condition 4: Max rounds reached
|
|
137
|
+
if current_round >= max_rounds:
|
|
138
|
+
return {
|
|
139
|
+
"endLoop": True,
|
|
140
|
+
"reason": f"Hard limit: max {max_rounds} rounds reached",
|
|
141
|
+
"verdict": "NEEDS_FIXES",
|
|
142
|
+
"round": current_round,
|
|
143
|
+
"maxRounds": max_rounds,
|
|
144
|
+
"divergenceWarning": divergence_warning,
|
|
145
|
+
"findings_history": findings_history,
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
# Condition 5: Continue loop
|
|
149
|
+
next_round = current_round + 1
|
|
150
|
+
return {
|
|
151
|
+
"endLoop": False,
|
|
152
|
+
"reason": f"Round {current_round}: {accepted_count} findings accepted, continuing to round {next_round}",
|
|
153
|
+
"verdict": None,
|
|
154
|
+
"round": current_round,
|
|
155
|
+
"maxRounds": max_rounds,
|
|
156
|
+
"divergenceWarning": divergence_warning,
|
|
157
|
+
"findings_history": findings_history,
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
def main():
|
|
162
|
+
# Read input from stdin
|
|
163
|
+
try:
|
|
164
|
+
data = json.load(sys.stdin)
|
|
165
|
+
except json.JSONDecodeError as e:
|
|
166
|
+
print(
|
|
167
|
+
json.dumps(
|
|
168
|
+
{
|
|
169
|
+
"endLoop": False,
|
|
170
|
+
"reason": f"Invalid JSON input: {e}",
|
|
171
|
+
"verdict": None,
|
|
172
|
+
"round": 0,
|
|
173
|
+
"maxRounds": DEFAULT_MAX_ROUNDS,
|
|
174
|
+
"divergenceWarning": False,
|
|
175
|
+
"findings_history": [],
|
|
176
|
+
}
|
|
177
|
+
)
|
|
178
|
+
)
|
|
179
|
+
sys.exit(1)
|
|
180
|
+
|
|
181
|
+
result = check_exit_condition(data)
|
|
182
|
+
print(json.dumps(result))
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
if __name__ == "__main__":
|
|
186
|
+
main()
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
### When NOT to Use
|
|
14
|
+
- No uncommitted changes exist — nothing to commit
|
|
15
|
+
- .prizmkit/prizm-docs/ not synced — run /prizmkit-retrospective first
|
|
16
|
+
- Code review not passed in pipeline mode — run /prizmkit-code-review first
|
|
17
|
+
- Mid-merge conflict resolution — handle manually with git
|
|
18
|
+
|
|
19
|
+
**PRECONDITION:**
|
|
20
|
+
|
|
21
|
+
| Required State | Check | If Missing |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| Uncommitted changes exist | `git status` shows modified/added/untracked files | Inform user "nothing to commit" and stop |
|
|
24
|
+
| `.prizmkit/prizm-docs/` synced (feature/refactor) | `/prizmkit-retrospective` has run | Run `/prizmkit-retrospective` first |
|
|
25
|
+
| Code review passed (pipeline mode) | `review-report.md` in artifact directory has `## Verdict: PASS` | Run `/prizmkit-code-review` first |
|
|
26
|
+
|
|
27
|
+
### Workflow
|
|
28
|
+
|
|
29
|
+
Follow these steps in order — skipping or reordering can stage sensitive files or commit without proper verification:
|
|
30
|
+
|
|
31
|
+
#### Step 1: Status Check
|
|
32
|
+
```powershell
|
|
33
|
+
git status
|
|
34
|
+
```
|
|
35
|
+
- If "nothing to commit, working tree clean": inform user and stop
|
|
36
|
+
- If there are changes: proceed
|
|
37
|
+
|
|
38
|
+
#### Step 2: Generate Commit Message
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
#### Step 3: Update CHANGELOG.md
|
|
42
|
+
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.
|
|
43
|
+
|
|
44
|
+
#### Step 4: Git Commit
|
|
45
|
+
|
|
46
|
+
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:
|
|
47
|
+
|
|
48
|
+
1. Review untracked files with `git status`. Warn the user if any files match sensitive patterns (`.env*`, `*credential*`, `*secret*`, `*.pem`, `*.key`).
|
|
49
|
+
2. Stage tracked modified files: `git add -u`
|
|
50
|
+
3. For new files: stage explicitly by name after confirming they should be included.
|
|
51
|
+
4. Verify staged content with `git diff --cached --stat` before committing.
|
|
52
|
+
|
|
53
|
+
```powershell
|
|
54
|
+
git commit -m "<type>(<scope>): <description>"
|
|
55
|
+
```
|
|
56
|
+
Follow Conventional Commits format.
|
|
57
|
+
|
|
58
|
+
#### Step 5: Verification
|
|
59
|
+
```powershell
|
|
60
|
+
git log -1 --stat
|
|
61
|
+
```
|
|
62
|
+
Confirm the commit was recorded.
|
|
63
|
+
|
|
64
|
+
Then verify working tree is clean:
|
|
65
|
+
```powershell
|
|
66
|
+
git status
|
|
67
|
+
```
|
|
68
|
+
- If "nothing to commit, working tree clean": commit verified successfully, proceed
|
|
69
|
+
|
|
70
|
+
#### Step 6: Optional Push
|
|
71
|
+
Ask user: "Push to remote?"
|
|
72
|
+
- Yes: `git push`
|
|
73
|
+
- No: Stop
|
|
74
|
+
|
|
75
|
+
**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.
|
|
76
|
+
|
|
77
|
+
## Example
|
|
78
|
+
|
|
79
|
+
**Feature commit:**
|
|
80
|
+
```
|
|
81
|
+
git commit -m "feat(avatar): add user avatar upload with S3 storage"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Bug fix commit:**
|
|
85
|
+
```
|
|
86
|
+
git commit -m "fix(auth): handle null token in refresh flow"
|
|
87
|
+
```
|