Skip to content
Skills Library
Documents & office · Writing

librarian

/librarian

Curate the wiki: review dream-mode staging entries, promote or merge them into cross-linked pages, keep contradictions visible with provenance, update links both directions, and commit. Use when the user asks to run the librarian, curate the wiki, or process staging.

Repository
pi-tools ↗
Licence
Apache-2.0
Last repository change
11.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 11.11.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Curate the wiki: review dream-mode staging entries, promote or merge them into cross-linked pages, keep contradictions visible with provenance, update links both directions, and commit. Use when the user asks to run the librarian, curate the wiki, or process staging.

Original author description

Curate the wiki: review dream-mode staging entries, promote or merge them into cross-linked pages, keep contradictions visible with provenance, update links both directions, and commit. Use when the user asks to run the librarian, curate the wiki, or process staging.

How it works

  1. Process
  2. Hard rules
Original SKILL.md headings · 106 lines, 733 words
SKILL.md preview
---
name: librarian
description: "Curate the wiki: review dream-mode staging entries, promote or merge them into cross-linked pages, keep contradictions visible with provenance, update links both directions, and commit. Use when the user asks to run the librarian, curate the wiki, or process staging."
---

The librarian turns raw dream-mode extractions into the curated, cross-linked
wiki. You are the judgment layer; dream mode was the recall layer. The wiki's
value is that everything in it is traceable — guard that.

The wiki root is `$PI_WIKI_DIR` (default `~/.pi/agent/wiki`). Read its
`CONVENTIONS.md` first and follow it exactly; the rules below summarize, the
conventions file governs. The wiki CLI is
`node --experimental-strip-types <repo>/src/wiki/cli.ts` (`<repo>` is this
skill's repository root: two levels up from this file).

## Process

### 1. Survey (deterministic — never do this by hand)

```sh
node --experimental-strip-types <repo>/src/wiki/cli.ts survey
```

(`<repo>` is this skill's repository root: two levels up from this file.) The
survey verifies every citation against the memory archive, clusters entries by
shared session and title overlap, detects collisions with existing pages, and
suggests dispositions. **Trust its mechanics**: citations it reports broken are
broken — do not re-verify them by hand, and do not rescue an entry whose
citations do not resolve. If the underlying topic matters, the fix is
re-extracting the source session through the dream harness, not rehabilitating
the entry.

If staging is empty, say so and stop. Process at most **50** staging entries
per run; report any remainder.

### 2. Plan, then wait for confirmation

Before touching any file, present the disposition plan: every staging entry
marked promote / merge / update / discard, with its target page and one line
of rationale. **Wait for the user's approval before executing.** Only skip the
gate if the user has previously told you to run unattended.

### 3. Execute the dispositions

For each staging entry, choose exactly one disposition:

- **Promote** — new topic, well-supported: create a page (`wiki new`), fold the
  extraction in, keep the cited sources. Merging is the default posture:
  justify a new page rather than justify a merge.
- **Merge** — an existing page covers the topic, or the survey clustered the
  entry with siblings from the same session: integrate the material into one
  page, adding the staging entry's sources.
- **Update** — the extraction contradicts or supersedes an existing page:
  record both claims with dates and provenance. Prefer the newer claim in the
  summary text; keep the older claim visibly marked with its date and source.
  Never silently rewrite history.
- **Discard** — broken citations, unsupported, redundant, or ephemeral: delete
  the staging file and record the reason in the commit message.

The survey verifies citation *existence*; you verify citation *adequacy* for
claims you are unsure about, using `memory_expand` or the raw session file.
The survey also reports each citation's `origin` (machine) and `project`
(working directory): when material is specific to a machine, path, or
deployment — procedures, file locations, local configuration — the page must
name that machine and folder in the body, and a page drawing on multiple
origins scopes each claim to its source machine.
Normalize tags toward a small controlled vocabulary (`decision`, `fact`,
`process`, `gotcha`, `ops-pattern` plus topic tags) — staging tags are noisy.

### 4. Cross-link

For every page you create or materially edit, add `[[links]]` to genuinely
related pages, and add the backlink on the target page. A link asserts a real
relationship — if you cannot say what it is, do not link.

### 5. Dates

Set `last_verified` to today **only** on pages whose claims you actually
checked against sources in this run. Merging new material into a page counts;
fixing a typo does not.

### 6. Commit

One commit per run:

```sh
git -C "$PI_WIKI_DIR" add -A
git -C "$PI_WIKI_DIR" commit -m "curate: <pages touched>; consumed staging: <entries>; discarded: <entries + reasons>"
```

Delete staging files for every consumed or discarded entry — staging must
drain to empty or be explicitly reported as deferred.

### 7. Refresh the archive

Curated pages become searchable through the memory archive's `wiki` source
after the next ingest (it runs in the background, debounced). Tell the user if
you want it immediate: `node --experimental-strip-types <repo>/src/memory/cli.ts ingest`.

## Hard rules

- No claim without a source in the page's frontmatter `sources` list. If you
  know something true that has no source, that knowledge does not go in the
  wiki until a source exists.
- Never edit `staging/` files except to delete them after a decision.
- Never write secrets into pages; redact and warn if a staging entry contains
  one.
- Pages are prose for future agents and humans: dense, specific, dated. No
  filler, no "this page is about".

Versions

RepositoryScoreLicence
This page · comalice/pi-tools100Apache-2.0
wonsukchoi/domain-experts100MIT
jwm-axoni/claude-workbench100MIT
mitsuhiko/agent-stuff100Apache-2.0
jdforsythe/forge100MIT

Database snapshot: 13.11.2026 · package version 057f0ac78b1f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 86wiki-ingest
    Compile changed context/ material into wiki pages, update index and log, run the lint. Use when a librarian ingests into wiki/.
  • 100lint
    This skill is used when the project wiki needs a health check. Triggers include 'lint the wiki', 'check wiki health', 'run field-guide lint', 'are there stale wiki pages', 'find orphaned pages', 'check for contradictions in the wiki'.
  • 100update
    Write and maintain project wiki pages, decisions, and links. Use for any wiki page, including architecture or product maps, diagrams, HTML pages and other visuals, and before changing code a page covers.
  • 100update
    Write and maintain project wiki pages, decisions, and links. Use for any wiki page, including architecture or product maps, diagrams, HTML pages and other visuals, and before changing code a page covers.
  • 100maintain-wiki
    Run a deep, whole-wiki health-check and maintenance pass on this OKF wiki. Use when the user asks to lint, clean up, health-check, audit, or maintain the wiki, or periodically after ingesting many sources — to find contradictions, stale claims, orphan pages, missing…
  • 90wiki-update
    One-verb wiki maintenance orchestrator — delegates wiki-ingest → wiki-cross-linker, runs the mechanical fix loop on a proposal branch, triages work orders, reports a structural scorecard. Use for 'update my wiki' / 整理 wiki / 維護 wiki / ウィキ更新・メンテナンス. NOT for single-purpose runs —…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.