Skip to main content

Architecture Decision Records (ADRs)

🎯 Why Document Decisions?​

Architecture Decision Records capture significant choices made during textbook development, including:

  • Context: Why we needed to decide
  • Decision: What we chose
  • Alternatives: What else we considered
  • Rationale: Why this choice won
  • Consequences: Trade-offs and implications

ADRs Provide:

  • βœ… Transparency: Understand why, not just what
  • βœ… Onboarding: New contributors learn reasoning
  • βœ… Consistency: Future decisions reference past patterns
  • βœ… Accountability: Decisions can be reviewed and revised

πŸ“‹ All ADRs​

ADR-001: Docusaurus for Textbook Delivery​

Status: βœ… Accepted | Date: 2025-11-29

Decision: Use Docusaurus (v3.x with TypeScript) as the textbook platform

Context:

  • Hackathon requires deploying book to GitHub Pages
  • Need dual sidebars (textbook chapters + methodology showcase)
  • Must support ROS 2 code examples (Python, C++, YAML, Bash, XML)
  • Students need professional, mobile-responsive experience

Alternatives Considered:

  1. GitBook - Rejected (proprietary, not GitHub Pages)
  2. MkDocs + Material - Rejected (limited sidebar flexibility)
  3. mdBook - Rejected (no multi-sidebar support)
  4. VuePress - Rejected (smaller community than Docusaurus)
  5. Jupyter Book - Rejected (overkill for markdown-first content)

Rationale:

  • GitHub Pages deployment is first-class (official guide)
  • Dual sidebars support textbook + methodology showcase
  • React ecosystem enables future interactive components
  • 50k+ GitHub stars, active development
  • Syntax highlighting for entire ROS 2 stack
  • Mermaid diagram support built-in

Consequences:

  • βœ… Professional, responsive site with search
  • βœ… Easy for contributors to add chapters (markdown)
  • βœ… Automated deployment via GitHub Actions
  • ⚠️ Node.js dependency (requires npm for local builds)
  • ⚠️ React knowledge helpful for advanced customization

β†’ Read Full ADR-001


ADR-002: GitHub Pages Deployment Strategy​

Status: ⚠️ Superseded by ADR-006 | Date: 2025-11-29

Decision: Use GitHub Actions to auto-deploy to GitHub Pages via actions/deploy-pages@v4

Context:

  • After choosing Docusaurus (ADR-001), need deployment strategy
  • Hackathon explicitly requires GitHub Pages
  • Must automate (no manual npm run deploy commands)
  • Free tier required (educational/hackathon context)

Alternatives Considered:

  1. Netlify - Rejected (not GitHub Pages, hackathon requirement)
  2. Vercel - Rejected (not GitHub Pages)
  3. Manual gh-pages Branch - Rejected (no automation, error-prone)
  4. Self-Hosted (AWS S3 + CloudFront) - Rejected (cost, complexity)
  5. Read the Docs - Rejected (not GitHub Pages, Sphinx-centric)

Deployment Flow:

Push to main β†’ GitHub Actions β†’ Build β†’ Deploy β†’ Live Site
(2-4 minutes total)

Rationale:

  • Official solution recommended by GitHub and Docusaurus
  • Push-to-deploy automation (no manual intervention)
  • Path filtering saves GitHub Actions minutes
  • Manual trigger capability (workflow_dispatch)
  • Build artifacts retained for debugging
  • Completely free for public repositories

Consequences:

  • βœ… Push-to-deploy in 3-5 minutes
  • βœ… Build failures prevent bad deploys
  • βœ… Students can fork and deploy their own versions
  • ⚠️ No PR preview deployments (would need Netlify for this)
  • ⚠️ GitHub Pages 1GB site limit (unlikely to hit)

β†’ Read Full ADR-002


ADR-003: ROS 2 Humble as Primary Distribution​

Status: βœ… Accepted | Date: 2025-11-29

Decision: Use ROS 2 Humble Hawksbill as the primary and required distribution for all textbook content

Context:

  • Textbook must select ROS 2 distribution supported through 2025-2027 academic years
  • Need long-term stability, wide hardware support, strong ecosystem
  • Must align with industry deployments

Alternatives Considered:

  1. ROS 2 Iron - Rejected (EOL Nov 2024, already deprecated)
  2. ROS 2 Jazzy - Rejected (not released during authoring, immature ecosystem)
  3. ROS 1 Noetic - Rejected (EOL May 2025, legacy platform)
  4. Multi-Distribution Support - Rejected (2x maintenance burden)

Rationale:

  • Humble LTS support until May 2027 (full overlap with textbook usage)
  • Jetson JetPack 5.x fully supports Humble on Ubuntu 22.04
  • MoveIt 2, Nav2, ros2_control all stable on Humble
  • Industry standard (Boston Dynamics, Figure AI use Humble)

Consequences:

  • βœ… Code examples work unchanged through 2027
  • βœ… All hardware tiers support Humble natively
  • βœ… 1000+ packages available via apt
  • ⚠️ Newer features from Iron/Jazzy unavailable

β†’ Read Full ADR-003


ADR-004: Multi-Simulation Platform Strategy​

Status: βœ… Accepted | Date: 2025-11-29

Decision: Adopt multi-simulation strategy with Gazebo Classic, NVIDIA Isaac Sim, and Unity (optional)

Context:

  • Physical AI needs simulation before deploying to expensive robots
  • Different chapters need different simulation capabilities (physics vs photorealism)
  • Students have varying hardware (cloud-only, Jetson, gaming PC)

Alternatives Considered:

  1. Gazebo-Only - Rejected (insufficient photorealism for vision AI)
  2. Isaac Sim-Only - Rejected (hardware barrier, overkill for foundations)
  3. Unity-Only - Rejected (ROS 2 integration clunky)
  4. PyBullet/MuJoCo - Rejected (no sensor simulation, headless only)

Rationale:

  • Gazebo Classic: Foundation chapters (2-3), fast iteration, lightweight
  • Isaac Sim: Vision AI chapters (7-9), photorealistic rendering for YOLO/SAM
  • Unity: Optional for Chapter 9 VLA training (ML-Agents)

Workflow Coverage:

ChapterPlatformWhy
2: ROS 2GazeboFast iteration
4: PerceptionIsaac SimPhotorealistic cameras
5: SLAMGazeboNav2 tutorials use it
7: Vision AIIsaac SimRealistic textures

Consequences:

  • βœ… Right tool for each job
  • βœ… Hardware accessibility (Gazebo for low-end)
  • βœ… Industry skills (students learn 2-3 platforms)
  • ⚠️ Learning curve multiplication (3 UIs)
  • ⚠️ Setup complexity (3 install guides)

β†’ Read Full ADR-004


ADR-005: Assessment Methodology - Action-Based Evaluation​

Status: βœ… Accepted | Date: 2025-11-29

Decision: Use "Assessment by Action" - deployable ROS 2 artifacts instead of traditional exams

Assessment Structure:

  1. Hands-On Labs (50% of grade) - Deployable ROS 2 packages per chapter
  2. Automated Acceptance Tests (30% of grade) - GitHub Actions runs behavioral tests
  3. Capstone Project (20% of grade) - Voice-commanded humanoid butler

Context:

  • Traditional CS assessments (multiple-choice exams) don't measure robotics practical skills
  • Industry employers want portfolios (GitHub repos), not test scores
  • Need fairness across hardware tiers (cloud-only vs physical robots)

Alternatives Considered:

  1. Traditional Written Exams - Rejected (doesn't measure practical skills)
  2. Written Lab Reports - Rejected (report β‰  working code)
  3. GitHub + Code Review - Partially accepted (use for capstone)
  4. Video Demonstrations - Supplementary (require video + code)
  5. Automated Testing Only - Partially accepted (combine with human review)

Rationale:

  • Every assessment = working robot code (employable artifacts)
  • Aligns with "Embodiment-First Instruction" principle
  • Hardware-tiered grading prevents "rich student advantage"
  • Portfolio-ready work for job applications

Grading Tiers:

TierHardwareMax Score
0Cloud (Gazebo)90% (A-)
1Jetson95%
2+Physical robot100%

Consequences:

  • βœ… Portfolio-ready work for job applications
  • βœ… Immediate feedback via automated tests
  • βœ… Skills transfer directly to industry
  • ⚠️ Git learning curve for students
  • ⚠️ Test maintenance for instructors

β†’ Read Full ADR-005


ADR-006: Deployment Strategy Evolution - Vercel over GitHub Pages​

Status: βœ… Accepted | Date: 2025-11-29 Supersedes: ADR-002

Decision: Migrate to Vercel as primary deployment platform, GitHub Pages as fallback

Context:

  • Original plan was GitHub Pages (hackathon requirement)
  • Encountered GitHub Actions deployment failures due to account restrictions
  • Need reliable deployment without Git hosting dependencies

Alternatives Considered:

  1. Continue with GitHub Pages - Rejected (account issues, unclear resolution)
  2. Netlify - Good alternative, but Vercel has better DX for React ecosystem
  3. Cloudflare Pages - Good option, less mature Docusaurus support
  4. AWS S3 + CloudFront - Rejected (cost, complexity)
  5. Self-Hosted VPS - Rejected (monthly cost, maintenance)

Rationale:

  • Vercel CLI bypasses Git entirely (solves GitHub account issue)
  • Zero-config Docusaurus support (auto-detects, deploys in 90 seconds)
  • Free for open-source with unlimited bandwidth
  • Preview deployments available (if Git integration enabled later)

Deployment Flow:

cd physical-ai-textbook
vercel --prod # 90 seconds β†’ live site

Consequences:

  • βœ… Immediate deployment despite GitHub issues
  • βœ… 10x faster than GitHub Actions (90s vs 5-10min)
  • βœ… Better debugging (Vercel logs clearer)
  • ⚠️ Platform dependency (locked into Vercel)
  • ⚠️ Two deployment paths to document (Vercel + GitHub Pages fallback)

β†’ Read Full ADR-006


ADR-007: Mermaid for Architecture Diagrams​

Status: βœ… Accepted | Date: 2025-11-29

Decision: Use Mermaid as primary diagramming language for all architectural, sequence, state, and flow diagrams

Context:

  • Textbook needs extensive technical diagrams (system architecture, state machines, sequences)
  • Must be version control friendly (text-based, diff-able in Git)
  • Must integrate with Docusaurus/Markdown without external tools
  • Must be maintainable and accessible

Alternatives Considered:

  1. PlantUML - Rejected (requires Java + Graphviz, server dependency)
  2. Graphviz (DOT) - Rejected (build tool dependency, not Docusaurus-native)
  3. Draw.io - Rejected (binary XML, not version control friendly)
  4. Excalidraw - Rejected (GUI-based, not code)
  5. ASCII Art - Rejected (limited expressiveness, accessibility issues)

Rationale:

  • Native Docusaurus Support: @docusaurus/theme-mermaid plugin built-in
  • Markdown-Native: Code blocks render automatically
  • No Build Step: Renders client-side, no preprocessing
  • Rich Diagram Types: Flowcharts, sequences, states, classes, Gantt, ER
  • GitHub Integration: GitHub/GitLab render Mermaid automatically

Example Usage:

```mermaid
graph LR
A[Perception] --> B[Planning]
B --> C[Control]
```

Consequences:

  • βœ… Zero build overhead
  • βœ… Fast authoring (write diagrams in same file as content)
  • βœ… Git-friendly (clean diffs, easy code reviews)
  • βœ… Dark mode support (themes match Docusaurus)
  • ⚠️ Layout limitations (auto-layout only, can't manually position)
  • ⚠️ Browser requirement (requires JavaScript)

β†’ Read Full ADR-007


πŸ“Š ADR Statistics​

By Category​

  • Tooling & Infrastructure: 4 ADRs (Docusaurus, GitHub Pagesβ†’Vercel, Mermaid)
  • Platform & Architecture: 3 ADRs (ROS 2 Humble, Multi-Simulation, Assessment)

By Status​

  • Accepted: 6 ADRs (001, 003, 004, 005, 006, 007)
  • Superseded: 1 ADR (002 - replaced by 006)
  • Proposed: 0 ADRs
  • Deprecated: 0 ADRs

Timeline​

  • 2025-11-29: All 7 ADRs created during initial textbook development

🎯 When to Create an ADR​

ADRs are created during the /sp.plan phase when decisions meet ALL three criteria:

1. Impact​

Does this decision have long-term consequences?

  • Framework choice
  • Data model design
  • API contracts
  • Security approach
  • Platform selection

2. Alternatives​

Are there multiple viable options with different trade-offs?

  • Docusaurus vs GitBook vs MkDocs
  • GitHub Pages vs Netlify vs Vercel
  • Python vs C++ for ROS 2 nodes
  • Gazebo vs Unity vs Isaac for simulation

3. Scope​

Does it influence system design across multiple chapters?

  • Toolchain version selection (affects all chapters)
  • Code standards (Black formatter, docstring style)
  • Assessment strategy (quizzes vs projects vs both)

If ALL three are true β†’ /sp.adr <decision-title>


πŸ“ How to Create an ADR​

During planning, Claude suggests ADRs automatically:

πŸ“‹ Architectural decision detected: Docusaurus for Textbook Delivery
Document reasoning and tradeoffs? Run `/sp.adr docusaurus-selection`

Manual Creation​

/sp.adr <decision-title>

Example:

/sp.adr ros2-humble-vs-iron

What Happens:

  1. Creates history/adr/XXX-<slug>.md
  2. Prompts for context, alternatives, rationale
  3. Documents trade-offs and consequences
  4. Links to related specs/plans
  5. Sets status (Proposed β†’ Accepted/Rejected)

πŸ”„ ADR Lifecycle​

graph LR
A[Problem Identified] --> B{Significant?}
B -->|No| C[Document in Plan]
B -->|Yes| D[Create ADR]
D --> E[Proposed]
E --> F{Reviewed?}
F -->|Approved| G[Accepted]
F -->|Rejected| H[Rejected]
G --> I{Still Valid?}
I -->|Yes| G
I -->|No| J[Deprecated]
J --> K[New ADR Supersedes]

style G fill:#4CAF50
style H fill:#F44336
style J fill:#FF9800

Status Meanings:

  • Proposed: Under discussion, not yet approved
  • Accepted: Decision made, actively in use
  • Rejected: Evaluated but not chosen
  • Deprecated: Was accepted, now outdated
  • Superseded: Replaced by newer ADR (link provided)

πŸ“š Example Use Cases​

From Chapter Planning​

Scenario: Planning Chapter 2 (ROS 2 Fundamentals)

Question: Which ROS 2 distribution to use?

  • Options: Humble (LTS), Iron (latest), Jazzy (future)
  • Decision: Humble Hawksbill
  • ADR: [Future] ADR-003: ROS 2 Humble as Primary Distribution

Question: Black vs autopep8 for Python formatting?

  • Documented in: plan.md (not significant enough for ADR)
  • Rationale: Community standard, consistent with ROS 2 ecosystem

From Implementation​

Scenario: Implementing Chapter 4 (Perception)

Question: OpenCV Python bindings vs ROS 2 image_pipeline?

  • Options: Direct OpenCV (simpler) vs ROS 2 nodes (integrated)
  • Decision: ROS 2 image_pipeline
  • ADR: [Future] ADR-004: ROS 2 Image Pipeline for Perception

πŸ”— ADR Templates​

All ADRs follow this structure:

# ADR-XXX: <Title>

## Status
[Proposed/Accepted/Rejected/Deprecated/Superseded] | YYYY-MM-DD

## Context
[Why we needed to make this decision...]

## Decision
[What we chose to do...]

## Alternatives Considered
### 1. [Option Name]
**Pros**: ...
**Cons**: ...
**Verdict**: Rejected because...

### 2. [Another Option]
...

## Rationale
[Why this decision wins...]

## Consequences
### Positive
- βœ… [Good outcome 1]
- βœ… [Good outcome 2]

### Negative
- ⚠️ [Trade-off 1]
- ⚠️ [Trade-off 2]

### Neutral
- ℹ️ [Neutral fact 1]

## References
- [Link to docs]
- [Link to related ADRs]

## Related ADRs
- [ADR-XXX: Related Decision]

---

**Decision Made By**: [Who]
**Date**: YYYY-MM-DD
**Reviewed By**: [Who]
**Status**: [Current Status]

πŸš€ Future ADRs​

Planned (From Chapter Development)​

  • ADR-003: ROS 2 Humble as Primary Distribution

    • Context: Multiple ROS 2 versions available
    • Needs: Stability vs latest features trade-off
  • ADR-004: Mermaid vs PlantUML for Diagrams

    • Context: Need architecture diagrams in chapters
    • Needs: Markdown integration vs diagram complexity
  • ADR-005: Gazebo Classic vs Gazebo (New)

    • Context: Gazebo Classic reaching EOL in 2025
    • Needs: Stability vs new physics features

Community-Proposed​

Have an idea for a decision that should be documented? Open an issue: Propose ADR


πŸ“– Learn More​

About ADRs​


πŸ’‘ Best Practices​

For Decision Makers​

  1. Don't Over-ADR: Not every choice needs an ADR (use plan.md for minor decisions)
  2. Capture Alternatives: Even rejected options are valuable learning
  3. Link Consequences: Be honest about trade-offs
  4. Update Status: Mark as Deprecated when no longer valid
  5. Cross-Reference: Link to related ADRs and PHRs

For Readers​

  1. Start with Context: Understand why before what
  2. Study Alternatives: See what was considered and why it lost
  3. Check Status: Accepted ADRs are current; Deprecated ones are historical
  4. Follow Links: Related ADRs provide full picture
  5. Question Decisions: ADRs can be challenged with new ADRs

πŸ“¬ Feedback​

Questions about an ADR or want to propose changes?

  • Open an issue: GitHub Issues
  • Reference the ADR number for context

ADRs are living documents. As the textbook evolves, so do our decisions. Transparency over perfection.

Last Updated: 2025-11-29 | Total ADRs: 2