| name | wiki-ingest |
| description | Read documents (markdown, text, code docs, web pages), convert them into wiki pages, and update cross-references โ ingesting and integrating sources into the wiki. "์ํค ์์ง", "wiki ingest", "์ํค์ ์ถ๊ฐ", "wiki add", "๋ฌธ์ ํตํฉ", "์ํค ์
๋ฐ์ดํธ", "wiki update", "์ง์ ์ถ๊ฐ", "ingest", "์ํค์ ๋ฃ์ด", "์์ค ์ถ๊ฐ", "add source", "๋ฌธ์ ์์ง", "wiki import", "์ํค ์ํฌํธ" ๋ฑ์ ์์ฒญ์ ์ฌ์ฉํ์ธ์. |
| argument-hint | <file|directory|URL> [--batch] [--topic <topic>] |
user: "/wiki-ingest docs/architecture.md"
assistant: "docs/architecture.md๋ฅผ ์ฝ๊ณ ์ํค์ ํตํฉํ๊ฒ ์ต๋๋ค."
user: "์ด ๋ฌธ์๋ฅผ ์ํค์ ๋ฃ์ด์ค: README.md"
assistant: "README.md๋ฅผ ์ฝ๊ณ ์ํค ํ์ด์ง๋ก ๋ณํํ๊ฒ ์ต๋๋ค."
user: "/wiki-ingest docs/ --batch"
assistant: "docs/ ๋๋ ํ ๋ฆฌ์ ๋ฌธ์๋ฅผ ์ผ๊ด ์์งํ๊ฒ ์ต๋๋ค."
user: "/wiki-ingest https://example.com/guide --topic ์ธ์ฆ"
assistant: "์น ๋ฌธ์๋ฅผ ๊ฐ์ ธ์์ ์ธ์ฆ ์ฃผ์ ๋ก ์ํค์ ํตํฉํ๊ฒ ์ต๋๋ค."
user: "ํ๋ก์ ํธ ๋ฌธ์๋ค ์ ๋ถ ์ํค๋ก ํตํฉํด์ค"
assistant: "ํ๋ก์ ํธ ๋ด ๋ฌธ์๋ฅผ ํ์ํ๊ณ ์ผ๊ด ์์งํ๊ฒ ์ต๋๋ค."
user: "/wiki-ingest CHANGELOG.md"
assistant: "CHANGELOG.md๋ฅผ ์ฝ๊ณ ์ํค์ ํตํฉํ๊ฒ ์ต๋๋ค. ๊ธฐ์กด ํ์ด์ง์์ ๊ต์ฐจ์ฐธ์กฐ๋ ๊ฐฑ์ ํฉ๋๋ค."
Wiki Ingest
Read source documents, convert them into wiki pages, and integrate them into the existing wiki. This is the core operation of LLM Wiki.
Core principle: Don't just copy the source โ extract the key information and integrate it into the existing wiki structure. Update entity pages, refresh concept pages, and flag any new information that contradicts existing content.
Respond to the user in Korean.
Argument interpretation
$ARGUMENTS is a file path โ ingest a single file
$ARGUMENTS is a directory path โ scan documents in the directory (recursive)
$ARGUMENTS is a URL (http:// or https://) โ fetch a web document
--batch โ process all documents in the directory sequentially (default: confirm the list with the user first)
--topic <์ฃผ์ > โ focus ingestion on a specific topic
- No
$ARGUMENTS โ ask the user what to ingest
Special cases:
- "ํ๋ก์ ํธ ๋ฌธ์ ์ ๋ถ", "๊ธฐ์กด ๋ฌธ์ ํตํฉ", etc. โ auto-discover project documents in Phase 1
- "API ๋๊ธฐํ", "api-learn ๋๊ธฐํ", "๋ ํผ๋ฐ์ค ๋๊ธฐํ", etc. โ auto-discover
.claude/references/ in Phase 1
Execution Steps
Phase 0: Verify the wiki exists
- Check that the
.wiki/ directory exists.
- If missing: respond "์ํค๊ฐ ์ด๊ธฐํ๋์ง ์์์ต๋๋ค.
/wiki-init๋ฅผ ๋จผ์ ์คํํ์ธ์." and stop.
- Read
.wiki/schema.md โ understand the wiki structure, page types, and categories.
- Read
.wiki/index.md โ understand the existing page list and current structure.
Phase 1: Acquire the source
Acquire the source based on the argument type:
File path
- Read the file content with
Read.
- Copy the original into
.wiki/sources/ (keep the filename; on conflict append a -{N} suffix).
- Supported formats:
.md, .txt, .rst, .adoc, .pdf (the Read tool supports PDF).
Directory path
- Scan
{๋๋ ํ ๋ฆฌ}/**/*.{md,txt,rst,adoc} with Glob.
- Show the discovered file list to the user.
- Without
--batch, confirm which files to ingest.
- Process the selected files sequentially (repeat Phase 1โ4 for each file).
URL
- Fetch the web document with
WebFetch.
- Save the fetched content to
.wiki/sources/{๋๋ฉ์ธ}-{slug}.md.
- Record the original URL in the source file frontmatter.
api-learn reference sync (Pipeline)
When a .claude/references/ path is given as an argument, or the user mentions "API ๋๊ธฐํ", "๋ ํผ๋ฐ์ค ๋๊ธฐํ", etc.:
Read .claude/references/_index.md to get the list of internalized libraries.
- Scan
.claude/references/*.md with Glob (excluding _index.md).
- For each reference file:
- Copy the original into
.wiki/sources/ (keep the filename).
- Set provenance metadata:
source_kind: api-learn
authority_path: .claude/references/{lib}.md
- Extract
library, version, collected from the reference file's frontmatter and reflect them in the tags.
- If a page for the same library already exists in the wiki and its
authority_path matches โ update mode (update the existing page).
- One-way sync principle: do not sync in the wiki โ api-learn direction.
An api-learn reference is the "authoritative document for API signatures"; a wiki page is "project-context knowledge." When syncing, convert the reference's core API into a wiki page, and enrich it with project usage patterns and relationships via cross-references.
Project document auto-discovery
When the user mentions "์ ๋ถ", "๋ชจ๋", "๊ธฐ์กด ๋ฌธ์", etc.:
- Scan
*.md and docs/**/*.md from the project root with Glob.
- Exclude files inside
.wiki/.
- Exclude
node_modules/, .git/, build/, DerivedData/, etc.
- If
.claude/references/ exists, include API references in the ingestion targets (mark them separately in the checklist).
- Show the discovered document list to the user and confirm.
Phase 2: Analyze & extract
For each source document:
-
Extract key information:
- Defined entities (classes, modules, services, APIs, etc.)
- Explained concepts (patterns, principles, architecture decisions, etc.)
- Term definitions
- Relationships (A uses B, A depends on B, etc.)
-
Compare with the existing wiki:
- Cross-check against the existing page list in index.md.
Read the related existing pages (up to 10).
- Check whether the new information contradicts existing content โ when a contradiction is found, mark it in the page with a
> โ ๏ธ ๋ชจ์ block.
- Identify content to add to existing pages.
-
Build the ingestion plan:
- List of pages to create (title, type, reason)
- List of existing pages to update (what to add/modify)
- Cross-reference additions
When the --topic option is present, focus on information related to that topic.
Phase 3: Create/update wiki pages
Page authoring guide: see references/page-format.md.
Creating a new page
For each new page:
- Decide the filename (kebab-case, max 64 chars).
- Write the YAML frontmatter (title, type, created, updated, sources, tags).
- Write the body:
- Overview: 2โ3 sentences of the core content, cross-referencing related pages with
[[wikilinks]]
- Detail: detailed information extracted from the source
- Related items: list of related pages + relationship descriptions
- Source: reference to the source file
- Create the file in
.wiki/pages/.
Updating an existing page
For each page to update:
Read .wiki/pages/{page}.md.
- Update the
updated date in the frontmatter.
- Add the new source to the
sources array in the frontmatter.
- Integrate the new information into the body:
- Add information while preserving the existing structure
- If there is a contradiction, add a
> โ ๏ธ ๋ชจ์: [์ค๋ช
] block
- Add new cross-references
[[wikilinks]]
- Refresh the related items section.
Phase 4: Update index, cross-references, and log
-
Update index.md:
- Add new pages to the appropriate category table.
- Refresh the description/tags of existing pages (when changed).
- Update
page_count, source_count, and last_updated in the frontmatter.
-
Check cross-reference consistency:
- For existing pages referenced by newly created pages, add the reverse reference too.
- Example: if you added
[[B]] in A, also add [[A]] to B's related items (when missing).
-
Update log.md:
| {YYYY-MM-DD} | ingest | {์์ค ํ์ผ๋ช
} | {N}๊ฐ | {์์ฑ/์
๋ฐ์ดํธ๋ ํ์ด์ง ์์ฝ} |
Phase 5: Completion report
## ์์ง ์๋ฃ
### ์์ค
- {์์ค ํ์ผ๋ช
} โ .wiki/sources/{์ ์ฅ ํ์ผ๋ช
}
### ์์ฑ๋ ํ์ด์ง ({N}๊ฐ)
- [[page-1]] โ {์ค๋ช
}
- [[page-2]] โ {์ค๋ช
}
### ์
๋ฐ์ดํธ๋ ํ์ด์ง ({N}๊ฐ)
- [[page-3]] โ {์ถ๊ฐ๋ ๋ด์ฉ ์์ฝ}
### ์ ๊ต์ฐจ์ฐธ์กฐ
- [[page-1]] โ [[page-3]]
- [[page-2]] โ [[overview]]
### ๋ชจ์ ๋ฐ๊ฒฌ ({N}๊ฑด)
- [[page-3]]: {๋ชจ์ ์ค๋ช
}
Batch processing behavior
When ingesting a directory or doing an "everything" ingestion:
- First acquire all source files in Phase 1 (acquisition).
- Run Phase 2โ3 per source sequentially (each source's result feeds into the existing wiki for the next source).
- Run Phase 4 (index/log) only once, after all sources are processed.
- Report the overall summary in Phase 5.
Rules
- Never modify the source originals โ only copy them into
.wiki/sources/.
- Follow the
references/page-format.md guide when authoring pages.
- Use only the
[[wikilinks]] format for cross-references.
- Preserve the existing structure as much as possible when updating existing pages.
- On a contradiction, don't delete โ preserve both pieces of information in a
> โ ๏ธ ๋ชจ์ block.
- Language: respond in Korean.