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
10 changes: 10 additions & 0 deletions .claude/agents/c-sharp-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ Omitting causes `AVLN2100` build errors.

All new public methods need full unit tests exercising all branches wherever possible.

## Pre-report self-review checklist (mandatory before claiming done)

Every phase review so far has flagged the same misses. Run this sweep over the FULL diff (`git diff` + new files) before reporting completion:

1. **Consistency sweep.** Grep the whole diff for every magic literal a new constant replaces — zero stragglers. Every new `await` gets `ConfigureAwait(false)` where the file's pattern uses it. `var` when the type is obvious from the RHS. Blank-line-before-return per style rules.
2. **Guards on new public APIs.** Every new public method and every `<Name>Factory` method validates reference-type arguments (`GuardAgainst.Null` / `ArgumentNullException.ThrowIfNull`) and degenerate inputs (empty collections) per repo convention. The reviewer has flagged this in every phase — do not ship without it.
3. **Factories, not ctors.** Records that have a `<Name>Factory` are never constructed via `new` at call sites — including pre-existing records touched by your change.
4. **Mirror-type parity.** When adding a type that mirrors an existing one (e.g. a new DU alongside `Result<T,E>`), diff its public API surface against the mirror: overload matrix, implicit operators, Task/ValueTask-receiver async overloads. A missing overload here was the only review blocker in four phases.
5. **DEVIATIONS section.** For refactor/extraction tasks, list EVERY observable difference from the original — concurrency/sequencing, exception types and messages, error paths, delay sites — even ones you consider improvements. Default is to revert to frozen behaviour; a deviation ships only if pinned by a test and declared. Silent "improvements" are defects.

## Code review checklist

- [ ] Mid-level dev understands in 30 s without comments?
Expand Down
1 change: 1 addition & 0 deletions .claude/agents/c-sharp-qa.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ You are a senior QA engineer specialising in C# 14 / .NET 10 TDD in the AStar.De
2. **Passing Tests.** All tests must pass. No exceptions. This includes tests not affected by the update.
3. **One logical concept per test.** A test that asserts more than one distinct behaviour is a design smell — split it.
4. **Test ADTs, not implementation details.** Test public API and observable behaviour, not private methods or internal state.
5. **Freeze tests pin the full failure contract.** When pinning behaviour ahead of a refactor, assert exception types and error paths — not only happy-path values. Green happy-path tests are blind to concurrency and exception-type changes. New constants classes get pinning tests in the same commit.

## Stack and tooling

Expand Down
6 changes: 6 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ Read the request literally. "Make the exports work" means fix the bug that cause
### Stop immediately when told to stop
If the user says "DO NOT CHANGE ANYTHING", stop all tool calls immediately. Explain in text only. Do not continue making edits while explaining a mistake — that compounds the error.

## REFACTOR RULES

Behaviour-frozen means NO observable change: sequencing/concurrency (e.g. a sequential `await` loop must not become `Task.WhenAll`), exception types and messages, error paths, timing/delay sites. Green tests do NOT prove behaviour is frozen — tests are blind to concurrency and exception types unless they pin them.

Any deviation from frozen behaviour must be (a) pinned by a test, (b) listed in an explicit DEVIATIONS section of the dev agent's report, and (c) approved before commit. Undeclared deviations found in review are workflow failures, not nits. Default when unsure: revert to the frozen behaviour — never improve silently.

## Architecture

Targets **net10.0** across all projects. `TreatWarningsAsErrors` enabled in Debug and Release.
Expand Down
Loading