Find Best Bug Plan
Select exactly one existing potential-bug ExecPlan to implement next.
Mindset
Choose the plan with the highest real reliability impact, not the most interesting write-up.
Workflow
- Resolve the base repo path.
- If current path contains
/.codex/worktrees/, use~/<repo-name>as base repo. - Otherwise, use the current working directory.
- If current path contains
- Collect candidates from:
.agent/potential-bugs/*.mdin the current repo.agent/potential-bugs/*.mdin the base repo- Prefer worktree copies when both locations contain the same filename.
- If no candidates exist, fail fast and tell the user to run
$find-bugfirst. - Read every candidate plan and score each with this rubric:
| Criteria | Weight |
|---|---|
| Severity if unfixed | 30% |
| Likelihood in normal usage | 25% |
| Blast radius across flows | 20% |
| Detectability (silent issues score higher) | 15% |
| Fix leverage (high impact for low complexity) | 10% |
- Pick the highest-scoring plan. If tied, prefer the plan with clearer regression-test steps.
- Copy the selected plan to
.agent/execplan-pending.mdin the current repo.- Create
.agent/if missing.
- Create
- Report:
- Selected source file path
- Destination path
- Short reason for selection
- One-line note on runner-up plans
Anti-Patterns
- Skimming only filenames without reading plan content
- Picking multiple plans instead of one
- Returning a choice without a rationale