Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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).

## Quick Reference

- **Install:** `npm install`
- **Test (includes coverage):** `npm test`
- **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. **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` (lint + format) and `npm test` (tests + coverage) before committing

## Architecture

- `src/<script-name>/code.gs` — Apps Script entry point
- `src/<script-name>/config.gs` — configuration
- `src/<script-name>/src/index.js` — testable extracted logic
- `src/<script-name>/tests/` — Jest unit tests
- `src/gas-utils.js` — shared utilities
- `test-utils/` — shared Jest helpers/mocks

See [AGENTS.md](./AGENTS.md) for full details.
Loading