todo complete/add/supersede/archive-completed --help prints the whole 28 KB todo parser
Problem
loopx todo <action> --help is scoped only for list, claim and update. Every other action prints the whole todo parser:
| Command | --help bytes on main (dc0505ea3) |
|---|---|
loopx todo list --help |
3,471 |
loopx todo claim --help |
3,830 |
loopx todo update --help |
16,342 |
loopx todo complete --help |
28,093 |
loopx todo add --help |
28,093 |
loopx todo supersede --help |
28,093 |
loopx todo archive-completed --help |
28,093 |
complete and add are on every Agent's ordinary path, so each lookup costs roughly 7k tokens, and most of it is flags the action rejects (for example --resume-when, --cadence and --excluded-agent on complete, --clear-claim and --self-merged on add).
Why it is not a one-line fix
TODO_ACTION_FIELDS (loopx/cli_commands/todo_argument_validation.py) already drives install_action_help for list/claim/update, and the comment above it says the remaining lifecycle commands "retain full help until centralized". Their validators (validate_todo_complete_options, validate_todo_add_options, validate_todo_supersede_options, validate_todo_archive_completed_options) are deny-lists with conditional rules, so a help subset cannot simply be read from them.
I probed the current validators with single flags, pairs and helper triples. That suggests roughly 50 of 82 options are accepted per action, but it also shows the conditional cases that make a hand-written allow-list risky (for example --agent-id on add depends on --role user; --completion-identity-key only with --no-follow-up). Hiding an accepted option from help would be a real regression for Agents.
Proposal
- Express
complete,add,supersedeandarchive-completedaccepted options as allow-lists inTODO_ACTION_FIELDS, keeping the existing conditional rules as additional checks, so validation and help share one owner as forclaim. - Add a test asserting that every option outside an action's allow-list is rejected by that action's validation (so help cannot hide an accepted flag).
install_action_helpthen scopes help with no further change; expected size about 6–8 KB per action.
Question for maintainers
Is this the centralization you intended by "until centralized", and would you accept it as one PR (validation + help together), or prefer the validator change first?