Thank you for your interest in contributing!
- Fork the repository
- Clone your fork:
git clone https://github.com/<you>/JD.AI.git - Create a branch:
git checkout -b feature/my-feature - Make your changes
- Run tests:
dotnet test - Commit:
git commit -m "feat: add my feature" - Push:
git push origin feature/my-feature - Open a Pull Request
- .NET 10.0 SDK
- At least one AI provider for integration testing (Ollama recommended)
dotnet build JD.AI.slnx# Unit tests only
dotnet test --filter "Category!=Integration"
# All tests (requires Ollama)
dotnet testThe project has 772+ tests across 3 test projects (JD.AI.Tests, JD.AI.Gateway.Tests, JD.AI.IntegrationTests). Follow these test naming conventions:
- Test methods:
MethodName_Scenario_ExpectedResult - Test classes:
{ClassUnderTest}Tests - Integration tests must be marked with
[Trait("Category", "Integration")]
- Follow
.editorconfigrules - Run
dotnet formatbefore committing - Add XML doc comments for public APIs
- Keep test coverage high
Docs and README content should be visual and task-oriented. When you add or update user-facing docs:
- Include screenshots or GIFs for key workflows (TUI, daemon/service flows, dashboard pages, channel routing).
- Prefer real captures generated via:
npm --prefix docs/scripts run screenshots(Playwright static screenshots)./docs/tapes/generate.sh(VHS recordings and frame captures)
- Use concise alt text that explains what the reader should notice in the image.
All pull requests must pass the following analyzer checks (CI enforced):
- Formatting:
dotnet format --verify-no-changesmust pass with zero warnings - Meziantou.Analyzer:
MA0006— UseStringComparisonfor string comparisonsMA0144— UseOperatingSystem.IsWindows()instead ofRuntimeInformation
- xUnit:
xUnit1030— Do not useConfigureAwait(false)in test methods - Code Analysis:
CA1002/CA2227— Use proper collection types (List<T>suppressed only for POCO serialization scenarios)
- Additional analyzers active: SonarAnalyzer, AsyncFixer, Roslynator
The solution contains 17 projects (14 src + 3 test), organized by layer:
| Layer | Projects |
|---|---|
| Core | JD.AI.Core (shared library) |
| Applications | JD.AI (TUI), JD.AI.Gateway, JD.AI.Daemon |
| Channels | Discord, Signal, Slack, Telegram, Web, OpenClaw |
| Libraries | Plugins.SDK, Workflows, Telemetry |
| UI | Dashboard.Wasm |
| Tests | JD.AI.Tests (unit), JD.AI.Gateway.Tests, JD.AI.IntegrationTests |
To reduce boilerplate and keep changes localized, use these shared extension points:
- API-key providers: derive from
ApiKeyProviderDetectorBaseand override:KnownModelsConfigureKernel(...)
- Slash command completions: add or update completion entries in
SlashCommandCatalog.
Do not duplicate completion registrations inProgram.csor tests.
When adding commands/providers, update the corresponding unit tests (CompletionProviderTests, provider detector tests).
We use Conventional Commits:
feat:— New featuresfix:— Bug fixesdocs:— Documentation changestest:— Test additions/changeschore:— Maintenance tasksrefactor:— Code restructuring
Every pull request must pass the following 11 CI checks:
- Label PR
- pr-checks
- analyze
- Dependency Review
- Validate PR
- validate-docs
- release
- publish-docs
- Label PR Size
- CodeQL
- Test Results
This project uses Nerdbank.GitVersioning for automatic semantic versioning. Version numbers are derived from version.json and the git height — do not manually set version numbers.
- Ensure all tests pass
- Update CHANGELOG.md for user-facing changes
- Fill out the PR template
- Request review from @jerrettdavis