From 7c629d3b38e556eeeece59f153d7a0eb44f7f357 Mon Sep 17 00:00:00 2001 From: DJ Date: Thu, 26 Mar 2026 20:31:28 -0700 Subject: [PATCH 1/3] Add CLAUDE.md referencing existing AGENTS.md --- CLAUDE.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..0a1d1b7 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,31 @@ +# Google App Scripts — Claude Code Project Context + +This file provides Claude Code-specific instructions. For comprehensive agent guidelines (repo layout, setup, testing, code style, PR reviews), see [AGENTS.md](./AGENTS.md). + +## Quick Reference + +- **Install:** `npm install` +- **Test:** `npm test` +- **Coverage:** `npm test -- --coverage` +- **Lint + Format:** `npm run check` +- **Format:** `npx prettier --write .` + +## Key Rules + +1. **TDD is mandatory** — write tests before implementation, include tests in the same PR +2. **Coverage thresholds** — 100% lines, 95% statements/functions, 85% branches +3. **Never use coverage-ignore comments** or `.skip()` to bypass tests +4. **GAS testing pattern** — extract logic to `src/index.js` with `module.exports`, inject GAS services as parameters +5. **Always run** `npx prettier --write .` before committing — pre-commit hooks don't run in agent sessions +6. **Always run** `npm run check` and `npm test -- --coverage` before committing + +## Architecture + +- `src//code.gs` — Apps Script entry point +- `src//config.gs` — configuration +- `src//src/index.js` — testable extracted logic +- `src//tests/` — Jest unit tests +- `src/gas-utils.js` — shared utilities +- `test-utils/` — shared Jest helpers/mocks + +See [AGENTS.md](./AGENTS.md) for full details. From 64b0e8e0fb6f7e19644a0b973136e438fab837d0 Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Fri, 27 Mar 2026 13:42:19 +0000 Subject: [PATCH 2/3] docs: address CLAUDE.md review comments Agent-Logs-Url: https://github.com/petry-projects/google-app-scripts/sessions/35e9d617-a7f7-4b14-94c6-6d1a20f02848 --- CLAUDE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 0a1d1b7..fd0f43c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -# Google App Scripts — Claude Code Project Context +# Google Apps Script — Claude Code Project Context This file provides Claude Code-specific instructions. For comprehensive agent guidelines (repo layout, setup, testing, code style, PR reviews), see [AGENTS.md](./AGENTS.md). @@ -7,14 +7,14 @@ This file provides Claude Code-specific instructions. For comprehensive agent gu - **Install:** `npm install` - **Test:** `npm test` - **Coverage:** `npm test -- --coverage` -- **Lint + Format:** `npm run check` +- **Lint + format check:** `npm run check` - **Format:** `npx prettier --write .` ## Key Rules 1. **TDD is mandatory** — write tests before implementation, include tests in the same PR 2. **Coverage thresholds** — 100% lines, 95% statements/functions, 85% branches -3. **Never use coverage-ignore comments** or `.skip()` to bypass tests +3. **Avoid coverage-ignore comments and `.skip()`** — only use in rare, unavoidable cases (per AGENTS.md) with clear justification 4. **GAS testing pattern** — extract logic to `src/index.js` with `module.exports`, inject GAS services as parameters 5. **Always run** `npx prettier --write .` before committing — pre-commit hooks don't run in agent sessions 6. **Always run** `npm run check` and `npm test -- --coverage` before committing From 3e7a463dc9835bc7b8948a8a37ce84c6c0f9c5a4 Mon Sep 17 00:00:00 2001 From: DJ Date: Fri, 27 Mar 2026 07:38:21 -0700 Subject: [PATCH 3/3] Remove redundant coverage command, clarify pre-commit instructions npm test already runs jest --coverage per package.json, so the separate coverage entry was redundant. Also clarified the pre-commit rule to note what each command does. Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index fd0f43c..c1f3f20 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -5,8 +5,7 @@ This file provides Claude Code-specific instructions. For comprehensive agent gu ## Quick Reference - **Install:** `npm install` -- **Test:** `npm test` -- **Coverage:** `npm test -- --coverage` +- **Test (includes coverage):** `npm test` - **Lint + format check:** `npm run check` - **Format:** `npx prettier --write .` @@ -17,7 +16,7 @@ This file provides Claude Code-specific instructions. For comprehensive agent gu 3. **Avoid coverage-ignore comments and `.skip()`** — only use in rare, unavoidable cases (per AGENTS.md) with clear justification 4. **GAS testing pattern** — extract logic to `src/index.js` with `module.exports`, inject GAS services as parameters 5. **Always run** `npx prettier --write .` before committing — pre-commit hooks don't run in agent sessions -6. **Always run** `npm run check` and `npm test -- --coverage` before committing +6. **Always run** `npm run check` (lint + format) and `npm test` (tests + coverage) before committing ## Architecture