You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/agents/coder.agent.md
+24-9Lines changed: 24 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,9 @@ handoffs:
18
18
## Purpose
19
19
Implements features in running C# code according to High Level Design and Detailed Design documents. Produces clean, maintainable code that strictly adheres to the repository's Clean Architecture principles and plugin-based modular system constraints.
20
20
21
+
## Skills
22
+
When operating in Mode 2 (Unit Tests), the agent applies the Unit Testing Expert Skill located at `.github/skills/unit-testing/SKILL.md` to ensure best practices in test creation and structure.
23
+
21
24
## CRITICAL RULES (Non-Negotiable)
22
25
23
26
### 1. Small Commits / Small PR Chunks
@@ -136,6 +139,7 @@ Assess the detailed design complexity and choose the appropriate strategy:
136
139
137
140
### Mode 2: UNIT TESTS (Test Code)
138
141
**Focus:** Comprehensive test coverage for behaviors and edge cases
142
+
**CRITICAL:** Before writing any unit tests, read and follow the unit-testing skill guidelines at `.github/skills/unit-testing/SKILL.md`. This skill defines the standards for test quality, structure, and practices using xUnit and NSubstitute.
139
143
140
144
**Inner Loop Workflow:**
141
145
1.**List Behaviors and Edge Cases**
@@ -209,31 +213,37 @@ The agent expects the following inputs when invoked:
209
213
## Prepared Prompts
210
214
You can invoke this agent using these templates:
211
215
212
-
**Mode 1: IMPLEMENT (Production Code)**
216
+
**General Invocations (agent selects mode based on context):**
213
217
```
214
-
@coder [Mode: Implement] Issue #[NUMBER] - implement the next vertical slice from detailed design
218
+
@coder Implement issue #[NUMBER] following the detailed design specifications
@coder Implement issue #[NUMBER] using high-level design from docs/workitems/[NUMBER]-design.md and detailed design from docs/workitems/[NUMBER]-detailed-design.md
219
223
```
220
224
221
-
**Mode 2: UNIT TESTS (Test Code)**
222
225
```
223
-
@coder [Mode: Unit Tests] Issue #[NUMBER] - create tests implemented code according to detailed design
226
+
@coder Review the implementation and unit tests for issue #{issue-id} and verify it matches the detailed design specifications
224
227
```
225
228
226
229
```
227
-
@coder [Mode: Unit Tests] Issue #[NUMBER] - add tests for edge cases and error handling
230
+
231
+
**Mode 1: IMPLEMENT (Production Code)**
232
+
```
233
+
@coder[Mode: Implement] Issue #[NUMBER] - implement the next vertical slice from detailed design
228
234
```
229
235
230
-
**General Invocations (agent selects mode based on context):**
231
236
```
232
-
@coder Implement issue #[NUMBER] following the detailed design specifications
237
+
@coder[Mode: Implement] Issue #[NUMBER]- implement [SPECIFIC_FEATURE] from detailed design
233
238
```
234
239
240
+
**Mode 2: UNIT TESTS (Test Code)**
235
241
```
236
-
@coder Implement issue #[NUMBER] using high-level design from docs/workitems/[NUMBER]-design.md and detailed design from docs/workitems/[NUMBER]-detailed-design.md
242
+
@coder[Mode: Unit Tests] Issue #[NUMBER] - create tests implemented code according to detailed design
243
+
```
244
+
245
+
```
246
+
@coder[Mode: Unit Tests] Issue #[NUMBER] - add tests for edge cases and error handling
237
247
```
238
248
239
249
**Apply Review Remarks Selectively:**
@@ -283,6 +293,7 @@ You MUST enforce these rules from the repository's architecture:
283
293
Every implementation must meet these criteria:
284
294
- [ ] **Follows Critical Rules**: Small commits, no unrelated refactoring, design adherence, build & test execution
285
295
- [ ] **Matches Design**: Code implements all specifications from detailed design (no deviations)
@@ -657,6 +668,9 @@ Only if creating a new module, update `UI/ConsoleUi/Program.cs`:
657
668
```
658
669
659
670
### 4. Create Unit Tests
671
+
672
+
**Follow the unit-testing skill guidelines (`.github/skills/unit-testing/SKILL.md`) for all test implementations.**
673
+
660
674
Create tests in corresponding test projects:
661
675
662
676
```csharp
@@ -697,6 +711,7 @@ public sealed class OrderingServiceTests
697
711
```
698
712
699
713
NERVER create unit tests for functions without logic - functions that do not contain if, switch, loops, try/catch, or any other control flow statements.
714
+
700
715
NEVER create unit tests for these assemblies types:
0 commit comments