docs: strengthen rule 55 — single atomic kill→launch, no exceptions

This commit is contained in:
Hibryda 2026-03-22 12:44:39 +01:00
parent d8b831089a
commit f1f965f8b2

View file

@ -1,12 +1,22 @@
# Deployment Cleanup
# Deployment Cleanup (MANDATORY)
Before launching any app (Electrobun, Tauri, GPUI, Dioxus), always kill previous instances first.
**ALWAYS kill previous instances before launching a new one. NO EXCEPTIONS.**
## The One Command
Use `scripts/launch.sh` for ALL app launches. It handles kill → build → launch atomically.
If not using the script, run this EXACT sequence in a SINGLE bash command:
```bash
pkill -f "launcher|AgentOrchestrator|agor-ptyd|vite.*9760" 2>/dev/null; fuser -k 9760/tcp 2>/dev/null; sleep 2 && ./agor-pty/target/release/agor-ptyd &>/dev/null & sleep 1 && cd ui-electrobun && npx vite dev --port 9760 --host localhost &>/dev/null & sleep 3 && ./node_modules/.bin/electrobun dev &
```
## Rules
- Before `electrobun dev` or any app launch: `pkill -f "launcher\|AgentOrchestrator\|agor-ptyd" 2>/dev/null; sleep 1`
- Before `npm run tauri dev`: kill existing tauri processes
- Before launching GPUI/Dioxus prototypes: `pkill -f "agor-gpui\|agor-dioxus" 2>/dev/null`
- Check for port conflicts: verify the target port is free before binding
- Never leave orphaned daemon processes (agor-ptyd) running after testing
- When rebuilding: kill → build → launch (in that order, never launch before kill)
- **NEVER** launch without killing first — this causes duplicate windows
- **NEVER** split kill and launch into separate bash calls — the `cd` between them breaks the path
- Kill command MUST include: launcher, AgentOrchestrator, agor-ptyd, vite port 9760
- Free port 9760 with `fuser -k` before starting Vite
- Wait 2s after kill before launching (process cleanup time)
- The `electrobun dev` command MUST run from `ui-electrobun/` directory