Skip to content

docs: restructure documentation following Diataxis framework#38

Merged
jimsynz merged 1 commit intomainfrom
docs/diataxis-restructure
Jan 18, 2026
Merged

docs: restructure documentation following Diataxis framework#38
jimsynz merged 1 commit intomainfrom
docs/diataxis-restructure

Conversation

@jimsynz
Copy link
Copy Markdown
Contributor

@jimsynz jimsynz commented Jan 18, 2026

Summary

Reorganises documentation following the Diataxis framework with four distinct documentation types: Tutorials, How-to Guides, Explanation, and Reference.

Changes

New How-to Guides (documentation/how-to/)

Task-oriented guides for common operations:

  • integrate-servo-driver.md - Creating hardware driver packages
  • add-custom-command.md - Extending the command system
  • implement-safety-callbacks.md - Safe hardware shutdown
  • deploy-to-nerves.md - Embedded deployment with Igniter
  • use-urdf-with-ros.md - ROS integration
  • write-custom-sensor.md - Creating sensor modules
  • troubleshoot-pubsub.md - Debugging message flow

Expanded Explanation (documentation/topics/)

  • Rename safety.mdunderstanding-safety.md with explanation focus
  • Add supervision-architecture.md - Why topology mirrors supervision
  • Add command-system.md - Goal → Feedback → Result pattern
  • Add pubsub-system.md - Hierarchical messaging

New Reference (documentation/reference/)

  • message-types.md - All BB.Message payload types
  • error-types.md - All BB.Error types by class
  • telemetry-events.md - Observability events

Fixes

  • Update mix.exs with groups_for_extras for proper ExDoc grouping
  • Update README.md with organised documentation links
  • Fix cross-references after safety.md rename
  • Fix incorrect DSL examples throughout:
    • states section (was incorrectly shown as custom_states in settings)
    • category entities (was incorrectly shown as categories list)
    • controllers do/sensors do wrappers (were missing in several examples)
  • Document that errors should use exception/1 not struct literals (for Splode backtrace capture)
  • Clarify BB.Message timestamp is monotonic time, not wall-clock
  • Hide internal test sensor module from documentation

Related

  • Companion PRs for bb_liveview and bb_kino documentation to follow

Reorganise documentation into four distinct categories:

**How-to Guides** (new `documentation/how-to/`):
- integrate-servo-driver.md
- add-custom-command.md
- implement-safety-callbacks.md
- deploy-to-nerves.md
- use-urdf-with-ros.md
- write-custom-sensor.md
- troubleshoot-pubsub.md

**Explanation** (expanded `documentation/topics/`):
- Rename safety.md → understanding-safety.md with explanation focus
- Add supervision-architecture.md
- Add command-system.md
- Add pubsub-system.md
- Fix DSL examples in reactive-controllers.md

**Reference** (new `documentation/reference/`):
- message-types.md
- error-types.md
- telemetry-events.md

**Other changes**:
- Update mix.exs with `groups_for_extras` for ExDoc
- Update README.md with organised documentation links
- Fix cross-references after safety.md rename
- Fix incorrect DSL examples (states, categories, controllers, sensors)
- Document that errors should use `exception/1` not struct literals
- Clarify BB.Message timestamp is monotonic time
- Hide internal test sensor module from documentation
@jimsynz jimsynz merged commit e8530ec into main Jan 18, 2026
15 checks passed
@jimsynz jimsynz deleted the docs/diataxis-restructure branch January 18, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant