@pratikpsl/agent-skills 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -201
- package/package.json +2 -2
- package/src/templates/dotnet/AgentSkills/README.md +40 -40
- package/src/templates/dotnet/AgentSkills/agents/README.md +11 -11
- package/src/templates/dotnet/AgentSkills/agents/architect.agent.md +59 -59
- package/src/templates/dotnet/AgentSkills/agents/developer.agent.md +88 -88
- package/src/templates/dotnet/AgentSkills/entry-points/AGENTS.md +34 -0
- package/src/templates/dotnet/AgentSkills/entry-points/CLAUDE.md +34 -0
- package/src/templates/dotnet/AgentSkills/entry-points/copilot-instructions.md +34 -0
- package/src/templates/dotnet/AgentSkills/entry-points/cursor-instructions.md +34 -0
- package/src/templates/dotnet/AgentSkills/memory/index.md +22 -22
- package/src/templates/dotnet/AgentSkills/memory/lessons/api.md +3 -3
- package/src/templates/dotnet/AgentSkills/memory/lessons/auth.md +3 -3
- package/src/templates/dotnet/AgentSkills/memory/lessons/csharp.md +3 -3
- package/src/templates/dotnet/AgentSkills/memory/lessons/db.md +3 -3
- package/src/templates/dotnet/AgentSkills/memory/lessons/design.md +3 -3
- package/src/templates/dotnet/AgentSkills/memory/lessons/infra.md +3 -2
- package/src/templates/dotnet/AgentSkills/memory/lessons/mcp.md +3 -3
- package/src/templates/dotnet/AgentSkills/memory/lessons/testing.md +3 -3
- package/src/templates/dotnet/AgentSkills/memory/schema.md +26 -26
- package/src/templates/dotnet/AgentSkills/skills/INDEX.md +8 -8
- package/src/templates/dotnet/AgentSkills/skills/code-standards/SKILL.md +122 -122
- package/src/templates/dotnet/AgentSkills/skills/core/SKILL.md +23 -23
- package/src/templates/dotnet/AgentSkills/skills/csharp-xunit/SKILL.md +67 -67
- package/src/templates/dotnet/AgentSkills/skills/design/SKILL.md +108 -108
- package/src/templates/dotnet/AgentSkills/skills/dotnet-api/SKILL.md +303 -303
- package/src/templates/dotnet/AgentSkills/skills/dotnet-best-practices/SKILL.md +170 -170
- package/src/templates/dotnet/AgentSkills/skills/harness/SKILL.md +62 -62
- package/src/templates/dotnet/AgentSkills/skills/mcp_dotnet/SKILL.md +54 -54
- package/src/templates/dotnet/manifest.json +1 -1
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: architect
|
|
3
|
-
description: >
|
|
4
|
-
Load when designing features, planning CQRS structure,
|
|
5
|
-
designing SQL schema, or planning MCP server contracts.
|
|
6
|
-
Do not write implementation code; output structure only.
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Architect Agent
|
|
10
|
-
|
|
11
|
-
## Responsibilities
|
|
12
|
-
|
|
13
|
-
- Design CQRS command/query split before any code is written.
|
|
14
|
-
- Define SQL schema and relationships.
|
|
15
|
-
- Define MCP tool contracts including name, input, and output.
|
|
16
|
-
- Identify performance-sensitive read/write paths and expected data volume.
|
|
17
|
-
- Reject designs that violate SOLID, KISS, or YAGNI.
|
|
18
|
-
- Prefer simple, small designs that are easy to delete.
|
|
19
|
-
|
|
20
|
-
## CQRS Rules
|
|
21
|
-
|
|
22
|
-
- Commands mutate state and return nothing, an ID, or a small result.
|
|
23
|
-
- Queries read state and never mutate.
|
|
24
|
-
- Controllers dispatch only; no business logic belongs in controllers.
|
|
25
|
-
- Use one handler per command or query.
|
|
26
|
-
- Query designs returning collections must specify projection, pagination, and tracking behavior.
|
|
27
|
-
|
|
28
|
-
## Output Format
|
|
29
|
-
|
|
30
|
-
Before implementation, produce:
|
|
31
|
-
|
|
32
|
-
1. Command/query split with input and output.
|
|
33
|
-
2. SQL schema if new tables are needed.
|
|
34
|
-
3. MCP tool contract if the MCP surface changes.
|
|
35
|
-
4. Proposed folder structure.
|
|
36
|
-
|
|
37
|
-
## Example Command / Query Split
|
|
38
|
-
|
|
39
|
-
| Type | Name | Input | Output |
|
|
40
|
-
|---|---|---|---|
|
|
41
|
-
| Command | CreateOrderCommand | CreateOrderRequest | OrderId |
|
|
42
|
-
| Query | GetOrderByIdQuery | OrderId | OrderDto |
|
|
43
|
-
|
|
44
|
-
## Example Folder Structure
|
|
45
|
-
|
|
46
|
-
```text
|
|
47
|
-
Features/
|
|
48
|
-
└── Orders/
|
|
49
|
-
├── Commands/
|
|
50
|
-
│ └── CreateOrder/
|
|
51
|
-
│ ├── CreateOrderCommand.cs
|
|
52
|
-
│ ├── CreateOrderHandler.cs
|
|
53
|
-
│ └── CreateOrderValidator.cs
|
|
54
|
-
└── Queries/
|
|
55
|
-
└── GetOrderById/
|
|
56
|
-
├── GetOrderByIdQuery.cs
|
|
57
|
-
├── GetOrderByIdHandler.cs
|
|
58
|
-
└── OrderDto.cs
|
|
59
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: architect
|
|
3
|
+
description: >
|
|
4
|
+
Load when designing features, planning CQRS structure,
|
|
5
|
+
designing SQL schema, or planning MCP server contracts.
|
|
6
|
+
Do not write implementation code; output structure only.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Architect Agent
|
|
10
|
+
|
|
11
|
+
## Responsibilities
|
|
12
|
+
|
|
13
|
+
- Design CQRS command/query split before any code is written.
|
|
14
|
+
- Define SQL schema and relationships.
|
|
15
|
+
- Define MCP tool contracts including name, input, and output.
|
|
16
|
+
- Identify performance-sensitive read/write paths and expected data volume.
|
|
17
|
+
- Reject designs that violate SOLID, KISS, or YAGNI.
|
|
18
|
+
- Prefer simple, small designs that are easy to delete.
|
|
19
|
+
|
|
20
|
+
## CQRS Rules
|
|
21
|
+
|
|
22
|
+
- Commands mutate state and return nothing, an ID, or a small result.
|
|
23
|
+
- Queries read state and never mutate.
|
|
24
|
+
- Controllers dispatch only; no business logic belongs in controllers.
|
|
25
|
+
- Use one handler per command or query.
|
|
26
|
+
- Query designs returning collections must specify projection, pagination, and tracking behavior.
|
|
27
|
+
|
|
28
|
+
## Output Format
|
|
29
|
+
|
|
30
|
+
Before implementation, produce:
|
|
31
|
+
|
|
32
|
+
1. Command/query split with input and output.
|
|
33
|
+
2. SQL schema if new tables are needed.
|
|
34
|
+
3. MCP tool contract if the MCP surface changes.
|
|
35
|
+
4. Proposed folder structure.
|
|
36
|
+
|
|
37
|
+
## Example Command / Query Split
|
|
38
|
+
|
|
39
|
+
| Type | Name | Input | Output |
|
|
40
|
+
|---|---|---|---|
|
|
41
|
+
| Command | CreateOrderCommand | CreateOrderRequest | OrderId |
|
|
42
|
+
| Query | GetOrderByIdQuery | OrderId | OrderDto |
|
|
43
|
+
|
|
44
|
+
## Example Folder Structure
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
Features/
|
|
48
|
+
└── Orders/
|
|
49
|
+
├── Commands/
|
|
50
|
+
│ └── CreateOrder/
|
|
51
|
+
│ ├── CreateOrderCommand.cs
|
|
52
|
+
│ ├── CreateOrderHandler.cs
|
|
53
|
+
│ └── CreateOrderValidator.cs
|
|
54
|
+
└── Queries/
|
|
55
|
+
└── GetOrderById/
|
|
56
|
+
├── GetOrderByIdQuery.cs
|
|
57
|
+
├── GetOrderByIdHandler.cs
|
|
58
|
+
└── OrderDto.cs
|
|
59
|
+
```
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: developer
|
|
3
|
-
description: >
|
|
4
|
-
Load when implementing features in .NET C# API.
|
|
5
|
-
Always load architect guidance first if structure is not defined.
|
|
6
|
-
Always follows CQRS and loads code-standards plus dotnet-best-practices.
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Developer Agent
|
|
10
|
-
|
|
11
|
-
## Stack
|
|
12
|
-
|
|
13
|
-
- .NET 10 and modern C#.
|
|
14
|
-
- ASP.NET Core Minimal APIs or controllers.
|
|
15
|
-
- MediatR for CQRS dispatch.
|
|
16
|
-
- FluentValidation for input validation.
|
|
17
|
-
- EF Core for persistence.
|
|
18
|
-
- MCP Server SDK for AI tool surface.
|
|
19
|
-
|
|
20
|
-
## Implementation Rules
|
|
21
|
-
|
|
22
|
-
- Use records for commands, queries, and DTOs when immutability is appropriate.
|
|
23
|
-
- Mark classes `sealed` unless inheritance is intentionally supported.
|
|
24
|
-
- Keep controllers thin; they should validate transport concerns and dispatch through MediatR.
|
|
25
|
-
- Keep business rules in domain entities or domain/application services, not controllers or handlers.
|
|
26
|
-
- Use repositories or data access abstractions where the project already follows that convention.
|
|
27
|
-
- Use async all the way; never block with `.Result`, `.Wait()`, or `.GetAwaiter().GetResult()`.
|
|
28
|
-
- Pass `CancellationToken` through request, handler, EF Core, HTTP, and MCP boundaries.
|
|
29
|
-
- Optimize read queries with `.AsNoTracking()`, DTO projection, pagination, and no N+1 queries.
|
|
30
|
-
- Keep API payloads small and avoid excessive logging in hot paths.
|
|
31
|
-
|
|
32
|
-
## CQRS Pattern
|
|
33
|
-
|
|
34
|
-
```csharp
|
|
35
|
-
public sealed record CreateOrderCommand(Guid CustomerId, IReadOnlyList<OrderItem> Items)
|
|
36
|
-
: IRequest<Guid>;
|
|
37
|
-
|
|
38
|
-
public sealed class CreateOrderHandler(IOrderRepository repository)
|
|
39
|
-
: IRequestHandler<CreateOrderCommand, Guid>
|
|
40
|
-
{
|
|
41
|
-
public async Task<Guid> Handle(
|
|
42
|
-
CreateOrderCommand command,
|
|
43
|
-
CancellationToken cancellationToken)
|
|
44
|
-
{
|
|
45
|
-
var order = Order.Create(command.CustomerId, command.Items);
|
|
46
|
-
await repository.AddAsync(order, cancellationToken);
|
|
47
|
-
return order.Id;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Controller Rule
|
|
53
|
-
|
|
54
|
-
Controllers dispatch only.
|
|
55
|
-
|
|
56
|
-
```csharp
|
|
57
|
-
[HttpPost]
|
|
58
|
-
public async Task<IActionResult> Create(
|
|
59
|
-
CreateOrderRequest request,
|
|
60
|
-
CancellationToken cancellationToken)
|
|
61
|
-
{
|
|
62
|
-
var orderId = await mediator.Send(
|
|
63
|
-
new CreateOrderCommand(request.CustomerId, request.Items),
|
|
64
|
-
cancellationToken);
|
|
65
|
-
|
|
66
|
-
return CreatedAtAction(nameof(GetById), new { orderId }, null);
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## MCP Tool Rule
|
|
71
|
-
|
|
72
|
-
MCP tools should reuse the same command/query handlers as REST endpoints.
|
|
73
|
-
|
|
74
|
-
```csharp
|
|
75
|
-
[McpTool("create_order", "Creates a new order")]
|
|
76
|
-
public static async Task<CreateOrderResult> CreateOrderAsync(
|
|
77
|
-
Guid customerId,
|
|
78
|
-
IReadOnlyList<OrderItem> items,
|
|
79
|
-
IMediator mediator,
|
|
80
|
-
CancellationToken cancellationToken)
|
|
81
|
-
{
|
|
82
|
-
var orderId = await mediator.Send(
|
|
83
|
-
new CreateOrderCommand(customerId, items),
|
|
84
|
-
cancellationToken);
|
|
85
|
-
|
|
86
|
-
return new CreateOrderResult(orderId);
|
|
87
|
-
}
|
|
88
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: developer
|
|
3
|
+
description: >
|
|
4
|
+
Load when implementing features in .NET C# API.
|
|
5
|
+
Always load architect guidance first if structure is not defined.
|
|
6
|
+
Always follows CQRS and loads code-standards plus dotnet-best-practices.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Developer Agent
|
|
10
|
+
|
|
11
|
+
## Stack
|
|
12
|
+
|
|
13
|
+
- .NET 10 and modern C#.
|
|
14
|
+
- ASP.NET Core Minimal APIs or controllers.
|
|
15
|
+
- MediatR for CQRS dispatch.
|
|
16
|
+
- FluentValidation for input validation.
|
|
17
|
+
- EF Core for persistence.
|
|
18
|
+
- MCP Server SDK for AI tool surface.
|
|
19
|
+
|
|
20
|
+
## Implementation Rules
|
|
21
|
+
|
|
22
|
+
- Use records for commands, queries, and DTOs when immutability is appropriate.
|
|
23
|
+
- Mark classes `sealed` unless inheritance is intentionally supported.
|
|
24
|
+
- Keep controllers thin; they should validate transport concerns and dispatch through MediatR.
|
|
25
|
+
- Keep business rules in domain entities or domain/application services, not controllers or handlers.
|
|
26
|
+
- Use repositories or data access abstractions where the project already follows that convention.
|
|
27
|
+
- Use async all the way; never block with `.Result`, `.Wait()`, or `.GetAwaiter().GetResult()`.
|
|
28
|
+
- Pass `CancellationToken` through request, handler, EF Core, HTTP, and MCP boundaries.
|
|
29
|
+
- Optimize read queries with `.AsNoTracking()`, DTO projection, pagination, and no N+1 queries.
|
|
30
|
+
- Keep API payloads small and avoid excessive logging in hot paths.
|
|
31
|
+
|
|
32
|
+
## CQRS Pattern
|
|
33
|
+
|
|
34
|
+
```csharp
|
|
35
|
+
public sealed record CreateOrderCommand(Guid CustomerId, IReadOnlyList<OrderItem> Items)
|
|
36
|
+
: IRequest<Guid>;
|
|
37
|
+
|
|
38
|
+
public sealed class CreateOrderHandler(IOrderRepository repository)
|
|
39
|
+
: IRequestHandler<CreateOrderCommand, Guid>
|
|
40
|
+
{
|
|
41
|
+
public async Task<Guid> Handle(
|
|
42
|
+
CreateOrderCommand command,
|
|
43
|
+
CancellationToken cancellationToken)
|
|
44
|
+
{
|
|
45
|
+
var order = Order.Create(command.CustomerId, command.Items);
|
|
46
|
+
await repository.AddAsync(order, cancellationToken);
|
|
47
|
+
return order.Id;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Controller Rule
|
|
53
|
+
|
|
54
|
+
Controllers dispatch only.
|
|
55
|
+
|
|
56
|
+
```csharp
|
|
57
|
+
[HttpPost]
|
|
58
|
+
public async Task<IActionResult> Create(
|
|
59
|
+
CreateOrderRequest request,
|
|
60
|
+
CancellationToken cancellationToken)
|
|
61
|
+
{
|
|
62
|
+
var orderId = await mediator.Send(
|
|
63
|
+
new CreateOrderCommand(request.CustomerId, request.Items),
|
|
64
|
+
cancellationToken);
|
|
65
|
+
|
|
66
|
+
return CreatedAtAction(nameof(GetById), new { orderId }, null);
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## MCP Tool Rule
|
|
71
|
+
|
|
72
|
+
MCP tools should reuse the same command/query handlers as REST endpoints.
|
|
73
|
+
|
|
74
|
+
```csharp
|
|
75
|
+
[McpTool("create_order", "Creates a new order")]
|
|
76
|
+
public static async Task<CreateOrderResult> CreateOrderAsync(
|
|
77
|
+
Guid customerId,
|
|
78
|
+
IReadOnlyList<OrderItem> items,
|
|
79
|
+
IMediator mediator,
|
|
80
|
+
CancellationToken cancellationToken)
|
|
81
|
+
{
|
|
82
|
+
var orderId = await mediator.Send(
|
|
83
|
+
new CreateOrderCommand(customerId, items),
|
|
84
|
+
cancellationToken);
|
|
85
|
+
|
|
86
|
+
return new CreateOrderResult(orderId);
|
|
87
|
+
}
|
|
88
|
+
```
|
|
@@ -14,3 +14,37 @@ AI-enabled IDEs in this repository.
|
|
|
14
14
|
|
|
15
15
|
Do not duplicate canonical instructions in this file. Edit shared guidance in
|
|
16
16
|
`AgentSkills/`.
|
|
17
|
+
|
|
18
|
+
## Mandatory Bootstrap (All Agents — Enforced)
|
|
19
|
+
|
|
20
|
+
Before changing any file or producing a final answer for any **code-changing**
|
|
21
|
+
task in this repository, you MUST complete the following bootstrap sequence
|
|
22
|
+
in order. Do NOT skip this sequence even for tasks that appear simple or quick.
|
|
23
|
+
|
|
24
|
+
1. Read `AgentSkills/OPERATING.md`.
|
|
25
|
+
2. Read `AgentSkills/memory/index.md`; load only the domain lesson file(s)
|
|
26
|
+
relevant to the current task (do not load all files at once).
|
|
27
|
+
3. Read `AgentSkills/skills/INDEX.md` (when it exists).
|
|
28
|
+
4. Always load `AgentSkills/skills/core/SKILL.md`.
|
|
29
|
+
5. Load any task-specific skill from `AgentSkills/skills/` that matches the task.
|
|
30
|
+
6. For .NET / C# implementation tasks, load `AgentSkills/agents/developer.agent.md`.
|
|
31
|
+
7. For design, CQRS structure, SQL schema, or architecture tasks, load
|
|
32
|
+
`AgentSkills/agents/architect.agent.md`.
|
|
33
|
+
8. Inspect the worktree context before editing so existing user changes are
|
|
34
|
+
preserved.
|
|
35
|
+
9. Define the verification path for the task before making changes.
|
|
36
|
+
|
|
37
|
+
## Completion Gate (All Agents — Enforced)
|
|
38
|
+
|
|
39
|
+
Before marking any code-changing task complete:
|
|
40
|
+
|
|
41
|
+
1. Run the pre-submit checklist in `AgentSkills/skills/core/SKILL.md`.
|
|
42
|
+
2. Run the harness validator (unless the task is documentation-only or the
|
|
43
|
+
environment cannot run it — in that case, state the reason explicitly):
|
|
44
|
+
|
|
45
|
+
```powershell
|
|
46
|
+
pwsh ./tools/Harness/validate.ps1
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
3. Do not claim completion when required checks fail. List failures clearly and
|
|
50
|
+
leave the work in a reviewable state.
|
|
@@ -14,3 +14,37 @@ AI-enabled IDEs in this repository.
|
|
|
14
14
|
|
|
15
15
|
Do not duplicate canonical instructions in this file. Edit shared guidance in
|
|
16
16
|
`AgentSkills/`.
|
|
17
|
+
|
|
18
|
+
## Mandatory Bootstrap (All Agents — Enforced)
|
|
19
|
+
|
|
20
|
+
Before changing any file or producing a final answer for any **code-changing**
|
|
21
|
+
task in this repository, you MUST complete the following bootstrap sequence
|
|
22
|
+
in order. Do NOT skip this sequence even for tasks that appear simple or quick.
|
|
23
|
+
|
|
24
|
+
1. Read `AgentSkills/OPERATING.md`.
|
|
25
|
+
2. Read `AgentSkills/memory/index.md`; load only the domain lesson file(s)
|
|
26
|
+
relevant to the current task (do not load all files at once).
|
|
27
|
+
3. Read `AgentSkills/skills/INDEX.md` (when it exists).
|
|
28
|
+
4. Always load `AgentSkills/skills/core/SKILL.md`.
|
|
29
|
+
5. Load any task-specific skill from `AgentSkills/skills/` that matches the task.
|
|
30
|
+
6. For .NET / C# implementation tasks, load `AgentSkills/agents/developer.agent.md`.
|
|
31
|
+
7. For design, CQRS structure, SQL schema, or architecture tasks, load
|
|
32
|
+
`AgentSkills/agents/architect.agent.md`.
|
|
33
|
+
8. Inspect the worktree context before editing so existing user changes are
|
|
34
|
+
preserved.
|
|
35
|
+
9. Define the verification path for the task before making changes.
|
|
36
|
+
|
|
37
|
+
## Completion Gate (All Agents — Enforced)
|
|
38
|
+
|
|
39
|
+
Before marking any code-changing task complete:
|
|
40
|
+
|
|
41
|
+
1. Run the pre-submit checklist in `AgentSkills/skills/core/SKILL.md`.
|
|
42
|
+
2. Run the harness validator (unless the task is documentation-only or the
|
|
43
|
+
environment cannot run it — in that case, state the reason explicitly):
|
|
44
|
+
|
|
45
|
+
```powershell
|
|
46
|
+
pwsh ./tools/Harness/validate.ps1
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
3. Do not claim completion when required checks fail. List failures clearly and
|
|
50
|
+
leave the work in a reviewable state.
|
|
@@ -14,3 +14,37 @@ AI-enabled IDEs in this repository.
|
|
|
14
14
|
|
|
15
15
|
Do not duplicate canonical instructions in this file. Edit shared guidance in
|
|
16
16
|
`AgentSkills/`.
|
|
17
|
+
|
|
18
|
+
## Mandatory Bootstrap (All Agents — Enforced)
|
|
19
|
+
|
|
20
|
+
Before changing any file or producing a final answer for any **code-changing**
|
|
21
|
+
task in this repository, you MUST complete the following bootstrap sequence
|
|
22
|
+
in order. Do NOT skip this sequence even for tasks that appear simple or quick.
|
|
23
|
+
|
|
24
|
+
1. Read `AgentSkills/OPERATING.md`.
|
|
25
|
+
2. Read `AgentSkills/memory/index.md`; load only the domain lesson file(s)
|
|
26
|
+
relevant to the current task (do not load all files at once).
|
|
27
|
+
3. Read `AgentSkills/skills/INDEX.md` (when it exists).
|
|
28
|
+
4. Always load `AgentSkills/skills/core/SKILL.md`.
|
|
29
|
+
5. Load any task-specific skill from `AgentSkills/skills/` that matches the task.
|
|
30
|
+
6. For .NET / C# implementation tasks, load `AgentSkills/agents/developer.agent.md`.
|
|
31
|
+
7. For design, CQRS structure, SQL schema, or architecture tasks, load
|
|
32
|
+
`AgentSkills/agents/architect.agent.md`.
|
|
33
|
+
8. Inspect the worktree context before editing so existing user changes are
|
|
34
|
+
preserved.
|
|
35
|
+
9. Define the verification path for the task before making changes.
|
|
36
|
+
|
|
37
|
+
## Completion Gate (All Agents — Enforced)
|
|
38
|
+
|
|
39
|
+
Before marking any code-changing task complete:
|
|
40
|
+
|
|
41
|
+
1. Run the pre-submit checklist in `AgentSkills/skills/core/SKILL.md`.
|
|
42
|
+
2. Run the harness validator (unless the task is documentation-only or the
|
|
43
|
+
environment cannot run it — in that case, state the reason explicitly):
|
|
44
|
+
|
|
45
|
+
```powershell
|
|
46
|
+
pwsh ./tools/Harness/validate.ps1
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
3. Do not claim completion when required checks fail. List failures clearly and
|
|
50
|
+
leave the work in a reviewable state.
|
|
@@ -14,3 +14,37 @@ AI-enabled IDEs in this repository.
|
|
|
14
14
|
|
|
15
15
|
Do not duplicate canonical instructions in this file. Edit shared guidance in
|
|
16
16
|
`AgentSkills/`.
|
|
17
|
+
|
|
18
|
+
## Mandatory Bootstrap (All Agents — Enforced)
|
|
19
|
+
|
|
20
|
+
Before changing any file or producing a final answer for any **code-changing**
|
|
21
|
+
task in this repository, you MUST complete the following bootstrap sequence
|
|
22
|
+
in order. Do NOT skip this sequence even for tasks that appear simple or quick.
|
|
23
|
+
|
|
24
|
+
1. Read `AgentSkills/OPERATING.md`.
|
|
25
|
+
2. Read `AgentSkills/memory/index.md`; load only the domain lesson file(s)
|
|
26
|
+
relevant to the current task (do not load all files at once).
|
|
27
|
+
3. Read `AgentSkills/skills/INDEX.md` (when it exists).
|
|
28
|
+
4. Always load `AgentSkills/skills/core/SKILL.md`.
|
|
29
|
+
5. Load any task-specific skill from `AgentSkills/skills/` that matches the task.
|
|
30
|
+
6. For .NET / C# implementation tasks, load `AgentSkills/agents/developer.agent.md`.
|
|
31
|
+
7. For design, CQRS structure, SQL schema, or architecture tasks, load
|
|
32
|
+
`AgentSkills/agents/architect.agent.md`.
|
|
33
|
+
8. Inspect the worktree context before editing so existing user changes are
|
|
34
|
+
preserved.
|
|
35
|
+
9. Define the verification path for the task before making changes.
|
|
36
|
+
|
|
37
|
+
## Completion Gate (All Agents — Enforced)
|
|
38
|
+
|
|
39
|
+
Before marking any code-changing task complete:
|
|
40
|
+
|
|
41
|
+
1. Run the pre-submit checklist in `AgentSkills/skills/core/SKILL.md`.
|
|
42
|
+
2. Run the harness validator (unless the task is documentation-only or the
|
|
43
|
+
environment cannot run it — in that case, state the reason explicitly):
|
|
44
|
+
|
|
45
|
+
```powershell
|
|
46
|
+
pwsh ./tools/Harness/validate.ps1
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
3. Do not claim completion when required checks fail. List failures clearly and
|
|
50
|
+
leave the work in a reviewable state.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
# Memory Index
|
|
2
|
-
|
|
3
|
-
Always load this file first. Then load **only** the domain file(s) that match your task.
|
|
4
|
-
Do NOT load domain files you do not need. Never load all files at once.
|
|
5
|
-
|
|
6
|
-
## Domain Map
|
|
7
|
-
|
|
8
|
-
| Domain
|
|
9
|
-
|
|
10
|
-
| api
|
|
11
|
-
| db
|
|
12
|
-
| infra
|
|
13
|
-
| auth
|
|
14
|
-
| testing | xUnit, test data, mocking, coverage, assertions
|
|
15
|
-
| csharp
|
|
16
|
-
| design
|
|
17
|
-
| mcp
|
|
18
|
-
|
|
19
|
-
## Writing a lesson?
|
|
20
|
-
|
|
21
|
-
Load `memory/schema.md` for the one-line format. Do not inline logging instructions here.
|
|
22
|
-
Update the lesson count in this table after appending to the domain file.
|
|
1
|
+
# Memory Index
|
|
2
|
+
|
|
3
|
+
Always load this file first. Then load **only** the domain file(s) that match your task.
|
|
4
|
+
Do NOT load domain files you do not need. Never load all files at once.
|
|
5
|
+
|
|
6
|
+
## Domain Map
|
|
7
|
+
|
|
8
|
+
| Domain | Load when | File | Lessons |
|
|
9
|
+
| ------- | ------------------------------------------------------------- | ---------------------------------------- | ------- |
|
|
10
|
+
| api | CQRS, MediatR, commands, queries, controllers, endpoints | [lessons/api.md](lessons/api.md) | 1 |
|
|
11
|
+
| db | EF Core, migrations, schema, seeding, repositories | [lessons/db.md](lessons/db.md) | 0 |
|
|
12
|
+
| infra | Build, paths, CI, tooling, portability, AgentSkills setup | [lessons/infra.md](lessons/infra.md) | 6 |
|
|
13
|
+
| auth | Authentication, authorisation, JWT, policies, claims | [lessons/auth.md](lessons/auth.md) | 0 |
|
|
14
|
+
| testing | xUnit, test data, mocking, coverage, assertions | [lessons/testing.md](lessons/testing.md) | 0 |
|
|
15
|
+
| csharp | C# language features, async/await, naming, code style | [lessons/csharp.md](lessons/csharp.md) | 0 |
|
|
16
|
+
| design | SOLID, CQRS, Repository, patterns, architecture decisions | [lessons/design.md](lessons/design.md) | 0 |
|
|
17
|
+
| mcp | MCP server tools, transports, contracts, .NET MCP integration | [lessons/mcp.md](lessons/mcp.md) | 0 |
|
|
18
|
+
|
|
19
|
+
## Writing a lesson?
|
|
20
|
+
|
|
21
|
+
Load `memory/schema.md` for the one-line format. Do not inline logging instructions here.
|
|
22
|
+
Update the lesson count in this table after appending to the domain file.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# API Lessons
|
|
2
|
-
|
|
3
|
-
RULE: Controllers dispatch only via MediatR; all business rules belong in Domain Entities or Domain Services, never in Handlers or Controllers. #cqrs-violation 2026-05-31
|
|
1
|
+
# API Lessons
|
|
2
|
+
|
|
3
|
+
RULE: Controllers dispatch only via MediatR; all business rules belong in Domain Entities or Domain Services, never in Handlers or Controllers. #cqrs-violation 2026-05-31
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# Auth Lessons
|
|
2
|
-
|
|
3
|
-
<!-- No lessons yet. Append using the format in memory/schema.md -->
|
|
1
|
+
# Auth Lessons
|
|
2
|
+
|
|
3
|
+
<!-- No lessons yet. Append using the format in memory/schema.md -->
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# C# Lessons
|
|
2
|
-
|
|
3
|
-
<!-- No lessons yet. Append using the format in memory/schema.md -->
|
|
1
|
+
# C# Lessons
|
|
2
|
+
|
|
3
|
+
<!-- No lessons yet. Append using the format in memory/schema.md -->
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# DB Lessons
|
|
2
|
-
|
|
3
|
-
<!-- No lessons yet. Append using the format in memory/schema.md -->
|
|
1
|
+
# DB Lessons
|
|
2
|
+
|
|
3
|
+
<!-- No lessons yet. Append using the format in memory/schema.md -->
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# Design Lessons
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# Design Lessons
|
|
2
|
+
|
|
3
|
+
RULE: Always use flat vertical slice feature folders; never create nested Commands or Queries subfolders. #wrong-path 2026-07-05
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
# Infra Lessons
|
|
2
|
-
|
|
1
|
+
# Infra Lessons
|
|
2
|
+
|
|
3
3
|
RULE: Never overwrite files in AgentSkills/ without verifying they are backed up; it is the single source of truth and tool-specific entry points must point to it, never duplicate it. #circular-redirect 2026-05-31
|
|
4
4
|
RULE: Use repo-relative paths in all agent and IDE instruction files; never write absolute local drive paths in shared documentation. #wrong-path 2026-06-06
|
|
5
5
|
RULE: When splitting a monolithic memory file into domain files, grep the whole repo for the old path and update every reference before deleting the original. #stale-reference 2026-06-07
|
|
6
6
|
RULE: Always check native command exit codes explicitly in PowerShell harness scripts. #native-exit-code 2026-06-21
|
|
7
7
|
RULE: Run dotnet format after patching C# files; this repo enforces CRLF and no final newline. #format-fail 2026-07-01
|
|
8
|
+
RULE: Always execute the full AgentSkills bootstrap sequence before any code-changing task, even simple ones. #bootstrap-skip 2026-07-05
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# MCP Lessons
|
|
2
|
-
|
|
3
|
-
<!-- No lessons yet. Append using the format in memory/schema.md -->
|
|
1
|
+
# MCP Lessons
|
|
2
|
+
|
|
3
|
+
<!-- No lessons yet. Append using the format in memory/schema.md -->
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# Testing Lessons
|
|
2
|
-
|
|
3
|
-
<!-- No lessons yet. Append using the format in memory/schema.md -->
|
|
1
|
+
# Testing Lessons
|
|
2
|
+
|
|
3
|
+
<!-- No lessons yet. Append using the format in memory/schema.md -->
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
# Lesson Logging Schema
|
|
2
|
-
|
|
3
|
-
Load this file **only when writing a new lesson** at the end of a task.
|
|
4
|
-
Never load at task start — it adds no value during execution.
|
|
5
|
-
|
|
6
|
-
## Format
|
|
7
|
-
|
|
8
|
-
Append one line per lesson to the correct domain file in `memory/lessons/`:
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
RULE: <imperative sentence — what to always do or never do> #tag YYYY-MM-DD
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Rules for a good entry
|
|
15
|
-
|
|
16
|
-
- Start with **Always**, **Never**, or an action verb.
|
|
17
|
-
- Keep it under 20 words. The rule only — no symptom narrative, no root cause prose.
|
|
18
|
-
- Add one `#tag` describing the symptom class (e.g. `#build-fail`, `#wrong-path`, `#cqrs-violation`).
|
|
19
|
-
- Pick the correct domain from `memory/index.md`. If unsure, use `infra.md`.
|
|
20
|
-
- After appending, **increment the lesson count** for that domain in `memory/index.md`.
|
|
21
|
-
|
|
22
|
-
## Example
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
RULE: Never place business logic in MediatR Handlers; delegate to domain entities or services. #cqrs-violation 2026-05-31
|
|
26
|
-
```
|
|
1
|
+
# Lesson Logging Schema
|
|
2
|
+
|
|
3
|
+
Load this file **only when writing a new lesson** at the end of a task.
|
|
4
|
+
Never load at task start — it adds no value during execution.
|
|
5
|
+
|
|
6
|
+
## Format
|
|
7
|
+
|
|
8
|
+
Append one line per lesson to the correct domain file in `memory/lessons/`:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
RULE: <imperative sentence — what to always do or never do> #tag YYYY-MM-DD
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Rules for a good entry
|
|
15
|
+
|
|
16
|
+
- Start with **Always**, **Never**, or an action verb.
|
|
17
|
+
- Keep it under 20 words. The rule only — no symptom narrative, no root cause prose.
|
|
18
|
+
- Add one `#tag` describing the symptom class (e.g. `#build-fail`, `#wrong-path`, `#cqrs-violation`).
|
|
19
|
+
- Pick the correct domain from `memory/index.md`. If unsure, use `infra.md`.
|
|
20
|
+
- After appending, **increment the lesson count** for that domain in `memory/index.md`.
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
RULE: Never place business logic in MediatR Handlers; delegate to domain entities or services. #cqrs-violation 2026-05-31
|
|
26
|
+
```
|
|
@@ -6,14 +6,14 @@ Start with `AgentSkills/OPERATING.md` for the shared prerequisite and completion
|
|
|
6
6
|
`AgentSkills/` is the single source of truth for all skills and agents.
|
|
7
7
|
Do not duplicate skill content under `.github/`, `.copilot/`, `.codex/`, or other tool-specific folders.
|
|
8
8
|
All AI tools and IDEs should load skills from this folder.
|
|
9
|
-
|
|
10
|
-
## Skills
|
|
11
|
-
|
|
12
|
-
| Skill | Load when | Path |
|
|
13
|
-
|---|---|---|
|
|
14
|
-
| **core** | Every task | [SKILL.md](core/SKILL.md) |
|
|
15
|
-
| **code-standards** | Writing, reviewing, or refactoring C# code | [SKILL.md](code-standards/SKILL.md) |
|
|
16
|
-
| **design** | Designing, architecting, or implementing patterns | [SKILL.md](design/SKILL.md) |
|
|
9
|
+
|
|
10
|
+
## Skills
|
|
11
|
+
|
|
12
|
+
| Skill | Load when | Path |
|
|
13
|
+
|---|---|---|
|
|
14
|
+
| **core** | Every task | [SKILL.md](core/SKILL.md) |
|
|
15
|
+
| **code-standards** | Writing, reviewing, or refactoring C# code | [SKILL.md](code-standards/SKILL.md) |
|
|
16
|
+
| **design** | Designing, architecting, or implementing patterns | [SKILL.md](design/SKILL.md) |
|
|
17
17
|
| **dotnet-best-practices** | Writing, reviewing, refactoring, or optimizing .NET/C# code | [SKILL.md](dotnet-best-practices/SKILL.md) |
|
|
18
18
|
| **csharp-xunit** | Get best practices for XUnit unit testing, including data-driven tests | [SKILL.md](csharp-xunit/SKILL.md) |
|
|
19
19
|
| **mcp_dotnet** | Building, reviewing, or extending .NET MCP server tools, transports, and integration points | [SKILL.md](mcp_dotnet/SKILL.md) |
|