From 97d6a5aa76939daadf643b1496ae7c076b3f59ad Mon Sep 17 00:00:00 2001 From: Minsu Lee Date: Fri, 3 Jul 2026 16:26:14 +0900 Subject: [PATCH 1/3] chore: add orca.yaml and .worktreeinclude for worktree setup --- .worktreeinclude | 9 +++++++++ orca.yaml | 17 +++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .worktreeinclude create mode 100644 orca.yaml diff --git a/.worktreeinclude b/.worktreeinclude new file mode 100644 index 0000000..5f6befb --- /dev/null +++ b/.worktreeinclude @@ -0,0 +1,9 @@ +# .worktreeinclude — gitignored local files copied into new worktrees +# (gitignore syntax; a file is copied only if it matches here AND is gitignored) +.env +.env.* +apps/*/.env +packages/*/.env +.claude/settings.local.json +.mcp.local.json +.turbo/config.json diff --git a/orca.yaml b/orca.yaml new file mode 100644 index 0000000..818d8bf --- /dev/null +++ b/orca.yaml @@ -0,0 +1,17 @@ +# orca.yaml — setup script run when Orca creates a worktree. +# +# Orca (a worktree-native IDE for parallel agents) runs scripts.setup whenever it +# creates a new worktree. This file is committed, so the whole team shares it. +# +# Injected environment variables: +# $ORCA_ROOT_PATH — main checkout (root repo) path; the source for copying gitignored local files +# $ORCA_WORKTREE_PATH — the newly created worktree path; the copy target and the setup working directory + +scripts: + setup: | + set -e + # 1. Copy gitignored local files (.env*, .claude/settings.local.json, ...) from the main checkout, + # as listed in .worktreeinclude. + bunx @pleaseai/worktreeinclude "$ORCA_ROOT_PATH" "$ORCA_WORKTREE_PATH" + # 2. Install dependencies inside the worktree. + bun install From 5435463d71a8152d2ade6feee6637e407c3a8e17 Mon Sep 17 00:00:00 2001 From: Minsu Lee Date: Thu, 22 Oct 2026 23:45:37 +0900 Subject: [PATCH 2/3] chore: apply AI code review suggestions - Pin @pleaseai/worktreeinclude to 0.1.0 so worktree setup is reproducible. - Gitignore .mcp.local.json so the .worktreeinclude entry is actually copied. - Run setup through mise (trust, install, exec) to use the bun pinned in mise.toml. --- .gitignore | 3 +++ orca.yaml | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 019c0b0..49823f2 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,9 @@ coverage/ # Claude settings /.claude/settings.local.json +# Local MCP config +/.mcp.local.json + # Please runtime state .please/state/ .please/memory/tasklist.json diff --git a/orca.yaml b/orca.yaml index 818d8bf..5e5a3ef 100644 --- a/orca.yaml +++ b/orca.yaml @@ -10,8 +10,11 @@ scripts: setup: | set -e - # 1. Copy gitignored local files (.env*, .claude/settings.local.json, ...) from the main checkout, + # 1. Trust the new worktree's mise.toml (trust is per-path) and install its pinned tools (node, bun). + mise trust --quiet + mise install + # 2. Copy gitignored local files (.env*, .claude/settings.local.json, ...) from the main checkout, # as listed in .worktreeinclude. - bunx @pleaseai/worktreeinclude "$ORCA_ROOT_PATH" "$ORCA_WORKTREE_PATH" - # 2. Install dependencies inside the worktree. - bun install + mise exec -- bunx @pleaseai/worktreeinclude@0.1.0 "$ORCA_ROOT_PATH" "$ORCA_WORKTREE_PATH" + # 3. Install dependencies inside the worktree. + mise exec -- bun install From 8258acac5338357c6a269a9373afaa96b3711daf Mon Sep 17 00:00:00 2001 From: Minsu Lee Date: Thu, 22 Oct 2026 23:51:48 +0900 Subject: [PATCH 3/3] chore: apply AI code review suggestions Guard the setup script: set -u aborts on an unset ORCA_* variable, and cd "$ORCA_WORKTREE_PATH" pins every step to the new worktree. --- orca.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/orca.yaml b/orca.yaml index 5e5a3ef..7fb1edc 100644 --- a/orca.yaml +++ b/orca.yaml @@ -9,7 +9,9 @@ scripts: setup: | - set -e + # -u aborts on an unset ORCA_* variable; cd pins every step to the new worktree. + set -eu + cd "$ORCA_WORKTREE_PATH" # 1. Trust the new worktree's mise.toml (trust is per-path) and install its pinned tools (node, bun). mise trust --quiet mise install