code-review
Review code changes and sign off on each rule below.
What to diff: If $ARGUMENTS is provided, use it as the diff target (a branch, commit range, or raw diff). Otherwise diff against origin/main, or the PR base branch if on a PR branch. If ambiguous, ask.
For each rule: PASS if no violations, or FAIL with every violation listed — one per line with file:line.
Rules
-
KSUID only — no uuid/nanoid. The project uses
@langwatch/ksuid. No imports ofuuid,nanoid, orcrypto.randomUUID. -
No foreign keys in Prisma migrations. Prisma relations handle referential integrity. No
REFERENCES,FOREIGN KEY, orADD CONSTRAINT.*FOREIGNin.sqlmigration files. -
Prisma queries include projectId. Every
findMany/findFirst/findUnique/update/deleteon project-scoped models must haveprojectIdin thewhereclause. Skip:User,Organization,OrganizationUser,Session,Account,VerificationToken. -
ClickHouse queries include TenantId. Every ClickHouse query must filter by
TenantIdin the WHERE clause. -
No TypeScript
any. No: any,as any,<any>, orany[]in added code. Ignore comments and eslint-disable lines. -
No hardcoded schema names in migrations. No
"langwatch_db".or other schema prefixes in.sqlfiles. Use unqualified table names.