Skip to content

Rules

260 rules

Rule Category
TS duplicate-test-body Disallow substantial sibling tests with the same body shape; express their differing inputs as a parameterized case table. testing
TS enforce-file-structure Require imports before body statements and require `use server` to be the first statement. correctness
TS excessive-commentary Flag long standalone implementation commentary that should be expressed by code. maintainability
TS iac-source-coupled-test Disallow raw IaC source text as a test oracle; inspect a rendered plan, provider state, or runtime behavior. testing
TS interface-contract-members-private Require methods outside an implemented interface contract to use ECMAScript private names. architecture
TS no-bare-return-from-test-catch Disallow a bare return from a test catch block when it skips a later assertion. testing
TS no-bespoke-api-case-conversion Review direct snake_case/camelCase mirror mappings on explicitly API-typed adapter values. architecture
TS no-broad-return-type Report explicit broad return annotations that erase a known return value. maintainability
TS no-client-side-data-fetching Disallow direct data fetching inside `useEffect` or `useLayoutEffect`. performance
TS no-comment-cruft Flag commented-out code, section-banner comments, and leading file-header comment preambles. maintainability
TS no-conditional-empty-object-spread Build conditional properties explicitly instead of spreading an empty-object branch. style
TS no-cors-wildcard-with-credentials Disallow wildcard CORS origins when credentials are enabled. security
TS no-dangerously-allow-svg Next.js image configuration enables SVG rendering without the required response hardening security
TS no-declaration-comment-wall Flag an enum body or class body whose member comments mostly re-spell the members' own names. maintainability
TS no-detached-global-fetch Keep the ambient global fetch receiver-safe when storing or explicitly rebinding it. correctness
TS no-duplicate-lifecycle-refresh-listeners Do not register one Next.js route-refresh callback for both focus and visibilitychange. performance
TS no-dynamic-sql Disallow runtime values embedded inside quoted SQL values passed to statement-execution methods. security
TS no-enum Disallow TypeScript `enum`; use string-literal unions or `as const` objects instead. maintainability
TS no-excessive-cognitive-complexity Report an error for function bodies with cognitive complexity above 20. maintainability
TS no-fat-try-blocks Review try blocks exceeding the configured count of syntactically selected operations. correctness
TS no-first-party-module-mock Prefer injected collaborators over mocking maintained first-party modules in tests. testing
TS no-generic-single-export-module Disallow generic module stems when one runtime export already names the responsibility. maintainability
TS no-hand-rolled-sleep Disallow uncancellable promisified timers and timeout arms. correctness
TS no-hand-rolled-spinner Disallow intrinsic elements styled as Tailwind border-ring spinners outside the design-system implementation. maintainability
TS no-impossible-zod-literal-bounds Disallow same-chain literal Zod bounds whose accepted set is mathematically empty. correctness
TS no-in-operator-on-built-in-collections Do not use the `in` operator to test entries in built-in Map and Set collections. correctness
TS no-insecure-random-id Disallow using `Math.random()` to generate identifiers, tokens, or secrets; use `crypto.randomUUID()` or `crypto.getRandomValues(...)` instead. security
TS no-json-stringify-error Avoid generic JSON serialization that can omit native Error details. correctness
TS no-json-stringify-object-equality Do not use JSON serialization as structural object equality. correctness
TS no-known-value-widening Preserve a known value's contract instead of widening a local binding to unknown, object, or an unknown-valued dictionary. maintainability
TS no-log-only-catch Disallow `catch` clauses that only log (or silently do nothing) and then swallow the error; rethrow or handle it instead. correctness
TS no-long-comment Flag unusually large unstructured JSDoc blocks in implementation code. maintainability
TS no-offset-pagination Prefer keyset pagination for embedded SQL queries using OFFSET. performance
TS no-positional-tuple-return Disallow returning a multi-field tuple from a named function; return a named object so call sites cannot mismatch slots. maintainability
TS no-production-browser-source-maps Next.js production browser source maps expose application source security
TS no-raw-env Disallow direct `process.env` and `import.meta.env` reads outside validated boundaries. correctness
TS no-raw-fetch-outside-clients Disallow calling the global `fetch` outside the client layer; route outbound HTTP through a client module that owns retry, timeout and status handling. architecture
TS no-reduce-accumulator-copy Review copies of the accumulated collection inside a built-in reduce callback. performance
TS no-redundant-optional-array-default Remove `.optional()` immediately inside a Zod array default. maintainability
TS no-repeated-string-literal Disallow a long structured string literal repeated across functions; the copies drift when one is edited. Extract a module-level constant. maintainability
TS no-restated-comment Flag short standalone comments that repeat the adjacent statement's identifiers. maintainability
TS no-restated-jsdoc Flag JSDoc prose that appears to repeat declaration names without adding behavioral information. maintainability
TS no-restricted-library-load Apply configured library restrictions to literal runtime loads and CommonJS resolution references. architecture
TS no-router-refresh-polling Do not poll by calling a Next.js router's refresh method from a timer. performance
TS no-secret-in-log Disallow passing a secret-named value or a raw request/response blob to a logging call; both leak to log sinks. Redact or omit. security
TS no-select-star Prefer explicit column projections over SELECT * in embedded SQL. correctness
TS no-sentinel-return-on-catch Disallow swallowing a caught error by returning an empty sentinel unless the error is handled or the sentinel is part of the function contract. correctness
TS no-server-env-in-client-component server-only environment settings imported by a client component correctness
TS no-silent-promise-catch Disallow `.catch()` and second-argument `.then()` handlers that silently swallow a rejection; log, rethrow, or handle the error. correctness
TS no-sleep-in-test-body Avoid fixed timed sleeps directly in test bodies; synchronize on observable behavior or use controlled timers. testing
TS no-storage-in-stateless-modules Disallow SQL or key/value access inside configured stateless modules; derive state from a system of record instead. architecture
TS no-string-concat-in-loop Prefer collecting string fragments over repeatedly accumulating a growing string inside a loop. performance
TS no-tautological-expect Disallow supported literal-only assertions that are statically known to pass. testing
TS no-trailing-value-narration Flag a trailing comment that repeats the line's numeric value only to name its unit. maintainability
TS no-type-member-comment-wall Flag an object type whose member comments mostly re-spell the members' own names and types. maintainability
TS no-typed-doc-sections Reject typed-signature repetition while preserving behavior that types cannot express. maintainability
TS no-union-in-comment Flag a comment that lists a `string` field's allowed values instead of the type listing them. maintainability
TS no-unlocalized-jsx-attributes Require translation for literal user-visible JSX attributes in opted-in localized interfaces. correctness
TS no-unlocalized-jsx-text Require translation for literal JSX text in opted-in localized interfaces. correctness
TS no-unlocalized-toast Require translation for literal toast messages in opted-in localized interfaces. correctness
TS no-unnecessary-use-client Flag `'use client'` files with no hooks or event handlers — they could be RSC. performance
TS no-unsafe-mock-casting Disallow casting to mock types like `jest.Mock` or `vi.Mock`. Use `vi.mocked()` or `jest.mocked()` instead. testing
TS no-unsafe-test-double-cast Disallow mock-backed test doubles that bypass collaborator contracts through double assertions. testing
TS no-vague-suppression-description Require suppression descriptions to name the concrete mismatch or invariant instead of a generic non-reason. maintainability
TS no-zod-native-enum Disallow `z.nativeEnum()` (and `z.enum()` over a TypeScript enum); use `z.enum(["a", "b"])` with a string-literal union instead. maintainability
TS prefer-await-in-async-return Prefer explicit `await` when an async function directly returns one typed Promise `.then` transform. maintainability
TS prefer-constant-time-secret-compare Prefer a supported constant-time comparison primitive for secret-like values. security
TS prefer-discriminated-union Flag flat result objects with a required positive boolean status and optional success/failure payloads. correctness
TS prefer-ecmascript-private-members Prefer ECMAScript `#private` class members over TypeScript-only `private` members. maintainability
TS prefer-immutable-module-constant Require module-level constant collections to expose readonly state. correctness
TS prefer-input-group-search Require search icons and shared Input controls in the same visual wrapper to use InputGroup. style
TS prefer-logical-tailwind-utilities Prefer logical Tailwind utilities in explicitly opted-in bidirectional interfaces. correctness
TS prefer-millisecond-control-duration-schema Require application-owned Zod control-duration fields to use millisecond granularity. correctness
TS prefer-module-level-constant Hoist literal-only constant collections and regexes out of function bodies to module scope so they are allocated once. performance
TS prefer-module-level-refined-schema Declare closed Zod scalar, format, and wrapper schemas at module scope. performance
TS prefer-module-level-schema Declare a Zod schema at module scope when it closes over nothing in the enclosing function performance
TS prefer-multi-value-zod-literal Use the Zod 4 multi-value literal API instead of a union of literal schemas. maintainability
TS prefer-named-callback-domain Name literal-union domains used by callbacks in exported contracts. maintainability
TS prefer-named-complex-return-type Prefer a named contract for structurally complex function return types. maintainability
TS prefer-native-random-uuid Prefer `globalThis.crypto.randomUUID()` over resolved zero-argument UUID v4 bindings from the `uuid` package. maintainability
TS prefer-node-crypto-hash Prefer the modern one-shot node:crypto hash API when streaming state is unnecessary. performance
TS prefer-node-fs-promises Prefer promise-based Node.js filesystem APIs over synchronous calls in production modules. performance
TS prefer-non-nullable-collection Suggest reviewing nullish arrays that use local empty-array defaults or a shared null-or-empty guard. maintainability
TS prefer-nullish-filter-predicate Prefer an explicit nullish predicate when `filter(Boolean)` removes only nullish values but does not narrow the result type. correctness
TS prefer-schema-for-api-payload Require Zod (or similar) schema validation on `response.json()` / `JSON.parse()` results before property access. correctness
TS prefer-semantic-colors Enforce semantic color tokens over raw Tailwind palette classes, arbitrary color values, and inline color literals. style
TS prefer-server-actions Prefer Next.js Server Actions over same-origin API mutations. architecture
TS prefer-shadcn-primitives Require visible raw JSX controls to use the corresponding shared shadcn primitive. style
TS prefer-shared-zod-enum Give repeated literal Zod enum domains one reusable module-level schema. maintainability
TS prefer-switch-for-repeated-equality Prefer switch over long if/else-if chains that compare one value for strict equality. maintainability
TS prefer-typed-reflection Prefer typed access when Reflect.get or Reflect.apply discards a known contract. maintainability
TS prefer-whole-object-assertion Collapse consecutive assertions on one object into a whole-object assertion so related mismatches are reported together. testing
TS prefer-zod-infer Derive a type from its Zod schema with `z.infer` instead of hand-writing a twin declaration beside it. correctness
TS prefer-zod-parse-output-type Derive a function's return contract from the local Zod schema whose parsed output it returns. correctness
TS repeated-static-call-cases Review three or more consecutive static-input call assertions as potential named cases. testing
TS require-assert-never Require an empty switch default to call `assertNever` so discriminated unions remain exhaustive at compile time. correctness
TS require-button-accessible-name Require an accessible name on statically unnamed native or configured JSX buttons. correctness
TS require-camelcase-properties Require unquoted lower snake_case TypeScript properties and dot access to use camelCase. style
TS require-fetch-timeout Require an explicit abort signal on locally analyzable global fetch calls. correctness
TS require-interface-for-exported-class Require exported concrete classes with public behavior to declare a contract. architecture
TS require-pascal-case-zod-schema-name Require confirmed module-level Zod schema contracts to use PascalCase with a `Schema` suffix. style
TS require-port-for-service Advise when an exported service with injected collaborators has public methods not covered by its declared ports. architecture
TS require-sql-access-class Keep SQL reads and writes inside a class that receives its database dependency. architecture
TS require-static-next-matcher Require Next.js middleware and proxy matcher configuration to contain only build-time literals. correctness
TS require-svg-accessible-name Require a name or explicit decorative semantics on inline SVG elements. correctness
TS require-use-form-default-values Require explicit form-level initialization or a field default for directly bound Controller fields. correctness
TS require-use-server-in-actions-file route action module missing the use server directive correctness
TS require-zod-form-validation Require Zod validation (`Schema.parse(...)` / `Schema.safeParse(...)`) when reading values out of a `FormData` object. security
TS sole-export-matches-filename Make a module filename reflect its sole named public runtime export. maintainability
TS source-coupled-test Disallow raw repository source text as a test oracle; parse or execute the artifact instead. testing
TS stepdown Place a private helper below its sole direct same-scope caller. maintainability
TS store-insert-requires-on-conflict Review conflict handling for embedded inserts in replay-named callables. correctness
TS test-loops-over-literal-cases Disallow assertions over an inline literal case loop in a test; parameterization reports and names every case independently. testing
TS test-phase-label-comment Tests must not use bare Arrange, Act, Assert, Given, When, or Then phase comments. testing
IaC no-comment-cruft Commented-out HCL declarations or decorative divider comments must be removed; retain comments that explain constraints or rationale. maintainability
IaC no-dead-environment-input Find undeclared tfvars assignments and potentially redundant scalar values across discovered Terraform environments. maintainability
IaC no-environment-conditional Warn when Terraform chooses behavior from deployment-identity comparisons; prefer explicit typed capabilities or values. architecture
IaC no-mocked-terraform-test-oracle Warn when a Terraform assertion directly reasserts the same literal injected by a resource, data, or module override. testing
IaC no-redundant-variable-validation Flag Terraform variable validation conditions already guaranteed by the variable's type constraint. maintainability
IaC no-restated-comment Flag a short comment attached to an HCL declaration when it only repeats that declaration's kind, label, or attribute name. maintainability
IaC no-terraform-data-condition Disallow lifecycle conditions attached to terraform_data guard resources. maintainability
IaC require-deletion-protection Warn when a curated stateful Terraform resource lacks a proven provider-native deletion guard or literal lifecycle destroy guard. correctness
IaC require-prevent-destroy-on-irreplaceable Warn when a curated durable-data container lacks a literal provider-side deletion guard or Terraform lifecycle destroy guard. correctness
Py complex-postgres-query-requires-architecture-review Complex executable PostgreSQL query shapes require architecture review. architecture
Py defect-xfail-requires-explicit-strict A deterministic known-defect `xfail` must set literal `strict=True` so XPASS fails the suite. testing
Py docstring-args-restate-signature Remove a wholly redundant Google-style Args section when every entry only repeats the function signature. maintainability
Py docstring-returns-restate-signature Google-style Returns and Yields documentation must add facts beyond the corresponding annotated result type. maintainability
Py excessive-commentary Long standalone implementation commentary — make the code self-documenting and retain only durable constraints. maintainability
Py fakes-in-shared-location Review named top-level test doubles for shared-support ownership unless they are intentionally scenario-local. testing
Py fastapi-class-router-contract FastAPI routers use injected `*Router.build()` owners and explicit named object response models. architecture
Py fastapi-explicit-openapi-contract Visible FastAPI operations pin locally reviewable metadata and avoid statically provable OpenAPI gaps. correctness
Py iac-source-coupled-test Test uses raw Terraform/HCL text as an infrastructure-behavior oracle. testing
Py invalid-pydantic-field-default Require literal Pydantic model-field defaults to satisfy their resolved contract. correctness
Py mock-without-spec Unrestricted mock permits attributes outside the collaborator contract. testing
Py named-record-at-boundaries Public Python API returns an unnamed fixed-shape record. architecture
Py negative-only-http-status-assertion HTTP test assertion only excludes a server error instead of identifying the intended response. testing
Py no-analytical-aggregation-in-postgres-store Potentially analytical PostgreSQL store queries require review. architecture
Py no-any-mapping-types String-keyed mapping types must not erase their values with `Any`. correctness
Py no-bare-test-phase-comments Test files must not use bare phase comments such as Arrange, Act, Assert, Given, When, or Then. testing
Py no-comment-cruft Commented-out code, mechanical narration, decorative banner, or untracked work marker. maintainability
Py no-conftest-test-module-import Do not import individual test modules from conftest.py. testing
Py no-copied-inherited-docstring An override repeats the documentation of the single local base method it actually overrides. maintainability
Py no-cors-wildcard-with-credentials Credentialed CORS must not allow a wildcard origin. security
Py no-delete-statement Avoid `del` statements; prefer constructing an immutable replacement value. maintainability
Py no-docstring-type-restatement A docstring type label repeats an annotation from the fully typed signature. maintainability
Py no-dunder-all modules should not define or mutate `__all__` maintainability
Py no-duplicate-dunder-all-entry static module `__all__` declarations should list each exported name once correctness
Py no-excessive-cognitive-complexity Error on cognitive complexity above 20; scores up to 20 pass. maintainability
Py no-fastapi-on-event Deprecated FastAPI or Starlette on_event lifecycle registration. correctness
Py no-file-level-escape-hatch-suppression File-level Ruff suppression disables an escape-hatch rule across the entire file. maintainability
Py no-first-party-private-import A first-party consumer imports a private name or private module across its package boundary. architecture
Py no-frozen-after-validator-field-write Do not assign declared fields in after-validators on frozen Pydantic models. correctness
Py no-generic-single-export-module A generic module name should not conceal a single-definition responsibility. architecture
Py no-hidden-constructor-fallback Constructor option silently falls back to application settings when omitted. architecture
Py no-invalid-argument-name-suppression External parameter spelling must use framework aliases instead of disabling snake_case naming. maintainability
Py no-nested-pydantic-field-validator Outer-model Pydantic field validator is owned by a nested helper class. correctness
Py no-offset-pagination Potentially unbounded `OFFSET` pagination in store SQL. performance
Py no-positional-psycopg-row-escape A positional Psycopg record must not escape its function unchanged. correctness
Py no-positional-tuple-record Fixed tuple return records should use named fields instead of positional slots. maintainability
Py no-provably-dead-mock-configuration Remove mock behavior configuration proven unable to affect a test. testing
Py no-psycopg-execution-outside-injected-owner Psycopg execution occurs outside a constructor-injected persistence owner. architecture
Py no-random-uuid-in-sql Embedded SQL generates a random UUIDv4 instead of a time-ordered UUIDv7. performance
Py no-raw-connection-in-tests Do not acquire raw database connections in tests. testing
Py no-raw-source-text-test-oracle Test uses raw text from a source-like project path as its oracle. testing
Py no-redundant-module-alias-exports Do not manufacture public APIs from private names or replace the current module. maintainability
Py no-repeated-structured-string-literal Exact SQL or route literals repeated across callable scopes should share one named binding. maintainability
Py no-repeated-test-body Substantial sibling pytest tests repeat the same structural body. testing
Py no-repeated-unseeded-stdlib-random-in-test A collected test may repeatedly sample an unseeded standard-library PRNG. testing
Py no-restated-closed-domain-description Do not restate a string Literal or local string Enum domain in its Pydantic description. maintainability
Py no-restated-comment Short standalone comment lexically restates the immediately following simple action. maintainability
Py no-secret-in-log A direct credential-like reference is passed to a recognized logging call. security
Py no-select-star SQL SELECT projections should list explicit result columns instead of wildcards. maintainability
Py no-service-behavior-in-settings Settings and configuration types should not orchestrate injected collaborators. architecture
Py no-statically-truthy-assertion A bare assertion condition is statically truthy. testing
Py no-string-concat-in-loop Avoid repeatedly growing a proven string accumulator across a loop backedge. performance
Py no-trailing-numeric-unit-assignment-comment A trailing comment redundantly labels a numeric assignment with its value and unit. maintainability
Py no-unique-violation-message-match Do not make unique-violation control flow depend on rendered exception text. correctness
Py no-unnecessary-docstring No docstring consumer detected — delete it; make author-controlled names, types, and structure explain the code. maintainability
Py no-unused-value-marker Do not use standalone assignments to `_` to discard values. maintainability
Py no-vague-suppression-description Generic suppression descriptions do not make the exception auditable. maintainability
Py no-whole-request-response-payload-in-log Whole request or response payloads passed to logging calls require review. security
Py opaque-parametrize-case-needs-id Opaque static pytest parameter cases rely on argument-name-and-index fallback IDs. testing
Py over-mocked-test Tests should not use more than five independently rooted test doubles or collaborator substitutions. testing
Py prefer-class-row Avoid fetching a Psycopg dictionary row only to construct the same model manually. maintainability
Py prefer-collection-comprehension Single-purpose fresh collection builder loop — prefer a direct comprehension. style
Py prefer-constant-time-secret-compare Externally supplied authenticators are compared with timing-sensitive equality. security
Py prefer-fstring-over-concat Prefer f-strings for short human-readable interpolation when they make the result clearer. style
Py prefer-immutable-module-constant Nonempty uppercase module collections allow top-level membership or keys to change at runtime. maintainability
Py prefer-injected-dependency-over-monkeypatch Tests should inject dependencies instead of replacing attributes through ambient patching. testing
Py prefer-library-fake Prefer a maintained fake, emulator, recorder, or test service for substantial third-party protocols. testing
Py prefer-match-assert-never Typed enum dispatch must not silently ignore unhandled members. correctness
Py prefer-match-exception-dispatch Prefer guarded match/case for refined exception type dispatch. maintainability
Py prefer-match-type-dispatch Prefer `match` for structural runtime type dispatch. maintainability
Py prefer-match-value-dispatch Prefer match/case for repeated dispatch on one value with a fallback. maintainability
Py prefer-module-level-constant Hoist repeatedly read static values when an immutable module representation preserves behavior. performance
Py prefer-monkeypatch-for-process-state-in-test Test mutates process-wide state without a restoring test scope. testing
Py prefer-nominal-id-types Python boundaries should distinguish swappable identifier roles with nominal types. correctness
Py prefer-non-nullable-collection Avoid nullable list parameters that are immediately collapsed to an empty list. maintainability
Py prefer-or-pattern Merge adjacent `case` arms with identical bodies into one or-pattern. maintainability
Py prefer-pydantic-json-value Recursive JSON value alias duplicates `pydantic.JsonValue`. correctness
Py prefer-self-documenting-constant Encode a constant's units or HTTP status meaning in its name, type, or value. maintainability
Py prefer-self-type-annotation Prefer `Self` for self-returning methods and alternate constructors. maintainability
Py prefer-set-isdisjoint Prefer `set.isdisjoint` when a built-in set intersection is used only as a boolean predicate. style
Py prefer-str-enum Prefer `StrEnum` for application-owned string domains with explicit closed-set evidence. maintainability
Py prefer-struct-over-namedtuple Prefer typed declarations for static application-owned `collections.namedtuple` records. maintainability
Py prefer-walrus-awaited-none-guard Bind a compact awaited lookup in its immediately following terminal None guard. style
Py prefer-walrus-comprehension-filter The same call runs in a comprehension filter and its result. performance
Py prefer-walrus-regex-match A proven regex Match-or-None result is assigned only for the following condition. style
Py prefer-walrus-stream-loop Collapse a compact producer assignment and immediate sentinel break into a named-expression loop. style
Py production-derived-test-cases Warn when pytest membership-contract cases are derived only from the first-party production collection. testing
Py pytest-fixture-returns-bare-tuple Pytest fixture exposes a fixed positional record as an unnamed tuple. testing
Py redundant-class-docstring Undecorated base-free class docstring only repeats the class name. maintainability
Py redundant-docstring Function or plain-method docstring only repeats its declaration. maintainability
Py redundant-module-docstring Module docstring only repeats the filename and, optionally, its immediate parent package. maintainability
Py repeated-kwarg-heavy-call-in-test Tests repeat at least seven explicit keyword names across calls to the same callee. testing
Py repeated-static-call-cases Three same-shape literal call assertions may be independent parameter cases. testing
Py replay-contract-insert-requires-duplicate-policy A literal INSERT in a replay-named store callable must declare duplicate behavior. correctness
Py require-keyword-only-swap-prone-params Risky-name positional parameters sharing a primitive annotation may be confused. correctness
Py require-nodecode-for-splitting-settings-field Warn when an unconditional raw-string splitter lacks a pydantic-settings decoding policy. correctness
Py require-port-for-service Consider a consumer-owned port when visible service structure suggests a substitution boundary. architecture
Py require-pydantic-for-external-json Proven external JSON record fields are consumed before runtime schema validation. correctness
Py require-pydantic-for-structured-payload Structured nested FastAPI payloads must be parsed into a named Pydantic model before field access. correctness
Py require-pydantic-ordinal-lower-bound A Pydantic ordinal field maps its first position to N but accepts smaller integers. correctness
Py require-typed-http-test-response HTTP tests must validate JSON response bodies into named models before asserting fields. testing
Py restated-test-docstring Collected test docstring only repeats names and visible code. testing
Py stepdown A private helper used by one caller should be defined below that caller. maintainability
Py store-get-delegates-to-bulk-read A store singleton operation should reuse its equivalent bulk implementation. maintainability
Py timestamp-order-requires-tiebreaker Bounded store SQL whose final result-order key looks like a `*_at` timestamp should include a deterministic secondary key. correctness
Py typed-error-reasons Review joined exception strings for fixed reason identities versus dynamic context. architecture
Py unused-test-factory-option A private test factory exposes a literal option that visible callers never vary. testing
enforce-timestamptz TIMESTAMP without TIME ZONE — use TIMESTAMPTZ. correctness
excess-migration-index-requires-justification Require a structured local justification for excess explicit indexes in an authored migration. performance
existing-table-check-or-foreign-key-requires-not-valid CHECK and foreign-key constraints added to existing PostgreSQL tables should defer validation. performance
idempotent-ddl DDL without IF [NOT] EXISTS — migrations must be safe to re-run. correctness
index-concurrently CREATE INDEX without CONCURRENTLY — locks the table against writes. performance
insert-requires-replay-policy Every INSERT must declare replay-safe upsert behavior or explicitly document intentional insert-only semantics. correctness
mixed-migration-phases Review existing-table migrations that combine backfill, enforcement, and contract phases. architecture
no-application-schema-check Keep JSON shape and closed application value sets out of database CHECK constraints. architecture
no-database-triggers Keep behavioral logic in application code, not database triggers. architecture
no-duplicate-index Report duplicate and conservatively covered indexes that remain active in one authored migration. performance
no-long-migration-narration Long migration comments narrate implementation instead of recording durable constraints. maintainability
no-migration-comment-cruft Commented-out SQL, decorative banners, and untracked debt markers must be removed. maintainability
no-offset-pagination Dynamic OFFSET pagination in query SQL should use a stable cursor. performance
no-pg-enum CREATE TYPE ... AS ENUM — use TEXT with an application enum instead. maintainability
prefer-jsonb JSON column type or table-DDL cast — use JSONB. performance
prefer-text-over-varchar VARCHAR(n) — use TEXT (+ CHECK length if needed). maintainability
prefer-uuidv7-default `gen_random_uuid()` emits a random UUIDv4 — use `uuidv7()` so keys are time-ordered. performance
require-fk-index Cascading or set-value FOREIGN KEY action lacks a child-table index. performance
require-lock-timeout DDL migration missing positive SET [LOCAL] lock_timeout or statement_timeout prior to DDL. correctness
commented-out-config unexplained disabled config blocks or adjacent alternatives maintainability
config-comment-wall four or more nearby configuration comments mostly repeat their entries maintainability
declarative-deployment-boundary recognized control-plane commands mutate infrastructure outside Terraform architecture
ephemeral-execution-artifact ephemeral execution brief, audit report, or change diary maintainability
exact-config-comment-restatement YAML or TOML comment exactly repeats the adjacent scalar assignment maintainability
hidden-markdown-heading HTML comment hides a Markdown heading maintainability
iac-source-coupled-test shell test asserts on raw IaC source text testing
large-shell-program shell program contains at least 200 substantive lines architecture
no-unsafe-command-argument-interpolation raw Claude command argument interpolated into an executable shell or query fence security
no-wildcard-secret-read-permission Claude settings grant wildcard access to secret values security
workflow-embedded-program GitHub workflow run: embeds procedural logic architecture