- The .NET 10 SDK or later, and the .NET 8 runtime to run the
net8.0tests. - For the
net472tests: Windows with .NET Framework 4.7.2 or later (CI runs them on 4.8). Building needs no .NET Framework targeting pack; the SDK brings the reference assemblies.
- Check the issues and the project: someone may already be working on it. Comment on the issue before you start.
- For larger changes (a new package, a change to the public API), open an issue with a proposal before you write code. It saves time on both sides.
- New providers wait: work on GUS, KRS, MF or any other data source begins only after the first stable release of
OpenUrzednik.Nbp(ADR-0010). We close PRs that change thesrc/OpenUrzednik.Gus,KrsorMfskeletons; propose a provider with the provider proposal issue form instead.
Binding architecture decisions are in docs/adr/, and current work and priorities are in the issues and the project. A change that contradicts an accepted ADR needs a new ADR in the same PR. The Code conventions, Testing conventions and Performance sections of CLAUDE.md apply to every contributor; using AI tools is optional.
OpenUrzednikResult/OpenUrzednikResult<T>for every error that can happen during normal operation (validation, HTTP statuses, bad responses, network errors, timeouts), instead of error handling scattered across the code. We throw exceptions only when the caller cancels, for programmer errors (anullargument or an undefined enum value, which a public method that returns a task throws before it returns the task) and for fatal errors; a value of the right type that fails a format or range check is a returnedValidationError. Don't usecatch (Exception)(ADR-0002). Exceptions (OpenUrzednikExceptionand its subtypes) are available through.EnsureSuccess()/.EnsureSuccessAsync()for consumers who prefer the classic style; don't add parallel API variants.- Dependencies: the Core and provider packages have no NuGet dependencies (apart from official BCL packages for netstandard2.0); integrations with
Microsoft.Extensions.*go into separate packages (ADR-0004). OpenUrzednikErroris the base type for expected errors. A new error is asealedclass (ADR-0011) that derives from it (ADR-0002), definespublic const string ErrorCode, passes it to the base constructor and overridesCreateException()to return an exception derived fromOpenUrzednikException(seeNotFoundError).- Provider packages follow the patterns in
OpenUrzednik.Core: type names, error naming and the way results are returned stay consistent. - Document the public API with
///comments.GenerateDocumentationFileis on, so they show up in the consumer's IntelliSense. - Tests must not depend on real government servers in the default CI run. Test HTTP scenarios with stubs (
StubHttpMessageHandler) and WireMock, using responses captured from the real API (if they can contain personal data, capture them from a test environment or from legal-person records and replace remaining personal fields with fake values of the same format; never commit API keys, session ids or tokens). Mark tests that call the real API with[ManualFact]/[ManualTheory]. They run only on request:dotnet test tests/OpenUrzednik.IntegrationTests --explicit on, or with theOPEN_URZEDNIK_INTEGRATION_TEST_ENABLEDvariable set.
See SECURITY.md. Don't report vulnerabilities in a public issue.
- Fork, then branch from
develop(feature/…,fix/…,docs/…,chore/…). - Target
develop; we merge PRs with a merge commit. Themainbranch takes only release PRs (fromrelease/X.Ybranches) and hotfixes (seedocs/RELEASE-PROCESS.md). - Before opening a PR, run
dotnet build OpenUrzednik.slnx,dotnet test OpenUrzednik.slnx -f net10.0anddotnet format OpenUrzednik.slnx --verify-no-changeslocally. The tests run on Microsoft.Testing.Platform, so filters are xUnit's, not VSTest's--filter:dotnet test tests/OpenUrzednik.Nbp.Tests --filter-class "*NbpGoldPriceClientTest". - Describe what and why, not only how, especially for changes in
Core. PR descriptions and commit messages are in English (ADR-0009). - The docs are in English. Next to the root README and the README of each published package sits a short Polish
README.pl.mdwith only the informational parts: what the package is and the "unofficial" notice, installation, the quick-start example, the root package table and links to the English sections. If you change one of those parts and don't write Polish, say so in the PR; the maintainer updates the Polish file.
Instructions for agents (Claude Code, Copilot and others) are in CLAUDE.md. AGENTS.md only points to it.