Repository navigation
Description
Problem
When the exec agent adds a new field to RunOptions and implements the runtime logic, it does not update bin/cli.ts to register the corresponding CLI flag. The field works in tests (which set it directly) but is unreachable from the command line.
Incident: #305 --force flag (2026-02-20)
The exec phase added force?: boolean to RunOptions, implemented the full pre-flight guard logic including "use --force to re-run" user messages, but never touched bin/cli.ts. The issue's "Files to Modify" table also omitted bin/cli.ts, so the exec agent had no signal to update it.
Root cause
The exec skill has no guidance for CLI wiring. When adding a new option to a command interface, the implementer must:
- Add the field to the TypeScript interface
- Implement the runtime logic
- Register the flag in
bin/cli.ts← this step is routinely missed
Proposed Solution
Add a CLI wiring checklist to the exec skill that triggers when option interfaces are modified.
Detection
# Check if a CLI option interface was modified
option_interfaces=$(git diff main...HEAD -- src/commands/*.ts | grep -E '^\+\s+\w+\??: (boolean|string|number)' | head -5)Exec Skill Addition
Add to the exec skill's pre-PR checklist:
CLI Wiring Check: If you added a new field to
RunOptionsor any CLI command's option interface:
- Register the flag in
bin/cli.tswith.option("--flag-name", "description")- Verify with
npx sequant <command> --helpthat the flag appears- Boolean flags:
--flag/--no-flag- Value flags:
--flag <value>with optional parser (e.g.,parseInt)
Key File Map
| Interface | CLI Registration File | Command |
|---|---|---|
RunOptions |
bin/cli.ts line ~150 |
sequant run |
| init options | bin/cli.ts line ~70 |
sequant init |
| state options | bin/cli.ts line ~170 |
sequant state |
Acceptance Criteria
- AC-1: Exec skill includes CLI wiring checklist in pre-PR verification
- AC-2: Checklist triggers when option interface fields are added (detection heuristic)
- AC-3: Checklist references
bin/cli.tsas the CLI registration file - AC-4: Exec skill includes the key file map (interface → CLI file → command)
Files to Modify
| File | Changes |
|---|---|
.claude/skills/exec/SKILL.md |
Add CLI wiring checklist to pre-PR verification section |
Context
- Origin: QA gap found during fix: pre-flight state guard and worktree lifecycle management #305 review
- Related: fix: pre-flight state guard and worktree lifecycle management #305 (pre-flight state guard —
--forceflag was unreachable) - Related: feat: CLI wiring completeness — QA verification + exec prevention for new option fields #307 (QA-side detection — complementary: feat: CLI wiring completeness — QA verification + exec prevention for new option fields #307 catches at QA, this prevents at exec)
- Related: feat: Add exec skill guidance for non-exportable function testing #300 (exec guidance for non-exportable functions — same skill, different concern)
Activity
admarble commentedon Feb 22, 2026
Merged into #307 — now covers both QA-side verification and exec-side prevention for CLI wiring completeness. Both ACs live in one issue since they address the same root problem (the #305 --force incident) and should be implemented cohesively.