KiroGraph’s wiki module implements the Karpathy LLM wiki pattern: the agent reads source text, produces structuredDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/davide-desio-eleva/kirograph/llms.txt
Use this file to discover all available pages before exploring further.
WIKI_DIFF blocks, and writes them to a versioned SQLite-backed Markdown wiki stored at .kirograph/wiki/. The knowledge base grows incrementally across sessions — each kirograph_wiki_ingest call enriches the wiki without clobbering prior content. All tools require enableWiki: true in .kirograph/config.json.
Wiki pages live on disk at
.kirograph/wiki/<slug>.md and are simultaneously indexed in SQLite for full-text search. Run kirograph_wiki_reindex to re-sync SQLite from disk if you edit the Markdown files manually.WIKI_DIFF Block Format
The LLM writes changes usingWIKI_DIFF_START … WIKI_DIFF_END blocks. Each block has a JSON header on the first line, followed by the Markdown content. Multiple blocks can appear in a single response.
WIKI_DIFF block format
| Action | Description |
|---|---|
create | Create a new page. Requires a title field. Content is the full page Markdown. |
upsert | Update a specific section in an existing page. mode is append (default) or replace. |
append | Append content to the end of an existing page. |
WIKI_DIFF_CONFLICTS block format
autoResolveConflicts: true is set in config, conflicts where incomingDate is newer are automatically resolved by replacing the existing claim and appending a superseded note. Otherwise, conflicts are held as pending and reported by kirograph_wiki_apply_diff.
kirograph_wiki_ingest
Build a structured prompt for the LLM to update the wiki from a source text. The prompt includes the wiki SCHEMA.md, the current MANIFEST.md, and the source content, instructing the LLM to produce WIKI_DIFF blocks. After calling this tool, pass the LLM’s output to kirograph_wiki_apply_diff.
In local synthesis mode (wikiSynthesisMode: "local"), the source is queued for batch processing by the local model; the agent does not produce a WIKI_DIFF itself.
Source content to ingest. Can be a block of raw text, a file path, or a symbol name.
Human-readable name for the source (e.g.
"ADR-007.md", "sprint-14-retro"). Used in ## Sources sections and conflict metadata.Project root path. Defaults to the current working directory.
Example: ingest an architecture decision record
WIKI_INGEST_PROMPT block. Pass the LLM’s response (the WIKI_DIFF blocks) to kirograph_wiki_apply_diff.
kirograph_wiki_apply_diff
Parse and apply a WIKI_DIFF string produced by the LLM. Writes updated Markdown files to .kirograph/wiki/ and updates the SQLite index. Returns lists of created pages, updated pages, auto-resolved conflicts, and pending conflicts.
The raw
WIKI_DIFF output from the LLM, including all WIKI_DIFF_START … WIKI_DIFF_END blocks and any WIKI_DIFF_CONFLICTS … WIKI_DIFF_CONFLICTS_END blocks.Project root path. Defaults to the current working directory.
Example
Example output
kirograph_wiki_lint
Check the wiki for structural issues: broken internal links, orphan pages (not linked from any other page), and contradictions (sections flagged as conflicting during a previous ingest). Returns lint errors with their kind and detail.
Project root path. Defaults to the current working directory.
Example
Example output
kirograph_wiki_search
Full-text search across all wiki pages. Returns pages ranked by relevance with a content preview.
Search query.
Maximum results to return. Defaults to
5, capped at 20.Project root path. Defaults to the current working directory.
Example
kirograph_wiki_page
Retrieve the full Markdown content of a specific wiki page by its slug.
Page slug (e.g.
"AuthService", "arch/session-cookies"). Use kirograph_wiki_list to discover slugs.Project root path. Defaults to the current working directory.
Example
kirograph_wiki_list
List all wiki pages with their slugs, titles, source counts, and last-updated dates.
Project root path. Defaults to the current working directory.
Example
Example output
kirograph_wiki_status
Wiki health summary: page count, total ingested sources, oldest and newest page dates, and the wiki directory path.
Project root path. Defaults to the current working directory.
Example
Example output
kirograph_wiki_synthesize
Trigger local-model wiki synthesis for all queued sources (only available when wikiSynthesisMode: "local"). Processes the queue, writes wiki pages, and reports created/updated counts. Errors are reported per source.
Project root path. Defaults to the current working directory.
Example
kirograph_wiki_reindex
Re-sync the SQLite search index from the Markdown files in .kirograph/wiki/. Use after manually editing wiki .md files outside of the MCP tools.
Project root path. Defaults to the current working directory.
Example
Complete Ingest → Apply → Lint Workflow
Ingest a source document
Pass the source text — a retro doc, an ADR, a design spec, or a session transcript:The tool returns a
WIKI_INGEST_PROMPT. Submit it to the LLM and collect the WIKI_DIFF response.