Skip to content

ADR-002: Documentation system

ADR-002: Documentation system and ADR process

Section titled “ADR-002: Documentation system and ADR process”
  • Status: Accepted
  • Date: 2026-05-28
  • Deciders: Keepin’ Tracks engineering
  • Supersedes:
  • Superseded by:

The repository needs documentation that:

  1. Helps engineers understand architecture and domain boundaries
  2. Records durable decisions (ADRs) as the codebase grows
  3. Gives AI-assisted coding tools structured, accurate context
  4. Runs locally during development
  5. Can later be deployed behind organization-only access

Scattered wikis, Notion pages, or docs divorced from the repo make PR review and AI indexing harder.

Adopt docs-as-code in the repository with two separate Starlight sites — one for product app users (personal and business), one for engineers.

PathAudiencePurpose
docs/personal/Personal app usersEnd-user help and guides
docs/business/Business app usersEnd-user help and guides
docs/adr/EngineeringArchitecture Decision Records
docs/developer/EngineeringOnboarding, runbooks, tooling, doc system
docs/domains/EngineeringBounded contexts, ownership, invariants
docs/public/ProspectsMarketing-safe product pages
ARCHITECTURE.mdEngineeringSystem topology and phased delivery
AGENTS.mdAI + engineeringShort orientation map for agents
.cursor/rules/AI (Cursor)Enforceable guardrails
SiteAppSourceProduction
Product helpapps/docsdocs/personal/, docs/business/docs.keepintracks.com (public; /personal/, /business/ sections)
Developer docsapps/dev-docsdocs/developer/, docs/domains/, docs/adr/dev.keepintracks.com (Cloudflare Access)

Local: bun docs:dev (port 4321), bun dev-docs:dev (port 4322). Sync scripts copy markdown before dev/build.

  • Filename: YYYY-MM-DD-short-title.md
  • Index: docs/adr/index.md
  • Template: docs/adr/_template.md
  • Required for major architecture, security, compliance, tenant isolation, accounting, and infra decisions
  • AGENTS.md at repo root links to architecture, ADRs, and domain docs
  • Domain docs name key paths, invariants, and what each domain does not own
  • Per-app README.md files (when apps exist) describe entrypoints and local run commands
  • Cursor rules stay short; detailed prose lives in docs/
  • apps/docsCloudflare Pages at docs.keepintracks.com (public)
  • apps/dev-docsCloudflare Pages at dev.keepintracks.com with Cloudflare Access (GitHub org)

Local development remains unauthenticated for both sites.

  • Single source of truth in git; docs reviewed in PRs
  • ADRs are discoverable and linked from architecture docs
  • Starlight gives search, sidebar, and Mermaid support
  • Fits Cloudflare-native deployment path
  • AI tools can index markdown in-repo
  • Engineers must update docs when changing architecture or domains
  • Product app users never see developer documentation
  • Two deploy targets require separate CI build steps
  • Add CI docs:build and dev-docs:build tasks
  • Add link checker in CI
  • Deploy to Cloudflare Pages + Access when ready
  • Fill domain docs as apps are scaffolded