Before declaring work complete, checks for loose ends: unused imports, TODO comments created, missing tests, stale references, incomplete error handling. Activates after implementing features or fixes. The cleanup that always gets skipped.
Before declaring complete, run through:
<checklist> ## Loose Ends Sweepany types addedRun the sweep script to find common cruft:
python scripts/sweep.py
Scans for:
console.log, print(), debugger statementsTODO, FIXME, XXX, HACK commentsdd(), var_dump(), binding.pry (PHP/Ruby)# Find TODOs in changed files
git diff --name-only | xargs grep -n "TODO\|FIXME"
# Find console.log in changed files
git diff --name-only | xargs grep -n "console.log"
# Find unused imports (TypeScript)
npx tsc --noEmit 2>&1 | grep "declared but"
# Find any types added
git diff | grep ": any"
Not all loose ends are equal:
| Priority | Type | Action | |----------|------|--------| | Fix now | Broken imports, missing exports | Blocks functionality | | Fix now | console.log in production code | Leaks info | | Should fix | Unused imports/variables | Code smell | | Should fix | Missing tests for new logic | Technical debt | | Note for later | Old TODOs in touched files | Existing debt | | Ignore | Style inconsistencies | Not your scope |
## Loose Ends Check
**Files changed:** [count]
**Fixed:**
- [x] Removed unused import in `file.ts`
- [x] Removed console.log in `handler.ts`
**Noted:**
- [ ] `utils.ts:45` has existing TODO (not from this change)
**Clean:** No loose ends found / All addressed
After implementing a new API endpoint:
## Loose Ends Check
**Files changed:** 4
**Scanning...**
`api/users.ts`:
- Line 3: unused import `lodash` → Removed
- Line 45: console.log for debugging → Removed
`types/user.ts`:
- Clean
`tests/users.test.ts`:
- New endpoint has test → Good
- Edge case (empty input) not tested → Added
`services/user.ts`:
- Line 23: TODO I wrote: "validate email format" → Addressed now
**Result:** 4 loose ends found and fixed. Ready to commit.
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer