@pi-unipi/workflow 0.1.8 → 0.1.11

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.
@@ -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
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: scan-issues
3
- description: "Deep investigation — find bugs, anti-patterns, security issues. Spawns subagents if available."
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
- Deep investigation of codebase to find bugs, anti-patterns, security issues, and technical debt.
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` |