@pi-unipi/workflow 0.1.0
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 +130 -0
- package/commands.ts +281 -0
- package/index.ts +155 -0
- package/package.json +44 -0
- package/skills/brainstorm/SKILL.md +202 -0
- package/skills/consolidate/SKILL.md +142 -0
- package/skills/consultant/SKILL.md +97 -0
- package/skills/document/SKILL.md +120 -0
- package/skills/gather-context/SKILL.md +122 -0
- package/skills/plan/SKILL.md +169 -0
- package/skills/quick-work/SKILL.md +110 -0
- package/skills/review-work/SKILL.md +131 -0
- package/skills/scan-issues/SKILL.md +183 -0
- package/skills/work/SKILL.md +144 -0
- package/skills/worktree-create/SKILL.md +69 -0
- package/skills/worktree-list/SKILL.md +67 -0
- package/skills/worktree-merge/SKILL.md +98 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan
|
|
3
|
+
description: "Strategic planning — create implementation plan from brainstorm specs. Tasks, dependencies, acceptance criteria."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Planning From Specs
|
|
7
|
+
|
|
8
|
+
Turn brainstorm decisions into an actionable implementation plan.
|
|
9
|
+
|
|
10
|
+
## Boundaries
|
|
11
|
+
|
|
12
|
+
**This skill MAY:** read specs, read codebase, ask questions, write plan document, update brainstorm checkboxes.
|
|
13
|
+
**This skill MAY NOT:** edit code, implement anything, run tests, deploy.
|
|
14
|
+
|
|
15
|
+
**NEVER write code during this skill. This is planning, not implementation.**
|
|
16
|
+
|
|
17
|
+
## Command Format
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/unipi:plan specs:<path>(multiple,optional) <string(greedy)>(optional)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- `specs:<path>` — one or more brainstorm specs to plan from (auto-suggested)
|
|
24
|
+
- `string(greedy)` — optional scope guidance (e.g., "focus on API layer only")
|
|
25
|
+
- If no specs provided → agent asks user which spec to plan from
|
|
26
|
+
- Runs in current session, read-only sandbox + write to `.unipi/docs/`
|
|
27
|
+
|
|
28
|
+
## Sandbox
|
|
29
|
+
|
|
30
|
+
- **Read:** full codebase access for context
|
|
31
|
+
- **Write:** only `.unipi/docs/` directory
|
|
32
|
+
|
|
33
|
+
## Output Path
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
.unipi/docs/plans/YYYY-MM-DD-<topic>-plan.md
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Committed to current branch.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Phase 1: Load Specs
|
|
44
|
+
|
|
45
|
+
1. If `specs:` arg provided, read those spec files
|
|
46
|
+
2. If not provided, list available specs in `.unipi/docs/specs/` and ask user to choose
|
|
47
|
+
3. Read the spec(s) fully — understand problem, approach, design, checklist
|
|
48
|
+
|
|
49
|
+
**Exit:** Spec(s) loaded. Understand what to plan.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Phase 2: Review & Ask
|
|
54
|
+
|
|
55
|
+
1. Review spec critically — identify concerns or gaps
|
|
56
|
+
2. If concerns: raise with user before proceeding
|
|
57
|
+
3. If `string(greedy)` provided: use it to scope planning (e.g., "focus on auth only")
|
|
58
|
+
4. Ask clarifying questions if needed (one at a time)
|
|
59
|
+
|
|
60
|
+
**Exit:** No blockers. Ready to plan.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Phase 3: Create Implementation Plan
|
|
65
|
+
|
|
66
|
+
Structure the plan with heart of gold style:
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
---
|
|
70
|
+
title: "{Topic} — Implementation Plan"
|
|
71
|
+
type: plan
|
|
72
|
+
date: YYYY-MM-DD
|
|
73
|
+
specs:
|
|
74
|
+
- path/to/spec.md
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
# {Topic} — Implementation Plan
|
|
78
|
+
|
|
79
|
+
## Overview
|
|
80
|
+
{Brief summary of what this plan covers}
|
|
81
|
+
|
|
82
|
+
## Tasks
|
|
83
|
+
|
|
84
|
+
### Task 1: {Task Name}
|
|
85
|
+
**Description:** {What needs to be done}
|
|
86
|
+
**Dependencies:** {None, or list of tasks}
|
|
87
|
+
**Acceptance Criteria:** {How to verify done}
|
|
88
|
+
**Steps:**
|
|
89
|
+
1. {Concrete step}
|
|
90
|
+
2. {Concrete step}
|
|
91
|
+
|
|
92
|
+
### Task 2: {Task Name}
|
|
93
|
+
...
|
|
94
|
+
|
|
95
|
+
## Sequencing
|
|
96
|
+
{Order of execution, dependency graph if complex}
|
|
97
|
+
|
|
98
|
+
## Risks
|
|
99
|
+
{Potential blockers or concerns}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Task Guidelines
|
|
103
|
+
|
|
104
|
+
- Each task should be **discrete and completable** in one session
|
|
105
|
+
- **Dependencies** must be explicit — task B can't start before task A
|
|
106
|
+
- **Acceptance criteria** must be verifiable — not "looks good" but "tests pass, builds clean"
|
|
107
|
+
- **Steps** are bite-sized — agent can follow without guessing
|
|
108
|
+
- Order tasks by dependency (foundational work first)
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Phase 4: Update Brainstorm Checkboxes
|
|
113
|
+
|
|
114
|
+
After plan is complete:
|
|
115
|
+
|
|
116
|
+
1. Read the source brainstorm spec(s)
|
|
117
|
+
2. For each checklist item covered by this plan, mark `[x]`
|
|
118
|
+
3. Leave items not covered as `[ ]`
|
|
119
|
+
4. Write updated spec back
|
|
120
|
+
|
|
121
|
+
**Example:**
|
|
122
|
+
```markdown
|
|
123
|
+
## Implementation Checklist
|
|
124
|
+
- [x] Set up auth middleware — covered in Task 1
|
|
125
|
+
- [x] Create login endpoint — covered in Task 2
|
|
126
|
+
- [ ] Add OAuth support — deferred to next plan
|
|
127
|
+
- [ ] Rate limiting — out of scope
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
This creates the link between brainstorm and plan — plan covers some items, others remain for future plans.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Phase 5: Review Plan
|
|
135
|
+
|
|
136
|
+
Self-check before presenting:
|
|
137
|
+
|
|
138
|
+
- [ ] Every task has clear acceptance criteria
|
|
139
|
+
- [ ] Dependencies are correct (no circular, no missing)
|
|
140
|
+
- [ ] Steps are bite-sized (agent can follow without guessing)
|
|
141
|
+
- [ ] Brainstorm checkboxes updated correctly
|
|
142
|
+
- [ ] String greedy scope respected (if provided)
|
|
143
|
+
- [ ] Plan is focused enough for single `/unipi:work` session
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Phase 6: Present & Handoff
|
|
148
|
+
|
|
149
|
+
Present plan summary to user. Then ask:
|
|
150
|
+
|
|
151
|
+
1. **Proceed to /unipi:work** — Start implementing in a worktree
|
|
152
|
+
2. **Revise plan** — Adjust tasks or scope
|
|
153
|
+
3. **Done for now** — Return later
|
|
154
|
+
|
|
155
|
+
If user selects "Proceed to /unipi:work", suggest:
|
|
156
|
+
```
|
|
157
|
+
/unipi:work worktree:feat/<branch-name> specs:YYYY-MM-DD-<topic>-plan
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Recommend starting a **new session** for work — it will switch pi's internal worktree.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Resumability
|
|
165
|
+
|
|
166
|
+
If user runs `/unipi:plan` on an existing plan:
|
|
167
|
+
1. Read the plan
|
|
168
|
+
2. Check what's already marked done
|
|
169
|
+
3. Ask user if they want to add tasks, modify existing, or plan new scope
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quick-work
|
|
3
|
+
description: "Fast single-task execution — one shot, done. Use for small tasks that don't need full brainstorm/plan/work flow."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Quick Work
|
|
7
|
+
|
|
8
|
+
Execute a single task directly. No brainstorm, no plan — just do it and record what happened.
|
|
9
|
+
|
|
10
|
+
## Boundaries
|
|
11
|
+
|
|
12
|
+
**This skill MAY:** read/write code, run tests, commit, write summary to `.unipi/quick-work/`.
|
|
13
|
+
**This skill MAY NOT:** create worktrees, merge branches, deploy.
|
|
14
|
+
|
|
15
|
+
## Command Format
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/unipi:quick-work <string(greedy)>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- `string(greedy)` — what to do (e.g., "add input validation to login form", "fix the typo in README")
|
|
22
|
+
- Full read/write sandbox
|
|
23
|
+
- One shot — complete the task in this session
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Process
|
|
28
|
+
|
|
29
|
+
### Phase 1: Understand Task
|
|
30
|
+
|
|
31
|
+
1. Read the request
|
|
32
|
+
2. If unclear, ask one clarifying question
|
|
33
|
+
3. Assess scope — is this truly a quick task?
|
|
34
|
+
- If too complex → suggest `/unipi:brainstorm` instead
|
|
35
|
+
- If appropriate → proceed
|
|
36
|
+
|
|
37
|
+
**Exit:** Task understood, scoped appropriately.
|
|
38
|
+
|
|
39
|
+
### Phase 2: Execute
|
|
40
|
+
|
|
41
|
+
1. Find relevant files
|
|
42
|
+
2. Make the changes
|
|
43
|
+
3. Verify (run tests if applicable)
|
|
44
|
+
4. Commit with descriptive message
|
|
45
|
+
|
|
46
|
+
Straightforward — no planning, no discussion, just work.
|
|
47
|
+
|
|
48
|
+
**Exit:** Task complete.
|
|
49
|
+
|
|
50
|
+
### Phase 3: Write Summary
|
|
51
|
+
|
|
52
|
+
Write summary to `.unipi/quick-work/YYYY-MM-DD-<topic>.md`:
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
---
|
|
56
|
+
title: "{Topic}"
|
|
57
|
+
type: quick-work
|
|
58
|
+
date: YYYY-MM-DD
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
# {Topic}
|
|
62
|
+
|
|
63
|
+
## Task
|
|
64
|
+
{What was requested}
|
|
65
|
+
|
|
66
|
+
## Changes
|
|
67
|
+
- {File 1}: {what changed}
|
|
68
|
+
- {File 2}: {what changed}
|
|
69
|
+
|
|
70
|
+
## Verification
|
|
71
|
+
{How it was tested — "ran tests", "manual check", etc.}
|
|
72
|
+
|
|
73
|
+
## Notes
|
|
74
|
+
{Anything worth noting — gotchas, follow-ups, etc.}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Phase 4: Report
|
|
78
|
+
|
|
79
|
+
> "Done. Changes committed. Summary at `.unipi/quick-work/YYYY-MM-DD-<topic>.md`"
|
|
80
|
+
|
|
81
|
+
No further suggestions needed — this was a one-shot task.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## When to Use Quick Work vs Full Flow
|
|
86
|
+
|
|
87
|
+
**Use quick-work for:**
|
|
88
|
+
- Bug fixes (small, clear)
|
|
89
|
+
- Typo corrections
|
|
90
|
+
- Config changes
|
|
91
|
+
- Small feature additions (< 30 min work)
|
|
92
|
+
- Dependency updates
|
|
93
|
+
|
|
94
|
+
**Use full flow (brainstorm/plan/work) for:**
|
|
95
|
+
- New features
|
|
96
|
+
- Architecture changes
|
|
97
|
+
- Multi-file refactors
|
|
98
|
+
- Anything with design decisions
|
|
99
|
+
- Tasks requiring discussion
|
|
100
|
+
|
|
101
|
+
When in doubt, start with quick-work. If it gets complex, suggest switching to full flow.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Notes
|
|
106
|
+
|
|
107
|
+
- No worktree isolation — works on current branch
|
|
108
|
+
- No planning overhead — direct execution
|
|
109
|
+
- Summary provides record of what was done
|
|
110
|
+
- Task should be completable in one session
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-work
|
|
3
|
+
description: "Review work — check task completion, run lint/build, mark reviewer remarks. Use after /unipi:work completes."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Reviewing Work
|
|
7
|
+
|
|
8
|
+
Review what was built, verify task completion, run codebase checks, add reviewer remarks.
|
|
9
|
+
|
|
10
|
+
## Boundaries
|
|
11
|
+
|
|
12
|
+
**This skill MAY:** read codebase, run checks (lint, build, test, docker), write reviewer remarks to plan docs.
|
|
13
|
+
**This skill MAY NOT:** edit code, implement features, create new files.
|
|
14
|
+
|
|
15
|
+
## Command Format
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/unipi:review-work plan:<path>(optional) <string(greedy)>(optional)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- `plan:<path)` — specific plan to review (auto-suggested)
|
|
22
|
+
- `string(greedy)` — scope (e.g., "only review auth tasks" or "just check builds")
|
|
23
|
+
- If no plan provided → agent finds latest plan or asks user
|
|
24
|
+
- Runs in current session (or worktree session if still active)
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Phase 1: Load Plan
|
|
29
|
+
|
|
30
|
+
1. If `plan:` arg provided, read that plan
|
|
31
|
+
2. If not, list plans in `.unipi/docs/plans/` and ask user
|
|
32
|
+
3. Read plan fully — understand tasks, acceptance criteria, current status
|
|
33
|
+
|
|
34
|
+
**Exit:** Plan loaded. Know what to review.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Phase 2: Check Task Completion
|
|
39
|
+
|
|
40
|
+
For each task in plan:
|
|
41
|
+
|
|
42
|
+
1. Read acceptance criteria
|
|
43
|
+
2. Verify against actual implementation
|
|
44
|
+
3. Determine status:
|
|
45
|
+
- **Done** — all criteria met
|
|
46
|
+
- **Partially Done X/Y** — some steps complete, others not
|
|
47
|
+
- **Unstarted** — nothing done
|
|
48
|
+
|
|
49
|
+
If `string(greedy)` scope provided, only check matching tasks.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Phase 3: Run Codebase Checks
|
|
54
|
+
|
|
55
|
+
Run project's verification suite:
|
|
56
|
+
|
|
57
|
+
1. **Lint** — `npm run lint` or equivalent
|
|
58
|
+
2. **Type check** — `tsc --noEmit` or equivalent
|
|
59
|
+
3. **Tests** — `npm test` or equivalent
|
|
60
|
+
4. **Build** — `npm run build` or equivalent
|
|
61
|
+
5. **Docker** — `docker build .` if Dockerfile exists
|
|
62
|
+
|
|
63
|
+
Report results. If any fail:
|
|
64
|
+
- Note which checks failed
|
|
65
|
+
- Identify which tasks are affected
|
|
66
|
+
- Don't fix — just report
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Phase 4: Write Reviewer Remarks
|
|
71
|
+
|
|
72
|
+
Add `REVIEWER-REMARK` at the **end of the plan document**, behind a divider:
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Reviewer Remarks
|
|
78
|
+
|
|
79
|
+
REVIEWER-REMARK: Partially Done 3/5
|
|
80
|
+
- Tasks 1-3 complete, verified against acceptance criteria
|
|
81
|
+
- Task 4 stuck: API endpoint returns 500, needs investigation
|
|
82
|
+
- Task 5 unstarted: depends on Task 4
|
|
83
|
+
|
|
84
|
+
Codebase Checks:
|
|
85
|
+
- ✓ Lint passed
|
|
86
|
+
- ✓ Type check passed
|
|
87
|
+
- ✗ Tests failed: 2 failing in auth.test.ts
|
|
88
|
+
- ✓ Build passed
|
|
89
|
+
- ✓ Docker build passed
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Status Format
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
REVIEWER-REMARK: <Done | Partially Done X/Y | Unstarted>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Followed by description explaining the status.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Phase 5: Handoff
|
|
103
|
+
|
|
104
|
+
Based on review results:
|
|
105
|
+
|
|
106
|
+
**If all tasks done and checks pass:**
|
|
107
|
+
> "All tasks complete and verified. Ready to consolidate."
|
|
108
|
+
```
|
|
109
|
+
/unipi:consolidate
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**If tasks incomplete or checks fail:**
|
|
113
|
+
> "Tasks remaining and/or checks failing. Continue work?"
|
|
114
|
+
```
|
|
115
|
+
/unipi:work worktree:<branch> specs:<plan-path>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**If scoped review complete:**
|
|
119
|
+
> "Scoped review complete. Run full review or continue work?"
|
|
120
|
+
```
|
|
121
|
+
/unipi:review-work plan:<plan-path> (full review)
|
|
122
|
+
/unipi:work specs:<plan-path> (continue work)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Notes
|
|
128
|
+
|
|
129
|
+
- Reviewer remarks append to end of plan — don't modify existing content
|
|
130
|
+
- Check results are factual — report pass/fail, don't diagnose
|
|
131
|
+
- This is a checkpoint, not a fix pass — work continues via `/unipi:work`
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scan-issues
|
|
3
|
+
description: "Deep investigation — find bugs, anti-patterns, security issues. Spawns subagents if available."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Scanning for Issues
|
|
7
|
+
|
|
8
|
+
Deep investigation of codebase to find bugs, anti-patterns, security issues, and technical debt.
|
|
9
|
+
|
|
10
|
+
## Boundaries
|
|
11
|
+
|
|
12
|
+
**This skill MAY:** read codebase, run read-only analysis commands, spawn subagents, write findings.
|
|
13
|
+
**This skill MAY NOT:** edit code, fix issues, run tests that modify state, deploy.
|
|
14
|
+
|
|
15
|
+
**This is investigation only — not fixing.**
|
|
16
|
+
|
|
17
|
+
## Command Format
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/unipi:scan-issues <string(greedy)>(optional)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- `string(greedy)` — optional scope (e.g., "focus on auth", "check for SQL injection", "find dead code")
|
|
24
|
+
- If not provided → full codebase scan
|
|
25
|
+
- Read-only sandbox
|
|
26
|
+
- Spawns subagents if `@unipi/subagents` extension is installed
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Process
|
|
31
|
+
|
|
32
|
+
### Phase 1: Determine Scope
|
|
33
|
+
|
|
34
|
+
**If scope provided:**
|
|
35
|
+
1. Parse the focus area
|
|
36
|
+
2. Determine scan type:
|
|
37
|
+
- Security scan
|
|
38
|
+
- Bug hunt
|
|
39
|
+
- Anti-pattern detection
|
|
40
|
+
- Tech debt assessment
|
|
41
|
+
- Performance issues
|
|
42
|
+
|
|
43
|
+
**If no scope:**
|
|
44
|
+
1. Ask user what to focus on, or
|
|
45
|
+
2. Run broad scan covering all categories
|
|
46
|
+
|
|
47
|
+
**Exit:** Scope defined.
|
|
48
|
+
|
|
49
|
+
### Phase 2: Deep Investigation
|
|
50
|
+
|
|
51
|
+
If subagents available:
|
|
52
|
+
1. Spawn parallel subagents for different scan types
|
|
53
|
+
2. Each subagent investigates independently
|
|
54
|
+
3. Collect findings from all subagents
|
|
55
|
+
|
|
56
|
+
If no subagents:
|
|
57
|
+
1. Investigate sequentially
|
|
58
|
+
2. Use grep, find, read commands
|
|
59
|
+
3. Build findings incrementally
|
|
60
|
+
|
|
61
|
+
**Scan categories:**
|
|
62
|
+
|
|
63
|
+
**Security:**
|
|
64
|
+
- Hardcoded secrets/credentials
|
|
65
|
+
- SQL injection vulnerabilities
|
|
66
|
+
- XSS vulnerabilities
|
|
67
|
+
- Insecure dependencies
|
|
68
|
+
- Missing input validation
|
|
69
|
+
- Exposed sensitive data
|
|
70
|
+
|
|
71
|
+
**Bugs:**
|
|
72
|
+
- Null/undefined handling
|
|
73
|
+
- Race conditions
|
|
74
|
+
- Error handling gaps
|
|
75
|
+
- Edge cases missed
|
|
76
|
+
- Logic errors
|
|
77
|
+
- Off-by-one errors
|
|
78
|
+
|
|
79
|
+
**Anti-patterns:**
|
|
80
|
+
- Code duplication
|
|
81
|
+
- God objects/functions
|
|
82
|
+
- Circular dependencies
|
|
83
|
+
- Tight coupling
|
|
84
|
+
- Magic numbers/strings
|
|
85
|
+
- Inconsistent patterns
|
|
86
|
+
|
|
87
|
+
**Tech debt:**
|
|
88
|
+
- TODO/FIXME comments
|
|
89
|
+
- Deprecated API usage
|
|
90
|
+
- Outdated dependencies
|
|
91
|
+
- Dead code
|
|
92
|
+
- Missing tests
|
|
93
|
+
- Poor naming
|
|
94
|
+
|
|
95
|
+
**Performance:**
|
|
96
|
+
- N+1 queries
|
|
97
|
+
- Unnecessary re-renders
|
|
98
|
+
- Large bundle imports
|
|
99
|
+
- Missing caching
|
|
100
|
+
- Inefficient algorithms
|
|
101
|
+
|
|
102
|
+
**Exit:** Findings collected.
|
|
103
|
+
|
|
104
|
+
### Phase 3: Categorize & Prioritize
|
|
105
|
+
|
|
106
|
+
Organize findings by severity:
|
|
107
|
+
|
|
108
|
+
**Critical (P0):**
|
|
109
|
+
- Security vulnerabilities
|
|
110
|
+
- Data loss risks
|
|
111
|
+
- Production-breaking bugs
|
|
112
|
+
|
|
113
|
+
**High (P1):**
|
|
114
|
+
- Significant bugs
|
|
115
|
+
- Major anti-patterns
|
|
116
|
+
- Performance bottlenecks
|
|
117
|
+
|
|
118
|
+
**Medium (P2):**
|
|
119
|
+
- Minor bugs
|
|
120
|
+
- Tech debt
|
|
121
|
+
- Code smells
|
|
122
|
+
|
|
123
|
+
**Low (P3):**
|
|
124
|
+
- Style issues
|
|
125
|
+
- Minor improvements
|
|
126
|
+
- Nice-to-haves
|
|
127
|
+
|
|
128
|
+
### Phase 4: Present Findings
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
## Issue Scan Results
|
|
132
|
+
|
|
133
|
+
### Critical (P0)
|
|
134
|
+
- {Finding} — {file:line} — {description}
|
|
135
|
+
|
|
136
|
+
### High (P1)
|
|
137
|
+
- {Finding} — {file:line} — {description}
|
|
138
|
+
|
|
139
|
+
### Medium (P2)
|
|
140
|
+
- {Finding} — {file:line} — {description}
|
|
141
|
+
|
|
142
|
+
### Low (P3)
|
|
143
|
+
- {Finding} — {file:line} — {description}
|
|
144
|
+
|
|
145
|
+
### Summary
|
|
146
|
+
- Total issues: {count}
|
|
147
|
+
- Critical: {count}
|
|
148
|
+
- High: {count}
|
|
149
|
+
- Medium: {count}
|
|
150
|
+
- Low: {count}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Phase 5: Handoff
|
|
154
|
+
|
|
155
|
+
Based on findings:
|
|
156
|
+
|
|
157
|
+
**If critical issues found:**
|
|
158
|
+
> "Critical issues found. Recommend addressing immediately."
|
|
159
|
+
```
|
|
160
|
+
/unipi:quick-work "fix critical security issue in auth.ts"
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**If many issues:**
|
|
164
|
+
> "Multiple issues found. Consider planning a cleanup sprint."
|
|
165
|
+
```
|
|
166
|
+
/unipi:brainstorm "tech debt cleanup plan"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**If few/no issues:**
|
|
170
|
+
> "Codebase looks healthy. No critical issues found."
|
|
171
|
+
```
|
|
172
|
+
/unipi:consolidate
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Notes
|
|
178
|
+
|
|
179
|
+
- Investigation only — findings are reported, not fixed
|
|
180
|
+
- Subagent support enables parallel scanning when available
|
|
181
|
+
- Can focus on specific categories or scan broadly
|
|
182
|
+
- Prioritized findings help triage what to fix first
|
|
183
|
+
- Natural lead-in to quick-work (for critical) or brainstorm (for planned cleanup)
|