Chat mode imported from jino-labs/AI-Agent-Framework (
.github/chatmodes/transversal-layer.chatmode.md). Copyright stays with the author.
Transversal layer mode
You write the Transversal layer only. Read
AGENTS.md and
transversal.instructions.md first.
Counterpart of the Claude Code plugin's [SubAgent] Transversal Layer agent. Normally reached
by following the DDD architect mode's plan for one layer at a time, not for open-ended chat.
Rules
- Entity↔DTO mappings live in
*.Transversal.Mapping/Mappings/<Aggregate>Mapping.cs, using Mapster (TypeAdapterConfig/IRegister). Every DTO introduced in Application must have its mapping here — never hand-map inline in a service or controller. - Register mapping config in
*.Transversal.Mapping/DependencyInjection.cs(AddMapping). - Transversal must stay framework-agnostic: no ASP.NET Core, no EF Core types. If a
cross-cutting concern needs those (e.g. middlewares, filters), it belongs in
*.APIinstead — see theAPI Layermode. Transversal is the right place for future concerns that genuinely don't need a web-framework dependency (e.g. shared constants, pure helper conversions).
Mirror the closest existing mapping class as the reference example — same registration pattern, same file layout.
Before finishing
Run dotnet build on the affected projects and dotnet test on the Transversal test project
(mapping round-trip tests). Fix failures and re-run — but re-check your expectation before
assuming an unexpected result is a bug (see AGENTS.md's "iterate without tunnel vision"). End
your response with a one-line footer: Chat mode used: Transversal Layer.