Skip to content

docs/loop.md is an agent doc in the end-user docs directory #255

Closed

Description

@V3RON

`docs/loop.md` ("Implementation loop", described as historical instructions for implementing a stage) sits in `docs/` and points into `docs/internal/agent-rules/` and `docs/internal/ARCHITECTURE.md` (lines 8, 34, 44, 47). Documentation rules 1 and 2 (`docs/internal/agent-rules/documentation.md`) put maintainer/agent docs under `docs/internal/` and forbid end-user docs from pointing there. It survived the split in #134.

Found while triaging #186.

Written by an agent.

Activity

  1. added
    bug:new
    on Oct 2, 2026
  2. removed
    bug:new
    on Oct 2, 2026
  3. self-assigned this
    on Oct 2, 2026
  4. V3RON commented on Oct 2, 2026

    @V3RON
    ContributorAuthor

    Reproduction

    Gap, confirmed. Same root cause and one fix as #254. Recommend this issue's PR carry both: its branch holds the full guard, and #254 closes when it merges.

    src/docs-audience.test.ts on bug/255-repro (a4a5993). The expectation is a proposal: no check exists today. Two tests fail:

    pnpm exec vitest run --project unit src/docs-audience.test.ts
    
    × end-user docs > name no path under docs/internal/, no internal-only doc by file name, and no ADR
    +   "docs/HTTP-API.md:499: docs/internal",            (#254)
    +   "docs/loop.md:8: docs/internal",  … 10 loop.md hits (lines 8, 28, 34, 44, 45, 47)
    
    × the files directly in docs/ > are exactly the end-user docs AGENTS.md and documentation rule 2 list
        "listedInAgents": [ … "docs/HTTP-API.md",
    +     "docs/loop.md",
        "listedInRule2":  [ … "docs/HTTP-API.md",
    +     "docs/loop.md",
    

    The issue named lines 8, 34, 44 and 47. Lines 28 and 45 also cite internal docs by bare name (ARCHITECTURE.md, safety.md).

    Root cause

    docs/loop.md. Nothing checks documentation rule 1 or 2. The only test that reads docs/ is src/contract/doc-samples.test.ts, and it parses JSON samples only. The split in #134 (b9d1221) listed the six end-user docs but did not move loop.md.

    Nothing reads docs/loop.md. git grep finds no mention of loop.md in skills, AGENTS.md, .github/ or src/. The file has only backticked paths, no relative links, so a move breaks nothing.

    Simplest fix

    git mv docs/loop.md docs/internal/LOOP.md (rule 5 casing), and add it to AGENTS.md's maintainer list. Delete the #254 parenthesis at docs/HTTP-API.md:496-500. Land the test. Checked locally: all four tests pass.

    Alternatives rejected

    Risk

    • The membership test parses AGENTS.md between "End-user docs live directly under" and "Maintainer/agent docs live under", and rule 2 between 2. ** and 3. **. A reworded heading fails the guard test, by design.

    Written by an agent.

  5. removed their assignment
    on Oct 2, 2026
  6. added
    bug:ready
    on Oct 2, 2026
  7. self-assigned this
    on Oct 2, 2026
  8. added 2 commits that reference this issue on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug:ready

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions