Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
chore: keep the worktree's npm run dev up until the after-change merge is pushed
leepokai7b1a1ab47387
diff --git a/.claude/workflows/after-change.js b/.claude/workflows/after-change.jsindex fcad4471..f3d2a13f 100644--- a/.claude/workflows/after-change.js+++ b/.claude/workflows/after-change.js@@ -7,7 +7,6 @@ export const meta = {{ title: 'Fix', detail: 'confirmed findings, then e2e failures' },{ title: 'E2E', detail: 'the changed flows on the real apps' },{ title: 'Cleanup', detail: 'cleanup edits and a read-only refactor review, then the refactors worth doing' },- { title: 'Finish', detail: 'stop the worktree\'s npm run dev, sandbox host and Electron' },],}@@ -112,7 +111,7 @@ const reviewFix = confirmed.length ? await fix('review findings', confirmed) : nconst walk = (round) => agent(`End-to-end test a code change on the real apps, ${e2e} e2e as CLAUDE.md "End-to-end test every change" defines it (minimal: only this computer's platform; full: also Lima Linux and the UTM Windows VM, skipping and reporting a VM that isn't installed).${scope}-Walk the flows the change touches, as a person would, and note what you saw. Stop the old build before installing the new one. In this worktree \`npm run dev\` in apps/desktop runs an isolated sandbox (docs/guides/dev-app.md#worktree-sandboxes); never stop or replace the shared Codync Dev, the production Codync app or another session's sandbox, and stop everything you started when done. A change with nothing to walk (CI, tools, docs) reports one not_run check saying so.${round > 1 ? ' This is the second walk, after fixes for the failures of the first.' : ''}`,+Walk the flows the change touches, as a person would, and note what you saw. Stop the old build before installing the new one. In this worktree \`npm run dev\` in apps/desktop runs an isolated sandbox (docs/guides/dev-app.md#worktree-sandboxes); never stop or replace the shared Codync Dev, the production Codync app or another session's sandbox, and when done leave this worktree's `npm run dev` running (it is stopped after the merge) but stop anything else you started. A change with nothing to walk (CI, tools, docs) reports one not_run check saying so.${round > 1 ? ' This is the second walk, after fixes for the failures of the first.' : ''}`,{ label: `e2e:${round}`, phase: 'E2E', schema: CHECKS })phase('E2E')@@ -140,16 +139,10 @@ ${scope}${JSON.stringify(refactors, null, 2)}`, { label: 'apply-refactors', phase: 'Cleanup', schema: FIXED }): null-phase('Finish')-const stopped = await agent(`Stop every process this worktree started: \`npm run dev\` (apps/desktop tools/dev.mjs), its Vite, its Electron app and its sandbox host. Find them with \`ps\`/\`lsof\` by this worktree's path in their command line or cwd, stop them, then check that none remain. Never stop processes of the main checkout, another worktree, the shared Codync Dev or the production Codync app.-${scope}-Return what you stopped, one line each, or that nothing was running.`, { label: 'stop-dev', phase: 'Finish', effort: 'low' })-return {review: { found: found.length, confirmed, refuted, fix: reviewFix },e2e: { checks: walked?.checks ?? [], fix: e2eFix },cleanup,refactor: { suggested: refactors, applied },- stopped,- next: 'Unless an e2e check failed or a skipped fix matters: commit in this worktree, rebase on origin/dev, fast-forward dev, push origin dev, pull dev in the main checkout. Only once that merge is pushed (never before, and not at all if the merge or push fails), leave the worktree and, from the main checkout, delete it: `git worktree remove --force <worktree>`, `git branch -D <branch>`, then `npm run dev -- --prune` in apps/desktop. Check that no `npm run dev` from it is still running.',+ next: 'Unless an e2e check failed or a skipped fix matters: commit in this worktree, rebase on origin/dev, fast-forward dev, push origin dev, pull dev in the main checkout. Only once that merge is pushed (never before, and not at all if the merge or push fails): stop this worktree\'s `npm run dev` (its Vite, Electron app and sandbox host) and check none of it remains, then leave the worktree and, from the main checkout, delete it: `git worktree remove --force <worktree>`, `git branch -D <branch>`, then `npm run dev -- --prune` in apps/desktop.',}diff --git a/CLAUDE.md b/CLAUDE.mdindex 394fb911..3ce82e01 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -17,7 +17,7 @@ Bot-based remote for coding agents: persistent named bots on your computer, mess## Clean code- Keep code modular and clean on every change: reuse before writing, one responsibility per file/type, no new code appended to files past ~500 lines (split first), views/components hold no I/O or logic, short single-purpose functions, enums over flags, no dead code, no swallowed errors. Full rules: [docs/guides/clean-code.md](docs/guides/clean-code.md).-- After every code change (tests green, before commit): review → fix → end-to-end test → cleanup and refactor, by running the `after-change` workflow from the change's worktree; then merge into `dev`, and only after the merge is pushed delete the worktree (its `npm run dev` stopped): [after every change](docs/guides/clean-code.md#after-every-change-review-e2e-cleanup).+- After every code change (tests green, before commit): review → fix → end-to-end test → cleanup and refactor, by running the `after-change` workflow from the change's worktree; then merge into `dev`, and only after the merge is pushed stop its `npm run dev` and delete the worktree: [after every change](docs/guides/clean-code.md#after-every-change-review-e2e-cleanup).## Architecturediff --git a/docs/guides/clean-code.md b/docs/guides/clean-code.mdindex 6865d33b..b60b37a3 100644--- a/docs/guides/clean-code.md+++ b/docs/guides/clean-code.md@@ -45,8 +45,8 @@ Once a code change works (its tests pass) and before commit, it goes through thr2. **End-to-end test**: the changed flows on the real apps, minimal or full as CLAUDE.md defines it. A failure is fixed and the flows are walked once more.3. **Cleanup and refactor**: in parallel, a cleanup agent (Claude Code: `code-simplifier:code-simplifier`) edits directly (dead code, duplication, unclear names, comments that restate the code, unused imports, places an existing helper should be reused), and a read-only refactor reviewer reports responsibility splits, files past ~500 lines, long functions, layer leaks, missed reuse, language best practices (Swift 6, Rust `rust-skills`, strict TypeScript, Compose) and any bug it notices. The refactors worth doing are applied and the affected builds and tests rerun.-In Claude Code, the `after-change` workflow (`.claude/workflows/after-change.js`) runs all three: start it from the change's worktree with `{"change": "<what changed and which flows to walk>", "e2e": "minimal"}` (`"full"` for platform code, packaging or the desktop main process; `"base"` if the change isn't against `origin/dev`). It returns the confirmed and refuted findings, the e2e checks, what the cleanup changed and each refactor applied or skipped, and ends by stopping the worktree's `npm run dev` (its Electron app and sandbox host).+In Claude Code, the `after-change` workflow (`.claude/workflows/after-change.js`) runs all three: start it from the change's worktree with `{"change": "<what changed and which flows to walk>", "e2e": "minimal"}` (`"full"` for platform code, packaging or the desktop main process; `"base"` if the change isn't against `origin/dev`). It returns the confirmed and refuted findings, the e2e checks, what the cleanup changed and each refactor applied or skipped. The worktree's `npm run dev` keeps running through it.-Once it's green, the change is committed, merged into `dev` and pushed. Only after that merge is pushed is the worktree deleted (a failed merge or push keeps it): leave it, then from the main checkout `git worktree remove --force <path>`, `git branch -D <branch>` and `npm run dev -- --prune` in `apps/desktop` (deletes its sandbox). Nothing started from the worktree keeps running.+Once it's green, the change is committed, merged into `dev` and pushed. Only after that merge is pushed are the worktree's `npm run dev` (its Electron app and sandbox host) stopped and the worktree deleted (a failed merge or push keeps both): stop it, leave the worktree, then from the main checkout `git worktree remove --force <path>`, `git branch -D <branch>` and `npm run dev -- --prune` in `apps/desktop` (deletes its sandbox). Nothing started from the worktree keeps running.Agents touch only the change's own hunks, never another agent's uncommitted work. Keep refactors in `refactor` commits apart from the behavior change. The final report lists the review findings (fixed, or refuted and why), each e2e check that ran or couldn't and why, what the cleanup changed, and each refactor applied or skipped with one line why. Docs- or config-only changes skip this; a tool without subagents does the stages itself.