2.9 KiB
External Wiki Sync
Related:
Summary
- Repo docs are canonical, even when they were originally drafted by an LLM.
- The external Obsidian wiki imports canonical repo docs read-only into
_repo-context/. - Higher-level synthesis pages stay outside
_repo-context/in the wiki's own folders. - Sync is one-way by default: repo docs -> wiki context.
Ownership Model
Canonical repo docs include:
docs/architecture/**/*.md- top-level workflow docs such as
README.md,GETTING-STARTED.md,AGENTS.md, andCLAUDE.md - selected module
README.mdfiles when they describe current code behavior or workflows
The external wiki can add cross-links, feature pages, decision notes, and synthesis pages, but it must not become a second source of truth for the same implementation details.
Export Scope
The repo-owned exporter writes only to _repo-context/ inside the external vault.
Current default export scope:
docs/architecture/**/*.mdREADME.mdGETTING-STARTED.mdAGENTS.mdCLAUDE.md- selected module
README.mdfiles
The exporter also generates:
_repo-context/index.md_repo-context/repo-map.md_repo-context/recent-changes.md_repo-context/manifest.json_repo-context/state.json
Running The Exporter
Set the external vault path in the shell environment:
export IPTVNATOR_WIKI_VAULT=/absolute/path/to/your/obsidian-vault
Then run:
pnpm wiki:export --mode full
pnpm wiki:export --mode changed
You can also override the vault path per command:
pnpm wiki:export --mode changed --vault /absolute/path/to/your/obsidian-vault
If the vault path is missing, the exporter skips cleanly and reports why it did not run.
Agent Workflow After Changes
After a meaningful implementation change, agents must assess whether canonical repo docs need updates.
Documentation-worthy changes include:
- new or changed user-visible behavior
- architecture or data-flow changes
- non-obvious maintenance workflows
- new setup, debugging, or operational steps
- new subsystem contracts or boundaries
Prefer updating an existing authoritative doc before creating a new one:
README.mdfor top-level developer or user workflowsdocs/architecture/for architecture, ownership, and behavior contracts- the nearest module
README.mdfor local usage or behavior
If docs changed and IPTVNATOR_WIKI_VAULT is configured, agents should run pnpm wiki:export --mode changed before considering the task complete.
Promotion Workflow
If a wiki page becomes stable enough to be canonical:
- promote that content back into a repo doc
- treat the repo doc as the source of truth
- export again so
_repo-context/reflects the promoted canonical doc
The wiki page can then either link to the repo-backed generated page or remain as a smaller synthesis page that references the canonical doc.