32 lines
2.1 KiB
Markdown
32 lines
2.1 KiB
Markdown
|
|
# os-doc-hygiene — component detail
|
||
|
|
|
||
|
|
_Leaf file of [../implementation-status.md](../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) 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-hygiene` → `os-doc-hygiene` per
|
||
|
|
the cc-os naming convention; skills renamed `hygiene-check`/`hygiene-clean` →
|
||
|
|
`check`/`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).
|