Thank you for your interest in contributing to Reasonix! This guide covers everything you need to get started.
- Go 1.25+ — the project targets the latest stable Go release
- Git — for version control
- Node.js (optional) — only if you work on the desktop app (
desktop/)
git clone https://github.com/esengine/DeepSeek-Reasonix.git
cd DeepSeek-Reasonix
go build ./cmd/reasonix # builds the CLI binary
go test ./... # runs the full test suite| Directory | Purpose |
|---|---|
cmd/reasonix |
CLI entry point |
internal/agent |
Agent loop, session, coordinator |
internal/cli |
TUI, subcommands, setup wizard |
internal/control |
Transport-agnostic controller |
internal/config |
TOML configuration loading |
internal/tool/builtin |
Built-in tools (bash, read_file, …) |
internal/provider |
Model-backend abstraction |
internal/provider/openai |
OpenAI-compatible provider |
internal/plugin |
MCP client (stdio + HTTP) |
internal/event |
Typed event stream |
internal/hook |
Shell hooks (PreToolUse, …) |
internal/memory |
REASONIX.md hierarchy + auto-memory |
internal/skill |
Skill discovery from Markdown |
internal/sandbox |
OS-level sandboxing |
internal/serve |
HTTP/SSE server frontend |
internal/checkpoint |
Snapshot-based rewind |
desktop/ |
Wails-based desktop app (separate Go module) |
docs/ |
Engineering spec, migration guide |
cli → {agent, plugin, config} → {tool, provider}
Built-in subpackages import their parent to self-register via init().
Parents never import children.
make build # go build ./...
make test # go test ./...
make vet # go vet ./...
make fmt # gofmt -w .
make hooks # install git hooks (pre-push: go vet)
make cross # cross-compile for all 6 targetsgo test ./... # all tests
go test ./internal/agent/ -v # verbose, one package
go test ./internal/tool/builtin/ -run TestGrep # one testgofmtis enforced by CI — format before committing- Follow existing patterns: wrap errors with
fmt.Errorf("...: %w", err) - Library code never calls
os.Exitor prints to stdout/stderr - Only
cli/andmain/decide exit codes and user-facing messages - Exported identifiers must have doc comments
Follow Conventional Commits:
feat(glob): add ** recursive pattern support
fix: replace silent error discards with structured logging
test(event): add comprehensive unit tests for event package
docs: add CONTRIBUTING.md
ci: add golangci-lint and govulncheck
- Create
internal/tool/builtin/mytool.go - Implement the
tool.Toolinterface:Name(),Description(),Schema(),ReadOnly(),Execute() - Register via
func init() { tool.RegisterBuiltin(myTool{}) } - Add tests in
internal/tool/builtin/builtin_test.goor a separatemytool_test.go - The tool is automatically available —
mainblank-importsbuiltin
(For MCP tool servers see internal/plugin instead — that's a different layer.)
- Create
internal/provider/myprovider/ - Implement
provider.Provider:Name(),Stream() - Register via
func init() { provider.Register("mykind", New) } - The provider is available from config with
kind = "mykind"
- Add the field to
internal/i18n/i18n.go(Messagesstruct) - Add the value in
internal/i18n/messages_en.goandmessages_zh.go - The
TestCatalogsCompletetest will fail if you miss a locale
- Fork the repository
- Create a feature branch from
main-v2 - Make your changes with tests
- Ensure
go test ./...passes - Ensure
gofmt -l .shows no changes - Submit a pull request to
main-v2
Open an issue on GitHub with:
- Steps to reproduce
- Expected vs actual behavior
- Go version and OS
- Relevant logs or error messages
By contributing, you agree that your contributions will be licensed under the same license as the project.