You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -250,7 +250,7 @@ The Gemini API key must be set as a Script Property (`GEMINI_API_KEY`) in Apps S
250
250
-`appsscript.json` must be in `dist/` for clasp push (the build script copies it)
251
251
- Drive Advanced Service must be enabled in the Apps Script editor AND declared in `appsscript.json`
252
252
-`PropertiesService.getScriptProperties()` is available in custom functions once the add-on has been authorized by the user (opening the menu triggers authorization)
253
-
-`.clasp.json` is committed to the repo and points to the single add-on script project
253
+
-`.clasp.json` is gitignored and must be present locally for clasp commands to work — it is not committed to the repo
254
254
255
255
## Security
256
256
@@ -264,6 +264,35 @@ Changes that always warrant a threat model review before submitting a PR:
264
264
-**New npm dependencies** — affects T10 (build dependency compromise); flag in the PR security checklist
265
265
-**New or changed GCP integrations** — any new Google Cloud service, new Gemini endpoint, new data types sent, or changes to the Files API upload path; review T2, T3, T11, and T14 as a starting point
266
266
267
+
## Git Worktrees
268
+
269
+
Worktrees live in `.claude/worktrees/` (already gitignored). The `EnterWorktree` native tool handles creation. Each worktree must be on a **unique branch** — git enforces this; two worktrees cannot share the same branch simultaneously.
270
+
271
+
### Setting up a new worktree
272
+
273
+
After creating the worktree, run these steps before starting work:
274
+
275
+
1.**Install dependencies** — `node_modules/` is gitignored and absent in fresh worktrees:
276
+
```bash
277
+
npm install
278
+
```
279
+
280
+
2.**Symlink `.clasp.json`** — only needed if you plan to deploy and test against the dev sheet. `.clasp.json` is gitignored so it won't be present. Symlink from the main workspace so all worktrees share the same target script project:
Skip this step for work that doesn't require a live deployment test (e.g. pure logic changes covered by tests).
285
+
286
+
3.**Deploy from only one worktree at a time** — all worktrees share the same Apps Script project. Running `deploy:watch` from two worktrees simultaneously produces a mixed build. Consciously choose which worktree is "active" for live testing.
287
+
288
+
### Finishing a worktree
289
+
290
+
When the feature is ready, open a PR against `develop` (see [Branch Naming](#branch-naming) and [Creating PRs](#creating-prs) below). Once the PR is merged, delete the worktree:
0 commit comments