Files
gnoma/CONTRIBUTING.md
vikingowl d7b524664d fix(m8): replace_default map, error UX, benchmarks, and launch prep
- Fix replace_default positional bug: []string → map[string]string for
  explicit MCP tool → built-in name mapping
- Improve error messages for missing API keys (3 actionable options) and
  unknown providers (early validation with available list)
- Remove python3 dependency from MCP tests (pure bash grep/sed parsing)
- Add router benchmark scaffold (6 benchmarks in bench_test.go + docs)
- Add .goreleaser.yml for cross-platform binary releases with ldflags
- Add launch-ready README with quickstart, extensibility docs, GIF placeholder
- Add CONTRIBUTING.md and Gitea issue templates (bug report, feature request)
2026-04-12 03:34:58 +02:00

1.7 KiB

Contributing to gnoma

Setup

git clone https://somegit.dev/Owlibou/gnoma && cd gnoma
make build   # requires Go 1.26+
make test
make lint    # requires golangci-lint

Development workflow

  1. Create a branch from main
  2. Write tests first (TDD) — table-driven, t.TempDir() for filesystem tests
  3. make check (fmt + vet + lint + test) must pass
  4. Commit with conventional messages: feat:, fix:, refactor:, test:, docs:

Code style

  • Go 1.26 idioms (new(expr), errors.AsType[E])
  • Structured logging with log/slog
  • json.RawMessage for tool schemas (zero-cost passthrough)
  • Functional options for complex configuration
  • Short, lowercase package names — no underscores

Testing

  • Unit tests: make test
  • Integration tests (require API keys): make test-integration
  • Coverage: make cover
  • Benchmarks: go test -bench=. ./internal/router/

Integration tests use //go:build integration and are skipped by default.

Architecture

Read docs/essentials/INDEX.md before making architectural changes. Key packages:

Package Purpose
internal/engine Agentic loop (stream → tool → re-query)
internal/router Multi-armed bandit arm selection
internal/provider LLM provider adapters
internal/tool Tool interface + registry
internal/mcp MCP client (JSON-RPC over stdio)
internal/plugin Plugin manifest, loader, manager
internal/elf Sub-agent (elf) system
internal/tui Bubble Tea terminal UI

Issues

Use the issue templates when filing bugs or requesting features. Include reproduction steps, expected behavior, and gnoma version (gnoma --version).