Thanks for your interest. Every kind of contribution helps β code, docs, bug reports, design feedback. This file is the first stop; the full contributor guide lives in the docs book.
master is the ONLY default branch. The main branch no longer exists.
If you have an existing fork or local clone that tracks main, update it:
git checkout master
git branch -D main 2>/dev/null # delete local main if it exists
git remote set-head origin master
git fetch origin --prune # remove stale remote refs
# If your fork still has a main branch, delete it
git push origin --delete main 2>/dev/nullAll PRs target master. PRs targeting main will be rejected.
- Find an issue. Look for
good first issuelabels β these are scoped for newcomers and include enough context to get moving. - Pick a small scope. Typo fixes, doc improvements, test additions, and small bug fixes are the fastest path to a merged PR.
- Fork β branch β change β test β PR. PRs target
master. Usefeat/*orfix/*branch names. - Open a draft PR early if you get stuck and ask questions in the description.
For the full mechanics β code style, testing levels, PR template requirements, review process β see How to contribute.
# Clone
git clone https://github.com/zeroclaw-labs/zeroclaw.git
cd zeroclaw
# Enable the pre-push hook (runs fmt, clippy, tests before every push)
git config core.hooksPath .githooks
# Build and test
cargo build
cargo test --locked
# Format and lint (required before PR)
./scripts/ci/rust_quality_gate.sh
# Full CI parity in Docker
./dev/ci.sh allPre-push hook opt-ins (set the env var to enable for one push):
| Variable | Effect |
|---|---|
ZEROCLAW_STRICT_LINT=1 |
Strict lint pass on the full repo |
ZEROCLAW_STRICT_DELTA_LINT=1 |
Strict lint on changed Rust lines only |
ZEROCLAW_DOCS_LINT=1 |
Markdown gate on changed lines |
ZEROCLAW_DOCS_LINKS=1 |
Link check on added links only |
Skip the hook for rapid iteration with git push --no-verify. CI runs the same checks regardless.
ZeroClaw supports layered secret management for local development.
Storage options:
- Environment variables (recommended for development) β copy
.env.exampleto.envand fill in values..envis git-ignored. - Config file (
~/.zeroclaw/config.toml) β whensecrets.encrypt = true(default), values are encrypted with the key at~/.zeroclaw/.secret_key. Usezeroclaw onboardfor guided setup.
API key resolution order:
- Explicit key passed from config or CLI.
- Provider-specific env vars (
OPENROUTER_API_KEY,OPENAI_API_KEY,ANTHROPIC_API_KEY, β¦). - Generic env vars (
ZEROCLAW_API_KEY,API_KEY).
Provider/model overrides via ZEROCLAW_PROVIDER, PROVIDER, ZEROCLAW_MODEL. See .env.example for the supported list.
Never commit: .env, API keys / tokens / passwords / OAuth tokens / webhook signing secrets, ~/.zeroclaw/.secret_key, or any personal identifier in tests or fixtures. The full content discipline is in Privacy & PII.
Pre-commit secret scan. .githooks/pre-commit runs gitleaks protect --staged --redact when gitleaks is installed; if it's not installed, the hook prints a warning and continues. Install one of:
- gitleaks (what the hook uses)
- trufflehog
- git-secrets
Quick manual audit of the staged diff:
git diff --cached | grep -iE '(api[_-]?key|secret|token|password|bearer|sk-)'
git status --short | grep -E '\.env$'If a secret lands in a commit by accident: rotate the credential immediately, then purge history with git filter-repo or BFG and force-push (coordinate with maintainers). git revert alone is not enough β history still contains the secret. Also remove the leaked value from any PR, issue, discussion, or comment that quoted it.
The book is the source of truth for everything contributor-facing. Quick links:
| Topic | Page |
|---|---|
| The full contribution flow | How to contribute |
| Communication channels | Communication |
| Filing an RFC | RFC process |
| Privacy & PII rules | Privacy |
| Testing taxonomy | Testing |
| PR review protocol | PR review protocol |
| Trait extension examples | Extension examples |
| Contributor License Agreement | CLA |
| Project foundations (governance, culture, infrastructure) | Foundations |
For maintainer-facing content (PR workflow, reviewer playbook, release runbook, labels), see the Maintainers section.
- One concern per PR. Avoid mixing refactor + feature + infra.
- Small PRs first. Prefer
XS/S/M. Split large work into stacked PRs. - Template is mandatory. Complete every section in
.github/pull_request_template.md. - Validation evidence is required β actual command output, not "CI will check."
- Privacy and identity discipline is a merge gate. Never commit real names, emails, tokens, or PII.
- Co-authoring with AI is welcome. Use the
Co-Authored-Bytrailer where AI tools materially contributed. - Squash-merge with conventional commits is the merge style.
- Bugs β use the bug template; include OS,
zeroclaw --version, andzeroclaw doctoroutput. - Features β use the feature template; focus on use case and constraints.
- Security β see
SECURITY.mdfor responsible disclosure. Do not file public issues for vulnerabilities.
Dual-licensed: MIT OR Apache 2.0. Contributors automatically grant rights under both β see the CLA.
By submitting a contribution you agree to the CLA. No separate signature required.