Architecture
WikiMason keeps deterministic wiki logic in Python and exposes a filesystem-backed CLI with configurable tool profiles. Runtime bridge commands are not part of the product surface.
Purpose and constraints
Single package at repository root:
wikimason/.Python 3.10+.
Minimal runtime dependencies: Typer, Click, PyYAML, RapidFuzz, fuzzysearch, and tomli for Python < 3.11.
Deterministic local filesystem operations.
No upstream Obsidian CLI dependency.
Main layers
- CLI
Typer-based command surface with consistent
--format text|jsonoutput and structured exit codes.- Operational log
Wiki/log.mdis an append-only operational timeline with typed events, automatic command logging for important change/audit commands,log tail, andlog checkvalidation.- Config and profile
TOML configuration resolved from explicit
--config, localwikimason.toml,--envprofiles, and built-in defaults. The active profile (Markdown, Obsidian, or Logseq) controls on-disk page layout, frontmatter format, and link rendering.- Filesystem
Profile-aware page path resolution, safe vault-relative file operations, and structured directory layout with
Raw/,Wiki/,Schema/, and_templates/.- Source lifecycle
Import raw sources with content hashing and stable
source_idassignment. Manifest tracking inSchema/source-manifest.jsonl. Scan, delta, verify, rehash, and lint operations.- Build and lint
Compile
AGENTS.mdfrom schema, policy, and command metadata. Generate and validate indexes, catalogs, and command references. Lint pages for schema compliance, link integrity, and source parity.- Search
Catalog-based keyword and fuzzy search across compiled wiki pages.
Runtime workflows
- Init
wikimason init <profile> <path>scaffolds a complete vault with directories, templates, schema files, git hooks, andAGENTS.md.- Source ingest
wikimason source add→source scan→source delta→ingest status→ingest plan→note new→ingest finish.- Vault maintenance
wikimason vault maintainverifies, rebuilds, scans, lints, and audits all tracked state in one pass, then validates the operational log.
Generated artifacts and ownership
These files are generated by WikiMason and should not be hand-edited:
Schema/source-manifest.jsonlSchema/command-reference.mdSchema/frontmatter-schema.mdSchema/agent-workflow.mdWiki/catalog.jsonlWiki/index.mdWiki/log.mdAGENTS.md