Skip to content

#37 - Add documentation sync rule and drift guidance - #42

Merged
dleshchev merged 1 commit into
mainfrom
docs/agent-rules
May 1, 2026
Merged

dleshchev merged 1 commit into
mainfrom
docs/agent-rules

Conversation

@RamyaGuru

Copy link
Copy Markdown
Collaborator

Two project-level additions to reduce documentation drift:

  1. .claude/rules/docs-sync.md — a Claude Code rule mapping source files to the docs they tend to drift with. Tiered by impact (API surface, backend/build, benchmarks, landing page, README, CLAUDE.md). Each tier names the specific files and subsections that drift, plus a freshness disclaimer pointing the agent at grep / mkdocs.yml / CI as sources of truth. Triggers passively at commit time ("consider whether docs need updating", not "must update on every edit"). README.md and CLAUDE.md are both included alongside docs/.

  2. CLAUDE.md additions:

    • New "Documentation" section: layout of docs/, the 5 recurring drift hotspots inline (backend list, CMake options, benchmark names, public API, doc reorgs), pointer to the rule, deploy story.
    • New bullet under Contribution rules: when opening a PR touching src/, examples/, or mkdocs.yml, scan the doc-sync mapping.

Notes:

  • Hardcoded paths in the rule will go stale on doc reorgs; the freshness disclaimer mitigates by steering the agent to grep before acting.
  • Content drift in user-facing docs (binary names, YAML configs) is enforced deterministically by the doc-refs checker in PR 2; CLAUDE.md content drift is the remaining manual surface that this rule helps with.

Two project-level additions to reduce documentation drift:

1. .claude/rules/docs-sync.md — a Claude Code rule mapping source
   files to the docs they tend to drift with. Tiered by impact (API
   surface, backend/build, benchmarks, landing page, README,
   CLAUDE.md). Each tier names the specific files and subsections
   that drift, plus a freshness disclaimer pointing the agent at
   grep / mkdocs.yml / CI as sources of truth. Triggers passively at
   commit time ("consider whether docs need updating", not "must
   update on every edit"). README.md and CLAUDE.md are both included
   alongside docs/.

2. CLAUDE.md additions:
   - New "Documentation" section: layout of docs/, the 5 recurring
     drift hotspots inline (backend list, CMake options, benchmark
     names, public API, doc reorgs), pointer to the rule, deploy
     story.
   - New bullet under Contribution rules: when opening a PR touching
     src/, examples/, or mkdocs.yml, scan the doc-sync mapping.

Notes:
- Hardcoded paths in the rule will go stale on doc reorgs; the
  freshness disclaimer mitigates by steering the agent to grep
  before acting.
- Content drift in user-facing docs (binary names, YAML configs) is
  enforced deterministically by the doc-refs checker in PR 2;
  CLAUDE.md content drift is the remaining manual surface that this
  rule helps with.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Ramya Gurunathan <rgurunathan@nvidia.com>
@RamyaGuru
RamyaGuru requested a review from dleshchev May 1, 2026 20:03
@dleshchev
dleshchev merged commit 324f822 into main May 1, 2026
@RamyaGuru
RamyaGuru deleted the docs/agent-rules branch May 4, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants