This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
# Standard build
dotnet build
dotnet build -c Release
# Build with warnings as errors (CI validation)
dotnet build -warnaserror# Run all tests
dotnet test -c Release
# Run tests for specific framework
dotnet test -c Release --framework net8.0
dotnet test -c Release --framework net48
# Run specific test by name
dotnet test -c Release --filter DisplayName="TestName"
# Run tests in a specific project
dotnet test path/to/project.csproj -c Release# Run only unit tests for changed projects
dotnet incrementalist run --config .incrementalist/testsOnly.json -- test -c Release --no-build --framework net8.0
# Run only multi-node tests for changed projects
dotnet incrementalist run --config .incrementalist/mutliNodeOnly.json -- test -c Release --no-build --framework net8.0# Format check
dotnet format --verify-no-changes
# API compatibility check
dotnet test -c Release src/core/Akka.API.Tests# Generate API documentation
dotnet docfx metadata ./docs/docfx.json --warningsAsErrors
dotnet docfx build ./docs/docfx.json --warningsAsErrors-
/src/core/- Core actor framework componentsAkka/- Base actor system, routing, dispatchers, configurationAkka.Remote/- Distributed actor communication and serializationAkka.Cluster/- Clustering, gossip protocols, distributed coordinationAkka.Persistence/- Event sourcing, snapshots, journalsAkka.Streams/- Reactive streams with backpressureAkka.TestKit/- Testing utilities for actor systems
-
/src/contrib/- Contributed modules (DI integrations, serializers, cluster extensions) -
/src/benchmark/- Performance benchmarks using BenchmarkDotNet -
/src/examples/- Sample applications demonstrating patterns
- Actor Model: Message-driven, hierarchical supervision, location transparency
- Fault Tolerance: Supervision strategies, let-it-crash philosophy
- Distribution: Remote actors, clustering, sharding
- Reactive Streams: Backpressure-aware stream processing
- Event Sourcing: Persistence with journals and snapshots
- Inherit from
AkkaSpecor useTestKitfor actor tests - Use
TestProbefor creating lightweight test actors - Use
EventFilterfor asserting log messages - Pass
ITestOutputHelper outputto test constructors for debugging - Multi-node tests use separate projects (*.Tests.MultiNode.csproj)
- Allman style braces (opening brace on new line)
- 4 spaces indentation, no tabs
- Private fields prefixed with underscore
_fieldName - Use
varwhen type is apparent - Default to
sealedclasses and records - Enable
#nullable enablein new/modified files - Never use
async void,.Result, or.Wait() - Always pass
CancellationTokenthrough async call chains
- Maintain compatibility with JVM Akka while being .NET idiomatic
- Use
Task<T>instead of Future,TimeSpaninstead of Duration - Extend-only design - don't modify existing public APIs
- Preserve wire format compatibility for serialization
- Include unit tests with all changes
- Use
DisplayNameattribute for descriptive test names - Follow pattern:
Should_ExpectedBehavior_When_Condition
dev- Main development branch (default for PRs)v1.4,v1.3, etc. - Version maintenance branches for older releases- Feature branches:
feature/description - Bugfix branches:
fix/description
- Always read existing code patterns in the module you're modifying
- Follow existing conventions for that specific module
- Add/update tests for your changes
- Run incremental tests before committing
- Ensure API compatibility tests pass for core changes
- .NET 8.0 - Primary target
- .NET 6.0 - Library compatibility
- .NET Framework 4.8 - Legacy support
- .NET Standard 2.0 - Library compatibility
Directory.Build.props- MSBuild properties, package versionsglobal.json- .NET SDK version (8.0.403)xunit.runner.json- Test configuration (60s timeout, no parallelization).incrementalist/*.json- Incremental build configurationsRELEASE_NOTES.md- Version history and changelog