Documentation Maintenance
This project treats docs as a first-class artifact. Behavior changes are incomplete until docs are updated.
Rules
- Any endpoint change requires updates in
docs/api-reference.md. - Any webhook event or payload change requires updates in
docs/webhooks.md. - Any CLI UX/keybinding change requires updates in
docs/cli.mdandcli/zmail/README.md. - Any deployment or DNS change requires updates in
docs/deployment-operations.md. - Root
README.mdshould always link to current docs index.
Required Update Triggers
- New route, removed route, status code change
- Request/response schema change
- Auth behavior change
- New folder/state semantics
- Tenant isolation behavior change
- New operational runbook steps
PR/Commit Checklist
- [ ] Code change complete
- [ ] Docs updated in same change
- [ ] Example payloads still valid
- [ ] Keybindings and CLI examples verified
- [ ] Smoke checklist re-run after deploy
Lightweight Drift Control
At least once per week (or before significant releases):
- Run
./scripts/docs_audit.shand fix any reported API doc gaps. - Compare webhook events in
webhook_dispatcher.pytodocs/webhooks.md. - Run CLI and verify
docs/cli.mdkeymaps. - Update docs date stamp in release notes or deployment notes.
Ownership
- Feature owner updates docs for their area.
- Release owner confirms cross-doc consistency before deploy.
Suggested Automation (next step)
- Add CI script to diff documented endpoints vs discovered routes.
- Fail CI when route lists diverge.