prevent-doc-drift

Patch AGENTS.md, CLAUDE.md, and .cursor/rules to reflect PR code changes.

19|31|Updated May 29, 2025
One-click install
npx skills add https://github.com/grafana/grafana-pathfinder-app --skill prevent-doc-drift
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prevent-doc-drift
Source: https://github.com/grafana/grafana-pathfinder-app/tree/main/.cursor/skills/prevent-doc-drift
Command: npx skills add https://github.com/grafana/grafana-pathfinder-app --skill prevent-doc-drift

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Per-PR documentation-drift prevention. When a PR adds new code subsystems, scripts, skills, docs, plugin routes, feature flags, or changes architecture relationships, this skill produces the AGENTS.md, CLAUDE.md, and .cursor/rules/ updates needed in the same PR so agent guidance never falls behind the code. Use this on /review or directly before merge.

Core Features & Use Cases

  • Per-PR drift detection: compares PR changes against agent guidance and emits required updates in the same PR.
  • Paired with maintain-docs: two-tier drift defense that covers both per-PR and periodic drift.
  • Automated doc update: updates AGENTS.md, CLAUDE.md, and rules to align with code changes, reducing manual doc drift.

Quick Start

Run the per-PR drift prevention process on a PR to automatically align agent guidance with code changes.

Frequently Asked Questions about prevent-doc-drift

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent documentation drift when merging code changes?▼

Preventing documentation drift involves automating per-PR updates that patch agent guidance files like AGENTS.md and CLAUDE.md to reflect code changes in the same pull request.

How do I keep AGENTS.md and CLAUDE.md in sync with pull request diffs?▼

Keeping AGENTS.md and CLAUDE.md in sync is done by running a per-PR drift detection process that compares PR changes against existing guidance and emits required file updates immediately before merge.

Can I automatically update .cursor rules based on code changes in a PR?▼

Yes, you can automatically update .cursor/rules based on code changes by running an automated documentation update process that patches agent guidance files to align with the PR diff.

Does per-PR documentation drift prevention edit source code files?▼

No, per-PR documentation drift prevention strictly edits documentation files only, ensuring that AGENTS.md, CLAUDE.md, and .cursor/rules are updated without modifying the actual source code.

What is the best way to maintain agent guidance for new code subsystems?▼

The best way to maintain agent guidance for new code subsystems is to pair per-PR drift prevention with periodic documentation maintenance, creating a two-tier drift defense that covers both immediate and long-term updates.