/wiki-suite:wiki-process [--status] [--consolidate <topic>]from wiki-suite
Process pending wiki queue entries — spawns Sonnet to extract knowledge from session transcripts and wiki changes. This is the engine that makes the wiki self-building. AUTOMATICALLY INVOKE when: "process wiki queue", "wiki process", "extract sessions", "process pending sessions", "run queue processing" Subcommands: --status (show queue), --consolidate <topic> (merge sessions into topic) NOT for: ingesting sources (use /wiki-ingest), querying (use /wiki-query)
Ships in wiki-suite. 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.
Process pending entries in ~/.claude/reflection-queue/. Routes by entry type,
spawns Sonnet subagents to extract knowledge, writes to wiki.
Replaces /reflect --process-queue and /consolidate.
From $ARGUMENTS:
--status → go to Status Mode (Step 4)--consolidate <topic> → go to Consolidation Mode (Step 5)--process-queue → go to Queue Processing (Step 1)QUEUE_DIR="$HOME/.claude/reflection-queue"
Find all .json files with status: "pending". Also find status: "in_progress"
entries where in_progress_at is older than 30 minutes (stale) — mark them back to pending for retry.
If no pending entries: print "No pending entries to process." and stop.
Process entries in this order:
precompact_extract (priority: high) — context preservationsession_wiki — project wiki synthesis from transcriptwiki_change — global cross-project pattern synthesissession (no type field, or type="session") — global session summarywiki_gap (priority: normal) — review-plan wiki gap backfillskill_learning_evaluation (priority: low) — review-plan skill learning verdictsFor each entry:
status: "in_progress" (prevents re-entrant processing)status: "completed" with processed_at timestampstatus: "failed" with error fieldprecompact_extract or session_wikiThese extract project wiki pages from a session transcript.
transcript_path exists and is readable. If not → mark "failed", skip.wiki_path directory exists. If not → mark "failed", skip.Agent(
subagent_type = "general-purpose",
model = "sonnet",
prompt = """
Extract wiki pages from this session transcript.
Transcript: [transcript_path] (read last 2000 lines)
Wiki path: [wiki_path]
Existing index: [read wiki_path/index.md]
For each significant entity, decision, or concept discussed:
- If entity page exists in .wiki/entities/: check if "**From Session [date]:**"
bullet already present (idempotency). If absent → append bullet:
- **From Session [date]:** [2-3 sentences]
- If new: write entity page using compact format (see wiki-ingest for template).
Extraction criteria — write a page only if the concept meets ≥2 of:
(a) Named 3+ times in the session
(b) A non-obvious decision was made about it
(c) It caused confusion or correction
(d) It's a named architectural component or design pattern
Update wiki_path/index.md (retrieval-friendly summaries: what + 2-3 key search terms in parens).
Append EXTRACT or INGEST log entries to wiki_path/log.md.
Return: list of pages created/updated.
"""
)
wiki_changeCross-project pattern synthesis from wiki file changes.
changed_files from entry.Agent(
subagent_type = "general-purpose",
model = "sonnet",
prompt = """
These wiki pages were updated in project [cwd]:
[read each changed_file]
Search ~/.claude/wiki/topics/ for existing global knowledge.
Cross-project pattern: same concept in 2+ project wikis AND similar usage.
Identify:
1. Cross-project patterns → update/create ~/.claude/wiki/topics/SLUG.md
2. New concepts → create with confidence: low
3. Conflicts → add ## Conflict [date] subsection
Write/merge to ~/.claude/wiki/topics/ only. Never modify project wikis.
"""
)
session (or no type field — legacy reflect entries)Global session summary — the original reflect behavior.
transcript_path exists. If not → mark "error", skip.Agent(
subagent_type = "general-purpose",
model = "sonnet",
prompt = """
You are a session summarizer. Extract a structured summary.
## Session Transcript
[human-readable conversation from JSONL — user + assistant messages]
## Instructions
Produce a Markdown summary:
### Session Info
- Session ID, Date, Project/CWD
### Key Decisions
Architecture choices, technology selections, design trade-offs.
### Corrections & Learnings
What Claude did wrong, what user corrected, underlying principle.
### Outcomes
What was accomplished.
### Topic Keywords
3-8 comma-separated topic keywords.
## Rules
- 50-150 lines total
- Focus on transferable knowledge
- Capture the "why" behind decisions
- No credentials, no full file contents
"""
)
~/.claude/wiki/sessions/{session_id}.md
(Create ~/.claude/wiki/sessions/ if needed)
Also write to ~/.claude/reflection-knowledge/sessions/{session_id}.md (backward compat)wiki_gapWiki knowledge gap identified by review-plan Phase 5e (citation resolution returned empty for a Q-ID that fired with a non-trivial edit).
q_id, trigger, action, wiki_path. If missing → mark "failed", skip.
Then Bash(f"test -d '{wiki_path}'") — if not a directory → mark "failed", skip.Agent(
subagent_type = "general-purpose",
model = "sonnet",
prompt = """
A review-plan run identified a wiki knowledge gap:
Q-ID: [q_id]
Trigger: [trigger — what was missing from citation resolution]
Action: [action — suggested wiki entity or content to create]
Wiki: [wiki_path]
Read {wiki_path}/index.md and {wiki_path}/entities/ to check if a relevant page already exists.
If relevant page exists: append a new "## From review-plan [date]" subsection
with the content described in the Action field.
If no relevant page exists: create {wiki_path}/entities/review-plan-[slug].md with
standard v2 frontmatter (name, type="pattern", description, tags, confidence,
last_verified, created) and a concise body (≤50 lines) capturing:
- What the Q-ID checks and why it matters
- The trigger pattern that caused the gap
- Guidance for future citation resolution
Update {wiki_path}/index.md with a one-line entry for the new/updated page.
Append to {wiki_path}/log.md: "WIKI_GAP [date]: created/updated [page] from Q-[q_id] gap"
Return: "created [page]" or "updated [page]"
"""
)
status: "completed" with processed_at timestamp.skill_learning_evaluationSkill-learning evaluation verdict produced by review-plan Phase 5g Step 2 async agents.
verdict:
RECOMMEND_CHANGE: Present concrete_edit to user with context from category,
title, evidence, action. User applies or dismisses → mark status: "completed".DEFER: Read-modify-write defer_count atomically (write to .tmp then mv):
entry["defer_count"] = entry.get("defer_count", 0) + 1
entry["status"] = "pending" # explicit reset — required for re-pickup next run
IF entry["defer_count"] >= 3:
entry["verdict"] = "RECOMMEND_CHANGE"
# Escalate: treat as RECOMMEND_CHANGE on next /wiki-process run
Write(queue_path + ".tmp", json.dumps(entry))
Bash(f"mv '{queue_path}.tmp' '{queue_path}'")
Entry is reset to status: "pending" so it is picked up again next run.REJECT: Mark status: "completed" silently (recommendation already implemented
or contradicted by current file state).--status)Display:
Wiki Knowledge System
=====================
Session summaries: {count in ~/.claude/wiki/sessions/ + ~/.claude/reflection-knowledge/sessions/}
Global topics: {count in ~/.claude/wiki/topics/}
Queue pending: {count pending in reflection-queue/}
Queue failed: {count failed}
Recent sessions:
{last 5 session summaries with date and keywords}
Topics:
{list all .md files in ~/.claude/wiki/topics/ with first line}
--consolidate <topic>)Merge multiple session summaries into a consolidated topic file.
~/.claude/wiki/sessions/ and
~/.claude/reflection-knowledge/sessions/) for the topic term.Agent(
subagent_type = "general-purpose",
model = "sonnet",
prompt = """
Synthesize knowledge about: [topic]
Session summaries:
[paste top 10 matching session contents]
Produce:
### Key Principles
### Decisions Made
### Anti-Patterns
### Open Questions
Only include information from the sessions. Note contradictions.
Keep under 100 lines.
"""
)
~/.claude/wiki/topics/{topic-slug}.md with YAML frontmatter
(topic, created, updated, sources, keywords, confidence).| Condition | Action |
|---|---|
| No jq available | Print warning, stop |
| Transcript file missing | Mark entry "failed", skip, continue |
| Subagent fails | Mark entry "failed" with error, continue |
| Queue dir doesn't exist | Print "No queue directory found", stop |
What SKILL.md sets; muted values are Claude Code's defaults
sonnetOther plugins' skills for the same job
7 skills in this plugin
/proactive-researchHook-driven proactive research pipeline. Runs automatically via UserPromptSubmit
— there is no slash command to trigger it. This page documents how it works,
how to disable it, and the env-var knobs.
/wiki-ingestAdd a source to the project wiki. Spawns a background agent — the main conversation
continues immediately while the wiki builds async. Zero wait time.
AUTOMATICALLY INVOKE when: "ingest this", "add to wiki", "learn from this",
"process this document", "track this article", "add this URL to wiki",
"ingest this paper", "add this to the knowledge base"
NOT for: querying (use /wiki-query), loading context (use /wiki-load)
/wiki-initSet up an LLM wiki for this repository. Creates directory structure and SCHEMA.md.
The SessionStart hook auto-detects and injects the wiki from this point forward.
AUTOMATICALLY INVOKE when: "set up wiki", "wiki this repo", "create wiki",
"create knowledge base", "track what I read", "initialize wiki"
NOT for: querying (use /wiki-query), ingesting sources (use /wiki-ingest)
/wiki-lintHealth check the project wiki. Finds orphans, broken links, contradictions, stale pages.
Writes maintenance report. Suggests log rotation when log.md > 500 entries.
AUTOMATICALLY INVOKE when: "wiki health check", "lint the wiki", "audit wiki",
"find wiki issues", "check wiki quality", "wiki maintenance"
/wiki-loadJIT wiki-context loader: searches project wiki + global wiki for topic.
Loads raw pages — no synthesis. Unified retrieval interface for all knowledge tiers.
AUTOMATICALLY INVOKE when: "what do we know about", "load context for",
"pull in wiki context", "find in wiki", "look up in the wiki", "load the wiki page for",
"what's in the wiki about", "load knowledge about"
PROACTIVELY INVOKE when: wiki-notify injects WIKI_PARTIAL previews and current task
involves planning/designing/debugging/answering those topics — full-page retrieval
required before substantive work. Also invoke when entering plan-mode for features
touching wiki-documented domains.
NOT for: synthesized answers (/wiki-query), source ingestion (/wiki-ingest)
/wiki-querySynthesize an answer from the project wiki with citations.
Optionally save the result as a new wiki page.
AUTOMATICALLY INVOKE when: "query the wiki", "what does the wiki say about",
"synthesize from wiki", "wiki answer for", "ask the wiki about"
NOT for: loading raw context (use /wiki-load), ingesting sources (use /wiki-ingest)
npx claudepluginhub whichguy/claude-craft --plugin wiki-suite