Repository navigation
Description
What happened
About 14 of 37 plans use uv run pytest <file> as the verify command, and about 6 put new test files at the flat tests/test_x.py path, although docs/TESTING.md says tests mirror the package tree and openspec/config.yaml names uv run devops ci test <path>. The prompt gives tests/test_feature.py as its example, which pulls the model to a flat path. Nothing enforces the form.
What should happen
check_proposalrefuses averifycommand that does not start withuv run devops ci test,uv run devops ci,uv run devops openspec,uv run devops docsor anotheruv run devopscommand, and refuses acreatespath undertests/that is not in the mirror directory of the code it tests or intests/invariants/.- The prompt and
openspec/config.yamlgive a mirrored example path.
Acceptance criteria
- A
uv run pytestverify command is refused with a problem text. - A flat new test path is refused.
- A test fails if the prompt holds a flat example path.
Source
An evaluation on 2026-11-01 of the 37 docs(openspec): plan #N pull requests (35 merged, 2 open) found 34 that need fixes and 1 to reject. The per-PR reviews are in the comments of tracker #3005's thread and in .data/agent/scratch/plan-review.json of the owner's workstation. Related: #3005 (the kind of a task group: test for behavior, a repeatable check for other changes).
Proposed design
Problem statement
The stage job accepts verify commands that use uv run pytest and test paths that sit flat under tests/, even though the project convention requires uv run devops ci test and a mirror of the package tree. About 14 of 37 recent plans used the wrong verify command and about 6 used a flat test path. The prompt example and the config example both show a flat path, which pulls the model to the wrong form. Nothing in check_proposal enforces the correct form.
Acceptance criteria
Requirement: verify-command-prefix
check_proposal SHALL refuse a verify command that does not start with uv run devops.
Scenario: pytest verify command is refused
- WHEN a stage group's verify command is
uv run pytest tests/test_feature.py - THEN check_proposal returns a problem that names the verify command
Requirement: test-path-mirror
check_proposal SHALL refuse a creates path under tests/ that is not in the mirror directory of the code it tests or in tests/invariants/.
Scenario: flat test path is refused
- WHEN a stage group creates
tests/test_feature.pyand changessrc/devops_cli/roadmap/stage.py - THEN check_proposal returns a problem that names the path and the expected mirror directory
Requirement: prompt-example-mirrored
the stage prompt and openspec/config.yaml SHALL use a mirrored test path as their example.
Scenario: prompt example is a mirrored path
- WHEN the stage prompt text and the config example are read
- THEN the example test path is under a subdirectory of
tests/that matches a package undersrc/devops_cli/
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers the need to validate a stage job's verify command prefix and test path mirror convention. The project extends its own check_proposal function. The written cost is the tokens to implement the prefix check and the path mirror check, to maintain them as the allowed command set or the mirror convention changes, and to fix them when the stage job schema evolves, plus the elapsed time of one focused change.
Key questions
- What prefix must a verify command start with?: The verify command must start with
uv run devops. (best practice) [sources: openspec/config.yaml, docs/TESTING.md]- Rejected: Allow only
uv run devops ci test. Too narrow. The body namesuv run devops ci,uv run devops openspecanduv run devops docsas valid verify commands too. - Chosen: Allow any
uv run devopsprefix. Covers every valid verify command the body names and leaves room for future devops subcommands. - Rejected: Allow any
uv runprefix. Too broad. It allowsuv run pytest, which is the defect this issue fixes.
- Rejected: Allow only
- What is the mirror rule for a new test path under
tests/?: A test file undertests/must sit in the directory that mirrors the package of the code it tests, or intests/invariants/. [sources: docs/TESTING.md] - Where does the validation check live?: In
check_proposal, which already validates the stage reply and appends problems. (best practice) [sources: openspec/changes/archive/2026-11-01-3010-stage-refuses-missing-paths/design.md]- Chosen: In
check_proposal. It already validates the stage reply and appends problems to the reply. The archived change for fix(roadmap): the stage job refuses a plan that names a path that does not exist #3010 shows this pattern. - Rejected: In a new standalone function. Adds a new call site and a new error path for a check that is one of several on the same reply.
- Chosen: In
- What example path does the prompt and config use?: A mirrored path such as
tests/roadmap/test_feature.py. (best practice) [sources: docs/TESTING.md]- Rejected: Keep
tests/test_feature.py. It is a flat path. The body says it pulls the model to a flat path. - Chosen: Use a mirrored path like
tests/roadmap/test_feature.py. It matches the convention in docs/TESTING.md and shows the model the expected form.
- Rejected: Keep
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 1, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.The gap causes repeated bad plans but does not block the pipeline or expose a security risk.It prevents the model from generating plans with wrong verify commands and flat test paths, reducing rework.It needs a check in check_proposal, a prompt update, a config update, and a test for each rule.Both items add validation in the stage job for plan content, but #3010 checks that named paths exist while this candidate checks command form and path structure.devops-cli-service commentedon Nov 1, 2026
Status set to Ready at bf69f39 (see proposed design in issue body).
test(roadmap): replay the defects whose gates exist now (#3214)
feat(roadmap): refuse a stage plan with placeholder or cut text (#3367)
docs(openspec): plan #3187 group the roadmap job modules in subpackag…