indexion wiki
indexion's wiki system maintains a knowledge base at .indexion/wiki/ as a collection of
Markdown files governed by a wiki.json manifest.
A wiki page is not just a .md file
A wiki page consists of four synchronized artifacts:
wiki pages update updates all four at once. Editing the .md file directly updates
only the first. The other three become stale — search returns old results, the manifest
carries wrong provenance, and the log has no record of the change.
If you edit a .md directly (e.g. via Edit tool), you must immediately follow up:
Every wiki page also carries two provenance fields in the manifest:
provenance:"extracted"|"synthesized"|"manual"last_actor:"indexion"|"agent:<name>"|"user"
Command Structure
Navigating the Wiki (as an agent)
Before reading individual pages, start with the index:
index.md lists pages by category and identifies hub pages (most-linked pages).
Hub pages are the best starting points for understanding an unfamiliar codebase.
Writing a New Page
The --sources field links the page to source files for change tracking.
Always specify it — pages without sources are invisible to wiki pages ingest.
Updating an Existing Page
Expected output: Updated page 'existing-page' (search index updated)
Detecting What Needs Updating
ingest hashes every source file listed in wiki.json and compares against
.indexion/wiki/ingest-manifest.json. It outputs an update task list but does
not rewrite pages — that is the agent's responsibility.
Workflow:
- Run
wiki pages ingestto get the task list. - For each task, read the changed source files.
- Update the wiki page with
wiki pages update. - Re-run
ingest— it should report 0 pages needing attention.
Verifying Structural Integrity
After writing new pages, always run wiki lint and fix any issues before finishing.
Cross-reference warnings are common when related concepts are split across pages.
Fix them by adding a ## See Also section with wiki://page-id links.
Verifying Content Accuracy (plan reconcile)
wiki lint catches structural problems. plan reconcile catches semantic drift —
whether the code symbols described in a wiki page still exist and whether the code has
changed since the page was last written.
Always target the project root (.). The --doc flag restricts which documents
participate, but the target directory determines the code symbol universe. Targeting a
subdirectory shrinks the symbol set and produces zero-fragment reports.
Reading the report
Summary — key metric is New logical reviews (fresh drift since last run).
Suggested Review Groups — the actionable core:
Each group lists affected symbols and the Docs: wiki pages involved.
Groups without a Docs: line mean no wiki page covers that module.
Residual candidates that persist after maintenance
Reconcile candidates never reach zero. Three sources of persistent candidates:
- Modules without wiki pages produce
missing_doc. Create pages if coverage is needed. - Qualified method names (
Type::methodin wiki) don't match bare symbol names (methodin code). Verify by grepping the wiki for the symbol name before adding entries. - Same-name symbols across modules (
get,tokenize,to_json_string) cause cross-module false positives. Check which module the wiki page actually describes.
Track New logical reviews as the convergence metric. When it reaches zero,
all actionable drift has been addressed.
Full Wiki Maintenance Cycle
Planning a New Wiki from Scratch
When the wiki doesn't exist yet or needs a structural overhaul:
No initialization step is needed. The first wiki pages add call automatically
creates .indexion/wiki/ and an empty wiki.json manifest. There is no separate
wiki init command.
wiki pages plan uses the CodeGraph to propose concept-based pages, not file-based ones.
Prefer concept pages (e.g., "KGF System") over file pages (e.g., "src/kgf/lexer/lexer.mbt").
Building the Search Index
With --full, indexion search .indexion/wiki/ will use the pre-built vectors
instead of rebuilding from scratch on each query.
Checking the Audit Trail
Every pages add, pages update, lint, pages ingest, and index build call appends to
.indexion/wiki/log.json. Use the log to verify that previous agent runs completed
correctly, or to understand why a page was last modified.
Key Pitfalls
Backtick-quoted wiki:// references are not links. The lint checker correctly
ignores wiki:// in code spans. Use bare wiki://page-id or Markdown links
[Title](wiki://page-id) to create real cross-references.
wiki pages ingest manifests state at the time of the last run. If you add new source
files to a page's sources list via pages update, the next ingest run will show
that page as needing attention (because the new sources have no recorded hash). This is
expected behavior — run ingest again after the update to record the baseline.



