Skip to content

feat(roadmap): record and check plan dependencies #3224

Closed

Description

@devops-cli-service

Split from #3201.

Problem: devops roadmap plan-check must report an open issue that the plan depends on. The change folder, the stage reply and the pull request body record no dependency. The stage job writes no dependency field, so the command has no source to read. Why deferred: A dependency record is a new plan field and a change to the stage prompt and renderer. It is a separate change from the command that checks existing plans. Acceptance criteria: StageProposal SHALL carry a dependencies list of issue numbers. render_change SHALL write the list under ## Dependencies in proposal.md. The plan reader SHALL read the list back. devops roadmap plan-check SHALL report each listed issue that is open. A test with a fake issue state SHALL prove that an open dependency gives a problem and a closed one gives none.

Alternatives check of 2026-11-06: partly.
Tool: Fission-AI/OpenSpec (https://github.com/Fission-AI/OpenSpec), MIT, last activity 2026-11-05, maintained.

Proposed design

Problem statement

The ## Dependencies section of a change folder names only open overlapping pull requests and metric senders. No rule reads the section for an issue that the plan needs first. devops roadmap plan-check therefore reports no open issue dependency, and the stage reply carries no issue-number form. This change gives an entry the form #<number>: <reason>, reads the section back, and reports each open issue dependency as a problem.

Acceptance criteria

Requirement: Planner prompt names the issue form

The planner prompt src/devops_cli/ai/tasks/roadmap_stage_change.md SHALL state that a dependencies entry which starts with #<number>: names an issue that must be delivered first.

Scenario: The prompt-rules test reads the form

  • WHEN the prompt-rules test reads the dependencies rule of src/devops_cli/ai/tasks/roadmap_stage_change.md
  • THEN the test finds the form #<number>: and passes.

Requirement: Reader returns the section

read_change SHALL fill StageProposal.dependencies with the bullets of the ## Dependencies section of proposal.md.

Scenario: Writer and reader round trip

  • WHEN render_change writes a change whose dependencies list holds #3201: the check command, and the plan reader reads its proposal.md
  • THEN StageProposal.dependencies holds #3201: the check command.

Requirement: The check takes the issue numbers

A function of src/devops_cli/roadmap/stage_change.py SHALL return the issue number of each entry that starts with #<number>:, and MUST skip every other entry.

Scenario: One issue entry and one overlap entry

  • WHEN the dependencies hold #3201: the check command and an open pull request changes src/devops_cli/roadmap/plan_check.py
  • THEN the function returns [3201].

Requirement: An open issue dependency is a problem

devops roadmap plan-check SHALL report one problem with the rule issue-dependency for each issue dependency whose state is open.

Scenario: An open dependency

  • WHEN the plan lists #3224: the dependency record, and the client answers that issue 3224 is open
  • THEN the check reports one problem with the rule issue-dependency that names issue 3224.

Requirement: A closed issue dependency is no problem

devops roadmap plan-check MUST report no problem for an issue dependency whose state is closed.

Scenario: A closed dependency

  • WHEN the plan lists #3224: the dependency record, and the client answers that issue 3224 is closed
  • THEN the check reports no problem for issue 3224.

Requirement: An overlap entry is no issue dependency

devops roadmap plan-check MUST NOT report an issue-dependency problem for a dependency entry that does not start with #<number>:.

Scenario: An overlap entry

  • WHEN the plan lists only the entry an open pull request changes src/devops_cli/roadmap/plan_check.py
  • THEN the check reports no issue-dependency problem.

Requirement: Plan-recheck reports the same problem

devops roadmap plan-recheck SHALL report the same issue-dependency problem as devops roadmap plan-check for one plan.

Scenario: Both commands read one plan

  • WHEN the plan lists an open issue dependency, and both commands read the same pull request
  • THEN each command reports one issue-dependency problem that names the issue.

Requirement: The section keeps its place and its empty text

render_change SHALL keep the ## Dependencies section after ## Impact, and MUST keep the text none when the list is empty.

Scenario: An empty list

  • WHEN render_change renders a change whose dependencies list is empty
  • THEN proposal.md holds ## Dependencies with the text none, after ## Impact.

Existing Tool Considered

Fission-AI/OpenSpec (https://github.com/Fission-AI/OpenSpec), MIT, last activity 2026-11-05, maintained. It gives the change folder and its proposal.md an artifact, a file format and a validator, so the ## Dependencies section has a home. It lacks a dependency field of the stage reply, a reader that returns the issue numbers of the section, and any read of GitHub issue state, so it cannot report an open issue dependency. The change builds that code in src/devops_cli/roadmap/. To build it costs about 45k tokens to write, about 6k tokens a month to keep and fix, and about 3 hours of elapsed time.

Key questions

  • Does StageProposal already carry a dependencies field?: Yes. StageProposal.dependencies is list[Line], added by feat(roadmap): the stage context names open plans that edit the same files #3252. Each entry names an open overlapping pull request and its shared path, or a metric name and its other files. The planner prompt states that rule. [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/ai/tasks/roadmap_stage_change.md]
  • Does render_change write a ## Dependencies section, and where?: Yes. _proposal_file writes ## Dependencies after ## Impact and before ## Feasibility, with one bullet for each entry. It writes the text none when the list is empty, so the section is always present. [sources: src/devops_cli/roadmap/stage_change.py]
  • Does the plan reader read the ## Dependencies section?: No. read_change fills no dependencies entry, so a StageProposal that the reader builds holds an empty list. The check has no source to read. [sources: src/devops_cli/roadmap/plan_read.py]
  • What form does an issue dependency take in dependencies?: An entry of the existing list[Line] starts with #<number>: and gives the reason, such as #3201: the check command. A reader takes the digits before the first colon as the issue number. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, src/devops_cli/roadmap/stage_change.py, CONTEXT.md]
  • How does the check read the state of a dependency issue?: plan_check reads each dependency issue through the PlanReads client that it already takes. The command passes the GitHub-backed client and the test passes a fake. IssueView gains the issue state when it lacks one. (best practice) [sources: src/devops_cli/roadmap/plan_check.py, docs/adr/0001-github-is-the-roadmap-source.md, docs/adr/0007-tests-double-only-process-edges.md]
    • Chosen: Reuse the injected PlanReads client. One read path answers one fact. The fake client already answers the tests, and the check reaches no network.
    • Rejected: Add a second issue-state callable parameter. A second read path answers the same fact, and every caller passes both.
    • Rejected: Call GitHub inside the check. Every test would need a token and a network, and the check would fail offline.
  • What does the check report for an open issue dependency?: One problem with the rule issue-dependency that names the issue, for each entry of the issue-number form whose state is open. An entry of another form is no issue dependency, and the check skips it. (best practice) [sources: src/devops_cli/roadmap/plan_check.py, src/devops_cli/roadmap/stage_change.py]
    • Chosen: A problem for each open issue dependency. plan-check prints a line for each problem and a JSON array, so a person and an agent read the case. The rule is deterministic and offline.
    • Rejected: No problem, and a comment on the pull request. The check prints problems only. A comment adds a write to the check, and a reader of the JSON array misses the case.
    • Rejected: Refuse the plan at stage time in check_proposal. The stage job reads no issue state, and an overlap entry names an open pull request by definition, so the rule would refuse every plan with an overlap.
  • Does the section keep its place and its text for an empty list?: Yes. The section stays after ## Impact and before ## Feasibility, and it keeps none for an empty list. The change adds no rule for an absent section. (best practice) [sources: src/devops_cli/roadmap/stage_change.py]
    • Chosen: Keep the current renderer. The renderer of feat(roadmap): the stage context names open plans that edit the same files #3252 already writes the section, and the plan-check tests read it. A change of the place or the empty text would change every rendered plan.
    • Rejected: Write no section when the list is empty. It contradicts _proposal_file, which always writes the section with none, and it changes the file of every plan with no dependency.
  • Do both plan-check and plan-recheck report the rule?: Yes. The rule lives in plan_check, the function that src/devops_cli/commands/roadmap.py calls for both commands, so each command reports it. (best practice) [sources: src/devops_cli/roadmap/plan_check.py, src/devops_cli/commands/roadmap.py]
    • Chosen: Put the rule in plan_check. Both commands call the function, so one rule answers both and no second copy can disagree.
    • Rejected: Put the rule in the recheck command only. A plan pull request gets the check at once. A person who runs plan-check would miss the open dependency.
  • Does the prompt-rules test need a new top-level key bullet?: No. The change adds no field to StageProposal, so test_the_top_level_keys_of_the_reply_are_the_fields_of_the_proposal passes unchanged. test_the_prompt_states_the_dependencies_rule keeps its words dependencies, overlaps and empty list. [sources: tests/roadmap/test_roadmap_stage_prompt_rules.py]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 2, 2026
  2. devops-cli-service commented on Nov 2, 2026

    @devops-cli-service
    ContributorAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It is a new capability that improves plan review but does not block existing workflows.
    • Value: Medium. It catches open dependencies that a reviewer would otherwise miss, but it is one check among many in the plan-check command.
    • Effort: Medium. It touches StageProposal, render_change, the plan reader, the plan-check command, and adds a test.
    • Related: feat(roadmap): add a plan-check command for a plan pull request #3201, which asks for a different change. Both work on the plan-check command, but #3201 is the umbrella for the whole command while this candidate adds only the dependencies field and its open-issue check.
  3. added
    priority/p2-medium
    status/ready
    and removed
    status/new
    on Nov 2, 2026
  4. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    ContributorAuthor

    Status set to Ready at b39dcba (see proposed design in issue body).

  5. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    ContributorAuthor

    Alternatives check: partly

    Tool: Fission-AI/OpenSpec (https://github.com/Fission-AI/OpenSpec)

    • License: MIT
    • Last activity: 2026-11-05
    • Maintained: yes

    Covers:

    • OpenSpec already owns the change folder and its proposal.md, so a ## Dependencies section has an existing artifact, file format and validator to live in.
    • OpenSpec keeps track of the ordering of its own artifacts, which is the closest existing notion of a plan dependency.

    Lacks:

    • No dependencies field on the stage-reply schema: StageProposal, the planner prompt bullet and the reply parsing are the repository's own code.
    • It records only the order of its own artifacts and reads no GitHub issue state, so it cannot say whether a dependency is open or closed.
    • No ## Dependencies writer or reader with a round trip; render_change and the plan reader in src/devops_cli/roadmap/ would still need the section, the bullets and the parse back to integers.
    • No check that turns an open dependency into a devops roadmap plan-check problem, and no fake-issue-state test for the open and closed cases.

    Searches run:

    • OpenSpec change proposal dependencies between changes field
    • GitHub issue dependencies blocked by API sub-issues
    • OpenSpec dependencies change proposal
    • openspec cli spec-driven development
    • issue dependency tracker open source
    • github issue dependencies feature
    • OpenSpec roadmap change dependencies
    • openspec
    • github issue dependencies
    • dependency check issue tracker tool

    Sources:

    Checked on 2026-11-06. A person decides what this means for the item. The check changes no label and closes no issue.

  6. dan-petty commented on Nov 6, 2026

    @dan-petty
    Owner

    Returned to New under AGENTS.md rule 2: the item cannot be built as written. Two reviewers read the code of origin/main on 2026-11-06 and agreed.

    Evidence

    The issue says 'The stage job writes no dependency field' and the refine design asks to add dependencies: list[int] and a new ## Dependencies section. On origin/main the field and the section exist: stage_change.py:465 'dependencies: list[Line]'; _proposal_file at lines 1056-1064 writes '## Dependencies' with the bullets (or 'none'); ProposalGate.DEPENDENCIES at line 871 and _overlap_problems at 962-971; the stage prompt lines 25 and 45 define the field. They were added by #3252 (closed 2026-11-04, commit e9cdf32 #3421). By design each entry is a string that names an OPEN overlapping pull request and its shared path (or a metric name and its files). The plan reader (plan_read.py) reads no Dependencies section and plan_check.py reads no issue state.

    Re-scope for refinement

    AGENTS.md rule 2. The issue and its refine design (checked 2026-11-05 at sha b39dcba) were written without #3252. Built as written, the change would turn dependencies into list[int] (breaking #3252's string entries and its gate) and add a rule 'report each listed dependency that is open'. The stage job must list every open overlap, so that rule would refuse every correct plan that has an overlap (an open pull request is open by definition). The title, the ordering after ## Impact and the 'no section when empty' rule also contradict the current renderer, which always writes the section with 'none'. Re-scope for New: keep dependencies as list[Line] with an issue-number form (for example '#3201: reason'), make the plan reader return the numbers of the section, and have plan-check or plan-recheck report an open ISSUE dependency as a case to review (not a pull request overlap, which is already handled by ProposalGate.DEPENDENCIES). Plan this as a new gate with its plan-recheck hits and false refusals, per docs/roadmap/plan-check.md. Return with: uv run devops roadmap return 3224 --comment --confirm (a person or the owner-run workflow does this; this review is read-only).

  7. added
    status/new
    and removed
    status/ready
    on Nov 6, 2026
  8. 15 remaining items

  9. added
    status/in-review
    on Nov 7, 2026
  10. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    ContributorAuthor

    Pull request #3957 is ready for review. The checks passed.

    Spend: 217 model requests, 16045139 input tokens, 89322 output tokens.

  11. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    ContributorAuthor

    The runner Job devops-cli-runner-20261107-103414-0eac ended: succeeded.
    Image digest: sha256:a12d8a3601a2f9803ba6a7f77fe19fdcc27a4de30944a1e65fc19d08808e9eff

    The last lines of its log:

    Tool call: shell, program uv, ok.
    Tool call: shell, started: git grep -n <masked> -- tests/invariants/test_workflow_contracts.py
    Tool call: shell, started: uv run devops ci docs
    Tool call: shell, program git, ok.
    Tool call: shell, program uv, ok.
    Tool call: read_file, ok.
    Tool call: read_file, ok.
    Tool call: shell, started: ls tests/roadmap
    Tool call: shell, program ls, ok.
    Tool call: shell, started: uv run devops ci test tests/roadmap/test_roadmap_plan_check.py ...
    Tool call: shell, program uv, ok.
    Tool call: shell, started: uv run devops openspec check
    Tool call: shell, started: uv run devops ci test tests/commands/test_pr_dry_run.py
    Tool call: shell, program uv, ok.
    Tool call: shell, program uv, ok.
    Tool call: shell, started: git grep -rn <masked> -- docs ...
    Tool call: shell, program git, ok.
    Tool call: shell, started: git diff
    Tool call: shell, program git, ok.
    Tool call: shell, started: git grep -n line-length\\|E501 -- pyproject.toml
    Tool call: shell, program git, ok.
    Tool call: edit_file, ok.
    Tool call: read_file, ok.
    Tool call: read_file, ok.
    Tool call: shell, started: uv run ast-grep scan --error=<masked> --error=<masked> ...
    Tool call: shell, started: uv run devops ci --check --only ...
    Tool call: shell, program uv, ok.
    Tool call: shell, program uv, ok.
    Tool call: shell, started: git status --short
    Tool call: shell, program git, ok.
    Tool call: shell, started: uv run devops ci test tests/roadmap/test_roadmap_dry_runs.py ...
    Tool call: shell, program uv, ok.
    Tool call: shell, started: uv run python -c <masked>
    Tool call: shell, program uv, ok.
    Tool call: shell, started: ls -a .data/agent/scratch
    Tool call: shell, started: git status --short
    Tool call: shell, program ls, ok.
    Tool call: shell, program git, ok.
    ✓ Took 1 item(s) to a ready pull request, stopped 0.
    Elapsed: 43m 56s
    
  12. removed
    owner/service
    on Nov 7, 2026
  13. removed
    status/in-review
    on Nov 7, 2026
  14. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    ContributorAuthor

    Live since 2026-11-07 16:44 UTC

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

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions