← ClaudeAtlas

doc-freshness-reverse-lintlisted

Detect stale normative guidance after the user adds a NEW "don't X / avoid Y" rule to ~/.claude/lessons.md, ~/.claude/axioms.md, or any ~/.claude/projects/<slug>/memory/feedback_*.md. Also audits ~/.claude/skills/ for skills whose `last_verified` frontmatter has expired or that opt into a freshness contract without declaring one (axiom #21). Trigger when: (1) a PostToolUse hook fires on Edit|Write to one of those memory files and the diff contains a new negation rule; (2) user asks "are my project docs still consistent with my lessons / feedback?", "any stale advice in docs/?", "run doc freshness audit", "any stale skills?"; (3) weekly cron audit is due. Produces a list of CANDIDATE stale claims — file:line refs only. NEVER auto-edits. Conservative by design: for prose lint, surfaces only when the new rule has an explicit negation (don't / never / avoid / stop) AND a multi-token searchable phrase AND ≥1 grep hit. For skill freshness, the default mode flags only on EXPLICIT frontmatter signals (expired `last_v
wan-huiyan/claude-ecosystem-hygiene · ★ 0 · Code & Development · score 76
Install: claude install-skill wan-huiyan/claude-ecosystem-hygiene
# Doc Freshness Reverse-Lint ## Problem Huiyan's project docs under `docs/{research,decisions,findings,runbooks}/` contain normative guidance. When she later corrects that guidance in `~/.claude/lessons.md` or a `feedback_*.md` entry, the original project docs stay stale. Future Claude sessions read them as authoritative and repeat the retracted advice. Real example: `schuh_causal_impact/docs/research/pre_period_length_methodology.md:92,98` referenced "sorting by p-value" after the user had already decided that approach was wrong. ## Mechanisms ### 1. Reverse-lint (primary, event-driven) Runs when a negation rule is added to a memory file. Extracts the "don't X" phrase, greps project docs, lists matches. Does NOT edit. ### 2. Weekly cron audit (safety net) Scans `docs/**/*.md` for normative claims, cross-checks against recent `lessons.md` entries, flags contradictions. ### 3. Skill freshness audit (per axiom #21) Scans `~/.claude/skills/<name>/SKILL.md` for two explicit signals: - **`last_verified` exceeded `staleness_window_days`** (default 90): the skill declared a freshness contract and has aged past it. Re-verify the cited config / CLI surface and bump `last_verified`. - **`scope: project-specific` without `last_verified`**: the skill declared itself project-scoped but didn't supply the freshness contract that scope requires. Add `last_verified: YYYY-MM-DD` (and optionally `staleness_window_days`). Default mode is **silent unless explicit signals are p