@pi-unipi/workflow 0.1.7 → 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 +162 -13
- package/package.json +2 -2
- package/skills/auto/SKILL.md +465 -0
- 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/plan/SKILL.md +25 -9
- 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/review-work/SKILL.md +22 -2
- package/skills/scan-issues/SKILL.md +14 -2
- package/skills/work/SKILL.md +38 -24
- package/skills/worktree-merge/SKILL.md +2 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: research
|
|
3
|
+
description: "Read-only research with bash access. Deep codebase investigation, documentation review, external research."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Research
|
|
7
|
+
|
|
8
|
+
Deep read-only investigation with bash access. For thorough codebase analysis, documentation review, and external research.
|
|
9
|
+
|
|
10
|
+
## Boundaries
|
|
11
|
+
|
|
12
|
+
**This skill MAY:** read codebase, run read-only bash commands, spawn subagents, write findings, use web tools if available.
|
|
13
|
+
**This skill MAY NOT:** edit code, create files (except findings), run tests that modify state, deploy.
|
|
14
|
+
|
|
15
|
+
**This is research only — not implementation.**
|
|
16
|
+
|
|
17
|
+
## Command Format
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/unipi:research <string(greedy)>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- `string(greedy)` — research topic or question
|
|
24
|
+
- Read-only sandbox + bash access
|
|
25
|
+
- Spawns subagents if `@unipi/subagents` extension is installed
|
|
26
|
+
- Uses web tools if `@unipi/web-api` extension is installed
|
|
27
|
+
|
|
28
|
+
## Output
|
|
29
|
+
|
|
30
|
+
Findings presented in conversation. Can be saved to `.unipi/docs/generated/` if user requests.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Process
|
|
35
|
+
|
|
36
|
+
### Phase 1: Define Research Scope
|
|
37
|
+
|
|
38
|
+
1. Read the research topic/question
|
|
39
|
+
2. If ambiguous, ask clarifying questions (one at a time)
|
|
40
|
+
3. Determine research type:
|
|
41
|
+
- **Codebase research** — patterns, architecture, dependencies
|
|
42
|
+
- **Documentation research** — existing docs, READMEs, comments
|
|
43
|
+
- **External research** — libraries, APIs, best practices
|
|
44
|
+
- **Historical research** — git history, past decisions
|
|
45
|
+
- **Comparative research** — evaluate options/approaches
|
|
46
|
+
|
|
47
|
+
**Exit:** Research scope defined.
|
|
48
|
+
|
|
49
|
+
### Phase 2: Codebase Research
|
|
50
|
+
|
|
51
|
+
Use bash and read tools for deep investigation:
|
|
52
|
+
|
|
53
|
+
**Structure Analysis:**
|
|
54
|
+
```bash
|
|
55
|
+
find . -type f -name "*.ts" | head -50
|
|
56
|
+
ls -la src/
|
|
57
|
+
tree src/ -L 2
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Pattern Search:**
|
|
61
|
+
```bash
|
|
62
|
+
grep -r "pattern" --include="*.ts" .
|
|
63
|
+
grep -rn "TODO\|FIXME\|HACK" --include="*.ts" .
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Dependency Analysis:**
|
|
67
|
+
```bash
|
|
68
|
+
cat package.json
|
|
69
|
+
grep -r "import.*from" --include="*.ts" . | sort | uniq -c | sort -rn
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Git History:**
|
|
73
|
+
```bash
|
|
74
|
+
git log --oneline -20
|
|
75
|
+
git log --all --oneline --grep="keyword"
|
|
76
|
+
git blame file.ts
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Exit:** Codebase context gathered.
|
|
80
|
+
|
|
81
|
+
### Phase 3: Documentation Research
|
|
82
|
+
|
|
83
|
+
1. Read existing documentation:
|
|
84
|
+
- README files
|
|
85
|
+
- API docs
|
|
86
|
+
- Architecture docs
|
|
87
|
+
- Comments and docstrings
|
|
88
|
+
|
|
89
|
+
2. Check for gaps:
|
|
90
|
+
- Missing documentation
|
|
91
|
+
- Outdated docs
|
|
92
|
+
- Inconsistent information
|
|
93
|
+
|
|
94
|
+
3. Cross-reference:
|
|
95
|
+
- Do docs match code?
|
|
96
|
+
- Are examples correct?
|
|
97
|
+
|
|
98
|
+
**Exit:** Documentation context gathered.
|
|
99
|
+
|
|
100
|
+
### Phase 4: External Research (if web tools available)
|
|
101
|
+
|
|
102
|
+
Use web tools for external research:
|
|
103
|
+
|
|
104
|
+
**Library/API Research:**
|
|
105
|
+
```
|
|
106
|
+
web_search(query: "library-name documentation")
|
|
107
|
+
web_read(url: "https://docs.library.com")
|
|
108
|
+
web_llm_summarize(url: "https://library.com/guide", prompt: "Extract key concepts and usage patterns")
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Best Practices:**
|
|
112
|
+
```
|
|
113
|
+
web_search(query: "best practices for X in TypeScript 2026")
|
|
114
|
+
web_search(query: "X vs Y comparison")
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Stack Overflow / GitHub:**
|
|
118
|
+
```
|
|
119
|
+
web_search(query: "site:stackoverflow.com how to X")
|
|
120
|
+
web_search(query: "site:github.com X implementation examples")
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Exit:** External context gathered.
|
|
124
|
+
|
|
125
|
+
### Phase 5: Synthesize Findings
|
|
126
|
+
|
|
127
|
+
Organize research into clear categories:
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
## Research Findings: {Topic}
|
|
131
|
+
|
|
132
|
+
### Summary
|
|
133
|
+
{One-paragraph overview of findings}
|
|
134
|
+
|
|
135
|
+
### Key Findings
|
|
136
|
+
1. {Finding 1}
|
|
137
|
+
2. {Finding 2}
|
|
138
|
+
3. {Finding 3}
|
|
139
|
+
|
|
140
|
+
### Detailed Analysis
|
|
141
|
+
|
|
142
|
+
#### {Category 1}
|
|
143
|
+
{Detailed findings with evidence}
|
|
144
|
+
|
|
145
|
+
#### {Category 2}
|
|
146
|
+
{Detailed findings with evidence}
|
|
147
|
+
|
|
148
|
+
### Codebase Context
|
|
149
|
+
- Current implementation: {description}
|
|
150
|
+
- Patterns used: {list}
|
|
151
|
+
- Gaps identified: {list}
|
|
152
|
+
|
|
153
|
+
### Recommendations
|
|
154
|
+
- {Recommendation 1}
|
|
155
|
+
- {Recommendation 2}
|
|
156
|
+
|
|
157
|
+
### Sources
|
|
158
|
+
- {File/code references}
|
|
159
|
+
- {External links}
|
|
160
|
+
- {Documentation references}
|
|
161
|
+
|
|
162
|
+
### Open Questions
|
|
163
|
+
- {Question that needs further research}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Phase 6: Present & Handoff
|
|
167
|
+
|
|
168
|
+
Present findings to user:
|
|
169
|
+
|
|
170
|
+
> "Research complete on: {topic}"
|
|
171
|
+
|
|
172
|
+
Then suggest next steps based on findings:
|
|
173
|
+
|
|
174
|
+
**If research was for planning:**
|
|
175
|
+
> "Ready to brainstorm solutions?"
|
|
176
|
+
```
|
|
177
|
+
/unipi:brainstorm {topic}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**If research found issues:**
|
|
181
|
+
> "Found some issues during research. Consider investigating:"
|
|
182
|
+
```
|
|
183
|
+
/unipi:debug {issue}
|
|
184
|
+
/unipi:scan-issues focus on {area}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**If research was for documentation:**
|
|
188
|
+
> "Ready to document what we found?"
|
|
189
|
+
```
|
|
190
|
+
/unipi:document {topic}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**If research was exploratory:**
|
|
194
|
+
> "Want me to save these findings?"
|
|
195
|
+
- Save to `.unipi/docs/generated/YYYY-MM-DD-research-{topic}.md`
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Research Types
|
|
200
|
+
|
|
201
|
+
### Codebase Research
|
|
202
|
+
- Find patterns and conventions
|
|
203
|
+
- Understand architecture
|
|
204
|
+
- Map dependencies
|
|
205
|
+
- Identify tech debt
|
|
206
|
+
|
|
207
|
+
### Documentation Research
|
|
208
|
+
- Review existing docs
|
|
209
|
+
- Find gaps and inconsistencies
|
|
210
|
+
- Extract best practices
|
|
211
|
+
- Cross-reference with code
|
|
212
|
+
|
|
213
|
+
### External Research
|
|
214
|
+
- Library evaluation
|
|
215
|
+
- API documentation
|
|
216
|
+
- Best practices
|
|
217
|
+
- Community solutions
|
|
218
|
+
|
|
219
|
+
### Historical Research
|
|
220
|
+
- Git history analysis
|
|
221
|
+
- Past decision context
|
|
222
|
+
- Evolution of codebase
|
|
223
|
+
- Bug pattern analysis
|
|
224
|
+
|
|
225
|
+
### Comparative Research
|
|
226
|
+
- Evaluate alternatives
|
|
227
|
+
- Trade-off analysis
|
|
228
|
+
- Performance comparison
|
|
229
|
+
- Feature comparison
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Differences from gather-context
|
|
234
|
+
|
|
235
|
+
| Aspect | `/unipi:research` | `/unipi:gather-context` |
|
|
236
|
+
|--------|-------------------|-------------------------|
|
|
237
|
+
| Scope | Broad, any topic | Focused on codebase |
|
|
238
|
+
| Bash access | Full read-only bash | Limited commands |
|
|
239
|
+
| External web | Uses web tools | Codebase only |
|
|
240
|
+
| Output | Detailed findings | Concise summary |
|
|
241
|
+
| Handoff | Various options | Always → brainstorm |
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Notes
|
|
246
|
+
|
|
247
|
+
- Read-only with bash — powerful but safe
|
|
248
|
+
- Web tools integration when available
|
|
249
|
+
- Subagent support for parallel research
|
|
250
|
+
- Findings can be saved to docs if requested
|
|
251
|
+
- Natural lead-in to brainstorm, debug, or document
|
|
@@ -9,7 +9,7 @@ Review what was built, verify task completion, run codebase checks, add reviewer
|
|
|
9
9
|
|
|
10
10
|
## Boundaries
|
|
11
11
|
|
|
12
|
-
**This skill MAY:** read codebase, run checks (lint, build, test, docker), write reviewer remarks to plan docs.
|
|
12
|
+
**This skill MAY:** read codebase, run checks (lint, build, test, docker), write reviewer remarks to plan docs, run bash for git operations (checkout worktree branch).
|
|
13
13
|
**This skill MAY NOT:** edit code, implement features, create new files.
|
|
14
14
|
|
|
15
15
|
## Command Format
|
|
@@ -112,17 +112,37 @@ Followed by description explaining the status.
|
|
|
112
112
|
Based on review results:
|
|
113
113
|
|
|
114
114
|
**If all tasks done and checks pass:**
|
|
115
|
-
|
|
115
|
+
|
|
116
|
+
*If `workbranch` is set (worktree):*
|
|
117
|
+
> "All tasks complete and verified. Ready to merge back to main."
|
|
118
|
+
```
|
|
119
|
+
/unipi:worktree-merge
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
*If `workbranch` is empty (main branch):*
|
|
123
|
+
> "All tasks complete and verified. Changes already on main — no merge needed."
|
|
124
|
+
```
|
|
125
|
+
/unipi:consolidate
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Either way, user can consolidate learnings:
|
|
116
129
|
```
|
|
117
130
|
/unipi:consolidate
|
|
118
131
|
```
|
|
119
132
|
|
|
120
133
|
**If tasks incomplete or checks fail:**
|
|
121
134
|
> "Tasks remaining and/or checks failing. Continue work?"
|
|
135
|
+
|
|
136
|
+
*If `workbranch` is set:*
|
|
122
137
|
```
|
|
123
138
|
/unipi:work worktree:<branch> specs:<plan-path>
|
|
124
139
|
```
|
|
125
140
|
|
|
141
|
+
*If `workbranch` is empty (main):*
|
|
142
|
+
```
|
|
143
|
+
/unipi:work specs:<plan-path>
|
|
144
|
+
```
|
|
145
|
+
|
|
126
146
|
**If scoped review complete:**
|
|
127
147
|
> "Scoped review complete. Run full review or continue work?"
|
|
128
148
|
```
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scan-issues
|
|
3
|
-
description: "
|
|
3
|
+
description: "Passive codebase scan — find potential bugs, anti-patterns, security issues. Spawns subagents if available."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Scanning for Issues
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Passive investigation of codebase to find potential bugs, anti-patterns, security issues, and technical debt.
|
|
9
9
|
|
|
10
10
|
## Boundaries
|
|
11
11
|
|
|
@@ -14,6 +14,8 @@ Deep investigation of codebase to find bugs, anti-patterns, security issues, and
|
|
|
14
14
|
|
|
15
15
|
**This is investigation only — not fixing.**
|
|
16
16
|
|
|
17
|
+
**Note:** For active debugging of specific bugs, use `/unipi:debug` instead. scan-issues finds potential problems; debug diagnoses known issues.
|
|
18
|
+
|
|
17
19
|
## Command Format
|
|
18
20
|
|
|
19
21
|
```
|
|
@@ -181,3 +183,13 @@ Based on findings:
|
|
|
181
183
|
- Can focus on specific categories or scan broadly
|
|
182
184
|
- Prioritized findings help triage what to fix first
|
|
183
185
|
- Natural lead-in to quick-work (for critical) or brainstorm (for planned cleanup)
|
|
186
|
+
|
|
187
|
+
## Differences from debug
|
|
188
|
+
|
|
189
|
+
| Aspect | `/unipi:scan-issues` | `/unipi:debug` |
|
|
190
|
+
|--------|----------------------|----------------|
|
|
191
|
+
| Purpose | Find potential issues | Investigate specific bug |
|
|
192
|
+
| Input | Scope / category | Bug report / error message |
|
|
193
|
+
| Output | Issue list with priorities | Debug report with root cause |
|
|
194
|
+
| Depth | Broad codebase scan | Deep single-issue analysis |
|
|
195
|
+
| Handoff | `/unipi:quick-work` or `/unipi:brainstorm` | `/unipi:fix` |
|
package/skills/work/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: work
|
|
3
|
-
description: "Execute plan — implement
|
|
3
|
+
description: "Execute plan — implement tasks, test, commit on done. Works in worktree or on main branch. Resumable."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Executing Plans
|
|
@@ -9,8 +9,12 @@ Load plan, review critically, execute tasks, commit when complete.
|
|
|
9
9
|
|
|
10
10
|
## Boundaries
|
|
11
11
|
|
|
12
|
-
**This skill MAY:** read/write code
|
|
13
|
-
**This skill MAY NOT:**
|
|
12
|
+
**This skill MAY:** read/write code, read/write `.unipi/docs/`, run tests, commit, create worktree.
|
|
13
|
+
**This skill MAY NOT:** merge branches, deploy.
|
|
14
|
+
|
|
15
|
+
**Worktree vs Main:**
|
|
16
|
+
- If `workbranch` in plan → work within worktree directory
|
|
17
|
+
- If `workbranch` empty → work directly on main branch (current directory)
|
|
14
18
|
|
|
15
19
|
## Command Format
|
|
16
20
|
|
|
@@ -25,32 +29,36 @@ Load plan, review critically, execute tasks, commit when complete.
|
|
|
25
29
|
|
|
26
30
|
## Sandbox
|
|
27
31
|
|
|
28
|
-
- **Read/Write:** full access within worktree
|
|
32
|
+
- **Read/Write:** full access within worktree (or project root if on main)
|
|
29
33
|
- **Write:** `.unipi/docs/` for progress tracking
|
|
30
|
-
- **Cannot:** modify files outside worktree
|
|
31
34
|
|
|
32
35
|
---
|
|
33
36
|
|
|
34
37
|
## Phase 1: Resolve Args
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- "Do you want to work on current branch or create a worktree?"
|
|
40
|
-
- If worktree: "What branch name?" (suggest based on spec topic)
|
|
41
|
-
- Create worktree if not exists
|
|
42
|
-
- **After creating/confirming worktree:** write `workbranch: {branch-name}` to the plan file frontmatter
|
|
43
|
-
|
|
44
|
-
2. **Specs:**
|
|
45
|
-
- List available plans in `.unipi/docs/plans/`
|
|
46
|
-
- "Which plan(s) to execute?"
|
|
39
|
+
1. **Specs:**
|
|
40
|
+
- If `specs:` arg provided, read those plan files
|
|
41
|
+
- If not, list available plans in `.unipi/docs/plans/` and ask user
|
|
47
42
|
- Can select multiple
|
|
48
43
|
|
|
44
|
+
2. **Read `workbranch` from plan frontmatter:**
|
|
45
|
+
- If `workbranch:` is **non-empty** → use that branch/worktree
|
|
46
|
+
- If worktree arg also provided → use worktree arg (override)
|
|
47
|
+
- Create worktree if not exists: `git worktree add .unipi/worktrees/{branch} -b {branch}`
|
|
48
|
+
- Work within worktree directory
|
|
49
|
+
- If `workbranch:` is **empty or missing** → work on current branch (main)
|
|
50
|
+
- No worktree creation needed
|
|
51
|
+
- Edit files directly in project root
|
|
52
|
+
- If neither plan nor args specify branch → ask user:
|
|
53
|
+
> "Where should this work happen?"
|
|
54
|
+
> 1. Current branch (main)
|
|
55
|
+
> 2. New worktree (provide branch name)
|
|
56
|
+
|
|
49
57
|
3. **Scope:**
|
|
50
58
|
- If `string(greedy)` provided, use to scope tasks
|
|
51
59
|
- Otherwise execute all incomplete tasks
|
|
52
60
|
|
|
53
|
-
**Exit:**
|
|
61
|
+
**Exit:** Branch/worktree resolved. Plan(s) loaded. Scope defined.
|
|
54
62
|
|
|
55
63
|
---
|
|
56
64
|
|
|
@@ -134,17 +142,22 @@ When all tasks are `completed:`:
|
|
|
134
142
|
|
|
135
143
|
1. Run final verification (tests, lint, build)
|
|
136
144
|
2. Commit all remaining changes
|
|
137
|
-
3. Inform user:
|
|
138
|
-
|
|
139
|
-
> "All tasks complete. Worktree: `feat/<branch>`. Recommend reviewing before merge."
|
|
145
|
+
3. Inform user based on branch strategy:
|
|
140
146
|
|
|
141
|
-
|
|
147
|
+
**If working in worktree:**
|
|
148
|
+
> "All tasks complete. Worktree: `{branch}`. Recommend reviewing before merge."
|
|
142
149
|
```
|
|
143
150
|
/unipi:review-work plan:<plan-path>
|
|
144
151
|
```
|
|
145
|
-
|
|
146
152
|
**Recommend starting a new session** for review.
|
|
147
153
|
|
|
154
|
+
**If working on main branch:**
|
|
155
|
+
> "All tasks complete. All changes committed directly on main."
|
|
156
|
+
```
|
|
157
|
+
/unipi:review-work plan:<plan-path>
|
|
158
|
+
```
|
|
159
|
+
No merge needed — changes already on main.
|
|
160
|
+
|
|
148
161
|
---
|
|
149
162
|
|
|
150
163
|
## Resumability
|
|
@@ -161,6 +174,7 @@ If user provides scope string, only execute matching tasks.
|
|
|
161
174
|
|
|
162
175
|
## Notes
|
|
163
176
|
|
|
164
|
-
- Agent reads plan
|
|
165
|
-
- Worktree
|
|
177
|
+
- Agent reads plan on start — finds what's incomplete
|
|
178
|
+
- Worktree: changes don't affect main branch until merge (skip for small tasks)
|
|
179
|
+
- Main branch: changes committed directly, no merge needed
|
|
166
180
|
- Each worktree session is independent — no coordination with other worktrees
|
|
@@ -7,6 +7,8 @@ description: "Merge worktree branches back to main. Gathers context from specs/p
|
|
|
7
7
|
|
|
8
8
|
Merge completed worktree branches into main. Gather context from docs before merging.
|
|
9
9
|
|
|
10
|
+
**Note:** Only needed when work was done in a worktree (plan `workbranch` set). If work was on main branch directly, skip this — changes already on main.
|
|
11
|
+
|
|
10
12
|
## Process
|
|
11
13
|
|
|
12
14
|
### Phase 1: Gather Context
|