cc-os/docs/implementation-status/os-doc-hygiene.md

2.1 KiB

os-doc-hygiene — component detail

Leaf file of ../implementation-status.md. Read on demand.

Global os-doc-hygiene plugincc-os/plugins/os-doc-hygiene/ (git-tracked, 2026-07-03); symlinked into ~/.claude/plugins/os-doc-hygiene.

  • Hooks: hooks/hooks.json → SessionStart hook (matcher: startup|resume) runs scripts/reminder.py via ${CLAUDE_PLUGIN_ROOT} (5s timeout), emitting a deterministic zero-token reminder banner (once/day snooze).
  • Behavior: monitors stale and bloated project documentation; per-project state under .cc-os/dochygiene/ (gitignored; moved from .dochygiene/ 2026-07-12 per ADR-0027, with canonical-then-legacy fallback reads and auto-migration + legacy dir removal on first write; scanner self-excludes .cc-os/).
  • Skills (verb-first, no commands/ dispatcher — invoked directly as /os-doc-hygiene:<skill>, per cc-os-plugin-skill-naming-convention): check (AI-assisted classification of staleness signals, emits machine+human reports), clean (AI-assisted or deterministic patch application with git-safe scoped cleanup), status (read-only lifecycle-timestamp read), sweep (check then clean in sequence). Reversion-protected via invariants.md + golden-example test fixtures.
  • Scanner signals: broken refs, version skew, churn, archive ratio, frontmatter markers, and — added 2026-07-13 (issue #25 part 1) — a deterministic file_length signal (defaults 400 lines / 4000 estimated tokens, --max-lines / --max-tokens; token estimate via scripts/token_estimator.py). Objective facts only; classification lives downstream. Suite 286 passed as of 2026-07-13 (279 at the ADR-0027 move).
  • Migration: migrated from standalone repo (~/dev/cc-plugins/doc-hygiene/, 2026-07-03) and integrated into cc-os; no content conflicts. Renamed doc-hygieneos-doc-hygiene per the cc-os naming convention; skills renamed hygiene-check/hygiene-cleancheck/clean; the commands/hygiene.md dispatcher was removed in favor of two new skills (status, sweep), aligning with the no-commands/-directory pattern (2026-07-03).