opensquad / rules
Cursor rule9 starsChanged 3 months agoMITView on GitHub
Desktop app fixes must pass a local packaged build smoke test before pushing release tags or CI desktop builds.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,371 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- .cursor/rules/branch-dev-main.mdcCursor rule
- .cursor/rules/opensquad-ui.mdcCursor rule
The file
We split this desktop-release-gate.mdc into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
When fixing or changing the packaged OpenSquad desktop app (Electron, PyInstaller backend, tray/icons, startup, auto-update):
- Very specific: line 23
Full packaged build: when changing Electron/UI/installer (preferred one-shot):
- Very specific: line 38
Only then: commit → merge main → push tag or trigger build-desktop.yml.
- Distinctive: line 40
Do not push a release tag or ask the user to install from CI as the first verification step for desktop startup/UI bugs.
- Very specific: line 55
Never: place Electron/release* trees under src/opensquad/build/ — PyInstaller collect_data_files("opensquad") used to nest them into …
- Very specific: line 65
Use full scripts\build_desktop.ps1 (or electron:win after build_backend.bat) before any release/tag push.
≈ “Common” is an estimate: at least 1 in 5 of the 7,324 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: Desktop app fixes must pass a local packaged build smoke test before pushing release tags or CI desktop builds.
globs: src/opensquad/gateway/nexuschat-pro/**,src/opensquad/gateway/backend/**,scripts/build_backend.*,scripts/build_desktop.*,scripts/check_backend_bundle.py
alwaysApply: false
---
# Desktop release gate (local first)
When fixing or changing the **packaged** OpenSquad desktop app (Electron, PyInstaller
backend, tray/icons, startup, auto-update):
## Required before push / tag / `build-desktop` CI
1. **Unit/smoke tests** — run the ci-fast subset (`ruff`, targeted `pytest`, `npm run build`).
2. **Local backend build + frozen smokes** (Windows; ~5 min + ~30 s):
```powershell
scripts\build_backend.bat
uv run python scripts\check_backend_bundle.py
uv run python scripts\smoke_frozen_all.py
```
This catches import-time writes, nested `opensquad/build` pollution, and
workspace path bugs **without** waiting for Electron/Setup.
3. **Full packaged build** when changing Electron/UI/installer (preferred one-shot):
```powershell
powershell -ExecutionPolicy Bypass -File scripts\build_desktop.ps1
```
Or backend-only then Electron:
```powershell
scripts\build_backend.bat
cd src\opensquad\gateway\nexuschat-pro
npm ci
npm run electron:win
```
4. **Manual smoke test** of the produced installer or portable exe (when shipping UI/installer changes):
- App window shows UI (not blank / not stuck on “Starting…”)
- Tray icon visible
- No “Backend did not start in time” dialog
5. Only then: commit → merge `main` → push tag or trigger `build-desktop.yml`.
Do **not** push a release tag or ask the user to install from CI as the first
verification step for desktop startup/UI bugs.
## Windows local build (mirrors CI)
From repo root:
```powershell
uv sync --python 3.11
powershell -ExecutionPolicy Bypass -File scripts\build_desktop.ps1
```
Installers land in `build/release/` (e.g. `OpenSquad-*-win-x64-Setup.exe` or
`*-Portable.exe`). Run one and confirm the above smoke checks.
**Never** place Electron/`release*` trees under `src/opensquad/build/` — PyInstaller
`collect_data_files("opensquad")` used to nest them into `run.exe` (~400MB+).
Official output is always repo-root `build/release/`.
## Faster iteration (code-only, not a release gate)
- `npm run build && node scripts/compile-electron.mjs` — compile frontend + main process
- `npm run electron:dev:fast` — needs pre-built backend in `resources/` or `build/backend-win/`
- Dev stack hygiene: `scripts\dev_stack.ps1` (dedupe 9555/9600, verify editable `src/opensquad`)
Use full `scripts\build_desktop.ps1` (or `electron:win` after `build_backend.bat`) before any release/tag push.
## CI after local pass
- **New release**: merge to `main`, tag `vX.Y.Z`, push tag (triggers Release + Build Desktop App).
- **Refresh existing release assets**: `gh workflow run build-desktop.yml --ref main -f release_tag=vX.Y.Z`
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

