What went wrong
In the butterfly project (github.com/the-gigi/butterfly), Milestone 1 execution produced 3 wasted PRs because the orchestrator dispatched dependent tasks before their prerequisites were merged.
What happened:
- Orchestrator dispatched all 5 milestone tasks in a single run (violating the "one unit of work per run" spirit)
- Medium source (#38), Book source (#40), and Bluesky adapter (#41) were submitted as parallel PRs
- When #38 merged and introduced the
ContentSource trait, #40 and #41 became stale — they were built against an older API
- Both had to be closed and reimplemented (#43, #44), creating 3 dead PRs and wasting cycles
Root cause
The genesis orchestrator template (templates/agents/orchestrator.md) has vague guidance on dependencies ("detect when tasks are blocked") but no explicit rules that prevent:
- Dispatching a task when an open PR already exists for it
- Dispatching a dependent task before its prerequisite is merged (not just submitted)
Proposed fix
Add two rules to the Hard Rules section of templates/agents/orchestrator.md:
- **No duplicate PRs:** Before dispatching a worker on a task, run `gh pr list --state open` to check for any existing PRs touching the same issue or feature. If a PR is already open for the task, do NOT dispatch another worker — wait for the existing PR to be reviewed or resolved.
- **Sequential dependency enforcement:** When the milestone plan declares a dependency order (e.g. "Task 2 depends on Task 1"), do NOT dispatch Task 2 until Task 1's PR has been **merged** (not just submitted). Use `gh pr view <number> --json mergedAt` to verify. A closed-but-not-merged PR is not sufficient.
Also update Responsibility #5 to make dispatch more conservative:
5. **Dispatch** — launch worker agents (or other agents) to execute **one ready task per run**. Before dispatching, check for any open PRs or in-progress issues covering the same feature. If one exists, do not create a duplicate — monitor the existing work instead.
Fix already applied
This fix has been applied to the butterfly project's local orchestrator.md (PR #48). The genesis template needs the same update so new projects scaffolded from genesis don't hit the same problem.
Label: needs:evolver (label needs to be created in genesis repo)
What went wrong
In the butterfly project (github.com/the-gigi/butterfly), Milestone 1 execution produced 3 wasted PRs because the orchestrator dispatched dependent tasks before their prerequisites were merged.
What happened:
ContentSourcetrait, #40 and #41 became stale — they were built against an older APIRoot cause
The genesis orchestrator template (
templates/agents/orchestrator.md) has vague guidance on dependencies ("detect when tasks are blocked") but no explicit rules that prevent:Proposed fix
Add two rules to the Hard Rules section of
templates/agents/orchestrator.md:Also update Responsibility #5 to make dispatch more conservative:
Fix already applied
This fix has been applied to the butterfly project's local orchestrator.md (PR #48). The genesis template needs the same update so new projects scaffolded from genesis don't hit the same problem.
Label: needs:evolver (label needs to be created in genesis repo)