Standing rules for AI agents (and anyone) working in this repository.
The bin\Release output folders (in any project: SimpleLauncher, SimpleLauncher.Core,
SimpleLauncher.Avalonia, SimpleLauncher.Avalonia.Updater, Tools\*, etc.) contain the
built release artifacts used for packaging and publishing. They are intentionally kept on
disk.
Rules:
- NEVER delete, move, rename, or clean files inside any
bin\Releasefolder — not individually, not with recursive cleanup, not withgit clean,dotnet clean,rm -rf,rd /s, or any other bulk operation. bin\Releasefolders are never to be touched by cleanup scripts or agents, even when asked to "clean the build output" or "remove build artifacts" — if such a request comes in, clarify it first (the requestor almost certainly meansbin\Debug/obj, or nothing at all).- If a task requires a fresh release build, rebuild over the existing
bin\Releaseoutput (dotnet build -c Releaseordotnet publish) — do not delete it first. - Deleting
bin\Debug,obj, orbin\Release\...content that the task itself just created during the same session is allowed, but only that. - These folders are gitignored (
[Bb]in/), so git operations will never touch them; the rule protects against direct filesystem operations.
- CI scope: GitHub Actions builds, packages releases and deploys docs — it never runs tests.
.github/workflows/ci.yml- build-only on pushes tomaster(non-docs paths) and PRs: the Avalonia-firstSimpleLauncher.slnDebug and Release builds onwindows-latest+ Avalonianet11.0Debug/Release and the updaternet11.0build onubuntu-latest. Builds pass-warnaserror, so the 0-warning policy is enforced. Never add tests to it. The WPF reference (SimpleLauncher.Wpf.Reference.sln) is deliberately not built by CI; build it locally when changing the reference implementation or shared Core code..github/workflows/package-dry-run.yml— packages every release asset exactly like the release workflow (version read fromSimpleLauncher.csproj): Windows bundles and per-user Inno Setup installers onwindows-latest; portable ZIP/tar.gz + AppImage/Flatpak for both Linux RIDs onubuntu-latest; the arm64 DMG onmacos-15; then verifies the archives, the installers, executable bits, AppImage architectures, Flatpak commits and the DMG bundle layout, but never creates or updates a GitHub release. Runs on PRs/pushes touching the app projects or packaging scripts, and on manual dispatch..github/workflows/release.yml- manual (workflow_dispatch); packages the Avalonia-only Windows bundle forwin-x64/win-arm64viascripts/package-release.ps1 -BuildInstalleronwindows-latest(Chocolatey installs Inno Setup 6.5+), and every Linux bundle forlinux-x64/linux-arm64onubuntu-latest: portablerelease_{version}_{rid}.zip+release_{version}_{rid}.tar.gzand updater ZIPs viascripts/package-release-linux.ps1, plus self-containedSimpleLauncher-{version}-{rid}.AppImageand.flatpakviascripts/package-linux-native.sh. On Windows the payload is the Avalonia app renamed toSimpleLauncher.exe(framework-dependent); the WPF project stays in the source tree as the reference implementation (separateSimpleLauncher.Wpf.Reference.sln) but is not built by CI, published or bundled. The workflow also shipsSimpleLauncher-{version}-win-{x64,arm64}-setup.exewith the .NET 11 bootstrap; the portable Linux formats require the .NET 11 runtime, while AppImage/Flatpak bundle it. The same workflow builds the macOS Apple Silicon DMG onmacos-15(arm64) viascripts/package-release-macos.ps1. A publish job then creates/updates the GitHub release (withSHA256SUMS.txt) and mirrors every asset (including the DMG and the macOS Easy Mode catalog) to R2..github/workflows/docs.yml— ondocs/**pushes tomaster; deploys GitHub Pages fromdocs/and syncs the wiki viascripts/sync-wiki.py(needs theWIKI_PATsecret, skipped with a warning when absent).- Verification stays local:
dotnet build/dotnet testper project on Windows (plus WSL2 for the Linux paths), because the suites include live endpoints and real app launches. macOS binaries are validated on the rented NoMac host (seeAGENTS.local.md).
- macOS distribution format: the macOS release is one unsigned Apple Silicon DMG
(
SimpleLauncher-{version}-osx-arm64.dmg) built onmacos-15fromSimpleLauncher.Avaloniaself-contained. It is ad-hoc signed only (codesign -s -) — never add notarization or an Apple Developer certificate without the admin's explicit approval. The bundle ships no bundled helper payloads and noUpdater: macOS updates install the next DMG manually, andPackagingEnvironment.UpdatesManagedExternallykeeps the in-app updater off. The DMG andeasymode_macos_arm64.xmlare mirrored to R2 byscripts/publish-fallback-r2.ps1; never drop the Apple Silicon artifact from the release workflow or the publisher. - Linux distribution formats: every Linux release ships four formats for both RIDs —
portable ZIP, portable tar.gz, AppImage and Flatpak. The AppImage/Flatpak are
self-contained; the portable formats stay framework-dependent. AppImage self-updates by
replacing the outer file (
APPIMAGE), Flatpak defers to the software center for repository installs (or a newer.flatpakreinstall) and launches host emulators throughflatpak-spawn --host, and portable installs keep the existing Updater. Never drop a format or an architecture from the release workflow or the R2 publisher (scripts/publish-fallback-r2.ps1) without updating both. - Fast/slow test split (no filtering): the suites are split by project, never by
[Trait]/filter. The main solution's fast suite isSimpleLauncher.Avalonia.Tests; its slow suite isSimpleLauncher.Avalonia.SlowTests(cross-platform mount extraction/guards). The WPF reference keepsSimpleLauncher.Tests(fast; app/Core/reference coverage) andSimpleLauncher.SlowTests(app-launch language checks, real ZIP/CHD mounts, live-endpoint suites); run those when changing the WPF reference or shared Core behavior, and before a deploy. Every test in a project always runs unfiltered withdotnet test- never add a filter, quarantine, runtime skip, or exclusion mechanism for flaky tests. Run only the fast suites during iteration; run the slow suites only before a deploy or when the admin explicitly asks for them - never as part of routine iteration or verification. - Bug reports: the
BugReportApiSinksends Warning+ log events to the bug-report API. Expected user-error conditions (missing files, rate limits, timeouts, unsupported input) must be logged at Information level, not Warning/Error, so they are never reported as bugs. - Audio never blocks the UI thread:
PlaySoundEffectsowns a dedicated background thread; callers only enqueue a request (newest wins). Never call NAudioInit/Play/Stop/Disposeon the UI thread —Stop/Disposejoin the playback thread, and one wedged ALSA/PipeWire stop froze the whole app (BUG-19).Disposemust never join the audio thread. Regression guard:PlaySound_WhenAudioStopBlocks_DoesNotBlockCallerOrDispose. - Accessibility instrumentation: every interactive control must expose an accessible name so
screen readers (Narrator/NVDA on Windows, Orca on Linux) and the AT-SPI GUI-test harness can
identify it. Use
AutomationProperties.Name(Avalonia.Automationin Avalonia, the WPF equivalent in WPF); buttons whoseContentis literal text are exempt because the text becomes the name. Inputs, sliders, DataGrids and status/progress elements also getAutomationProperties.AutomationId(stable PascalCase, mirrorx:Namewhen present) andAutomationProperties.LiveSetting="Polite"when they report changing status. Do not name decorative TextBlocks/images. Guardrails:AvaloniaAccessibilityTests(Avalonia) andWpfAccessibilityTests(WPF) fail on missing names — never weaken, filter or skip them. - Tooltips reuse accessible names: the Avalonia theme binds
ToolTip.TiptoAutomationProperties.Namefor every control, and WPF'sAccessibilityToolTipServicedoes the same onLoaded(falling back to help text/literal content). Do not duplicate the text in each view; add the accessible name and the tooltip follows. - Serilog is the only logging pipeline: never add a custom file/console logger or a second
bug-report client. Warning+ events flow through
BugReportApiSinkto the bug-report API, and every report must contain the full environment block (Date,Application Name,Application Version,OS Version,Architecture,Bitness,Windows, Linux or MacOsX Version,Processor Count,Base Directory,Temp Path), the error message and the full inner-exception chain. Expected user conditions stay at Information. - Async naming and docs: Task/ValueTask-returning methods end with
Async; async-void event handlers keep their framework names but must catch and log. Document every public type/member —GenerateDocumentationFileis enabled in Core, WPF, Avalonia and the updater, so a missing XML comment fails the warning-free build.
- Windows (per project):
dotnet build <proj>.csproj -c Debug(or-c Release) - expect 0 warnings / 0 errors. - Main solution (Avalonia-first):
dotnet build SimpleLauncher.sln -c Debug(and-c Release). - WPF reference:
dotnet build SimpleLauncher.Wpf.Reference.sln -c Debug(and-c Release). - Fast suites (run during iteration):
dotnet test SimpleLauncher.Avalonia.Tests/SimpleLauncher.Avalonia.Tests.csproj(~75 s) - the main fast suite, including the shared version/appsettings/localization guards.dotnet test SimpleLauncher.Tests/SimpleLauncher.Tests.csproj(~70 s) - the WPF reference suite; run it when the reference or shared Core code changes.
- Slow suites (do not run during iteration - only before a deploy or when the admin explicitly
asks for them):
dotnet test SimpleLauncher.Avalonia.SlowTests/SimpleLauncher.Avalonia.SlowTests.csproj(~1 s) - cross-platform mount extraction fallback and platform guards.dotnet test SimpleLauncher.SlowTests/SimpleLauncher.SlowTests.csproj(~3.5 min) - WPF reference: launchesSimpleLauncher.exefor the language checks (no other SimpleLauncher instance may run), mounts real ZIP/CHD images (needs Dokan + the bundled mount tools; skips cleanly when the images/tools are absent) and hits the live GitHub/PureLogicCode endpoints.
Drive C: on the development machine is nearly full, so all test runs must use drive D for
temporary files. Set TEMP and TMP in the same shell session as dotnet test, for example:
$env:TEMP = 'D:\Temp\opencode\test-temp'
$env:TMP = $env:TEMP
dotnet test SimpleLauncher.Avalonia.Tests/SimpleLauncher.Avalonia.Tests.csprojUse separate subdirectories when running suites in parallel and remove them afterwards.
Do not redirect TEMP/TMP for dotnet build / dotnet publish: WPF's generated
_wpftmp XAML project stops resolving its generated members when the temp path is moved.
Builds use the normal temp path; only test execution uses drive D.
- Version metadata is centralized:
SimpleLauncher/SimpleLauncher.csprojremains canonical while the WPF reference is kept;SimpleLauncher.Core.csproj,SimpleLauncher/app.manifest, the Avalonia csproj/manifest andSimpleLauncher.Avalonia.Updater.csprojmust stay in sync (VersionConsistencyTestsinSimpleLauncher.Avalonia.Testsenforces and auto-corrects this). Packaging scripts also read the canonical WPF csproj. The twoappsettings.jsonfiles must stay identical even though the Windows bundle ships only the Avalonia copy (AppSettingsFilesAreIdenticalenforces this). Moving the canonical version source to the Avalonia csproj is a separate change.
Six environments are available for validating the app. No access detail (address, user,
password, key, token) is stored in this repository: the single source is the out-of-repo file
%USERPROFILE%\.secrets\CONNECTIONS.md (when present — otherwise ask the admin for access). Read
it before touching any host and never copy values from it into a commit, issue, log or chat. This
machine's resume state stays in AGENTS.local.md.
| Environment | OS / arch | What it is for |
|---|---|---|
This PC (PETERSONPC) |
Windows 11 x64 | build, WPF reference app, fast suites, packaging, control plane |
linuxgpu |
Linux Mint x64 (LAN, bare metal) | real X11 + AT-SPI automation, FUSE mounts, real ROM library |
LinuxMint Hyper-V VM |
Linux Mint x64 | full GUI harness suite (scripts\gui-test-harness\), fixtures, emulator matrix |
linuxarm-test |
Ubuntu 24.04 aarch64 (Azure) | Linux arm64 bundles, AppImage/Flatpak runtime checks |
winarm-test |
Windows 11 ARM64 (Azure) | Windows arm64 launch checks |
| NoMac cloud Mac | macOS arm64 (Apple Silicon) | DMG build, .app launch, Avalonia tests on macOS |
Rules:
- The Azure hosts are deallocated by default and have no public IP. Start/stop them with
C:\Sincronizar\ArmHosts\ArmHost.ps1 <linux|windows> start|stop|status; alwaysstopwhen the session ends (compute and public-IP billing stop at deallocation; the OS disk keeps billing). - The NoMac Mac bills per minute:
npx -y @nomac/cli@0.27.3 stopwhen done. Only~/drivepersists between sessions. - Framework-dependent Linux/macOS publishes need the .NET 11 runtime on the target; the Hyper-V VM
has no SDK/runtime, so deploy a self-contained
linux-x64publish there. - SSH to
winarm-testlands in session 0: launch GUI checks withschtasks /IT /RU azureuser(autologon keeps the console session alive) and wrap helpers in a hidden.vbs. - Exact deploy commands, publish flags and per-host caveats are in
%USERPROFILE%\.secrets\CONNECTIONS.md§2–§6.
The in-app update fallback (https://assets.purelogiccode.com/Simple%20Launcher/Simple%20Launcher/)
is served from the Cloudflare R2 bucket simplelauncher-thumbnails under the prefix
Simple Launcher/Simple Launcher/.
- After local packaging, publish the fallback copy with:
pwsh scripts/publish-fallback-r2.ps1 -Version <version>Build the Windows installers first (pwsh scripts/package-release.ps1 -Version <version> -BuildInstaller); the publisher requires them alongside the portable bundles. - The script uploads the four
release_{version}_{rid}.zipand fourupdater_{rid}.zipassets, the twoSimpleLauncher-{version}-win-{x64,arm64}-setup.exeinstallers, the Linux tar.gz/AppImage/Flatpak bundles, the Apple SiliconSimpleLauncher-{version}-osx-arm64.dmg,easymode_macos_arm64.xmland (when present)SHA256SUMS.txt, verifies their public URLs, and updatesversion.txtlast — never updateversion.txtbefore all bundles exist. - R2 credentials live in the
R2_*user environment variables (moved out ofAGENTS.local.mdon 2026-11-20;-CredentialFilestill accepts a gitignored ini-style file). Never commit them; the host/key map is in%USERPROFILE%\.secrets\CONNECTIONS.md§7.-DryRunprints the upload plan without touching R2. - The manual
release.ymlworkflow runs the publisher automatically after creating/updating the GitHub release, using theR2_*repository secrets. Local/manual releases still require the script to be run explicitly.
The Avalonia/Linux manual checklist (docs/manual-tests.md) is exercised automatically on a
Hyper-V Linux VM by the harness tracked in scripts\gui-test-harness\. The portable manual
(prerequisites, configuration, fixture contract, scenario authoring, troubleshooting) is
docs/gui-test-harness.md; the live scenario inventory and session state are in ManualTests.md.
Machine-specific details (VM IP/credentials, host share paths) and the current resume checklist
are kept local only in AGENTS.local.md, which is gitignored — when present, read it before
starting a GUI-test session. Host access and the per-host deploy/test workflow are in the
out-of-repo %USERPROFILE%\.secrets\CONNECTIONS.md (§3 for the VM).