[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75XFNZ4FNVCJWNGSKNZ699Q":3,"skill-same:01M75XFNZ4FNVCJWNGSKNZ699Q":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":29,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M75XFNZ4FNVCJWNGSKNZ699Q","project-worktrees",null,"Use when creating, entering, debugging or removing a worktree under `.worktrees\u002F`, when its URL returns 404 or 502, when writing worktree tooling, or for the Docker stack or a container process.","loupe-ac\u002Floupe","loupe-ac","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F345019842?v=4","01M75XDH3V7GZDHB5M0J04BFTP","Loupe","01M75XDH4EWXVAMQEHFV5TWBMF",2,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Floupe-ac\u002Floupe\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproject-worktrees\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: project-worktrees\ndescription: \"Use when creating, entering, debugging or removing a worktree under `.worktrees\u002F`, when its URL returns 404 or 502, when writing worktree tooling, or for the Docker stack or a container process.\"\n---\n\n# Git Worktrees\n\n## Overview\n\nEvery worktree is a full application of its own, with its own URL, database and compiled CSS. Only nginx and Mailpit are duplicated. php-fpm, Postgres and the Mercure hub are shared with the main stack. Mercure sits behind a compose profile and stays off until someone runs `just mercure-up`. A worktree that works on site-review push must start it, and then shares that one hub with every other worktree.\n\nThe main checkout is mounted at `\u002Fvar\u002Fwww\u002Fhtml`, and worktrees live inside it. So the files of a worktree sit at the same path in its own nginx sidecar and in the shared php-fpm. Only the document root differs. A worktree is served through its own `public\u002Findex.php`. Symfony therefore boots with the worktree as its project directory, and reads the `.env` chain of that worktree, over HTTP and on the CLI alike.\n\n## The shared Docker stack\n\nThe project runs on Docker Compose, with commands in a `justfile` (requires [just](https:\u002F\u002Fgithub.com\u002Fcasey\u002Fjust)).\n\n1. `COMPOSE_PROJECT_NAME` is set in `.env` and is required. Compose refuses to start without it. It names the containers, the traefik routes and the database volume. When you bootstrap a new project from the skeleton, change it before the first `docker compose up`. Two projects that share a name share containers and the database volume.\n2. Start the stack with `docker compose up -d` (nginx, php-fpm, postgres). Install PHP dependencies with `composer install`. Run migrations with `bin\u002Fconsole doctrine:migrations:migrate`.\n3. The main app runs at `https:\u002F\u002Floupe.dev.localhost`, and PHP-FPM is on port 9000.\n4. The `worker` compose service consumes the `scheduler_default`, `card_eval`, `jobs` and `card_sweep` transports. Use `docker compose logs worker` to observe it, or `just worker` for a foreground consumer.\n5. Traefik TCP routing exposes Postgres at `db.loupe.dev.localhost:5432`. `.env` ships `127.0.0.1:5432` as a placeholder. On your host machine, set `DATABASE_URL=\"postgresql:\u002F\u002Fapp:!ChangeMe!@db.loupe.dev.localhost:5432\u002Fapp?serverVersion=16&charset=utf8\"` in `.env.local`. Inside the php-fpm container (`just shell`), `compose.yaml` sets `DATABASE_URL` to `database:5432`, so nothing is needed.\n6. The dev database runs without durability. The `database` service turns off `fsync`, `synchronous_commit` and `full_page_writes`, because dev and test data can be rebuilt. A Docker crash can corrupt it. `docs\u002Fcontributing\u002Fdevelopment.md` says how to rebuild it.\n\n## Quick reference\n\n| Command | Does |\n|---|---|\n| `just worktree-up NAME [CONTEXT]` | Provision (or repair) a worktree, from anywhere. Idempotent. `CONTEXT` sets the site-review marker, see \"The card marker\". |\n| `just worktrees` | Every worktree with its URL, database and sidecar status |\n| `just worktree-down \u003Cname>` | Remove worktree + sidecar + both databases |\n| `just worktree-prune` | Clean up sidecars\u002Fdatabases orphaned by `git worktree remove` |\n| `just worktree-tailwind` | Tailwind watch mode for the current worktree. Rarely needed: the `tailwind-worktrees` service already rebuilds every worktree. |\n\nEach worktree gets these names:\n\n- the URL `https:\u002F\u002F\u003Cslug>.loupe.dev.localhost`\n- the dev database `app_wt_\u003Cslug>`, and the test database `app_test_\u003Cslug>`\n- the compose project `loupe-wt-\u003Cslug>`\n- a Mailpit sidecar at `https:\u002F\u002Fmailpit-\u003Cslug>.loupe.dev.localhost`, with the SMTP alias `mailpit-\u003Cslug>` on the app network\n\nBootstrap refuses a name that normalises to a slug that begins with `mailpit-`, because it would claim the mail host of a sibling.\n\nLog in with `dev@loupe.test` \u002F `password`, or `admin@loupe.test` \u002F `password` for the admin area. To skip the login form, run `bin\u002Fconsole app:dev:preview-login-link --path=\u002Fprojects` inside the worktree. It prints a signed link that signs you in and lands you on that page. The signature covers the host, so the link works against that worktree only. It does not expire.\n\nRun `just up` first. Bootstrap fails fast, so that no worktree keeps an `.env.local` that points at a database nobody created.\n\n## The compiled stylesheet keeps itself current\n\n`worktree-bootstrap.sh` builds `var\u002Ftailwind\u002Fapp.built.css` as it provisions, and the `tailwind-worktrees` service keeps it current afterwards. That service polls every worktree every few seconds. It rebuilds each worktree whose `assets\u002F` or `templates\u002F` are newer than its built sheet. One container covers them all, and a worktree created later needs no wiring.\n\nThe service does not conflict with the `tailwind` service or with `just tailwind`, which watch the main checkout. Each worktree has its own `var\u002Ftailwind`, so the two never write the same file. Two watchers on one tree still race.\n\nBefore you change the service, read `references\u002Ftooling-internals.md`. It holds the rules the watcher follows and the timings behind them.\n\n## The lifecycle runs itself\n\nThe Claude Code compatibility adapter in `.claude\u002Fsettings.json` registers two hooks. Its worktrees therefore arrive provisioned and leave nothing behind. Other harnesses can call the neutral scripts directly.\n\n| Hook | Script | Receives | Does |\n|---|---|---|---|\n| `WorktreeCreate` | `.agents\u002Fhooks\u002Fworktree-create.sh` | `name` | Creates the worktree, runs `worktree-bootstrap.sh`, prints the path |\n| `WorktreeRemove` | `.agents\u002Fhooks\u002Fworktree-remove.sh` | `worktree_path` | Runs `worktree-teardown.sh` with `WORKTREE_TEARDOWN_KEEP_TREE=1` |\n\nThe two events have different contracts. `references\u002Ftooling-internals.md` gives the full `WorktreeCreate` contract and its rollback rule.\n\n`WorktreeRemove` cannot block, because the harness logs its exit code only in debug mode. That script is best-effort and idempotent. It leaves `git worktree remove` to the harness, so the two cannot race. `just worktree-down NAME` by hand removes the tree too. Both hooks ignore anything outside `.worktrees\u002F`. The hook `timeout` is in seconds and defaults to 600, which these hooks use. Bootstrap must fit inside it.\n\nTeardown kills anything that still runs against the worktree in the shared php-fpm before it drops the databases. It matches on the working directory of the process, because the console processes of all worktrees have identical command lines in one container. It drops with `--force`. A surviving consumer used to make `dropdb` fail without an error, and orphan both databases.\n\n## Rules that prevent real damage\n\nPrefer the `NAME` form of every worktree command, and run it from the main checkout: `just worktree-up NAME`, `just worktree-down NAME`. `worktree-up` also accepts no argument, and falls back to the tree you stand in. That fallback is why sessions used to `cd` into a worktree. A `cd` persists across later tool calls and moves the whole session (AGENTS.md, \"The main session never moves into a worktree\"). A run from main is also correct by construction, because the bare `docker compose` calls inside the bootstrap script resolve their compose file from the current directory.\n\nOne php-fpm container serves every worktree. `bin\u002Fworktrees\u002Fcompose-exec.sh` execs into `loupe-php-fpm-1` and varies only `--workdir`. Worktrees are isolated per test database, never per container. The isolation comes from the `TEST_TOKEN` that `worktree-bootstrap.sh` writes into each `.env.test.local`. `tests\u002Fbootstrap.php` adds `__p\u003Cn>` for ParaTest worker `n`, so one worktree holds `app_test_\u003Cslug>__p1` to `__p4` beside `app_test_\u003Cslug>`.\n\nA process started inside a container can only be observed and stopped from inside it. The container has its own PID namespace. A host-side `pkill -f \u003Cscript>`, and the harness's own `TaskStop`, kill only the wrapper. They report success while the real process keeps running, and the host process table does not show it. Stop it with `docker compose exec php-fpm pkill -f \u003Cscript>`, and confirm with `docker exec \u003Cproject>-php-fpm-1 ps aux`. A host-side check shows a quiet container that is in fact fully loaded.\n\nThis has consequences:\n\n- `docker compose exec php-fpm pkill -f phpunit` kills the run of every worktree.\n- A pattern that names the worktree matches nothing, because `--workdir` never reaches the command line. Find the run by its working directory, then kill it by pid:\n\n  ```bash\n  docker exec loupe-php-fpm-1 sh -c \\\n    'for p in $(pgrep -f \"^php vendor\u002Fbin\u002Fphpunit\"); do echo \"$p $(readlink \u002Fproc\u002F$p\u002Fcwd)\"; done'\n  ```\n\n  Keep the `^` anchor, or the pattern also matches the `sh -c` wrapper. BusyBox `ps` has no `-p`, so test liveness with `test -d \u002Fproc\u002F\u003Cpid>`.\n- Two gates in one worktree share a token and hit one database. They crash in `tests\u002Fbootstrap.php` with `duplicate key value violates unique constraint \"pg_type_typname_nsp_index\"`. Gates in different worktrees are safe.\n\nNever run `npm ci` or `npm install` inside a worktree. Bootstrap links `node_modules` and `e2e\u002Fnode_modules` to the main checkout, so an install writes through the link. `npm ci` deletes the shared directory first, which breaks `just cs` in every tree. The worktree then keeps a private copy that stops tracking main. Install from the main checkout. Card 123 tracks a real fix.\n\nBefore you trust any write, confirm that the path is in `git worktree list`. A path that exists on disk can mislead you. Suppose a worktree is removed while an agent is still bound to it. A write to the old path then reports success. It recreates a bare directory that is not a git worktree, so nothing lands on the branch and nothing raises. `git status` there falls through to the main checkout and reports `main`. Check membership:\n\n```bash\ngit worktree list --porcelain | grep -qx \"worktree $(pwd)\" || echo \"NOT a worktree — stop\"\n```\n\nAn agent in this state must stop and not improvise. A checkout of the branch into the main checkout collides with `main`, which is already checked out there. `cp`, `rsync` and `git checkout` from the path of another worktree bypass the write binding and do not repair it. Only the orchestrating session can fix it, by provisioning a worktree with that branch and rebinding.\n\nNever run bare `docker compose up\u002Fdown\u002Frestart` from a worktree. `.env` sets `COMPOSE_PROJECT_NAME=loupe`, so compose targets the shared stack but resolves `.` to the worktree. It then recreates the containers of the main app with the worktree as their document root. Use the `just` recipes. To run something in the shared php-fpm against the files of the current worktree, use `bin\u002Fworktrees\u002Fcompose-exec.sh`.\n\nA `docker compose -f \u003Cfile>` call with unset variables does not fail safely either. `docker\u002Fcompose\u002Fe2e.yaml` and `docker\u002Fcompose\u002Fworktree.yaml` declare their inputs with `${VAR:?}`, which protects `up` but not `down`. A `down` on one of them without those variables removed the containers of the main stack. It also tried to delete the `loupe_default` network, although `-p` named a different project. A teardown recipe must pass the same variables as its bring-up.\n\nTear down with `just worktree-down`, never with a bare `git worktree remove`. A bare remove leaves both sidecars and both databases behind, and the route then serves 502s. `just worktree-prune` cleans up after the fact.\n\nRecover the identity of a worktree from the compose project label, never from a container name. A worktree has more than one sidecar. Code that strips a service suffix (`-nginx-1`) breaks when a different service is the survivor. Prune once parsed a Mailpit-only orphan as the slug `\u003Cslug>-mailpit-1`. It then drove a teardown, and a database drop, from a slug that belonged to nothing. Read the label with `docker ps --format '{{.Label \"com.docker.compose.project\"}}'`. A new service must not break cleanup. Teardown also passes `--remove-orphans`, so a `down` still removes a running service that the resolved compose file does not declare.\n\nThe slug is not the directory name: `Feature_X` owns the slug `feature-x`. Any tooling that matches worktrees (pruning, listing, collision checks) must resolve them through `bin\u002Fworktrees\u002Fslug.sh` (`worktree_slug`, `worktree_db_token`, `worktree_slug_index`). Never string-match a directory name. A wrong match once declared a live worktree orphaned and dropped its databases.\n\nSerena's edit tools do not work from a worktree. The MCP server is bound to the main checkout, so `replace_symbol_body` \u002F `insert_*_symbol` \u002F `replace_content` write there with no warning. Your branch stays unchanged, and the main tree gets dirty. Use Edit\u002FWrite. Serena read tools are safe from anywhere.\n\n## Claude Code write binding\n\nOther harnesses must bind the writes and the working directory of each worker to the same worktree. Then they must verify both before an edit. The details below document the Claude Code compatibility behaviour.\n\nThe Edit\u002FWrite binding is single-valued per agent, and depends on how the agent was launched.\n\nPlain subagents inherit the current worktree of the parent session. They do not get the worktree they were launched against, or the one they `cd` into. An edit anywhere else is rejected with \"This session is now isolated in `\u003Cpath>`\". A subagent that calls `EnterWorktree` moves its `pwd`, but does not rebind its write access. So when you dispatch N subagents at N worktrees, all but the bound one fail without an error. Serialize instead: `EnterWorktree(path)` in the parent, dispatch, wait, rebind, next.\n\nCheck the confirmation wording before you dispatch. \"The session is now working in the worktree\" propagates to subagents. \"This agent's working directory and write access now point at the worktree\" applies to the parent only. It appears when you switch straight into a freshly created worktree. Re-issue `EnterWorktree` until you get the first wording.\n\nAgents launched with `isolation: \"worktree\"` get their own binding and can write in parallel. A harness that follows the neutral convention places the tree in `.worktrees\u002Fagent-\u003Cid>`. The `WorktreeCreate` hook provisions it, so it is a full application from the start, and not a bare `git worktree add`. If the hook is not registered, run `just worktree-up` yourself. The harness generates the name (`agent-\u003Cid>`, and the branch takes that name). Work that must land on a named branch needs a deliberate rename and push. These worktrees are created locked, but `just worktree-down agent-\u003Cid>` still removes one cleanly, sidecars and both databases included, with no `--force`.\n\nTear the worktree of an agent down only after its branch is pushed. Never tear down the worktree that the parent session is bound to. The binding keeps pointing at the deleted path, and every later Edit fails until you `cd` elsewhere and re-issue `EnterWorktree`.\n\nVerify the binding before you dispatch, not after. Make one trivial edit in the target worktree and confirm that it lands. Three times in one wave, an agent found only mid-task that its writes were pinned elsewhere, and each time cost a full agent run.\n\nGive every subagent the same step-0 writability check. Tell it explicitly to stop and report if the check is rejected. Forbid the plausible workarounds, and not only the obvious ones. An agent told not to use `cat`\u002F`sed` edited the wrong worktree and `cp`'d the finished file across. It reported that honestly, but it bypassed the guard, and the next agent may not verify as carefully. `cp`, `rsync`, `git checkout` of the path of another worktree, Serena's edit tools and any shell redirection are all bypasses. If writes land in the wrong worktree, stop, and let the orchestrator fix the binding. Work already on disk survives a stopped agent, so resume it with a message and do not restart it.\n\nParallel writes do not yet parallelise the gate. Each worktree has its own Mailpit sidecar, and one suite runs on 4 workers, but every worktree shares the one `php-fpm` container. Nobody has gated two branches at the same time, so do not assume that it works.\n\n## Reusing one worktree for several branches\n\nOnly one worktree is writable at a time, so a wave of branches often runs through a single provisioned worktree. Its directory name then stops matching its branch. That is expected, so do not \"fix\" it.\n\nRun these steps after every `git checkout \u003Cother-branch>` in a reused worktree, before any gate can mean anything:\n\n1. Run `bin\u002Fworktrees\u002Fcompose-exec.sh composer install`. The lockfile differs between branches. A drifted `vendor\u002F` produces errors that look like application bugs. It once reported `Call to undefined method` for a method that the locked package version does define.\n2. Run `bin\u002Fconsole cache:clear` for both `dev` and `--env=test`. If you clear only one, phpstan has no dumped dev container (\"Container ... does not exist\"). A `var\u002Fcache` that survived a Symfony minor upgrade gave a 500 on every page that rendered an icon, and 31 e2e specs failed from that one stale cache.\n3. Run `bin\u002Fconsole doctrine:migrations:status`. A migration from the previous branch shows as executed but unavailable. If it does, reset the dev database (drop, create, migrate), then run `just worktree-up` to seed it again. Otherwise e2e runs against the schema of another branch.\n\nWhen a gate fails right after a branch switch, suspect this list before you suspect the branch.\n\n## Symptoms and causes\n\n| Symptom | Cause and fix |\n|---|---|\n| Worktree URL returns **404** (plain text, no app markup) | The sidecar container is gone, so Traefik has no router for that host. `just worktree-up` recreates it without touching the database. |\n| Every fix run of a card fails in the bridge `before` step with `'\u003Cbranch>' is already used by worktree at '\u003Cpath>'` | A session worktree still holds the pull request branch. `bridge-before.sh` detaches that worktree when it has nothing uncommitted or unpushed, also when `card-\u003Cn>` already exists. Otherwise it stops and names the worktree. Commit and push its work there, then resume the card. Do not run `just worktree-down` before that push, because it force-removes the worktree and deletes uncommitted files. A session that links a pull request to a card hands the branch to the bridge, so tear its worktree down after the push. |\n| Worktree URL returns **502** | The route exists but the backend does not. The usual cause is a worktree removed with a bare `git worktree remove`. Run `just worktree-prune`. |\n| nginx exits with `host not found in upstream \"php-fpm\"` | The container reached the shared network after start. Attach every network at creation. That is why the sidecar is a compose file, and not `docker run` + `docker network connect`. |\n| A class added in the worktree renders unstyled | `var\u002Ftailwind` must be a real directory per worktree, and not a symlink to the one of main. `just worktree-up` fixes it, and `just worktree-tailwind` watches. |\n| Layout looks like an older design, or a hover\u002Fposition spec fails but the page logs nothing | The `tailwind-worktrees` service is down. It keeps a worktree from serving its provision-time CSS while its Twig and PHP are current. Check `docker compose logs tailwind-worktrees`, and run `docker compose up -d tailwind-worktrees` if it is not running. A one-off rebuild is `bin\u002Fworktrees\u002Fcompose-exec.sh bin\u002Fconsole tailwind:build`, under a second. Before you blame the branch, diff the compiled sheet for a class that the design introduced. |\n| The site-review widget shows a red `!` on the launcher, and \"This review widget can't connect\" | The embed names a project that does not resolve at the backend the widget talks to. That backend is `SITE_REVIEW_WIDGET_BACKEND`, not the host that serves the page. A worktree keeps the project id of the main checkout, which production knows. Suspect an `.env.local` with no `SITE_REVIEW_WIDGET_PROJECT`. Also suspect a production project that does not list `https:\u002F\u002F\u003Cslug>.loupe.dev.localhost` under its allowed sites, or a widget branch pointed at its own tree with the production project id. See \"Which backend the widget talks to\". |\n| Widget comments on a card preview save, but the card does not list them | The worktree has no `SITE_REVIEW_WIDGET_CONTEXT` in its `.env.local`, so the comment carries no marker. Run `just worktree-up card-\u003Cnumber> card:\u003CcardId>` again from the main checkout, with the production card id. See \"The card marker\". |\n| The widget says \"This preview's card is closed or gone, so notes cannot be saved here.\" | The marker names a card that the widget backend does not hold. Suspect a widget branch whose `SITE_REVIEW_WIDGET_BACKEND` is its own worktree host, with a production card id. Remove `SITE_REVIEW_WIDGET_CONTEXT` from its `.env.local`, or set `card:\u003Cid>` with a card id from the database of that worktree. See \"The card marker\". |\n| The widget does not appear at all, with no launcher and no error badge | The `\u003Cscript>` failed to load, so nothing ran. A refused sign-in still renders the widget, and an unreachable script renders nothing. Check that the backend host resolves and serves `\u002Flive-review\u002Fwidget.js`. A `SERVFAIL` on `app.loupe.ac` from the resolver of the machine produces exactly this, while the same request succeeds through `1.1.1.1`. |\n| Mail-asserting specs never see their message, or read the message of another run | Each worktree has its own sidecar, so a run must point at it. Suspect a run launched without `just e2e` (which exports `MAILPIT_URL`), or with `E2E_BASE_URL` set alone, which falls back to the shared instance. The app of the worktree then sends where nothing reads. Every registration, login and verification spec times out, and it looks like an auth regression. Set `MAILPIT_URL=https:\u002F\u002Fmailpit-\u003Cslug>.\u003Cproject>.dev.localhost` alongside it. `bin\u002Fe2e-target.sh` prints the Mailpit URL it resolved as its fourth line. |\n| A spec fails, then passes on a quiet re-run | Something else loaded the shared php-fpm, such as a sibling agent that ran `just ci` or `composer install`. Check what is in flight before you investigate the branch. This once nearly filed a false \"regression\" against a clean PR. |\n| `worktree-up` fails with an \"Unrecognized option\" or missing-class error | The new worktree seeded its `vendor\u002F` from a stale main checkout. A fast-forward of the main checkout does not update its `vendor\u002F`, so every worktree created afterwards inherits the dependencies of the old commit. Run `composer install` in the main checkout, then run `just worktree-up` again. |\n| Every e2e spec fails on a new worktree host with `ERR_CERT_AUTHORITY_INVALID`, while existing hosts stay fine | The `traefik-dnsmasq-1` container (in the separate `traefik` stack) is down. It holds `address=\u002Fdev.localhost\u002F172.20.0.2`, the wildcard that lets step-ca resolve a host to validate ACME. Without it, `tls-alpn-01` fails with \"could not connect to validation target\", and Traefik serves its default cert. Hosts already in `certs\u002Facme.json` keep working, so the failure looks worktree-specific. `restart: unless-stopped` does not revive it after an exit 255. Fix it with `( cd ..\u002Ftraefik && docker compose up -d dnsmasq )`. Then restart Traefik too, because it otherwise keeps polling the failed authorization and opens no fresh order. Verify with `curl -o \u002Fdev\u002Fnull -w '%{ssl_verify_result}'` (0 = good) before you blame the branch. |\n| Mail-asserting e2e specs time out against a worktree, or Mailpit has no mail | A missing consumer is not the cause: `PlaywrightSyncMiddleware` handles `X-Playwright` dispatches inline. First check that the Mailpit sidecar of the worktree is up (`just worktree-up` recreates it). Then check that `MAILER_DSN` in the container resolves to `mailpit-\u003Cslug>`. Container environment beats dotenv, so a php-fpm that still carries an old `MAILER_DSN` sends to the shared instance until the main stack is recreated. Otherwise, suspect a request that never carried the header (a context built without the `use` options of the project), or stale state from an interrupted run. |\n| You cannot tell whether an e2e run is already in flight | `ps ax` truncates command lines to terminal width. The `e2e\u002Fnode_modules` of a worktree is a symlink to the main checkout, so every playwright process reports an identical command line, whichever tree launched it. Use `pgrep -f 'playwright test'`. It does not truncate, but it cannot tell trees apart either. Treat any hit as \"someone is running e2e\", and wait. |\n\n## Which backend the widget talks to\n\nThe widget's embed is built from two independent values. When they get out of step, the widget of a worktree breaks. That is the most common way it breaks.\n\n```twig\n\u003Cscript src=\"{{ site_review_widget_backend }}\u002Flive-review\u002Fwidget.js\"\n        data-project=\"{{ site_review_widget_project }}\">\u003C\u002Fscript>\n```\n\n`widget.js` then does `BACKEND = new URL(script.src).origin`. The widget posts to the origin of its script, never to the host that serves the page. So a page on `https:\u002F\u002F\u003Cslug>.loupe.dev.localhost` whose script comes from `https:\u002F\u002Fapp.loupe.ac` sends its comments to production. That is deliberate, because it is how the team dogfoods the app. You annotate the local UI, and the comments land in hosted Loupe, where an agent reads them over MCP. It also means that the project must live on the backend, and not in the local database.\n\n### The rule for a worktree\n\nA worktree points at production, with the production project, so annotating a branch works the way it does everywhere else:\n\n```\nSITE_REVIEW_WIDGET_BACKEND=https:\u002F\u002Fapp.loupe.ac\nSITE_REVIEW_WIDGET_PROJECT=\u003Cthe production project id, same one the main checkout uses>\n```\n\nThe embed carries no credential. The reviewer presses **Sign in with Loupe**, and a pop-up opens on the backend. That project must list the origin of the page under its allowed sites, or the consent page refuses the sign-in. One wildcard entry covers every worktree at once: `https:\u002F\u002F*.loupe.dev.localhost`. Only the owner of the project can sign in.\n\nThe exception is a branch that changes the widget itself: anything under `public\u002Flive-review\u002F` or `src\u002FModule\u002FSiteReview\u002F` that alters widget behaviour. Point that branch at its own tree, so that the code under review is the code you exercise:\n\n```\nSITE_REVIEW_WIDGET_BACKEND=https:\u002F\u002F\u003Cslug>.loupe.dev.localhost\nSITE_REVIEW_WIDGET_PROJECT=\u003Cthe worktree's own project id, see below>\n```\n\nJudge that by what the diff touches, and not by the branch name. A change to `ResolveSiteReviewCommentHandler` is not a widget change. A change to `widget.js` is.\n\n### Bootstrap keeps the pair in step\n\n`worktree-bootstrap.sh` copies `.env.local` from the main checkout, and leaves both `SITE_REVIEW_WIDGET_BACKEND` and `SITE_REVIEW_WIDGET_PROJECT` as it found them. A worktree therefore talks to production with the project that production knows, and the site-review comments of a worktree page land in the real project. You annotate the branch you work on, and read the comments back over MCP like any other site.\n\nBootstrap captures no local project id. It runs `app:dev:seed`, which seeds the full demo dataset in the own database of the worktree, switches on the flags `inbox.enabled`, `artifacts.enabled` and `billing.enabled` with the tag `dev-seed`, and prints the id of \"Dev Project\". Bootstrap sends that output to `\u002Fdev\u002Fnull`. `--keep-flag-defaults` skips only the flag rows, and only the e2e stack passes it.\n\n### The card marker\n\n`just worktree-up NAME CONTEXT` writes `SITE_REVIEW_WIDGET_CONTEXT=CONTEXT` into the `.env.local` of the worktree. The embed carries it as `data-context`, and every widget comment stores it. For a card worktree, `CONTEXT` is `card:\u003CcardId>`. `LinkCardOnSiteReviewCommentCreated` on production then links the comment to that card.\n\nThe marker must name a card in the database of the widget backend, `SITE_REVIEW_WIDGET_BACKEND`. Most card worktrees point the backend at production, so `\u003CcardId>` is the production card id. A card id from the own database of the worktree names no card there.\n\nA branch that changes the widget itself points the backend at its own worktree host (see \"The rule for a worktree\"). A production card id then names no card on that backend, and the widget says \"This preview's card is closed or gone, so notes cannot be saved here.\" For such a branch, pass no marker, or pass `card:\u003Cid>` with a card id from the own database of the worktree.\n\nThe marker is a formal argument all the way:\n\n- The bridge `before` rule passes `{cardId}` to `bin\u002Fworktrees\u002Fbridge-before.sh`, which passes it to bootstrap.\n- The script passes no marker when the `SITE_REVIEW_WIDGET_BACKEND` of the worktree differs from that of the main checkout, so a widget branch keeps the marker it set.\n- On a refresh, the stage skill reads it from the prompt line `Card \u003Cnumber> (cardId \u003Cid>)`. When the prompt lacks it, take `cardId` from `card_get`.\n- Never derive the marker from a branch name, a worktree name or a card number, and do not add code that does.\n\nBootstrap writes the marker only when `CONTEXT` is present. A re-run without it keeps the old value, so a repair never clears a marker. Pass it again on a refresh all the same, because that also fixes a worktree created without it.\n\nA widget branch needs both values changed by hand after provisioning, because bootstrap restores neither. Point the backend at the worktree host. Then run the seed again, and read the project id it prints:\n\n```bash\n( cd .worktrees\u002F\u003Cname> \\\n  && bin\u002Fworktrees\u002Fcompose-exec.sh bin\u002Fconsole app:dev:seed \\\n  | grep SITE_REVIEW_WIDGET_PROJECT )\n```\n\nThe seed is idempotent, so it prints the id of the project it already made. Then add `https:\u002F\u002F\u003Cslug>.loupe.dev.localhost` to the allowed sites of that project, on the own Connect page of the worktree. Sign in as `dev@loupe.test`, which owns the seeded project. The consent page refuses every other account.\n\nTo diagnose a refused sign-in, read the embed that the page serves:\n\n```bash\ncurl -sk https:\u002F\u002F\u003Cslug>.loupe.dev.localhost\u002Flogin \\\n  | grep -A1 'live-review\u002Fwidget\\.js'\n```\n\nThat needs `SITE_REVIEW_WIDGET_PUBLIC` set. Otherwise `templates\u002F_site_review_widget.html.twig` serves the tag to an administrator alone, so read the page in a signed-in browser instead.\n\nRead the two lines together. The origin in `src` says which instance answers, and `data-project` must name a project that instance holds. A local id against production, and a production id against the worktree, both end at \"This review widget can't connect\".\n\n### The preview token\n\nAfter the seed, `worktree-bootstrap.sh` runs `loupe preview-token mint --project \u003CSITE_REVIEW_WIDGET_PROJECT> --label \u003Cslug> --instance \u003CSITE_REVIEW_WIDGET_BACKEND>`, with `--card` from the card marker. It writes the result to `SITE_REVIEW_WIDGET_PREVIEW_TOKEN` in `.env.local`. `worktree-teardown.sh` revokes it. A failed mint prints one warning and writes an empty value, so `worktree-up` never fails for it. The warning means that the CLI is missing, signed out, or signed in to an instance other than the widget backend. A branch whose backend is its own worktree host mints from its own database with `app:dev:preview-token`, with no card.\n\n## Writing worktree tooling\n\nRead `references\u002Ftooling-internals.md` before you write or change a script under `bin\u002Fworktrees\u002F`. It covers helper sourcing, `{{ }}` escaping in `just`, and relative symlink depth.\n\n## Testing\n\nEach worktree gets its own test database through `TEST_TOKEN`, so `just ci` runs in parallel across worktrees safely.\n\nFor the full e2e suite, reach for `just e2e-up` first, and not a worktree. It provisions a disposable `app_e2e` database and a sidecar that serves the main checkout. So it gates whatever branch is checked out there, with no tree, no cert and no seeded database. You can still point e2e at a worktree. That is the right tool when you must gate a branch without checking it out, but it costs more.\n\nRun `just e2e` from a worktree, and it resolves that worktree as its target and its Mailpit, and prints both. It also rebuilds the stylesheet of the worktree, and repairs the dev data that the suite destroys. Every instruction that says \"from the worktree\" needs the worktree as its cwd for that call only, so wrap the `cd` in a subshell:\n\n```sh\n( cd .worktrees\u002F\u003Cname> && just e2e )\n```\n\nA bare `cd` persists across later tool calls. It turns \"run this one command there\" into \"move the session in\", which AGENTS.md forbids for the main session.\n\n`E2E_BASE_URL` still overrides, and aims a run at a worktree from somewhere else. It also suppresses the repair and the per-worktree Mailpit, because an explicit target can be anything. A repair of a tree that nobody chose is worse than no repair, and a guessed mail host is worse than the shared one. Set `MAILPIT_URL` alongside it to aim the mail assertions too.\n\n## Running the full e2e suite from a worktree\n\nThe worktree e2e gate needs these conditions:\n\n1. `DEFAULT_URI=https:\u002F\u002F\u003Cslug>.loupe.dev.localhost` in the `.env.local` of the worktree. Otherwise, CLI-generated absolute URLs (export download emails) point at `localhost`. Check it again after any re-provisioning, because `worktree-up` regenerates `.env.local`.\n2. No worker, and no worktree-scoped `messenger:consume`. The shared `worker` container consumes the database of main only. `PlaywrightSyncMiddleware` handles every message dispatched under `X-Playwright` inline, so there is no queue to drain. The middleware is registered `when@dev` only, which is what a worktree runs.\n3. A quiet stack. During the run, allow no worktree provisioning, no `composer install`, no sibling `just ci`, and no e2e suite of a sibling worktree. A worktree gets its own nginx and Mailpit and nothing else. `php-fpm`, `mercure` and `database` are shared, so any of these skew timings past the Playwright timeouts. Per-worktree databases and mail sidecars make two suites correct together, but not reliable together. The live-update and debounced specs fall over (comment counters, the sliding-confirm overlay, search), and their failures look like real regressions. Run the suite again on a quiet stack before you accept any such failure.\n4. A current stylesheet. `just e2e` runs `tailwind:build` for the detected worktree before it starts Playwright, so this is automatic. A run started any other way still gates against the CSS of provision time. That includes `npx playwright test` directly, or an explicit `E2E_BASE_URL`, which suppresses worktree detection.\n\nNever run the full suite against the live dev database of the main checkout once it holds real data. State-dependent specs fail. Worse, they change live state: a waitlist spec run against main set `registration.cap` and closed registration with no warning.\n","# Git Worktrees\n\n## Overview\n\nEvery worktree is a full application of its own, with its own URL, database and compiled CSS. Only nginx and Mailpit are duplicated. php-fpm, Postgres and the Mercure hub are shared with the main stack. Mercure sits behind a compose profile and stays off until someone runs `just mercure-up`. A worktree that works on site-review push must start it, and then shares that one hub with every other worktree.\n\nThe main checkout is mounted at `\u002Fvar\u002Fwww\u002Fhtml`, and worktrees live inside it. So the files of a worktree sit at the same path in its own nginx sidecar and in the shared php-fpm. Only the document root differs. A worktree is served through its own `public\u002Findex.php`. Symfony therefore boots with the worktree as its project directory, and reads the `.env` chain of that worktree, over HTTP and on the CLI alike.\n\n## The shared Docker stack\n\nThe project runs on Docker Compose, with commands in a `justfile` (requires [just](https:\u002F\u002Fgithub.com\u002Fcasey\u002Fjust)).\n\n1. `COMPOSE_PROJECT_NAME` is set in `.env` and is required. Compose refuses to start without it. It names the containers, the traefik routes and the database volume. When you bootstrap a new project from the skeleton, change it before the first `docker compose up`. Two projects that share a name share containers and the database volume.\n2. Start the stack with `docker compose up -d` (nginx, php-fpm, postgres). Install PHP dependencies with `composer install`. Run migrations with `bin\u002Fconsole doctrine:migrations:migrate`.\n3. The main app runs at `https:\u002F\u002Floupe.dev.localhost`, and PHP-FPM is on port 9000.\n4. The `worker` compose service consumes the `scheduler_default`, `card_eval`, `jobs` and `card_sweep` transports. Use `docker compose logs worker` to observe it, or `just worker` for a foreground consumer.\n5. Traefik TCP routing exposes Postgres at `db.loupe.dev.localhost:5432`. `.env` ships `127.0.0.1:5432` as a placeholder. On your host machine, set `DATABASE_URL=\"postgresql:\u002F\u002Fapp:!ChangeMe!@db.loupe.dev.localhost:5432\u002Fapp?serverVersion=16&charset=utf8\"` in `.env.local`. Inside the php-fpm container (`just shell`), `compose.yaml` sets `DATABASE_URL` to `database:5432`, so nothing is needed.\n6. The dev database runs without durability. The `database` service turns off `fsync`, `synchronous_commit` and `full_page_writes`, because dev and test data can be rebuilt. A Docker crash can corrupt it. `docs\u002Fcontributing\u002Fdevelopment.md` says how to rebuild it.\n\n## Quick reference\n\n| Command | Does |\n|---|---|\n| `just worktree-up NAME [CONTEXT]` | Provision (or repair) a worktree, from anywhere. Idempotent. `CONTEXT` sets the site-review marker, see \"The card marker\". |\n| `just worktrees` | Every worktree with its URL, database and sidecar status |\n| `just worktree-down \u003Cname>` | Remove worktree + sidecar + both databases |\n| `just worktree-prune` | Clean up sidecars\u002Fdatabases orphaned by `git worktree remove` |\n| `just worktree-tailwind` | Tailwind watch mode for the current worktree. Rarely needed: the `tailwind-worktrees` service already rebuilds every worktree. |\n\nEach worktree gets these names:\n\n- the URL `https:\u002F\u002F\u003Cslug>.loupe.dev.localhost`\n- the dev database `app_wt_\u003Cslug>`, and the test database `app_test_\u003Cslug>`\n- the compose project `loupe-wt-\u003Cslug>`\n- a Mailpit sidecar at `https:\u002F\u002Fmailpit-\u003Cslug>.loupe.dev.localhost`, with the SMTP alias `mailpit-\u003Cslug>` on the app network\n\nBootstrap refuses a name that normalises to a slug that begins with `mailpit-`, because it would claim the mail host of a sibling.\n\nLog in with `dev@loupe.test` \u002F `password`, or `admin@loupe.test` \u002F `password` for the admin area. To skip the login form, run `bin\u002Fconsole app:dev:preview-login-link --path=\u002Fprojects` inside the worktree. It prints a signed link that signs you in and lands you on that page. The signature covers the host, so the link works against that worktree only. It does not expire.\n\nRun `just up` first. Bootstrap fails fast, so that no worktree keeps an `.env.local` that points at a database nobody created.\n\n## The compiled stylesheet keeps itself current\n\n`worktree-bootstrap.sh` builds `var\u002Ftailwind\u002Fapp.built.css` as it provisions, and the `tailwind-worktrees` service keeps it current afterwards. That service polls every worktree every few seconds. It rebuilds each worktree whose `assets\u002F` or `templates\u002F` are newer than its built sheet. One container covers them all, and a worktree created later needs no wiring.\n\nThe service does not conflict with the `tailwind` service or with `just tailwind`, which watch the main checkout. Each worktree has its own `var\u002Ftailwind`, so the two never write the same file. Two watchers on one tree still race.\n\nBefore you change the service, read `references\u002Ftooling-internals.md`. It holds the rules the watcher follows and the timings behind them.\n\n## The lifecycle runs itself\n\nThe Claude Code compatibility adapter in `.claude\u002Fsettings.json` registers two hooks. Its worktrees therefore arrive provisioned and leave nothing behind. Other harnesses can call the neutral scripts directly.\n\n| Hook | Script | Receives | Does |\n|---|---|---|---|\n| `WorktreeCreate` | `.agents\u002Fhooks\u002Fworktree-create.sh` | `name` | Creates the worktree, runs `worktree-bootstrap.sh`, prints the path |\n| `WorktreeRemove` | `.agents\u002Fhooks\u002Fworktree-remove.sh` | `worktree_path` | Runs `worktree-teardown.sh` with `WORKTREE_TEARDOWN_KEEP_TREE=1` |\n\nThe two events have different contracts. `references\u002Ftooling-internals.md` gives the full `WorktreeCreate` contract and its rollback rule.\n\n`WorktreeRemove` cannot block, because the harness logs its exit code only in debug mode. That script is best-effort and idempotent. It leaves `git worktree remove` to the harness, so the two cannot race. `just worktree-down NAME` by hand removes the tree too. Both hooks ignore anything outside `.worktrees\u002F`. The hook `timeout` is in seconds and defaults to 600, which these hooks use. Bootstrap must fit inside it.\n\nTeardown kills anything that still runs against the worktree in the shared php-fpm before it drops the databases. It matches on the working directory of the process, because the console processes of all worktrees have identical command lines in one container. It drops with `--force`. A surviving consumer used to make `dropdb` fail without an error, and orphan both databases.\n\n## Rules that prevent real damage\n\nPrefer the `NAME` form of every worktree command, and run it from the main checkout: `just worktree-up NAME`, `just worktree-down NAME`. `worktree-up` also accepts no argument, and falls back to the tree you stand in. That fallback is why sessions used to `cd` into a worktree. A `cd` persists across later tool calls and moves the whole session (AGENTS.md, \"The main session never moves into a worktree\"). A run from main is also correct by construction, because the bare `docker compose` calls inside the bootstrap script resolve their compose file from the current directory.\n\nOne php-fpm container serves every worktree. `bin\u002Fworktrees\u002Fcompose-exec.sh` execs into `loupe-php-fpm-1` and varies only `--workdir`. Worktrees are isolated per test database, never per container. The isolation comes from the `TEST_TOKEN` that `worktree-bootstrap.sh` writes into each `.env.test.local`. `tests\u002Fbootstrap.php` adds `__p\u003Cn>` for ParaTest worker `n`, so one worktree holds `app_test_\u003Cslug>__p1` to `__p4` beside `app_test_\u003Cslug>`.\n\nA process started inside a container can only be observed and stopped from inside it. The container has its own PID namespace. A host-side `pkill -f \u003Cscript>`, and the harness's own `TaskStop`, kill only the wrapper. They report success while the real process keeps running, and the host process table does not show it. Stop it with `docker compose exec php-fpm pkill -f \u003Cscript>`, and confirm with `docker exec \u003Cproject>-php-fpm-1 ps aux`. A host-side check shows a quiet container that is in fact fully loaded.\n\nThis has consequences:\n\n- `docker compose exec php-fpm pkill -f phpunit` kills the run of every worktree.\n- A pattern that names the worktree matches nothing, because `--workdir` never reaches the command line. Find the run by its working directory, then kill it by pid:\n\n  ```bash\n  docker exec loupe-php-fpm-1 sh -c \\\n    'for p in $(pgrep -f \"^php vendor\u002Fbin\u002Fphpunit\"); do echo \"$p $(readlink \u002Fproc\u002F$p\u002Fcwd)\"; done'\n  ```\n\n  Keep the `^` anchor, or the pattern also matches the `sh -c` wrapper. BusyBox `ps` has no `-p`, so test liveness with `test -d \u002Fproc\u002F\u003Cpid>`.\n- Two gates in one worktree share a token and hit one database. They crash in `tests\u002Fbootstrap.php` with `duplicate key value violates unique constraint \"pg_type_typname_nsp_index\"`. Gates in different worktrees are safe.\n\nNever run `npm ci` or `npm install` inside a worktree. Bootstrap links `node_modules` and `e2e\u002Fnode_modules` to the main checkout, so an install writes through the link. `npm ci` deletes the shared directory first, which breaks `just cs` in every tree. The worktree then keeps a private copy that stops tracking main. Install from the main checkout. Card 123 tracks a real fix.\n\nBefore you trust any write, confirm that the path is in `git worktree list`. A path that exists on disk can mislead you. Suppose a worktree is removed while an agent is still bound to it. A write to the old path then reports success. It recreates a bare directory that is not a git worktree, so nothing lands on the branch and nothing raises. `git status` there falls through to the main checkout and reports `main`. Check membership:\n\n```bash\ngit worktree list --porcelain | grep -qx \"worktree $(pwd)\" || echo \"NOT a worktree — stop\"\n```\n\nAn agent in this state must stop and not improvise. A checkout of the branch into the main checkout collides with `main`, which is already checked out there. `cp`, `rsync` and `git checkout` from the path of another worktree bypass the write binding and do not repair it. Only the orchestrating session can fix it, by provisioning a worktree with that branch and rebinding.\n\nNever run bare `docker compose up\u002Fdown\u002Frestart` from a worktree. `.env` sets `COMPOSE_PROJECT_NAME=loupe`, so compose targets the shared stack but resolves `.` to the worktree. It then recreates the containers of the main app with the worktree as their document root. Use the `just` recipes. To run something in the shared php-fpm against the files of the current worktree, use `bin\u002Fworktrees\u002Fcompose-exec.sh`.\n\nA `docker compose -f \u003Cfile>` call with unset variables does not fail safely either. `docker\u002Fcompose\u002Fe2e.yaml` and `docker\u002Fcompose\u002Fworktree.yaml` declare their inputs with `${VAR:?}`, which protects `up` but not `down`. A `down` on one of them without those variables removed the containers of the main stack. It also tried to delete the `loupe_default` network, although `-p` named a different project. A teardown recipe must pass the same variables as its bring-up.\n\nTear down with `just worktree-down`, never with a bare `git worktree remove`. A bare remove leaves both sidecars and both databases behind, and the route then serves 502s. `just worktree-prune` cleans up after the fact.\n\nRecover the identity of a worktree from the compose project label, never from a container name. A worktree has more than one sidecar. Code that strips a service suffix (`-nginx-1`) breaks when a different service is the survivor. Prune once parsed a Mailpit-only orphan as the slug `\u003Cslug>-mailpit-1`. It then drove a teardown, and a database drop, from a slug that belonged to nothing. Read the label with `docker ps --format '{{.Label \"com.docker.compose.project\"}}'`. A new service must not break cleanup. Teardown also passes `--remove-orphans`, so a `down` still removes a running service that the resolved compose file does not declare.\n\nThe slug is not the directory name: `Feature_X` owns the slug `feature-x`. Any tooling that matches worktrees (pruning, listing, collision checks) must resolve them through `bin\u002Fworktrees\u002Fslug.sh` (`worktree_slug`, `worktree_db_token`, `worktree_slug_index`). Never string-match a directory name. A wrong match once declared a live worktree orphaned and dropped its databases.\n\nSerena's edit tools do not work from a worktree. The MCP server is bound to the main checkout, so `replace_symbol_body` \u002F `insert_*_symbol` \u002F `replace_content` write there with no warning. Your branch stays unchanged, and the main tree gets dirty. Use Edit\u002FWrite. Serena read tools are safe from anywhere.\n\n## Claude Code write binding\n\nOther harnesses must bind the writes and the working directory of each worker to the same worktree. Then they must verify both before an edit. The details below document the Claude Code compatibility behaviour.\n\nThe Edit\u002FWrite binding is single-valued per agent, and depends on how the agent was launched.\n\nPlain subagents inherit the current worktree of the parent session. They do not get the worktree they were launched against, or the one they `cd` into. An edit anywhere else is rejected with \"This session is now isolated in `\u003Cpath>`\". A subagent that calls `EnterWorktree` moves its `pwd`, but does not rebind its write access. So when you dispatch N subagents at N worktrees, all but the bound one fail without an error. Serialize instead: `EnterWorktree(path)` in the parent, dispatch, wait, rebind, next.\n\nCheck the confirmation wording before you dispatch. \"The session is now working in the worktree\" propagates to subagents. \"This agent's working directory and write access now point at the worktree\" applies to the parent only. It appears when you switch straight into a freshly created worktree. Re-issue `EnterWorktree` until you get the first wording.\n\nAgents launched with `isolation: \"worktree\"` get their own binding and can write in parallel. A harness that follows the neutral convention places the tree in `.worktrees\u002Fagent-\u003Cid>`. The `WorktreeCreate` hook provisions it, so it is a full application from the start, and not a bare `git worktree add`. If the hook is not registered, run `just worktree-up` yourself. The harness generates the name (`agent-\u003Cid>`, and the branch takes that name). Work that must land on a named branch needs a deliberate rename and push. These worktrees are created locked, but `just worktree-down agent-\u003Cid>` still removes one cleanly, sidecars and both databases included, with no `--force`.\n\nTear the worktree of an agent down only after its branch is pushed. Never tear down the worktree that the parent session is bound to. The binding keeps pointing at the deleted path, and every later Edit fails until you `cd` elsewhere and re-issue `EnterWorktree`.\n\nVerify the binding before you dispatch, not after. Make one trivial edit in the target worktree and confirm that it lands. Three times in one wave, an agent found only mid-task that its writes were pinned elsewhere, and each time cost a full agent run.\n\nGive every subagent the same step-0 writability check. Tell it explicitly to stop and report if the check is rejected. Forbid the plausible workarounds, and not only the obvious ones. An agent told not to use `cat`\u002F`sed` edited the wrong worktree and `cp`'d the finished file across. It reported that honestly, but it bypassed the guard, and the next agent may not verify as carefully. `cp`, `rsync`, `git checkout` of the path of another worktree, Serena's edit tools and any shell redirection are all bypasses. If writes land in the wrong worktree, stop, and let the orchestrator fix the binding. Work already on disk survives a stopped agent, so resume it with a message and do not restart it.\n\nParallel writes do not yet parallelise the gate. Each worktree has its own Mailpit sidecar, and one suite runs on 4 workers, but every worktree shares the one `php-fpm` container. Nobody has gated two branches at the same time, so do not assume that it works.\n\n## Reusing one worktree for several branches\n\nOnly one worktree is writable at a time, so a wave of branches often runs through a single provisioned worktree. Its directory name then stops matching its branch. That is expected, so do not \"fix\" it.\n\nRun these steps after every `git checkout \u003Cother-branch>` in a reused worktree, before any gate can mean anything:\n\n1. Run `bin\u002Fworktrees\u002Fcompose-exec.sh composer install`. The lockfile differs between branches. A drifted `vendor\u002F` produces errors that look like application bugs. It once reported `Call to undefined method` for a method that the locked package version does define.\n2. Run `bin\u002Fconsole cache:clear` for both `dev` and `--env=test`. If you clear only one, phpstan has no dumped dev container (\"Container ... does not exist\"). A `var\u002Fcache` that survived a Symfony minor upgrade gave a 500 on every page that rendered an icon, and 31 e2e specs failed from that one stale cache.\n3. Run `bin\u002Fconsole doctrine:migrations:status`. A migration from the previous branch shows as executed but unavailable. If it does, reset the dev database (drop, create, migrate), then run `just worktree-up` to seed it again. Otherwise e2e runs against the schema of another branch.\n\nWhen a gate fails right after a branch switch, suspect this list before you suspect the branch.\n\n## Symptoms and causes\n\n| Symptom | Cause and fix |\n|---|---|\n| Worktree URL returns **404** (plain text, no app markup) | The sidecar container is gone, so Traefik has no router for that host. `just worktree-up` recreates it without touching the database. |\n| Every fix run of a card fails in the bridge `before` step with `'\u003Cbranch>' is already used by worktree at '\u003Cpath>'` | A session worktree still holds the pull request branch. `bridge-before.sh` detaches that worktree when it has nothing uncommitted or unpushed, also when `card-\u003Cn>` already exists. Otherwise it stops and names the worktree. Commit and push its work there, then resume the card. Do not run `just worktree-down` before that push, because it force-removes the worktree and deletes uncommitted files. A session that links a pull request to a card hands the branch to the bridge, so tear its worktree down after the push. |\n| Worktree URL returns **502** | The route exists but the backend does not. The usual cause is a worktree removed with a bare `git worktree remove`. Run `just worktree-prune`. |\n| nginx exits with `host not found in upstream \"php-fpm\"` | The container reached the shared network after start. Attach every network at creation. That is why the sidecar is a compose file, and not `docker run` + `docker network connect`. |\n| A class added in the worktree renders unstyled | `var\u002Ftailwind` must be a real directory per worktree, and not a symlink to the one of main. `just worktree-up` fixes it, and `just worktree-tailwind` watches. |\n| Layout looks like an older design, or a hover\u002Fposition spec fails but the page logs nothing | The `tailwind-worktrees` service is down. It keeps a worktree from serving its provision-time CSS while its Twig and PHP are current. Check `docker compose logs tailwind-worktrees`, and run `docker compose up -d tailwind-worktrees` if it is not running. A one-off rebuild is `bin\u002Fworktrees\u002Fcompose-exec.sh bin\u002Fconsole tailwind:build`, under a second. Before you blame the branch, diff the compiled sheet for a class that the design introduced. |\n| The site-review widget shows a red `!` on the launcher, and \"This review widget can't connect\" | The embed names a project that does not resolve at the backend the widget talks to. That backend is `SITE_REVIEW_WIDGET_BACKEND`, not the host that serves the page. A worktree keeps the project id of the main checkout, which production knows. Suspect an `.env.local` with no `SITE_REVIEW_WIDGET_PROJECT`. Also suspect a production project that does not list `https:\u002F\u002F\u003Cslug>.loupe.dev.localhost` under its allowed sites, or a widget branch pointed at its own tree with the production project id. See \"Which backend the widget talks to\". |\n| Widget comments on a card preview save, but the card does not list them | The worktree has no `SITE_REVIEW_WIDGET_CONTEXT` in its `.env.local`, so the comment carries no marker. Run `just worktree-up card-\u003Cnumber> card:\u003CcardId>` again from the main checkout, with the production card id. See \"The card marker\". |\n| The widget says \"This preview's card is closed or gone, so notes cannot be saved here.\" | The marker names a card that the widget backend does not hold. Suspect a widget branch whose `SITE_REVIEW_WIDGET_BACKEND` is its own worktree host, with a production card id. Remove `SITE_REVIEW_WIDGET_CONTEXT` from its `.env.local`, or set `card:\u003Cid>` with a card id from the database of that worktree. See \"The card marker\". |\n| The widget does not appear at all, with no launcher and no error badge | The `\u003Cscript>` failed to load, so nothing ran. A refused sign-in still renders the widget, and an unreachable script renders nothing. Check that the backend host resolves and serves `\u002Flive-review\u002Fwidget.js`. A `SERVFAIL` on `app.loupe.ac` from the resolver of the machine produces exactly this, while the same request succeeds through `1.1.1.1`. |\n| Mail-asserting specs never see their message, or read the message of another run | Each worktree has its own sidecar, so a run must point at it. Suspect a run launched without `just e2e` (which exports `MAILPIT_URL`), or with `E2E_BASE_URL` set alone, which falls back to the shared instance. The app of the worktree then sends where nothing reads. Every registration, login and verification spec times out, and it looks like an auth regression. Set `MAILPIT_URL=https:\u002F\u002Fmailpit-\u003Cslug>.\u003Cproject>.dev.localhost` alongside it. `bin\u002Fe2e-target.sh` prints the Mailpit URL it resolved as its fourth line. |\n| A spec fails, then passes on a quiet re-run | Something else loaded the shared php-fpm, such as a sibling agent that ran `just ci` or `composer install`. Check what is in flight before you investigate the branch. This once nearly filed a false \"regression\" against a clean PR. |\n| `worktree-up` fails with an \"Unrecognized option\" or missing-class error | The new worktree seeded its `vendor\u002F` from a stale main checkout. A fast-forward of the main checkout does not update its `vendor\u002F`, so every worktree created afterwards inherits the dependencies of the old commit. Run `composer install` in the main checkout, then run `just worktree-up` again. |\n| Every e2e spec fails on a new worktree host with `ERR_CERT_AUTHORITY_INVALID`, while existing hosts stay fine | The `traefik-dnsmasq-1` container (in the separate `traefik` stack) is down. It holds `address=\u002Fdev.localhost\u002F172.20.0.2`, the wildcard that lets step-ca resolve a host to validate ACME. Without it, `tls-alpn-01` fails with \"could not connect to validation target\", and Traefik serves its default cert. Hosts already in `certs\u002Facme.json` keep working, so the failure looks worktree-specific. `restart: unless-stopped` does not revive it after an exit 255. Fix it with `( cd ..\u002Ftraefik && docker compose up -d dnsmasq )`. Then restart Traefik too, because it otherwise keeps polling the failed authorization and opens no fresh order. Verify with `curl -o \u002Fdev\u002Fnull -w '%{ssl_verify_result}'` (0 = good) before you blame the branch. |\n| Mail-asserting e2e specs time out against a worktree, or Mailpit has no mail | A missing consumer is not the cause: `PlaywrightSyncMiddleware` handles `X-Playwright` dispatches inline. First check that the Mailpit sidecar of the worktree is up (`just worktree-up` recreates it). Then check that `MAILER_DSN` in the container resolves to `mailpit-\u003Cslug>`. Container environment beats dotenv, so a php-fpm that still carries an old `MAILER_DSN` sends to the shared instance until the main stack is recreated. Otherwise, suspect a request that never carried the header (a context built without the `use` options of the project), or stale state from an interrupted run. |\n| You cannot tell whether an e2e run is already in flight | `ps ax` truncates command lines to terminal width. The `e2e\u002Fnode_modules` of a worktree is a symlink to the main checkout, so every playwright process reports an identical command line, whichever tree launched it. Use `pgrep -f 'playwright test'`. It does not truncate, but it cannot tell trees apart either. Treat any hit as \"someone is running e2e\", and wait. |\n\n## Which backend the widget talks to\n\nThe widget's embed is built from two independent values. When they get out of step, the widget of a worktree breaks. That is the most common way it breaks.\n\n```twig\n\u003Cscript src=\"{{ site_review_widget_backend }}\u002Flive-review\u002Fwidget.js\"\n        data-project=\"{{ site_review_widget_project }}\">\u003C\u002Fscript>\n```\n\n`widget.js` then does `BACKEND = new URL(script.src).origin`. The widget posts to the origin of its script, never to the host that serves the page. So a page on `https:\u002F\u002F\u003Cslug>.loupe.dev.localhost` whose script comes from `https:\u002F\u002Fapp.loupe.ac` sends its comments to production. That is deliberate, because it is how the team dogfoods the app. You annotate the local UI, and the comments land in hosted Loupe, where an agent reads them over MCP. It also means that the project must live on the backend, and not in the local database.\n\n### The rule for a worktree\n\nA worktree points at production, with the production project, so annotating a branch works the way it does everywhere else:\n\n```\nSITE_REVIEW_WIDGET_BACKEND=https:\u002F\u002Fapp.loupe.ac\nSITE_REVIEW_WIDGET_PROJECT=\u003Cthe production project id, same one the main checkout uses>\n```\n\nThe embed carries no credential. The reviewer presses **Sign in with Loupe**, and a pop-up opens on the backend. That project must list the origin of the page under its allowed sites, or the consent page refuses the sign-in. One wildcard entry covers every worktree at once: `https:\u002F\u002F*.loupe.dev.localhost`. Only the owner of the project can sign in.\n\nThe exception is a branch that changes the widget itself: anything under `public\u002Flive-review\u002F` or `src\u002FModule\u002FSiteReview\u002F` that alters widget behaviour. Point that branch at its own tree, so that the code under review is the code you exercise:\n\n```\nSITE_REVIEW_WIDGET_BACKEND=https:\u002F\u002F\u003Cslug>.loupe.dev.localhost\nSITE_REVIEW_WIDGET_PROJECT=\u003Cthe worktree's own project id, see below>\n```\n\nJudge that by what the diff touches, and not by the branch name. A change to `ResolveSiteReviewCommentHandler` is not a widget change. A change to `widget.js` is.\n\n### Bootstrap keeps the pair in step\n\n`worktree-bootstrap.sh` copies `.env.local` from the main checkout, and leaves both `SITE_REVIEW_WIDGET_BACKEND` and `SITE_REVIEW_WIDGET_PROJECT` as it found them. A worktree therefore talks to production with the project that production knows, and the site-review comments of a worktree page land in the real project. You annotate the branch you work on, and read the comments back over MCP like any other site.\n\nBootstrap captures no local project id. It runs `app:dev:seed`, which seeds the full demo dataset in the own database of the worktree, switches on the flags `inbox.enabled`, `artifacts.enabled` and `billing.enabled` with the tag `dev-seed`, and prints the id of \"Dev Project\". Bootstrap sends that output to `\u002Fdev\u002Fnull`. `--keep-flag-defaults` skips only the flag rows, and only the e2e stack passes it.\n\n### The card marker\n\n`just worktree-up NAME CONTEXT` writes `SITE_REVIEW_WIDGET_CONTEXT=CONTEXT` into the `.env.local` of the worktree. The embed carries it as `data-context`, and every widget comment stores it. For a card worktree, `CONTEXT` is `card:\u003CcardId>`. `LinkCardOnSiteReviewCommentCreated` on production then links the comment to that card.\n\nThe marker must name a card in the database of the widget backend, `SITE_REVIEW_WIDGET_BACKEND`. Most card worktrees point the backend at production, so `\u003CcardId>` is the production card id. A card id from the own database of the worktree names no card there.\n\nA branch that changes the widget itself points the backend at its own worktree host (see \"The rule for a worktree\"). A production card id then names no card on that backend, and the widget says \"This preview's card is closed or gone, so notes cannot be saved here.\" For such a branch, pass no marker, or pass `card:\u003Cid>` with a card id from the own database of the worktree.\n\nThe marker is a formal argument all the way:\n\n- The bridge `before` rule passes `{cardId}` to `bin\u002Fworktrees\u002Fbridge-before.sh`, which passes it to bootstrap.\n- The script passes no marker when the `SITE_REVIEW_WIDGET_BACKEND` of the worktree differs from that of the main checkout, so a widget branch keeps the marker it set.\n- On a refresh, the stage skill reads it from the prompt line `Card \u003Cnumber> (cardId \u003Cid>)`. When the prompt lacks it, take `cardId` from `card_get`.\n- Never derive the marker from a branch name, a worktree name or a card number, and do not add code that does.\n\nBootstrap writes the marker only when `CONTEXT` is present. A re-run without it keeps the old value, so a repair never clears a marker. Pass it again on a refresh all the same, because that also fixes a worktree created without it.\n\nA widget branch needs both values changed by hand after provisioning, because bootstrap restores neither. Point the backend at the worktree host. Then run the seed again, and read the project id it prints:\n\n```bash\n( cd .worktrees\u002F\u003Cname> \\\n  && bin\u002Fworktrees\u002Fcompose-exec.sh bin\u002Fconsole app:dev:seed \\\n  | grep SITE_REVIEW_WIDGET_PROJECT )\n```\n\nThe seed is idempotent, so it prints the id of the project it already made. Then add `https:\u002F\u002F\u003Cslug>.loupe.dev.localhost` to the allowed sites of that project, on the own Connect page of the worktree. Sign in as `dev@loupe.test`, which owns the seeded project. The consent page refuses every other account.\n\nTo diagnose a refused sign-in, read the embed that the page serves:\n\n```bash\ncurl -sk https:\u002F\u002F\u003Cslug>.loupe.dev.localhost\u002Flogin \\\n  | grep -A1 'live-review\u002Fwidget\\.js'\n```\n\nThat needs `SITE_REVIEW_WIDGET_PUBLIC` set. Otherwise `templates\u002F_site_review_widget.html.twig` serves the tag to an administrator alone, so read the page in a signed-in browser instead.\n\nRead the two lines together. The origin in `src` says which instance answers, and `data-project` must name a project that instance holds. A local id against production, and a production id against the worktree, both end at \"This review widget can't connect\".\n\n### The preview token\n\nAfter the seed, `worktree-bootstrap.sh` runs `loupe preview-token mint --project \u003CSITE_REVIEW_WIDGET_PROJECT> --label \u003Cslug> --instance \u003CSITE_REVIEW_WIDGET_BACKEND>`, with `--card` from the card marker. It writes the result to `SITE_REVIEW_WIDGET_PREVIEW_TOKEN` in `.env.local`. `worktree-teardown.sh` revokes it. A failed mint prints one warning and writes an empty value, so `worktree-up` never fails for it. The warning means that the CLI is missing, signed out, or signed in to an instance other than the widget backend. A branch whose backend is its own worktree host mints from its own database with `app:dev:preview-token`, with no card.\n\n## Writing worktree tooling\n\nRead `references\u002Ftooling-internals.md` before you write or change a script under `bin\u002Fworktrees\u002F`. It covers helper sourcing, `{{ }}` escaping in `just`, and relative symlink depth.\n\n## Testing\n\nEach worktree gets its own test database through `TEST_TOKEN`, so `just ci` runs in parallel across worktrees safely.\n\nFor the full e2e suite, reach for `just e2e-up` first, and not a worktree. It provisions a disposable `app_e2e` database and a sidecar that serves the main checkout. So it gates whatever branch is checked out there, with no tree, no cert and no seeded database. You can still point e2e at a worktree. That is the right tool when you must gate a branch without checking it out, but it costs more.\n\nRun `just e2e` from a worktree, and it resolves that worktree as its target and its Mailpit, and prints both. It also rebuilds the stylesheet of the worktree, and repairs the dev data that the suite destroys. Every instruction that says \"from the worktree\" needs the worktree as its cwd for that call only, so wrap the `cd` in a subshell:\n\n```sh\n( cd .worktrees\u002F\u003Cname> && just e2e )\n```\n\nA bare `cd` persists across later tool calls. It turns \"run this one command there\" into \"move the session in\", which AGENTS.md forbids for the main session.\n\n`E2E_BASE_URL` still overrides, and aims a run at a worktree from somewhere else. It also suppresses the repair and the per-worktree Mailpit, because an explicit target can be anything. A repair of a tree that nobody chose is worse than no repair, and a guessed mail host is worse than the shared one. Set `MAILPIT_URL` alongside it to aim the mail assertions too.\n\n## Running the full e2e suite from a worktree\n\nThe worktree e2e gate needs these conditions:\n\n1. `DEFAULT_URI=https:\u002F\u002F\u003Cslug>.loupe.dev.localhost` in the `.env.local` of the worktree. Otherwise, CLI-generated absolute URLs (export download emails) point at `localhost`. Check it again after any re-provisioning, because `worktree-up` regenerates `.env.local`.\n2. No worker, and no worktree-scoped `messenger:consume`. The shared `worker` container consumes the database of main only. `PlaywrightSyncMiddleware` handles every message dispatched under `X-Playwright` inline, so there is no queue to drain. The middleware is registered `when@dev` only, which is what a worktree runs.\n3. A quiet stack. During the run, allow no worktree provisioning, no `composer install`, no sibling `just ci`, and no e2e suite of a sibling worktree. A worktree gets its own nginx and Mailpit and nothing else. `php-fpm`, `mercure` and `database` are shared, so any of these skew timings past the Playwright timeouts. Per-worktree databases and mail sidecars make two suites correct together, but not reliable together. The live-update and debounced specs fall over (comment counters, the sliding-confirm overlay, search), and their failures look like real regressions. Run the suite again on a quiet stack before you accept any such failure.\n4. A current stylesheet. `just e2e` runs `tailwind:build` for the detected worktree before it starts Playwright, so this is automatic. A run started any other way still gates against the CSS of provision time. That includes `npx playwright test` directly, or an explicit `E2E_BASE_URL`, which suppresses worktree detection.\n\nNever run the full suite against the live dev database of the main checkout once it holds real data. State-dependent specs fail. Worse, they change live state: a waitlist spec run against main set `registration.cap` and closed registration with no warning.\n",{"name":5,"description":7},"main","b0ae29efd5410c4e5bf9a6ed6aed4b6c1d82e55a",".agents\u002Fskills\u002Fproject-worktrees",0,"https:\u002F\u002Fgithub.com\u002Floupe-ac\u002Floupe","https:\u002F\u002Floupe.ac\u002F","https:\u002F\u002Fgithub.com\u002Floupe-ac","The control plane for your agent loops.","2026-11-15 04:50:14",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add loupe-ac\u002Floupe --skill project-worktrees",{"tool":39,"command":40},"bunx","bunx skills add loupe-ac\u002Floupe --skill project-worktrees",{"tool":42,"command":43},"pnpm","pnpm dlx skills add loupe-ac\u002Floupe --skill project-worktrees","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Floupe-ac\u002Floupe\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproject-worktrees\u002FSKILL.md",true,[47],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Ftooling-internals.md","REFERENCE","参考文档",4232,"https:\u002F\u002Fgithub.com\u002Floupe-ac\u002Floupe\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproject-worktrees\u002Freferences\u002Ftooling-internals.md",[54,61,68,75,82,89],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M75XHSK6MYZ0BH7PJHP378QV","loupe-workers","Use when reading worker runs or bridges through the loupe MCP, stopping, resuming or holding workers, cancelling a bridge command, or recovering workers after a usage limit or network outage.","https:\u002F\u002Fgithub.com\u002Floupe-ac\u002Floupe\u002Fblob\u002Fmain\u002Fplugins\u002Floupe\u002Fskills\u002Floupe-workers\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M75XHPW77P75PPWY8Z7Q9XMZ","loupe-site-review","Use when acting on live-review feedback through the loupe MCP: reading the feedback of a card or project, fixing it, or marking it addressed.","https:\u002F\u002Fgithub.com\u002Floupe-ac\u002Floupe\u002Fblob\u002Fmain\u002Fplugins\u002Floupe\u002Fskills\u002Floupe-site-review\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M75XHK6EZP2FZRQ1B4PS4CGH","loupe-inbox","Use when an agent needs a decision, answer or review from the project owner through the loupe MCP, hands a question or to-do to a person, resumes after an ask closed, or needs its session id.","https:\u002F\u002Fgithub.com\u002Floupe-ac\u002Floupe\u002Fblob\u002Fmain\u002Fplugins\u002Floupe\u002Fskills\u002Floupe-inbox\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M75XHDN9XG71R4T248BZ540A","loupe-documents","Use when writing or revising a document for the Loupe app through the loupe MCP, such as a plan, spec, RFC, audit report or retrospective.","https:\u002F\u002Fgithub.com\u002Floupe-ac\u002Floupe\u002Fblob\u002Fmain\u002Fplugins\u002Floupe\u002Fskills\u002Floupe-documents\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M75XHBERM2SWJ7SJ1EB5M4SB","loupe-discovery","Use when a bridge runs a discovery run of a Loupe project, when a prompt names loupe-discovery, or when writing a readiness report.","https:\u002F\u002Fgithub.com\u002Floupe-ac\u002Floupe\u002Fblob\u002Fmain\u002Fplugins\u002Floupe\u002Fskills\u002Floupe-discovery\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M75XH7X2KCFWPVMQJJAMPYJN","loupe-board","Use when working a Loupe project board through the loupe MCP: reading or writing a card, moving a card, changing the columns, or linking a document or a pull request to a card.","https:\u002F\u002Fgithub.com\u002Floupe-ac\u002Floupe\u002Fblob\u002Fmain\u002Fplugins\u002Floupe\u002Fskills\u002Floupe-board\u002FSKILL.md",[],[]]