From b3f986ea5379d35da3ead668bf7dcdfd2dc97208 Mon Sep 17 00:00:00 2001 From: "burrito.space" Date: Sat, 18 Jul 2026 12:51:07 +0200 Subject: [PATCH] build(clone-pool): relocate pool clones in-repo to .worktrees/, pin mobile to sibling --- .claude/skills/agent-review/SKILL.md | 16 ++++++++-------- .claude/skills/mpeek-clone-pool/SKILL.md | 11 ++++++++--- .gitignore | 2 +- scripts/clean-isolated-clone.sh | 10 +++++++++- scripts/finalize-isolated-clone.sh | 10 +++++++++- scripts/reset-isolated-clone.sh | 10 +++++++++- scripts/spawn-isolated-clone.sh | 13 +++++++++++-- 7 files changed, 55 insertions(+), 17 deletions(-) diff --git a/.claude/skills/agent-review/SKILL.md b/.claude/skills/agent-review/SKILL.md index fd9f3027..b137808a 100644 --- a/.claude/skills/agent-review/SKILL.md +++ b/.claude/skills/agent-review/SKILL.md @@ -29,8 +29,8 @@ failure mode (see [Failure modes](#failure-modes-name-them-in-the-brief)). The real gate is `yarn test:desktop:electron` in the main checkout — not a second LLM read. Orchestrator review: -1. `jj -R ../mpeek-clone- diff --stat -r 'main..@'` — scope check. -2. `jj -R ../mpeek-clone- diff -r 'main..@'` or `Read` each changed file. +1. `jj -R .worktrees/ diff --stat -r 'main..@'` — scope check. +2. `jj -R .worktrees/ diff -r 'main..@'` or `Read` each changed file. 3. Look for: cross-app touches, missing tests, scope creep, secrets, `webSecurity:false` / `sandbox:false` regressions, lazy `require('electron')`, `setTimeout` in main without `isDestroyed()` guard, top-level @@ -41,11 +41,11 @@ Orchestrator review: ## Reviewer subagent brief template ``` -You are reviewing agent-produced work in clone /Users/dietrich/misc/mpeek-clone-/. +You are reviewing agent-produced work in clone .worktrees//. The agent claims it implemented . Verify the claim — do NOT trust it. ACCEPTANCE (all runtime, all must pass — no grep shortcuts): -1. `jj -R ../mpeek-clone- diff --stat -r 'main..@'` — list files; flag any +1. `jj -R .worktrees/ diff --stat -r 'main..@'` — list files; flag any touch outside the declared scope. 2. `yarn workspace @peek/desktop test:unit` from the clone — must pass; report numeric count. @@ -89,8 +89,8 @@ Reviewer subagents drift toward these. Naming them in the brief reduces it. a. echo > /tmp/mpeek-agent-name b. scripts/finalize-isolated-clone.sh c. If FF rejected: rebase IN THE CLONE - (jj -R ../mpeek-clone- git fetch --remote origin - jj -R ../mpeek-clone- rebase -s 'roots(::@ ~ ::main)' -d main) + (jj -R .worktrees/ git fetch --remote origin + jj -R .worktrees/ rebase -s 'roots(::@ ~ ::main)' -d main) Then retry finalize. 3. After ALL targeted clones finalized: yarn test:desktop:electron # run_in_background, FULL suite (all 6 runners, ~3300+, ~10 min), canonical gate @@ -141,7 +141,7 @@ When `test:desktop:electron` fails after landing: ``` Your landed but yarn test:desktop:electron failed: . The commit was abandoned from main. The clone at - ../mpeek-clone-/ still has your work. Diagnose, fix in the clone, + .worktrees// still has your work. Diagnose, fix in the clone, commit, and report back. Same brief as before re: do-not-finalize, do-not-push. ``` @@ -161,4 +161,4 @@ its node_modules + jj state; no respawn overhead. /agent-review adblocker-resilience ``` -If no name passed, list clones in the pool (`ls -d ../mpeek-clone-*`) and ask. +If no name passed, list clones in the pool (`ls -d .worktrees/*`) and ask. diff --git a/.claude/skills/mpeek-clone-pool/SKILL.md b/.claude/skills/mpeek-clone-pool/SKILL.md index 94d6c4ab..3ebadfd6 100644 --- a/.claude/skills/mpeek-clone-pool/SKILL.md +++ b/.claude/skills/mpeek-clone-pool/SKILL.md @@ -11,7 +11,7 @@ dedicated Electron profile dir so tests don't race on shared DB / ports / window state. The `node_modules` for the app(s) in scope are symlinked from the main checkout; no `yarn install` needed. -**Pool cap: 5.** Check `ls ../mpeek-clone-*` before spawning a new slot. +**Pool cap: 5.** Check `ls .worktrees/*` before spawning a new slot. ```bash echo > /tmp/mpeek-agent-name @@ -20,7 +20,7 @@ echo apps/desktop > /tmp/mpeek-clone-scope # optional: only that app's node echo > /tmp/mpeek-clone-task # optional but recommended: Peek task id scripts/spawn-isolated-clone.sh -# Inside the clone (you're cd'd into ../mpeek-clone-): +# Inside the clone (you're cd'd into .worktrees/): PROFILE=clone- yarn