Update Wiki Docs
Read markdown files in the wiki/ folder, fix markdown syntax issues, and improve readability without changing technical intent.
When To Use
- The user asks to clean, polish, or normalize markdown docs in
wiki/
- Headings/lists/code fences/tables render incorrectly
- Documentation is hard to scan due to long paragraphs or inconsistent structure
- A doc needs editorial cleanup before sharing or release
Scope
Primary scope:
- Files under
wiki/**/*.md, but can be used on any markdown file in the repo if specified by the user
- Skip any files starting with
_ (e.g. _footer.md) or non-markdown files (e.g. LICENSE.txt) to avoid unintended edits to non-doc files or templates.
Baseline actions:
- Correct markdown syntax
- Correct general readability issues
- Run link integrity pass for obvious broken links and anchors
- Normalize heading hierarchy and section flow
- Add or correct code block language tags when known
Expanded actions (when user allows full pass):
- Improve list/table/code-block consistency
- Standardize terminology and naming across the document
- Flag stale or unverifiable claims for follow-up
Style Rules
- Write in concise technical style that remains approachable to non-expert users
- Prefer short to medium sentences; avoid unnecessary long sentences
- Explain terms briefly when first used if they may be unfamiliar
- Avoid unexplained jargon and acronym-heavy phrasing
- Keep wording direct, specific, and neutral
Safety Rules
- Preserve technical meaning and factual content
- Do not invent commands, API behavior, or version claims
- Keep edits narrow and reversible
- Preserve existing project-specific terminology unless clearly inconsistent
- If uncertainty is high, prefer adding a short clarification request over guessing
Procedure
Validation Tool
Use the repo-local validation script before and after doc edits when possible:
test/check-docs to validate all wiki markdown files
test/check-docs wiki/File.md to validate one or more specific files
test/check-docs --fix wiki/File.md only when a safe markdownlint auto-fix is appropriate
1. Confirm Target
Extract from user prompt:
- target markdown file(s) in
wiki/
- constraints (tone, audience, preserve wording, max rewrite level)
If targets are missing, ask for paths before editing.
2. Confirm Depth
Extract from user prompt:
- desired depth mode:
- syntax-only: fix markdown syntax/rendering issues only; do not rewrite wording or structure beyond what syntax requires
- readability: include syntax fixes plus clarity and scanability edits without broad restructuring
- full pass: include syntax, readability, structure normalization, terminology consistency, and broader doc cleanup
If depth is missing, default to readability and state that assumption.
3. Read And Diagnose
For each target file:
- If the scope is broad or unclear, run
test/check-docs first to establish the current markdown baseline.
- Scan for syntax/rendering issues
- Identify readability pain points (dense blocks, weak headings, mixed terminology)
- Note risky sections where edits may alter meaning
4. Normalize Heading Hierarchy
Apply heading structure rules before deep rewrites:
- keep one logical top-level heading per file where appropriate
- avoid skipped levels (
## directly to ####) unless source constraints require it
- ensure sibling sections use consistent levels
- rename headings only when it improves clarity without changing meaning
5. Apply Syntax Fixes First
Fix rendering/correctness issues first, such as:
- broken heading levels
- malformed lists
- unclosed/misfenced code blocks
- malformed links/images
- inconsistent table delimiter rows
- accidental HTML/markdown mixing that breaks rendering
6. Apply Readability Improvements
Make editorial improvements while preserving meaning:
- split long paragraphs
- convert prose enumerations into lists when clearer
- improve section titles for scanability
- remove repetition and tighten wording
- align terminology within the same document
Apply tone constraints during edits:
- concise technical phrasing
- approachable wording for normal users
- no unexplained technical babble
7. Run Link Integrity Pass
Check and fix obvious link issues:
- malformed inline/reference links
- anchors that no longer match heading text after edits
- obvious relative-path mistakes in wiki cross-links
If link targets cannot be verified from repo context, keep the original target and flag it in the report.
8. Add Code Block Language Tags
For fenced code blocks:
- add language tags when confidently inferable (
bash, python, json, yaml, etc.)
- correct clearly wrong tags
- leave tag blank only when language cannot be inferred safely
9. Run Completion Checks
Validate each edited file against this checklist:
test/check-docs or test/check-docs <file...> passes for the affected scope
- markdown renders correctly
- heading hierarchy is logical
- code fences include language where known
- links/anchors are internally consistent and obviously valid
- no factual changes introduced
- tone is concise, technical, and approachable
10. Report Results
Return:
- files edited
- categories of changes made (syntax/readability/structure)
- any unresolved ambiguity or potential factual follow-ups
Branching Guidance
- If the user asks minimal edits, still run heading normalization, link integrity checks, and code-block language tagging with minimal wording changes.
- If the user asks broad cleanup, run full pass including structure and terminology normalization.
- If a section appears technically outdated but cannot be verified from repo context, do not rewrite claims; flag it in the report.
Pass Criteria
A successful pass means:
- requested wiki markdown files were edited
- syntax/rendering issues were corrected
- heading hierarchy was normalized
- link integrity pass was completed
- code block language tagging was applied where known
- readability clearly improved without changing intent
- output report summarizes edits and open follow-ups
1---2name: update-docs3description: Update wiki markdown docs for syntax correctness, readability, link integrity, heading hierarchy normalization, and code block language tagging. Use when a user asks to clean up markdown formatting and improve clarity while preserving technical meaning.4---56# Update Wiki Docs78Read markdown files in the `wiki/` folder, fix markdown syntax issues, and improve readability without changing technical intent.910## When To Use1112- The user asks to clean, polish, or normalize markdown docs in `wiki/`13- Headings/lists/code fences/tables render incorrectly14- Documentation is hard to scan due to long paragraphs or inconsistent structure15- A doc needs editorial cleanup before sharing or release1617## Scope1819Primary scope:2021- Files under `wiki/**/*.md`, but can be used on any markdown file in the repo if specified by the user22- Skip any files starting with `_` (e.g. `_footer.md`) or non-markdown files (e.g. `LICENSE.txt`) to avoid unintended edits to non-doc files or templates.2324Baseline actions:2526- Correct markdown syntax27- Correct general readability issues28- Run link integrity pass for obvious broken links and anchors29- Normalize heading hierarchy and section flow30- Add or correct code block language tags when known3132Expanded actions (when user allows full pass):3334- Improve list/table/code-block consistency35- Standardize terminology and naming across the document36- Flag stale or unverifiable claims for follow-up3738## Style Rules3940- Write in concise technical style that remains approachable to non-expert users41- Prefer short to medium sentences; avoid unnecessary long sentences42- Explain terms briefly when first used if they may be unfamiliar43- Avoid unexplained jargon and acronym-heavy phrasing44- Keep wording direct, specific, and neutral4546## Safety Rules4748- Preserve technical meaning and factual content49- Do not invent commands, API behavior, or version claims50- Keep edits narrow and reversible51- Preserve existing project-specific terminology unless clearly inconsistent52- If uncertainty is high, prefer adding a short clarification request over guessing5354## Procedure5556## Validation Tool5758Use the repo-local validation script before and after doc edits when possible:5960- `test/check-docs` to validate all wiki markdown files61- `test/check-docs wiki/File.md` to validate one or more specific files62- `test/check-docs --fix wiki/File.md` only when a safe markdownlint auto-fix is appropriate6364### 1. Confirm Target6566Extract from user prompt:6768- target markdown file(s) in `wiki/`69- constraints (tone, audience, preserve wording, max rewrite level)7071If targets are missing, ask for paths before editing.7273### 2. Confirm Depth7475Extract from user prompt:7677- desired depth mode:78 - syntax-only: fix markdown syntax/rendering issues only; do not rewrite wording or structure beyond what syntax requires79 - readability: include syntax fixes plus clarity and scanability edits without broad restructuring80 - full pass: include syntax, readability, structure normalization, terminology consistency, and broader doc cleanup8182If depth is missing, default to readability and state that assumption.8384### 3. Read And Diagnose8586For each target file:8788- If the scope is broad or unclear, run `test/check-docs` first to establish the current markdown baseline.89- Scan for syntax/rendering issues90- Identify readability pain points (dense blocks, weak headings, mixed terminology)91- Note risky sections where edits may alter meaning9293### 4. Normalize Heading Hierarchy9495Apply heading structure rules before deep rewrites:9697- keep one logical top-level heading per file where appropriate98- avoid skipped levels (`##` directly to `####`) unless source constraints require it99- ensure sibling sections use consistent levels100- rename headings only when it improves clarity without changing meaning101102### 5. Apply Syntax Fixes First103104Fix rendering/correctness issues first, such as:105106- broken heading levels107- malformed lists108- unclosed/misfenced code blocks109- malformed links/images110- inconsistent table delimiter rows111- accidental HTML/markdown mixing that breaks rendering112113### 6. Apply Readability Improvements114115Make editorial improvements while preserving meaning:116117- split long paragraphs118- convert prose enumerations into lists when clearer119- improve section titles for scanability120- remove repetition and tighten wording121- align terminology within the same document122123Apply tone constraints during edits:124125- concise technical phrasing126- approachable wording for normal users127- no unexplained technical babble128129### 7. Run Link Integrity Pass130131Check and fix obvious link issues:132133- malformed inline/reference links134- anchors that no longer match heading text after edits135- obvious relative-path mistakes in wiki cross-links136137If link targets cannot be verified from repo context, keep the original target and flag it in the report.138139### 8. Add Code Block Language Tags140141For fenced code blocks:142143- add language tags when confidently inferable (`bash`, `python`, `json`, `yaml`, etc.)144- correct clearly wrong tags145- leave tag blank only when language cannot be inferred safely146147### 9. Run Completion Checks148149Validate each edited file against this checklist:150151- `test/check-docs` or `test/check-docs <file...>` passes for the affected scope152- markdown renders correctly153- heading hierarchy is logical154- code fences include language where known155- links/anchors are internally consistent and obviously valid156- no factual changes introduced157- tone is concise, technical, and approachable158159### 10. Report Results160161Return:162163- files edited164- categories of changes made (syntax/readability/structure)165- any unresolved ambiguity or potential factual follow-ups166167## Branching Guidance168169- If the user asks minimal edits, still run heading normalization, link integrity checks, and code-block language tagging with minimal wording changes.170- If the user asks broad cleanup, run full pass including structure and terminology normalization.171- If a section appears technically outdated but cannot be verified from repo context, do not rewrite claims; flag it in the report.172173## Pass Criteria174175A successful pass means:176177- requested wiki markdown files were edited178- syntax/rendering issues were corrected179- heading hierarchy was normalized180- link integrity pass was completed181- code block language tagging was applied where known182- readability clearly improved without changing intent183- output report summarizes edits and open follow-ups