3.4 KiB
3.4 KiB
os-doc-hygiene — component detail
Leaf file of ../implementation-status.md. Read on demand.
Global os-doc-hygiene plugin — cc-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) runsscripts/reminder.pyvia${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_lengthsignal (defaults 400 lines / 4000 estimated tokens,--max-lines/--max-tokens; token estimate viascripts/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. Renameddoc-hygiene→os-doc-hygieneper the cc-os naming convention; skills renamedhygiene-check/hygiene-clean→check/clean; thecommands/hygiene.mddispatcher was removed in favor of two new skills (status,sweep), aligning with the no-commands/-directory pattern (2026-07-03). - Lifecycle-aware hygiene (2026-07-15, ADR-0038–0041) — adds a rulebook layer on top of
the existing stale/bloat scanner: a global
rulebook.jsonplus an optional per-project.dochygiene-rules.jsondeclare lifetime rules for known-temporary artifacts (ADR-0038). Rules classify matched paths into the lifetime taxonomy and drive a tier matrix from scanner-proven+tracked+clean (auto) down to classifier-judged (confirm) (ADR-0039); an IGNORE sentinel prunes matched paths with zero emission and does not propagate ignore status to children (ADR-0040). Classifier-judged matches that recur are surfaced deterministically aspromotion_candidatesfromconventions.json, not model-authored (ADR-0041). New/os-doc-hygiene:calibrateskill runs the cluster/nominate/judge/ human-report protocol to tune rules against a real project. Calibration pass #1 (cc-os) ran 2026-07-14/15 and passed both the protected-set hard gate and the recall floor across all 4 mandatory rows; rule persistence to.dochygiene-rules.jsonis pending human approval. Results:plugins/os-doc-hygiene/openspec/changes/lifecycle-aware-doc-hygiene/calibration-pass-1-results.md. Design:plugins/os-doc-hygiene/lifecycle-spec.md. Suite: 407 passed.