| name | todo-validation |
| description | Validate todo files against actual code state |
| invocation | /validate-todos [--all | --resolved | --pending | --ids 001,005] |
Todo Validation Skill
Purpose
Systematically validate todo files by checking acceptance criteria against actual source code.
Pre-conditions
- Running in worktree (not main directory)
todos/ directory exists with numbered todo files
Workflow
Phase 1: Setup
- Confirm execution in worktree
- List todo files:
ls todos/*.md | grep -E '[0-9]{3}-'
- Filter by scope (--all, --resolved, --pending, --ids)
Phase 2: Batch Processing
For each batch of 5 todos:
-
Read todo file
- Extract YAML front matter
- Parse acceptance criteria checkboxes
-
Validate criteria
For each criterion:
- Identify type (file exists, pattern, function, test)
- Execute verification
- Record pass/fail
-
Determine status
- All criteria met → resolved
- Any unmet → pending
-
Update if changed
- YAML status
- Checkboxes
- Work log entry
- Filename (if status changed)
-
Record result
Phase 3: Reporting
After each batch:
Batch N/M (todos XXX-YYY)
--------------------------
✓ XXX - Title: unchanged (status, X/Y criteria)
→ XXX - Title: old → new (reason)
✗ XXX - Title: old → new (reason)
Continue? [y/n]
Final summary:
Todo Validation Summary
========================
Processed: N todos
Changes: M files updated
| ID | Title | Old | New | Changes |
|----|-------|-----|-----|---------|
| ... | ... | ... | ... | ... |
Files updated:
- todos/XXX-status-priority-title.md
Validation Methods
| Type | Check |
|---|
file:line exists | ls + Read at offset |
Function name exists | Grep "fn name" |
| Pattern present | Grep "pattern" |
| Pattern absent | Grep returns 0 matches |
| Test passes | cargo test name |
File Update Rules
When updating a todo file:
- YAML front matter: Update
status field
- Checkboxes: Mark
[x] or [ ] based on validation
- Work log: Add row with date, "Validated", results
- Filename: Rename if status changed
mv todos/001-pending-p1-title.md todos/001-resolved-p1-title.md
Examples
Command Variations
/validate-todos --all
/validate-todos --resolved
/validate-todos --pending
/validate-todos --ids 001,005,012
Validation Output Examples
Batch 1/6 (todos 001-005)
--------------------------
✓ 001 - Get program accounts: unchanged (resolved, 3/3 criteria)
✓ 002 - Error sanitization: unchanged (resolved, 2/2 criteria)
→ 003 - Missing validation: pending → resolved (all criteria now met)
✓ 004 - Type safety: unchanged (resolved, 1/1 criteria)
✗ 005 - Dead code annotations: resolved → pending (criterion 2 regressed)
Continue? [y]
Post-Validation
After validation completes:
- Show final summary
- Commit changes (if any):
git add todos/
git commit -m "chore: update todo statuses after validation"
- Ask user: merge to main, keep branch, or abandon?