This file provides guidance to AI agents when working with code in this repository. For full project architecture, see ARCHITECTURE.md.
pnpm build # Build CLI with tsup (output: dist/)
pnpm dev # Run CLI from source via tsx (e.g. pnpm dev -- members list)
pnpm test # Run all tests with vitest
pnpm test:coverage # Run tests with v8 coverage reporting
pnpm check # Lint and format check (Biome via ultracite)
pnpm fix # Auto-fix lint and format issues
pnpm type-check # TypeScript type checking without emitPre-commit hooks run the auto-fix command on staged files via lint-staged. Always run the command before committing or after running pnpm check to see if the issues flagged can be auto-fixed.
This project uses Ultracite, a zero-config preset that enforces strict code quality standards through Biome.
Write code that is accessible, performant, type-safe, and maintainable. Focus on clarity and explicit intent over brevity.
- ESM throughout (
"type": "module"), Node >=20, TypeScript strict mode, target ES2022 - Conventional commits (
feat:,fix:,chore:), release-please automates versioning - Arrow functions for callbacks;
constby default,letwhen needed, nevervar for...ofover.forEach(); template literals over concatenationunknownoverany; type narrowing over assertions- Use
constassertions (as const) for immutable values and literal types - Prefer optional chaining (
?.) and nullish coalescing (??) for safer property access - Early returns over nested conditionals; no
console.login production async/awaitover promise chains; alwaysawaitpromises in async functions- Throw
Errorobjects with descriptive messages, not strings
- Always use conventional commit prefixes (e.g.
feat:). Release-please relies on these to generate changelogs and trigger releases, commits without one will be silently ignored. - Never force push, amend, or rewrite history unless the user explicitly requests it and confirms. Force pushes can break release tracking and cause data loss.
- Never push to
maindirectly unless the user explicitly asks. Default to creating a feature branch and opening a PR. - Run
pnpm build && pnpm test && pnpm checkbefore committing to catch build, test, and lint failures early.
ARCHITECTURE.md: Detailed Project Architecture CONTRIBUTING.md: Project Contribution Guidelines Memberstack CLI Documentation: Memberstack CLI Documentation