name: gitbook-page-summary-maintenance description: Create or update GitBook pages and keep SUMMARY.md synchronized for this repository. Use when adding a new docs page, moving or renaming pages, updating sidebar navigation, or enforcing AGENTS.md authoring standards (Markdown-only, one H1, semantic headings, relative links, and GitBook-friendly structure).
GitBook Page + Summary Maintenance
Follow this workflow when making documentation changes in this repository.
1) Load local standards
- Read
AGENTS.mdat repo root. - Treat
README.mdandSUMMARY.mdas GitBook entry files. - Use Markdown only and relative links.
- Follow GitBook content configuration rules from:
https://gitbook.com/docs/getting-started/git-sync/content-configuration.
1.1) Git Sync configuration reminders
- If
.gitbook.yamlexists, respectrootandstructurepaths. - Remember
structure.readmeandstructure.summaryare relative toroot. - Do not create or edit README through GitBook UI when Git Sync is enabled; edit in Git only.
- If files or folders move, add redirects in
.gitbook.yaml(or site-level redirects where appropriate).
2) Create or update a page
- Choose a clear file name in repo root or an existing docs folder.
- Use exactly one H1 (
#) for the page title. - Use semantic headings in order (
##,###,####) without skipping levels. - Keep bullets concise and use meaningful link text.
- Prefer callouts with blockquotes (
> Note,> Tip,> Warning) when needed.
3) Update SUMMARY.md
- Open
SUMMARY.md. - Add or update the page link in the correct section.
- Keep label text human-readable (Title Case where appropriate).
- Keep links relative and point to
.mdtargets. - Keep
SUMMARY.mdnavigation-only; do not add inventory or scratch sections. - Do not reference the same markdown file twice in
SUMMARY.md. - Use optional page link titles only when nav label should differ from page H1:
[Page title](path/page.md "Sidebar label").
4) Validate before finish
Run these checks from repo root:
# Ensure SUMMARY links resolve
$root = (Get-Location).Path
$summary = Get-Content -Raw "$root\SUMMARY.md"
$links = [regex]::Matches($summary,'\((?:<)?([^)>]+\.md)(?:>)?\)') | ForEach-Object { $_.Groups[1].Value }
$missing = @()
foreach($l in $links){
$p = Join-Path $root ($l -replace '/','\')
if(-not (Test-Path $p)){ $missing += $l }
}
if($missing.Count -gt 0){ "Missing links:"; $missing } else { "SUMMARY links: OK" }
# Quick duplicate filename signal (case-insensitive)
$root = (Get-Location).Path
Get-ChildItem -Recurse -File -Filter *.md |
ForEach-Object { $_.FullName.Substring($root.Length + 1) } |
Group-Object { $_.ToLower() } |
Where-Object { $_.Count -gt 1 } |
ForEach-Object { $_.Group -join ' | ' }
5) Commit hygiene
- Keep diffs focused to the doc topic.
- Include related
SUMMARY.mdupdates in the same commit. - Avoid adding secrets, tokens, or internal-only tracker links.
Output checklist
- Page content added or updated.
SUMMARY.mdupdated in same change.- All summary links resolved.
- Heading hierarchy and link style aligned with
AGENTS.md.