01 / Contribution etiquette
Make a size limit measurable and scoped
The guide counts additions plus deletions and code files, while excluding documentation, lockfiles, and generated artifacts. It then offers layer, feature, preparatory-refactor, and dependency-order splits.
Source excerpt starting at line 41.41- **Lines changed**: Keep PRs under 500 lines of code (additions + deletions)42- **Files changed**: Keep PRs under 10 code files43- **Single responsibility**: Each PR should do one thing well
02 / Good and bad pairs
Connect field selection to sensitive-data exposure
Prisma examples contrast explicit select fields with include fetching an entire related record. The prohibitions separately name credential.key as a field that must never be exposed.
Source excerpt starting at line 175.175// Bad - Include fetches all fields including sensitive ones176const booking = await prisma.booking.findFirst({177 include: { user: true }178});
03 / Behavioral framing
State the local exception to a repository-wide import rule
The root favors direct source imports, but API v2 lacks path mappings for two packages. Its section requires re-exporting through platform-libraries and shows both steps and the failing direct import.
Source excerpt starting at line 195.195When importing from `@calcom/features` or `@calcom/trpc` into `apps/api/v2`, **do not import directly** because the API v2 app's `tsconfig.json` doesn't have path mappings for these modules, which causes "module not found" errors.
04 / Router files
Keep a larger planning workflow opt-in
Spec-driven development is offered for complex features, but its presence does not make it mandatory. The guide names the explicit user trigger and points to the separate workflow document.
Source excerpt starting at line 231.231For complex features, you can use spec-driven development when explicitly requested.