optimizerDuck/: main WPF app (net10.0-windows), organized by responsibility:Domain/for models/abstractions/attributes.Services/for system, optimization, feature, and configuration logic.UI/for XAML pages, dialogs, windows, controls, and ViewModels.Resources/for images and localization (Resources/Languages/*.resx).
optimizerDuck.Test/: xUnit v3 unit tests, mirroring service/execution areas..github/: CI, issue templates, PR template, and project policies.publish.bat: interactive/preset publish entry point (PortableorSingle).
dotnet restore optimizerDuck.slnx: restore dependencies.dotnet build optimizerDuck.slnx --configuration Release --no-restore: CI-aligned build.dotnet test optimizerDuck.Test/optimizerDuck.Test.csproj --configuration Release --no-build: run unit tests.dotnet run --project optimizerDuck/optimizerDuck.csproj: run locally.publish.bat portableorpublish.bat single --skip-tests: create release artifacts.
- Use modern C# with nullable references enabled; prefer DI over direct service construction.
- Indentation: 4 spaces; keep formatting consistent with existing file-scoped namespace style.
- Naming:
- Types/methods/properties:
PascalCase. - Private fields:
_camelCase. - Locals/parameters:
camelCase.
- Types/methods/properties:
- Do not hardcode user-facing strings; add keys to
Translations.resxand related locale files.
- Framework: xUnit v3 (
[Fact]tests inoptimizerDuck.Test). - Name tests using behavior-focused patterns such as
ApplyAsync_Success_PersistsRevertDataFile. - Add/update tests for changes in
Services/, optimization execution flow, and revert behavior. - No explicit coverage gate is enforced in CI; prioritize meaningful unit coverage for changed logic.
- Follow Conventional Commits used in history:
feat:,fix:,refactor:,docs:,test:,i18n:,chore:. - Branch from
master(feature/<name>orfix/<issue-id>). - PRs should include: clear description, linked issue (
Closes #123), passingdotnet build/dotnet test, and screenshot/GIF for UI changes.
- Never commit secrets or machine-specific paths.
- For security issues, use private disclosure via
.github/SECURITY.mdguidance (not public issues).