This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
- Setup:
mise install && pnpm i - Build:
pnpm build(bundles into dist/ via @vercel/ncc) - Test:
pnpm test(vitest), single file:pnpm vitest run src/<file>.test.ts - Lint:
pnpm lint - Format:
pnpm format(eslint --fix + prettier) - Typecheck:
pnpm typecheck - Generate:
pnpm generate(docs, inputs, unicode-regex + format)
dist/ is committed to the repository (required for GitHub Actions). CI verifies that dist/ matches the build output and generated files have no drift.
After changes:
- Run
pnpm buildto rebuild dist/ - Run
pnpm generateif you modified action.yaml inputs, unicode handling, or documentation - Commit the updated dist/ and any generated file changes
- Prefer
typeoverinterfacefor TypeScript type definitions - Use parjs (parser combinator library) for parsing logic, not regex
- ESM modules (
"type": "module") - Conventional commits enforced via commitlint
- Prettier: 120 char width, single quotes, trailing commas
All source code, comments, commit messages, and documentation must be written in English.