Skip to content

Adapter Pattern

To remain “Source Agnostic,” Chisel relies on the Adapter Pattern implemented via Rust traits. This allows Chisel to manage documentation and specs regardless of where they are stored.

Defined in packages/chisel-docs/src/source.rs. Any implementation can power the Chisel Docs TUI.

  • DefaultSource: Manages Markdown files in .chisel/docs/.
  • StarlightSource: Adapts to an existing Astro Starlight structure in src/content/docs/.

Defined in packages/chisel-specs/src/source.rs.

  • DefaultSpecSource: Manages local Markdown specs in .chisel/specs/{active,shipped,archived}/.
  • Future Adapters: Potential implementations for GitHubSpecSource or LinearSource.

This architecture allows Chisel to be a unified interface for engineering information. You can use the same TUI shortcuts and AI machine-mode schemas to interact with local files, cloud providers, or custom documentation sites.