Imported from alexindima/food-diary (
Modules/Export/AGENTS.md). Install upstream withnpx skills add alexindima/food-diary --skill Export. Copyright stays with the author.
Export Logical Module Guidelines
Scope
Rules for Modules/Export/.
Boundary
- Own diary and cycle export queries, validation, file-result models, CSV generation, and export-specific adapter contracts.
- Consume Cycles and Meals only through their application-level read capabilities.
- Own PDF rendering, localized report text and the bounded, SSRF-protected image retrieval adapter in Infrastructure. Keep HTTP controllers and executable composition outside this module.
- Do not add Domain, persistence, storage, or background-processing projects without proven Export-owned state or adapters.
- Preserve current-user access checks, sensitive-cycle password re-verification, range and item limits, cancellation, file names, content types, and export ordering/semantics.
Tests
- Keep Export-owned application tests under
tests/FoodDiary.Modules.Export.Application.Tests. - Keep PDF rendering, resource contracts and remote-image transport tests under tests/FoodDiary.Modules.Export.Infrastructure.Tests. Keep HTTP, host, architecture, and cross-module integration coverage with their existing owners.
Verification
- Build:
dotnet build Modules/Export/Application/FoodDiary.Modules.Export.Application.csproj - Focused tests:
dotnet test Modules/Export/tests/FoodDiary.Modules.Export.Application.Tests/FoodDiary.Modules.Export.Application.Tests.csproj - Architecture:
dotnet test Tooling/tests/FoodDiary.ArchitectureTests/FoodDiary.ArchitectureTests.csproj
Use the canonical project name as the namespace root and match folders. Projects are siblings. Public owner use cases are Contracts requests dispatched through ISender; keep outbound source ports and reusable algorithms separate. Preserve authorization, cancellation, wire shapes and persistence semantics.