[{"data":1,"prerenderedAt":401},["ShallowReactive",2],{"figure-telemetry":3,"menu-audits":6,"menu-decisions":7,"menu-projects":23,"menu-workflows":99,"decision-0007-parallel-dev-envs":116},{"value":4,"alert":5},"18%",false,[],[8,11,14,17,20],{"label":9,"to":10},"0041 The visitor view becomes its own app, and the portal reads only as a developer platform","\u002Fdecisions\u002F0041-personal-site-splits-from-developer-portal",{"label":12,"to":13},"0040 Visitors land on the front page and toggle to the developer view","\u002Fdecisions\u002F0040-developer-portal-visitor-structure",{"label":15,"to":16},"0039 The developer portal is redesigned for visitors, from a twelve-site benchmark","\u002Fdecisions\u002F0039-developer-portal-benchmark",{"label":18,"to":19},"0038 Marina Roustan's discovery","\u002Fdecisions\u002F0038-marina-roustan-discovery",{"label":21,"to":22},"0013 New linters: the robustness gap is tsconfig and enforcement, not plugins","\u002Fdecisions\u002F0013-linter-coverage",[24,29,60,83],{"labelKey":25,"icon":26,"to":27,"badge":28},"app.menu.allProjects","i-lucide-layers","\u002Fprojects","11",{"labelKey":30,"icon":31,"to":32,"badge":33,"children":34},"app.menu.kinds.apps","i-lucide-app-window","\u002Fprojects?kind=apps","5",[35,40,45,50,55],{"label":36,"icon":31,"to":37,"badge":38,"coverage":39},"developer-portal","\u002Fprojects\u002Fdeveloper-portal","94%",94.37,{"label":41,"icon":31,"to":42,"badge":43,"coverage":44},"huella-legal","\u002Fprojects\u002Fhuella-legal","97%",97.48,{"label":46,"icon":31,"to":47,"badge":48,"coverage":49},"marina-roustan","\u002Fprojects\u002Fmarina-roustan","100%",100,{"label":51,"icon":31,"to":52,"badge":53,"coverage":54},"portfolio","\u002Fprojects\u002Fportfolio","91%",91.31,{"label":56,"icon":31,"to":57,"badge":58,"coverage":59},"wp-editor","\u002Fprojects\u002Fwp-editor","50%",49.89,{"labelKey":61,"icon":62,"to":63,"badge":64,"children":65},"app.menu.kinds.packages","i-lucide-package","\u002Fprojects?kind=packages","4",[66,71,75,80],{"label":67,"icon":62,"to":68,"badge":69,"coverage":70},"configs","\u002Fprojects\u002Fconfigs","76%",75.7,{"label":72,"icon":62,"to":73,"badge":48,"coverage":74},"content","\u002Fprojects\u002Fcontent",99.58,{"label":76,"icon":62,"to":77,"badge":78,"coverage":79},"i18n","\u002Fprojects\u002Fi18n","99%",99.08,{"label":81,"icon":62,"to":82,"badge":48,"coverage":49},"observability","\u002Fprojects\u002Fobservability",{"labelKey":84,"icon":85,"to":86,"badge":87,"children":88},"app.menu.kinds.infrastructure","i-lucide-server","\u002Fprojects?kind=infrastructure","2",[89,94],{"label":90,"icon":85,"to":91,"badge":92,"coverage":93},"scripts","\u002Fprojects\u002Fscripts","79%",78.6,{"label":95,"icon":85,"to":96,"badge":97,"coverage":98},"translations","\u002Fprojects\u002Ftranslations","93%",93.33,[100,103,106,109,112],{"label":101,"to":102},"Huella Legal","\u002Fworkflows\u002Fhuella-legal",{"label":104,"to":105},"Marina Roustan","\u002Fworkflows\u002Fmarina-roustan",{"label":107,"to":108},"Developer portal front door","\u002Fworkflows\u002Fdeveloper-portal-front-door",{"label":110,"to":111},"Huella Legal editorial","\u002Fworkflows\u002Fhuella-legal-editorial",{"labelKey":113,"icon":114,"to":115},"app.menu.newProject","i-lucide-plus","\u002Fworkflows\u002Fnew",{"id":117,"title":118,"body":119,"description":382,"extension":390,"kind":391,"meta":392,"navigation":396,"path":397,"seo":398,"stem":399,"url":391,"verdict":391,"__hash__":400},"docs\u002Fdocs\u002Fdecisions\u002F0007-parallel-dev-envs.md","🧭 Parallel dev environments across worktrees",{"type":120,"value":121,"toc":381},"minimark",[122,126,131,181,185,188,224,252,256,346,350,365,369],[123,124,118],"h1",{"id":125},"parallel-dev-environments-across-worktrees",[127,128,130],"h2",{"id":129},"context","Context",[132,133,134,135,138,139,141,142,145,146,148,149,152,153,156,157,160,161,164,165,167,168,170,171,174,175,177,178,180],"p",{},"Running multiple git worktrees at once (multiple branches, or multiple agents) means running this\nrepo's dev servers side by side. Four projects can be run locally: ",[136,137,36],"code",{}," (Nuxt dev),\n",[136,140,41],{}," (Nuxt dev, plus ",[136,143,144],{},"preview"," after a build), ",[136,147,95],{}," (",[136,150,151],{},"pnpm dev","\u002F",[136,154,155],{},"serve",", plus\n",[136,158,159],{},"docker:up","), and ",[136,162,163],{},"@joinery\u002Fui","'s Storybook — up to 7 ports per worktree, one of them\n(",[136,166,95],{},") also reachable by ",[136,169,41],{}," over HTTP rather than run standalone. None of the\nNuxt or Storybook ports are configurable today, so running the same project from two worktrees\ncollides on whichever default port it picks. The question: is a one-line-per-app ",[136,172,173],{},"PORT"," fallback\nenough, or does the cross-service case (",[136,176,41],{}," → ",[136,179,95],{},") need a per-worktree\ncoordination script.",[127,182,184],{"id":183},"result","Result",[132,186,187],{},"The problem splits into two independent parts that the two options solve unevenly:",[189,190,191,199],"ul",{},[192,193,194,198],"li",{},[195,196,197],"strong",{},"Collision-avoidance"," — the same dev server bound twice by two worktrees. This applies to all 4\nprojects and has nothing to do with worktrees specifically; it's just two processes on one port.",[192,200,201,204,205,209,210,212,213,216,217,219,220,223],{},[195,202,203],{},"Sibling discovery"," — one project's dev instance needing to find ",[206,207,208],"em",{},"its own worktree's"," copy of\nanother project, not some other worktree's. Today this applies to exactly one pair:\n",[136,211,41],{}," reading ",[136,214,215],{},"NUXT_TRANSLATIONS_VENDOR_BASE_URL"," to reach ",[136,218,95],{},", and only when\nthe ",[136,221,222],{},"internal"," i18n vendor is selected instead of Tolgee.",[132,225,226,228,229,232,233,235,236,152,238,240,241,244,245,248,249,251],{},[136,227,95],{}," already half-solves its own piece: the Node process\n(",[136,230,231],{},"server\u002Fsrc\u002Fconfigs\u002Fconstants.ts",") reads ",[136,234,173],{}," from the environment, so ",[136,237,151],{},[136,239,155],{}," in two\nworktrees can already be pointed at different ports by hand. Its Docker path can't —\n",[136,242,243],{},"docker\u002Fcompose.yaml"," hardcodes ",[136,246,247],{},"127.0.0.1:4000:4000"," — and nothing anywhere generates\n",[136,250,215],{}," to match, so today that value is set once by hand and silently\ngoes stale for whichever worktree didn't set it last.",[127,253,255],{"id":254},"options-considered","Options considered",[257,258,259,275],"table",{},[260,261,262],"thead",{},[263,264,265,269,272],"tr",{},[266,267,268],"th",{},"Option",[266,270,271],{},"Pros",[266,273,274],{},"Cons",[276,277,278,318],"tbody",{},[263,279,280,305,312],{},[281,282,283,289,290,292,293,296,297,300,301,304],"td",{},[195,284,285,286,288],{},"A — per-app ",[136,287,173],{}," env fallback."," Each of the 4 dev commands reads ",[136,291,173],{}," (or Nuxt's own ",[136,294,295],{},"devServer.port",") with its current default as fallback; ",[136,298,299],{},"docker compose"," maps ",[136,302,303],{},"${PORT:-4000}:${PORT:-4000}",". No new files.",[281,306,307,308,311],{},"One line per project; no new script or infra to maintain; solves collision-avoidance for all 4 projects immediately; nothing to keep in sync with ",[136,309,310],{},"git worktree"," internals.",[281,313,314,315,317],{},"Solves nothing about sibling discovery — ",[136,316,215],{}," still has to be set by hand per worktree and still goes stale silently; running N worktrees still means a person picking N different port numbers themselves, just with the mechanism to accept them now in place.",[263,319,320,333,336],{},[281,321,322,325,326,329,330,332],{},[195,323,324],{},"B — per-worktree base-port derivation script."," A script under ",[136,327,328],{},"infrastructure\u002Fscripts"," derives a base port from the worktree (path or branch) and writes each project's port plus ",[136,331,215],{}," for that worktree.",[281,334,335],{},"Solves both halves — collision-avoidance and sibling discovery — and removes the manual, silently-stale env value entirely; matches the pattern in the article that prompted this decision.",[281,337,338,339,341,342,345],{},"New script plus its own tests\u002FREADME under ",[136,340,328],{},", one more thing to keep working as projects are added or removed; needs its own decision about ",[206,343,344],{},"how"," a \"worktree\" is identified (path hash? branch name?) that option A never has to make; over-solves the 3 projects that have no sibling to discover.",[127,347,349],{"id":348},"consequences","Consequences",[132,351,352,353,355,356,358,359,361,362,364],{},"Adopting A unblocks running any of the 4 projects from two worktrees without a collision, today,\nwith no new code to maintain — but leaves ",[136,354,41],{},"↔",[136,357,95],{}," coordination manual, which\nis fine as long as that pairing stays rare (Tolgee is the current default vendor) and gets\nrevisited if the ",[136,360,222],{}," vendor becomes the norm. Adopting B removes that manual step but commits\nto a new script with its own maintenance surface and a \"what identifies a worktree\" decision this\ndecision didn't need to make. The two options aren't mutually exclusive: nothing here forecloses\nstarting with A and adding B's script later purely for the sibling-discovery half, once or if the\n",[136,363,222],{}," i18n vendor becomes the default.",[127,366,368],{"id":367},"confirmation","Confirmation",[132,370,371,372,374,375,377,378,380],{},"Neither option is implemented. Once A lands: the same project started from two worktrees binds two\ndifferent ports without a manually exported ",[136,373,173],{},". Once B lands: a script under\n",[136,376,328],{}," derives that port and rewrites ",[136,379,215],{}," per\nworktree, checked by that script's own spec.",{"title":382,"searchDepth":383,"depth":383,"links":384},"",2,[385,386,387,388,389],{"id":129,"depth":383,"text":130},{"id":183,"depth":383,"text":184},{"id":254,"depth":383,"text":255},{"id":348,"depth":383,"text":349},{"id":367,"depth":383,"text":368},"md",null,{"issue":393,"status":394,"decision":395},38,"wont-implement","accepted",true,"\u002Fdocs\u002Fdecisions\u002F0007-parallel-dev-envs",{"title":118,"description":382},"docs\u002Fdecisions\u002F0007-parallel-dev-envs","XsCY32BlfJEoBMF_Qnc5lRpSBFM0NbimbjYcNrlWCN8",1795478398219]