Skip to content

docs(agents): review-only guards move from AGENTS.md to .devops/review.md #1881

Closed

Description

@dan-petty

Friction

Eight bullets in AGENTS.md section 5 tell a review model what not to flag. Agents that work on the code read them as instructions that they cannot use. The bullets take 1,460 characters of a file that has 39,933 of 40,000 characters. A deletion would lose guards that exist nowhere else.

Evidence

  • devops review reads AGENTS.md as conventions and .devops/review.md as review_conventions (commands/review.py:1718-1719, review_environment.nearest_review_conventions). .devops/review.md does not exist in this repository. .devops/ holds review.toml.
  • A search of src/devops_cli/ai/tasks/ finds no NameError, CWE-200 or outputs.tf text. review.md there carries the getattr guard, the criteria wording and the SSRF wording. So the claim of the review, "duplicates ai/tasks/review.md", holds for part of the set only.
  • ADR 0005 says findings come from tools, not models. Whether the guards are still needed is a separate question.

Decision (owner, 2026-10-22)

Path-scoped rule files are allowed. The review-only guards move from AGENTS.md to .devops/review.md, word for word.

Proposed remedy

  • Create .devops/review.md from lines 207, 208 and 211 to 214 of AGENTS.md (Part 2 of rigid-rules-new-text.md).
  • Replace those lines in AGENTS.md with one pointer bullet (pairs A30 and A31). Write the pointer bullet in ASD-STE100 Simplified Technical English.

What it deletes

  • 1,462 characters of AGENTS.md.

Tests

  • tests/test_docs_review_loop.py still finds the devops review examples of AGENTS.md.
  • A new test checks that nearest_review_conventions of the repository root returns the new file.

Dependencies

  • docs(agents): agents and devops ai write in ASD-STE100 Simplified Technical English. Both items edit AGENTS.md.

Acceptance criteria

  • The guards are in .devops/review.md word for word.
  • AGENTS.md section 5 no longer lists them.
  • uv run devops ci passes.

Size: S.

Activity

  1. added
    source/agent
    type/docs
    on Oct 22, 2026
  2. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/docs. The candidate is about moving documentation from one file to another.
    • Priority: P2-Medium. It's a documentation change that affects how agents interpret instructions, but doesn't introduce new features or fix bugs.
    • Value: Medium. Improves clarity and maintainability of documentation for agents, which is valuable but not critical to core functionality.
    • Effort: Low. Involves moving a small section of text and creating a new file, which requires minimal development effort.
  3. added this to the v0.2.39 milestone on Oct 22, 2026
  4. added a commit that references this issue on Oct 22, 2026
    816b83d
  5. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1905, merged into release/v0.2.39 as 816b83d.

    Cause
    Six bullets in section 5 of AGENTS.md tell a review what not to flag. An agent that writes code cannot use them. They used 1,754 characters of a file with a cap of 40,000.

    Change
    The six guards now live in .devops/review.md, word for word. The function nearest_review_conventions loads that file. AGENTS.md keeps one pointer bullet, "Review Guards", and is 1,611 characters shorter. CONST_DOCS_INVENTORY lists the new file as a prompt. The guards no longer reach GitHub Copilot code review. Copilot reads AGENTS.md, CLAUDE.md, GEMINI.md and REVIEW.md, and it does not list .devops/review.md. No prompt of devops review carries .devops/review.md. The only readers in src are the defect corpus generator and the pull request checkout. The task file keeps the decision about Copilot and the decision about a reader as steps for a person.

    Existing tool considered
    No build. The tests use syrupy, which the project already has. A snapshot holds the full text of the file, as docs/TESTING.md requires for a text that is the contract.

    Tests
    tests/test_review_project_conventions.py has two tests. The first compares the text that the real loader returns with a snapshot. The second takes each guard from the loaded file. It checks that AGENTS.md holds none of them and names .devops/review.md once. Two negative controls give the check a file with other text and a text with one guard. Mutation proof: three guards changed to "may" fail the snapshot test, and so does a removed file. A restored bas…

    7 file(s) changed.

    How it was verified

    Check runs at e99c3e7:

    • Prune PR DevContainer Images: pass
    • Audit Defect PR Hardening: skipping
    • zizmor: pass
    • devops-cli: pass
    • bandit: pass
    • CodeQL: pass
    • Dependency Freshness: skipping
    • Rule Pack Tests: pass
    • Fail-to-Pass Self-Check: pass
    • Changed-Test Independence: pass
    • Tests & Coverage: pass
    • Analyze (python): pass
    • Fail-to-Pass Check: pass
    • Static Analysis: pass
    • Analyze (actions): pass
    • DevContainer Image: skipping
    • Service Image: skipping

    Acceptance Criteria of docs/agent/tasks/task-1881-review-guards-move-to-devops-review-md.md:

    • .devops/review.md holds the six guards word for word. A snapshot pins the full text. The new tests fail on the base tree and pass now.
    • Section 5 of AGENTS.md no longer lists the guards. It has one pointer bullet, and a test checks that bullet.
    • AGENTS.md is 1,611 characters shorter, at 37,260 of 40,000. tests/test_agents_md_claims.py passes.
    • tests/test_docs_review_loop.py still finds the devops review examples of AGENTS.md.
    • uv run devops ci passes (pre-push hook).
    • Pending a person: put docs(agents): review-only guards move from AGENTS.md to .devops/review.md #1881 into the milestone of the release branch that takes this pull request. The issue is in the backlog, and devops pr check-readiness blocks a pull request into release/v0.2.39 for an item of the backlog. Agents set no milestone.
    • Pending a person: decide whether the guards still need a reader. No model prompt of devops review carries them, and the group analysis stage may not originate findings (ADR 0005). If a reader is wanted, a later item passes nearest_review_conventions to the analysis stage. If not, a later item deletes the guards.
    • Pending a person: decide about GitHub Copilot code review. The GitHub documentation (read on 2026-10-22) says that it reads AGENTS.md, CLAUDE.md, GEMINI.md and REVIEW.md from the head branch of a pull request. It does not list .devops/review.md. So it no longer sees the guards on a pull request into main. This is the one live reader that the move removes.
  6. added a commit that references this issue on Oct 23, 2026
    f209f6c
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

    source/agenttype/docs

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions