Contributing¶
This page covers the contributor workflow: code, tests, and these docs. For high-level design, see Concepts: Architecture.
Project layout¶
maven/
cmd/maven/ # CLI entry point
internal/
gateway/ # Composition root (wire.go) and lifecycle
kernel/ # Plugin-agnostic core (no plugin imports)
plugins/ # Channel, tool, skill, voice, trigger, memory plugins
testutil/ # Test helpers (golden files)
version/ # Build-stamped version info
scripts/setup.sh # Interactive setup
docs/ # MkDocs source (this site)
website/ # Marketing site assets
Development standards¶
The full standards live in AGENTS.md. Highlights:
- Greenfield. No legacy constraints. Delete the wrong path; write the correct one.
- One mutation path.
Gateway.Applyis the only way to change active state. - Kernel wall.
internal/kernel/never importsinternal/plugins/. Enforced by thekernel_no_pluginsdepguard rule. - Functional default. Use classes only when state demands it.
- No empty lines inside method bodies. Keep functions compact for skimming.
- No comments that narrate what the code does. Only
why, trade-offs, constraints. tsxoverts-nodefor any TypeScript scripts.
Branching and commits¶
The repository follows a simple message format: {top-directory} {<=7 words lowercase}.
One logical change per commit. No --no-verify. No force-push to main.
Build, test, lint¶
make build # binary
make test # tests
make test-race # race detector
make test-cover # coverage
make lint # golangci-lint v2
make ci # lint + vet + race tests
CI runs make ci plus mkdocs build --strict on every PR.
Golden files¶
Channels write outbound payloads through tested formatters; goldens live under internal/plugins/channel/<name>/testdata/. Update with:
Review the diff carefully before committing.
Adding a plugin¶
See Concepts: Plugins. The short version:
- Create
internal/plugins/<axis>/<name>/. - Implement
plugin.Pluginplus the axis interfaces (channel, tool, skill, …). - Add a config struct (and validation) under
kernel/configif needed. - Add one line to
internal/gateway/wire.go.
You will not edit anything under internal/kernel/. If you find yourself wanting to, stop and design a kernel interface change first.
Working on docs¶
Docs live under docs/. The site is MkDocs Material; the nav is in mkdocs.yml.
Local preview¶
Open http://127.0.0.1:8000. Changes to docs/ or mkdocs.yml hot reload.
Build (without serving)¶
CI runs mkdocs build --strict on every PR. Fix link errors before opening a PR.
Style¶
- Plain English. Terse, technical, no marketing.
- Use tables for option lists. Default value + description columns.
- Use Mermaid for flows.
flowchart,sequenceDiagram,stateDiagramrender natively. - Backtick file/dir/identifier names (
internal/kernel/pipeline,Gateway.Apply). - Don't apologize. Don't pad. State the fact.
- Cross-link. Use relative links between docs (
[…](../concepts/sessions.md)).
Adding a page¶
- Add the markdown under
docs/<section>/<page>.md. - Register it in
mkdocs.ymlundernav:. mkdocs serveand verify it appears in the sidebar.
Unlisted files build but trigger warnings.
Mermaid¶
Supported diagram types: flowchart, sequenceDiagram, stateDiagram, classDiagram, erDiagram. The Material theme styles them; check mobile rendering for wide flowcharts.
What not to commit¶
site/(build output, gitignored).- Secrets or real tokens in examples — use
…,sk-ant-…,placeholder.
Deploying docs¶
Pushes to main deploy via CI:
- PRs run
mkdocs build --strict. - Merges trigger
mkdocs gh-deployon thegh-pagesbranch (.github/workflows/ci.yml).
GitHub Pages serves gh-pages (repo Settings → Pages → Source: Deploy from branch → gh-pages / /).
Manual fallback (rarely needed):
Questions¶
Open an issue on ageneralai/maven or start a discussion. For sensitive reports (security), email the maintainers listed in the repository.