agentleFS
Slava-codeSlava-code/slava-stack/.claude/skills/kb-audit/SKILL.md

kb-audit

Skill0 starsChanged 29 days agoMITView on GitHub

Health check of the KB: lint, stale drafts, oversized files, undecided comparisons, orphans, broken links, overdue todos, STATE.md age. Writes a report to runs/. Use when the user asks: audit the KB, what's stale, what's broken, health check; also before a synthesis.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run lint: python3 scripts/kb-lint.py.

    line 9
  2. Very specific:

    STATE.md age: if STATE.md exists, compare its as-of: date with the newest synthesis/ file and the newest dated content file.

    line 17

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/kb-audit — Audit KB health

  1. Acquire runs/.lock.
  2. Run lint: python3 scripts/kb-lint.py. Capture errors.
  3. Walk the content folders and check (named thresholds defined in CONVENTIONS.md § "Growth rules"):
    • Stale raw drafts: status: raw or status: prospect (for advisors) where date_found or created_at is older than STALE_DRAFT_DAYS.
    • Oversized files: any *.md larger than OVERSIZED_FILE_LINES (use wc -l). Candidates for multi-chapter promotion.
    • Undecided comparisons: decision_status: considered with no commit touching the file in the last UNDECIDED_COMPARISON_DAYS days.
    • Orphan files: content files with no inbound [[<slug>]] citations from any other file. Use grep.
    • Broken wikilinks: [[<path>]] where the target file does not exist. Use grep + file checks.
    • Overdue todos: todos/*.md with status: pending and a deadline before today. Report them as outcome unknown (nobody recorded it), not as "not done".
    • STATE.md age: if STATE.md exists, compare its as-of: date with the newest synthesis/ file and the newest dated content file; flag it when either is newer.
    • Convergence promotion candidates: python3 scripts/kb-convergence-scan.py — any convergence: tag on ≥3 brainstorms means the pattern has escaped its origin and deserves its own questions/ or research-dispatches/ file. Capture the script's "Promotion candidates" section.
  4. Compose report: runs/YYYY-MM-DD-audit.md with frontmatter:
    ---
    type: run-log
    kind: audit
    date_found: YYYY-MM-DD
    ---
    Body: sections for each check category; counts + file lists. If zero issues in a category, say so.
  5. Stage + commit: kb: audit <date>. Push.
  6. Release the lock.
  7. Report summary to user: counts per category + report path.

The audit is diagnosis, not remediation. Surfacing the issues is the skill's job; /kb-archive, /kb-promote, etc. fix them.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.