Manage the project wiki — a persistent, LLM-maintained knowledge base that lives in the user's repo. Subcommands: init, ingest, query, lint, sync, sync-linear, linear-setup, ingest-source, migrate, qmd-setup, qmd-refresh. Use when: "wiki", "document this", "file this answer", "ingest this", "what does the wiki say about X", "/wiki init".
The wiki is a persistent, LLM-authored knowledge base that lives at
<repo>/.linear-sdlc/wiki/ (or ~/.linear-sdlc/projects/<slug>/wiki/ under
wiki_scope=private). Claude is the author; the user reviews diffs.
See <wiki>/CLAUDE.md for the full schema once the wiki is initialized.
Run this first:
# Bootstrap: resolve LINEAR_SDLC_ROOT from this skill's symlink, then source
# the shared preamble (safe env loader + project detection + session tracking).
if [ -z "${LINEAR_SDLC_ROOT:-}" ]; then
for _c in "$HOME/.claude/skills/wiki/SKILL.md" \
"$HOME/.claude/skills/linear-sdlc-wiki/SKILL.md"; do
if [ -L "$_c" ]; then
LINEAR_SDLC_ROOT="$(cd "$(dirname "$(readlink "$_c")")/../.." && pwd)"
break
fi
done
[ -z "${LINEAR_SDLC_ROOT:-}" ] && LINEAR_SDLC_ROOT="$(lsdlc-config get source_dir 2>/dev/null || true)"
export LINEAR_SDLC_ROOT
fi
SKILL_NAME=wiki . "$LINEAR_SDLC_ROOT/references/preamble.sh"
echo "---"
Read the argument the user passed and route to the matching section below.
If no subcommand was provided, print the list and ask what they want:
/wiki subcommands:
init Scaffold the wiki in this repo
ingest <arg> Synthesize a source into wiki pages (ticket ID, --incident, --source, --learning)
query <q> Search the wiki and synthesize an answer, optionally file it back
lint Structural health check with suggested fixes
sync Resolve working-tree merge conflicts semantically
sync-linear Push wiki pages to the configured Linear Project
linear-setup Interactive Linear Project picker + enable sync
ingest-source <path> Import an external file (article, transcript, PDF) and synthesize
migrate Import legacy home-dir wiki into sources/legacy/
qmd-setup Register wiki as a qmd search collection (optional, hybrid search)
qmd-refresh Reindex qmd collection manually
/wiki initScaffold a new wiki in the current repo.
lsdlc-wiki init
After it prints the "Wiki initialized at ..." line, report:
CLAUDE.md, index.md, log.md,
subdirectories)/implement <ticket> or /wiki ingest <ticket-id> to
start filling it, or /wiki qmd-setup to enable hybrid search."Do not auto-commit. Leave the new files in the working tree.
/wiki ingest <arg>The fan-out write path. This is where Claude does real synthesis work.
Supported argument forms:
<TICKET-ID> (e.g., VER-42) — pull the ticket from Linear and the
current branch's diff.--incident <slug> — use with /debug; summarize a completed debug
session.--source <path> — ingest an external file previously dropped into
sources/. Use /wiki ingest-source <path> for new files that haven't
been moved into sources/ yet.--learning <key> — promote a private learning into a wiki page.Follow the workflow from <wiki>/CLAUDE.md exactly:
lsdlc-linear get-issue <ID> + git diff main...HEADincidents/<slug>.md if it already exists, otherwise
consult the /debug session notessources/...<wiki>/index.md to find related pages.tickets/<ID>.md, incidents/<slug>.md, or concepts/<topic>.md).> **⚠ Contradiction noted:** Previously this page said *"X"* (sourced
> from <ref>, <date>). New evidence from <new ref>, <date> says *"Y"*.
> Needs human review.
Never silently overwrite existing claims.lsdlc-wiki secret-scan <draft-file> on EVERY draft before
writing. Exit code 3 means abort the entire ingest (no partial
writes). If a draft contains a secret, discard all drafts, tell the user
which file triggered it, and stop.index.md via lsdlc-wiki index-upsert <page-path> <category> <one-line-summary> for each new or changed page. Category
is one of: Entities, Concepts, Tickets, Incidents, Queries,
Sources.log.md via lsdlc-wiki log-append ingest "<title>" --touched <comma-separated-rel-paths>.After the writes, if wiki_qmd_auto_index=true:
lsdlc-wiki qmd-refresh &
Run in the background so the user doesn't wait.
/wiki query <question>Read-mostly. Produces an answer with citations, then offers to file the
answer back as a new queries/<slug>.md page.
lsdlc-wiki search "<question-terms>" — auto-routed to qmd when
available, grep otherwise. Parse the JSON result.Read tool).[authentication](../entities/auth.md) uses JWT tokens....AskUserQuestion to offer filing it back:
lsdlc-wiki secret-scan)queries/<slug>.mdlsdlc-wiki index-upsert queries/<slug>.md Queries "<question>"lsdlc-wiki log-append query-filed "<question>" --touched queries/<slug>.md/wiki lint to see the full list."/wiki lintRun the structural report and explain each finding in plain language.
lsdlc-wiki lint
Parse the output. Group findings by severity:
AskUserQuestion.index.md or link them from a
related page.updated: timestamp. If yes, propose a re-ingest.Summarize the health at the end: "Wiki is healthy" / "Wiki has N high-
priority issues" / etc. Report the lint run via
lsdlc-wiki log-append lint "<summary>".
/wiki syncResolve wiki conflicts in the working tree after a git pull or branch
merge.
git status --porcelain for files under the wiki path with UU
(both modified) status.git add <merged-file> on each file the user confirms is ready.lsdlc-wiki log-append sync "resolved <N> conflicts" --touched ....If there are no conflicts, report "No wiki conflicts" and exit.
/wiki sync-linearPush wiki pages to the configured Linear Project as Documents. One-way (git → Linear), never pull.
wiki_linear_project_id is set:
lsdlc-config get wiki_linear_project_id
If empty, run /wiki linear-setup instead.lsdlc-wiki sync-linear --dry-run
AskUserQuestion:
"Push these changes to Linear?"lsdlc-wiki sync-linear
lsdlc-wiki log-append sync-linear "pushed <N> pages" --touched .../wiki linear-setupInteractive one-time setup for Linear sync.
lsdlc-linear list-projects to fetch available Projects.AskUserQuestion to let the user pick one.
Include "Create a new Project" as an option at the end.AskUserQuestion, free-form).lsdlc-linear create-project --name "<name>" --team "<team>"
where <team> is $(lsdlc-config get linear_team_id).project.id from the JSON output — that's the new UUID.lsdlc-config set wiki_linear_project_id <uuid>
lsdlc-config set wiki_linear_sync true
lsdlc-wiki sync-linear --dry-run
lsdlc-config set wiki_linear_auto_sync true/wiki ingest-source <path>Import an external file and kick off a fan-out synthesis pass.
lsdlc-wiki ingest-source <path> — this copies the file into the
appropriate sources/ subdirectory and appends a log entry. It also
prints a DIRECTIVE_TO_CLAUDE: line./wiki ingest workflow with --source <new-path>.Supported types: .md, .txt, .pdf (read the text content), .html,
images (view them with the Read tool and describe into a summary page).
/wiki migrateImport legacy home-dir wiki content for users upgrading from older linear-sdlc versions.
lsdlc-wiki migrate. It copies ~/.linear-sdlc/projects/<slug>/wiki/*
into <wiki>/sources/legacy/ non-destructively (originals are left in
place)./wiki ingest --source sources/legacy/<file> on each one to integrate the content into live
entity/concept pages. Use AskUserQuestion for batch confirmation.rm -rf ~/.linear-sdlc/projects/<slug>/wiki to reclaim space./wiki qmd-setupEnable the hybrid BM25 + vector + LLM-reranking search tier.
qmd is on PATH:
command -v qmd
npm install -g @tobilu/qmdclaude mcp add ...) for the most seamless integration.lsdlc-wiki qmd-setup
This registers the wiki as a qmd collection named linear-sdlc-<slug>,
runs the initial qmd update + qmd embed, and flips
wiki_search_backend=qmd.lsdlc-wiki search "<something-in-the-wiki>"
Verify the output's backend field says grep or qmd as expected./wiki qmd-refreshManual reindex (normally runs in the background after ingests).
lsdlc-wiki qmd-refresh --embed
The --embed flag regenerates vectors (slower, run occasionally).
Without it, only the BM25 index is updated.
If any subcommand reports the wiki is not initialized, offer to run
/wiki init first.
If lsdlc-wiki secret-scan exits 3 during an ingest, the ingest MUST be
aborted entirely. Do not write any page. Report the secret location and
ask the user to fix the source. This is non-negotiable.
If lsdlc-wiki sync-linear fails for individual pages, continue with the
rest but report failures clearly. Never retry more than once.