Skip to content

Commit e53410f

Browse files
committed
Address tri-agent review findings
stub-patterns.md: - Add false-positive caveat for return nil/null/{}/[] - Fix grep portability: use -E flag instead of \s for macOS compat - Remove fragile Python except pipe pattern - Add *.tsx/*.jsx to TODO, hardcoded-value, and catch-block patterns - Add overall "matches require manual review" disclaimer self-audit.md: - Run stub detection unconditionally, not gated on TODO count feature.md: - Support multiple domains per feature (auth + API + UI) - Skip probing when no domain section matches debug-checklists.md: - Merge duplicate Quick Symptom Lookup into Performance Bugs checklist to eliminate DRY violation with Symptom Triage table
1 parent 2b0ee98 commit e53410f

4 files changed

Lines changed: 20 additions & 24 deletions

File tree

commands/feature.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Complete feature lifecycle: brainstorm → plan → implement → test → lint
88

99
## Step 1: Brainstorm
1010

11-
Identify the feature's domain (auth, API, database, UI, etc.) and read the matching section from `references/domain-probes.md` to surface gray areas. Use the probes to ask targeted questions via `AskUserQuestion` — only for genuinely ambiguous decisions, not obvious ones. Skip probing if the user's input already resolves the gray areas.
11+
Identify the feature's relevant domains (auth, API, database, UI, etc. — features often span multiple) and read each matching section from `references/domain-probes.md` to surface gray areas. If no section matches, skip domain probing. Use the probes to ask targeted questions via `AskUserQuestion` — only for genuinely ambiguous decisions, not obvious ones. Skip probing if the user's input already resolves the gray areas.
1212

1313
```
1414
Feature: {user's input}

commands/references/debug-checklists.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,8 @@ When the bug domain isn't obvious, use the symptom to route to the right checkli
4646

4747
## Performance Bugs
4848
- Profile first — the slow part is almost never where you think
49-
- Check for N+1 queries, missing indexes, unbounded loops
50-
- Memory leak? Compare heap snapshots over time
51-
- Connection pool or thread pool exhaustion?
52-
53-
### Quick Symptom Lookup
54-
55-
| Symptom | Likely Cause | Investigation |
56-
|---------|--------------|---------------|
57-
| Slow API response | N+1 queries | Log SQL count per request |
58-
| Slow page render | Expensive recomputation | Profile render cycle |
59-
| Gradual memory growth | Leak (listeners, connections) | Heap snapshots over time |
60-
| Intermittent slowness | Lock contention / pool exhaustion | Connection pool metrics |
49+
- Slow API response? Log SQL count per request — likely N+1 queries
50+
- Slow page render? Profile the render cycle — likely expensive recomputation
51+
- Gradual memory growth? Heap snapshots over time — likely leaked listeners or connections
52+
- Intermittent slowness? Check connection pool metrics — likely lock contention or pool exhaustion
53+
- Check for missing indexes and unbounded loops

commands/references/stub-patterns.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,30 @@
22

33
Mechanical grep patterns for detecting unfinished work. Use in self-audit's Stale Code section or tri-review to flag incomplete implementations.
44

5+
All matches require manual review — these are heuristics, not definitive indicators.
6+
57
## TODO/FIXME Comments
68

79
```bash
810
grep -rn 'TODO\|FIXME\|HACK\|XXX\|PLACEHOLDER' \
9-
--include='*.go' --include='*.ts' --include='*.js' \
11+
--include='*.go' --include='*.ts' --include='*.tsx' --include='*.js' --include='*.jsx' \
1012
--include='*.py' --include='*.rs' --include='*.rb' . 2>/dev/null
1113
```
1214

1315
## Empty or Trivial Implementations
1416

1517
```bash
16-
# Functions that return nothing useful
17-
grep -rn 'return nil$\|return null\|return undefined\|return {}\|return \[\]' \
18+
# Functions that return nothing useful — high false-positive rate.
19+
# Filter results manually: return nil/null/{}/[] is often legitimate.
20+
# Strongest signal when combined with TODO/FIXME nearby.
21+
grep -rn 'return nil\|return null\|return undefined' \
1822
--include='*.go' --include='*.ts' --include='*.js' --include='*.py' . 2>/dev/null
1923

2024
# Python pass-only functions
21-
grep -rn '^\s*pass$' --include='*.py' . 2>/dev/null
25+
grep -rn 'pass$' --include='*.py' . 2>/dev/null
2226

23-
# Empty catch/error blocks
24-
grep -rn 'catch.*{}\|catch.*{\s*}' --include='*.ts' --include='*.js' . 2>/dev/null
25-
grep -rn 'except.*:\s*$' --include='*.py' -A1 . 2>/dev/null | grep 'pass'
27+
# Empty catch/error blocks (use grep -E for extended regex portability)
28+
grep -rEn 'catch[^{]*\{\s*\}' --include='*.ts' --include='*.tsx' --include='*.js' --include='*.jsx' . 2>/dev/null
2629
```
2730

2831
## Placeholder Text
@@ -35,19 +38,19 @@ grep -rni 'lorem ipsum\|coming soon\|under construction\|placeholder' \
3538

3639
# Template brackets left in
3740
grep -rn '\[TODO\]\|<TODO>\|{TODO}' \
38-
--include='*.md' --include='*.ts' --include='*.go' . 2>/dev/null
41+
--include='*.md' --include='*.ts' --include='*.tsx' --include='*.go' . 2>/dev/null
3942
```
4043

4144
## Hardcoded Values Where Dynamic Expected
4245

4346
```bash
4447
# Hardcoded IDs or secrets (not in test files)
4548
grep -rn 'api_key\s*=\s*"[^"]\+"\|password\s*=\s*"[^"]\+"' \
46-
--include='*.go' --include='*.ts' --include='*.py' . 2>/dev/null | grep -v '_test\.\|\.test\.\|\.spec\.'
49+
--include='*.go' --include='*.ts' --include='*.tsx' --include='*.py' . 2>/dev/null | grep -v '_test\.\|\.test\.\|\.spec\.'
4750

4851
# Hardcoded URLs (not config/const files)
4952
grep -rn 'http://localhost\|127\.0\.0\.1' \
50-
--include='*.go' --include='*.ts' --include='*.py' . 2>/dev/null | grep -v 'config\|const\|test\|spec'
53+
--include='*.go' --include='*.ts' --include='*.tsx' --include='*.py' . 2>/dev/null | grep -v 'config\|const\|test\|spec'
5154
```
5255

5356
## Disabled or Skipped Tests

commands/self-audit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ grep -rn 'api_key\s*=\s*"[^"]*"' --include='*.go' --include='*.ts' --include='*.
9191
grep -rn 'TODO\|FIXME\|HACK\|XXX' --include='*.go' --include='*.ts' --include='*.py' --include='*.rs' . 2>/dev/null | wc -l
9292
```
9393

94-
For deeper stub detection (empty implementations, placeholder text, hardcoded values, skipped tests), run the patterns from `references/stub-patterns.md`. Only use these when the basic TODO count suggests stale code worth investigating.
94+
For deeper stub detection (empty implementations, placeholder text, hardcoded values, skipped tests), run the patterns from `references/stub-patterns.md`. Run unconditionally — a repo can have zero TODOs but still contain empty catch blocks, placeholder UI copy, or hardcoded localhost URLs.
9595

9696
### Documentation
9797

0 commit comments

Comments
 (0)