Skip to content

enh(execute-phase): cross-phase depends_on readiness before dispatch #5464

Open

Description

@enlightenedmarketing

Pre-submission checklist

  • 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.

Area affected

Core workflow (init, plan, build, verify)

Activity

  1. trek-e commented on Oct 18, 2026

    @trek-e
    Collaborator

    This was generated by AI during triage.

    Not approved as filed. What is verified on next:

    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.

  2. added
    needs-reproductionCannot reproduce - waiting for more info
    and removed
    needs-triageNew issue awaiting maintainer review
    on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-reproductionCannot reproduce - waiting for more info

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions