@@ -148,6 +148,25 @@ chore: scaffold monorepo with types, core, components packages
148148 - `width.ts` — `visibleWidth(str)` measures terminal column width. Fast ASCII path, grapheme segmentation, East Asian width, ANSI stripping, LRU cache.
149149 - `terminal.ts` — `ProcessTerminal` (real I/O, raw mode, SGR mouse, crash cleanup) and `MockTerminal` (testing).
150150
151+## Updating gh-pages
152+
153+The `gh-pages` branch tracks generated API docs (`docs/html/`, `docs/md/`) and an `index.html` for GitHub Pages. To update it after changes land on `main`:
154+
155+```bash
156+git checkout gh-pages
157+git merge main # resolve any conflicts, keeping docs tracked
158+bun run docs # regenerate API docs
159+git add -A
160+git commit -m "docs: regenerate API docs from latest main"
161+git push
162+git checkout main
163+```
164+
165+**Key differences on gh-pages:**
166+
167+- `.gitignore` does **not** exclude `docs/html/` or `docs/md/` (they're committed)
168+- `.prettierignore` includes `docs/html` and `docs/md` (generated files fail format checks otherwise)
169+
151170 ## Conventions
152171
153172 - All code is TypeScript with strict mode