This page is for contributors. The goal is to help you set up the repo, make a focused change, validate it, and open a PR without guesswork.
Who this page is for
- Contributors preparing a local dev environment
- Maintainers validating changes before opening or reviewing a PR
- Doc or code authors checking the repo workflow and validation baseline
Read this next
- Open Architecture before touching unfamiliar subsystems
- Open Commands if your change affects CLI behavior or docs
- Open README if you need the broader English docs map
If you came from ...
- README: this page narrows the path to contributor-specific setup and validation
- Commands: come here when a CLI change also needs workflow, testing, or PR guidance
AGENTS.md: use this page for the practical day-to-day contributor checklist
- Development and testing are pinned to Zig 0.16.0.
- Read
AGENTS.mdbefore code changes. - Read
CLAUDE.mdif you need more project context, validation rules, or subsystem guidance. - If you use the repository flake, both
nix buildandnix developare pinned to Zig 0.16.0.
Check your Zig version first:
zig versionzig build
zig build -Doptimize=ReleaseSmall
zig build test --summary allAt minimum, run this before opening a PR for code changes:
zig build test --summary allzig build -Dchannels=telegram,cli
zig build -Dengines=base,sqlite
zig build -Dtarget=x86_64-linux-musl
zig build -Dversion=2026.3.1Notes:
channels: limit which channel implementations are compiled inengines: limit memory engines in the buildtarget: cross-compile target tripleversion: override the embedded version string (devby default; release workflow injects the git tag)
- Read the target module and nearby tests first.
- Keep each PR focused on one concern.
- Update docs and tests as part of the same change.
- Validate before you open the PR.
If your change affects users, operators, or contributors, update the related docs in the same PR:
- Landing page:
README.md - English docs:
docs/en/ - Chinese docs:
docs/zh/ - Security policy:
SECURITY.md - Specialized deployment guide:
SIGNAL.md - Contribution guide:
CONTRIBUTING.md
Documentation should stay:
- task-oriented
- copy-paste friendly
- consistent with
src/main.zigand the current config schema - synchronized across English and Chinese when both audiences are affected
Enable the repository hooks once per clone:
git config core.hooksPath .githooksHooks included:
pre-commitrunszig fmt --check src/pre-pushrunszig build test --summary all
Recommended:
git diff --checkAlso verify links, paths, and command examples manually.
Required:
zig build test --summary allAlso run:
zig build -Doptimize=ReleaseSmallYour PR description should explain:
- what changed
- why it changed
- what validation you ran
- any risks or follow-up work
Suggested template:
## Summary
- ...
## Validation
- zig build test --summary all
## Notes
- ...
| Path | Purpose |
|---|---|
src/main.zig |
CLI command routing |
src/config.zig |
Config loading and environment overrides |
src/gateway.zig |
Gateway and webhooks |
src/security/ |
Security and sandboxing |
src/providers/ |
Model providers |
src/channels/ |
Messaging channels |
src/tools/ |
Tool implementations |
src/memory/ |
Memory backends and retrieval |
- Architecture:
docs/en/architecture.md - Commands:
docs/en/commands.md - Contribution guide:
CONTRIBUTING.md - Engineering protocol:
AGENTS.md
- Read Architecture before editing deeper runtime, security, or provider code
- Use Commands when your change touches the CLI surface or examples
- Open CONTRIBUTING.md before preparing the final PR description and review flow