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,437 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: post-review
|
|
3
|
+
description: Post-feature review before PR. Checks requirements, architecture, quality, and captures lessons. Auto-invoke after completing a plan implementation. Use --strict for senior engineer mode.
|
|
4
|
+
allowed-tools: Read, Grep, Glob, Bash, Edit, Write, Task
|
|
5
|
+
argument-hint: "[--strict|--quick|files...]"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Post-Feature Review
|
|
9
|
+
|
|
10
|
+
Comprehensive review of implemented changes before PR creation. If `$ARGUMENTS` specifies files or flags (--strict, --quick), apply accordingly.
|
|
11
|
+
|
|
12
|
+
## Modes
|
|
13
|
+
|
|
14
|
+
| Mode | Command | Purpose |
|
|
15
|
+
|------|---------|---------|
|
|
16
|
+
| **Standard** | `/post-review` | Full review with lessons learned |
|
|
17
|
+
| **Strict** | `/post-review --strict` | Senior engineer "grill me" mode |
|
|
18
|
+
| **Quick** | `/post-review --quick` | Automated checks only |
|
|
19
|
+
| **Files** | `/post-review src/file.ts` | Review specific files |
|
|
20
|
+
|
|
21
|
+
**Note**: For GitHub PR review, use Claude Code's built-in `/review` command.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## When to Use
|
|
26
|
+
|
|
27
|
+
**Standard mode (default):**
|
|
28
|
+
- After completing a feature implementation
|
|
29
|
+
- After fixing a bug
|
|
30
|
+
- After a refactor
|
|
31
|
+
- Before creating a PR
|
|
32
|
+
|
|
33
|
+
**Strict mode (`--strict`):**
|
|
34
|
+
- Want rigorous challenge on your approach
|
|
35
|
+
- Need to catch subtle issues
|
|
36
|
+
- Preparing for a critical PR
|
|
37
|
+
|
|
38
|
+
**Quick mode (`--quick`):**
|
|
39
|
+
- Small changes
|
|
40
|
+
- Just need automated verification
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Standard Review Workflow
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
48
|
+
│ STANDARD REVIEW │
|
|
49
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
50
|
+
│ │
|
|
51
|
+
│ 1. GATHER CONTEXT │
|
|
52
|
+
│ └── git diff, git log, understand changes │
|
|
53
|
+
│ │
|
|
54
|
+
│ 2. REQUIREMENTS CHECK │
|
|
55
|
+
│ └── Did we deliver what was asked? │
|
|
56
|
+
│ │
|
|
57
|
+
│ 3. ARCHITECTURE CHECK │
|
|
58
|
+
│ └── Clean Architecture, project patterns │
|
|
59
|
+
│ │
|
|
60
|
+
│ 4. QUALITY CHECK │
|
|
61
|
+
│ └── Types, lint, tests passing │
|
|
62
|
+
│ │
|
|
63
|
+
│ 5. CHANGE ANALYSIS │
|
|
64
|
+
│ └── Are changes proportional? │
|
|
65
|
+
│ │
|
|
66
|
+
│ 6. IDENTIFY ISSUES │
|
|
67
|
+
│ └── Bugs, security, performance, maintainability │
|
|
68
|
+
│ │
|
|
69
|
+
│ 7. LESSONS LEARNED │
|
|
70
|
+
│ └── What patterns worked? What didn't? │
|
|
71
|
+
│ │
|
|
72
|
+
│ 8. CLAUDE.MD UPDATE │
|
|
73
|
+
│ └── Add rules to prevent future mistakes │
|
|
74
|
+
│ │
|
|
75
|
+
│ 9. VERDICT │
|
|
76
|
+
│ └── Ready for PR or needs fixes │
|
|
77
|
+
│ │
|
|
78
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Step 1: Gather Context
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# What changed?
|
|
87
|
+
git diff main...HEAD --stat
|
|
88
|
+
|
|
89
|
+
# What commits were made?
|
|
90
|
+
git log main..HEAD --oneline
|
|
91
|
+
|
|
92
|
+
# Full diff
|
|
93
|
+
git diff main...HEAD
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Step 2: Requirements Check (with Done Criteria)
|
|
99
|
+
|
|
100
|
+
### 2a. Find Active Plan
|
|
101
|
+
|
|
102
|
+
Look for the most recent plan file:
|
|
103
|
+
```bash
|
|
104
|
+
ls -t thoughts/plans/*.md 2>/dev/null | head -5
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Also check `thoughts/STATE.md` for an `Active Plan` reference.
|
|
108
|
+
|
|
109
|
+
### 2b. Extract Done Criteria
|
|
110
|
+
|
|
111
|
+
If a plan with `## Done Criteria` is found, extract and validate each criterion:
|
|
112
|
+
|
|
113
|
+
```markdown
|
|
114
|
+
## Done Criteria Validation
|
|
115
|
+
|
|
116
|
+
**Plan**: `thoughts/plans/[file].md`
|
|
117
|
+
|
|
118
|
+
| # | Criterion | Status | Evidence |
|
|
119
|
+
|---|-----------|--------|----------|
|
|
120
|
+
| 1 | [text] | PASS/FAIL | [how verified] |
|
|
121
|
+
| 2 | [text] | PASS/FAIL | [how verified] |
|
|
122
|
+
|
|
123
|
+
**Result**: X/Y criteria met
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### 2c. Fallback (No Plan Found)
|
|
127
|
+
|
|
128
|
+
If no plan with done criteria exists, use the manual requirements checklist:
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
## Requirements Checklist
|
|
132
|
+
|
|
133
|
+
| Requirement | Status | Notes |
|
|
134
|
+
|-------------|--------|-------|
|
|
135
|
+
| [Req 1] | ✅ Done | |
|
|
136
|
+
| [Req 2] | ⚠️ Partial | [what's missing] |
|
|
137
|
+
| [Req 3] | ❌ Not done | [why] |
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Step 3: Architecture Check (Automated)
|
|
143
|
+
|
|
144
|
+
**Spawn the `architecture-checker` subagent** to validate compliance on changed files:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
Use the Task tool with:
|
|
148
|
+
subagent_type: "devtronic:architecture-checker"
|
|
149
|
+
model: "sonnet"
|
|
150
|
+
prompt: "Check architecture compliance on these changed files: [file list from Step 1]"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The subagent reads architecture rules from `CLAUDE.md`, `docs/ARCHITECTURE.md`, or `.claude/architecture-rules.md`, then:
|
|
154
|
+
1. Categorizes changed files by architecture layer
|
|
155
|
+
2. Checks layer dependency direction, domain purity, pattern compliance
|
|
156
|
+
3. Returns a structured report with violations (file:line) and a PASS/FAIL verdict
|
|
157
|
+
|
|
158
|
+
**If the subagent returns FAIL:**
|
|
159
|
+
- List each violation in the review
|
|
160
|
+
- Mark the review as NEEDS FIXES
|
|
161
|
+
- Violations MUST be resolved before proceeding
|
|
162
|
+
|
|
163
|
+
**If the subagent is unavailable** (e.g., Task tool not available), fall back to manual checklist:
|
|
164
|
+
|
|
165
|
+
```markdown
|
|
166
|
+
## Architecture Compliance (manual fallback)
|
|
167
|
+
|
|
168
|
+
### Clean Architecture
|
|
169
|
+
- [ ] Domain has no external dependencies
|
|
170
|
+
- [ ] Use cases in application layer
|
|
171
|
+
- [ ] Infrastructure implements domain interfaces
|
|
172
|
+
- [ ] UI only calls application layer
|
|
173
|
+
|
|
174
|
+
### Project Patterns
|
|
175
|
+
- [ ] Follows naming conventions
|
|
176
|
+
- [ ] Uses established state management
|
|
177
|
+
- [ ] Repository pattern for data access
|
|
178
|
+
- [ ] Error handling follows standards
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Step 4: Quality Check
|
|
184
|
+
|
|
185
|
+
### Package Manager Detection
|
|
186
|
+
|
|
187
|
+
First, detect the project's package manager by checking for lockfiles:
|
|
188
|
+
- `pnpm-lock.yaml` → Use `pnpm`
|
|
189
|
+
- `yarn.lock` → Use `yarn`
|
|
190
|
+
- `bun.lockb` → Use `bun`
|
|
191
|
+
- `package-lock.json` or none → Use `npm`
|
|
192
|
+
|
|
193
|
+
Then run quality checks with the detected PM:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
<pm> run typecheck && <pm> run lint && <pm> test
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
```markdown
|
|
200
|
+
## Quality Metrics
|
|
201
|
+
|
|
202
|
+
| Check | Status |
|
|
203
|
+
|-------|--------|
|
|
204
|
+
| TypeScript | ✅ Pass |
|
|
205
|
+
| Lint | ✅ Pass |
|
|
206
|
+
| Tests | ✅ Pass (X new) |
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Step 5: Change Analysis
|
|
212
|
+
|
|
213
|
+
```markdown
|
|
214
|
+
## Change Analysis
|
|
215
|
+
|
|
216
|
+
**Files**: X changed
|
|
217
|
+
**Lines**: +Y / -Z
|
|
218
|
+
|
|
219
|
+
### Red Flags to Check
|
|
220
|
+
- [ ] No huge changes for small feature
|
|
221
|
+
- [ ] No unrelated files modified
|
|
222
|
+
- [ ] No console.logs left behind
|
|
223
|
+
- [ ] No commented code
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Step 6: Identify Issues
|
|
229
|
+
|
|
230
|
+
| Severity | Description | Action |
|
|
231
|
+
|----------|-------------|--------|
|
|
232
|
+
| 🔴 Blocker | Bug, security issue | Must fix |
|
|
233
|
+
| 🟠 Major | Logic flaw, bad pattern | Should fix |
|
|
234
|
+
| 🟡 Minor | Style, naming | Consider |
|
|
235
|
+
| 🟢 Nitpick | Optional enhancement | Optional |
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Step 7: Lessons Learned
|
|
240
|
+
|
|
241
|
+
```markdown
|
|
242
|
+
## Lessons Learned
|
|
243
|
+
|
|
244
|
+
### What Worked Well
|
|
245
|
+
1. [Effective pattern/approach]
|
|
246
|
+
|
|
247
|
+
### What Was Difficult
|
|
248
|
+
1. [Challenge and how solved]
|
|
249
|
+
|
|
250
|
+
### Patterns Discovered
|
|
251
|
+
- **Pattern**: [Description]
|
|
252
|
+
- **When to use**: [Conditions]
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Save to: `thoughts/notes/YYYY-MM-DD_[feature-name].md`
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Step 8: CLAUDE.md Update
|
|
260
|
+
|
|
261
|
+
If mistakes were made that should be prevented:
|
|
262
|
+
|
|
263
|
+
```markdown
|
|
264
|
+
## CLAUDE.md Updates Needed?
|
|
265
|
+
|
|
266
|
+
- [ ] New pattern worth documenting
|
|
267
|
+
- [ ] Mistake to prevent
|
|
268
|
+
- [ ] Clarification needed
|
|
269
|
+
|
|
270
|
+
If yes → Update CLAUDE.md with new rule
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Step 9: Verdict
|
|
276
|
+
|
|
277
|
+
### ✅ Ready for PR
|
|
278
|
+
```markdown
|
|
279
|
+
## Review: READY FOR PR ✅
|
|
280
|
+
|
|
281
|
+
**Summary**: [1-2 sentences]
|
|
282
|
+
|
|
283
|
+
### Quality
|
|
284
|
+
- Types: ✅ | Lint: ✅ | Tests: ✅
|
|
285
|
+
|
|
286
|
+
### Architecture
|
|
287
|
+
- Clean Architecture: ✅
|
|
288
|
+
- Project patterns: ✅
|
|
289
|
+
|
|
290
|
+
### Lessons Captured
|
|
291
|
+
- Notes saved to: `thoughts/notes/...`
|
|
292
|
+
- CLAUDE.md: [Updated / No changes needed]
|
|
293
|
+
|
|
294
|
+
**Proceed with PR creation.**
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### 🔄 Needs Fixes
|
|
298
|
+
```markdown
|
|
299
|
+
## Review: NEEDS FIXES 🔄
|
|
300
|
+
|
|
301
|
+
### Must Fix
|
|
302
|
+
1. `file.ts:45` - [Issue description]
|
|
303
|
+
|
|
304
|
+
### Should Fix
|
|
305
|
+
1. [Issue]
|
|
306
|
+
|
|
307
|
+
**Fix and re-run `/post-review`.**
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## Strict Mode (`--strict`)
|
|
313
|
+
|
|
314
|
+
Senior engineer mode that challenges every decision.
|
|
315
|
+
|
|
316
|
+
### Additional Steps
|
|
317
|
+
|
|
318
|
+
**Grill the Developer:**
|
|
319
|
+
- "What happens if `user` is null here?"
|
|
320
|
+
- "Why this approach over X?"
|
|
321
|
+
- "How did you test the error path?"
|
|
322
|
+
- "What's the rollback plan?"
|
|
323
|
+
|
|
324
|
+
**The Test:**
|
|
325
|
+
```markdown
|
|
326
|
+
Before I approve, answer:
|
|
327
|
+
|
|
328
|
+
1. What edge case is most likely to cause bugs?
|
|
329
|
+
2. If this fails in production, how will you debug it?
|
|
330
|
+
3. What would you change if you had more time?
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
**Verdicts:**
|
|
334
|
+
- ✅ **APPROVED** - Ready to merge
|
|
335
|
+
- 🔄 **CHANGES REQUESTED** - Fix blockers
|
|
336
|
+
- 🚫 **BLOCKED** - Needs rearchitecting
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Quick Mode (`--quick`)
|
|
341
|
+
|
|
342
|
+
Abbreviated review for small changes:
|
|
343
|
+
|
|
344
|
+
1. Run automated checks (typecheck, lint, test)
|
|
345
|
+
2. Quick architecture scan
|
|
346
|
+
3. One-liner summary
|
|
347
|
+
|
|
348
|
+
```markdown
|
|
349
|
+
## Quick Review
|
|
350
|
+
|
|
351
|
+
- Types: ✅ | Lint: ✅ | Tests: ✅
|
|
352
|
+
- Architecture: ✅ No violations
|
|
353
|
+
- **Ready for PR**
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
## Output Template
|
|
359
|
+
|
|
360
|
+
```markdown
|
|
361
|
+
# Code Review
|
|
362
|
+
|
|
363
|
+
**Feature**: [name]
|
|
364
|
+
**Branch**: [branch]
|
|
365
|
+
**Date**: [date]
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
## Summary
|
|
370
|
+
|
|
371
|
+
[1-2 sentence overview]
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## Requirements
|
|
376
|
+
|
|
377
|
+
| Requirement | Status |
|
|
378
|
+
|-------------|--------|
|
|
379
|
+
| [Req 1] | ✅ |
|
|
380
|
+
| [Req 2] | ✅ |
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## Quality
|
|
385
|
+
|
|
386
|
+
| Check | Status |
|
|
387
|
+
|-------|--------|
|
|
388
|
+
| Types | ✅ |
|
|
389
|
+
| Lint | ✅ |
|
|
390
|
+
| Tests | ✅ |
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
## Architecture
|
|
395
|
+
|
|
396
|
+
- ✅ Clean Architecture respected
|
|
397
|
+
- ✅ Project patterns followed
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Issues Found
|
|
402
|
+
|
|
403
|
+
### 🔴 Blockers
|
|
404
|
+
[None / List]
|
|
405
|
+
|
|
406
|
+
### 🟠 Major
|
|
407
|
+
[None / List]
|
|
408
|
+
|
|
409
|
+
### 🟡 Minor
|
|
410
|
+
[None / List]
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## Lessons Learned
|
|
415
|
+
|
|
416
|
+
1. [Key learning]
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## Verdict
|
|
421
|
+
|
|
422
|
+
[READY FOR PR / NEEDS FIXES / BLOCKED]
|
|
423
|
+
|
|
424
|
+
## Next Steps
|
|
425
|
+
|
|
426
|
+
- [ ] [Action items]
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
---
|
|
430
|
+
|
|
431
|
+
## Tips
|
|
432
|
+
|
|
433
|
+
1. **Run before PR creation** - Catch issues early
|
|
434
|
+
2. **Be honest about difficulties** - That's where learning happens
|
|
435
|
+
3. **Update CLAUDE.md** when you find patterns worth documenting
|
|
436
|
+
4. **Use `--strict`** for critical features
|
|
437
|
+
5. **Keep notes** for future reference
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quick
|
|
3
|
+
description: Fast ad-hoc task execution. Skips spec/research/plan — just implement, verify, commit. For small, well-defined tasks.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
argument-hint: "<task description>"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Quick - Fast Ad-Hoc Task Execution
|
|
9
|
+
|
|
10
|
+
Execute `$ARGUMENTS` quickly without the full workflow ceremony. Implement, verify, commit.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Small, well-defined tasks (< 5 files)
|
|
15
|
+
- Obvious bug fixes with clear solution
|
|
16
|
+
- Simple config changes
|
|
17
|
+
- Adding a single test or function
|
|
18
|
+
- Renaming, moving, or deleting files
|
|
19
|
+
|
|
20
|
+
**Escalate to `/create-plan` if:**
|
|
21
|
+
- Task touches 5+ files
|
|
22
|
+
- Design decisions needed
|
|
23
|
+
- Multiple valid approaches exist
|
|
24
|
+
- Task requires research first
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Process
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
1. UNDERSTAND (30 seconds)
|
|
32
|
+
└── Parse task, identify target files
|
|
33
|
+
|
|
34
|
+
2. GUARD CHECK
|
|
35
|
+
└── If > 5 files or needs design → suggest /create-plan
|
|
36
|
+
|
|
37
|
+
3. IMPLEMENT
|
|
38
|
+
└── Make changes directly
|
|
39
|
+
|
|
40
|
+
4. VERIFY
|
|
41
|
+
└── Detect PM, run typecheck + lint (+ test if test files affected)
|
|
42
|
+
|
|
43
|
+
5. COMMIT
|
|
44
|
+
└── git add specific files + commit
|
|
45
|
+
|
|
46
|
+
6. UPDATE STATE
|
|
47
|
+
└── If thoughts/STATE.md exists, note the quick task
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Step 1: Understand
|
|
53
|
+
|
|
54
|
+
Parse `$ARGUMENTS` to determine:
|
|
55
|
+
|
|
56
|
+
- **What**: The specific change needed
|
|
57
|
+
- **Where**: Which files to modify (should be < 5)
|
|
58
|
+
- **How**: The implementation approach (should be obvious)
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
**Task**: [parsed task]
|
|
62
|
+
**Files**: [list of files to touch]
|
|
63
|
+
**Approach**: [1-2 sentence description]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Step 2: Guard Check
|
|
69
|
+
|
|
70
|
+
Before implementing, verify this is appropriate for `/quick`:
|
|
71
|
+
|
|
72
|
+
| Check | Threshold | Action if exceeded |
|
|
73
|
+
|-------|-----------|-------------------|
|
|
74
|
+
| Files to modify | > 5 | Suggest `/create-plan` |
|
|
75
|
+
| Design decisions | Any | Suggest `/create-plan` |
|
|
76
|
+
| New architecture | Any | Suggest `/create-plan` |
|
|
77
|
+
| Unclear requirements | Any | Ask user to clarify |
|
|
78
|
+
|
|
79
|
+
If guard triggers:
|
|
80
|
+
|
|
81
|
+
```markdown
|
|
82
|
+
This task looks more complex than a quick fix:
|
|
83
|
+
- [reason: e.g., "touches 8 files", "needs design decision about X"]
|
|
84
|
+
|
|
85
|
+
Recommend: `/create-plan [task]` for a proper plan.
|
|
86
|
+
Continue anyway? (not recommended)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Step 3: Implement
|
|
92
|
+
|
|
93
|
+
Make changes directly. Follow existing patterns in the codebase.
|
|
94
|
+
|
|
95
|
+
- Read target files before modifying
|
|
96
|
+
- Follow existing code style
|
|
97
|
+
- Keep changes minimal and focused
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Step 4: Verify
|
|
102
|
+
|
|
103
|
+
### Package Manager Detection
|
|
104
|
+
|
|
105
|
+
Check for lockfiles:
|
|
106
|
+
- `pnpm-lock.yaml` → `pnpm`
|
|
107
|
+
- `yarn.lock` → `yarn`
|
|
108
|
+
- `bun.lockb` → `bun`
|
|
109
|
+
- `package-lock.json` or none → `npm`
|
|
110
|
+
|
|
111
|
+
### Run Checks
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# Always run
|
|
115
|
+
<pm> run typecheck
|
|
116
|
+
<pm> run lint
|
|
117
|
+
|
|
118
|
+
# Run if test files were modified or new tests added
|
|
119
|
+
<pm> test
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Fix any issues before proceeding to commit.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Step 5: Commit
|
|
127
|
+
|
|
128
|
+
Invoke the **commit-changes** agent to handle staging and committing. It will:
|
|
129
|
+
- Analyze the changes and group them logically
|
|
130
|
+
- Stage specific files (never `git add .`)
|
|
131
|
+
- Create conventional commit messages
|
|
132
|
+
|
|
133
|
+
If the commit-changes agent is not available, fall back to manual commit:
|
|
134
|
+
```bash
|
|
135
|
+
git add [specific files]
|
|
136
|
+
git commit -m "[type]: [description]"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Step 6: Update State
|
|
142
|
+
|
|
143
|
+
If `thoughts/STATE.md` exists, append a note about the quick task:
|
|
144
|
+
|
|
145
|
+
```markdown
|
|
146
|
+
## Quick Tasks (this session)
|
|
147
|
+
|
|
148
|
+
- [description] — [files changed] (committed: [hash])
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Output Format
|
|
154
|
+
|
|
155
|
+
```markdown
|
|
156
|
+
## Quick: [task name]
|
|
157
|
+
|
|
158
|
+
**Files changed**: [count]
|
|
159
|
+
- `path/to/file.ts` — [what changed]
|
|
160
|
+
|
|
161
|
+
**Verification**:
|
|
162
|
+
- Types: PASS/FAIL
|
|
163
|
+
- Lint: PASS/FAIL
|
|
164
|
+
- Tests: PASS/FAIL (or skipped)
|
|
165
|
+
|
|
166
|
+
**Commit**: `[hash]` [message]
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Examples
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
/quick fix typo in README.md
|
|
175
|
+
/quick add index export for UserService
|
|
176
|
+
/quick rename handleClick to handleSubmit in LoginForm
|
|
177
|
+
/quick add test for edge case in parseDate utility
|
|
178
|
+
/quick update eslint config to enable new rule
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Tips
|
|
184
|
+
|
|
185
|
+
1. **Be specific** in the task description — the more detail, the better
|
|
186
|
+
2. **One task at a time** — don't combine unrelated changes
|
|
187
|
+
3. **Trust the guard** — if it suggests `/create-plan`, listen
|
|
188
|
+
4. **Quick means quick** — if you're spending more than 5 minutes, escalate
|