Create New Package
This skill ensures your new package follows the strict Beluga AI architecture.
Steps
- •
Create Directory Structure
bashmkdir -p pkg/<package_name>/{iface,internal,providers} - •
Create Required Files
- •
pkg/<package_name>/<package_name>.go: Main entry point / interfaces. - •
pkg/<package_name>/config.go: Configuration structs and validation. - •
pkg/<package_name>/metrics.go: OTEL metrics setup. - •
pkg/<package_name>/errors.go: Custom error definitions. - •
pkg/<package_name>/test_utils.go: Test helpers and mocks.
- •
- •
Define Interfaces
- •Place primary interfaces in
iface/or the root package file.
- •Place primary interfaces in
- •
Implement OTEL Metrics
- •In
metrics.go, defineNewMetrics(meter). - •Create counters/histograms for operations.
- •In
- •
Add Documentation
- •Create
pkg/<package_name>/README.md.
- •Create
Validation
- •Run
make lintto ensure no linting errors. - •Run
go test ./pkg/<package_name>/...to verify tests.