doc-writing
Documentation Patterns
Package Doc Structure
- Header: One paragraph — what it does, who uses it, why.
- Quick Start: Minimal working example (3-10 lines), full imports, compiles.
- Core Interface: Go interface definition.
- Usage Examples: Basic, with middleware, with hooks, custom implementation.
- Configuration: All
WithX()options with defaults. - Extension Guide: Implement interface → register via init() → map errors → write tests.
Rules
- Every concept needs a code example.
- Examples must compile with full import paths (
github.com/lookatitude/beluga-ai/...). - Handle errors explicitly — never
_for error returns. - No marketing language, filler words, or emojis.
- Professional, active voice, present tense, imperative for instructions.
- Cross-reference related packages and
docs/. - Use mermaid diagrams sparingly (< 15 nodes).
- Tutorials: progressive complexity (basic 5min, intermediate 10min, advanced 15min).
Don'ts
- No phase references or timeline language.
- Don't duplicate architecture docs — link to them.
- Don't list every provider — point to
docs/providers.md. - Don't show incomplete examples that won't compile.
More from lookatitude/beluga-ai
go-framework
Go framework design patterns for Beluga AI v2. Use when designing package structure, registries, lifecycle, or creating new packages.
12go-interfaces
Go interface design with registry, middleware, and hooks for Beluga AI v2. Use when creating interfaces, extension contracts, or adding hooks/middleware.
8streaming-patterns
Go 1.23 iter.Seq2 streaming patterns for Beluga AI v2. Use when implementing streaming, transforms, or backpressure.
8provider-implementation
Implementing providers for Beluga AI v2 registries. Use when creating LLM, embedding, vectorstore, voice, or any other provider.
7website-development
Website development patterns for the Beluga AI v2 documentation site. Use when building, styling, or adjusting website components, layouts, pages, and interactive elements — NOT for writing documentation content.
3go-testing
Go testing patterns for Beluga AI v2. Use when writing tests, mocks, or benchmarks.
2