Repository navigation
Description
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 ofTelemetryConfig.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-isolationdescribed 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
docs-affectedmap — the twin ofscripts/test-affected.py's src→fixture map, mapping a source area to the doc pages that describe it. A PR touchingAccessControl.csmust not re-audit 33 concept pages.- Claude Code PR job — same infra as the existing issue-triage bot; reads the diff + only the mapped doc pages and posts findings.
- (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:
- Author 'Using Typhon with an AI coding agent' guidance (idioms + gotchas) #498 (agent-guidance page) — a hand-authored page dense with API claims (storage modes, blittable-struct rules, query limits, method names) is the highest-drift-risk prose we ship, and a first-class target for this reviewer. The
docs-affectedmap must route the Transactions / ECS / Query / Storage source areas to it, so a code change that invalidates a gotcha triggers a review of that page. - Generate llms.txt, llms-full.txt & per-page Markdown for doc.typhondb.io #492 (
llms.txt/llms-full.txt/ per-page.md) — these are generated artifacts, so by the precedence rule they are out of scope for the LLM reviewer; their accuracy is covered by Generate llms.txt, llms-full.txt & per-page Markdown for doc.typhondb.io #492's own integrity gate (Integrity gate + end-to-end validation #497) and, transitively, by whatever this net already asserts on their source pages (the.mdare 1:1 transforms).
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
- A
docs-affectedmap exists, and the reviewer consults it — scoped reviews only. - The reviewer runs on PRs touching mapped source/doc areas.
- Findings are advisory (non-blocking) and cite
file:line. - A periodic full-corpus audit files issues rather than gating.
- The
docs-affectedmap routes Transactions/ECS/Query/Storage → the agent-guidance page (Author 'Using Typhon with an AI coding agent' guidance (idioms + gotchas) #498); generatedllms.txt/.md(Generate llms.txt, llms-full.txt & per-page Markdown for doc.typhondb.io #492) are excluded here (covered by Generate llms.txt, llms-full.txt & per-page Markdown for doc.typhondb.io #492's integrity gate Integrity gate + end-to-end validation #497).
✅ 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.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Estimate
Area
Product
Projects
- StatusShow more project fieldsDone
Activity
docs(guide): show required attribute args in idioms table row 1
docs(guide): fix stale "never the global one" comment in the §4 example
#490 feat(ci): doc-accuracy reviewer (Layer 2) + weekly audit (Layer …
#512 Docs-affected map-integrity lint + count-0 map-gap nudge (PR #513)
#490 Move the Layer-2 doc review off the PR path: nightly, per-PR-sco…
#490 Raise the nightly PR cap 5 -> 20; scale the turn budget and time…
#490 Split the doc-accuracy net: fast deterministic gate per PR, LLM …