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:
- GitBook - Rejected (proprietary, not GitHub Pages)
- MkDocs + Material - Rejected (limited sidebar flexibility)
- mdBook - Rejected (no multi-sidebar support)
- VuePress - Rejected (smaller community than Docusaurus)
- 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
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 deploycommands) - Free tier required (educational/hackathon context)
Alternatives Considered:
- Netlify - Rejected (not GitHub Pages, hackathon requirement)
- Vercel - Rejected (not GitHub Pages)
- Manual gh-pages Branch - Rejected (no automation, error-prone)
- Self-Hosted (AWS S3 + CloudFront) - Rejected (cost, complexity)
- 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)
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:
- ROS 2 Iron - Rejected (EOL Nov 2024, already deprecated)
- ROS 2 Jazzy - Rejected (not released during authoring, immature ecosystem)
- ROS 1 Noetic - Rejected (EOL May 2025, legacy platform)
- 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
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:
- Gazebo-Only - Rejected (insufficient photorealism for vision AI)
- Isaac Sim-Only - Rejected (hardware barrier, overkill for foundations)
- Unity-Only - Rejected (ROS 2 integration clunky)
- 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:
| Chapter | Platform | Why |
|---|---|---|
| 2: ROS 2 | Gazebo | Fast iteration |
| 4: Perception | Isaac Sim | Photorealistic cameras |
| 5: SLAM | Gazebo | Nav2 tutorials use it |
| 7: Vision AI | Isaac Sim | Realistic 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)
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:
- Hands-On Labs (50% of grade) - Deployable ROS 2 packages per chapter
- Automated Acceptance Tests (30% of grade) - GitHub Actions runs behavioral tests
- 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:
- Traditional Written Exams - Rejected (doesn't measure practical skills)
- Written Lab Reports - Rejected (report β working code)
- GitHub + Code Review - Partially accepted (use for capstone)
- Video Demonstrations - Supplementary (require video + code)
- 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:
| Tier | Hardware | Max Score |
|---|---|---|
| 0 | Cloud (Gazebo) | 90% (A-) |
| 1 | Jetson | 95% |
| 2+ | Physical robot | 100% |
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
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:
- Continue with GitHub Pages - Rejected (account issues, unclear resolution)
- Netlify - Good alternative, but Vercel has better DX for React ecosystem
- Cloudflare Pages - Good option, less mature Docusaurus support
- AWS S3 + CloudFront - Rejected (cost, complexity)
- 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)
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:
- PlantUML - Rejected (requires Java + Graphviz, server dependency)
- Graphviz (DOT) - Rejected (build tool dependency, not Docusaurus-native)
- Draw.io - Rejected (binary XML, not version control friendly)
- Excalidraw - Rejected (GUI-based, not code)
- ASCII Art - Rejected (limited expressiveness, accessibility issues)
Rationale:
- Native Docusaurus Support:
@docusaurus/theme-mermaidplugin 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)
π 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:
- Creates
history/adr/XXX-<slug>.md - Prompts for context, alternatives, rationale
- Documents trade-offs and consequences
- Links to related specs/plans
- 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β
- Michael Nygard's ADR Template (original)
- ADR Tools (command-line management)
- When to Write an ADR (comprehensive guide)
Related Methodology Pagesβ
- Spec-Driven Workflow: How ADRs fit in planning
- PHR Gallery: See PHRs that reference ADRs
- Constitution: Quality standards for ADRs
π‘ Best Practicesβ
For Decision Makersβ
- Don't Over-ADR: Not every choice needs an ADR (use plan.md for minor decisions)
- Capture Alternatives: Even rejected options are valuable learning
- Link Consequences: Be honest about trade-offs
- Update Status: Mark as Deprecated when no longer valid
- Cross-Reference: Link to related ADRs and PHRs
For Readersβ
- Start with Context: Understand why before what
- Study Alternatives: See what was considered and why it lost
- Check Status: Accepted ADRs are current; Deprecated ones are historical
- Follow Links: Related ADRs provide full picture
- 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