This file provides guidance to AI coding assistants when working with code in this repository.
Important: You must follow these rules and its language-specific rules referenced in that file.
When you make changes to the project that affect how AI agents should work with the codebase, update this file accordingly. This includes changes to:
- Overall folder structure
- Tech stack (frameworks, libraries, languages)
- npm scripts and development commands
- Testing approaches
- Build and deployment processes
Important: Keep this file concise. Only include information that is relevant for most or all development tasks. Omit specific implementation details that don't affect how agents interact with the codebase.
This project uses npm scripts for all development tasks:
- Test all:
npm test- Runs all tests in parallel (format, lint, types, unit) - Unit tests:
npm run test:unit- Run Vitest tests once - Watch tests:
npm run vitest- Run Vitest in watch mode - Lint:
npm run test:lint- ESLint with zero warnings allowed - Type check:
npm run test:types- TypeScript compiler check - Format check:
npm run test:format- Prettier format validation
Important: Use the typescript-lsp MCP to get diagnostics and type information Important: Use the vitest-server MCP to run individual tests. Important: Use the eslint MCP to check for linting errors.
- Source:
src/- All source code and tests - Entry:
src/index.ts; public API re-exported viasrc/exports/main.exports.ts,csv.exports.ts,mocks.exports.ts - Core:
src/clockodo.ts(Clockodo client),src/lib/(api, mappings, requests, etc.) - Models:
src/models/- TypeScript types and mocks for API entities (entry, customer, project, etc.) - Tests: Co-located with source using
.test.tssuffix; integration test insrc/integration.test.ts - Configuration: Uses
@peerigon/configsfor shared TypeScript, ESLint, and Prettier configs
- SDK methods live on the Clockodo class in
src/clockodo.ts; API calls go throughsrc/lib/api.ts - Request/response keys are mapped to camelCase in
src/lib/mappings.ts - Uses ES module syntax throughout (
.tsextensions in imports) - Keep
README.mdAPI method documentation in sync whenever public SDK methods are added, removed, or renamed
If user is asking you to pull in updates from the upstream repository, you can do so by following these steps:
git fetch upstream
git merge --strategy-option theirs --no-commit upstream/main
This will:
- Prefer template files in conflicts (
--strategy-option theirs) - Stage changes without committing (
--no-commit)
Restore project-specific files and changes:
- package.json: Restore original dependencies but keep the dependency updates from the upstream repository
- README.md: Restore original project documentation
- AGENTS.md: Restore project specific instructions and include changes from the upstream repository
- src/: Restore project specific source code and include changes from the upstream repository
- Run
npm installto update lockfile - Run
npm testto verify everything works - Review
git statusandgit diff --stagedfor unexpected changes
IMPORTANT: Stage your changes, but do not commit. Ask the user to review the changes first.