Imported from Hilzu/tasan (
AGENTS.md). Install upstream withnpx skills add Hilzu/tasan. Copyright stays with the author.
AGENTS.md
This file applies to the entire repository.
Project overview
Tasan is a pnpm workspace for a bill-splitting web application. It uses Node.js 24, TypeScript with ESM and strict type checking, React 19, React Router 8, Tailwind CSS 4, DynamoDB, and AWS CDK.
Workspace packages:
packages/common: shared domain utilities, validation, currency, graph, ID, and tracing code.packages/data: DynamoDB clients and persistence models.packages/web: the full-stack React Router application and the repository's current tests.packages/infra: AWS CDK stacks and Lambda/CloudFront entry points.packages/export: split export CLI/job.packages/benchmark: Lambda benchmark utility.
Tooling and commands
- Use
pnpm; do not introduce npm or Yarn lockfiles. - Use the Node.js and pnpm versions specified in
.tool-versions. - Install dependencies with
pnpm installfrom the repository root. - Run all checks with
pnpm test. This runs package tests, formatting checks, ESLint, and TypeScript checks. - Build all packages with
pnpm build. - Start the web development server with
pnpm --filter @tasan/web dev. - Run a single web test file with
pnpm --filter @tasan/web exec tsx --test path/to/file.test.ts. - Format and auto-fix the repository with
pnpm fix; note that this can touch files outside the immediate change.
Prefer the narrowest relevant check while iterating, then run pnpm test before handing off when practical.
Code conventions
- Keep TypeScript strict and ESM-native. Use
import/exportand Node built-ins with thenode:prefix. - Use
import typefor type-only imports. Keep imports and exports sorted according to the ESLint configuration. - Follow the existing Prettier configuration, including the Tailwind class sorter. Do not hand-format around it.
- Preserve package boundaries. Put broadly reusable domain logic in
common, persistence concerns indata, UI and request handling inweb, and deployment concerns ininfra. - Use workspace package imports such as
@tasan/common/...and@tasan/datainstead of reaching into another package's source tree. - Follow nearby naming and file-layout patterns. React Router routes are registered in
packages/web/app/routes.ts; reusable UI belongs inpackages/web/app/components. - Add or update focused
*.test.tsfiles for behavior changes where feasible. Tests use Node's built-in test runner throughtsx --test.
Generated files and infrastructure
- Do not edit generated output in
dist/,build/,.react-router/, orcdk.out/. Change source files and regenerate output instead. - Do not commit dependencies under
node_modules/. - Treat AWS operations as externally mutating.
cdk:diffandcdk:synthare suitable for validation; do not rundeploy, create cloud resources, or change live data unless explicitly requested. - Do not assume AWS credentials or production environment variables are available. The web environment template is
packages/web/example.env.
Change discipline
- Keep changes scoped to the request and preserve unrelated working-tree modifications.
- Do not add dependencies unless the existing platform cannot reasonably support the change. If one is needed, add it to the package that uses it with the appropriate
pnpmcommand. - Never edit
pnpm-lock.yamlmanually. It may only be updated bypnpmcommands. - Update documentation when commands, package responsibilities, configuration, or user-visible behavior change.
- In the handoff, summarize changed files and report the exact validation commands run, including any failures or checks that could not be run.