Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!--
Please write this PR in ENGLISH: summary, changes, testing notes, and related issue references.

Fill in the applicable sections below.
Do not invent information.
Only check testing items that were actually run.
Delete a section only if it truly does not apply.
-->

## Summary

<!-- One or two sentences: what does this PR change, and why? -->

## Type of change

* [ ] Bug fix
* [ ] New feature
* [ ] Breaking change
* [ ] Refactoring
* [ ] Analyzer / diagnostic change
* [ ] Tests
* [ ] Documentation
* [ ] Build / CI / tooling

## Changes

<!-- Bullet list of the concrete changes made in this PR. Keep it factual. -->

*

## Testing

<!-- Check only the commands/tests that were actually run. Add details if something was not run. -->

* [ ] `dotnet build FirstClassErrors.sln`
* [ ] `dotnet test FirstClassErrors.sln`
* [ ] Analyzer tests pass (`FirstClassErrors.Analyzers.UnitTests`)

## Documentation

<!-- State whether documentation was updated, or why no documentation change was needed. -->

* [ ] Public API / error documentation updated
* [ ] README / `doc/` updated
* [ ] French translation (`doc/README.fr.md`) updated if user-facing behavior changed
* [ ] No documentation change required

## Related issues

<!-- e.g. Closes #123 -->
61 changes: 61 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# FirstClassErrors — guide for Claude Code

FirstClassErrors is a .NET library that treats errors as first-class,
documented, and diagnosable concepts. Keep changes aligned with that goal:
errors should stay structured, documented, and close to the code.

## Language

* The repository language is **English** by default:
source code, code comments, commit messages, branch names,
PR titles and descriptions, and issues.
* The English documentation is canonical.
* The French documentation in `doc/README.fr.md` is an intentional translation
and must stay in sync with the English documentation when user-facing behavior changes.
* You may reply to me in French in the chat, but never write repository content in French
unless you are updating the French documentation.

## Build & test

* Target framework: **.NET Standard 2.0**.
* Build: `dotnet build FirstClassErrors.sln`
* Test: `dotnet test FirstClassErrors.sln`
* Run the analyzer tests when touching analyzers:
`dotnet test FirstClassErrors.Analyzers.UnitTests`
* Only report tests as passing if you actually ran the corresponding command.
* If you did not run a relevant command, say so explicitly.

## Project layout

* `FirstClassErrors` — main library
* `FirstClassErrors.Analyzers` — Roslyn analyzers (+ `.UnitTests`)
* `FirstClassErrors.GenDoc` — error-documentation generator (+ `.UnitTests`)
* `FirstClassErrors.GenDoc.Worker` — background worker for doc generation
* `FirstClassErrors.Cli` — command-line tool
* `FirstClassErrors.Usage` — usage examples
* `doc/` — documentation, including the French translation

## Change guidelines

* Keep changes small, focused, and aligned with the requested task.
* Do not introduce new dependencies without a clear reason.
* Do not make public API changes unless they are required by the task.
* Treat renamed error codes, diagnostic IDs, and public types as breaking changes unless explicitly stated otherwise.
* Preserve compatibility with **.NET Standard 2.0**.
* Code style and inspection severities are defined in `FirstClassErrors.sln.DotSettings`
(ReSharper/Rider). Follow it; do not reformat code against these settings.

## Error and documentation conventions

* When you add or change an error, update its documentation accordingly.
* When you change user-facing behavior, keep the English README and the French translation
(`doc/README.fr.md`) in sync.
* When you change analyzers, update or add analyzer tests.
* When you change diagnostics, keep diagnostic IDs, messages, documentation, and tests consistent.

## Git and pull requests

* Follow `.github/pull_request_template.md` for every pull request.
* Do not open a pull request unless I explicitly ask for one.
* PR titles, descriptions, commits, and branch names must be written in English.
* In PR descriptions, do not invent testing results. Only check items that were actually run.
Loading