Skip to content

fix(docs): rule documents name files that are gone or moved #3508

Closed

Description

@dan-petty

Problem

Three documents state facts that are false in the tree at origin/main 46cf288. An agent that follows them looks in the wrong place. The evaluation of the window 2026-11-03T15:05Z to 2026-11-04T15:05Z found these statements.

No test holds these facts. test_agents_md_routes_each_kind_of_task_to_a_document_that_exists (tests/invariants/test_agents_md_claims.py:192) reads link hrefs only, so it does not read the backticked path at AGENTS.md:39. test_a_generated_agents_md_routes_no_task_to_a_review_guards_file reads only a generated file.

Expected

Acceptance criteria

  • grep -n '\.devops/review\.md' AGENTS.md prints nothing.
  • AGENTS.md names .devops/review.toml for suppressions and severity caps.
  • grep -c flat docs/TESTING.md prints 0.
  • .devops/review.md is in CONST_DELETED_PROCESS_TERMS of tests/invariants/test_agents_md_claims.py, and test_no_agent_instruction_names_a_deleted_process passes. At 46cf288, AGENTS.md is the only file that this test scans and that names the term.
  • A new test fails when a backticked tests/ path in docs/TESTING.md does not exist. It accepts a placeholder such as tests/support/fakes/<edge>.py and a path marked *(target)*, such as tests/roadmap/test_duplicate_candidates.py.
  • The calibration record of session 20260927-150737 in docs/SELF_IMPROVEMENT.md says that refactor(review): the review guards of .devops/review.md get a reader, or the guards and the unread constant are deleted #1916 retired the file.

Existing tool considered

tests/invariants/test_agents_md_claims.py holds the term check. lychee runs in CI (.github/workflows/ci.yml:703), and it reads links, not backticked paths, so it does not cover this need.

Related

#1336 and #2594 touch nearby text, but neither removes these statements.

Related: #2594, #1336, #1916, #1313

Proposed design

Problem statement

Three documents name paths that are gone or moved. An agent follows them to the wrong place. The change corrects AGENTS.md and docs/TESTING.md, annotates the calibration record, and adds a test for backticked tests/ paths.

Acceptance criteria

Requirement: No retired review guards path

AGENTS.md SHALL name no .devops/review.md path.

Scenario: The retired path is absent

  • WHEN A reader runs grep -n '\.devops/review\.md' AGENTS.md.
  • THEN The command prints nothing and exits with status 1.

Requirement: Review configuration path

AGENTS.md SHALL name .devops/review.toml as the file that holds suppressions and severity caps.

Scenario: The review row names the configuration file

  • WHEN A reader reads the review row of AGENTS.md.
  • THEN The row names .devops/review.toml for suppressions and severity caps.

Requirement: Retired file in calibration record

The calibration record of session 20260927-150737 in docs/SELF_IMPROVEMENT.md SHALL state that #1916 retired .devops/review.md.

Scenario: The calibration record names the retirement

Requirement: No flat test file text

docs/TESTING.md SHALL contain no occurrence of the text flat.

Scenario: The text is absent

  • WHEN A reader runs grep -c flat docs/TESTING.md.
  • THEN The command prints 0.

Requirement: Mirror test layout

docs/TESTING.md SHALL state that test files sit in mirror subdirectories under tests/.

Scenario: The layout text names the mirror layout

  • WHEN A reader reads the test layout section of docs/TESTING.md.
  • THEN The section states that each test file sits in the subdirectory that mirrors its source path.

Requirement: Moved test files keep a real path

docs/TESTING.md SHALL name each moved test file by its real path under tests/, including tests/ai/rag/test_rag_qdrant.py and tests/invariants/test_architectural_invariants.py.

Scenario: A moved test path resolves

  • WHEN A reader reads the Qdrant and architectural-invariant examples in docs/TESTING.md.
  • THEN The document names tests/ai/rag/test_rag_qdrant.py and tests/invariants/test_architectural_invariants.py, and both files exist.

Requirement: Snapshot path resolves

docs/TESTING.md SHALL name tests/ci/__snapshots__/test_fail_to_pass.ambr for the fail-to-pass snapshot.

Scenario: The snapshot path resolves

  • WHEN A reader reads the fail-to-pass snapshot path in docs/TESTING.md.
  • THEN The document names tests/ci/__snapshots__/test_fail_to_pass.ambr, and the file exists.

Requirement: Missing test path fails the check

A new invariant test SHALL fail when a backticked tests/ path in docs/TESTING.md does not exist.

Scenario: A missing path is rejected

  • WHEN The new test reads a temporary docs/TESTING.md that names a missing backticked tests/ path.
  • THEN The test fails and names the missing path.

Requirement: Allowed test path forms

The new invariant test MUST accept a backticked tests/ path that holds a <...> placeholder or that a *(target)* mark follows.

Scenario: Allowed forms pass

  • WHEN The new test reads a temporary docs/TESTING.md that names tests/support/fakes/.py and tests/roadmap/test_duplicate_candidates.py with a *(target)* mark.
  • THEN The test passes and reports no missing path.

Requirement: Deleted process term

tests/invariants/test_agents_md_claims.py SHALL list .devops/review.md in CONST_DELETED_PROCESS_TERMS.

Scenario: The deleted-term check covers the retired path

  • WHEN A reader runs test_no_agent_instruction_names_a_deleted_process.
  • THEN The list contains .devops/review.md, and the test passes.

Requirement: Historical records stay unchanged

The change SHALL leave lines 867-989 of docs/SELF_IMPROVEMENT.md, CHANGELOG.md, openspec/specs/review-conventions/spec.md and the archived OpenSpec changes unchanged.

Scenario: Historical records stay unchanged

  • WHEN A reviewer inspects the diff of the change.
  • THEN The diff holds no change to those files or lines.

Existing Tool Considered

No alternatives check has run. lychee runs in CI at .github/workflows/ci.yml:703, and it reads links, not backticked paths, so it does not cover this need. tests/invariants/test_agents_md_claims.py holds the deleted-process-term check and can hold the new path check.

Key questions

  • Which test holds the deleted-process-term check?: test_no_agent_instruction_names_a_deleted_process in tests/invariants/test_agents_md_claims.py holds the check. [sources: tests/invariants/test_agents_md_claims.py]
  • Which file does AGENTS.md name for suppressions and severity caps?: AGENTS.md names .devops/review.toml. (best practice) [sources: AGENTS.md:39, .devops/review.toml, docs/SELF_IMPROVEMENT.md:134]
  • How does the calibration record treat .devops/review.md?: Keep the record and state that refactor(review): the review guards of .devops/review.md get a reader, or the guards and the unread constant are deleted #1916 retired the file. (best practice) [sources: docs/SELF_IMPROVEMENT.md:202, docs/SELF_IMPROVEMENT.md:261, docs/SELF_IMPROVEMENT.md:134]
    • Rejected: Delete the line. The calibration record is history and must stay.
    • Rejected: Rewrite the line to .devops/review.toml. That file holds suppressions and caps, not the settled-claims guards that the line names.
    • Chosen: Keep the line and add the retirement note. The record stays true and names the retirement.
  • How should docs/TESTING.md describe the test layout?: It states that test files sit in mirror subdirectories under tests/. (best practice) [sources: docs/TESTING.md:203, docs/TESTING.md:205, tests/ai/rag/test_rag_qdrant.py, tests/invariants/test_architectural_invariants.py]
    • Rejected: Keep flat-file text. No test file sits at the top of tests/, so the text is false.
    • Chosen: State the mirror layout. The repository holds test files in subdirectories that mirror their source paths.
    • Rejected: Remove the layout text. A reader needs the rule that places a new test module.
  • How does the new test treat a placeholder or a target-marked path?: The new test accepts a path with a <...> placeholder and a path that a *(target)* mark follows. (best practice) [sources: docs/TESTING.md, tests/invariants/test_agents_md_claims.py]
    • Rejected: Reject every non-existing path. A placeholder names a planned fake, and a target-marked path names a planned test.
    • Rejected: Skip every tests/ path. The check would miss the 14 moved paths that this issue corrects.
    • Chosen: Accept a placeholder and a target-marked path. The exception keeps a planned path in the document and still checks every real path.
  • What are the real paths of the two cited test files?: tests/test_rag_qdrant.py is tests/ai/rag/test_rag_qdrant.py, and tests/test_architectural_invariants.py is tests/invariants/test_architectural_invariants.py. [sources: tests/ai/rag/test_rag_qdrant.py, tests/invariants/test_architectural_invariants.py]
  • What is the real path of the fail-to-pass snapshot?: tests/__snapshots__/test_fail_to_pass.ambr is tests/ci/__snapshots__/test_fail_to_pass.ambr. [sources: tests/ci/snapshots/test_fail_to_pass.ambr]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    scope/docs
    status/new
    value/medium
    effort/low
    on Nov 4, 2026
  2. dan-petty commented on Nov 4, 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/docs. The (docs) scope of the title gives the scope.
    • Priority: P2-Medium. Stale doc paths misdirect agents but do not break build or runtime.
    • Value: Medium. Fixes wrong file references that cause agents to look in the wrong place.
    • Effort: Low. Edit a few lines in three doc files and add one new invariant test.
  3. added
    priority/p2-medium
    on Nov 4, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 5, 2026
  5. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    Contributor

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

  6. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 6, 2026
  7. removed
    status/in-review
    on Nov 6, 2026
  8. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor
  9. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-06 07:13 UTC

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/docssource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions