Skip to content

feat: cross-platform context drift cleanup + standalone verify CLI#28

Merged
Nathan Schram (nathanschram) merged 2 commits intomainfrom
chore/context-drift-cleanup
May 6, 2026
Merged

feat: cross-platform context drift cleanup + standalone verify CLI#28
Nathan Schram (nathanschram) merged 2 commits intomainfrom
chore/context-drift-cleanup

Conversation

@nathanschram
Copy link
Copy Markdown
Member

Summary

Resolves the context drift the SessionStart hook has been flagging for several sessions. Two related goals:

  1. Documentation accuracy — close the gap between what the docs claim about multi-platform support and what was actually true.
  2. Ship the missing CLI — the standalone bin/context-verify.sh was already referenced from SKILL.md descriptions and the troubleshooting guide, but never committed.

What changed

Documentation accuracy (5 files, ~30 lines net)

  • AGENTS.md — skill descriptions now state which platforms support hooks; the Hooks section header drops the "(Claude Code Only)" qualifier and explicitly lists which other platforms have hook support, with a CI-based fallback for the rest.
  • .claude/skills/ai-context/SKILL.md — bridges all described as thin (was a mix of "thin" and "compatibility"); CLAUDE.md is clarified as Claude-Code-only; new "Platform Notes" section covers AGENTS.md auto-load behaviour, hook event counts per platform, and the standalone CLI.
  • .claude/skills/context-guard/SKILL.md — primary platform = Claude Code, with adapted hooks documented for Gemini CLI / Copilot / Cursor / Cline.
  • .claude/skills/context-verify/SKILL.md — adds standalone CLI section with usage examples; check 6 (Context Guard Status) clarifies which platforms it covers.
  • docs/guides/troubleshooting.md — replaces the earlier 4-row plugin/no-plugin table with the full Platform Support Matrix (8 tools × 6 capabilities), the Tier table (what ContextDocs delivers per platform), and a "Getting Started by Platform" guide.

New files

  • bin/context-verify.sh (executable, 25 KB) — standalone bash CLI implementing 10 of the 13 context-verify checks. No plugin system required. Supports --ci and --min-score N for CI integration. Verified locally — produced the 90/100 score this PR targets.
  • docs/references/platform-capabilities.md — detailed per-tool capability matrix (9 tools × 4 capability categories) with last-researched date, referenced from docs/guides/troubleshooting.md.

Verification

Run from a checkout of the branch:

bash bin/context-verify.sh
# expected: Score 90/100 (A — Lean and current)

Local checks all green:

  • Line budgets: AGENTS 59/120, CLAUDE 56/80, all SKILL.md files within their limits ✅
  • typos clean ✅
  • Banned-phrase scan clean ✅
  • bash tests/check-version-consistency.sh green ✅
  • python3 tests/validate-frontmatter.py green ✅
  • bash tests/check-token-budgets.sh 0 warnings ✅

What's NOT in this PR

  • .mcp.cloudflare.json, .mcp.full.json, .mcp.json, .mcp.lean.json, .mcp.research.json — local MCP profile configs unrelated to context drift, kept untracked. A follow-up could add them to .gitignore if appropriate.
  • The remaining 4 stale-path warnings are intentional/false-positive: platforms/ (forward-looking roadmap reference), and three URL/cross-repo references that the verify script flags by glob shape rather than treating as URLs. Could be tightened in the verify script in a separate PR.
  • CLAUDE.md line-budget warning (56 vs target 20) — would require structural rewrite that goes beyond drift cleanup. Defer.

Test plan

  • CI: lint / links / consistency / validate-plugin / CodeQL / Socket / CodeRabbit all green.
  • Visual: troubleshooting.md renders the new Platform Support Matrix correctly.
  • Smoke: bash bin/context-verify.sh --ci --min-score 90 exits 0.

🤖 Generated with Claude Code

Closes the gap between the documented multi-platform support and what
was actually shipped, and adds the standalone CLI that the docs already
referenced.

Documentation accuracy (AGENTS.md, three SKILL.md files,
troubleshooting.md):
- Hooks are no longer described as Claude-Code-only. The skill, agent,
  and rule descriptions now reflect actual hook event support across
  Claude Code (12), Gemini CLI (11), Copilot (8 preview), Cursor (4+),
  Cline (3), and Codex CLI (2 experimental).
- Bridge files (.cursorrules, .windsurfrules, GEMINI.md) are now all
  described as thin bridges rather than mixing "thin" and "compatibility"
  framings.
- Cross-Tool Compatibility section in troubleshooting.md replaces the
  earlier 4-row plugin/no-plugin table with the full Platform Support
  Matrix + Tier table + Getting Started by Platform.
- ai-context skill clarifies that CLAUDE.md is only used by Claude Code;
  other tools load AGENTS.md directly.

New files:
- bin/context-verify.sh — standalone bash CLI implementing 10 of the 13
  context-verify checks. No plugin system required. Supports --ci and
  --min-score for CI integration.
- docs/references/platform-capabilities.md — detailed per-tool capability
  matrix referenced from troubleshooting.md.

Closes the SessionStart hook drift report (CLAUDE.md / AGENTS.md /
llms.txt no longer flag missing references that this commit ships).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Warning

Rate limit exceeded

@nathanschram has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 38 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b1080170-241f-427a-9722-32987cb6dabe

📥 Commits

Reviewing files that changed from the base of the PR and between d48b09c and 2f33b79.

📒 Files selected for processing (7)
  • .claude/skills/ai-context/SKILL.md
  • .claude/skills/context-guard/SKILL.md
  • .claude/skills/context-verify/SKILL.md
  • AGENTS.md
  • bin/context-verify.sh
  • docs/guides/troubleshooting.md
  • docs/references/platform-capabilities.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/context-drift-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

The 10-column capability matrix used single-cell rows as visual section
dividers (`| **Context files** |` etc.). markdownlint MD056 requires
all rows to have the declared column count, so pad each divider to 10
cells. Renders identically.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@nathanschram Nathan Schram (nathanschram) merged commit 1527dbe into main May 6, 2026
10 checks passed
@nathanschram Nathan Schram (nathanschram) deleted the chore/context-drift-cleanup branch May 6, 2026 07:34
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.

1 participant