Runa is a multi-module Go repository. Contributions should keep the public API small, the dependency graph explicit, and capability packages installable on demand.
Use the repository go.work file during local development:
git clone https://github.com/duxweb/runa.git
cd runa
go work sync
go test ./...The project currently targets Go 1.27rc1. Use the same toolchain when running tests or generating release artifacts.
Follow the public naming guide in docs/src/content/docs/contributing/naming.mdx.
Core conventions:
- Capability packages expose
New(),Provider(...), andDefault()when they enter the lifecycle. - Driver interfaces are named
Driverinside their package. - Driver selection options are named
Use(name). - Provider registration options use names such as
RegisterDriver(name, driver)andRegisterXxx(name, options...). - Heavy external dependencies belong in driver submodules, not in the root framework module.
Useful commands during development:
go run ./cmd/runa --help
go run ./cmd/runa dev --cmd serve
go run ./cmd/runa gen module billingRun checks before opening a pull request:
go test ./...
go vet ./...
for mod in $(go list -m -f '{{.Dir}}'); do
(cd "$mod" && go test ./... && go vet ./...)
doneBuild documentation:
cd docs
pnpm install
pnpm build- Keep changes focused and explain the reason for the change.
- Add or update tests for behavior changes.
- Update Chinese and English documentation together when public behavior changes.
- Do not commit
_plans/, local data, generated docs output,node_modules, or machine-specific paths. - Do not introduce new root dependencies unless the feature requires them in the core API.
Release steps are scripted in scripts/release.sh. Do not create tags, rewrite history, or push releases from a pull request.