Skip to content

fix: stale-counts policy correction and example-dialogue skip#38

Merged
TMHSDigital merged 1 commit intomainfrom
fix/stale-counts-policy-and-example-dialogue-skip
Apr 25, 2026
Merged

fix: stale-counts policy correction and example-dialogue skip#38
TMHSDigital merged 1 commit intomainfrom
fix/stale-counts-policy-and-example-dialogue-skip

Conversation

@TMHSDigital
Copy link
Copy Markdown
Owner

Fixes the over-broad type-level stale-counts suppression that has been disabling the check on 8 of 9 tool repos since v1.7.5.

Three changes bundled (closes #12, closes #37):

  1. Removes the type-level stale-counts entries from standards/drift-checker.config.json. The cursor-plugin type now skips nothing; mcp-server still skips required-refs.
  2. Adds a hardcoded AGENTS.md / CLAUDE.md skip in stale_counts.py (narrative-aggregate policy encoded in the check itself, where it belongs).
  3. Implements DTD#37: skips counts inside ## Example sections and on lines beginning with **User:** / **Assistant:** markers.

Why

The DTD#12 investigation found that the cursor-plugin and mcp-server skip_checks entries were a whole-check suppression, not a file-scoped one. Empirical evidence: an off-by-one drift in Steam's steam-api-reference/SKILL.md (TMHSDigital/Steam-Cursor-Plugin#13) had been silently missed by production drift-check across multiple v1.x releases. Manually running stale_counts.py during DTD#13 investigation surfaced it.

Surfaces the policy where it belongs (in the check's logic) so future per-repo configs do not need to know the AGENTS/CLAUDE convention.

Tests

Regression suite expanded from 9 to 17 tests:

  • AGENTS.md / CLAUDE.md hardcoded-skip (narrative-aggregate policy)
  • Steam off-by-one as a fixture so future re-suppression cannot regress unnoticed
  • Example dialogue skipped in ## Example Interaction sections and on **User:**/**Assistant:** lines
  • Section scoping closes at the next ##-or-shallower heading
  • Existing pragma and emergency-skip tests ported from AGENTS.md to SKILL.md (the file type stale-counts now scrutinizes by default)

All 202 tests pass locally on Windows / Python 3.13.

Verification plan after merge

Run drift-check against Steam-Cursor-Plugin and Home-Lab-Developer-Tools and confirm:

  • Steam: example dialogue suppressed; remaining counts are accurate (Steam#13 fixed the off-by-one)
  • Home-Lab: line-113 example dialogue is now correctly skipped

Version

VERSION 1.8.5 -> 1.9.0 (MINOR — observable behavior change: stale-counts re-enabled on 8 tool repos that were previously silenced).

The cursor-plugin and mcp-server type-level skip_checks entries in
drift-checker.config.json have been suppressing stale-counts entirely
on 8 of 9 tool repos since v1.7.5. This was a wider suppression than
intended - the policy was meant to exempt narrative-aggregate prose in
AGENTS.md and CLAUDE.md, not silence the check on every file in those
repo types.

Empirical evidence of the over-suppression: the DTD#13 investigation
discovered an off-by-one drift in steam-api-reference/SKILL.md
(TMHSDigital/Steam-Cursor-Plugin#13) that the production drift-check
had been silently missing.

Three changes:

1. Removes the type-level stale-counts entries from
   standards/drift-checker.config.json. The cursor-plugin type now
   skips nothing; mcp-server still skips required-refs.

2. Adds a hardcoded AGENTS.md / CLAUDE.md skip in stale_counts.py.
   The narrative-aggregate convention belongs in the check's logic,
   not in repo-level config that over-suppressed.

3. Implements DTD#37: skips counts inside ## Example sections and
   on lines beginning with **User:** / **Assistant:** dialogue
   markers. Handles the category C false positive identified in
   Home-Lab's secrets-management/SKILL.md.

Regression tests added including the Steam off-by-one as a fixture so
that future re-suppression cannot go unnoticed. Existing AGENTS.md-based
pragma and emergency-skip tests were ported to SKILL.md (the only
file type stale-counts now scrutinizes by default in the absence of
hardcoded skips).

Closes #12, closes #37.
Refs #13.

Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
Made-with: Cursor
@github-actions
Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@TMHSDigital TMHSDigital merged commit a163f1b into main Apr 25, 2026
13 of 14 checks passed
@TMHSDigital TMHSDigital deleted the fix/stale-counts-policy-and-example-dialogue-skip branch April 25, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant