@tianhai/pi-workflow-kit 0.17.1 → 0.18.1
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/README.md +47 -37
- package/docs/developer-usage-guide.md +32 -14
- package/docs/lessons.md +18 -0
- package/docs/oversight-model.md +11 -5
- package/docs/plans/completed/2026-06-09-code-review-fixes-implementation.md +74 -0
- package/docs/plans/completed/2026-06-09-code-review-fixes-progress.md +14 -0
- package/docs/plans/completed/2026-06-09-incremental-workflow-and-rename-design.md +186 -0
- package/docs/plans/completed/2026-06-09-incremental-workflow-and-rename-implementation.md +675 -0
- package/docs/plans/completed/2026-06-09-incremental-workflow-and-rename-progress.md +18 -0
- package/docs/plans/completed/2026-06-09-incremental-workflow-and-rename-verification-report.md +81 -0
- package/docs/plans/completed/2026-06-09-verification-fixes-implementation.md +69 -0
- package/docs/plans/completed/2026-06-09-verification-fixes-progress.md +14 -0
- package/docs/workflow-phases.md +19 -13
- package/extensions/workflow-guard.ts +10 -9
- package/package.json +2 -1
- package/skills/{brainstorming → pwk-brainstorming}/SKILL.md +17 -6
- package/skills/{design-review → pwk-design-review}/SKILL.md +11 -9
- package/skills/{diagnose → pwk-diagnose}/SKILL.md +1 -1
- package/skills/{executing-tasks → pwk-executing-tasks}/SKILL.md +46 -16
- package/skills/{finalizing → pwk-finalizing}/SKILL.md +9 -2
- package/skills/{verify → pwk-verify}/SKILL.md +3 -3
- package/skills/{writing-plans → pwk-writing-plans}/SKILL.md +21 -6
|
@@ -0,0 +1,675 @@
|
|
|
1
|
+
# Implementation Plan: Incremental Workflow & Skill Rename
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Rename all 7 skills with `pwk-` prefix, update cross-references, add feature-table support to brainstorming, convert writing-plans and executing-tasks to feature-at-a-time loop, move design-review trigger to after writing-plans, add per-feature verify support, update workflow-guard extension.
|
|
6
|
+
|
|
7
|
+
One feature, 9 tasks.
|
|
8
|
+
|
|
9
|
+
## Task 1: Rename skill directories
|
|
10
|
+
|
|
11
|
+
<!-- tdd: trivial -->
|
|
12
|
+
|
|
13
|
+
Move all 7 skill directories to `pwk-` prefixed names.
|
|
14
|
+
|
|
15
|
+
Files:
|
|
16
|
+
- `skills/brainstorming/SKILL.md` → `skills/pwk-brainstorming/SKILL.md`
|
|
17
|
+
- `skills/writing-plans/SKILL.md` → `skills/pwk-writing-plans/SKILL.md`
|
|
18
|
+
- `skills/executing-tasks/SKILL.md` → `skills/pwk-executing-tasks/SKILL.md`
|
|
19
|
+
- `skills/design-review/SKILL.md` → `skills/pwk-design-review/SKILL.md`
|
|
20
|
+
- `skills/verify/SKILL.md` → `skills/pwk-verify/SKILL.md`
|
|
21
|
+
- `skills/finalizing/SKILL.md` → `skills/pwk-finalizing/SKILL.md`
|
|
22
|
+
- `skills/diagnose/SKILL.md` → `skills/pwk-diagnose/SKILL.md`
|
|
23
|
+
|
|
24
|
+
Steps:
|
|
25
|
+
1. Run these commands:
|
|
26
|
+
```
|
|
27
|
+
cd skills
|
|
28
|
+
mv brainstorming pwk-brainstorming
|
|
29
|
+
mv writing-plans pwk-writing-plans
|
|
30
|
+
mv executing-tasks pwk-executing-tasks
|
|
31
|
+
mv design-review pwk-design-review
|
|
32
|
+
mv verify pwk-verify
|
|
33
|
+
mv finalizing pwk-finalizing
|
|
34
|
+
mv diagnose pwk-diagnose
|
|
35
|
+
ls -1
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Expected output:
|
|
39
|
+
```
|
|
40
|
+
pwk-brainstorming
|
|
41
|
+
pwk-design-review
|
|
42
|
+
pwk-diagnose
|
|
43
|
+
pwk-executing-tasks
|
|
44
|
+
pwk-finalizing
|
|
45
|
+
pwk-verify
|
|
46
|
+
pwk-writing-plans
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
2. Lessons — none.
|
|
50
|
+
|
|
51
|
+
## Task 2: Update frontmatter names in all skills
|
|
52
|
+
|
|
53
|
+
<!-- tdd: trivial -->
|
|
54
|
+
|
|
55
|
+
Update the YAML frontmatter `name:` field in each renamed skill file.
|
|
56
|
+
|
|
57
|
+
Files:
|
|
58
|
+
- `skills/pwk-brainstorming/SKILL.md`
|
|
59
|
+
- `skills/pwk-writing-plans/SKILL.md`
|
|
60
|
+
- `skills/pwk-executing-tasks/SKILL.md`
|
|
61
|
+
- `skills/pwk-design-review/SKILL.md`
|
|
62
|
+
- `skills/pwk-verify/SKILL.md`
|
|
63
|
+
- `skills/pwk-finalizing/SKILL.md`
|
|
64
|
+
- `skills/pwk-diagnose/SKILL.md`
|
|
65
|
+
|
|
66
|
+
Steps:
|
|
67
|
+
1. In each file, update the frontmatter `name:` to the `pwk-` prefixed version. For example, `pwk-brainstorming/SKILL.md`:
|
|
68
|
+
|
|
69
|
+
Before:
|
|
70
|
+
```yaml
|
|
71
|
+
---
|
|
72
|
+
name: brainstorming
|
|
73
|
+
description: "Use this before any creative work..."
|
|
74
|
+
---
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
After:
|
|
78
|
+
```yaml
|
|
79
|
+
---
|
|
80
|
+
name: pwk-brainstorming
|
|
81
|
+
description: "Use this before any creative work..."
|
|
82
|
+
---
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Apply the same pattern to all 7 files — only the `name:` field changes, `description:` stays the same.
|
|
86
|
+
|
|
87
|
+
2. Verify with:
|
|
88
|
+
```
|
|
89
|
+
grep -r '^name:' skills/pwk-*/SKILL.md
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Expected output:
|
|
93
|
+
```
|
|
94
|
+
skills/pwk-brainstorming/SKILL.md:name: pwk-brainstorming
|
|
95
|
+
skills/pwk-design-review/SKILL.md:name: pwk-design-review
|
|
96
|
+
skills/pwk-diagnose/SKILL.md:name: pwk-diagnose
|
|
97
|
+
skills/pwk-executing-tasks/SKILL.md:name: pwk-executing-tasks
|
|
98
|
+
skills/pwk-finalizing/SKILL.md:name: pwk-finalizing
|
|
99
|
+
skills/pwk-verify/SKILL.md:name: pwk-verify
|
|
100
|
+
skills/pwk-writing-plans/SKILL.md:name: pwk-writing-plans
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
3. Lessons — none.
|
|
104
|
+
|
|
105
|
+
## Task 3: Update cross-references in all skills
|
|
106
|
+
|
|
107
|
+
<!-- tdd: trivial -->
|
|
108
|
+
<!-- checkpoint: done -->
|
|
109
|
+
|
|
110
|
+
Update all `/skill:` references in all 7 skill files to use `pwk-` prefixed names.
|
|
111
|
+
|
|
112
|
+
Cross-reference map:
|
|
113
|
+
- `/skill:brainstorming` → `/skill:pwk-brainstorming`
|
|
114
|
+
- `/skill:writing-plans` → `/skill:pwk-writing-plans`
|
|
115
|
+
- `/skill:executing-tasks` → `/skill:pwk-executing-tasks`
|
|
116
|
+
- `/skill:finalizing` → `/skill:pwk-finalizing`
|
|
117
|
+
- `/skill:design-review` → `/skill:pwk-design-review`
|
|
118
|
+
- `/skill:verify` → `/skill:pwk-verify`
|
|
119
|
+
- `/skill:diagnose` → `/skill:pwk-diagnose`
|
|
120
|
+
|
|
121
|
+
Files:
|
|
122
|
+
- `skills/pwk-brainstorming/SKILL.md` — 3 references
|
|
123
|
+
- `skills/pwk-design-review/SKILL.md` — 3 references
|
|
124
|
+
- `skills/pwk-verify/SKILL.md` — 2 references
|
|
125
|
+
- `skills/pwk-writing-plans/SKILL.md` — 2 references
|
|
126
|
+
- `skills/pwk-executing-tasks/SKILL.md` — 8 references
|
|
127
|
+
- `skills/pwk-finalizing/SKILL.md` — 0 references (verify after update)
|
|
128
|
+
- `skills/pwk-diagnose/SKILL.md` — 0 references (verify after update)
|
|
129
|
+
|
|
130
|
+
Steps:
|
|
131
|
+
1. In `skills/pwk-brainstorming/SKILL.md`, update:
|
|
132
|
+
- `handled by /skill:executing-tasks` → `handled by /skill:pwk-executing-tasks`
|
|
133
|
+
- `Run /skill:design-review` → `Run /skill:pwk-design-review`
|
|
134
|
+
- `Run /skill:writing-plans` → `Run /skill:pwk-writing-plans`
|
|
135
|
+
|
|
136
|
+
2. In `skills/pwk-design-review/SKILL.md`, update:
|
|
137
|
+
- `Run /skill:brainstorming first` → `Run /skill:pwk-brainstorming first`
|
|
138
|
+
- Two instances of `Run /skill:writing-plans` → `Run /skill:pwk-writing-plans`
|
|
139
|
+
|
|
140
|
+
3. In `skills/pwk-verify/SKILL.md`, update:
|
|
141
|
+
- `Run /skill:executing-tasks first` → `Run /skill:pwk-executing-tasks first`
|
|
142
|
+
- `Run /skill:writing-plans` → `Run /skill:pwk-writing-plans`
|
|
143
|
+
|
|
144
|
+
4. In `skills/pwk-writing-plans/SKILL.md`, update:
|
|
145
|
+
- `Run /skill:design-review first` → `Run /skill:pwk-design-review first`
|
|
146
|
+
- `Run /skill:executing-tasks` → `Run /skill:pwk-executing-tasks`
|
|
147
|
+
|
|
148
|
+
5. In `skills/pwk-executing-tasks/SKILL.md`, update all 8 references:
|
|
149
|
+
- `Run /skill:writing-plans first` → `Run /skill:pwk-writing-plans first`
|
|
150
|
+
- `/skill:executing-tasks` (handoff text) → `/skill:pwk-executing-tasks`
|
|
151
|
+
- `/skill:finalizing` → `/skill:pwk-finalizing`
|
|
152
|
+
- Two instances of `/skill:executing-tasks` (session break, stop commands) → `/skill:pwk-executing-tasks`
|
|
153
|
+
- All remaining `/skill:executing-tasks` references → `/skill:pwk-executing-tasks`
|
|
154
|
+
|
|
155
|
+
6. Verify no old references remain:
|
|
156
|
+
```
|
|
157
|
+
grep -rn '/skill:brainstorming\|/skill:writing-plans\|/skill:executing-tasks\|/skill:finalizing\|/skill:design-review\|/skill:verify\|/skill:diagnose' skills/pwk-*/SKILL.md | grep -v 'pwk-'
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Expected output: empty (no matches).
|
|
161
|
+
|
|
162
|
+
7. Lessons — none.
|
|
163
|
+
|
|
164
|
+
⏸ **CHECKPOINT: done** — present implementation review. Wait for human approval before committing.
|
|
165
|
+
|
|
166
|
+
## Task 4: Add feature table to brainstorming and update after-design section
|
|
167
|
+
|
|
168
|
+
<!-- tdd: trivial -->
|
|
169
|
+
<!-- checkpoint: done -->
|
|
170
|
+
|
|
171
|
+
Update `skills/pwk-brainstorming/SKILL.md` to:
|
|
172
|
+
1. Update the production-risk flagging prose in step 4 (review now runs after planning, not as a separate stage)
|
|
173
|
+
2. Add a `## Features` table to the design doc (step 5)
|
|
174
|
+
3. Replace the "After the design" section to remove design-review suggestion, since review now runs after writing-plans
|
|
175
|
+
|
|
176
|
+
Files:
|
|
177
|
+
- `skills/pwk-brainstorming/SKILL.md`
|
|
178
|
+
|
|
179
|
+
Steps:
|
|
180
|
+
1. In step 4 ("Present the design"), update the prose that flags production-risk review. Replace:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
For non-trivial designs, note any areas that may need production-risk review (database schema changes, authentication or authorization, external API integrations, concurrency or batch processing, file uploads or large data flows, Redis/caching/message queues). You don't need to audit them here — just flag them for the design-review stage.
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
With:
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
For non-trivial designs, note any areas that may need production-risk review (database schema changes, authentication or authorization, external API integrations, concurrency or batch processing, file uploads or large data flows, Redis/caching/message queues). You don't need to audit them here — just flag them. Writing-plans will check for these when planning each feature and suggest `/skill:pwk-design-review` if needed.
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
2. In step 5 ("Write the design doc"), add the Features table requirement. Replace the existing step 5 text:
|
|
193
|
+
|
|
194
|
+
Before:
|
|
195
|
+
```
|
|
196
|
+
5. **Write the design doc** — save it to `docs/plans/YYYY-MM-DD-<topic>-design.md`. Organize features as end-to-end slices (each slice delivers one observable behavior through all relevant layers) so the planning phase can decompose them directly into tasks. Branch creation, committing, and workspace setup are handled by `/skill:pwk-executing-tasks`.
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
After:
|
|
200
|
+
```
|
|
201
|
+
5. **Write the design doc** — save it to `docs/plans/YYYY-MM-DD-<topic>-design.md`. Include a `## Features` table listing each feature as a testable, observable behavior. Simple features get one row. Complex features get many.
|
|
202
|
+
|
|
203
|
+
Table format:
|
|
204
|
+
```markdown
|
|
205
|
+
## Features
|
|
206
|
+
|
|
207
|
+
| # | Feature | Status | Observable Behavior |
|
|
208
|
+
|---|---------|--------|---------------------|
|
|
209
|
+
| 1 | Feature name | ⬜ pending | What the user can do when this is complete |
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Status values: `⬜ pending`, `🔄 planned`, `✅ done`, `⏭ skipped`.
|
|
213
|
+
|
|
214
|
+
For trivial changes where the entire feature is a single row, note "Simple change — no design review needed" below the table. For non-trivial designs, note areas that may need production-risk review (database schema changes, authentication or authorization, external API integrations, concurrency or batch processing, file uploads or large data flows, Redis/caching/message queues).
|
|
215
|
+
|
|
216
|
+
Branch creation, committing, and workspace setup are handled by `/skill:pwk-executing-tasks`.
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
3. Replace the "After the design" section:
|
|
220
|
+
|
|
221
|
+
Before:
|
|
222
|
+
```
|
|
223
|
+
## After the design
|
|
224
|
+
|
|
225
|
+
- **Non-trivial design**: Ask: "Design looks good. Run `/skill:pwk-design-review` to check for production risks before planning."
|
|
226
|
+
- **Trivial change**: Ask: "Simple change — skip design review. Ready to plan? Run `/skill:pwk-writing-plans`"
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
After:
|
|
230
|
+
```
|
|
231
|
+
## After the design
|
|
232
|
+
|
|
233
|
+
Ask: "Ready to plan? Run `/skill:pwk-writing-plans`"
|
|
234
|
+
|
|
235
|
+
> Design review runs after planning, not here. The plan doc has concrete code that makes hazard checks meaningful. Writing-plans will flag high-risk features and suggest `/skill:pwk-design-review` when needed.
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
4. Verify the skill file reads correctly:
|
|
239
|
+
```
|
|
240
|
+
cat skills/pwk-brainstorming/SKILL.md | grep -A2 '## Features'
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Expected output contains the table format.
|
|
244
|
+
|
|
245
|
+
5. Lessons — none.
|
|
246
|
+
|
|
247
|
+
⏸ **CHECKPOINT: done** — present implementation review. Wait for human approval before committing.
|
|
248
|
+
|
|
249
|
+
## Task 5: Update writing-plans for feature-at-a-time
|
|
250
|
+
|
|
251
|
+
<!-- tdd: trivial -->
|
|
252
|
+
<!-- checkpoint: done -->
|
|
253
|
+
|
|
254
|
+
Update `skills/pwk-writing-plans/SKILL.md` to operate on one feature at a time from the design doc's Features table. Add plan doc metadata so the executor can find the design doc and feature row.
|
|
255
|
+
|
|
256
|
+
Files:
|
|
257
|
+
- `skills/pwk-writing-plans/SKILL.md`
|
|
258
|
+
|
|
259
|
+
Steps:
|
|
260
|
+
1. Update step 1 to read the Features table from the design doc and identify the next `⬜ pending` feature. Also remove the "design doc already has Architectural Review" condition from the hazard check — review is now per-feature (per-plan doc), not per-design-doc.
|
|
261
|
+
|
|
262
|
+
Replace the first sentence of step 1:
|
|
263
|
+
|
|
264
|
+
Before:
|
|
265
|
+
```
|
|
266
|
+
1. **Check for a design doc** — look for `docs/plans/*-design.md`. If one exists, use it as the basis for the plan.
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
After:
|
|
270
|
+
```
|
|
271
|
+
1. **Check for a design doc** — look for `docs/plans/*-design.md`. If one exists, use it as the basis for the plan. Read the `## Features` table to identify the next feature with status `⬜ pending`. Mark that feature as `🔄 planned` by editing the design doc. This plan will cover only that one feature.
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Also update the hazard check text (currently step 1, after the features table change). Replace:
|
|
275
|
+
```
|
|
276
|
+
If any apply AND the design doc does not already have an `## Architectural Review` section, prompt the user: "This design involves [list what you found] but hasn't been reviewed for production risks. Run `/skill:pwk-design-review` first, or type 'proceed' to skip."
|
|
277
|
+
```
|
|
278
|
+
With:
|
|
279
|
+
```
|
|
280
|
+
If any apply, prompt the user: "This feature involves [list what you found] but hasn't been reviewed for production risks. Run `/skill:pwk-design-review` first, or type 'proceed' to skip."
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Also update the Plan Acceptance Audit's Risk Enforcement item (step 3 of the plan). The review now appends to the plan doc, not the design doc. Replace:
|
|
284
|
+
```
|
|
285
|
+
- **Risk Enforcement**: If the design doc's Architectural Review section flagged any hazards as `[TRIGGERED]`, verify the corresponding tasks have `checkpoint: done` and a `Hazard Mitigation Verification` section.
|
|
286
|
+
```
|
|
287
|
+
With:
|
|
288
|
+
```
|
|
289
|
+
- **Risk Enforcement**: If this plan doc's Architectural Review section flagged any hazards as `[TRIGGERED]`, verify the corresponding tasks have `checkpoint: done` and a `Hazard Mitigation Verification` section.
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
2. Update step 2 to name the plan doc per-feature and add metadata header:
|
|
293
|
+
|
|
294
|
+
Before:
|
|
295
|
+
```
|
|
296
|
+
2. **Write the implementation plan** — break the design into tasks. Save to `docs/plans/YYYY-MM-DD-<topic>-implementation.md`. If the design is too large for ~15 tasks, flag this to the human and ask whether to reduce scope or proceed with the full plan.
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
After:
|
|
300
|
+
```
|
|
301
|
+
2. **Write the implementation plan** — break the feature into tasks. Save to `docs/plans/YYYY-MM-DD-<topic>-<feature-name>-implementation.md` (derive `<feature-name>` from the feature's name in the table, slugified). Include metadata at the top of the plan doc so the executor can find the design doc and feature row:
|
|
302
|
+
|
|
303
|
+
```markdown
|
|
304
|
+
# Implementation Plan: <feature name>
|
|
305
|
+
|
|
306
|
+
## Overview
|
|
307
|
+
|
|
308
|
+
Design: docs/plans/YYYY-MM-DD-<topic>-design.md
|
|
309
|
+
Feature: <feature name> (row N in Features table)
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
If the design is too large for ~15 tasks for a single feature, flag this to the human and ask whether to reduce scope or proceed with the full plan.
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
3. Update "After the plan" to reflect the feature loop:
|
|
316
|
+
|
|
317
|
+
Before:
|
|
318
|
+
```
|
|
319
|
+
## After the plan
|
|
320
|
+
|
|
321
|
+
Ask: "Ready to execute? Run `/skill:pwk-executing-tasks`"
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
After:
|
|
325
|
+
```
|
|
326
|
+
## After the plan
|
|
327
|
+
|
|
328
|
+
Ask: "Ready to execute? Run `/skill:pwk-executing-tasks`"
|
|
329
|
+
|
|
330
|
+
> After executing this feature, the executor will check for more `⬜ pending` features and suggest planning the next one.
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
4. Verify the changes read correctly:
|
|
334
|
+
```
|
|
335
|
+
grep -n 'feature\|Feature' skills/pwk-writing-plans/SKILL.md
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Expected: multiple matches showing feature-at-a-time language.
|
|
339
|
+
|
|
340
|
+
5. Lessons — none.
|
|
341
|
+
|
|
342
|
+
⏸ **CHECKPOINT: done** — present implementation review. Wait for human approval before committing.
|
|
343
|
+
|
|
344
|
+
## Task 6: Update executing-tasks for feature loop and verify prompts
|
|
345
|
+
|
|
346
|
+
<!-- tdd: trivial -->
|
|
347
|
+
<!-- checkpoint: done -->
|
|
348
|
+
|
|
349
|
+
Update `skills/pwk-executing-tasks/SKILL.md` to:
|
|
350
|
+
1. Resolve the plan doc from the design doc's Features table (not glob)
|
|
351
|
+
2. Read design doc metadata during plan setup
|
|
352
|
+
3. Mark features as `✅ done` in the design doc's Features table after completing all tasks
|
|
353
|
+
4. Show per-task summary then feature-level next steps
|
|
354
|
+
|
|
355
|
+
Files:
|
|
356
|
+
- `skills/pwk-executing-tasks/SKILL.md`
|
|
357
|
+
|
|
358
|
+
Steps:
|
|
359
|
+
1. Update step 2 ("Find the plan") to resolve from design doc's Features table:
|
|
360
|
+
|
|
361
|
+
Before:
|
|
362
|
+
```
|
|
363
|
+
2. **Find the plan** — look for `docs/plans/*-implementation.md`. If none exist, say "No implementation plan found. Run `/skill:pwk-writing-plans` first." and stop. If multiple exist, ask the user which one to execute.
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
After:
|
|
367
|
+
```
|
|
368
|
+
2. **Find the plan** — look for `docs/plans/*-design.md` to get the Features table. Find the feature with status `🔄 planned`. The plan doc is `docs/plans/YYYY-MM-DD-<topic>-<slugified-feature-name>-implementation.md`. If no design doc exists, fall back to looking for a single `*-implementation.md` (backward compatibility with plans not using the feature table). If multiple plan docs exist and no design doc, ask the user which one to execute.
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
2. Update "Per-task execution" step 2 ("Read the plan") to extract design doc metadata:
|
|
372
|
+
|
|
373
|
+
Before:
|
|
374
|
+
```
|
|
375
|
+
2. **Read the plan** — read the plan's overview section (everything before `## Task 1:`). Skim all `## Task N:` headings for dependency awareness. Then read the current task's body in full. **Read `docs/lessons.md`** if it exists — follow all rules listed there while working on this task.
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
After:
|
|
379
|
+
```
|
|
380
|
+
2. **Read the plan** — read the plan's overview section (everything before `## Task 1:`). Extract the `Design:` and `Feature:` metadata to know which design doc and feature row this execution covers. Read the design doc's Features table for context on the overall feature set. Skim all `## Task N:` headings for dependency awareness. Then read the current task's body in full. **Read `docs/lessons.md`** if it exists — follow all rules listed there while working on this task.
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
3. In "Per-task execution", after step 7 ("Update progress"), add:
|
|
384
|
+
|
|
385
|
+
```
|
|
386
|
+
8. **Update design doc** — if the progress file shows all tasks for the current feature are `✅ done`, find the design doc (from plan metadata), and mark the current feature row as `✅ done` in the Features table.
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
4. Replace the "After all tasks" section:
|
|
390
|
+
|
|
391
|
+
Before:
|
|
392
|
+
```
|
|
393
|
+
## After all tasks
|
|
394
|
+
|
|
395
|
+
When no `⬜ pending` or `❌ failed` tasks remain, show a summary:
|
|
396
|
+
|
|
397
|
+
```
|
|
398
|
+
✅ All tasks complete!
|
|
399
|
+
|
|
400
|
+
| # | Status | Task |
|
|
401
|
+
|---|--------|------|
|
|
402
|
+
| 1 | ✅ done | Create User model |
|
|
403
|
+
| 2 | ✅ done | Write User model tests |
|
|
404
|
+
| 3 | ⏭ skipped | Add auth middleware |
|
|
405
|
+
|
|
406
|
+
Ready to ship? Run `/skill:pwk-finalizing`
|
|
407
|
+
```
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
After:
|
|
411
|
+
```
|
|
412
|
+
## After all tasks
|
|
413
|
+
|
|
414
|
+
When no `⬜ pending` or `❌ failed` tasks remain for the current feature, read the design doc's Features table. Show the per-task summary from the progress file, then check for more features:
|
|
415
|
+
|
|
416
|
+
### More features remaining
|
|
417
|
+
|
|
418
|
+
```
|
|
419
|
+
✅ Feature "<feature name>" complete.
|
|
420
|
+
|
|
421
|
+
| # | Status | Task |
|
|
422
|
+
|---|--------|------|
|
|
423
|
+
| 1 | ✅ done | Create User model |
|
|
424
|
+
| 2 | ✅ done | Add signup endpoint |
|
|
425
|
+
|
|
426
|
+
⏭ Next: "<next pending feature name>"
|
|
427
|
+
💡 Options:
|
|
428
|
+
- Plan next feature: /skill:pwk-writing-plans
|
|
429
|
+
- Verify this feature first: /skill:pwk-verify
|
|
430
|
+
- Or just say "continue"
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
### All features complete
|
|
434
|
+
|
|
435
|
+
```
|
|
436
|
+
✅ All features complete!
|
|
437
|
+
|
|
438
|
+
| # | Status | Feature |
|
|
439
|
+
|---|--------|---------|
|
|
440
|
+
| 1 | ✅ done | User signup |
|
|
441
|
+
| 2 | ✅ done | Email verification |
|
|
442
|
+
| 3 | ⏭ skipped | Password reset |
|
|
443
|
+
|
|
444
|
+
| # | Status | Task |
|
|
445
|
+
|---|--------|------|
|
|
446
|
+
| 1 | ✅ done | Create User model |
|
|
447
|
+
| 2 | ✅ done | Add signup endpoint |
|
|
448
|
+
| ... | ... | ... |
|
|
449
|
+
|
|
450
|
+
- Verify everything: /skill:pwk-verify
|
|
451
|
+
- Ship: /skill:pwk-finalizing
|
|
452
|
+
```
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
5. Verify the changes:
|
|
456
|
+
```
|
|
457
|
+
grep -n 'Feature\|feature\|design doc' skills/pwk-executing-tasks/SKILL.md | head -15
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
Expected: matches showing feature table resolution, design doc metadata reading, feature status update, and feature loop prompts.
|
|
461
|
+
|
|
462
|
+
6. Lessons — none.
|
|
463
|
+
|
|
464
|
+
⏸ **CHECKPOINT: done** — present implementation review. Wait for human approval before committing.
|
|
465
|
+
|
|
466
|
+
## Task 7: Update design-review to read plan doc alongside design doc
|
|
467
|
+
|
|
468
|
+
<!-- tdd: trivial -->
|
|
469
|
+
|
|
470
|
+
Update `skills/pwk-design-review/SKILL.md` to reflect its new position in the workflow (after writing-plans, not after brainstorming) and read both docs for review.
|
|
471
|
+
|
|
472
|
+
Files:
|
|
473
|
+
- `skills/pwk-design-review/SKILL.md`
|
|
474
|
+
|
|
475
|
+
Steps:
|
|
476
|
+
1. Update the description (frontmatter):
|
|
477
|
+
|
|
478
|
+
Before:
|
|
479
|
+
```
|
|
480
|
+
description: "Audit a design doc for production risks — security, scalability, fault tolerance, and operational hazards. Use after brainstorming for non-trivial designs, or when you want to stress-test a design for production readiness."
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
After:
|
|
484
|
+
```
|
|
485
|
+
description: "Audit a plan and design doc for production risks — security, scalability, fault tolerance, and operational hazards. Use after writing-plans for non-trivial features, when the plan has concrete code that makes hazard checks meaningful."
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
2. Update step 1 to also read the plan doc:
|
|
489
|
+
|
|
490
|
+
Before:
|
|
491
|
+
```
|
|
492
|
+
1. **Find the design doc** — look for `docs/plans/*-design.md`. If none exists, say "No design doc found. Run `/skill:pwk-brainstorming` first." and stop.
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
After:
|
|
496
|
+
```
|
|
497
|
+
1. **Find the design and plan docs** — look for `docs/plans/*-design.md` and `docs/plans/*-implementation.md`. If neither exists, say "No design or plan doc found. Run `/skill:pwk-brainstorming` first." and stop. Read the plan doc for concrete code context alongside the design doc for architectural context.
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
3. Update step 3 to read both docs:
|
|
501
|
+
|
|
502
|
+
Before:
|
|
503
|
+
```
|
|
504
|
+
3. **Read the design doc in full** — understand the architecture, data flow, components, and error handling proposed.
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
After:
|
|
508
|
+
```
|
|
509
|
+
3. **Read the design and plan docs in full** — understand the architecture from the design doc, and concrete code from the plan doc. The plan doc's implementation details (SQL queries, type definitions, function bodies) are what the hazard checks audit.
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
4. Update step 8 to append review findings to the plan doc, not the design doc:
|
|
513
|
+
|
|
514
|
+
Before:
|
|
515
|
+
```
|
|
516
|
+
8. **Append to design doc** — add a `## Architectural Review` section to the design doc. Two cases:
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
After:
|
|
520
|
+
```
|
|
521
|
+
8. **Append to plan doc** — add a `## Architectural Review` section to the plan doc (not the design doc — review is per-feature, and the plan doc is the per-feature artifact). Two cases:
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
5. Verify:
|
|
525
|
+
```
|
|
526
|
+
head -10 skills/pwk-design-review/SKILL.md
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
Expected: updated description and step 1 referencing both docs.
|
|
530
|
+
|
|
531
|
+
5. Lessons — none.
|
|
532
|
+
|
|
533
|
+
## Task 8: Update workflow-guard extension and tests
|
|
534
|
+
|
|
535
|
+
<!-- tdd: modifying-tested-code -->
|
|
536
|
+
<!-- checkpoint: done -->
|
|
537
|
+
|
|
538
|
+
Update `extensions/workflow-guard.ts` to rename skill references and add `pwk-verify` to the phase map. Update `tests/workflow-guard.test.ts` to match.
|
|
539
|
+
|
|
540
|
+
Files:
|
|
541
|
+
- `extensions/workflow-guard.ts`
|
|
542
|
+
- `tests/workflow-guard.test.ts`
|
|
543
|
+
|
|
544
|
+
Steps:
|
|
545
|
+
1. Run existing tests first:
|
|
546
|
+
```
|
|
547
|
+
npx vitest run tests/workflow-guard.test.ts
|
|
548
|
+
```
|
|
549
|
+
Expected: all tests pass.
|
|
550
|
+
|
|
551
|
+
2. In `extensions/workflow-guard.ts`, update the `SKILL_TO_PHASE` map:
|
|
552
|
+
|
|
553
|
+
Before:
|
|
554
|
+
```ts
|
|
555
|
+
const SKILL_TO_PHASE: Record<string, Phase> = {
|
|
556
|
+
brainstorming: "brainstorm",
|
|
557
|
+
"writing-plans": "plan",
|
|
558
|
+
};
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
After:
|
|
562
|
+
```ts
|
|
563
|
+
const SKILL_TO_PHASE: Record<string, Phase> = {
|
|
564
|
+
"pwk-brainstorming": "brainstorm",
|
|
565
|
+
"pwk-writing-plans": "plan",
|
|
566
|
+
"pwk-verify": "verify",
|
|
567
|
+
};
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
3. Update the phase-clearing triggers:
|
|
571
|
+
|
|
572
|
+
Before:
|
|
573
|
+
```ts
|
|
574
|
+
if (text.startsWith("/skill:executing-tasks") || text.startsWith("/skill:finalizing")) {
|
|
575
|
+
phase = null;
|
|
576
|
+
}
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
After:
|
|
580
|
+
```ts
|
|
581
|
+
if (text.startsWith("/skill:pwk-executing-tasks") || text.startsWith("/skill:pwk-finalizing")) {
|
|
582
|
+
phase = null;
|
|
583
|
+
}
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
4. In `tests/workflow-guard.test.ts`, no changes needed — tests cover `isSafeCommand` and `shouldBlockFilePath` which don't depend on skill names. The phase detection is tested via the extension event system which isn't unit-tested here.
|
|
587
|
+
|
|
588
|
+
5. Run tests:
|
|
589
|
+
```
|
|
590
|
+
npx vitest run tests/workflow-guard.test.ts
|
|
591
|
+
```
|
|
592
|
+
Expected: all tests still pass.
|
|
593
|
+
|
|
594
|
+
6. Verify no old skill names remain in the extension:
|
|
595
|
+
```
|
|
596
|
+
grep -n 'brainstorming\|"writing-plans"\|executing-tasks\|finalizing' extensions/workflow-guard.ts
|
|
597
|
+
```
|
|
598
|
+
Expected: empty (no matches for old names).
|
|
599
|
+
|
|
600
|
+
7. Lessons — none.
|
|
601
|
+
|
|
602
|
+
⏸ **CHECKPOINT: done** — present implementation review. Wait for human approval before committing.
|
|
603
|
+
|
|
604
|
+
## Task 9: Update documentation files
|
|
605
|
+
|
|
606
|
+
<!-- tdd: trivial -->
|
|
607
|
+
<!-- checkpoint: done -->
|
|
608
|
+
|
|
609
|
+
Update the three documentation files with `pwk-` prefixed skill names and the new workflow diagram.
|
|
610
|
+
|
|
611
|
+
Files:
|
|
612
|
+
- `docs/workflow-phases.md`
|
|
613
|
+
- `docs/oversight-model.md`
|
|
614
|
+
- `docs/developer-usage-guide.md`
|
|
615
|
+
|
|
616
|
+
Steps:
|
|
617
|
+
1. In `docs/workflow-phases.md`, update the flow diagram and all skill references:
|
|
618
|
+
|
|
619
|
+
Before:
|
|
620
|
+
```
|
|
621
|
+
# Workflow Phases
|
|
622
|
+
|
|
623
|
+
`pi-workflow-kit` has 4 phases and 1 utility skill. You invoke each one explicitly with `/skill:`.
|
|
624
|
+
|
|
625
|
+
```
|
|
626
|
+
brainstorm → plan → execute → finalize
|
|
627
|
+
```
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
After:
|
|
631
|
+
```
|
|
632
|
+
# Workflow Phases
|
|
633
|
+
|
|
634
|
+
`pi-workflow-kit` has 4 phases and 1 utility skill. You invoke each one explicitly with `/skill:`.
|
|
635
|
+
|
|
636
|
+
```
|
|
637
|
+
brainstorm → plan → [design-review?] → execute → [verify?] → finalize
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
For complex features, each phase loops per feature:
|
|
641
|
+
```
|
|
642
|
+
brainstorm (name features) → plan next feature → [design-review?] → execute feature → [verify?] → loop...
|
|
643
|
+
```
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
2. In `docs/workflow-phases.md`, update all `/skill:` references:
|
|
647
|
+
- `/skill:brainstorming` → `/skill:pwk-brainstorming`
|
|
648
|
+
- `/skill:writing-plans` → `/skill:pwk-writing-plans`
|
|
649
|
+
- `/skill:executing-tasks` → `/skill:pwk-executing-tasks`
|
|
650
|
+
- `/skill:finalizing` → `/skill:pwk-finalizing`
|
|
651
|
+
- `/skill:diagnose` → `/skill:pwk-diagnose`
|
|
652
|
+
|
|
653
|
+
3. In `docs/oversight-model.md`, update the skill names in the Skills section:
|
|
654
|
+
- `brainstorming` → `pwk-brainstorming`
|
|
655
|
+
- `writing-plans` → `pwk-writing-plans`
|
|
656
|
+
- `executing-tasks` → `pwk-executing-tasks`
|
|
657
|
+
- `finalizing` → `pwk-finalizing`
|
|
658
|
+
|
|
659
|
+
4. In `docs/developer-usage-guide.md`, update all `/skill:` references:
|
|
660
|
+
- `/skill:brainstorming` → `/skill:pwk-brainstorming`
|
|
661
|
+
- `/skill:writing-plans` → `/skill:pwk-writing-plans`
|
|
662
|
+
- `/skill:executing-tasks` → `/skill:pwk-executing-tasks`
|
|
663
|
+
- `/skill:finalizing` → `/skill:pwk-finalizing`
|
|
664
|
+
- `/skill:diagnose` → `/skill:pwk-diagnose`
|
|
665
|
+
|
|
666
|
+
5. Verify no old references remain in active docs:
|
|
667
|
+
```
|
|
668
|
+
grep -rn '/skill:brainstorming\|/skill:writing-plans\|/skill:executing-tasks\|/skill:finalizing\|/skill:design-review\|/skill:verify\|/skill:diagnose' docs/workflow-phases.md docs/oversight-model.md docs/developer-usage-guide.md | grep -v 'pwk-'
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
Expected: empty (no matches).
|
|
672
|
+
|
|
673
|
+
6. Lessons — none.
|
|
674
|
+
|
|
675
|
+
⏸ **CHECKPOINT: done** — present implementation review. Wait for human approval before committing.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Progress: Incremental Workflow & Skill Rename
|
|
2
|
+
|
|
3
|
+
Plan: docs/plans/2026-06-09-incremental-workflow-and-rename-implementation.md
|
|
4
|
+
Branch: incremental-workflow-and-rename
|
|
5
|
+
Started: 2026-06-09T00:00:00Z
|
|
6
|
+
Last updated: 2026-06-09T00:00:00Z
|
|
7
|
+
|
|
8
|
+
| # | Status | Task | Commit |
|
|
9
|
+
|---|--------|------|--------|
|
|
10
|
+
| 1 | ✅ done | Rename skill directories | d83b39f |
|
|
11
|
+
| 2 | ✅ done | Update frontmatter names in all skills | 27eb7b4 |
|
|
12
|
+
| 3 | ✅ done | Update cross-references in all skills <!-- checkpoint: done --> | 6b913fc |
|
|
13
|
+
| 4 | ✅ done | Add feature table to brainstorming and update after-design section <!-- checkpoint: done --> | 2d49010 |
|
|
14
|
+
| 5 | ✅ done | Update writing-plans for feature-at-a-time <!-- checkpoint: done --> | ebbb884 |
|
|
15
|
+
| 6 | ✅ done | Update executing-tasks for feature loop and verify prompts <!-- checkpoint: done --> | 95938d1 |
|
|
16
|
+
| 7 | ✅ done | Update design-review to read plan doc alongside design doc | 95938d1 |
|
|
17
|
+
| 8 | ✅ done | Update workflow-guard extension and tests <!-- checkpoint: done --> | d31e083 |
|
|
18
|
+
| 9 | ✅ done | Update documentation files <!-- checkpoint: done --> | b2e69a1 |
|