Repository navigation
Description
Problem or Motivation
openspec/config.yaml rule 3 states that a change that alters no behavior a consumer observes (tests, workflows, documentation) carries no spec delta and sets skip_specs: true.
In src/devops_cli/roadmap/stage_change.py, _needs_no_spec checks whether paths start with _NO_SPEC_PREFIXES:
("tests/", ".github/workflows/", "docs/", "openspec/").
Documentation in this repository lives in docs/ and also in src/devops_cli/ai/knowledge_base/ (which contains markdown reference manuals). Because knowledge base manuals live under src/:
- The stage job does not classify knowledge base changes as documentation, and generates unnecessary spec deltas (for example, generating
specs/knowledge-base-manual/spec.mdin PR docs(openspec): plan #3106 point the harness manual at pydantic-ai #3211 for issue docs(ai): point the harness manual at pydantic-ai #3106). - The stage task instructions in
src/devops_cli/ai/tasks/roadmap_stage_change.mdname onlytests/,.github/workflows/,docs/, andopenspec/, so the model does not setskip_specs: truefor knowledge base documentation changes. - Related issue fix(roadmap): Refuse a spec delta on root documents #3212 adds root documents (
*.mdoutsidesrc/), but does not cover knowledge base documentation manuals insidesrc/devops_cli/ai/knowledge_base/.
Proposed Solution & Architectural Design
- Add
"src/devops_cli/ai/knowledge_base/"to_NO_SPEC_PREFIXESinsrc/devops_cli/roadmap/stage_change.py. - Update
src/devops_cli/ai/tasks/roadmap_stage_change.mdto instruct the planner that knowledge base manuals undersrc/devops_cli/ai/knowledge_base/are documentation and requireskip_specs: truewith no spec delta. - Add a unit test in
tests/roadmap/test_stage_change.pyasserting that a change that touches onlysrc/devops_cli/ai/knowledge_base/andtests/setsskip_specs: trueand needs no spec delta.
Target Subsystem
src/devops_cli/roadmap/stage_change.py, src/devops_cli/ai/tasks/roadmap_stage_change.md
Existing Tool Considered
_needs_no_spec in stage_change.py is the existing gate function. Extending its path prefix tuple covers knowledge base documentation changes without adding external dependencies. Cost to build: about 4,000 tokens and 30 minutes.
Proposed design
Problem statement
The stage job decides that a change needs no spec delta from the prefixes of its paths. The knowledge base manuals live under src/devops_cli/ai/knowledge_base/, and the prefixes do not hold that path. The job then writes a spec delta for a documentation change, and the prompt tells the model to do the same. The change adds the path to the gate and to the prompt, and tests both.
Acceptance criteria
Requirement: Knowledge base paths need no spec delta
The stage gate SHALL classify a change that touches only knowledge base manuals and tests as a change that needs no spec delta.
Scenario: Knowledge base manual and test paths
- WHEN A proposal changes only
src/devops_cli/ai/knowledge_base/example.mdandtests/roadmap/test_stage_change.py. - THEN
_needs_no_specreturns true.
Requirement: A spec delta for knowledge base paths is refused
The stage check SHALL report a problem when a plan changes only knowledge base manuals and holds a spec delta.
Scenario: Spec delta on a knowledge base change
- WHEN A proposal sets
skip_specs: false, holds a spec delta, and changes onlysrc/devops_cli/ai/knowledge_base/example.md. - THEN
check_proposalreturns a problem that namessrc/devops_cli/ai/knowledge_base/.
Requirement: The staging prompt names the knowledge base manuals
The staging prompt SHALL name src/devops_cli/ai/knowledge_base/ in the rule that sets skip_specs.
Scenario: The prompt rule for skip_specs
- WHEN A test reads
src/devops_cli/ai/tasks/roadmap_stage_change.mdand selects the bullet that holdsskip_specs. - THEN The bullet holds
src/devops_cli/ai/knowledge_base/.
Requirement: The prompt and the gate list the same prefixes
The staging prompt SHALL name every path prefix of _NO_SPEC_PREFIXES.
Scenario: A prefix that the prompt omits
- WHEN A test reads
_NO_SPEC_PREFIXESand the text ofsrc/devops_cli/ai/tasks/roadmap_stage_change.md. - THEN Each prefix appears in the prompt text.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this need. The change extends the existing gate _needs_no_spec in src/devops_cli/roadmap/stage_change.py. The body gives the written cost: about 4,000 tokens and 30 minutes.
Key questions
- Which gate decides that a change needs no spec delta, and which paths does it list?:
_needs_no_specatsrc/devops_cli/roadmap/stage_change.py:432returns true when every changed path starts with a prefix in_NO_SPEC_PREFIXESat line 84. The tuple holdstests/,.github/workflows/,docs/andopenspec/. It holds no path for the knowledge base manuals undersrc/devops_cli/ai/knowledge_base/. [sources: src/devops_cli/roadmap/stage_change.py:84, src/devops_cli/roadmap/stage_change.py:432] - Should the gate add the knowledge base directory as a prefix, or treat every
.mdpath undersrc/as a document?: Addsrc/devops_cli/ai/knowledge_base/to_NO_SPEC_PREFIXES, beforeopenspec/, with the trailing slash that the other entries have. Do not add a general.mdrule. (best practice) [sources: src/devops_cli/roadmap/stage_change.py:84, src/devops_cli/ai/tasks/roadmap_stage_change.md]- Chosen: Add the knowledge base directory prefix. The issue asks for it, and fix(roadmap): Refuse a spec delta on root documents #3212 owns the root documents. The change stays small.
- Rejected: Treat every
.mdpath as a document. The promptsrc/devops_cli/ai/tasks/roadmap_stage_change.mdchanges model behavior, and a.mdrule would give it no spec delta. - Rejected: Treat every
.mdpath undersrc/devops_cli/ai/as a document. It would also classify the prompts insrc/devops_cli/ai/tasks/as documentation.
- How does the change record the new path in the specs?: The change carries a spec delta and sets
skip_specs: false. It MODIFIES theroadmap-stagerequirementRefuse a spec delta that the changed paths do not needto namesrc/devops_cli/ai/knowledge_base/. It keeps every scenario of that requirement. (best practice) [sources: openspec/specs/roadmap-stage/spec.md, openspec/config.yaml]- Chosen: MODIFY the existing roadmap-stage requirement. The requirement already states the rule, and the change adds one path to it.
- Rejected: ADD a new requirement for the knowledge base path. It restates the same rule and splits one rule over two requirements.
- Where does the unit test of the gate go?: Add the test to
tests/roadmap/test_stage_change.py, as the issue says. If the file is absent, create it intests/roadmap/, which mirrorssrc/devops_cli/roadmap/. (best practice) [sources: openspec/config.yaml, tests/roadmap/test_roadmap_stage_eval_gates.py:350]- Chosen: Add the test to
tests/roadmap/test_stage_change.py. The issue names it, and the folder mirrors the package ofstage_change.py. - Rejected: Add the test to
tests/roadmap/test_roadmap_stage_eval_gates.py. That module maps each gate to a defect type, and a behavior test does not fit its table.
- Chosen: Add the test to
- Should a test keep the prompt and the gate in step?: Yes. Add a test that reads
_NO_SPEC_PREFIXESandsrc/devops_cli/ai/tasks/roadmap_stage_change.md. The test asserts that the prompt names each prefix. (best practice) [sources: src/devops_cli/roadmap/stage_change.py:84, src/devops_cli/ai/tasks/roadmap_stage_change.md]- Chosen: Add the prompt-and-gate test. The issue shows two lists that must agree. A test stops a later prefix from missing the prompt.
- Rejected: Change the prompt only. The two lists can drift again, and no test reports it.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 2, 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.devops-cli-service commentedon Nov 3, 2026
Status set to Ready at 2eede7c (see proposed design in issue body).
devops-cli-service commentedon Nov 3, 2026
The stage job returned the item to New. The premise of the issue does not hold at the staging commit, so the job planned no change and opened no pull request.
Evidence:
x
dan-petty commentedon Nov 4, 2026
This item moves into #3212. Both change the tuple
_NO_SPEC_PREFIXESatsrc/devops_cli/roadmap/stage_change.py:100and its prompt sentence, and #3282 names #3212 as related.What moved, in the section
Scope from #3282of #3212: the prefixsrc/devops_cli/ai/knowledge_base/, the limit that a.mdfile undersrc/devops_cli/ai/tasks/stays observable, the prompt sentence, the MODIFIED requirement, the cases, the cost, and the evidence of PR #3211 for #3106.Not moved: the new prompt-and-gate test, because
tests/roadmap/test_roadmap_stage_prompt_rules.py:288already holds it. The test pathtests/roadmap/test_stage_change.pydoes not exist.The stage comment of 2026-11-03T01:33Z gave the evidence
x, which is no finding. This item has no change folder, no open pull request and no parent issue.