(Adjust the prefix if the skills directory differs. python3 on some systems.)
Two dialects, selected by --dialect:
| Dialect | When | Links | Frontmatter | Output |
|---|---|---|---|---|
| okf-pure (default) | Any editor/agent; portable | standard markdown [t](path.md) | OKF fields | follows source language |
| obsidian | The workspace is an Obsidian vault | [[wikilink]] | Dataview + callouts | Chinese-friendly |
If unsure, ask the user one short question; otherwise default to okf-pure.
This scans top-level directories that contain .md files and proposes scan_dirs + one domain rule per directory. Show the user the proposed scan_dirs and domains, and let them adjust (merge dirs, rename domains, set a different bundle_dir).
This writes okf.config.json at the workspace root and creates <bundle_dir>/{concepts,indexes}/, index.md, log.md, _meta.json.
Tell the user the bundle is ready and to run /wiki-compile to distill their source documents into concepts. Point them at okf.config.json for tuning (scan_dirs, exclude_patterns, domains, dialect).
| Key | Meaning |
|---|---|
| bundle_dir | Where the compiled bundle lives (default wiki) |
| scan_dirs | Source directories to compile from |
| exclude_patterns | Path fragments (matched against /+relpath) to skip |
| output_language | en / zh / … — language of generated concepts & indexes |
| dialect | okf-pure or obsidian (sets the link/callout/frontmatter profile) |
| link_style | markdown or wikilink |
| callout_style | plain or obsidian |
| frontmatter | okf or obsidian-dataview |
| backfill_sources | inject a concepts: field back into raw sources (obsidian only) |
| domains | {rules: [{path_prefix, domain}], default} — source → domain mapping |
Editing any field and re-running /wiki-compile is safe.