c-sharp-engineer
Implement Project Aegis .NET 8 / Unity-adapter C# from an approved story or failing TDD test: plain systems in src/ProjectAegis.*, MonoBehaviours only at Unity edge. TDD-friendly; path approval unless
SKILL.md.claude/skills/c-sharp-engineer/SKILL.md
GitHubC# Engineer — Project Aegis
Primary target is .NET 8 Project Aegis (src/ProjectAegis.*), not a greenfield
Unity game. Unity adapter code lives under ProjectAegis.Delegation.UnityAdapter.
TDD with gauntlet / autonomy
When handed a failing xUnit test from /c-sharp-test-engineer (gauntlet Phase D
or user TDD):
- Confirm RED:
dotnet test … --filter <TestName>fails for the right reason. - GitNexus / impact before symbol edits when available; never touch
DelegationBridge.cshotpath or locked-eval surfaces without explicit quarantine. - Minimal production fix only — no drive-by refactors.
- GREEN: failing test passes; full
dotnet test ProjectAegis.slncount ≥ baseline; ReplayGolden filter still green when sim/delegation changed. - Gauntlet autonomy: skip "May I write" approval when the orchestrator prompt grants override; otherwise ask before Write/Edit.
Layout
| Change in | Tests in |
|---|---|
src/ProjectAegis.Sim/... |
src/ProjectAegis.Sim.Tests/... |
src/ProjectAegis.Data/... |
src/ProjectAegis.Data.Tests/... |
src/ProjectAegis.MissionEditor.Cli/... |
src/ProjectAegis.MissionEditor.Cli.Tests/... |
xUnit + Microsoft.NET.Test.Sdk — not NUnit for core assemblies.
Phase 1: Load Context
Read:
- The story/spec in the argument, plus any linked architecture sketch or ADR.
CLAUDE.mdand.claude/docs/coding-standards.md.- The existing source the change touches (
Glob/Grepfor the relevant types and asmdef).
If no architecture contract exists for a non-trivial system, recommend running
/c-sharp-architect first rather than inventing structure.
Phase 2: Confirm the Implementation Shape
Restate the contract: which classes/files, where logic lives (plain C# vs. MonoBehaviour edge), how dependencies are injected, and which values are data-driven. Surface ambiguities and ask before coding. Confirm test seams with the acceptance criteria in mind.
Phase 3: Implement
Write code that obeys the C# / Unity standards:
- Naming:
PascalCasemembers/types,_camelCaseprivate fields,I-interfaces. [SerializeField] privateinspector fields; cache components inAwake().- No
Find/FindObjectOfType/SendMessage/Resources.Loadin production code. - No allocations in hot paths (no LINQ/closures/string-concat in
Update/physics); use pooling,NonAlloc,Span<T>. == nullfor Unity-object checks; guard destroyed objects.Task/UniTask/Awaitableasync; noasync voidexcept event handlers; honorCancellationToken.- XML doc comments on public APIs;
readonly/constwhere applicable; no boxing. - Tunable values from data assets/config, never hardcoded.
If the contract proves unworkable mid-implementation, STOP and escalate to
/c-sharp-architect rather than improvising structure.
Phase 4: Approval Gate
Show the full code (or a detailed per-file summary for large changes). Then ask: "May I write this to [filepath(s)]?" List every file. Use Write/Edit only after "yes".
Phase 5: Verify & Hand Off
- If a build/test command is available, run it and report results honestly
(
dotnet build/dotnet test, or Unity batchmode where possible). - Use
AskUserQuestion:[A] Write tests now→/c-sharp-test-engineer[B] Review the code→/c-sharp-reviewer[C] Mark the story done→/story-done[D] Continue with the next piece