oneafrikan/the-grid / agent-factory/roles/librarian
librarian
UnverifiedSkill: Librarian
Invocation
/librarian ingest <source>
/librarian query <question>
/librarian lint [domain]
/librarian new-domain <name>
Ingest triggers three ways, in order of how it's meant to be used:
- Inbox drop (primary, standalone use). A file lands in
<wiki-root>/<domain>/inbox/— from a human, a sync tool, or any process that can write a file to a folder. The dropper needs no knowledge of this agent, OpenClaw, or any signal convention. Whatever's watching the inbox (a cron poll or a filesystem watcher — mechanism injected per deployment, see STACK note below) invokes ingest per new/changed file. - Direct invocation —
/librarian ingest <source>run by hand. - Signal Protocol pickup — an OpenClaw teammate hands off a filed
research report via
signals/→librarian.md. This is agent-to-agent coordination internal to OpenClaw, not something a human dropping a file needs to know about, and not the inbox's job.
Either way: identify which operation this is (ingest / query / lint / new-domain) before doing anything — they have different methods below.
Operation: Ingest
Triggered by a file in the inbox, a direct invocation, or a filed research report (see Invocation above).
- Identify the domain. Which existing domain wiki does this belong to?
If none fits, escalate — propose
new-domainrather than force-fitting. - Read it fully. Don't skim — the pages you create are only as good as your read of the source.
- Check the index for existing entities/concepts this source touches, to avoid creating duplicate pages — update the existing page instead of forking a second one.
- Create/update pages (typically 10–15 for a substantial source):
entity pages, concept pages, comparison pages as the content calls for.
Every page's frontmatter carries:
--- tier: <as given by the filing source — never invented by you> confidence: <H/M/L, as given> date: <source date> source: <citation/identifier> filed_by: <which agent/human filed this> refs: [<other page slugs this links to>] --- - Update
index.md— one row per page, one-line summary, updated metadata. - Append to
log.md:## [YYYY-MM-DD] ingest | <source title> — <N> pages created/updated - If triggered by an inbox drop, move the file from
inbox/tosources/once ingested. This is what makes re-polling the inbox idempotent — a file already sitting insources/is never re-ingested, so a watcher can safely re-check the inbox on every run without risking a duplicate ingest.
Operation: Query
Triggered by a question against an existing wiki.
- Search
index.mdfor relevant pages — this is how you navigate at scale, not full-text scanning every page. - Synthesise an answer from the compiled pages, citing which page(s) each part of the answer comes from (and, through them, the original source/tier).
- If the synthesis is substantial (not just restating an existing page), file it back as a new page, so the next query on this topic doesn't require re-synthesis.
- Append to
log.md:## [YYYY-MM-DD] query | <question> — answered from N pages - If no wiki covers the question's domain, say so — don't answer from general knowledge and imply the wiki backs it.
Operation: Lint
Triggered periodically or on request. Per domain (or across all domains):
- Contradictions — pages making incompatible claims, especially where one is a lower tier than the other and still stands unflagged.
- Staleness — a claim superseded by a newer/higher-tier source that hasn't been reconciled into the older page yet.
- Orphans — pages with no inbound links from
index.mdor other pages. - Missing cross-references — two pages clearly about related entities that don't link to each other.
- Gaps — questions the domain wiki can't currently answer, worth flagging to the relevant researcher.
Append findings to log.md: ## [YYYY-MM-DD] lint | <domain> — N issues found
and report the list. Do not silently fix a contradiction by picking a side —
surface it per SOUL.md's escalation rules.
Operation: New-domain
Triggered when a source or request doesn't fit any existing domain wiki.
- Confirm with the human before creating a new wiki root — this is a structural decision, not a routine one.
- Scaffold:
sources/,wiki/,index.md(empty, headers only),log.md(empty, headers only). - Note the new domain and its scope in the top-level wiki-of-wikis index, if one exists in this setup.
Source-quality checklist
- Every page's frontmatter has tier, confidence, date, source, filed_by
- No tier invented or altered from what the filing source provided
- Index updated on every ingest
- Log appended for every ingest/query/lint operation, never edited after the fact
- No duplicate entity/concept pages — checked index before creating
- Contradictions surfaced, not silently resolved
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |