PR #210 review and user feedback identified a fundamental design problem: adding --issue as a separate flag creates unnecessary complexity. Instead, --focus should be expanded to detect issue references automatically.
Problem
--issue duplicates --focus semantics — both mean "build exactly this one thing"
- Adding
--issue required 5+ mutual exclusion checks duplicated across cmd_ceo and cmd_run
- The duplication already caused a bug: missing
--mode research mutual exclusion in cmd_run
- Two flags that serve the same purpose confuse users
Solution
Expand --focus to detect issue refs (bare numbers, URLs, owner/repo#N) using parse_issue_ref from factory/issue.py. When detected, fetch the issue and use it as the focus spec.
factory ceo /path --focus 42
factory ceo /path --focus "https://github.com/owner/repo/issues/42"
factory ceo /path --focus "owner/repo#42"
factory ceo /path --focus "dashboard UI" # existing behavior unchanged
Changes needed
- Remove
--issue flag from ceo and run subparsers
- In
--focus resolution: try parse_issue_ref first; if it matches, fetch issue and format as spec; otherwise treat as backlog item name
- Remove all
--issue-specific mutual exclusion checks (they collapse into existing --focus exclusions)
- Update
_build_ceo_task to accept issue metadata from focus resolution
- Update tests
- Update CEO prompt to document
--focus accepting issue refs
Subsumes
- Bug: missing
--mode research + --issue mutual exclusion in cmd_run
- Quality: duplicated issue-handling code between
cmd_ceo and cmd_run
- Style: kwargs formatting (the kwargs go away)
Refs: PR #210, issue #202
PR #210 review and user feedback identified a fundamental design problem: adding
--issueas a separate flag creates unnecessary complexity. Instead,--focusshould be expanded to detect issue references automatically.Problem
--issueduplicates--focussemantics — both mean "build exactly this one thing"--issuerequired 5+ mutual exclusion checks duplicated acrosscmd_ceoandcmd_run--mode researchmutual exclusion incmd_runSolution
Expand
--focusto detect issue refs (bare numbers, URLs,owner/repo#N) usingparse_issue_reffromfactory/issue.py. When detected, fetch the issue and use it as the focus spec.Changes needed
--issueflag fromceoandrunsubparsers--focusresolution: tryparse_issue_reffirst; if it matches, fetch issue and format as spec; otherwise treat as backlog item name--issue-specific mutual exclusion checks (they collapse into existing--focusexclusions)_build_ceo_taskto accept issue metadata from focus resolution--focusaccepting issue refsSubsumes
--mode research+--issuemutual exclusion incmd_runcmd_ceoandcmd_runRefs: PR #210, issue #202