This file defines repository-wide guidance for the SoundSwitch workspace. More specific AGENTS.md files in subdirectories override or extend this guidance for their own areas.
- Primary language: C#
- Platform: .NET on Windows
- UI stack: WinForms desktop application
- Main solution entry point:
SoundSwitch.sln
SoundSwitch/: main WinForms application, localization, framework, services, UI, and application modelSoundSwitch.Audio.Manager/: Windows audio device management and policy switchingSoundSwitch.Common/: shared code used across projectsSoundSwitch.CLI/: command-line entry points and automation surfaceSoundSwitch.IPC/: inter-process communication componentsSoundSwitch.UI.Menu/andSoundSwitch.UI.UserControls/: UI-focused reusable componentsSoundSwitch.Tests/andSoundSwitch.Audio.Manager.Tests/: automated regression coverage
- Keep changes consistent with an existing C#/.NET codebase; prefer small, targeted fixes over broad refactors.
- Treat this repository as a Windows desktop app first; avoid introducing cross-platform assumptions into WinForms and Windows integration code.
- Keep user-facing strings in localization resources instead of hardcoded literals.
- Preserve existing public behavior unless the change explicitly intends to alter it.
- Prefer
NameCleanover raw device names when dealing with displayed audio device names.
Apply DRY > SOLID > KISS in that priority order when they conflict. The detailed guidance lives in the repo skill .opencode/skills/dry-solid-kiss/SKILL.md; load the dry-solid-kiss skill when implementing, refactoring, or reviewing code.
Significant changes (new/reworked user-facing features, cross-project changes, schema migrations, or changes with real design alternatives) get an ADR under docs/design/<topic>/<YYYY-MM-DD>-<slug>.md before implementation. Load the design-docs skill (.opencode/skills/design-docs/SKILL.md; template at TEMPLATE.md) when the user asks for an ADR or when planning such a change. When implementing a change that already has an ADR, read the ADR first and keep it current in the same PR.
To answer and close out GitHub review threads (CodeRabbit, Kody, or human), load the answer-pull-request-reviews skill (.agents/skills/answer-pull-request-reviews/SKILL.md); it drives tools/Review-Threads.ps1 to list threads via the gh CLI, decide fix-vs-push-back per thread, then reply and resolve until zero remain.
When a change alters what a user sees or does — a new setting, tab, button, default, trigger, or notification behaviour — update the matching website pages and screenshots in the same change. Docs drift counts as an incomplete change, not a follow-up. The detailed workflow lives in the repo skill .opencode/skills/documentation-sync/SKILL.md; load the documentation-sync skill when implementing or reviewing a user-visible feature.
- Website pages live in
website/src/**/*.md; validate withcd website && npm run docs:build. - Screenshots live in
img/Documentation/**and are exposed to the site as/images/through the symlinkwebsite/src/.vuepress/public/images. Update the PNG once there and both the website and the rootREADME.mdpick it up. - Capture screenshots with automation, never a manual full-screen grab:
pwsh tools/Capture-DocumentationScreenshot.ps1 -Name Notifications -Tab Notifications.
- Use conventional commits for commit messages.
- Follow the repository semantic-release config in
package.jsonrather than generic conventional-commit defaults. - Release-relevant commit types are
feat,fix,perf,lang, andboost. featproduces a minor release;fix,perf,lang,boost, andrevertproduce a patch release; breaking changes produce a major release.testsis recognized in generated release notes, but it does not trigger a release on its own.- Scoped or module-style commit messages are encouraged when useful, for example
fix(localization): ...orfeat(audio-manager): .... - Keep the subject concise and focused on the user-visible or engineering outcome.
For additional developer-focused documentation — including build instructions, contribution guidelines, architecture overviews, and deep dives into specific components — see the docs/ folder:
- Building SoundSwitch — Setup, build commands, and CI/CD pipeline.
- Contributing — Standards, commit conventions, and PR process.
- Architecture Overview — Project structure and key layers.
- Banner Manager — Deep dive into the microphone mute banner subsystem.
- Default validation (Windows):
dotnet build SoundSwitch.sln -c Debug - Linux validation: the full solution cannot build on Linux (CsWinRT projection generation in
SoundSwitch.Audio.Managerrequires Windows). Validate compile changes with:dotnet build SoundSwitch/SoundSwitch.csproj -c Debug -p:LinuxBuild=true -p:BuildProjectReferences=falseLinuxBuild=true(defined inDirectory.Build.props) enablesEnableWindowsTargetingand skips the PowerShell-basedPatchLocalizedResourceDesignersprebuild target, which is safe because the patched*.Designer.csfiles are committed. - Run targeted tests for the area you change, and at minimum run the related test project when changing shared logic (Windows only).