- Date: 2026-11-24
- Status: Agreed 2026-11-25 (proposed by Mahad); see Later changes
- Agreed by: Mahad (2026-11-25), for the team
Context
Most of the code was written with AI assistants, so each of us has to be able to read all of it, explain it and answer questions about it in the cross-review and the video. Earlier attempts went stale:- the Miro diagrams carry numbers that change;
- a hand-annotated copy of every file (
docs/architecture/annotated-reading-order/, untracked, at commit 515b5b9) explained each line by its line number. It missed the model, both dashboards and the publishing code, and every edit moves the line numbers.
- Mintlify’s free plan includes hosting, Git sync, search, a private site for up to 5 members, and an MCP server that lets Claude or Cursor answer questions from the site.
- Its AI assistant and Autopilot (which updates docs from commits) are in the Pro plan, $450 a month.
- Connecting github.sfu.ca (GitHub Enterprise Server) needs Mintlify’s Enterprise plan and admin rights on SFU’s GitHub.
Decision
docs-site/is the docs: a Mintlify site with four tabs.- Guide: a ten-chapter tour, written by hand in
docs-site/tour/, following the old reading order’s chapters plus the model, the dashboards and publishing. Each chapter has the big idea in plain words, the terms, its diagram, its files in reading order, questions we should be able to answer (with answers), and ideas to improve it. - Code: one page per file, generated from the file itself: its docstring, what is inside with line numbers (functions, classes, named settings, tests), what it uses and what uses it, and the full source.
- Data and decisions: generated from
docs/(contracts, decisions, diagrams). - Project log: status and handoffs, also generated from
docs/.
- Guide: a ten-chapter tour, written by hand in
scripts/build_docs.pybuilds it in under a second.docs-site/reading_order.jsonsays which chapter each file belongs to.- Kept in step by tests:
tests/test_docs_site.pyfails if the site is out of date, or if any tracked code, config or tooling file has no place in the tour.- The commit hook runs the tests, so a commit with stale docs is refused.
- AGENTS.md rule 12 and CLAUDE.md tell every assistant to rebuild, place new files, and update a chapter’s text when a stage changes.
- Deployed from a small github.com repository that holds only the site.
scripts/sync_docs_site.shpushesdocs-site/there, and Mintlify redeploys on each push.scripts/install_git_hooks.sh(optional, per person) rebuilds the docs before each commit and pushes them after it.
Alternatives considered
- Keep the annotated copies up to date: a copy of every file goes stale with every edit, and line-numbered notes cannot be matched to changed code.
- Mintlify Autopilot: it does the updating for us, but costs $450 a month. Generating from the code is free and exact.
- MkDocs or Sphinx on GitHub Pages: free too, but no MCP server or built-in search for asking questions, and more setup for the diagrams.
- Mirroring the whole repository to github.com: simpler, but it would put
clean/(raw prices) on another host. Onlydocs-site/leaves.
Consequences
- Every change runs
python3 scripts/build_docs.pyand commitsdocs-site/with it. A new file goes intoreading_order.json. Generated pages are never edited by hand. - New files:
scripts/build_docs.py,scripts/sync_docs_site.sh,scripts/install_git_hooks.sh,tests/test_docs_site.py,docs-site/.common.settingshasDOCS_DIRandDOCS_SITE_DIR. - graphify ignores
docs-site/: its pages repeat the code. - The annotated reading order in
docs/architecture/is replaced by the site; it was never committed. - To publish (one person, once):
- create a github.com repository for the site;
- sign in to Mintlify with GitHub and connect that repository;
- set
git config calendar-effects.docsRemote <its address>; - run
scripts/sync_docs_site.sh.
- The team decides whether the site is public or private to the four of us. It shows the full source.
- No contract changes.
Later changes
- 2026-11-25, decision 0014: the site’s repository is the team’s,
Calendar-Effects/docs, and Mintlify deploys from it. - 2026-11-26, decision 0015:
scripts/install_git_hooks.shnow points the docs, dashboard and cloud-streamer syncs at the team’s repositories by itself, so any member who runs it once (and signs in withgh auth login) keeps the site current. The site gained a Run it page, built fromdocs/running.md. - Prices on github.com: only
docs-site/goes to the docs repository, as decided above. Decision 0015 later putsclean/master.parquetin the privateCalendar-Effects/live-streamrepository, readable only by the team.