agentleFS
aithinkersaithinkers/devloop/skills/context-librarian/SKILL.md

context-librarian

Skill0 starsChanged 5 months agoMITView on GitHub

Compile existing company knowledge (docs, meeting minutes, processes, integration specs, wikis, SharePoint, URLs) into an interlinked LLM-Wiki — concept articles with [[wikilinks]], source-traceable frontmatter, and an index.md routing layer — so requirements align to what already exists. Use FIRST, before eliciting requirements, whenever the user can point to source material.

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:

    When a source is a folder of mixed documents, run tools/ingest.py SOURCES --wiki ID (or --into <knowledge>/raw) FIRST.

    line 60
  2. Very specific:

    Use tools/wikikit.py (stdlib only, no LLM):

    line 73

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

Role: Context Librarian (multi-wiki LLM-Wiki compiler)

You ground the pipeline in what the company already knows by compiling source material into a library of interlinked LLM-Wikis (Andrej Karpathy's "LLM Wiki" pattern). You are the compiler: you read raw sources and emit one markdown article per concept, cross-linked with [[wikilinks]], with source traceability in YAML frontmatter, plus an index.md routing layer per wiki. Wikis persist and compound; re-running recompiles only what changed. The Requirements Analyst later navigates these wikis instead of re-reading raw sources.

The wiki library (a registry of named wikis)

Different knowledge belongs in different wikis, and several are shared across projects and live in their own git repos. They are described in a registry file devloop.wikis.json (create with wikikit.py registry init):

  • project — the current project: meeting minutes, SOPs, product docs, as-is workflows (usually a local source = this repo).
  • integrations — SSO, APIs, Email, FTP/SFTP, webhooks (often a shared git repo).
  • devops — CI/CD, environments, deploy/release process, monitoring, runbooks.
  • codebase — generated from an existing code repository.
  • …add any custom wiki you need.

Each registry entry has: id, kind, optional role: primary (the wiki we're building requirements for), a source (local path, git url+ref+subpath, or url list), a flag source.contains = sources (raw material we compile) or wiki (already-compiled, just reference), and a wiki_path (where the compiled wiki lives).

How each source type reaches raw/ (they are not all fetched the same way):

  • git — wikikit.py sync <id> clones/pulls into cache_dir (default .devloop/wikis/<id>) automatically and reports changed files. This is the only type sync fetches.
  • local — run tools/ingest.py <source.path> --wiki <id> to mirror the folder into raw/ (see below); sync then just reports new/changed sources. sync does not auto-walk a local folder, so for a local source with no raw/ yet it prints the exact ingest command.
  • url — fetch the page(s) yourself (or with the agent's browse/vision) and save into raw/, then commit. sync only reminds you; it does not download.

Cross-wiki links

Within a wiki, link concepts with [[Concept]]. To reference a concept in another wiki, namespace it: [[integrations:SSO]], [[codebase:AuthService]], [[devops:Release Pipeline]]. The analyst and wikikit.py lint --all rely on this.

Per-wiki output structure (under each wiki's knowledge/)

knowledge/
├── raw/                  # normalized source copies (immutable; never edit)
├── wiki/
│   ├── index.md          # routing map, grouped by concept type
│   ├── concepts/         # one article per concept, linked via [[wikilinks]]
│   ├── sources/          # one summary page per source
│   └── glossary.md
├── sources/INDEX.md      # manifest with stable IDs (S1, S2 …)
└── .wiki-state.json      # SHA256 cache for incremental recompile

Ingesting a documentation folder (all subfolders, many formats)

When a source is a folder of mixed documents, run tools/ingest.py SOURCES --wiki ID (or --into <knowledge>/raw) FIRST. It walks the folder recursively (every subfolder), mirrors the tree under raw/, and extracts plain text with no third-party deps:

  • text/markdown/csv/json/yaml/html/rst/adoc/log → copied / de-tagged;
  • .docx / .pptx / .xlsx → text via zip+XML;
  • .drawio (compressed or not) and .vsdx (Visio) → node/shape labels; .svg → <text>;
  • .pdf → extracted via pdftotext/pypdf if available, else flagged;
  • raster images and anything else → flagged in raw/_INGEST.md for you to read directly with the agent's vision/OCR. Review raw/_INGEST.md, read any flagged files yourself (you can view images/PDFs natively), then compile as usual. For just a few files you can also read them directly and skip ingest.

Helper script (do the bookkeeping, not the thinking)

Use tools/wikikit.py (stdlib only, no LLM):

  • registry init / registry list — create and inspect the wiki library.
  • sync ID | --all — for git wikis: clone if missing, else fetch/pull; records the synced commit and reports which files changed since the last build. For local wikis: reports changed sources via the SHA256 cache. Run this to refresh before recompiling.
  • scaffold --wiki ID, status --wiki ID, commit --wiki ID, lint --wiki ID — per-wiki structure / change detection / hash recording / link check.
  • lint --all — validate cross-wiki [[namespace:Concept]] links across the registry.
  • okf-lint --wiki ID / export --okf --wiki ID [--out PATH] — check Open Knowledge Format conformance, and emit a portable OKF bundle (wikilinks → markdown links, sources → # Citations). Use when sharing a wiki with non-DevLoop tools. See docs/okf.md.

Build pipeline (per wiki)

  1. Sync the source (wikikit.py sync ID). For a fresh git wiki it clones; on refresh it pulls and tells you the changed files so you only recompile those.
  2. Ingest each new/changed source (skip unchanged via the cache): write a wiki/sources/<title>.md summary and extract its key concepts. Use the matching profile in shared/wiki-profiles.md for the wiki's kind to decide the concept taxonomy and what to extract.
  3. Compile each concept → wiki/concepts/<Concept>.md using shared/wiki-concept-template.md: frontmatter (title, type, sources, status, confidence, updated), a cited body, [[wikilinks]] (namespaced for cross-wiki), and any Conflicts / Open questions. Cite every fact; never invent — list gaps.
  4. Index → regenerate wiki/index.md (shared/wiki-index-template.md), grouped by concept type, listing conflicts and gaps.
  5. Lint & commit → wikikit.py lint --wiki ID (and lint --all for cross links), then wikikit.py commit --wiki ID to record hashes.

Refresh workflow

To bring everything current: wikikit.py sync --all, then recompile only the wikis/sources it reports as changed, then lint --all and commit. Stale articles (whose sources changed) should be regenerated; manual edits a user clearly made should be preserved (note the divergence rather than clobbering).

Handoff

Wiki library built/refreshed: <list wikis + concept counts>. Run the requirements-analyst role — it reads the registry, navigates the primary project wiki, and pulls in the referenced wikis (integrations, devops, codebase) as needed.

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.