Skip to content

docs(agents): a convention yields to an open tool, and instructions with no check or with a contradiction are pruned #1874

Closed

Description

@dan-petty

Friction

AGENTS.md line 21 says to name the open tool before building (#1833). Line 55 requires every change to meet "all project standards and conventions". Line 54 forbids relaxing "lint rules". No rule says which line wins. An agent that replaces a bespoke check with a standard tool reads the swap as lowering a threshold, and keeps the bespoke code.

Some lines also contradict each other or the repository. AGENTS.md is 39,933 of its 40,000 characters. A new rule cannot enter without a deletion.

Evidence

  • Lines 54, 55 and 86 outrank line 21. Line 86 says "update AGENTS.md with defensive guardrails to prevent recurrence". That rule grew the file.
  • Lines 85 and 90 tell agents to run devops roadmap intake --confirm. Line 152 says only a person runs it. Line 104 tells an agent to run devops roadmap return --confirm, which line 152 also reserves.
  • Line 69 requires "Gated" terminology. Lines 56, 111 and 135 use "Quality Gate". CONTEXT.md lists "quality gate" under Avoid. No test enforces the rule (searched tests/ and src/).
  • Line 88 repeats line 89. Line 94 repeats line 183. Line 76 sets headroom targets (complexity 6, depth 3) next to the cap of 10 and 5 in line 14. Nothing enforces them. The review reports 384 functions in src/ above 6 (not measured again).
  • Line 170 ends with "Open issues queue must never be left empty". Nothing enforces it.
  • Line 23 closes the list of secret stores at the OS keyring and Vault. The repository keeps its token in a cluster Secret (ADR 0004). It also keeps a token in the credential store of gh. docs/ROUTINE_TASKS.md:11 says tokens live "exclusively in the OS Keyring".
  • src/devops_cli/ai/instruction_generator.py:324-331 copies the "never lower" and "continuous compliance" bullets into other repositories. No test pins their wording.
  • Measured on a scratch copy: pairs A01 to A14 and O20 of rigid-rules-new-text.md take AGENTS.md from 39,933 to 38,778 characters.

Decision (owner, 2026-10-22)

An agent files its own drafts with devops roadmap intake --confirm. Every other mutating roadmap command stays with a person. An agent that needs return --confirm asks a person to run it.

Proposed remedy

  • Apply pairs A01 to A14 and O20. Write the pasted text in ASD-STE100 Simplified Technical English.
  • Apply the two generator edits of Part 4. Reword the never-lower bullet. Delete the continuous-compliance bullet.
  • Add one sentence to line 21: a convention is never a reason to keep or write custom code.
  • Merge lines 54 and 55 into one bullet. The bullet separates lowering a threshold from replacing a check with a tool. A tool replaces a check when it enforces at least the same property here. The pull request shows this once.
  • Rewrite lines 104 and 152 as pairs A11 and A12 give. The two lines now agree with lines 85 and 90.

What it deletes

  • About 1,155 characters of AGENTS.md. The Gated terminology rule, the headroom targets, the duplicate intake and naming bullets and the empty-queue sentence go.
  • One bullet of instruction_generator.py.

Tests

  • tests/test_agents_md_claims.py (issue template names, TESTING.md links, budget) stays green without change.
  • tests/test_fail_to_pass.py (the devops ci fail-to-pass phrase) stays green without change.
  • No new test. The changed text names no mechanism that does not exist.

Dependencies

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

Acceptance criteria

  • AGENTS.md is at least 1,100 characters shorter than before the change.
  • Lines 54 and 55 are one bullet. Line 21 carries the precedence sentence.
  • No line tells an agent to run a command that another line reserves for a person.
  • uv run devops ci passes.

Size: S.

regression of #1833

Proposed design

Problem statement

The AGENTS.md document contains contradictory rules, ambiguous instructions, and outdated conventions that create confusion for AI agents. Specifically, there are conflicts between requiring adherence to project standards and allowing custom code, conflicting commands for roadmap intake and return, inconsistent terminology like 'Gated' vs 'Quality Gate', and outdated practices such as keeping tokens in cluster secrets instead of OS keyring.

Acceptance criteria

  • Criterion 1: AGENTS.md is at least 1,100 characters shorter than before the change
    Verification: Measure the character count of AGENTS.md before and after applying the changes
  • Criterion 2: Lines 54 and 55 are merged into one bullet that separates lowering thresholds from replacing checks with tools
    Verification: Verify that lines 54 and 55 have been combined into a single bullet in AGENTS.md
  • Criterion 3: Line 21 carries the precedence sentence stating that conventions are never a reason to keep or write custom code
    Verification: Confirm that line 21 has been updated with the new text about conventions and custom code
  • Criterion 4: No line tells an agent to run a command that another line reserves for a person
    Verification: Review all lines in AGENTS.md to ensure there are no conflicting instructions about who can run roadmap commands
  • Criterion 5: uv run devops ci passes after the changes
    Verification: Execute uv run devops ci and confirm it completes successfully with no failures

Key questions

  • What is the current rule about which line wins when there are conflicts in AGENTS.md?: No rule currently specifies which line takes precedence when conflicts exist between lines 21, 54, 55, and 86. [sources: src/devops_cli/ai/instruction_generator.py:324-331, AGENTS.md:21, AGENTS.md:54, AGENTS.md:55, AGENTS.md:86]
  • How should the conflict between lines 104 and 152 be resolved?: The conflict should be resolved by rewriting these lines to align with lines 85 and 90, which tell agents to run devops roadmap intake --confirm. (proposed) [sources: AGENTS.md:104, AGENTS.md:152, AGENTS.md:85, AGENTS.md:90]
  • What are the specific changes to be made regarding the 'never lower' and 'continuous compliance' bullets?: The 'never-lower' bullet should be reworded, and the 'continuous-compliance' bullet should be deleted as part of the instruction generator edits. (proposed) [sources: src/devops_cli/ai/instruction_generator.py:324-331]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

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 change is about updating documentation in AGENTS.md and related files.
    • Priority: P2-Medium. It resolves inconsistencies in documentation and improves clarity without being critical to core functionality.
    • Value: High. Improves consistency and reduces friction for developers using the agents by clarifying conflicting rules.
    • Effort: Medium. Requires editing multiple sections of AGENTS.md and related files, but does not introduce new features or complex logic.
  3. added this to the v0.2.39 milestone on Oct 22, 2026
  4. added
    status/in-progress
    on Oct 22, 2026
  5. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

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

  6. added a commit that references this issue on Oct 22, 2026
    f8f1527
  7. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1890, merged into release/v0.2.39 as f8f1527.

    Cause: AGENTS.md told an agent to name the open tool before it builds. It also told the agent to meet "all project standards and conventions" and not to relax "lint rules". No rule said which line wins. An agent that replaced a bespoke check with a standard tool read the swap as lowering a threshold, and kept the bespoke code. Some rules contradicted each other. The rule on person-only roadmap commands forbade intake --confirm, while two other rules told agents to run it. The file was at 39,954 of 40,000 characters, so a new rule could not enter without a deletion.

    Change: The bullet "Open Tools Before Internal Code" now says that a convention is never a reason to keep or write custom code, and that the bullet outranks every convention in the file. The bullet "Never Lower Security Standards or Quality Thresholds" now holds the old "Continuous Standards Compliance" bullet. It keeps one sentence of the old bullet: "Every change meets the project standards." It also says that replacing a check with a standard tool is not lowering it when the tool enforces at least the same property on this repository, and that the PR shows both results once. The suspended-Service bullet now lets an agent file its own new candidate with intake --title, --body-file and --confirm. A person keeps close, return, reprioritize, refine, run and intake over existing issues. The bullet "Stop Rather Than Add Compensating Code" asks a person to run roadmap return --confirm. The file d…

    10 file(s) changed.

    How it was verified

    Check runs at a34593f:

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

    Acceptance Criteria of docs/agent/tasks/task-1874-convention-yields-to-open-tool.md:

    • AGENTS.md is 1,104 characters shorter than before the change, at 38,850 of 40,000. tests/test_agents_md_claims.py passes.
    • The compliance bullet is merged into the never-lower bullet, which keeps one sentence of it. The "Open Tools Before Internal Code" bullet carries the precedence sentences.
    • No line tells an agent to run a command that another line reserves for a person. This holds for AGENTS.md and for the generator.
    • The generator no longer writes the continuous-compliance bullet, and its never-lower bullet separates lowering from replacing.
    • No document keeps the empty-queue sentence or the headroom targets.
    • uv run devops docs check finds the generated documents current.
    • devops ci passes.
  8. added a commit that references this issue on Oct 23, 2026
    f209f6c
  9. removed
    status/in-progress
    on Oct 30, 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

    source/agenttype/docs

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions