Project Wiki
Maintain local wikis for a code project under .wiki by default, with optional language-specific roots such as .wiki-cn, .wiki-fr, or an exact user-named wiki directory such as wiki-cn.
Source of truth is always the current git-tracked repository files at HEAD, including tracked documentation in .docs/ and docs/, not the wiki.
The wiki files themselves may be untracked; read and update the live selected wiki root from the working tree when present.
Rules
- Operate only on git-tracked files and git history
- Ignore staged and unstaged uncommitted changes; ingest and query verification use committed content at
HEAD only
- Select exactly one wiki root per request. Use
.wiki by default; use the explicit root or language the user names, such as .wiki-cn, wiki-cn, .wiki-fr, "Chinese wiki", or "French wiki"
- Each wiki root is independent. Do not sync, compare, translate, merge, or copy pages between language roots unless the user explicitly asks
- Exclude all wiki roots from git-based source selection:
.wiki/**, .wiki-*/**, and wiki-*/**
- Do not assume any wiki root is git-tracked; use the selected root's current
index.md checkpoint when it exists
- Every wiki page must have YAML frontmatter
- The selected root's
index.md must be updated on every ingest
- Do not ask the user before ingesting
- Export reads the live working-tree files under the selected wiki root, not the git-tracked repository at
HEAD
Wiki Layout
Required:
<wiki-root>/index.md — human entry point and master catalog (tracks last ingest commit for that root only)
Optional (create as needed):
<wiki-root>/overview/ — orientation pages that explain the project, startup path, storage, and reading path
<wiki-root>/features/ — one page per significant product capability or implementation area
<wiki-root>/bug-fixes/ — one page per notable bug fix or patch
<wiki-root>/concepts/ — cross-cutting ideas and patterns
<wiki-root>/entities/ — data models, schemas, types
<wiki-root>/flows/ — sequences, pipelines, request lifecycles
<wiki-root>/risks/ — invariants, compatibility contracts, fragile behavior, and things not to break
<wiki-root>/reference/ — code-shaped reference pages when a source path needs focused explanation
<wiki-root>/notes/ — ad-hoc or open questions
Human understanding structure
The wiki is for a human to understand the codebase, not for the repository to describe itself. Organize the front door around the reader's questions before the code's folders.
<wiki-root>/index.md must answer these questions, in this order:
- What is this?
- Get started
- Why does it exist?
- What happens when I run it?
- Where is data saved?
- What are the important moving parts?
- What should I avoid breaking?
- Where do I look first?
Use these questions as the primary navigation. features/, entities/, flows/, and reference/ are supporting evidence, not the first mental model.
The Get Started section is for codebase orientation, not a duplicate README. It should give a smart newcomer the first 10 minutes:
- the main command to run
- required environment or services
- expected successful output
- the first files to read
- one safe first change
- one tempting dangerous change
When a repo already has setup instructions in README.md or docs/, link to them and summarize only what helps the reader understand the code.
Wiki root selection
- Default wiki root:
.wiki
- Language-specific roots: prefer
.wiki-<language-code> when creating a new language wiki, for example .wiki-cn for Chinese and .wiki-fr for French
- If the user names an exact directory, such as
wiki-cn, use that exact root instead of normalizing it
- Language roots do not inherit checkpoints, pages, links, or stale status from each other
- When the user asks for a language wiki by language name, write page prose in that language and keep code identifiers, file paths, and API names unchanged
Page Conventions
index.md frontmatter
index.md carries extra fields to track ingest state:
---
title: "Project Wiki"
type: "index"
status: "active"
language: "<language-code|default>"
last_commit: "<full-sha>"
updated_at: "YYYY-MM-DD"
---
last_commit is the full git commit SHA at the time of the most recent full-repository ingest for the selected wiki root. This checkpoint lives in the selected root's current index.md file whether or not that root is git-tracked. On the next ingest for the same root, prefer this saved last_commit to find changed files with git diff --name-status -M <last_commit> HEAD.
If git metadata is unavailable, do not fall back to filesystem scanning. Ingest and lint are unavailable until git access works again.
Other pages
---
title: "Page Title"
type: "overview|feature|bug-fix|concept|entity|flow|risk|reference|note"
status: "draft|active|stale"
language: "<language-code|default>"
source_paths: []
updated_at: "YYYY-MM-DD"
---
Set language to default for .wiki, cn for .wiki-cn or wiki-cn, fr for .wiki-fr, and the matching language code for other language-specific roots.
Use status: "stale" when the source file has changed significantly since the page was last updated, or when the page describes something that no longer exists. During ingest, pages whose source_paths changed since last_commit should be updated or marked stale. Do not delete stale pages automatically — mark them and note the drift so the user can decide.
Page naming
- Use lowercase, hyphenated filenames:
auth-middleware.md, user-schema.md
- Name pages for the human idea first:
login-check.md, saved-data-shape.md, startup-flow.md
- Use source-path names only for reference pages or when there is no clearer reader-facing name:
src/api/routes.ts → <wiki-root>/reference/src-api-routes.md
- Use descriptive names for concepts and flows:
<wiki-root>/concepts/request-lifecycle.md
Wiki links
Use [[page-slug]] links between pages whenever a page references something covered on another page. The target should match the destination filename without the .md extension. This makes the wiki navigable and lets lint resolve links deterministically.
Ingest
Trigger on:
ingest
ingest [file]
ingest [folder]
ingest wiki-cn
ingest .wiki-fr
refresh wiki
update wiki
update Chinese wiki
Workflow:
- Select the wiki root from the request. Default to
.wiki; use an explicit root or language-specific root when named
- Read
<wiki-root>/index.md from the working tree if it exists, even when the wiki root is untracked — note last_commit from frontmatter
- Missing
<wiki-root>/index.md or a missing last_commit means there is no prior ingest checkpoint for that root
- Run
git rev-parse HEAD to get the current HEAD commit SHA
- Detect changed files:
- If
last_commit is set: git diff --name-status -M <last_commit> HEAD and exclude all wiki roots (.wiki/**, .wiki-*/**, wiki-*/**)
- Use the saved
last_commit even if the selected wiki root is untracked; do not treat an untracked wiki root as a fresh ingest from HEAD
- Use the git status codes to distinguish added, modified, deleted, and renamed paths when updating wiki pages
- If no prior ingest: build a broad ingest candidate set from
git ls-files at HEAD, excluding all wiki roots (see Ingest Priorities below)
- Resolve scope:
- If a file or folder is specified, prioritize it — limit the tracked candidate set to that scope
- For a scoped ingest, do not advance
<wiki-root>/index.md:last_commit unless the scoped ingest also covers every file changed since last_commit
- Otherwise ingest changed files first, then fill in missing coverage
- Read relevant tracked repository files — understand their role
- Update or create wiki pages under the selected wiki root
- Mark pages in the selected wiki root for deleted source files as
status: "stale" with a note in the page body, and update moved or renamed pages based on rename information from git
- Update
<wiki-root>/index.md:
- Always set
updated_at to today
- Set
last_commit to the current HEAD SHA only after a full ingest or after processing the complete changed-file set from the previous last_commit
- If a broad ingest stops early after partial coverage, leave
last_commit unchanged and note in index.md that bootstrap coverage is still partial
- Never discard an existing saved
last_commit merely because the selected wiki root is untracked
Ingest is automatic. Do not ask the user for confirmation.
If git commands fail, report that the wiki skill cannot ingest until git access is restored. Do not substitute directory walking.
Export
Trigger on:
export wiki
bundle wiki
archive wiki
one-page wiki
prepare wiki for notebooklm
send wiki to notebooklm
Workflow:
- Select the wiki root from the request. Default to
.wiki; use an explicit root or language-specific root when named
- Check whether
<wiki-root>/index.md exists in the working tree
- If the selected wiki root is missing or clearly incomplete, run ingest first without asking
- Export the live selected wiki from the working tree, not from
HEAD
- Use the bundled zero-dependency CLI:
node skills/git-wiki/scripts/export-wiki-bundle.mjs \
--input-dir <wiki-root>
- Default output is
index-{simple-timestamp}.md in the selected wiki root
- If the user wants a different destination, pass
--output-file <path>
- If the user wants a custom label in the export header, pass
--root-name <name>
- The export must produce:
- a repository/wiki header with generation date
- a table of contents covering every bundled page
- one section per wiki file with selected frontmatter preserved
- explicit file start/end markers so the bundle works as an archive artifact or NotebookLM source
- When the request is specifically about NotebookLM, export first, then hand the produced bundle file to the
notebooklm skill as the source artifact
Export expectations:
- Prefer bundling
<wiki-root>/**/*.md
- Preserve only useful frontmatter fields such as
title, type, status, language, tags, description, source_paths, updated_at, and last_commit
- Normalize
[[wiki-links]] into plain text so downstream tools do not need Obsidian semantics
- Strip Obsidian image embeds such as
![[image.png]]
- Keep the output deterministic by sorting files by relative path
- Use a simple timestamp in the default filename, for example
.wiki-fr/index-20260510-143522.md
- Do not treat export as a substitute for ingest; export packages the current wiki, it does not rebuild it
Ingest Priorities
When doing a broad ingest from git-tracked files, build the human entry point first, then add supporting code pages. Work in this order and stop when you have good coverage (typically 10–20 pages for a medium project):
- Root readme and tracked documentation under
.docs/ and docs/
- Package/build/workspace config (
package.json, pyproject.toml, Cargo.toml, etc.) to determine how the project runs
- Entry points (
main.ts, index.ts, app.py, cmd/, etc.) to explain startup and runtime behavior
- Storage, generated outputs, config, secrets, caches, logs, and persistence boundaries →
<wiki-root>/overview/ or <wiki-root>/entities/
- Core user/system workflows →
<wiki-root>/flows/
- Important moving parts, concepts, and subsystem boundaries →
<wiki-root>/concepts/ or <wiki-root>/features/
- Contracts and fragile areas the reader should avoid breaking →
<wiki-root>/risks/
- API definitions, schemas, and persistence layers →
<wiki-root>/features/ or <wiki-root>/entities/
- Jobs, queues, background workers →
<wiki-root>/features/
- UI structure (if present) →
<wiki-root>/features/
- Tests (summarize behavior expectations and safety nets, don't document every test file)
- Notable bug fixes visible in git history →
<wiki-root>/bug-fixes/
For large repos (100+ files), focus on depth over breadth: deeply document the 10 most important modules rather than shallowly touching 50.
Query
When asked a project question:
- Select the wiki root from the request. Default to
.wiki; use an explicit root or language-specific root when named
- Read
<wiki-root>/index.md if it exists
- Read relevant wiki pages in the selected root if they exist
- If the selected wiki is missing, the relevant page is missing, or a page is marked stale, verify directly against git-tracked repository source before answering
- Prefer tracked documentation in
.docs/ and docs/ when it is relevant to the question, then confirm against code or config when needed
- Verify against git-tracked repository source when the answer involves specific values (counts, names, configs)
- Answer in the selected wiki's language when the user named a language root, with concise explanation and
[[wiki-link]] citations when relevant wiki pages exist
- If you created new understanding not yet in the selected wiki root, mention it — the user can ask you to save it
Lint
Trigger on:
lint
lint wiki
check wiki
lint .wiki-fr
check Chinese wiki
Checks:
- Contradictions between pages (two pages making conflicting claims)
- Orphan pages with no inbound
[[links]]
- Concepts mentioned across multiple pages but lacking their own page
- Stale pages (
status: "stale") that may have drifted from current source
- Missing coverage for major changed modules (files changed since
last_commit with no wiki page)
- Broken
[[wiki-links]] where the target page doesn't exist
Lint Output Format
## Wiki Lint Report — YYYY-MM-DD
### Errors
- [page] description of contradiction or broken link
### Warnings
- [page] description of potential issue
### Suggestions
- description of missing coverage or improvement
### Next Questions
- open questions worth investigating
Do not auto-fix unless explicitly asked.
Writing Guidance
- Write for a smart newcomer, not a maintainer. Use layman's terms first, then add the exact code term only when it helps: "the login check" before "auth middleware", "saved data shape" before "schema", "background task" before "worker"
- Structure pages around the reader's question, then ground the answer in files. Do not lead with a directory tour unless the page is explicitly reference material
- Explain why a file matters in the product or workflow before naming implementation details
- Avoid unexplained acronyms, framework jargon, and internal shorthand. If a technical term is necessary, define it in the same sentence
- Summarize; do not reproduce large code blocks — a few lines of example code is fine, but explain patterns rather than paste implementations
- Use concrete file paths as anchors (
src/api/routes.ts:42)
- Separate facts (directly read from source) from inferences (your interpretation)
- Cross-link related pages with
[[wiki-links]]
- Keep pages under ~500 words; create additional pages rather than growing one page long
- Prefer useful coverage over exhaustive coverage — a good wiki is navigable, not encyclopedic
Quality Bar
The wiki succeeds when:
<wiki-root>/index.md helps a new reader navigate the project in under 2 minutes
- A newcomer can answer what the project is, why it exists, what happens when it runs, where data is saved, what matters, what not to break, and where to look first
- Answers can start from wiki pages and be verified in code
- Ingest detects changed files automatically using the saved
last_commit
- Lint catches drift before the wiki becomes misleading
1---2name: git-wiki3description: Build and maintain local code-project wikis under .wiki or language-specific wiki roots such as .wiki-cn and .wiki-fr. Use this skill whenever the user mentions "wiki", "ingest", "refresh wiki", "update wiki", "lint wiki", "check wiki", "document the codebase", "export wiki", "bundle wiki", "archive wiki", or asks a question that can be answered from wiki pages. Also use it when the user asks how something works in the project and a wiki page could capture the answer for future reference.4---56# Project Wiki78Maintain local wikis for a code project under `.wiki` by default, with optional language-specific roots such as `.wiki-cn`, `.wiki-fr`, or an exact user-named wiki directory such as `wiki-cn`.910Source of truth is always the current git-tracked repository files at `HEAD`, including tracked documentation in `.docs/` and `docs/`, not the wiki.11The wiki files themselves may be untracked; read and update the live selected wiki root from the working tree when present.1213## Rules1415* Operate only on git-tracked files and git history16* Ignore staged and unstaged uncommitted changes; ingest and query verification use committed content at `HEAD` only17* Select exactly one wiki root per request. Use `.wiki` by default; use the explicit root or language the user names, such as `.wiki-cn`, `wiki-cn`, `.wiki-fr`, "Chinese wiki", or "French wiki"18* Each wiki root is independent. Do not sync, compare, translate, merge, or copy pages between language roots unless the user explicitly asks19* Exclude all wiki roots from git-based source selection: `.wiki/**`, `.wiki-*/**`, and `wiki-*/**`20* Do not assume any wiki root is git-tracked; use the selected root's current `index.md` checkpoint when it exists21* Every wiki page must have YAML frontmatter22* The selected root's `index.md` must be updated on every ingest23* Do not ask the user before ingesting24* Export reads the live working-tree files under the selected wiki root, not the git-tracked repository at `HEAD`2526## Wiki Layout2728Required:2930* `<wiki-root>/index.md` — human entry point and master catalog (tracks last ingest commit for that root only)3132Optional (create as needed):3334* `<wiki-root>/overview/` — orientation pages that explain the project, startup path, storage, and reading path35* `<wiki-root>/features/` — one page per significant product capability or implementation area36* `<wiki-root>/bug-fixes/` — one page per notable bug fix or patch37* `<wiki-root>/concepts/` — cross-cutting ideas and patterns38* `<wiki-root>/entities/` — data models, schemas, types39* `<wiki-root>/flows/` — sequences, pipelines, request lifecycles40* `<wiki-root>/risks/` — invariants, compatibility contracts, fragile behavior, and things not to break41* `<wiki-root>/reference/` — code-shaped reference pages when a source path needs focused explanation42* `<wiki-root>/notes/` — ad-hoc or open questions4344### Human understanding structure4546The wiki is for a human to understand the codebase, not for the repository to describe itself. Organize the front door around the reader's questions before the code's folders.4748`<wiki-root>/index.md` must answer these questions, in this order:49501. What is this?512. Get started523. Why does it exist?534. What happens when I run it?545. Where is data saved?556. What are the important moving parts?567. What should I avoid breaking?578. Where do I look first?5859Use these questions as the primary navigation. `features/`, `entities/`, `flows/`, and `reference/` are supporting evidence, not the first mental model.6061The `Get Started` section is for codebase orientation, not a duplicate README. It should give a smart newcomer the first 10 minutes:6263* the main command to run64* required environment or services65* expected successful output66* the first files to read67* one safe first change68* one tempting dangerous change6970When a repo already has setup instructions in `README.md` or `docs/`, link to them and summarize only what helps the reader understand the code.7172### Wiki root selection7374* Default wiki root: `.wiki`75* Language-specific roots: prefer `.wiki-<language-code>` when creating a new language wiki, for example `.wiki-cn` for Chinese and `.wiki-fr` for French76* If the user names an exact directory, such as `wiki-cn`, use that exact root instead of normalizing it77* Language roots do not inherit checkpoints, pages, links, or stale status from each other78* When the user asks for a language wiki by language name, write page prose in that language and keep code identifiers, file paths, and API names unchanged7980## Page Conventions8182### index.md frontmatter8384`index.md` carries extra fields to track ingest state:8586```yaml87---88title: "Project Wiki"89type: "index"90status: "active"91language: "<language-code|default>"92last_commit: "<full-sha>"93updated_at: "YYYY-MM-DD"94---95```9697`last_commit` is the full git commit SHA at the time of the most recent full-repository ingest for the selected wiki root. This checkpoint lives in the selected root's current `index.md` file whether or not that root is git-tracked. On the next ingest for the same root, prefer this saved `last_commit` to find changed files with `git diff --name-status -M <last_commit> HEAD`.9899If git metadata is unavailable, do not fall back to filesystem scanning. Ingest and lint are unavailable until git access works again.100101### Other pages102103```yaml104---105title: "Page Title"106type: "overview|feature|bug-fix|concept|entity|flow|risk|reference|note"107status: "draft|active|stale"108language: "<language-code|default>"109source_paths: []110updated_at: "YYYY-MM-DD"111---112```113114Set `language` to `default` for `.wiki`, `cn` for `.wiki-cn` or `wiki-cn`, `fr` for `.wiki-fr`, and the matching language code for other language-specific roots.115116Use `status: "stale"` when the source file has changed significantly since the page was last updated, or when the page describes something that no longer exists. During ingest, pages whose `source_paths` changed since `last_commit` should be updated or marked stale. Do not delete stale pages automatically — mark them and note the drift so the user can decide.117118### Page naming119120* Use lowercase, hyphenated filenames: `auth-middleware.md`, `user-schema.md`121* Name pages for the human idea first: `login-check.md`, `saved-data-shape.md`, `startup-flow.md`122* Use source-path names only for reference pages or when there is no clearer reader-facing name: `src/api/routes.ts` → `<wiki-root>/reference/src-api-routes.md`123* Use descriptive names for concepts and flows: `<wiki-root>/concepts/request-lifecycle.md`124125### Wiki links126127Use `[[page-slug]]` links between pages whenever a page references something covered on another page. The target should match the destination filename without the `.md` extension. This makes the wiki navigable and lets lint resolve links deterministically.128129## Ingest130131Trigger on:132133* `ingest`134* `ingest [file]`135* `ingest [folder]`136* `ingest wiki-cn`137* `ingest .wiki-fr`138* `refresh wiki`139* `update wiki`140* `update Chinese wiki`141142Workflow:1431441. Select the wiki root from the request. Default to `.wiki`; use an explicit root or language-specific root when named1452. Read `<wiki-root>/index.md` from the working tree if it exists, even when the wiki root is untracked — note `last_commit` from frontmatter146 * Missing `<wiki-root>/index.md` or a missing `last_commit` means there is no prior ingest checkpoint for that root1473. Run `git rev-parse HEAD` to get the current HEAD commit SHA1484. Detect changed files:149 * If `last_commit` is set: `git diff --name-status -M <last_commit> HEAD` and exclude all wiki roots (`.wiki/**`, `.wiki-*/**`, `wiki-*/**`)150 * Use the saved `last_commit` even if the selected wiki root is untracked; do not treat an untracked wiki root as a fresh ingest from `HEAD`151 * Use the git status codes to distinguish added, modified, deleted, and renamed paths when updating wiki pages152 * If no prior ingest: build a broad ingest candidate set from `git ls-files` at `HEAD`, excluding all wiki roots (see Ingest Priorities below)1535. Resolve scope:154 * If a file or folder is specified, prioritize it — limit the tracked candidate set to that scope155 * For a scoped ingest, do not advance `<wiki-root>/index.md:last_commit` unless the scoped ingest also covers every file changed since `last_commit`156 * Otherwise ingest changed files first, then fill in missing coverage1576. Read relevant tracked repository files — understand their role1587. Update or create wiki pages under the selected wiki root1598. Mark pages in the selected wiki root for deleted source files as `status: "stale"` with a note in the page body, and update moved or renamed pages based on rename information from git1609. Update `<wiki-root>/index.md`:161 * Always set `updated_at` to today162 * Set `last_commit` to the current HEAD SHA only after a full ingest or after processing the complete changed-file set from the previous `last_commit`163 * If a broad ingest stops early after partial coverage, leave `last_commit` unchanged and note in `index.md` that bootstrap coverage is still partial164 * Never discard an existing saved `last_commit` merely because the selected wiki root is untracked165166Ingest is automatic. Do not ask the user for confirmation.167168If git commands fail, report that the wiki skill cannot ingest until git access is restored. Do not substitute directory walking.169170## Export171172Trigger on:173174* `export wiki`175* `bundle wiki`176* `archive wiki`177* `one-page wiki`178* `prepare wiki for notebooklm`179* `send wiki to notebooklm`180181Workflow:1821831. Select the wiki root from the request. Default to `.wiki`; use an explicit root or language-specific root when named1842. Check whether `<wiki-root>/index.md` exists in the working tree185 * If the selected wiki root is missing or clearly incomplete, run ingest first without asking1863. Export the live selected wiki from the working tree, not from `HEAD`1874. Use the bundled zero-dependency CLI:188189```bash190node skills/git-wiki/scripts/export-wiki-bundle.mjs \191 --input-dir <wiki-root>192```1931945. Default output is `index-{simple-timestamp}.md` in the selected wiki root1956. If the user wants a different destination, pass `--output-file <path>`1967. If the user wants a custom label in the export header, pass `--root-name <name>`1978. The export must produce:198 * a repository/wiki header with generation date199 * a table of contents covering every bundled page200 * one section per wiki file with selected frontmatter preserved201 * explicit file start/end markers so the bundle works as an archive artifact or NotebookLM source2029. When the request is specifically about NotebookLM, export first, then hand the produced bundle file to the `notebooklm` skill as the source artifact203204Export expectations:205206* Prefer bundling `<wiki-root>/**/*.md`207* Preserve only useful frontmatter fields such as `title`, `type`, `status`, `language`, `tags`, `description`, `source_paths`, `updated_at`, and `last_commit`208* Normalize `[[wiki-links]]` into plain text so downstream tools do not need Obsidian semantics209* Strip Obsidian image embeds such as `![[image.png]]`210* Keep the output deterministic by sorting files by relative path211* Use a simple timestamp in the default filename, for example `.wiki-fr/index-20260510-143522.md`212* Do not treat export as a substitute for ingest; export packages the current wiki, it does not rebuild it213214### Ingest Priorities215216When doing a broad ingest from git-tracked files, build the human entry point first, then add supporting code pages. Work in this order and stop when you have good coverage (typically 10–20 pages for a medium project):2172181. Root readme and tracked documentation under `.docs/` and `docs/`2192. Package/build/workspace config (`package.json`, `pyproject.toml`, `Cargo.toml`, etc.) to determine how the project runs2203. Entry points (`main.ts`, `index.ts`, `app.py`, `cmd/`, etc.) to explain startup and runtime behavior2214. Storage, generated outputs, config, secrets, caches, logs, and persistence boundaries → `<wiki-root>/overview/` or `<wiki-root>/entities/`2225. Core user/system workflows → `<wiki-root>/flows/`2236. Important moving parts, concepts, and subsystem boundaries → `<wiki-root>/concepts/` or `<wiki-root>/features/`2247. Contracts and fragile areas the reader should avoid breaking → `<wiki-root>/risks/`2258. API definitions, schemas, and persistence layers → `<wiki-root>/features/` or `<wiki-root>/entities/`2269. Jobs, queues, background workers → `<wiki-root>/features/`22710. UI structure (if present) → `<wiki-root>/features/`22811. Tests (summarize behavior expectations and safety nets, don't document every test file)22912. Notable bug fixes visible in git history → `<wiki-root>/bug-fixes/`230231For large repos (100+ files), focus on depth over breadth: deeply document the 10 most important modules rather than shallowly touching 50.232233## Query234235When asked a project question:2362371. Select the wiki root from the request. Default to `.wiki`; use an explicit root or language-specific root when named2382. Read `<wiki-root>/index.md` if it exists2393. Read relevant wiki pages in the selected root if they exist2404. If the selected wiki is missing, the relevant page is missing, or a page is marked stale, verify directly against git-tracked repository source before answering2415. Prefer tracked documentation in `.docs/` and `docs/` when it is relevant to the question, then confirm against code or config when needed2426. Verify against git-tracked repository source when the answer involves specific values (counts, names, configs)2437. Answer in the selected wiki's language when the user named a language root, with concise explanation and `[[wiki-link]]` citations when relevant wiki pages exist2448. If you created new understanding not yet in the selected wiki root, mention it — the user can ask you to save it245246## Lint247248Trigger on:249250* `lint`251* `lint wiki`252* `check wiki`253* `lint .wiki-fr`254* `check Chinese wiki`255256Checks:257258* Contradictions between pages (two pages making conflicting claims)259* Orphan pages with no inbound `[[links]]`260* Concepts mentioned across multiple pages but lacking their own page261* Stale pages (`status: "stale"`) that may have drifted from current source262* Missing coverage for major changed modules (files changed since `last_commit` with no wiki page)263* Broken `[[wiki-links]]` where the target page doesn't exist264265### Lint Output Format266267```268## Wiki Lint Report — YYYY-MM-DD269270### Errors271- [page] description of contradiction or broken link272273### Warnings274- [page] description of potential issue275276### Suggestions277- description of missing coverage or improvement278279### Next Questions280- open questions worth investigating281```282283Do not auto-fix unless explicitly asked.284285## Writing Guidance286287* Write for a smart newcomer, not a maintainer. Use layman's terms first, then add the exact code term only when it helps: "the login check" before "auth middleware", "saved data shape" before "schema", "background task" before "worker"288* Structure pages around the reader's question, then ground the answer in files. Do not lead with a directory tour unless the page is explicitly reference material289* Explain why a file matters in the product or workflow before naming implementation details290* Avoid unexplained acronyms, framework jargon, and internal shorthand. If a technical term is necessary, define it in the same sentence291* Summarize; do not reproduce large code blocks — a few lines of example code is fine, but explain patterns rather than paste implementations292* Use concrete file paths as anchors (`src/api/routes.ts:42`)293* Separate facts (directly read from source) from inferences (your interpretation)294* Cross-link related pages with `[[wiki-links]]`295* Keep pages under ~500 words; create additional pages rather than growing one page long296* Prefer useful coverage over exhaustive coverage — a good wiki is navigable, not encyclopedic297298## Quality Bar299300The wiki succeeds when:301302* `<wiki-root>/index.md` helps a new reader navigate the project in under 2 minutes303* A newcomer can answer what the project is, why it exists, what happens when it runs, where data is saved, what matters, what not to break, and where to look first304* Answers can start from wiki pages and be verified in code305* Ingest detects changed files automatically using the saved `last_commit`306* Lint catches drift before the wiki becomes misleading