agentleFS
hranesshraness/wrench/.agents/skills/refresh-kb/SKILL.md

refresh-kb

Skill7 starsChanged 48 days agoMITView on GitHub

Refresh and validate a hraness/wordcell Markdown knowledge graph after notes, concepts, typed relationships, attachments, repository scopes, or context mappings change. Use when an agent needs to maintain a managed or authored catalog, inspect graph and lifecycle findings, validate local artifacts and scope hubs, or complete a vault health check.

5 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 11 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use a refresh-review-check loop.

    line 10
  2. Very specific:

    When the change concerns scopes/ or an kb:context marker, resolve the repository root and set KB_REPO to that path (KB_REPO=.

    line 17
  3. Distinctive:

    Read the vault's applicable agent instructions and note conventions before editing.

    line 20
  4. Distinctive:

    When several agents are still editing a managed vault, do not refresh its shared catalog in each lane.

    line 25
  5. Distinctive:

    Treat a contextual orphan as a prompt to inspect the note, not as a demand to add a link.

    line 55
  6. Distinctive:

    Treat an unlinked title or alias mention as a candidate, not proof that the sentence should link.

    line 56
  7. Distinctive:

    Add a contextual wikilink only when it improves the meaning or navigation of the sentence.

    line 57
  8. Very specific:

    When a repository-owned wrapper adds lifecycle findings, treat them as migration advisories: active plans should have descriptions and …

    line 59
  9. Distinctive:

    When a repository-owned scope audit reports an absent active or maintained scope, inspect it as possible stale routing.

    line 64
  10. Distinctive:

    Run a bounded percolation review for each materially changed note:

    line 76
  11. Very specific:

    If the change adds, removes, renames, or moves a scope hub, changes its type or scope, or edits an kb:context marker, run:

    line 98
  12. Distinctive:

    Use the non-mutating identity command to derive the hub path and exact marker when creating or moving a mapping.

    line 106
  13. Distinctive:

    Use the audit when the change affects guide structure, inheritance, or repeated rules:

    line 114
  14. Distinctive:

    After any note or link edit, run the refresh command again so derived state and advisories reflect the final content.

    line 130

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

Refresh a knowledge base

Use a refresh-review-check loop. Keep authored prose under deliberate editorial control. A managed vault gives the marked catalog region to the tool; an authored vault leaves its complete front door untouched.

1. Locate the vault

  • Resolve <vault> to the directory containing its managed or authored index.md, then set the shell-local KB_ROOT to that path (KB_ROOT=kb from a typical repository root, or KB_ROOT=. from inside the vault).
  • When the change concerns scopes/ or an kb:context marker, resolve the repository root and set KB_REPO to that path (KB_REPO=. from the repository root).
  • Read the vault's applicable agent instructions and note conventions before editing.
  • Preserve note voice, frontmatter, filenames, and link intent unless a reported finding justifies a specific change.

2. Refresh derived state

When several agents are still editing a managed vault, do not refresh its shared catalog in each lane. Validate the lane's Markdown and graph facts with:

wordcell check --root "$KB_ROOT" --no-catalog

The integrating agent performs the managed refresh once after the lanes join. An authored vault declares kb_catalog: authored in index.md; its refresh has no catalog write and is safe from that shared generated-file hotspot.

Run:

wordcell refresh --root "$KB_ROOT"

In managed mode this command atomically updates only the marked catalog region in index.md. In authored mode it reports the index as authored and leaves the file unchanged. Use wordcell catalog --root "$KB_ROOT" for a disposable exhaustive inventory in either mode. Catalog links are navigation, so they do not count as contextual graph edges.

3. Review the advisories

Open every reported source line and the relevant target notes before deciding whether to edit.

  • Repair a broken wikilink only when its intended target is clear. Otherwise, report the uncertainty.
  • Repair a broken or ambiguous typed relationship only after confirming its exact canonical target and predicate from the source note.
  • Disambiguate a wikilink with a vault-root path only after confirming the author's intent.
  • Treat a contextual orphan as a prompt to inspect the note, not as a demand to add a link.
  • Treat an unlinked title or alias mention as a candidate, not proof that the sentence should link.
  • Add a contextual wikilink only when it improves the meaning or navigation of the sentence.
  • Repair a missing, escaping, ambiguous, case-mismatched, symlinked, or hard-linked local image, PDF, or tldraw target. External URLs remain outside this attachment gate.
  • When a repository-owned wrapper adds lifecycle findings, treat them as migration advisories: active plans should have descriptions and exact repository_scopes, in-progress plans should retain execution evidence, terminal plans should record a result and durable-memory disposition, and maintained notes should declare type: note or type: concept.
  • When a repository-owned scope audit reports an absent active or maintained scope, inspect it as possible stale routing. Future paths may intentionally be absent; terminal records may intentionally retain retired paths. The portable wordcell refresh and wordcell check commands do not impose this lifecycle policy by themselves.

Backlinks are derived from explicit contextual wikilinks and typed relationships. Mention and percolation candidates are derived analysis. Never inject reciprocal, transitive, or similarity-derived relationships or generated backlink sections to improve graph counts. Never mutate authored prose automatically or apply suggestions mechanically in bulk.

Run a bounded percolation review for each materially changed note:

wordcell percolate "<changed-note-id>" --root "$KB_ROOT" --limit 25 --json

Open the cited notes before deciding whether to create a reusable type: concept note or a source-owned typed relationship.

Intentional orphans and unlinked mentions may remain. Record the reason instead of manufacturing a connection.

Review recent captures without maintained disposition when useful:

wordcell inbox --root "$KB_ROOT" --limit 25 --json

The inbox ignores source-to-source and catalog links. It is advisory; an intentional leaf capture needs no manufactured backlink.

4. Validate changed repository-context mappings

If the change adds, removes, renames, or moves a scope hub, changes its type or scope, or edits an kb:context marker, run:

wordcell agents identity "<repository-scope>" --json
wordcell agents check --root "$KB_ROOT" --repo "$KB_REPO"

Use the non-mutating identity command to derive the hub path and exact marker when creating or moving a mapping. The check command verifies canonical IDs, exact repository-relative directory scopes, collisions, repository confinement, real scope directories and guide files, guide shape, and reciprocal markers. A moved scope has a new identity, so update the hub filename and guide marker together. An unmapped AGENTS.md is valid.

Use the audit when the change affects guide structure, inheritance, or repeated rules:

wordcell agents audit --root "$KB_ROOT" --repo "$KB_REPO"

The audit runs the correctness checks and adds deterministic per-guide, per-section, inherited-chain, long-bullet, and exact-duplicate advisories. Review each advisory in context. Length is not correctness: do not move a load-bearing ownership rule, prohibition, command, invariant, or gate out of AGENTS.md merely to satisfy a suggested budget. Guide discovery skips common generated and vendor directories and never follows symbolic-link directories.

5. Re-refresh and check

After any note or link edit, run the refresh command again so derived state and advisories reflect the final content. Then run the read-only gate:

wordcell check --root "$KB_ROOT"

Finish only when the graph check and any required agent-context check succeed, the configured catalog mode is satisfied, and broken or ambiguous links, relationships, and local attachments are resolved. Summarize deliberate concept, relationship, link, scope, and mapping edits plus advisories intentionally left in place.

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.