| name | lw-init |
| description | Initialize a new LLM Wiki workspace with raw/, wiki/, profiles/, and .llm-wiki/ state files, plus optional outputs/ artifact storage when needed. Usage: /lw-init <workspace-path> |
LLM Wiki Init
Initialize a project-agnostic wiki workspace.
Purpose
lw-init is the canonical initialization contract.
It defines what every new LLM Wiki workspace must contain.
For a more operational repo-backed first run, pair it with:
scaffolds/repo-backed-starter/
scripts/bootstrap-repo-backed-wiki.sh
- the correct guide under
integrations/<agent>/
Steps
- Create the workspace root if missing.
- Create:
raw/web/
raw/pdfs/
raw/images/
raw/notes/
raw/repo/
raw/changes/
wiki/
wiki/concepts/
wiki/entities/
wiki/topics/
wiki/comparisons/
wiki/queries/
wiki/maps/
wiki/archive/
profiles/
.llm-wiki/
- Create
outputs/ only when the workspace expects non-canonical artifacts such as exports, slides, charts, reports, or automation logs.
- Write
wiki/index.md with empty sections.
- Write
wiki/log.md with a creation entry.
- Write
.llm-wiki/manifest.json with an empty generic shape:
{
"repo_sync": {
"enabled": false,
"repo_path": null,
"repo_remote": "origin",
"default_branch": "main",
"provider": null,
"repo_slug": null,
"last_checked_at": null,
"last_seen_default_branch_sha": null,
"last_compiled_sha": null,
"last_compiled_at": null,
"last_repo_summary": null,
"pending_changes": [],
"processed_change_units": [],
"active_background_sync": null,
"last_sync_report": null,
"fallback_policy": {
"retry_github_api": 3,
"fallback_to_git_only": true
}
},
"staged_artifacts": []
}
- Write
.llm-wiki/reflect_state.json as { "last_reflected_at": null, "synthesized_articles": [] }.
- Write
.llm-wiki/profile.json with a placeholder pointing to a workspace-local profile markdown file.
- If the wiki is being created from a git repo, create
profiles/project-profile.md from the shared profile template and tell the operator to fill in the repo_sync block.
- If a more operational first-run baseline is desired, copy or adapt starter templates from
scaffolds/repo-backed-starter/ for:
.llm-wiki/manifest.json
.llm-wiki/profile.json
.llm-wiki/reflect_state.json
wiki/SCHEMA.md
wiki/index.md
wiki/log.md
- Copy or adapt agent instruction templates for
AGENTS.md and, when useful, CLAUDE.md, SOUL.md, and IDENTITY.md.
- Print the initialized path and the next required setup steps, including which integration guide under
integrations/<agent>/ to follow.
Repo-backed initializer contract
When used for a repo-backed wiki, lw-init should ensure the workspace is ready for these next steps:
- fill in the workspace-local project profile under
profiles/
- point
.llm-wiki/profile.json at that profile using a relative path
- install the relevant agent adapter files
- if the user has only a Git URL, run
lw-clone-repo (or bootstrap with --repo-url) to create raw/upstream and bind repo_sync; otherwise set repo_path to an existing checkout
- run
lw-sync-repo for first inspection
- continue into ingest, compile, lint, and reflect
Rules
- Keep compiled content under
wiki/, not at repository root.
- Keep staged inputs under
raw/.
- Keep state under
.llm-wiki/.
- Treat
outputs/ as optional non-canonical artifact storage, not core wiki structure.
- Keep the active profile workspace-local and referenced through a relative path in
.llm-wiki/profile.json.