Bug: faf todo command references no-longer-required faf improve command
Summary
The faf todo command's error messages and help text reference a command called faf improve which no longer exists, causing confusion for users.
Impact
- Users see error messages telling them to run
faf improve
- Running
faf improve fails (command not found)
- Creates confusion loop where error message suggests non-working solution
- Affects all users trying to use the todo system
Bug Details
Affected Command
faf todo (all options: default, --show, --complete, --reset)
Error Messages Affected
All 6 error messages in src/commands/todo.ts:
-
Line 61: After generating plan
Try: faf improve --show - View your todo list
-
Line 141: Completion instructions
Complete tasks with: faf improve --complete <task-number>
-
Line 151: No list exists (--show)
No active improvement plan. Run faf improve to create one.
-
Line 171: No list exists (--complete)
No active todo list. Run faf improve first.
-
Line 189: Task not found
Use faf improve --show to see available tasks.
-
Line 232: After reset
Run faf improve to create a new one.
Root Cause
Historical: The todo command was likely renamed from improve to todo but error messages weren't updated.
Additional Bug Found During Testing
When user provides invalid task number (e.g., faf todo --complete 99), the command crashes with:
taskIdentifier.toLowerCase is not a function
Cause: Task number is passed as number, but code assumes string when doing partial title matching.
Reproduction
Test 1: Ghost Command References
faf init
faf todo
# Shows: "Try: faf improve --show"
# Should say: "Try: faf todo --show"
Test 2: Invalid Task Number Crash
faf init
faf todo
faf todo --complete 99
# Crashes with: taskIdentifier.toLowerCase is not a function
Fix Applied
Changes in src/commands/todo.ts
1. Updated all 6 references:
2. Fixed type conversion bug:
} else {
- // Try to find by partial title match
+ // Try to find by partial title match (convert to string first)
+ const identifier = String(taskIdentifier);
task = todoList.items.find(item =>
- item.title.toLowerCase().includes(taskIdentifier.toLowerCase())
+ item.title.toLowerCase().includes(identifier.toLowerCase())
);
}
Testing
Test Results
- ✅ All 173 tests passing
- ✅ All 20 edge case audits passing
- ✅ Build successful (TypeScript compiles cleanly)
- ✅ Manual testing:
faf todo → correct help text
faf todo --show (no list) → correct error message
faf todo --complete 99 → graceful error (no crash)
faf todo --complete 1 → works correctly
faf todo --reset → correct help text
Test Build
Created faf-cli-3.0.3.tgz for user testing before publishing.
Cascade Effect
This bug also affected AI assistants (like Claude Code) who:
- Read the error messages
- Suggested users run
faf improve
- Users tried it and failed
- Created confusion loop
Once CLI is fixed, AI assistants will automatically learn the correct command.
Version
- Affected: v3.0.0 - v3.0.3
- Fixed in: v3.0.4 (pending release)
- Files changed:
src/commands/todo.ts (8 lines modified)
Reporter
User feedback via WhatsApp testing session (Paul Cowen)
Related
- User experienced score stuck at 33% → 76% (todo system worked, just confusing UX)
- Bug prevented users from completing todo tasks due to wrong command name
Status: Fixed, awaiting user confirmation before v3.0.4 release
Priority: Medium (UX blocker, but workaround exists: just use faf todo instead)
Category: Bug - User Experience
Bug:
faf todocommand references no-longer-requiredfaf improvecommandSummary
The
faf todocommand's error messages and help text reference a command calledfaf improvewhich no longer exists, causing confusion for users.Impact
faf improvefaf improvefails (command not found)Bug Details
Affected Command
faf todo(all options: default,--show,--complete,--reset)Error Messages Affected
All 6 error messages in
src/commands/todo.ts:Line 61: After generating plan
Line 141: Completion instructions
Line 151: No list exists (--show)
Line 171: No list exists (--complete)
Line 189: Task not found
Line 232: After reset
Root Cause
Historical: The todo command was likely renamed from
improvetotodobut error messages weren't updated.Additional Bug Found During Testing
When user provides invalid task number (e.g.,
faf todo --complete 99), the command crashes with:Cause: Task number is passed as number, but code assumes string when doing partial title matching.
Reproduction
Test 1: Ghost Command References
Test 2: Invalid Task Number Crash
faf init faf todo faf todo --complete 99 # Crashes with: taskIdentifier.toLowerCase is not a functionFix Applied
Changes in
src/commands/todo.ts1. Updated all 6 references:
2. Fixed type conversion bug:
} else { - // Try to find by partial title match + // Try to find by partial title match (convert to string first) + const identifier = String(taskIdentifier); task = todoList.items.find(item => - item.title.toLowerCase().includes(taskIdentifier.toLowerCase()) + item.title.toLowerCase().includes(identifier.toLowerCase()) ); }Testing
Test Results
faf todo→ correct help textfaf todo --show(no list) → correct error messagefaf todo --complete 99→ graceful error (no crash)faf todo --complete 1→ works correctlyfaf todo --reset→ correct help textTest Build
Created
faf-cli-3.0.3.tgzfor user testing before publishing.Cascade Effect
This bug also affected AI assistants (like Claude Code) who:
faf improveOnce CLI is fixed, AI assistants will automatically learn the correct command.
Version
src/commands/todo.ts(8 lines modified)Reporter
User feedback via WhatsApp testing session (Paul Cowen)
Related
Status: Fixed, awaiting user confirmation before v3.0.4 release
Priority: Medium (UX blocker, but workaround exists: just use
faf todoinstead)Category: Bug - User Experience