/autoplan Phase 0: silent phase-skip when scope detection misses by one term; no diagnostic
- Dominant language
- TypeScript
- Stars
- 133k
- Forks
- 19.9k
- Avg merge
- 18h 46m
- Merged PRs (30d)
- 26
Description
Filed downstream at aviraldua93/gstack-copilot#9. Bug in canonical upstream gstack — exposed during smoke test of `/autoplan`.
## Summary
`/autoplan` Phase 0 detects whether to run Phase 2 (Design Review) and Phase 3.5 (DX Review) by grepping the plan file with `grep -ciE "\b($TERMS)\b"` and a threshold of `≥ 2 matches`. When count is below threshold, the phase is silently skipped — no diagnostic, no opportunity to override.
## Failure modes
1. **Silent miss** — plan IS UI/DX-relevant but uses hyphenated terms (`form-control`, `api-endpoint`), terms in code fences grep skips, or terms synonymous-but-not-listed (`screen reader` matches, `chrome accessibility tree` does not). User gets 2 phases instead of 4 and never knows why.
2. **Borderline trip** — exact-threshold matches give no warning. Lose one match anywhere and the phase silently disappears next run.
## Suggested fixes
1. **Print matched terms, not just count**:
```
UI scope detection:
matched: dashboard (×2)
threshold: 2
→ UI_SCOPE: yes
```
When count equals threshold, add inline warning `⚠ borderline match (count = threshold); confirm or override`.
2. **Confirm at the gate when borderline** — single AskUserQuestion before phases run.
3. **Expand term list and version it** — move to `scripts/scope-terms.json` so community can contribute. Current list is 10 UI terms, 30 DX terms — short for the domain.
---
*Filed via GitHub Copilot CLI by @aviraldua93 during stress-testing a downstream port.*
Contributor guide
Assessment
This issue has not been assessed yet.