Skip to content

AI/copilot uplift#146

Open
chullybun wants to merge 19 commits into
release/4from
es/ai-agent-uplift
Open

AI/copilot uplift#146
chullybun wants to merge 19 commits into
release/4from
es/ai-agent-uplift

Conversation

@chullybun
Copy link
Copy Markdown
Collaborator

Review co-pilot instructions.
Review coreex.expect agent.
Add AGENTS.md to all packages.

Review coreex.expect agent.
Add AGENTS.md to all packages.
Copilot AI review requested due to automatic review settings May 27, 2026 17:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR uplifts the repository’s AI/developer guidance by packaging per-NuGet AGENTS.md files, expanding/refreshing Copilot instruction sets and skills documentation, and aligning sample contracts/documentation with the updated conventions.

Changes:

  • Pack per-package README.md and new AGENTS.md files into NuGet packages for AI tooling consumption.
  • Refresh .github/instructions/* guidance (services, repositories, validators, hosts, tests, subscribers, tooling) and update the coreex-expert agent source list.
  • Minor sample/doc updates (e.g., [Contract] on sample contracts; application-layer docs wording; various README touch-ups).

Reviewed changes

Copilot reviewed 53 out of 54 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/Directory.Build.props Packs per-package README.md + AGENTS.md into NuGet when present.
src/CoreEx/README.md Expands error/exception documentation and adds AI usage guide note.
src/CoreEx/AGENTS.md Adds CoreEx AI usage guide (exceptions, ExecutionContext, Result<T>, etc.).
src/CoreEx.Validation/README.md Adds AI usage guide note.
src/CoreEx.Validation/AGENTS.md Adds validation AI usage guide and examples.
src/CoreEx.UnitTesting/README.md Adds AI usage guide note.
src/CoreEx.UnitTesting/AGENTS.md Adds unit testing AI usage guide (expectations, seeding, etc.).
src/CoreEx.RefData/README.md Adds AI usage guide note.
src/CoreEx.RefData/AGENTS.md Adds reference data AI usage guide (CodeGen-first approach).
src/CoreEx.Events/README.md Adds AI usage guide note.
src/CoreEx.Events/AGENTS.md Adds events AI usage guide (outbox/queueing patterns).
src/CoreEx.EntityFrameworkCore/README.md Fixes a duplicated line and adds AI usage guide note.
src/CoreEx.EntityFrameworkCore/AGENTS.md Adds EF Core integration AI usage guide.
src/CoreEx.DomainDriven/README.md Adds AI usage guide note.
src/CoreEx.DomainDriven/AGENTS.md Adds DDD AI usage guide (entities/aggregates/persistence state).
src/CoreEx.Database/README.md Adds AI usage guide note.
src/CoreEx.Database/AGENTS.md Adds database AI usage guide (IDatabase/command/mappers/error conventions).
src/CoreEx.Database.SqlServer/README.md Adds AI usage guide note.
src/CoreEx.Database.SqlServer/AGENTS.md Adds SQL Server AI usage guide (session context/outbox).
src/CoreEx.Database.Postgres/README.md Adds AI usage guide note.
src/CoreEx.Database.Postgres/AGENTS.md Adds Postgres AI usage guide (outbox/error code conventions).
src/CoreEx.Data/README.md Adds AI usage guide note.
src/CoreEx.Data/AGENTS.md Adds data/UoW AI usage guide (TransactionAsync, QueryArgsConfig).
src/CoreEx.CodeGen/README.md Adds AI usage guide note.
src/CoreEx.CodeGen/AGENTS.md Adds CodeGen AI usage guide (ref-data yaml, generated ownership).
src/CoreEx.Caching.FusionCache/README.md Adds AI usage guide note.
src/CoreEx.Caching.FusionCache/AGENTS.md Adds FusionCache AI usage guide (IHybridCache, registration).
src/CoreEx.Azure.Messaging.ServiceBus/README.md Adds AI usage guide note.
src/CoreEx.Azure.Messaging.ServiceBus/AGENTS.md Adds Service Bus AI usage guide (publisher/subscribe host wiring).
src/CoreEx.AspNetCore/README.md Updates ValidationException HTTP mapping wording; adds AI usage guide note.
src/CoreEx.AspNetCore/Mvc/README.md Updates ValidationException mapping wording (422 → 400) in docs.
src/CoreEx.AspNetCore/AGENTS.md Adds ASP.NET Core AI usage guide (WebApi patterns, middleware order).
src/CoreEx.AspNetCore.NSwag/README.md Updates standard ProblemDetails response wording; adds AI usage guide note.
src/CoreEx.AspNetCore.NSwag/AGENTS.md Adds NSwag AI usage guide.
samples/src/Contoso.Products.Contracts/ProductReserve.cs Marks contract as [Contract] + partial.
samples/src/Contoso.Products.Contracts/ProductLite.cs Marks contract as [Contract] + partial.
samples/docs/application-layer.md Clarifies policy purpose (I/O-dependent guard logic).
.github/skills/add-capability/SKILL.md Points to updated tooling instruction doc.
.github/skills/add-capability/references/workflow.md Updates workflow reference to tooling instructions.
.github/namespace_readme_template.md Adds README authoring template for namespace docs.
.github/instructions/validators.instructions.md Expands validator guidance (base class choices, DI, dictionary validators, etc.).
.github/instructions/tooling.instructions.md Introduces combined *.CodeGen + *.Database tooling conventions doc.
.github/instructions/tests.instructions.md Updates testing conventions (outbox helpers, mocking, relay/subscribe patterns).
.github/instructions/repositories.instructions.md Expands infra guidance (EfDb patterns, mapping, adapters/typed clients, etc.).
.github/instructions/host-setup.instructions.md Significantly expands Program.cs host composition guidance by host type.
.github/instructions/event-subscribers.instructions.md Expands subscriber patterns, error handling, and Program.cs wiring guidance.
.github/instructions/domain.instructions.md Adds new domain-layer conventions doc.
.github/instructions/database-project.instructions.md Removes older DB-only conventions doc (replaced by tooling instructions).
.github/instructions/contracts.instructions.md Expands contract guidance (unified API/event surface, generated ownership).
.github/instructions/application-services.instructions.md Expands service orchestration guidance (TransactionAsync, adapters, policies, mapping).
.github/instructions/api-controllers.instructions.md Expands controller guidance (result-based variants, $query schema endpoint).
.github/INSTRUCTION_AUTHORING.md Major update: instruction authoring principles, formatting, and generated-code ownership.
.github/copilot-instructions.md Updates global conventions (layering, tooling, generated ownership, testing notes).
.github/agents/coreex-expert.agent.md Updates agent “sources of truth” list and operating rules.

Comment thread .github/instructions/tests.instructions.md Outdated
Comment thread .github/instructions/event-subscribers.instructions.md Outdated
Comment thread .github/instructions/tooling.instructions.md Outdated
Comment thread src/CoreEx.DomainDriven/AGENTS.md Outdated
Comment thread src/CoreEx.Validation/AGENTS.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Eric Sibly [chullybun] <eric@thesiblys.com>
Copilot AI review requested due to automatic review settings May 27, 2026 17:19
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Eric Sibly [chullybun] <eric@thesiblys.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 53 out of 54 changed files in this pull request and generated 4 comments.

Comment thread src/CoreEx.DomainDriven/AGENTS.md Outdated
Comment thread src/CoreEx.Validation/AGENTS.md
Comment thread .github/instructions/event-subscribers.instructions.md Outdated
Comment thread .github/instructions/coreex-tooling.instructions.md
Copilot AI review requested due to automatic review settings May 27, 2026 18:30
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 55 out of 56 changed files in this pull request and generated 10 comments.

Comment thread src/CoreEx.AspNetCore/Mvc/README.md Outdated
Comment thread src/CoreEx/README.md Outdated
Comment thread samples/src/Contoso.Products.Contracts/ProductLite.cs Outdated
Comment thread samples/src/Contoso.Products.Contracts/ProductReserve.cs Outdated
Comment thread .github/instructions/coreex-host-setup.instructions.md
Comment thread .github/instructions/coreex-tests.instructions.md
Comment thread .github/instructions/tests.instructions.md Outdated
Comment thread .github/instructions/event-subscribers.instructions.md Outdated
Comment thread src/Directory.Build.props Outdated
Comment thread .github/instructions/tooling.instructions.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Eric Sibly [chullybun] <eric@thesiblys.com>
Copilot AI review requested due to automatic review settings May 27, 2026 19:36
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Eric Sibly [chullybun] <eric@thesiblys.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 55 out of 56 changed files in this pull request and generated 5 comments.

Comment thread src/CoreEx.AspNetCore.NSwag/README.md Outdated
Comment thread .github/instructions/coreex-host-setup.instructions.md
Comment thread .github/instructions/coreex-host-setup.instructions.md
Comment thread .github/instructions/coreex-host-setup.instructions.md
Comment thread .github/instructions/coreex-contracts.instructions.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Eric Sibly [chullybun] <eric@thesiblys.com>
Copilot AI review requested due to automatic review settings May 27, 2026 19:42
chullybun and others added 3 commits May 27, 2026 12:43
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Eric Sibly [chullybun] <eric@thesiblys.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 53 out of 54 changed files in this pull request and generated 6 comments.

Comment thread .github/instructions/tooling.instructions.md Outdated
Comment thread .github/instructions/coreex-host-setup.instructions.md
Comment thread .github/instructions/coreex-tests.instructions.md
Comment thread .github/instructions/coreex-tests.instructions.md
Comment thread .github/instructions/coreex-host-setup.instructions.md
Comment thread .github/instructions/coreex-host-setup.instructions.md Outdated
Copilot AI review requested due to automatic review settings May 28, 2026 20:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 65 out of 66 changed files in this pull request and generated 6 comments.

Comment thread .github/agents/coreex-expert.agent.md Outdated
- `.github/instructions/coreex-contracts.instructions.md` — entity contracts, `[Contract]`, `[ReferenceData]`, source generation.
- `.github/instructions/coreex-domain.instructions.md` — DDD aggregates, `Entity<TId,TSelf>`, mutation guards, `Result<T>` pipelines.
- `.github/instructions/coreex-application-services.instructions.md` — service shape, `TransactionAsync`, validation-before-transaction, event enqueuing.
- `.github/instructions/coreex-validators.instructions.md` — `AbstractValidator<T>`, rule chains, `CommonValidator`, `ValidateAndThrowAsync`.
Comment on lines +27 to +32
- `.github/instructions/coreex-repositories.instructions.md` — `EfDbModel`, `IBiDirectionMapper`, `QueryArgsConfig`, paging.
- `.github/instructions/coreex-api-controllers.instructions.md` — controller shape, `WebApi` helpers, `[IdempotencyKey]`, PATCH.
- `.github/instructions/coreex-event-subscribers.instructions.md` — subscriber classes, `[Subscribe]`, `SubscribedManager`, error handling.
- `.github/instructions/coreex-host-setup.instructions.md` — `Program.cs` shape, middleware order, service registration, outbox relay hosts.
- `.github/instructions/coreex-tooling.instructions.md` — `*.CodeGen` and `*.Database` projects, `ref-data.yaml`, DbEx, generated-file ownership.
- `.github/instructions/coreex-tests.instructions.md` — `UnitTestEx`, `NUnit`, `AwesomeAssertions`, outbox/event expectations, seed data.
| `*.g.cs` (ref-data layer — controller, service, repository, mapper) | `*.CodeGen` project (CoreEx.CodeGen + `ref-data.yaml`) | `ref-data.yaml` config or the Handlebars templates in `CoreEx.CodeGen/RefData/Templates/` |
| `*.g.sql`, `*.g.pgsql`, `*DbContext.g.cs`, `Persistence/*.g.cs` | `*.Database` project (DbEx) | DbEx YAML config or SQL migration scripts |

See [INSTRUCTION_AUTHORING.md](.github/INSTRUCTION_AUTHORING.md#generated-code) for full generator ownership detail.
Comment on lines +139 to +141
## Non-Instruction Files in `.github/instructions/`

Not every file in this folder is an instruction file. `namespace_readme_template.md` is a copy/paste template used by skills and prompts — it has no `applyTo` frontmatter and is never auto-injected by Copilot. Do not add `applyTo` to it or restructure it to follow the instruction file format.
- [Host Setup Conventions](/.github/instructions/coreex-host-setup.instructions.md)
- [Event Subscriber Conventions](/.github/instructions/coreex-event-subscribers.instructions.md)
- [Application Service Conventions](/.github/instructions/coreex-application-services.instructions.md)
- [Developer Tooling Conventions](/.github/instructions/coreex-tooling.instructions.md)
Comment on lines 7 to +11
1. Instruction files in `/.github/instructions/`:
- `host-setup.instructions.md`
- `event-subscribers.instructions.md`
- `application-services.instructions.md`
- `database-project.instructions.md`
- `coreex-host-setup.instructions.md`
- `coreex-event-subscribers.instructions.md`
- `coreex-application-services.instructions.md`
- `coreex-tooling.instructions.md`
Copilot AI review requested due to automatic review settings May 29, 2026 14:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 72 out of 73 changed files in this pull request and generated 3 comments.

// Correct — no braces needed
if (product == null) return null;

// Correct — no braces needed - prefer muli-line bodies even when they fit on one line
Comment thread .editorconfig
Comment on lines +47 to +49
# Using directives — System.* first; no blank lines between groups.
dotnet_sort_system_directives_first = false
dotnet_separate_import_directive_groups = false
Comment on lines +99 to +103
- Do not add separate per-feature test packages (e.g. `CoreEx.UnitTesting.Events`) — they do not exist; all test helpers are in this package.
- Do not use `ExpectSqlServerOutboxEvents` for a PostgreSQL domain or vice versa.
- Do not call `PublishAsync()` in tests — the `EventPublisherDecorator` (registered by `UseExpectedEventPublisher`) captures events automatically.
- Do not forget `await Test.ClearFusionCacheAsync()` in `[OneTimeSetUp]` for tests involving cached reference data.
- Do not use FluentAssertions — the CoreEx test framework uses AwesomeAssertions (`AwesomeAssertions` NuGet package).
Copilot AI review requested due to automatic review settings May 29, 2026 17:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 167 out of 174 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

.github/templates/domain/Infrastructure/_shared/Repositories/EntityRepository.cs.template:34

  • Contracts.{Entity}Lite includes CustomerId, but the query projection no longer populates it, so list endpoints will return null CustomerId values despite filtering/sorting on it.

Comment on lines +5 to +9
builder.Services
.AddSqlServerDatabase()
.AddSqlServerUnitOfWork()
.AddSqlServerOutboxPublisher()
.AddSqlServerEfDb<{Domain}EfDb>();
Comment on lines +5 to +9
builder.Services
.AddPostgresDatabase()
.AddPostgresUnitOfWork()
.AddPostgresOutboxPublisher()
.AddPostgresEfDb<{Domain}EfDb>();
Comment on lines +37 to +42
var result = await entities.Where(parsed).OrderBy(parsed).ToMappedItemsResultAsync(x => new Contracts.{Entity}Lite
{
Id = x.Id,
StatusCode = x.StatusCode,
ChangeLog = new ChangeLog { CreatedBy = x.CreatedBy, CreatedOn = x.CreatedOn, UpdatedBy = x.UpdatedBy, UpdatedOn = x.UpdatedOn }
}, paging).ConfigureAwait(false);
Comment on lines +14 to +17
{
var aggregate = Create();
// TODO: set properties, validate, record domain events
return aggregate;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants