Skip to content

fix(roadmap): stage refuses skip_specs for knowledge base manuals under src #3282

Closed as not planned

Description

@dan-petty

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/:

  1. The stage job does not classify knowledge base changes as documentation, and generates unnecessary spec deltas (for example, generating specs/knowledge-base-manual/spec.md in 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).
  2. The stage task instructions in src/devops_cli/ai/tasks/roadmap_stage_change.md name only tests/, .github/workflows/, docs/, and openspec/, so the model does not set skip_specs: true for knowledge base documentation changes.
  3. Related issue fix(roadmap): Refuse a spec delta on root documents #3212 adds root documents (*.md outside src/), but does not cover knowledge base documentation manuals inside src/devops_cli/ai/knowledge_base/.

Proposed Solution & Architectural Design

  1. Add "src/devops_cli/ai/knowledge_base/" to _NO_SPEC_PREFIXES in src/devops_cli/roadmap/stage_change.py.
  2. Update src/devops_cli/ai/tasks/roadmap_stage_change.md to instruct the planner that knowledge base manuals under src/devops_cli/ai/knowledge_base/ are documentation and require skip_specs: true with no spec delta.
  3. Add a unit test in tests/roadmap/test_stage_change.py asserting that a change that touches only src/devops_cli/ai/knowledge_base/ and tests/ sets skip_specs: true and 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.md and tests/roadmap/test_stage_change.py.
  • THEN _needs_no_spec returns 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 only src/devops_cli/ai/knowledge_base/example.md.
  • THEN check_proposal returns a problem that names src/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.md and selects the bullet that holds skip_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_PREFIXES and the text of src/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_spec at src/devops_cli/roadmap/stage_change.py:432 returns true when every changed path starts with a prefix in _NO_SPEC_PREFIXES at line 84. The tuple holds tests/, .github/workflows/, docs/ and openspec/. It holds no path for the knowledge base manuals under src/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 .md path under src/ as a document?: Add src/devops_cli/ai/knowledge_base/ to _NO_SPEC_PREFIXES, before openspec/, with the trailing slash that the other entries have. Do not add a general .md rule. (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 .md path as a document. The prompt src/devops_cli/ai/tasks/roadmap_stage_change.md changes model behavior, and a .md rule would give it no spec delta.
    • Rejected: Treat every .md path under src/devops_cli/ai/ as a document. It would also classify the prompts in src/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 the roadmap-stage requirement Refuse a spec delta that the changed paths do not need to name src/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 in tests/roadmap/, which mirrors src/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 of stage_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.
  • Should a test keep the prompt and the gate in step?: Yes. Add a test that reads _NO_SPEC_PREFIXES and src/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

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 2, 2026
  2. dan-petty commented on Nov 2, 2026

    @dan-petty
    OwnerAuthor

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

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium.
    • Value: Medium.
    • Effort: Low.
  3. added
    priority/p2-medium
    on Nov 2, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 3, 2026
  5. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor

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

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

    @devops-cli-service
    Contributor

    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

  7. added
    status/new
    and removed
    status/ready
    on Nov 3, 2026
  8. dan-petty commented on Nov 4, 2026

    @dan-petty
    OwnerAuthor

    This item moves into #3212. Both change the tuple _NO_SPEC_PREFIXES at src/devops_cli/roadmap/stage_change.py:100 and its prompt sentence, and #3282 names #3212 as related.

    What moved, in the section Scope from #3282 of #3212: the prefix src/devops_cli/ai/knowledge_base/, the limit that a .md file under src/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:288 already holds it. The test path tests/roadmap/test_stage_change.py does 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.

  9. removed
    status/new
    on Nov 4, 2026
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/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions