Repository navigation
Description
Problem or Motivation
The prompt of the stage planner (src/devops_cli/ai/tasks/roadmap_stage_change.md, about 9.9 KB) restates rules that other documents hold: test-first groups, the verify forms, the spec operations, the paths of tests, the cost in the existing-tool section. AGENTS.md says each rule lives in one document only. The planner does not receive AGENTS.md, CONTRIBUTING.md or docs/TESTING.md, so the copy in the prompt is the only way it learns the rules. When a rule changes in a document, the prompt can stay old. #3015 added one test of this kind: every example test path in the prompt and in openspec/config.yaml has a mirror folder. The other rules have none.
Proposed Solution & Architectural Design
- Add tests that read the prompt and the documents and fail when they disagree on a rule that has a machine form:
- the allowed
verifyforms (uv run devops, the! git grepform) match the form check instage_form.py,docs/TESTING.mdandopenspec/config.yaml; - the limit of the pull request body and of the summary match
CONST_*values andCONTRIBUTING.md; - the list of paths that need no spec delta matches the gate (
tests/,.github/workflows/,docs/,openspec/); - the name of each key in the reply matches the fields of
StageProposal.
- the allowed
- Where a rule can be read from one source, generate the line of the prompt from it, and test that the prompt holds the generated line. This removes the copy for that rule.
- Do not copy whole documents into the prompt. The budget of the planner is about 65,000 tokens in the example config.
Open question for the refine step: whether the planner should receive the sections of AGENTS.md and of the documents it routes to, as the implement step does, in place of its own copy. The cost is tokens in a small window.
Target Subsystem
tests/roadmap/, src/devops_cli/ai/tasks/roadmap_stage_change.md, src/devops_cli/roadmap/stage_change.py.
Existing Tool Considered
No tool compares a prompt with documents. The project already tests the prompt in two places (the example paths, and the keys). Cost to build: about 50k tokens and 3 hours. To keep: one test file, plus a change to it when a rule gains a machine form.
Activity
devops-cli-service commentedon Nov 2, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
testprefix of the title gives the type.(roadmap)scope of the title gives the scope.Prevents prompt drift that causes incorrect plans, but no current failure is reported.Stops silent rule drift in the prompt, which produces flawed plans for every stage run.The body estimates about 50k tokens and 3 hours for one test file plus a generation step.Both concern the stage planner prompt and its rules, but #3015 enforces rules on the proposal output while the candidate tests the prompt file against the source documents.