/ralph-knowledge:curate [domain]from ralph-knowledge
Curate the personal wiki tier — the third memory tier above raw and reflection. Iterates through atomic axiom candidates one at a time, fact-checks each against the corpus, external sources, and code, applies governance gates (outside-code-surface, atomicity, lede-writability, MUSTIE, domain freshness), and presents fully-evidenced candidates for the user to gate y/n/edit. Use whenever the user mentions "curate the wiki", "promote to wiki", "find canonical entries", "add to my wiki", "wiki tier", "wiki axioms", or wants to grow their thoughts/wiki/ directory. Also trigger when the user wants to distill recurring patterns from their thoughts/ corpus into canonical entries, synthesize reflections into wiki-grade material, or when they ask to "find atomic axioms" in their notes. The wiki resists growth — the gate is biased toward rejection.
Ships in ralph-knowledge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill is the human-gated curator for the third memory tier — the personal wiki at ~/projects/thoughts/wiki/. It iterates one atomic axiom at a time: hunt → distill → fact-check → gate → write or log. Most candidates are rejected. That's the system working.
The companion infrastructure: raw memories live at ~/projects/thoughts/dream-memories/, reflections at the same path under reflections/. The wiki sits above both as the user-curated canonical layer.
Trigger when the user wants to grow their personal wiki: "curate the wiki", "promote axioms", "find canonical entries", "add to my wiki", "let's add wiki entries about X". Also trigger when they ask to distill recurring patterns from their notes corpus into atomic claims.
/ralph-hero:draft or /ralph-hero:form.The knowledge_search MCP tool from ralph-knowledge must be available. If it's not, tell the user the ralph-knowledge MCP server isn't connected and direct them to /ralph-knowledge:setup.
The wiki directory ~/projects/thoughts/wiki/ should exist. If it doesn't, create it with a single mkdir -p before the first iteration.
The wiki is for knowledge whose source of truth lives outside the code surface we operate on. If the truth is in code we maintain, do not promote — that creates duplication that drifts. The operational test:
"If I needed to know this tomorrow, would I
grepour repo or look it up externally?"
If the answer is grep → reject as code-shadow. If the answer is "look it up" (external docs, library quirks, info-science principles, personal heuristics not encoded anywhere) → promotable.
Eligible domains: external platform behavior (Claude Code, GitHub API, library quirks), information science / cognitive science principles, personal design heuristics not encoded in code, decisions about external constraints.
Ineligible domains: our state machines, our MCP tool implementations, our sync logic, our configurations — anything reachable by grep in our own repos.
If a domain argument was passed (/ralph-knowledge:curate cognitive-science), use it as the search scope. Otherwise, ask the user once which domain to scope to. Examples of useful domains:
Scope matters: searching unscoped over a 3000+ document corpus dilutes the signal. Insist on a domain.
Use knowledge_search (semantic) plus knowledge_central (find central documents in communities) to surface 5–10 candidate atomic axioms within the chosen domain.
Also read the meta-reflection staging file ~/projects/thoughts/wiki/_candidates.jsonl (one JSON object per line: axiom, rationale, source_reflection_ids, hash). The weekly meta_reflect.py pass (GH-1513) stages pre-distilled wiki candidates here from the reflection tier — treat each as a strong, already-corroborated candidate, but still run it through the full distillation + gates below (staging is a suggestion, never a promotion). Skip any whose hash axiom is already an existing wiki entry or already in _rejected.jsonl — meta_reflect.py now applies the same skip when staging and prunes consumed entries out of the file at the start of each run (GH-1518), so the file should hold only pending candidates; keep the check anyway, since a promotion or rejection you make mid-session is not reflected there until the next weekly pass.
A candidate is high-signal if it:
Read the paraphrase-churn record ~/projects/thoughts/wiki/_near_misses.jsonl and report its accumulated count to the user in one line before presenting candidates (uv run "$CLAUDE_PLUGIN_ROOT/../../scripts/dream/meta_reflect.py" --near-miss-report prints it directly — the same repo-root resolution /ralph-knowledge:setup uses, since this plugin is installed independently and the report script is not bundled with it; if that path does not resolve, fall back to git -C $(pwd) rev-parse --show-toplevel or just read the file). This is GH-2259's instrumentation for #1965: each kind: "near-miss" record is a staged candidate that lexically resembled an entry already in wiki/*.md or _rejected.jsonl without hashing to it, named beside the neighbour it resembles and the similarity. Nothing was suppressed on it — the recorded candidates still reached this gate, which is why you may see one in the list below. Three readings, and they are not interchangeable: an absent file means the instrumentation has never run (not "no churn"); a count of zero across one or more kind: "scan" records means it ran and found none, so #1965's trigger has not fired; a non-zero count is #1965's trigger firing, and those records are the calibration set a session picking up #1965 would use. Report the number; do not act on it here.
Read existing wiki entries from ~/projects/thoughts/wiki/*.md and the rejection log ~/projects/thoughts/wiki/_rejected.jsonl before presenting. Skip any candidate that's already covered by an existing entry (orthogonality) or already in the rejection log (don't re-propose what was already rejected).
Output of this step: a ranked candidate list, ordered by promotability. Keep it internal — do not show it to the user as a bulk list.
For the top candidate:
If the top candidate fails distillation, drop it and try the next one. Don't "rescue" weak candidates by editing aggressively — most candidates fail. That's normal.
Apply lenses conditionally based on claim type:
Lens 1 — Corpus consistency (always): Vector-search for corroborating + contradicting passages across the user's thoughts/ corpora. List corroborating documents and any contradicting passages. Surface contradictions explicitly — they're load-bearing.
Lens 2 — External validity (only for empirical / platform claims): For claims about external systems, libraries, APIs, or platform behavior, dispatch a research agent or use WebSearch / WebFetch to consult authoritative sources. For Claude Code questions specifically, dispatch the claude-code-guide agent (it has direct docs access).
Lens 3 — Code consistency (only for project-convention claims): If the claim references project conventions, grep current code to verify the claim still matches reality. If the code has drifted from the claim, surface the drift; don't promote a stale claim.
Compute a confidence rating: high (3+ corroborating, 0 contradicting, external/code agree), medium (some corroboration, no contradictions, no external check possible), low (single source, or contradictions present).
Run the candidate through these gates in order. Stop at the first failure and move to the next candidate.
grep test. If our code is the truth → reject as code-shadow.grep in our own repos; this is the same test as the outside-code-surface gate but applied symmetrically to external sources too). Orthogonality within the wiki itself (no near-duplicate of an existing entry) is enforced separately at the candidate-hunt step (Step 2) — read existing entries' bodies and ## Implications sections, not just titles.~/projects/thoughts/wiki/ by date to apply this gate.)Surviving candidates proceed to presentation. If no candidates survive, tell the user and ask whether to re-hunt with a different domain or stop.
Show the candidate with all the work visible. Use this exact structure (the outer fence is four backticks so the inner three-backtick fence around the proposed entry renders correctly):
## Candidate axiom #N
**Proposed claim**: [single declarative sentence]
### Verification: [HIGH | MEDIUM | LOW] confidence
**Source of truth**: [where the claim's truth lives — external docs, library, principle, user's stated stance]
**Corpus support** (N corroborating):
- path/to/file.md:LINE — short paraphrase or quote
**Corpus contradictions** (N — surfaced explicitly):
- path/to/file.md:LINE — what the contradiction is, [why the candidate is still right]
**External validation** (if applicable):
- [docs link] — what it confirms
**Code consistency** (if applicable):
- file.ts:LINE — code matches/diverges from claim
### Gate checks
| Check | Result |
|---|---|
| Atomicity | PASS / FAIL |
| Lede-writable | PASS / FAIL |
| MUSTIE | PASS / FAIL — reasoning |
| Durability | HIGH / MEDIUM / LOW |
| Scope | universal / personal / project/X |
| Outside-code-surface | PASS / FAIL |
| Domain freshness | PASS / FAIL |
### Proposed wiki entry
```markdown
[full proposed entry including frontmatter and body]
```
### Side-effects (if approved)
- [list any memory updates, doc corrections, related-link additions, etc.]
---
**Promote #N to wiki?** `y` / `n` / `edit`
Show every check, every source. The user's gate decision should be informed by all the evidence, not a summary.
On y:
~/projects/thoughts/wiki/<slug>.md — slug is a kebab-case version of the title, no stop wordsOn n:
~/projects/thoughts/wiki/_rejected.jsonl — JSONL format, one line per rejectionOn edit:
After any of the three responses, move to the next candidate. Continue until: candidates exhausted, user says stop, or 5 promotions in this session (cap to keep the wiki disciplined).
---
memory_tier: wiki
date: YYYY-MM-DD
valid_from: YYYY-MM-DD
invalid_at: null
review_cadence: quarterly | monthly | weekly
scope: universal | personal | project/<name>
tags: [comma, separated, kebab-case]
related: # optional
- other-entry-slug.md
provenance: # optional but recommended
- source: URL or path
role: authoritative | corroborating
supersedes: # optional, when entry corrects a stored belief
- file: path/to/superseded.md
reason: short reason
---
Notes:
valid_from is when the supporting evidence first accumulated, not when you wrote the entry. Often same as date for new entries; can be earlier if backfilling.invalid_at stays null until the entry is retired. Never delete entries — close them by stamping invalid_at with the date.review_cadence choices: quarterly for stable platform/library facts and info-science / cognitive principles, monthly for practices that evolve, weekly for fast-moving areas (e.g., model performance, library betas).scope: universal (true for anyone), personal (the user's stated heuristic), project/<name> (true within a specific project's context).Hard rules (the "attention is sacred" contract):
## Implications: Up to 5 bullets. If you need more than 5, you're packing too much; cut to the most durable.## Sources: Required if external. Links and file:line references for corpus citations.Example structure:
# [Title — declarative form, the axiom itself]
[Lede sentence answering the title's question completely.]
## Implications
- [bullet 1]
- [bullet 2]
- [bullet 3]
## Sources
- [authoritative source]
- [corroborating source]
When an approved entry contradicts an existing memory, doc, or piece of CLAUDE.md content, the side-effect is to update those sources. The skill should:
y/n" before making the editsupersedes: frontmatter on the new wiki entryThis was the load-bearing pattern from the original iteration: the first wiki entry corrected an existing auto-memory, and the wiki entry's supersedes: field made the supersession explicit. Don't skip this step — it keeps the user's other knowledge surfaces consistent with their canonical wiki.
~/projects/thoughts/wiki/_rejected.jsonl — JSONL, append-only, one rejection per line:
{"date": "YYYY-MM-DD", "claim": "the proposed atomic claim", "reason": "concrete reason — code-shadow / repetitive / failed atomicity / etc.", "candidate_source": "where the candidate came from"}
Read this file before each hunt to skip already-rejected claims (recurrence within a session is fine; recurrence across sessions wastes the user's attention).
When the original candidate list is exhausted but the user wants to continue, ask whether to:
Never auto-rerun. The user's attention is the gating resource.
invalid_at to close.The original design rationale, MUSTIE framework treatment, fact-checking lens taxonomy, anti-patterns, and the open questions that informed the governance rule live at:
~/projects/ralph-hero/thoughts/shared/research/2026-05-06-personal-wiki-curator-design.mdRead this if you need deeper reasoning on why a particular gate exists or how to handle an edge case the workflow doesn't cover.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub cdubiel08/ralph-hero --plugin ralph-knowledge5 skills in this plugin
/captureCapture — In-Flow Memory CaptureCapture an insight, decision, or session learning as a raw memory in ralph-knowledge — the in-flow "remember this" surface. Distills what just happened (an exchange, a debugging breakthrough, a whole session) into 1-3 atomic raw memories via the knowledge_remember MCP tool, so the nightly dream-loop reflection pass can synthesize them. Use when the user says "remember this", "capture this", "save this insight", "make a memory of this", "don't let me forget", "TIL", "turn this session into memories", or wants to bank a learning without leaving flow. Not for curated knowledge — wiki promotion is the human-gated /ralph-knowledge:curate surface./dream-loopDream-Loop — Memory Consolidation (memorykeepers)Run, bootstrap, or verify the dream-loop — the nightly memory-consolidation pipeline that ingests the last window of raw activity (Gemma lab logs, git history, llm-cli transcripts, Claude Code sessions) as memory_tier=raw documents, then clusters them and synthesizes one memory_tier=reflection per cluster. This is the memorykeepers surface that orchestrates the existing scripts/dream/ infra (ingest.py + reflect.py + logrotate.sh). Use when the user mentions "dream", "dream-loop", "dream-now", "consolidate memories", "run reflection", "memorykeepers", "ingest raw memories", or wants to manually trigger the memory tiers (raw to reflection) without waiting for the 03:00 launchd fire. Also use for machine wiring and health checks — "bootstrap the dream loop", "set up dream-loop", "install the nightly schedule", "check dream-loop status", "verify the dream loop ran", "did the dream loop ingest anything" — via --mode bootstrap and --mode verify.Other plugins' skills for the same job