devtronic 1.0.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 +61 -0
- package/dist/chunk-B6Q6YVID.js +728 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4214 -0
- package/dist/plugin-JTDPHWUF.js +18 -0
- package/package.json +70 -0
- package/templates/antigravity/.agents/rules/architecture.md +31 -0
- package/templates/antigravity/.agents/rules/quality.md +44 -0
- package/templates/claude-code/.claude/agents/architecture-checker.md +142 -0
- package/templates/claude-code/.claude/agents/code-reviewer.md +73 -0
- package/templates/claude-code/.claude/agents/commit-changes.md +74 -0
- package/templates/claude-code/.claude/agents/dependency-checker.md +112 -0
- package/templates/claude-code/.claude/agents/doc-sync.md +99 -0
- package/templates/claude-code/.claude/agents/error-investigator.md +142 -0
- package/templates/claude-code/.claude/agents/quality-runner.md +123 -0
- package/templates/claude-code/.claude/agents/test-generator.md +114 -0
- package/templates/claude-code/.claude/rules/architecture.md +257 -0
- package/templates/claude-code/.claude/rules/quality.md +103 -0
- package/templates/claude-code/.claude/skills/audit/SKILL.md +426 -0
- package/templates/claude-code/.claude/skills/audit/report-template.md +137 -0
- package/templates/claude-code/.claude/skills/backlog/SKILL.md +231 -0
- package/templates/claude-code/.claude/skills/brief/SKILL.md +425 -0
- package/templates/claude-code/.claude/skills/briefing/SKILL.md +172 -0
- package/templates/claude-code/.claude/skills/checkpoint/SKILL.md +284 -0
- package/templates/claude-code/.claude/skills/create-plan/SKILL.md +446 -0
- package/templates/claude-code/.claude/skills/create-skill/SKILL.md +245 -0
- package/templates/claude-code/.claude/skills/execute-plan/SKILL.md +398 -0
- package/templates/claude-code/.claude/skills/generate-tests/SKILL.md +358 -0
- package/templates/claude-code/.claude/skills/generate-tests/test-patterns.md +349 -0
- package/templates/claude-code/.claude/skills/handoff/SKILL.md +178 -0
- package/templates/claude-code/.claude/skills/investigate/SKILL.md +376 -0
- package/templates/claude-code/.claude/skills/learn/SKILL.md +231 -0
- package/templates/claude-code/.claude/skills/opensrc/SKILL.md +104 -0
- package/templates/claude-code/.claude/skills/post-review/SKILL.md +437 -0
- package/templates/claude-code/.claude/skills/quick/SKILL.md +188 -0
- package/templates/claude-code/.claude/skills/recap/SKILL.md +190 -0
- package/templates/claude-code/.claude/skills/research/SKILL.md +450 -0
- package/templates/claude-code/.claude/skills/scaffold/SKILL.md +281 -0
- package/templates/claude-code/.claude/skills/scaffold/bootstrap-commands.md +104 -0
- package/templates/claude-code/.claude/skills/scaffold/examples-backend.md +105 -0
- package/templates/claude-code/.claude/skills/scaffold/examples-frontend.md +197 -0
- package/templates/claude-code/.claude/skills/scaffold/examples-spa-ddd.md +667 -0
- package/templates/claude-code/.claude/skills/scaffold/structures.md +236 -0
- package/templates/claude-code/.claude/skills/setup/SKILL.md +227 -0
- package/templates/claude-code/.claude/skills/spec/SKILL.md +235 -0
- package/templates/claude-code/.claude/skills/summary/SKILL.md +279 -0
- package/templates/claude-code/.claude/skills/worktree/SKILL.md +266 -0
- package/templates/cursor/.cursor/rules/architecture.mdc +36 -0
- package/templates/cursor/.cursor/rules/quality.mdc +49 -0
- package/templates/github-copilot/.github/copilot-instructions.md +40 -0
- package/templates/opencode/.opencode/rules/architecture.md +31 -0
- package/templates/opencode/.opencode/rules/quality.md +44 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: backlog
|
|
3
|
+
description: Manage the issue backlog. Add, prioritize, start work, complete, and cleanup items. Keeps the file manageable with automatic limits.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, AskUserQuestion
|
|
5
|
+
argument-hint: "[add|move|cleanup] [args]"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Backlog - Issue Management
|
|
9
|
+
|
|
10
|
+
Manages `thoughts/BACKLOG.md` efficiently, keeping the file clean and manageable. Parse `$ARGUMENTS` for the subcommand (add, move, cleanup) and its arguments.
|
|
11
|
+
|
|
12
|
+
## Files
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
thoughts/BACKLOG.md # Active backlog
|
|
16
|
+
thoughts/archive/backlog/ # Archived items
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Cleanup Rules
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
25
|
+
│ AUTOMATIC CLEANUP (check on every /backlog interaction) │
|
|
26
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
27
|
+
│ │
|
|
28
|
+
│ ✅ Completed: Maximum 5 items │
|
|
29
|
+
│ → Archive oldest when adding 6th │
|
|
30
|
+
│ │
|
|
31
|
+
│ 🔄 In Progress: Maximum 3 items │
|
|
32
|
+
│ → Don't start new work if 3 in progress │
|
|
33
|
+
│ │
|
|
34
|
+
│ 📋 Total Backlog: Maximum 20 items │
|
|
35
|
+
│ → Force prioritization/cleanup before adding new │
|
|
36
|
+
│ │
|
|
37
|
+
│ ⏰ Stale Items: > 30 days without movement │
|
|
38
|
+
│ → Prompt to review, reprioritize, or remove │
|
|
39
|
+
│ │
|
|
40
|
+
│ 📦 Monthly Archive: 1st of each month │
|
|
41
|
+
│ → Archive all completed items │
|
|
42
|
+
│ │
|
|
43
|
+
│ 🗑️ Archive Retention: > 6 months │
|
|
44
|
+
│ → Purge archives older than 6 months │
|
|
45
|
+
│ │
|
|
46
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Cleanup Check (run on every interaction)
|
|
50
|
+
|
|
51
|
+
Before executing any `/backlog` command:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
1. Count completed items → if > 5: archive oldest
|
|
55
|
+
2. Count total items → if > 20: prompt cleanup before proceeding
|
|
56
|
+
3. Check dates → if any item > 30 days stale: notify user
|
|
57
|
+
4. Check archive folder → if files > 6 months old: prompt purge
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Commands
|
|
63
|
+
|
|
64
|
+
### View backlog
|
|
65
|
+
```
|
|
66
|
+
/backlog
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Add item
|
|
70
|
+
```
|
|
71
|
+
/backlog add "Title of item"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Move item
|
|
75
|
+
```
|
|
76
|
+
/backlog move BACK-XXX high|medium|low|progress|done
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Cleanup
|
|
80
|
+
```
|
|
81
|
+
/backlog cleanup
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Item Structure
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
### [BACK-042] Feature title
|
|
90
|
+
- **Type**: feature | bug | tech-debt | improvement
|
|
91
|
+
- **Priority**: high | medium | low
|
|
92
|
+
- **Description**: Brief description
|
|
93
|
+
- **Success criteria**: How we know it's done
|
|
94
|
+
- **Docs**:
|
|
95
|
+
- Spec: thoughts/specs/BACK-042_feature.md
|
|
96
|
+
- Plan: thoughts/plans/BACK-042_feature.md
|
|
97
|
+
- **Added**: 2026-02-05
|
|
98
|
+
- **Completed**: 2026-02-05 (PR #234)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## BACKLOG.md Template
|
|
104
|
+
|
|
105
|
+
```markdown
|
|
106
|
+
# Backlog
|
|
107
|
+
|
|
108
|
+
Last updated: YYYY-MM-DD
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 🔄 In Progress
|
|
113
|
+
|
|
114
|
+
### [BACK-042] Current feature
|
|
115
|
+
- **Type**: feature
|
|
116
|
+
- **Started**: 2026-01-28
|
|
117
|
+
- **Description**: What we're building
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 🔴 High Priority
|
|
122
|
+
|
|
123
|
+
### [BACK-045] Critical bug
|
|
124
|
+
- **Type**: bug
|
|
125
|
+
- **Description**: What's broken
|
|
126
|
+
- **Added**: 2026-01-20
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 🟡 Medium Priority
|
|
131
|
+
|
|
132
|
+
### [BACK-046] Improvement
|
|
133
|
+
- **Type**: improvement
|
|
134
|
+
- **Description**: What to improve
|
|
135
|
+
- **Added**: 2026-01-15
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 🟢 Low Priority
|
|
140
|
+
|
|
141
|
+
### [BACK-047] Nice to have
|
|
142
|
+
- **Type**: feature
|
|
143
|
+
- **Description**: Future idea
|
|
144
|
+
- **Added**: 2026-01-10
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## ✅ Recently Completed
|
|
149
|
+
|
|
150
|
+
### [BACK-041] Previous feature
|
|
151
|
+
- **Type**: feature
|
|
152
|
+
- **Completed**: 2026-01-25 (PR #230)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Workflow Integration
|
|
158
|
+
|
|
159
|
+
### During /spec or /create-plan
|
|
160
|
+
|
|
161
|
+
If something out of scope is discovered:
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
"I noticed [X] needs work but it's out of scope.
|
|
165
|
+
Add to backlog?"
|
|
166
|
+
→ Yes: Create item with reference to current plan
|
|
167
|
+
→ No: Continue without recording
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Starting work
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
User: "I want to work on notifications"
|
|
174
|
+
|
|
175
|
+
1. Read BACKLOG.md
|
|
176
|
+
2. Find related item
|
|
177
|
+
3. If exists: "Found BACK-042. Work on this?"
|
|
178
|
+
4. Move to "In Progress"
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Completing work
|
|
182
|
+
|
|
183
|
+
After successful `/post-review`:
|
|
184
|
+
|
|
185
|
+
1. Move item to "Completed"
|
|
186
|
+
2. Add date and PR reference
|
|
187
|
+
3. Run cleanup check
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## ID Generation
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
BACK-XXX where XXX is sequential (zero-padded 3 digits)
|
|
195
|
+
|
|
196
|
+
To get next ID:
|
|
197
|
+
1. Find highest number in BACKLOG.md
|
|
198
|
+
2. Check archive/backlog/*.md
|
|
199
|
+
3. Use max + 1
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Archive Format
|
|
205
|
+
|
|
206
|
+
`thoughts/archive/backlog/YYYY-MM.md`:
|
|
207
|
+
|
|
208
|
+
```markdown
|
|
209
|
+
# Backlog Archive - 2026-01
|
|
210
|
+
|
|
211
|
+
Completed items from January 2026.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Archived Items
|
|
216
|
+
|
|
217
|
+
### [BACK-001] Initial setup
|
|
218
|
+
- **Completed**: 2026-01-15
|
|
219
|
+
- **PR**: #45
|
|
220
|
+
- **Notes**: Base project configuration
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Tips
|
|
226
|
+
|
|
227
|
+
1. **One item = one scope** - If too big, split it
|
|
228
|
+
2. **Review weekly** - Reprioritize as needed
|
|
229
|
+
3. **Don't accumulate** - Cleanup rules help, but stay disciplined
|
|
230
|
+
4. **Link everything** - References to origin and related docs
|
|
231
|
+
5. **Archive freely** - It's there if needed, auto-purged after 6 months
|
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brief
|
|
3
|
+
description: Quick contextual briefing with pre-flight validation. Scans docs, code, git, and runs health checks before starting work.
|
|
4
|
+
allowed-tools: Task, Glob, Grep, Read, Bash
|
|
5
|
+
argument-hint: "[topic]"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Brief - Quick Session Briefing
|
|
9
|
+
|
|
10
|
+
Fast contextual briefing when starting work on a feature. Displays relevant docs, code, and git activity in under 60 seconds.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Starting a new session on existing work
|
|
15
|
+
- Quickly orienting yourself on a feature
|
|
16
|
+
- Checking what exists before `/research` or `/spec`
|
|
17
|
+
- Resuming after a break
|
|
18
|
+
|
|
19
|
+
**Skip for:** Brand new features with no prior work, or when you need deep analysis (use `/research` instead).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Comparison with Other Skills
|
|
24
|
+
|
|
25
|
+
| Skill | Purpose | Creates File | Depth |
|
|
26
|
+
|-------|---------|--------------|-------|
|
|
27
|
+
| `/brief` | Quick briefing at session start | No (display only) | Superficial |
|
|
28
|
+
| `/research` | Deep codebase analysis | Yes | Deep |
|
|
29
|
+
| `/checkpoint` | Save session progress | Yes | State snapshot |
|
|
30
|
+
|
|
31
|
+
**Rule of thumb**: Start with `/brief`, escalate to `/research` if you need more.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Process
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
0. READ PERSISTENT STATE
|
|
39
|
+
├── thoughts/STATE.md (current position)
|
|
40
|
+
└── thoughts/SUMMARY.md (last session recap)
|
|
41
|
+
|
|
42
|
+
0.5. PRE-FLIGHT VALIDATION
|
|
43
|
+
├── Quality scripts exist? (typecheck, lint, test)
|
|
44
|
+
├── Quality passes? (quick run)
|
|
45
|
+
├── Stale state? (STATE.md older than latest commit)
|
|
46
|
+
└── Referenced specs/plans exist?
|
|
47
|
+
|
|
48
|
+
1. PARSE INPUT
|
|
49
|
+
└── Extract keywords + generate synonyms
|
|
50
|
+
|
|
51
|
+
2. PARALLEL SCANS (via subagents)
|
|
52
|
+
├── DOCS: thoughts/specs|plans|checkpoints|research/*keyword*
|
|
53
|
+
├── CODE: Glob + Grep for key files
|
|
54
|
+
└── GIT: Recent commits, branches, PRs
|
|
55
|
+
|
|
56
|
+
3. SYNTHESIZE
|
|
57
|
+
└── Combine into executive briefing
|
|
58
|
+
|
|
59
|
+
4. DISPLAY
|
|
60
|
+
└── Show directly (no file created)
|
|
61
|
+
|
|
62
|
+
5. SUGGEST NEXT STEP
|
|
63
|
+
└── Resume checkpoint, /research, or start implementing
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Step 0: Read Persistent State (ALWAYS first)
|
|
69
|
+
|
|
70
|
+
Before parsing input or launching scans, check for persistent state:
|
|
71
|
+
|
|
72
|
+
1. Read `thoughts/STATE.md` if it exists
|
|
73
|
+
2. Read `thoughts/SUMMARY.md` if it exists
|
|
74
|
+
|
|
75
|
+
### If STATE.md exists:
|
|
76
|
+
|
|
77
|
+
Display prominently at the top of the briefing output:
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
**Current State** (from STATE.md):
|
|
82
|
+
- **Active Feature**: [from file]
|
|
83
|
+
- **Workflow Position**: [e.g., "implementing Phase 2"]
|
|
84
|
+
- **Branch**: [from file]
|
|
85
|
+
- **Blockers**: [from file or "None"]
|
|
86
|
+
|
|
87
|
+
**Last Session** (from SUMMARY.md):
|
|
88
|
+
[What was done + what's pending]
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
[Then continue with regular scan results...]
|
|
93
|
+
|
|
94
|
+
### If neither file exists:
|
|
95
|
+
|
|
96
|
+
Proceed with normal flow. At the end suggest:
|
|
97
|
+
> No persistent state found. Run `/checkpoint` after this session to enable session continuity.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Step 0.5: Pre-Flight Validation
|
|
102
|
+
|
|
103
|
+
Run quick health checks **in parallel** before diving into topic scans. This catches problems early so you don't discover broken builds mid-implementation.
|
|
104
|
+
|
|
105
|
+
### Checks to Run
|
|
106
|
+
|
|
107
|
+
Launch these checks in parallel (via Bash tool):
|
|
108
|
+
|
|
109
|
+
#### 1. Quality Scripts Exist
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Check package.json has the expected scripts
|
|
113
|
+
node -e "const p=require('./package.json'); const s=p.scripts||{}; const checks=['typecheck','lint','test'].map(k=>({name:k,exists:!!s[k]})); console.log(JSON.stringify(checks))"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
#### 2. Quality Passes (quick run)
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Detect PM and run quality checks
|
|
120
|
+
# Use the project's quality command from CLAUDE.md, or fall back:
|
|
121
|
+
<pm> run typecheck 2>&1 | tail -5
|
|
122
|
+
<pm> run lint 2>&1 | tail -5
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Skip `test` in pre-flight (too slow). Only run typecheck + lint.
|
|
126
|
+
|
|
127
|
+
#### 3. Stale State Detection
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Compare STATE.md timestamp with latest commit
|
|
131
|
+
git log -1 --format="%ci" 2>/dev/null
|
|
132
|
+
stat -f "%Sm" thoughts/STATE.md 2>/dev/null || echo "no STATE.md"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
If STATE.md is older than the latest commit on the current branch, flag it:
|
|
136
|
+
> ⚠ STATE.md may be stale (last commit is newer). Consider running `/checkpoint` after this session.
|
|
137
|
+
|
|
138
|
+
#### 4. Referenced Files Exist
|
|
139
|
+
|
|
140
|
+
If STATE.md references an `Active Plan` path, verify the file exists. If it doesn't:
|
|
141
|
+
> ⚠ Active plan referenced in STATE.md not found: `thoughts/plans/[file].md`
|
|
142
|
+
|
|
143
|
+
### Pre-Flight Output
|
|
144
|
+
|
|
145
|
+
Display as a compact block before the main briefing:
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
## Pre-Flight
|
|
149
|
+
|
|
150
|
+
| Check | Status |
|
|
151
|
+
|-------|--------|
|
|
152
|
+
| typecheck | ✅ Pass |
|
|
153
|
+
| lint | ✅ Pass |
|
|
154
|
+
| State freshness | ✅ Current |
|
|
155
|
+
| Referenced files | ✅ All found |
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Or with issues:
|
|
159
|
+
|
|
160
|
+
```markdown
|
|
161
|
+
## Pre-Flight
|
|
162
|
+
|
|
163
|
+
| Check | Status |
|
|
164
|
+
|-------|--------|
|
|
165
|
+
| typecheck | ❌ 3 errors |
|
|
166
|
+
| lint | ✅ Pass |
|
|
167
|
+
| State freshness | ⚠️ Stale |
|
|
168
|
+
| Referenced files | ⚠️ Missing plan |
|
|
169
|
+
|
|
170
|
+
> Fix type errors before starting. Run: `<pm> run typecheck`
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### When to Skip Pre-Flight
|
|
174
|
+
|
|
175
|
+
- If the user passes `--skip-preflight` in arguments
|
|
176
|
+
- If no `package.json` exists (not a Node project — skip quality checks)
|
|
177
|
+
- Still check state freshness and referenced files regardless
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Step 1: Parse Input
|
|
182
|
+
|
|
183
|
+
Parse the user's input from `$ARGUMENTS` to extract the main topic and any qualifiers:
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
Input: "telemetry sync"
|
|
187
|
+
Topic: telemetry
|
|
188
|
+
Qualifier: sync (narrows search)
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Model Selection
|
|
194
|
+
|
|
195
|
+
Before spawning Task subagents, check `thoughts/CONFIG.md` for model profile:
|
|
196
|
+
|
|
197
|
+
| Profile | Subagent model | Description |
|
|
198
|
+
|---------|---------------|-------------|
|
|
199
|
+
| quality | opus | Highest quality, most expensive |
|
|
200
|
+
| balanced | sonnet | Good balance (default) |
|
|
201
|
+
| budget | haiku | Fastest, cheapest |
|
|
202
|
+
|
|
203
|
+
If no CONFIG.md or no `profile:` line, default to **balanced** (sonnet for subagents).
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Step 2: Parallel Scans
|
|
208
|
+
|
|
209
|
+
Launch 3 parallel investigations using Task tool:
|
|
210
|
+
|
|
211
|
+
### Scan A: Documentation
|
|
212
|
+
|
|
213
|
+
```markdown
|
|
214
|
+
**Task**: Find documentation about [TOPIC]
|
|
215
|
+
|
|
216
|
+
Search these locations:
|
|
217
|
+
- thoughts/specs/*[keyword]*
|
|
218
|
+
- thoughts/plans/*[keyword]*
|
|
219
|
+
- thoughts/checkpoints/*[keyword]*
|
|
220
|
+
- thoughts/research/*[keyword]*
|
|
221
|
+
- thoughts/notes/*[keyword]*
|
|
222
|
+
- docs/*[keyword]*
|
|
223
|
+
|
|
224
|
+
Return: File paths with 1-line summary of each
|
|
225
|
+
Limit: Max 5 most recent/relevant docs
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Scan B: Code
|
|
229
|
+
|
|
230
|
+
```markdown
|
|
231
|
+
**Task**: Find code related to [TOPIC]
|
|
232
|
+
|
|
233
|
+
1. Glob for files: **/*[keyword]*.{ts,tsx,js,jsx,py,rs,go}
|
|
234
|
+
2. Grep for keywords in src/, apps/, packages/
|
|
235
|
+
3. Identify key files by import frequency
|
|
236
|
+
|
|
237
|
+
Return: File paths with purpose
|
|
238
|
+
Limit: Max 15 files, prioritize by relevance
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Scan C: Git Activity
|
|
242
|
+
|
|
243
|
+
```markdown
|
|
244
|
+
**Task**: Find git activity for [TOPIC]
|
|
245
|
+
|
|
246
|
+
1. Recent commits: git log --oneline --all --grep="[keyword]" -15
|
|
247
|
+
2. Branches: git branch -a | grep -i [keyword]
|
|
248
|
+
3. Recent PRs: gh pr list --search "[keyword]" --state all --limit 5
|
|
249
|
+
|
|
250
|
+
Return: Commit hashes, branch names, PR numbers
|
|
251
|
+
Limit: Max 15 commits, 5 branches, 5 PRs
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Step 3: Synthesize
|
|
257
|
+
|
|
258
|
+
Combine findings into brief sections. Keep it scannable.
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Step 4: Display Output
|
|
263
|
+
|
|
264
|
+
Display directly in conversation (DO NOT create a file):
|
|
265
|
+
|
|
266
|
+
```markdown
|
|
267
|
+
# Brief: [Topic]
|
|
268
|
+
|
|
269
|
+
## Summary
|
|
270
|
+
|
|
271
|
+
[2-3 sentences: what exists, current state, last activity]
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Documentation Found
|
|
276
|
+
|
|
277
|
+
| Type | File | Last Modified | Summary |
|
|
278
|
+
|------|------|---------------|---------|
|
|
279
|
+
| Spec | `thoughts/specs/auth-spec.md` | 2024-01-15 | OAuth2 implementation spec |
|
|
280
|
+
| Plan | `thoughts/plans/auth-plan.md` | 2024-01-16 | Implementation plan |
|
|
281
|
+
| Checkpoint | `thoughts/checkpoints/2024-01-18_auth.md` | 2024-01-18 | Paused at token refresh |
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## Key Code Files
|
|
286
|
+
|
|
287
|
+
| File | Purpose |
|
|
288
|
+
|------|---------|
|
|
289
|
+
| `src/auth/AuthProvider.tsx` | Main auth context |
|
|
290
|
+
| `src/auth/useAuth.ts` | Auth hook |
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Git Activity
|
|
295
|
+
|
|
296
|
+
**Recent commits** (last 7 days):
|
|
297
|
+
- `a1b2c3d` feat: add JWT refresh logic
|
|
298
|
+
- `e4f5g6h` fix: session expiry bug
|
|
299
|
+
|
|
300
|
+
**Active branches**:
|
|
301
|
+
- `feature/auth-oauth`
|
|
302
|
+
- `fix/auth-token-refresh`
|
|
303
|
+
|
|
304
|
+
**Open PRs**:
|
|
305
|
+
- #123: OAuth2 implementation (draft)
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## Next Steps
|
|
310
|
+
|
|
311
|
+
Based on findings:
|
|
312
|
+
|
|
313
|
+
1. **Resume checkpoint**: `thoughts/checkpoints/2024-01-18_auth.md`
|
|
314
|
+
```
|
|
315
|
+
Continue from checkpoint. Next step: implement token refresh.
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
2. **Or start fresh**: The spec and plan exist, ready to implement.
|
|
319
|
+
|
|
320
|
+
3. **Need more depth?** Run `/research [topic]` for deep analysis.
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## Limits
|
|
326
|
+
|
|
327
|
+
Keep output scannable:
|
|
328
|
+
|
|
329
|
+
| Category | Max Items |
|
|
330
|
+
|----------|-----------|
|
|
331
|
+
| Docs | 5 |
|
|
332
|
+
| Code files | 15 |
|
|
333
|
+
| Commits | 15 |
|
|
334
|
+
| Branches | 5 |
|
|
335
|
+
| PRs | 5 |
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## Edge Cases
|
|
340
|
+
|
|
341
|
+
### No Results Found
|
|
342
|
+
|
|
343
|
+
```markdown
|
|
344
|
+
# Brief: [Topic]
|
|
345
|
+
|
|
346
|
+
## Summary
|
|
347
|
+
|
|
348
|
+
No existing documentation, code, or git activity found for "[topic]".
|
|
349
|
+
|
|
350
|
+
## Next Steps
|
|
351
|
+
|
|
352
|
+
This appears to be new work. Recommended flow:
|
|
353
|
+
|
|
354
|
+
1. `/spec [topic]` - Define requirements
|
|
355
|
+
2. `/research [topic]` - Investigate similar patterns
|
|
356
|
+
3. `/create-plan [topic]` - Create implementation plan
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
### Too Many Results
|
|
360
|
+
|
|
361
|
+
If initial scan returns >50 hits, ask user to narrow:
|
|
362
|
+
|
|
363
|
+
```markdown
|
|
364
|
+
Found 150+ files matching "user". Please be more specific:
|
|
365
|
+
|
|
366
|
+
- "user authentication" - Login/session related
|
|
367
|
+
- "user profile" - Profile/settings related
|
|
368
|
+
- "user management" - Admin/CRUD related
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### Checkpoint Found
|
|
372
|
+
|
|
373
|
+
If a checkpoint exists, prioritize it:
|
|
374
|
+
|
|
375
|
+
```markdown
|
|
376
|
+
# Brief: [Topic]
|
|
377
|
+
|
|
378
|
+
## Active Checkpoint Found
|
|
379
|
+
|
|
380
|
+
`thoughts/checkpoints/2024-01-18_14-30_auth.md`
|
|
381
|
+
|
|
382
|
+
**Status**: Work in progress
|
|
383
|
+
**Last**: Token refresh implementation
|
|
384
|
+
**Next**: Handle edge case for expired tokens
|
|
385
|
+
|
|
386
|
+
**Recommended**: Resume from this checkpoint
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
---
|
|
390
|
+
|
|
391
|
+
## Tips
|
|
392
|
+
|
|
393
|
+
1. **Start broad, narrow if needed** - "auth" first, then "auth token refresh"
|
|
394
|
+
2. **Check for checkpoints first** - They contain actionable next steps
|
|
395
|
+
3. **Use for orientation, not analysis** - Deep dives need `/research`
|
|
396
|
+
4. **No file created** - This is display-only, context stays in conversation
|
|
397
|
+
5. **Fast turnaround** - Should complete in 30-60 seconds
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Examples
|
|
402
|
+
|
|
403
|
+
### Basic Usage
|
|
404
|
+
|
|
405
|
+
```
|
|
406
|
+
/brief authentication
|
|
407
|
+
/brief notifications
|
|
408
|
+
/brief user management
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### With Specificity
|
|
412
|
+
|
|
413
|
+
```
|
|
414
|
+
/brief OAuth token refresh
|
|
415
|
+
/brief notification preferences API
|
|
416
|
+
/brief user role permissions
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### After Long Break
|
|
420
|
+
|
|
421
|
+
```
|
|
422
|
+
/brief [feature I was working on last week]
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
Then follow up with checkpoint resume if one exists.
|