@schalkneethling/calavera-skill-refined-plan-mode 0.2.0-next.2
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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Schalk Neethling
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://calavera.schalkneethling.com/schemas/calavera-artifact.schema.json",
|
|
3
|
+
"schemaVersion": 1,
|
|
4
|
+
"id": "skill-refined-plan-mode",
|
|
5
|
+
"type": "skill",
|
|
6
|
+
"displayName": "Refined plan mode",
|
|
7
|
+
"payload": "payload/refined-plan-mode",
|
|
8
|
+
"compatibility": {
|
|
9
|
+
"calavera": ">=2.2.0 <3"
|
|
10
|
+
}
|
|
11
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@schalkneethling/calavera-skill-refined-plan-mode",
|
|
3
|
+
"version": "0.2.0-next.2",
|
|
4
|
+
"description": "Refined plan mode artifact for Calavera.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+ssh://git@github.com/schalkneethling/create-project-calavera.git",
|
|
9
|
+
"directory": "packages/artifacts/skill-refined-plan-mode"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"calavera-artifact.json",
|
|
13
|
+
"payload"
|
|
14
|
+
],
|
|
15
|
+
"type": "module",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": "./calavera-artifact.json",
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public",
|
|
22
|
+
"provenance": true
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refined-plan-mode
|
|
3
|
+
description: Use this skill when the user asks to plan, review, revise, continue, checkpoint, handoff, reset, or execute work using Refined Plan Mode. Also use it for legacy /rpm:start, /rpm:advance, /rpm:review, /rpm:feedback, /rpm:checkpoint, and /rpm:handoff prompts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Refined Plan Mode
|
|
7
|
+
|
|
8
|
+
Use this skill when the user asks to plan, review, revise, continue, checkpoint, handoff, reset, or execute work using Refined Plan Mode.
|
|
9
|
+
|
|
10
|
+
This skill is additive to the agent's current planning guidance. It turns a plan into a versioned Markdown artifact that can be reviewed with line, range, and text-selection comments. The agent remains responsible for reading feedback, revising the plan, and moving only when the user has approved the plan or explicitly asks to proceed.
|
|
11
|
+
|
|
12
|
+
## Core Protocol
|
|
13
|
+
|
|
14
|
+
Before deciding what to do, inspect the local `.plan-review` state:
|
|
15
|
+
|
|
16
|
+
- `.plan-review/.current-version`
|
|
17
|
+
- `.plan-review/approved-plan.md`
|
|
18
|
+
- `.plan-review/plans/`
|
|
19
|
+
- `.plan-review/feedback/`
|
|
20
|
+
|
|
21
|
+
Then choose the next state transition:
|
|
22
|
+
|
|
23
|
+
0. Parse explicit checkpoint, handoff, feedback, review, or reset requests and dispatch that mode before considering execution.
|
|
24
|
+
1. On explicit approval, copy the current plan version into `.plan-review/approved-plan.md` and record that version in the file. Only for `/rpm:advance` or an explicit proceed request, execute it after confirming its recorded version still matches `.plan-review/.current-version`.
|
|
25
|
+
2. If a current version exists and `.plan-review/feedback/plan-vN-feedback.json` exists for it, read the current plan and feedback, address every feedback item in a revised next plan version, update `.plan-review/.current-version`, and stop for review.
|
|
26
|
+
3. If a current version exists with no feedback and no approval, report that the plan is awaiting review and include the reviewer launch command.
|
|
27
|
+
4. If no current plan exists, clarify only what is necessary, inspect the repository enough to produce a useful plan, write `.plan-review/plans/plan-v1.md`, write `v1` to `.plan-review/.current-version`, and stop for review.
|
|
28
|
+
|
|
29
|
+
Users can ask for checkpoint, handoff, or reset in natural language:
|
|
30
|
+
|
|
31
|
+
- For a checkpoint, report the current version, latest plan path, feedback status, approval status, and recommended next action.
|
|
32
|
+
- For a handoff, summarize the goal, current plan, feedback status, approval status, important assumptions, unresolved decisions, and recommended next action.
|
|
33
|
+
- For a reset, first require explicit confirmation by asking the user to type `RESET` or by accepting an explicit `--force` request. After confirmation, empty only the contents of `.plan-review` while keeping the `.plan-review` directory itself. Do not remove source files or any other workspace files.
|
|
34
|
+
|
|
35
|
+
## Task Modes
|
|
36
|
+
|
|
37
|
+
Treat these legacy `/rpm:*` prompts as natural-language requests for this skill:
|
|
38
|
+
|
|
39
|
+
### `/rpm:start`
|
|
40
|
+
|
|
41
|
+
Start a plan review loop for the user's current task.
|
|
42
|
+
|
|
43
|
+
1. Inspect the repository enough to understand the task and relevant constraints.
|
|
44
|
+
2. Ask only blocking clarification questions. If reasonable assumptions are available, state them in the plan instead of stopping.
|
|
45
|
+
3. Create `.plan-review/plans/plan-v1.md` with the complete plan.
|
|
46
|
+
4. Create or update `.plan-review/.current-version` with `v1`.
|
|
47
|
+
5. Reply with a concise summary and tell the user the plan is ready for review in Refined Plan Mode.
|
|
48
|
+
|
|
49
|
+
Do not implement the plan yet unless the user explicitly asks you to proceed without review.
|
|
50
|
+
|
|
51
|
+
### `/rpm:advance`
|
|
52
|
+
|
|
53
|
+
Continue the loop from the current state.
|
|
54
|
+
|
|
55
|
+
1. Inspect `.plan-review/.current-version`, `.plan-review/approved-plan.md`, available plan files, and available feedback files.
|
|
56
|
+
2. If an approved plan exists, execute that plan.
|
|
57
|
+
3. If feedback exists for the current plan version, incorporate it into the next plan version.
|
|
58
|
+
4. If there is a current plan but no feedback or approval, remind the user that the plan is awaiting review.
|
|
59
|
+
5. If no plan exists, start with `/rpm:start` behavior.
|
|
60
|
+
|
|
61
|
+
Keep the response focused on the next state transition.
|
|
62
|
+
|
|
63
|
+
### `/rpm:review`
|
|
64
|
+
|
|
65
|
+
Audit the latest plan before the user reviews it.
|
|
66
|
+
|
|
67
|
+
1. Read the current plan version.
|
|
68
|
+
2. Review the plan for missing context, vague steps, untested assumptions, risky sequencing, and weak validation.
|
|
69
|
+
3. If improvements are needed, write a revised next version and update `.plan-review/.current-version`.
|
|
70
|
+
4. If the plan is already review-ready, leave files unchanged.
|
|
71
|
+
5. Reply with either the new plan version written or a short explanation that the current plan is ready for review.
|
|
72
|
+
|
|
73
|
+
This mode reviews plan quality. It does not implement the plan.
|
|
74
|
+
|
|
75
|
+
### `/rpm:feedback`
|
|
76
|
+
|
|
77
|
+
Incorporate submitted feedback into the next plan version.
|
|
78
|
+
|
|
79
|
+
1. Read `.plan-review/.current-version` to find the current version.
|
|
80
|
+
2. Read `.plan-review/feedback/plan-vN-feedback.json` for that version.
|
|
81
|
+
3. Read `.plan-review/plans/plan-vN.md`.
|
|
82
|
+
4. Address every feedback item in a revised plan, adding a `Feedback Addressed` section that maps comments to changes made.
|
|
83
|
+
5. Write the revision to `.plan-review/plans/plan-vN+1.md`.
|
|
84
|
+
6. Remove any stale `.plan-review/approved-plan.md`, then update `.plan-review/.current-version` to the new version.
|
|
85
|
+
7. Reply with a short note naming the feedback file read and the new plan file written.
|
|
86
|
+
|
|
87
|
+
If the feedback file is missing, report the exact path expected and stop.
|
|
88
|
+
|
|
89
|
+
### `/rpm:checkpoint`
|
|
90
|
+
|
|
91
|
+
Summarize the current review-loop state.
|
|
92
|
+
|
|
93
|
+
Report:
|
|
94
|
+
|
|
95
|
+
- Current plan version from `.plan-review/.current-version`, if present.
|
|
96
|
+
- Latest plan file path.
|
|
97
|
+
- Whether feedback exists for the current version.
|
|
98
|
+
- Whether `.plan-review/approved-plan.md` exists.
|
|
99
|
+
- The recommended next action.
|
|
100
|
+
|
|
101
|
+
Do not modify files unless the user also asks you to advance or revise the plan.
|
|
102
|
+
|
|
103
|
+
### `/rpm:handoff`
|
|
104
|
+
|
|
105
|
+
Prepare a compact continuation summary for another agent or a future session.
|
|
106
|
+
|
|
107
|
+
Include:
|
|
108
|
+
|
|
109
|
+
- Goal.
|
|
110
|
+
- Current plan version and file path.
|
|
111
|
+
- Feedback status.
|
|
112
|
+
- Approval status.
|
|
113
|
+
- Important assumptions or unresolved decisions.
|
|
114
|
+
- Recommended next action.
|
|
115
|
+
|
|
116
|
+
Prefer reading the current plan and feedback files directly instead of relying on chat history.
|
|
117
|
+
|
|
118
|
+
### Reset
|
|
119
|
+
|
|
120
|
+
Reset the review-loop state only after explicit confirmation:
|
|
121
|
+
|
|
122
|
+
1. If the user did not provide an explicit `--force` request, ask them to type `RESET`.
|
|
123
|
+
2. Proceed only when the user confirms exactly.
|
|
124
|
+
3. Empty the contents of `.plan-review`, preserving the `.plan-review` directory itself.
|
|
125
|
+
4. Do not remove source files or any workspace files outside `.plan-review`.
|
|
126
|
+
|
|
127
|
+
## File Convention
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
.plan-review/
|
|
131
|
+
.current-version
|
|
132
|
+
plans/
|
|
133
|
+
plan-v1.md
|
|
134
|
+
plan-v2.md
|
|
135
|
+
feedback/
|
|
136
|
+
plan-v1-feedback.json
|
|
137
|
+
plan-v2-feedback.json
|
|
138
|
+
approved-plan.md
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Create missing directories when needed. Never summarize or truncate the plan file itself. The file should be self-contained enough for another agent to understand the goal, context, constraints, implementation steps, validation steps, and open questions.
|
|
142
|
+
|
|
143
|
+
## Plan Shape
|
|
144
|
+
|
|
145
|
+
Prefer this structure unless the task clearly calls for something else:
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
# Plan vN: Short Title
|
|
149
|
+
|
|
150
|
+
## Goal
|
|
151
|
+
|
|
152
|
+
## Current Understanding
|
|
153
|
+
|
|
154
|
+
## Assumptions
|
|
155
|
+
|
|
156
|
+
## Open Questions
|
|
157
|
+
|
|
158
|
+
## Proposed Changes
|
|
159
|
+
|
|
160
|
+
## Validation
|
|
161
|
+
|
|
162
|
+
## Risks
|
|
163
|
+
|
|
164
|
+
## Rollback or Recovery
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Keep the plan practical. Include file paths, commands, and decision points when known. Call out assumptions explicitly instead of hiding uncertainty inside confident prose.
|
|
168
|
+
|
|
169
|
+
## Reviewer Launch Command
|
|
170
|
+
|
|
171
|
+
Whenever you write or advance to a plan version that is ready for user review, include a command the user can run from the Refined Plan Mode project root.
|
|
172
|
+
|
|
173
|
+
Prefer an absolute path to the target project's `.plan-review` directory when you know it:
|
|
174
|
+
|
|
175
|
+
```sh
|
|
176
|
+
PLAN_REVIEW_DIR=/absolute/path/to/project/.plan-review vp dev --host 127.0.0.1 --port 5173
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
If only a home-relative path is known, shell expansion is acceptable:
|
|
180
|
+
|
|
181
|
+
```sh
|
|
182
|
+
PLAN_REVIEW_DIR=~/dev/target-project/.plan-review vp dev --host 127.0.0.1 --port 5173
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Use the toolchain command documented by the Refined Plan Mode project. For the Vite+ project, use `vp dev` rather than invoking the package manager directly.
|
|
186
|
+
|
|
187
|
+
## Feedback Handling
|
|
188
|
+
|
|
189
|
+
When feedback exists:
|
|
190
|
+
|
|
191
|
+
- Read the relevant JSON feedback file before revising.
|
|
192
|
+
- Treat every unresolved comment as actionable until clearly addressed.
|
|
193
|
+
- Preserve useful parts of the previous plan.
|
|
194
|
+
- Add a short `Feedback Addressed` section to the revised plan that maps comments to the changes made.
|
|
195
|
+
- If feedback conflicts or cannot be satisfied safely, explain that in the revised plan and ask the user for the smallest useful decision.
|
|
196
|
+
|
|
197
|
+
## Execution Gate
|
|
198
|
+
|
|
199
|
+
Do not begin implementation from an unapproved plan unless the user explicitly asks you to proceed. When the user directly approves the current plan, first snapshot that exact version into `.plan-review/approved-plan.md`. Remove that snapshot whenever a revised plan version is written. Execute only when the snapshot's recorded version matches `.plan-review/.current-version`, then keep the normal agent workflow: inspect files, make focused edits, validate, and report the outcome.
|
|
200
|
+
|
|
201
|
+
## User Updates
|
|
202
|
+
|
|
203
|
+
In conversation, keep updates brief:
|
|
204
|
+
|
|
205
|
+
- Say which plan version was written.
|
|
206
|
+
- Say where feedback should be submitted.
|
|
207
|
+
- Include the reviewer launch command when a plan is ready for review.
|
|
208
|
+
- Say which feedback file was read when revising.
|
|
209
|
+
- Say when the plan is approved and execution is beginning.
|
|
210
|
+
|
|
211
|
+
The plan file carries the detail; the chat message should help the user orient without duplicating the full artifact.
|