Merge pull request #1256 from gsd-build/enhancement/verifier-stub-detection-1244
enhancement(agents): add stub detection to verifier and executor
This commit is contained in:
@@ -384,6 +384,13 @@ After all tasks complete, create `{phase}-{plan}-SUMMARY.md` at `.planning/phase
|
||||
Or: "None - plan executed exactly as written."
|
||||
|
||||
**Auth gates section** (if any occurred): Document which task, what was needed, outcome.
|
||||
|
||||
**Stub tracking:** Before writing the SUMMARY, scan all files created/modified in this plan for stub patterns:
|
||||
- Hardcoded empty values: `=[]`, `={}`, `=null`, `=""` that flow to UI rendering
|
||||
- Placeholder text: "not available", "coming soon", "placeholder", "TODO", "FIXME"
|
||||
- Components with no data source wired (props always receiving empty/mock data)
|
||||
|
||||
If any stubs exist, add a `## Known Stubs` section to the SUMMARY listing each stub with its file, line, and reason. These are tracked for the verifier to catch. Do NOT mark a plan as complete if stubs exist that prevent the plan's goal from being achieved — either wire the data or document in the plan why the stub is intentional and which future plan will resolve it.
|
||||
</summary_creation>
|
||||
|
||||
<self_check>
|
||||
|
||||
@@ -306,13 +306,19 @@ Run anti-pattern detection on each file:
|
||||
```bash
|
||||
# TODO/FIXME/placeholder comments
|
||||
grep -n -E "TODO|FIXME|XXX|HACK|PLACEHOLDER" "$file" 2>/dev/null
|
||||
grep -n -E "placeholder|coming soon|will be here" "$file" -i 2>/dev/null
|
||||
grep -n -E "placeholder|coming soon|will be here|not yet implemented|not available" "$file" -i 2>/dev/null
|
||||
# Empty implementations
|
||||
grep -n -E "return null|return \{\}|return \[\]|=> \{\}" "$file" 2>/dev/null
|
||||
# Hardcoded empty data (common stub patterns)
|
||||
grep -n -E "=\s*\[\]|=\s*\{\}|=\s*null|=\s*undefined" "$file" 2>/dev/null | grep -v -E "(test|spec|mock|fixture|\.test\.|\.spec\.)" 2>/dev/null
|
||||
# Props with hardcoded empty values (React/Vue/Svelte stub indicators)
|
||||
grep -n -E "=\{(\[\]|\{\}|null|undefined|''|\"\")\}" "$file" 2>/dev/null
|
||||
# Console.log only implementations
|
||||
grep -n -B 2 -A 2 "console\.log" "$file" 2>/dev/null | grep -E "^\s*(const|function|=>)"
|
||||
```
|
||||
|
||||
**Stub classification:** A grep match is a STUB only when the value flows to rendering or user-visible output AND no other code path populates it with real data. A test helper, type default, or initial state that gets overwritten by a fetch/store is NOT a stub. Check for data-fetching (useEffect, fetch, query, useSWR, useQuery, subscribe) that writes to the same variable before flagging.
|
||||
|
||||
Categorize: 🛑 Blocker (prevents goal) | ⚠️ Warning (incomplete) | ℹ️ Info (notable)
|
||||
|
||||
## Step 8: Identify Human Verification Needs
|
||||
|
||||
Reference in New Issue
Block a user