Skip to content

CI: doc-accuracy PR reviewer (Layer 2) + docs-affected map #490

Closed

Description

@nockawa

Implements Layer 2 (and Layer 3) of the doc-accuracy design — claude/design/doc-accuracy-and-generated-artifacts.md.

Context

Layer 1 (the deterministic gates) is already live in .github/workflows/build-docs.yml:

  • python3 scripts/gen-telemetry-reference.py --check — regenerate-and-diff freshness gate for the generated telemetry flag reference (the output is a pure function of TelemetryConfig.cs, so the diff is the staleness detector and cannot miss).
  • A broken-link / unresolved-xref gate — greps the docfx build log for InvalidFileLink|InvalidBookmark|UidNotFound|InvalidXref. Baseline at the time of writing: zero.

What's left is the semantic half — the drift no linter can catch, where prose contradicts the code. Real examples caught by hand in the 2026-07 doc pass:

  • snapshot-isolation described as allowing phantom reads (it prevents them — the real anomaly is write skew).
  • A storage-mode write-cost table showing a ~50× ratio while the surrounding prose already said ~6×.
  • A page claiming "the ~200 telemetry flags are listed here" when they were not.

None of these are catchable by a linter, and none have a generated artifact to diff against. That residue is what this issue automates.

Scope

  1. docs-affected map — the twin of scripts/test-affected.py's src→fixture map, mapping a source area to the doc pages that describe it. A PR touching AccessControl.cs must not re-audit 33 concept pages.
  2. Claude Code PR job — same infra as the existing issue-triage bot; reads the diff + only the mapped doc pages and posts findings.
  3. (Layer 3) a periodic full-corpus audit that files issues rather than gating (the automated form of the manual 2026-07 gap audit).

Design constraints (non-negotiable — from the design doc)

  • Scoped, never whole-corpus per PR. Unscoped is slow, expensive, and noisy — it gets muted within a week.
  • Every finding cites file:line — both the doc line and the contradicting code line. No vague "this seems off".
  • Advisory, non-blocking. An LLM verdict is non-deterministic; making it a required gate imports flakiness into merges and trains reviewers to click override. Prefer posting a suggested edit over a pass/fail.
  • Claude only on the prose residue. Precedence is generate > lint > LLM-judge — never point the LLM at anything a generator + diff already covers. (The telemetry reference is generated, so it belongs to Layer 1, not here.)

Relationship to the LLM-facing doc surface (#492, #498)

Two documentation-DX features under Epic #436 expand what this net must (and must not) cover — resolved by this issue's own generate > lint > LLM-judge precedence:

No dependency reordering: this issue can proceed independently; the map simply gains the agent-guidance page once #498 authors it. This Task stays under Feature #467 (CI infrastructure); #492/#498 stay under Epic #436.

Acceptance criteria


✅ Implemented in PR #510 (c8144b6, merged 2026-07-18). Artifacts: coverage/docs-affected-map.json (0 stale entries across 18 areas), scripts/docs-affected.py (resolver + unmapped/stale surfacing), .github/workflows/doc-accuracy-review.yml (Layer 2, advisory, scoped), .github/workflows/doc-accuracy-audit.yml (Layer 3, weekly). The Layer-2 reviewer dogfooded on its own PR and caught two real inconsistencies before converging clean. Design doc status → Implemented.

Activity

  1. self-assigned this
    on Jul 17, 2026
  2. added
    documentation
    on Jul 17, 2026
  3. added theissue type on Jul 17, 2026
  4. moved this to Todo in Typhonon Jul 17, 2026
  5. moved this from Todo to In Progress in Typhonon Jul 18, 2026
  6. moved this from In Progress to Done in Typhonon Jul 18, 2026
  7. added a commit that references this issue on Jul 18, 2026
  8. added 2 commits that reference this issue on Jul 29, 2026
  9. moved this from Done to In Progress in Typhonon Jul 29, 2026
  10. added a commit that references this issue on Jul 29, 2026
  11. moved this from In Progress to Done in Typhonon Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentation

Type

Fields

Priority

None yet

Estimate

None yet

Area

None yet

Product

CI

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions