Thank you for your interest in contributing! This guide covers the contributor workflow. For the project shape, repository map, and how the runtime fits together, start with docs/GETTING_STARTED.md. If you are evaluating the project for the first time, read docs/START_HERE.md. For a first local run, follow docs/QUICKSTART.md.
- .NET 10 SDK
- Git
- A C# editor (VS Code with C# Dev Kit, Visual Studio, or Rider)
git clone https://github.com/clawdotnet/openclaw.net
cd openclaw.net
dotnet restore OpenClaw.Net.slnx
dotnet build OpenClaw.Net.slnx --configuration Release --no-restore
# All tests
dotnet test OpenClaw.Net.slnx --configuration Release --no-build
# First deterministic runtime smoke
dotnet run --project samples/OpenClaw.HelloAgent -c Release --no-build- C# 14 — file-scoped namespaces, primary constructors, collection expressions
- NativeAOT compatibility — no
System.Reflection.Emit, no dynamic loading; use source-generated JSON serialization (CoreJsonContext) - Naming —
PascalCasefor public members,_camelCasefor private fields,camelCasefor locals/parameters - Formatting — 4-space indentation, Allman braces,
varwhen the type is obvious - No warnings — code must compile with zero warnings
-
Pick an issue. Look for issues labeled
good first issueorhelp wanted. Comment to let others know you're working on it. -
Create a branch. Use one of:
feature/,fix/,docs/,refactor/— e.g.feature/your-feature-name. -
Write tests. All changes must include tests. We use xUnit with NSubstitute for mocking. Test naming:
MethodName_WhenCondition_ShouldExpectedBehavior. -
Verify before submitting:
dotnet build OpenClaw.Net.slnx --configuration Release --no-restore dotnet test OpenClaw.Net.slnx --configuration Release --no-build dotnet run --project samples/OpenClaw.HelloAgent -c Release --no-build -
Open a PR. Fill out the template, reference related issues (
Fixes #123), and keep PRs focused — one feature or fix per PR. Rebase onmainif your branch is behind.
- Documentation gaps where a setup or diagnostic step is unclear.
- Focused regression tests for existing runtime, gateway, CLI, setup, or plugin behavior.
- Small CLI/help-text improvements that make failures more actionable.
- Compatibility catalog additions that exercise a real upstream package or intentionally unsupported case.
- Sample improvements that demonstrate existing behavior without adding new runtime architecture.
PRs need at least one approval before merging. Reviewers check for:
- Correctness — does it work as described?
- Tests — are there sufficient tests? Do they pass?
- NativeAOT — does it avoid reflection and dynamic code?
- Security — does it handle untrusted input safely?
- Style — does it follow project conventions?
Tools implement ITool in src/OpenClaw.Agent/Tools/ and register their JSON types in CoreJsonContext. Providers plug in through Microsoft.Extensions.AI and the gateway composition pipeline — add through the active provider registration path, not a Program.cs factory. Both must be wired through the current composition seams (see docs/architecture-startup-refactor.md) and covered by tests in src/OpenClaw.Tests/.
- Bugs: Bug Report template. Include
dotnet --version, OS, reproduction steps, expected vs actual behavior, and relevant logs (with secrets redacted). - Features: Feature Request template. Describe the problem, your proposed solution, and alternatives considered.
This project follows the Contributor Covenant. By contributing, you agree your contributions will be licensed under the MIT License.