Repository navigation
Description
Problem or Motivation
devops roadmap stage prepares the prompt context for src/devops_cli/ai/tasks/roadmap_stage_change.md. It adds overlaps and metric_senders to the request. But it adds no issue dependencies to the request. The prompt tells the model to write #<number>: <reason> in dependencies for an issue that must be delivered first. The model does not get the declared issue dependencies in structured form. It must find them in unstructured issue text, and frequently omits them.
Proposed Solution & Architectural Design
Read the declared issue dependencies from the item body with body_dependencies(item.body). Pass the list of dependency issues as issue_dependencies in the prompt request dictionary. Include the issue number and the title of each dependency issue. Instruct the model in roadmap_stage_change.md to read issue_dependencies and format each entry as #<number>: <reason>. Add tests in tests/roadmap/stage/test_roadmap_stage_plan.py to confirm that the context holds the declared issue dependencies.
Target Subsystem
SDLC, Git & PR Governance
Existing Tool Considered
Prompt template src/devops_cli/ai/tasks/roadmap_stage_change.md and src/devops_cli/roadmap/stage/stage.py. The change builds this feature directly in devops_cli.roadmap.stage. It costs about 12,000 tokens to implement, 3,000 tokens per year to maintain, and about 2 hours of elapsed time.
Standards Compliance
- I confirm this proposal aligns with AGENTS.md engineering principles (cyclomatic complexity <= 10, nesting <= 5, zero bare exceptions, tests that cover the changed lines).
- I am willing to submit a pull request implementing this feature with accompanying tests.
Proposed design
Problem statement
The stage job asks the model to write the dependencies of a plan as #<number>: <reason>. The request gives the model the open pull requests and the other senders of a cited metric. It gives no structured list of the issues that the item body declares as its dependencies. The request also cuts the body to a token limit, so a long body loses its Dependencies section. The model then omits a dependency or writes a wrong one.
Acceptance criteria
Requirement: The request holds each declared dependency
The stage request SHALL hold issue_dependencies as one entry for each issue that the body of the item declares as a dependency, with the number and the title of the issue.
Scenario: Two declared dependencies
- WHEN The body of the item names
#12and#34in its Dependencies section, and the store holds both issues as closed items with a title - THEN The request holds
issue_dependencieswith the entry{"number": 12, "title": "fix(roadmap): the first dependency"}and the entry{"number": 34, "title": "fix(roadmap): the second dependency"}, in the order of the body
Requirement: An unknown dependency keeps its number
The entry of a declared dependency MUST hold the title when the store holds the issue and MUST hold no title key otherwise.
Scenario: An issue that the store lacks
- WHEN The body of the item names
#99in its Dependencies section, and the store holds no issue 99 - THEN The entry is
{"number": 99}and holds notitlekey
Requirement: An item with no dependency sends no key
The stage request MUST omit issue_dependencies when the body of the item declares no dependency.
Scenario: No dependency in the body
- WHEN The body of the item has no Dependencies section
- THEN The request holds no
issue_dependencieskey
Requirement: The prompt tells the model to use the declared dependencies
The prompt roadmap_stage_change.md SHALL tell the model to read issue_dependencies and to write one dependencies entry for each as #<number>: <reason>.
Scenario: The stage prompt
- WHEN A test loads the prompt of the task
stage - THEN The prompt holds
issue_dependenciesand#<number>: <reason>
Existing Tool Considered
No alternatives check has run. The change builds its own code in src/devops_cli/roadmap/stage/stage.py, src/devops_cli/roadmap/stage/stage_request.py and the prompt src/devops_cli/ai/tasks/roadmap_stage_change.md. It costs about 12,000 tokens to build, 3,000 tokens per year to keep and fix, and about 2 hours of elapsed time. No open, maintained tool or library covers the need: the need is one field of an internal prompt request.
Key questions
- Which function reads the issue numbers that the body of an item declares as its dependencies?:
body_dependenciesinsrc/devops_cli/roadmap/refine/refine.pyreturns them.src/devops_cli/roadmap/stage/stage.pyimports it and calls it in_Judge._dependency, which leaves out an item whose declared dependency is open. [sources: src/devops_cli/roadmap/stage/stage.py, src/devops_cli/roadmap/refine/refine.py] - Does the model already read the whole body of the item, with its Dependencies section?: No. The request holds
bodycut toCONST_ROADMAP_STAGE_BODY_MAX_TOKENStokens or a share of the model window. A long body loses its Dependencies section, so the model needs the structured list. [sources: src/devops_cli/roadmap/stage/stage.py, src/devops_cli/config/constants.py] - How does the stage request carry the declared dependencies?: A new
issue_dependenciesfield ofStageRequestholds one entry for each declared dependency. An entry is a mapping withnumberand, when the store holds the issue,title. The key is left out when the body declares no dependency, asoverlapsandmetric_sendersare. (best practice) [sources: src/devops_cli/roadmap/stage/stage_request.py, src/devops_cli/ai/tasks/roadmap_stage_change.md]- Chosen: A mapping with the number and the title. The model needs the number and the title to write a reason, and the entries stay typed for the check and the tests.
- Rejected: The numbers only. The model would need a read for each title, and the base toolset has no GitHub tool.
- Rejected: One text of
#<number>: <title>lines. The model writes the reason, and a text loses the number as a typed field.
- Where does the job get the title of each dependency issue?:
plan_stagegives the planner a lookup over the store that the round already reads, so the plan makes no GitHub request. An issue that the store does not hold gets an entry with the number only. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py, src/devops_cli/roadmap/stores/store.py]- Chosen: A lookup over the store of the round. The round reads the store already, so a title costs no request and adds no failure path.
- Rejected: A GitHub read for each dependency. It adds one request and one failure path for each dependency of each item.
- Rejected: The
read_issuetool of the model. The tool is only in theextendedtoolset, and the request must hold the data before the model answers.
- Does the check of the plan require a
dependenciesentry for each declared dependency?: No. The stage job leaves out an item whose declared dependency is open, so a planned item has only delivered dependencies, or issues that the store does not hold. A required entry would make the model state that a delivered issue must come first. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py, src/devops_cli/roadmap/stage/stage_change.py]- Chosen: No new rule in
check_proposal. The job already leaves out an item whose declared dependency is open, so no entry is due. - Rejected: One entry for each declared dependency. It forces a false statement about a delivered issue, and the model cannot know the state of an issue outside the store.
- Chosen: No new rule in
- Which test file holds the assertion on the prompt?:
tests/roadmap/stage/test_roadmap_stage_prompt_rules.pyholds the rules of the stage prompts, and the stage prompt names it as the verify of a prompt change. The request assertions go intests/roadmap/stage/test_roadmap_stage_plan.py, as the issue says. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, tests/roadmap/stage/test_roadmap_stage_prompt_rules.py]- Chosen: The prompt assertion in
test_roadmap_stage_prompt_rules.py. That file holds the rules of the stage prompts, and the stage prompt names it as the verify of a prompt change. - Rejected: Both assertions in
test_roadmap_stage_plan.py. The prompt rule belongs with the other rules of the stage prompts.
- Chosen: The prompt assertion in
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-09: none.
Tool: none found.
Activity
dan-petty commentedon Nov 7, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.It reduces frequent omissions of dependencies in generated plans but does not block other work.It gives the model structured dependency data it currently must infer from prose, improving plan quality.The body states about 2 hours: read dependencies, add a field to the request dict, update one prompt template, and add tests.Both handle issue dependencies in the stage workflow, but the candidate feeds them into the prompt input while #3224 records them in the plan output and checks them.devops-cli-service commentedon Nov 8, 2026
Status set to Ready at 1f03ee3 (see proposed design in issue body).
devops-cli-service commentedon Nov 9, 2026
Alternatives check: none
Reason: One search for tools that read issue dependencies from an issue body returned only unrelated MDN pages. The need is one new field,
issue_dependencies, in the stage prompt request. The project already hasbody_dependenciesto read the declared dependencies, so the work is a few lines in the project's own code plus a prompt edit. No external tool or library covers it.Tool: none found
Lacks:
roadmap_stage_change.mdpromptSearches run:
Checked on 2026-11-09. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 15, 2026
Released in v0.146.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.146.0
devops-cli-service commentedon Nov 15, 2026
Live since 2026-11-15 00:23 UTC