agentleFS
HefrockHefrock/agent-skills/skills/wiki-governor/SKILL.md

wiki-governor

Skill0 starsChanged 4 months agoMITView on GitHub

Runs the wiki's self-governing maintenance loop and holds it accountable to its own constitution. Orchestrates wiki-librarian (structure), wiki-synthesizer (compilation), and wiki-warehouse (cold-storage integrity, if in use), then adds the things none of them do — a constitution-compliance audit, a tracked wiki health score, and a knowledge-gap queue. Use on a weekly cadence or when the vault hasn't been maintained in a while. Triggers on "govern my wiki," "maintain my wiki," "is my wiki healthy," "wiki health score," "check constitution compliance," "what am I missing in my vault," and the command /govern. Requires the obsidian-vault MCP server connected. Pairs with wiki-librarian, wiki-synthesizer, and wiki-warehouse, which it invokes rather than reimplements.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Leave a trail: Every run appends a governance report to today's run log (Journal/Runs/YYYY-MM-DD.md) and updates Maps/_context.md.

    line 21
  2. Very specific:

    Run wiki-librarian /audit — full structural audit.

    line 30
  3. Very specific:

    Run wiki-synthesizer /synthesize — compile any pending journal ideas and Sources/raw/ files.

    line 31
  4. Very specific:

    If today's run log (Journal/Runs/YYYY-MM-DD.md) doesn't exist yet, create it first with write_note (frontmatter type: journal, subtype: …

    line 88
  5. Distinctive:

    Never inflate the health score.

    line 107

≈ “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

Wiki Governor

The skill that keeps the wiki not just maintained but accountable. It does not add knowledge and it does not re-run audits by hand — it orchestrates the maintenance skills, then measures whether the vault is living up to its own rules and getting healthier over time.

Prerequisites

The obsidian-vault MCP server must be connected. Verify with /mcp before running. Governor invokes wiki-librarian and wiki-synthesizer always, and wiki-warehouse if the vault has any warehouse-linked notes; load whichever apply alongside it.

Note on commands: /govern is a natural-language trigger — write it in the chat window. It is NOT a Claude Code CLI slash command.

Principles

  1. Orchestrate, don't duplicate. Governor calls wiki-librarian /audit, wiki-synthesizer /synthesize, and — when the warehouse is in use — wiki-warehouse /warehouse-audit. It only implements what none of them do: compliance, health scoring, gap surfacing. If a check already lives in another skill, cite it — don't re-scan.
  2. Measure, don't game. The health score is a mirror, never a target. Report sub-metrics honestly, including regressions. A score that is being optimized instead of earned is worse than no score — say so if you see it happening (Goodhart's law).
  3. Report before acting. Inherit the librarian's confirm-before-destructive discipline. Governor auto-applies only the low-risk fixes the librarian already classifies as safe.
  4. Leave a trail. Every run appends a governance report to today's run log (Journal/Runs/YYYY-MM-DD.md) and updates Maps/_context.md.
  5. Cadence over impulse. Designed to run weekly, or when last_governed is more than 7 days old.

/govern [scope]

Scope options: maintain (Phases 1 only), audit (Phases 2–4, no fixes), or omit for the full loop.

Phase 1 — Maintain (orchestrate existing skills)

  1. Run wiki-librarian /audit — full structural audit. Auto-apply only the fixes the librarian classifies as low-risk; surface medium/high-risk fixes for confirmation.
  2. Run wiki-synthesizer /synthesize — compile any pending journal ideas and Sources/raw/ files.
  3. Check whether any vault note carries a doc_id (a wiki-warehouse pointer). If so, run wiki-warehouse /warehouse-audit — both halves — and keep its corrupt/missing/dangling/drifted counts for Phase 3. If no doc_id notes exist, skip this step; the warehouse simply isn't in use for this vault, which is not itself a finding.

Governor invokes these; it does not reimplement their checks.

Phase 2 — Constitution compliance audit

Hold the vault to knowledge-os/constitution.md. Map the librarian's and warehouse's findings to the laws they break — Law 9 is the only check governor makes itself:

LawCompliance checkSource
3 — Preserve uncertaintyconfidence: low pages have an ## Open questions sectionlibrarian schema check
6 — Status reflects realitystatus: mature pages link to ≥2 otherslibrarian schema check
7 — No islandszero inbound and outbound linkslibrarian orphan check
8 — Preserve provenanceevery concept page carries a Captured from [[journal]] or Source: [[…]] backlinklibrarian schema check
9 — One run, one logtoday's run log (Journal/Runs/YYYY-MM-DD.md) has a synthesis/audit log entrygovernor
10 — Distill, don't dumpwarehouse-linked notes (doc_id present) have no overlap-check failure against their warehoused source (unchecked notes listed, not passed)librarian schema check

Output a compliance table: law, pass/fail, and the specific pages violating it. Law 9 is governor's own distinctive check — it's about the governance run itself, so nothing else is positioned to verify it.

Laws 6, 7, and 8 exempt system files — Maps/_context.md, Maps/_ask_log.md, Maps/_gaps.md, and System/ (see the constitution's "Scope of Laws 6, 7, and 8"). Never report these as island, provenance, or premature-mature violations: they are machine-maintained, read by path rather than by wikilink, have no prompting journal entry, and status: mature on one means "stable" rather than "well-connected" — so a flag against them can never be resolved. Take scope from the constitution, not from a law's headline sentence read in isolation.

Laws 2, 3, 6, 7, and 8 exempt Fiction/ — for the opposite reason: not machine-maintained infrastructure, but not epistemic content at all (see the constitution's "Fiction is out of scope for Laws 2, 3, 6, 7, and 8"). A chapter is invented by design (Law 2 doesn't apply), isn't a claim with a confidence level (Law 3), and its link count says nothing about manuscript quality (Laws 6/7/8's connectivity half). Never report a Fiction/ file against any of these five laws.

Laws 2, 3, 6, 7, and 8 exempt Templates/ — scaffolding, not knowledge: placeholders like updated: YYYY-MM-DD and [[Journal/Daily/YYYY-MM-DD]] are intentional (see the constitution's "Templates are scaffolding" clause). Never report a Templates/ file against these laws, count it in a health denominator, or let a type:-based retrieval pick it up as a real note.

Law 10 (distill, don't dump) is checked by measuring how much of a doc_id note's wording is copied from its warehoused source (wiki-librarian's Check 6.5, reference implementation in skills/wiki-librarian/scripts/check_vault.py with --warehouse, using law10_overlap.py). It replaced a ~4000-character cap, which flagged long original write-ups and passed short pasted passages. Still a mechanical threshold, not a judgment that a note is well distilled, so treat a pass as "no copying detected," not certainty. Paraphrased dumping is not caught. A note whose source has no extracted text, or any run without a warehouse checkout, is unchecked — report those, and never count them as passing.

Phase 3 — Health score

Compute six sub-metrics, then roll them into one transparent score. Five come from a single MCP query over the vault; the sixth reuses the wiki-warehouse /warehouse-audit results gathered in Phase 1:

Sub-metricDefinitionWeight
Connectedness% of Knowledge/ pages with ≥2 links0.20
Maturitymature ÷ (mature + draft + stale) — paused/complete projects excluded entirely, not counted against it0.15
Freshness% of Knowledge/ pages updated within 90 days0.10
Provenance% of concept pages with a provenance backlink (Law 8)0.20
Resolution% of Knowledge/ concept pages with zero open questions0.15
Warehouse integrity1 − (corrupt + missing + dangling + 0.5×drifted) ÷ total warehouse-linked docs0.20

health = Σ (submetric × weight), reported as a 0–100 score and its components — never the headline alone. Show the delta versus the previous run. Weights are transparent and adjustable; the point is the trend, not the absolute number.

Report movement, not just the total. Components near their ceiling (typically provenance, connectedness) carry most of the headline and rarely change, so a ±0.5 headline delta says almost nothing. Against the previous run, list regressed components first (worst first), then improved, then name the rest as steady. A component moves when it changes by at least 0.5 percentage points. A component that was excluded in either run (e.g. warehouse not in use) is "unavailable", never a move. scripts/health_score.py --previous <earlier --json output> produces this split deterministically.

Resolution's formula was changed 2026-09-28. It used to be 1 − (open questions ÷ total concept pages), floored at 0 — but that ratio only stays under 1 (letting the score move above 0%) if pages average fewer than one open question each. A full resync of a real vault (60 pages, 129 open questions, ~2.15/page) found it permanently floored at 0% regardless of actual progress — not a data problem, a formula problem, since more mature pages naturally accumulate more open threads, not fewer. The "% of pages with zero open questions" version can't go negative and moves in both directions as pages get resolved or new draft pages are added. Its own failure mode: rewards pages with no recorded open questions at all, which describes both "genuinely settled" and "confidence: low, needs work but nobody's asked the questions yet" — don't read a high score here as proof of depth without checking which case applies.

Warehouse integrity is conditional, not always-on. "Warehouse-linked docs" are vault notes carrying a doc_id (from wiki-warehouse). If none exist, the warehouse isn't in use for this vault — drop the sub-metric entirely and renormalize the remaining five weights to sum to 1.0. Do not score it 0 (unfairly tanks the score for an unused feature) or 1 (falsely implies a clean bill of health). Corrupt/missing/dangling each count as a full penalty — the original or its pointer is actually broken. Drifted counts at half weight, since a drifted path is stale-but-fixable, not a break (see wiki-warehouse's references/warehouse-schema.md for the corrupt/missing/dangling/drifted definitions).

Record in Maps/_context.md under ## Health with the date, so the trajectory is visible run over run.

Phase 4 — Knowledge-gap queue

Make the wiki notice what it does not know. Aggregate every ## Open questions entry across the vault (never Fiction/ — an "Open decisions" or "Still open" line there is an authorial choice pending, not a knowledge gap, even on the rare page where the heading text might otherwise match) plus every entry in Maps/_ask_log.md (written exclusively by wiki-operator's /ask — governor reads it, never writes it) into Maps/_gaps.md, ranked by how many pages reference or depend on each gap. This is the vault's to-learn queue — the input that tells you where to point the next learning session.

Phase 5 — Governance report + hot cache

If today's run log (Journal/Runs/YYYY-MM-DD.md) doesn't exist yet, create it first with write_note (frontmatter type: journal, subtype: run-log, status: draft, confidence: high, updated: <today>; heading # Run log — YYYY-MM-DD), then append — append_note refuses to silently create a frontmatter-less file. Append to today's run log:

## Governance run — YYYY-MM-DD

- Maintained: [librarian fixes applied], [synthesizer pages compiled], [warehouse-audit result, or "warehouse: not in use"]
- Compliance: [N laws passing / M total]; provenance gaps: [[page]], [[page]]
- Health: [score]/100 ([+/-Δ] vs last run) — regressed: [component a→b, …] (or "none"); improved: [component a→b, …]; steady: [components]; all six values: connectedness X, maturity Y, freshness Z, provenance P, resolution R, warehouse W (or "warehouse: n/a")
- Top knowledge gaps: [gap], [gap], [gap]

Then update Maps/_context.md: set last_governed, write the ## Health block, and list the top gaps under ## Open threads.

Cadence & session start

At session start, read Maps/_context.md. If last_governed is more than 7 days ago, suggest running /govern — do not run it unprompted. (An optional SessionStart hook can automate the reminder; configure it via the update-config skill rather than hard-coding it here.)

Output discipline

  • Never inflate the health score. A regression is the most useful thing a run can report — lead with it.
  • Confirm before any destructive fix; only librarian-classified low-risk fixes apply automatically.
  • The score is diagnostic, not a grade. If a metric is being gamed (e.g., links added only to move connectedness), flag it rather than celebrating the number.
  • Governor never invents knowledge — Phases 2–4 only measure and organize what the other skills produced.

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.