You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
enh(execute-phase): cross-phase depends_on readiness before dispatch #5464
I have confirmed this improves existing behavior — it does not add a new command, workflow, or concept
I have searched existing issues and this enhancement has not already been proposed
I have read CONTRIBUTING.md and understand I must wait for approved-enhancement before writing any code
I can clearly describe the concrete benefit — not just "it would be nicer"
What existing feature or behavior does this improve?
depends_on across phases: dispatch readiness in /gsd-execute-phase, and the dependency check when /gsd-plan-phase commits plans.
Current behavior
Per-phase planning can produce cross-phase dependency cycles, or plans that dispatch before an upstream plan in another phase has really finished.
Proposed behavior
Compute readiness per plan before dispatch:
A plan is ready only when every depends_on target, in any phase, has a SUMMARY whose status is complete.
A SUMMARY marked deferred or halted, or a missing SUMMARY, counts as not ready.
Before committing new plans, run one depth-first search over the combined graph of all phases. It refuses a cycle and names it, along with any edge to a deferred or superseded plan.
The routing step then refuses a not-ready plan with its reason, rather than dispatching it.
Reason and benefit
A plan dispatched before its upstream plan has finished builds on work that is not there yet. A cycle that crosses phases shows up only at execution. Both are cheap to catch before dispatch and costly after.
Scope of changes
One readiness check in the routing step, and one graph check when plans are committed. Both read the existing depends_on frontmatter and SUMMARY status. There is no new command, flag or file format.
Breaking changes
No format change. The one behavior change: a plan whose upstream plan has not finished is refused with its reason, instead of being dispatched.
Alternatives considered
Checking each phase's graph alone. That cannot see an edge into another phase.
A manual check before each dispatch. That is easy to skip under load.
A plan-level depends_on token that names a plan in another phase is currently dropped with a warning ("does not resolve to any plan in this phase"), and the plan is then held not-ready. That over-blocks; it does not dispatch early, so the dispatch-before-finished failure is not reproduced.
SUMMARY statuses in the tree are complete, halted and blocked. deferred and superseded do not exist.
Cross-phase ordering today lives at phase level (ROADMAP "Depends on: Phase N").
To move this forward, please:
state the exact grammar for naming a plan in another phase in depends_on (today undefined), or narrow the request to phase-level dependencies;
drop deferred/superseded, or map them onto the existing halted/blocked statuses;
show a concrete reproduction of a plan being dispatched before an upstream plan in another phase finished, or of a cross-phase cycle reaching execution.
Only cross-phase resolution and cycle naming are new relative to #2830 and #4628.
Activity
trek-e commentedon Oct 18, 2026
Not approved as filed. What is verified on
next:cmdPhasePlanIndex, bug(execute-phase): a halted plan leaves its dependents on the runnable work list #2830, bug(execute-phase): incomplete predecessors can be skipped when selecting a later wave #4628): plans are refused fromready_plansuntil every dependency has a complete SUMMARY.depends_ontoken that names a plan in another phase is currently dropped with a warning ("does not resolve to any plan in this phase"), and the plan is then held not-ready. That over-blocks; it does not dispatch early, so the dispatch-before-finished failure is not reproduced.complete,haltedandblocked.deferredandsupersededdo not exist.To move this forward, please:
depends_on(today undefined), or narrow the request to phase-level dependencies;deferred/superseded, or map them onto the existinghalted/blockedstatuses;Only cross-phase resolution and cycle naming are new relative to #2830 and #4628.