@pi-unipi/workflow 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -5
- package/commands.ts +138 -8
- package/package.json +1 -1
- package/skills/auto/SKILL.md +340 -41
- package/skills/chore-create/SKILL.md +313 -0
- package/skills/chore-execute/SKILL.md +312 -0
- package/skills/debug/SKILL.md +224 -0
- package/skills/fix/SKILL.md +210 -0
- package/skills/quick-fix/SKILL.md +133 -0
- package/skills/quick-work/SKILL.md +3 -3
- package/skills/research/SKILL.md +251 -0
- package/skills/scan-issues/SKILL.md +14 -2
package/skills/auto/SKILL.md
CHANGED
|
@@ -5,15 +5,15 @@ description: "Full pipeline — brainstorm → plan → work → review → merg
|
|
|
5
5
|
|
|
6
6
|
# Auto Pipeline
|
|
7
7
|
|
|
8
|
-
Run the complete development pipeline from idea to merged code.
|
|
8
|
+
Run the complete development pipeline from idea to merged code. This skill is self-contained — it includes all the logic needed to execute each phase without loading other skills.
|
|
9
9
|
|
|
10
10
|
## Command Format
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
/unipi:auto <
|
|
13
|
+
/unipi:auto <string(greedy)>(optional) plan:<path>(optional) specs:<path>(optional)
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
- `
|
|
16
|
+
- `string(greedy)` — what to build (triggers full pipeline from brainstorm)
|
|
17
17
|
- `plan:<path>` — existing plan to execute (skips brainstorm + plan, starts at work)
|
|
18
18
|
- `specs:<path>` — existing spec to plan from (skips brainstorm, starts at plan)
|
|
19
19
|
- No args → ask user what to do
|
|
@@ -24,7 +24,7 @@ Run the complete development pipeline from idea to merged code.
|
|
|
24
24
|
brainstorm → plan → work → review → merge
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Each
|
|
27
|
+
Each phase must complete before the next begins. User can intervene at any gate.
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
@@ -32,14 +32,14 @@ Each stage hands off to the next automatically. User can intervene at any gate.
|
|
|
32
32
|
|
|
33
33
|
Based on args:
|
|
34
34
|
|
|
35
|
-
**If `
|
|
36
|
-
→ Start at
|
|
35
|
+
**If `string(greedy)` provided (no plan/specs):**
|
|
36
|
+
→ Start at Phase 2 (Brainstorm). Full pipeline.
|
|
37
37
|
|
|
38
38
|
**If `specs:<path>` provided (no plan):**
|
|
39
|
-
→ Start at
|
|
39
|
+
→ Start at Phase 3 (Plan). Skip brainstorm.
|
|
40
40
|
|
|
41
41
|
**If `plan:<path>` provided:**
|
|
42
|
-
→ Start at
|
|
42
|
+
→ Start at Phase 4 (Work). Skip brainstorm + plan.
|
|
43
43
|
|
|
44
44
|
**If no args:**
|
|
45
45
|
→ Ask user:
|
|
@@ -52,61 +52,346 @@ Based on args:
|
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
55
|
-
## Phase 2: Brainstorm
|
|
55
|
+
## Phase 2: Brainstorm
|
|
56
56
|
|
|
57
|
-
1
|
|
58
|
-
2. Run full brainstorm flow — explore, question, design, write spec
|
|
59
|
-
3. Wait for user approval at design gate
|
|
60
|
-
4. On approval → proceed to plan
|
|
57
|
+
### 2.1: Explore Context
|
|
61
58
|
|
|
62
|
-
|
|
59
|
+
1. Run read-only commands to understand current state:
|
|
60
|
+
```
|
|
61
|
+
find . -type f -name "*.ts" | head -20
|
|
62
|
+
ls -la src/
|
|
63
|
+
cat package.json
|
|
64
|
+
git log --oneline -10
|
|
65
|
+
```
|
|
66
|
+
2. Identify relevant files and patterns
|
|
67
|
+
3. Note existing conventions
|
|
63
68
|
|
|
69
|
+
### 2.2: Ask Clarifying Questions
|
|
70
|
+
|
|
71
|
+
Ask **one question at a time**:
|
|
72
|
+
1. "What problem are we actually solving?"
|
|
73
|
+
2. "Who has this problem and when?"
|
|
74
|
+
3. "What does success look like?"
|
|
75
|
+
|
|
76
|
+
Prefer multiple choice when natural options exist.
|
|
77
|
+
|
|
78
|
+
### 2.3: Propose Approaches
|
|
79
|
+
|
|
80
|
+
Propose 2-3 approaches with trade-offs:
|
|
81
|
+
- What each optimizes for (speed, flexibility, simplicity)
|
|
82
|
+
- What each costs (complexity, maintenance, time)
|
|
83
|
+
- Recommendation with reasoning
|
|
84
|
+
|
|
85
|
+
Present conversationally. Ask user to choose.
|
|
86
|
+
|
|
87
|
+
### 2.4: Design
|
|
88
|
+
|
|
89
|
+
Once approach chosen, present design in sections:
|
|
90
|
+
- Architecture / components
|
|
91
|
+
- Data flow
|
|
92
|
+
- Error handling
|
|
93
|
+
- Testing approach
|
|
94
|
+
|
|
95
|
+
Ask after each section if it looks right.
|
|
96
|
+
|
|
97
|
+
### 2.5: Write Spec
|
|
98
|
+
|
|
99
|
+
Create `.unipi/docs/specs/YYYY-MM-DD-<topic>-design.md`:
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
---
|
|
103
|
+
title: "{Topic}"
|
|
104
|
+
type: brainstorm
|
|
105
|
+
date: YYYY-MM-DD
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
# {Topic}
|
|
109
|
+
|
|
110
|
+
## Problem Statement
|
|
111
|
+
{The actual problem, reframed}
|
|
112
|
+
|
|
113
|
+
## Context
|
|
114
|
+
{Key findings from exploration}
|
|
115
|
+
|
|
116
|
+
## Chosen Approach
|
|
117
|
+
{High-level description}
|
|
118
|
+
|
|
119
|
+
## Why This Approach
|
|
120
|
+
{Decision rationale, alternatives rejected}
|
|
121
|
+
|
|
122
|
+
## Design
|
|
123
|
+
{Architecture, components, data flow}
|
|
124
|
+
|
|
125
|
+
## Implementation Checklist
|
|
126
|
+
- [ ] Task 1 — description
|
|
127
|
+
- [ ] Task 2 — description
|
|
128
|
+
- [ ] Task 3 — description
|
|
129
|
+
|
|
130
|
+
## Open Questions
|
|
131
|
+
{Questions for planning phase}
|
|
132
|
+
|
|
133
|
+
## Out of Scope
|
|
134
|
+
{Explicitly excluded}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 2.6: Self-Review
|
|
138
|
+
|
|
139
|
+
Before presenting:
|
|
140
|
+
1. Any "TBD", "TODO", incomplete sections? Fix them.
|
|
141
|
+
2. Do sections contradict each other?
|
|
142
|
+
3. Could any requirement be interpreted two ways? Pick one.
|
|
143
|
+
|
|
144
|
+
### 2.7: Design Gate
|
|
145
|
+
|
|
146
|
+
> "Spec written to `.unipi/docs/specs/YYYY-MM-DD-<topic>-design.md`. Please review and let me know if you want changes before we plan."
|
|
147
|
+
|
|
148
|
+
**WAIT for user approval.** If changes requested, make them and re-review.
|
|
149
|
+
|
|
150
|
+
**Exit:** User approves design. Proceed to Phase 3.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Phase 3: Plan
|
|
155
|
+
|
|
156
|
+
### 3.1: Load Spec
|
|
157
|
+
|
|
158
|
+
1. Read the spec file (from Phase 2 or from `specs:` arg)
|
|
159
|
+
2. Understand: problem, approach, design, checklist
|
|
160
|
+
|
|
161
|
+
### 3.2: Ask Clarifying Questions
|
|
162
|
+
|
|
163
|
+
1. Review spec critically — identify concerns or gaps
|
|
164
|
+
2. If concerns: raise with user before proceeding
|
|
165
|
+
3. Ask about work branch:
|
|
166
|
+
|
|
167
|
+
> "Where should this work happen?"
|
|
168
|
+
> 1. **Main branch** — work directly on main (small/medium tasks, low risk)
|
|
169
|
+
> 2. **New branch** — isolated worktree (larger tasks, risky changes)
|
|
170
|
+
|
|
171
|
+
Record the decision for plan frontmatter.
|
|
172
|
+
|
|
173
|
+
### 3.3: Create Implementation Plan
|
|
174
|
+
|
|
175
|
+
Create `.unipi/docs/plans/YYYY-MM-DD-<topic>-plan.md`:
|
|
176
|
+
|
|
177
|
+
```markdown
|
|
178
|
+
---
|
|
179
|
+
title: "{Topic} — Implementation Plan"
|
|
180
|
+
type: plan
|
|
181
|
+
date: YYYY-MM-DD
|
|
182
|
+
workbranch: {branch-name} # empty string = work on main branch
|
|
183
|
+
specs:
|
|
184
|
+
- path/to/spec.md
|
|
64
185
|
---
|
|
65
186
|
|
|
66
|
-
|
|
187
|
+
# {Topic} — Implementation Plan
|
|
188
|
+
|
|
189
|
+
## Overview
|
|
190
|
+
{Brief summary of what this plan covers}
|
|
191
|
+
|
|
192
|
+
## Tasks
|
|
193
|
+
|
|
194
|
+
- unstarted: Task 1 — {Task Name}
|
|
195
|
+
- Description: {What needs to be done}
|
|
196
|
+
- Dependencies: {None, or list of tasks}
|
|
197
|
+
- Acceptance Criteria: {How to verify done}
|
|
198
|
+
- Steps:
|
|
199
|
+
1. {Concrete step}
|
|
200
|
+
2. {Concrete step}
|
|
201
|
+
|
|
202
|
+
- unstarted: Task 2 — {Task Name}
|
|
203
|
+
- Description: ...
|
|
204
|
+
- Dependencies: ...
|
|
205
|
+
- Acceptance Criteria: ...
|
|
206
|
+
- Steps: ...
|
|
207
|
+
|
|
208
|
+
## Sequencing
|
|
209
|
+
{Order of execution, dependency graph if complex}
|
|
210
|
+
|
|
211
|
+
## Risks
|
|
212
|
+
{Potential blockers or concerns}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Task Status Lifecycle:**
|
|
216
|
+
| Status | Meaning |
|
|
217
|
+
|--------|----------|
|
|
218
|
+
| `unstarted:` | Not started |
|
|
219
|
+
| `in-progress:` | Being worked on |
|
|
220
|
+
| `completed:` | Done and verified |
|
|
221
|
+
| `failed:` | Attempted but failed |
|
|
222
|
+
| `awaiting_user:` | Needs user action |
|
|
223
|
+
| `blocked:` | Waiting on dependency |
|
|
224
|
+
| `skipped:` | Intentionally not doing |
|
|
225
|
+
|
|
226
|
+
### 3.4: Update Spec Checkboxes
|
|
227
|
+
|
|
228
|
+
After plan is complete:
|
|
229
|
+
1. Read the source spec
|
|
230
|
+
2. For each checklist item covered by this plan, mark `[x]`
|
|
231
|
+
3. Leave items not covered as `[ ]`
|
|
232
|
+
4. Write updated spec back
|
|
233
|
+
|
|
234
|
+
**Semantics:** Spec `[x]` means "planned" (covered by a plan). It does NOT mean "done".
|
|
235
|
+
|
|
236
|
+
### 3.5: Self-Review
|
|
67
237
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
238
|
+
- [ ] Every task has clear acceptance criteria
|
|
239
|
+
- [ ] Dependencies are correct (no circular, no missing)
|
|
240
|
+
- [ ] Steps are bite-sized (agent can follow without guessing)
|
|
241
|
+
- [ ] Plan is focused enough for single work session
|
|
72
242
|
|
|
73
|
-
|
|
243
|
+
### 3.6: Plan Gate
|
|
244
|
+
|
|
245
|
+
Present plan summary to user.
|
|
246
|
+
|
|
247
|
+
**WAIT for user approval.** If changes requested, make them.
|
|
248
|
+
|
|
249
|
+
**Exit:** User approves plan. Proceed to Phase 4.
|
|
74
250
|
|
|
75
251
|
---
|
|
76
252
|
|
|
77
|
-
## Phase 4: Work
|
|
253
|
+
## Phase 4: Work
|
|
254
|
+
|
|
255
|
+
### 4.1: Setup
|
|
78
256
|
|
|
79
257
|
1. Read `workbranch` from plan frontmatter
|
|
80
|
-
2. If `workbranch` non-empty
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
258
|
+
2. If `workbranch` non-empty:
|
|
259
|
+
- Create worktree: `git worktree add .unipi/worktrees/{branch} -b {branch}`
|
|
260
|
+
- Work within worktree directory
|
|
261
|
+
3. If `workbranch` empty:
|
|
262
|
+
- Work directly on current branch (main)
|
|
263
|
+
|
|
264
|
+
### 4.2: Execute Tasks
|
|
265
|
+
|
|
266
|
+
For each task in order, skip `completed:`, `skipped:`, and `awaiting_user:` tasks:
|
|
267
|
+
|
|
268
|
+
**If `unstarted:`:**
|
|
269
|
+
1. Change `unstarted:` to `in-progress:` in plan
|
|
270
|
+
2. Follow each step exactly (plan has bite-sized steps)
|
|
271
|
+
3. Run verifications as specified in acceptance criteria
|
|
272
|
+
4. Change `in-progress:` to `completed:` when complete
|
|
273
|
+
5. Update plan file with progress
|
|
274
|
+
|
|
275
|
+
**If `in-progress:`:**
|
|
276
|
+
1. Continue from where it left off
|
|
277
|
+
2. Follow remaining steps
|
|
278
|
+
3. Change to `completed:` when done
|
|
279
|
+
|
|
280
|
+
**If `failed:`:**
|
|
281
|
+
1. Read failure notes
|
|
282
|
+
2. Investigate root cause
|
|
283
|
+
3. Fix and re-verify
|
|
284
|
+
4. Change to `completed:` when fixed, or keep `failed:` if still broken
|
|
285
|
+
|
|
286
|
+
**If `awaiting_user:`:**
|
|
287
|
+
1. Remind user what's needed
|
|
288
|
+
2. Wait for user response
|
|
289
|
+
3. Resume when user provides input
|
|
290
|
+
|
|
291
|
+
**If `blocked:`:**
|
|
292
|
+
1. Check if blocker is resolved
|
|
293
|
+
2. If resolved → change to `unstarted:` and continue
|
|
294
|
+
3. If still blocked → skip and move to next task
|
|
295
|
+
|
|
296
|
+
### 4.3: When to Stop and Ask
|
|
297
|
+
|
|
298
|
+
**STOP immediately when:**
|
|
299
|
+
- Hit blocker (missing dependency, test fails, instruction unclear)
|
|
300
|
+
- Plan has critical gaps
|
|
301
|
+
- You don't understand an instruction
|
|
302
|
+
- Verification fails repeatedly
|
|
303
|
+
|
|
304
|
+
Ask for clarification rather than guessing.
|
|
305
|
+
|
|
306
|
+
### 4.4: Commit Progress
|
|
307
|
+
|
|
308
|
+
After each task or group of tasks:
|
|
309
|
+
1. Stage changes
|
|
310
|
+
2. Commit with descriptive message referencing task name
|
|
311
|
+
3. Continue to next task
|
|
312
|
+
|
|
313
|
+
Don't wait until end to commit — incremental commits are safer.
|
|
314
|
+
|
|
315
|
+
### 4.5: Work Complete
|
|
86
316
|
|
|
87
|
-
|
|
317
|
+
When all tasks are `completed:`:
|
|
318
|
+
1. Run final verification (tests, lint, build)
|
|
319
|
+
2. Commit all remaining changes
|
|
320
|
+
|
|
321
|
+
**Exit:** All tasks complete. Proceed to Phase 5.
|
|
88
322
|
|
|
89
323
|
---
|
|
90
324
|
|
|
91
325
|
## Phase 5: Review
|
|
92
326
|
|
|
93
|
-
1
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
327
|
+
### 5.1: Setup
|
|
328
|
+
|
|
329
|
+
1. Read `workbranch` from plan frontmatter
|
|
330
|
+
2. If `workbranch` exists and not empty → switch to that branch/worktree
|
|
331
|
+
3. If `workbranch` missing or empty → review on current branch (main)
|
|
332
|
+
|
|
333
|
+
### 5.2: Check Task Completion
|
|
334
|
+
|
|
335
|
+
For each task in plan:
|
|
336
|
+
1. Read acceptance criteria
|
|
337
|
+
2. Verify against actual implementation
|
|
338
|
+
3. Determine status:
|
|
339
|
+
- **Done** — all criteria met → `completed:`
|
|
340
|
+
- **Partially Done X/Y** — some steps complete, others not
|
|
341
|
+
- **Unstarted** — nothing done
|
|
342
|
+
- **Failed** — attempted but broken
|
|
343
|
+
|
|
344
|
+
### 5.3: Run Codebase Checks
|
|
345
|
+
|
|
346
|
+
Run project's verification suite:
|
|
347
|
+
1. **Lint** — `npm run lint` or equivalent
|
|
348
|
+
2. **Type check** — `tsc --noEmit` or equivalent
|
|
349
|
+
3. **Tests** — `npm test` or equivalent
|
|
350
|
+
4. **Build** — `npm run build` or equivalent
|
|
351
|
+
5. **Docker** — `docker build .` if Dockerfile exists
|
|
352
|
+
|
|
353
|
+
Report results. If any fail:
|
|
354
|
+
- Note which checks failed
|
|
355
|
+
- Identify which tasks are affected
|
|
356
|
+
|
|
357
|
+
### 5.4: Write Reviewer Remarks
|
|
358
|
+
|
|
359
|
+
Add `REVIEWER-REMARK` at the **end of the plan document**, behind a divider:
|
|
360
|
+
|
|
361
|
+
```markdown
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## Reviewer Remarks
|
|
365
|
+
|
|
366
|
+
REVIEWER-REMARK: Done
|
|
367
|
+
- All tasks complete, verified against acceptance criteria
|
|
368
|
+
|
|
369
|
+
Codebase Checks:
|
|
370
|
+
- ✓ Lint passed
|
|
371
|
+
- ✓ Type check passed
|
|
372
|
+
- ✓ Tests passed
|
|
373
|
+
- ✓ Build passed
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### 5.5: Review Gate
|
|
377
|
+
|
|
378
|
+
**If all tasks done and checks pass:**
|
|
379
|
+
→ Proceed to Phase 6
|
|
98
380
|
|
|
99
|
-
**If
|
|
100
|
-
|
|
381
|
+
**If tasks incomplete or checks fail:**
|
|
382
|
+
> "Tasks remaining and/or checks failing. Continuing back to work phase."
|
|
383
|
+
→ Go back to Phase 4 with failure context
|
|
101
384
|
|
|
102
|
-
**
|
|
385
|
+
**Exit:** All checks pass. Reviewer remarks say Done. Proceed to Phase 6.
|
|
103
386
|
|
|
104
387
|
---
|
|
105
388
|
|
|
106
389
|
## Phase 6: Merge (if worktree)
|
|
107
390
|
|
|
391
|
+
### 6.1: Check Branch Strategy
|
|
392
|
+
|
|
108
393
|
If `workbranch` was set (worktree):
|
|
109
|
-
1. Load worktree-merge
|
|
394
|
+
1. Load worktree-merge logic
|
|
110
395
|
2. Merge worktree branch back to main
|
|
111
396
|
3. Clean up worktree and branch
|
|
112
397
|
4. Run final verification on main
|
|
@@ -125,8 +410,8 @@ Report pipeline results:
|
|
|
125
410
|
```
|
|
126
411
|
Pipeline Complete: {topic}
|
|
127
412
|
|
|
128
|
-
✓ Brainstorm — {spec
|
|
129
|
-
✓ Plan — {plan
|
|
413
|
+
✓ Brainstorm — .unipi/docs/specs/{spec}
|
|
414
|
+
✓ Plan — .unipi/docs/plans/{plan}
|
|
130
415
|
✓ Work — {N} tasks completed on {branch or "main"}
|
|
131
416
|
✓ Review — all checks passed
|
|
132
417
|
✓ Merge — {merged to main, worktree cleaned or "already on main"}
|
|
@@ -157,10 +442,24 @@ Example:
|
|
|
157
442
|
|
|
158
443
|
---
|
|
159
444
|
|
|
445
|
+
## Coexist Triggers
|
|
446
|
+
|
|
447
|
+
When packages are present, auto pipeline enhances:
|
|
448
|
+
|
|
449
|
+
| Package | Enhancement |
|
|
450
|
+
|---------|-------------|
|
|
451
|
+
| `@unipi/ask-user` | Use `ask_user` for decision gates |
|
|
452
|
+
| `@unipi/subagents` | Parallel task execution in work phase |
|
|
453
|
+
| `@unipi/mcp` | MCP tools available throughout |
|
|
454
|
+
| `@unipi/web-api` | Web research in brainstorm phase |
|
|
455
|
+
| `@unipi/ralph` | Ralph loop for 3+ tasks in work phase |
|
|
456
|
+
|
|
457
|
+
---
|
|
458
|
+
|
|
160
459
|
## Notes
|
|
161
460
|
|
|
162
|
-
-
|
|
461
|
+
- This skill is self-contained — no need to load other skills
|
|
163
462
|
- Gates between phases ensure user oversight
|
|
164
463
|
- Pipeline is resumable — can restart from any phase
|
|
165
|
-
- Worktree isolation protects main branch (skipped for small tasks
|
|
464
|
+
- Worktree isolation protects main branch (skipped for small tasks)
|
|
166
465
|
- Auto command has `full` sandbox — all tools available
|