Code Review Standards

by Convext

Public

Pull request and code review guidelines

Rules (214)

Angular

high Use RxJS properly

Observables for async. Use async pipe in templates. Unsubscribe or use takeUntilDestroyed. Signals for simple state.

high Use standalone components

Standalone components are the default (Angular 17+). NgModules are legacy. Use Signals for reactive state. Deferrable views for lazy loading.

high Use Angular CLI

`ng generate` for scaffolding. `ng build --configuration production`. Schematics for custom generators.

medium Use Angular services for shared logic

Injectable services for business logic. `providedIn: 'root'` for singletons. Inject with constructor or inject().

Api

high Use RESTful conventions

GET/POST/PUT/DELETE on resources. Nested routes for relationships. Proper HTTP status codes (200/201/400/401/404/500).

medium Return consistent error responses

Consistent error format: code, message, field-level details. Same structure across all endpoints.

medium Version your APIs

Version in URL (`/api/v1/`) or headers. Enables breaking changes without affecting clients.

Ci Cd

high Use GitHub Actions for CI

Jobs for lint, test, build. Matrix for versions. Cache dependencies. Secrets for credentials. Reusable workflows.

low Use Travis CI for open source

.travis.yml for config. Matrix for versions. Cache dependencies. Deploy on tag. Free for open source.

medium Use Jenkins for enterprise CI

Jenkinsfile (declarative pipeline). Stages for phases. Shared libraries for reuse. Blue Ocean for UI.

medium Use CircleCI for CI

config.yml with jobs and workflows. Orbs for common tasks. Cache for speed. Context for secrets.

medium Use actionlint for GitHub Actions

actionlint for workflow validation. Catches syntax errors, expression issues. Run locally before push.

medium Use GitLab CI for CI

.gitlab-ci.yml with stages. Include templates. Cache artifacts. Variables for config. Runners for execution.

Config

high Use environment variables for configuration

Config in env vars, not code. Never commit .env. Commit .env.example. Never hardcode secrets.

Csharp

high Use xUnit or NUnit for testing

xUnit preferred (modern, parallel). NUnit also good. Use `[Fact]`/`[Theory]` or `[Test]`/`[TestCase]`.

high Use C# 12+ features

Primary constructors, collection expressions, default lambda params. Required members. Raw string literals. .NET 8+ for best support.

high Use async/await properly

Async all the way down. Return `Task<T>`, never block with `.Result` or `.Wait()`. ConfigureAwait unnecessary in ASP.NET Core.

high Use .NET SDK for C# projects

.NET SDK for builds and tooling. `dotnet new` for scaffolding. `dotnet run` for dev. .NET 8+ LTS.

high Use ASP.NET Core for C# web apps

ASP.NET Core for web APIs and apps. Minimal APIs for simple endpoints. MVC for complex. DI built-in.

high Use .NET CLI and NuGet

`dotnet` CLI for builds/runs. NuGet for packages. Lock file with `packages.lock.json`. .NET 8+.

high Use nullable reference types

Enable `<Nullable>enable</Nullable>`. Mark nullable with `?`. Compiler catches null issues.

medium Use minimal APIs for simple endpoints

Minimal APIs for simple microservices and endpoints. MapGet/MapPost with lambdas. MVC for complex scenarios with views.

medium Follow .NET naming conventions

PascalCase for public members, camelCase for private. Use dotnet-format or StyleCop. Async suffix for async methods.

Database

critical Never store sensitive data in plain text

Passwords: bcrypt. API keys: encrypt. PII: field-level encryption. Never log sensitive data.

high Use MongoDB with schemas

Define schemas even though schemaless. Use Mongoose (Node) or ODMs. Index query fields. Embed vs reference thoughtfully.

high Use Redis for caching and sessions

Redis for cache, sessions, queues. Set TTL on keys. Use Redis Cluster for scale. Avoid large keys (>1MB).

high Add indexes for foreign keys and frequently queried columns

Index: foreign keys, WHERE columns, ORDER BY columns, JOINs. Use EXPLAIN ANALYZE to verify.

high Use transactions for multi-step operations

Wrap multi-step DB operations in transactions. All-or-nothing, prevents partial updates.

medium Use Elasticsearch for search

Elasticsearch for full-text search, logs, analytics. Define mappings. Use bulk API for indexing. Replicas for availability.

medium Use SQLite for development and simple apps

SQLite for dev/test, single-user apps. WAL mode for concurrency. Switch to Postgres for production scale.

Dependencies

critical Always use latest dependency versions

Use latest stable versions. Fix breaking changes—don't avoid upgrades. Check official registries.

Django

high Use Django REST Framework for APIs

DRF serializers for validation. ViewSets for CRUD. Token/JWT auth. Pagination on list endpoints.

high Use Django migrations properly

One migration per change. Never edit applied migrations. Use RunPython for data migrations. Squash when large.

high Use Django ORM properly

select_related/prefetch_related for joins. Use F() and Q() objects. Avoid N+1 with django-debug-toolbar.

medium Use Django forms for validation

Forms/ModelForms for input validation. Clean methods for business logic. Never trust request.POST directly.

Elixir

high Use Phoenix LiveView for interactivity

LiveView for server-rendered reactive UIs. No JavaScript needed for most interactions. Use hooks for JS interop. Streams for large lists.

high Use Ecto for database access

Ecto schemas for data modeling. Changesets for validation. Repo for queries. Migrations for schema changes. Use preload for associations.

high Use Phoenix for web applications

Phoenix for web apps. LiveView for interactive UIs without JavaScript. Channels for real-time. PubSub for broadcasting.

high Use Mix for project management

mix.exs for config, mix.lock for deps. `mix deps.get`, `mix test`. Umbrella apps for monorepos.

high Pattern match everything

Pattern matching in function heads, case, with. Destructure data. Multiple function clauses over conditionals.

high Use OTP for fault tolerance

GenServers for state, Supervisors for fault tolerance. Let it crash philosophy. Use Application for startup.

medium Use ExUnit for testing

ExUnit with describe/test. Doctests for documentation. Mox for mocking behaviors. async: true for speed.

Express

high Use Express middleware properly

Middleware order matters. Error handlers last with 4 params. Use helmet, cors, compression.

high Handle async errors

Wrap async handlers or use express-async-errors. Central error handler. Return proper status codes.

medium Use Express Router for modularity

Router for route groups. Mount with `app.use('/api', router)`. Keep routes thin, logic in services.

Fastapi

high Use async database operations

Async drivers: asyncpg (Postgres), SQLAlchemy 2.0 async. Match FastAPI's async nature.

high Use Pydantic models for request/response

Explicit Pydantic models for all inputs/outputs. Auto-validation, docs, type safety.

high Use dependency injection

Use `Depends()` for db sessions, auth, config, services. Composable and testable.

Flask

high Use Flask application factory

`create_app()` factory pattern. Config from env. Blueprints for modularity. Flask extensions for features.

high Use Flask-SQLAlchemy properly

Flask-SQLAlchemy for ORM. Flask-Migrate for migrations. Scoped sessions. Avoid circular imports.

Formatting

high Use Prettier for code formatting

Prettier for JS/TS/CSS/HTML/JSON. Minimal config. Run on save. Pre-commit hook. CI check.

medium Use isort for Python imports

isort for import ordering. Profile: black. Run before Black. Or use Ruff which includes isort.

medium Use StandardRB for Ruby formatting

StandardRB: no config, no debates. RuboCop with opinionated defaults. Just run `standardrb --fix`.

Git

medium Atomic commits with Conventional Commits

Small, focused commits. Use: feat/fix/refactor/test/docs/chore. Each commit independently deployable.

Go

critical Handle errors explicitly

Check every error return. No `_` for errors. Wrap with context: `fmt.Errorf("doing x: %w", err)`.

high Use gofmt and golangci-lint

`gofmt` is non-negotiable. `golangci-lint run` in CI. Enable: errcheck, govet, staticcheck.

high Use Go testing package

Built-in testing package. Table-driven tests. `go test -v ./...`. Use testify for assertions if needed.

high Use slog for structured logging

Use `log/slog` (Go 1.21+) for structured logging. JSON handler in production. slog.With() for context. Avoid fmt.Printf for logs.

high Use context for cancellation and timeouts

`context.Context` as first param. Propagate through call chain. Use `context.WithTimeout` for I/O.

high Use Go modules for dependency management

go.mod and go.sum at repo root. `go mod tidy` before commit. Pin versions for reproducibility.

medium Use Go 1.22+ features

range over integers, range over func. Enhanced HTTP routing patterns. for loop variable fix. Go 1.22+ minimum.

medium Prefer interfaces over concrete types

Accept interfaces, return structs. Small interfaces (1-2 methods). Define interfaces where used, not implemented.

Java

high Use JUnit 5 for testing

JUnit 5 (Jupiter) for all tests. Use `@Test`, `@BeforeEach`, `@ParameterizedTest`. Mockito for mocking.

high Use Optional instead of null

`Optional<T>` for nullable returns. Never return null from methods. Use `@Nullable` annotations if needed.

high Use Java 21+ features

Virtual threads for scalable concurrency. Pattern matching for switch. Record patterns. Sequenced collections. Java 21 LTS minimum.

high Use Maven or Gradle for builds

Gradle for flexibility, Maven for simplicity. Lock dependency versions. Use wrapper scripts (gradlew/mvnw).

medium Use Spotless for Java formatting

Spotless for consistent formatting. Google Java Format or custom. `spotlessApply` before commit.

medium Use Checkstyle for Java style

Checkstyle for style enforcement. Google or Sun conventions. Integrate with build (Maven/Gradle).

medium Use SpotBugs for Java bug detection

SpotBugs (FindBugs successor) for bug patterns. High-confidence issues only. Part of CI pipeline.

medium Follow Java naming conventions

Classes: PascalCase. Methods/variables: camelCase. Constants: SCREAMING_SNAKE_CASE. Packages: lowercase.

medium Prefer immutability

Final fields, immutable collections. Use records for data classes (Java 16+). Builder pattern for complex objects.

Javascript

high Use TypeScript for all new projects

TypeScript, not JS. Enable `strict: true`, `noImplicitAny`, `strictNullChecks`.

high Use async/await over callbacks and .then()

async/await for all async code. Easier to read, proper try/catch, works with loops.

high Use const and let, never var

`const` by default, `let` for reassignment. Never `var` (hoisting bugs).

medium Use ESLint with strict configuration

ESLint + @typescript-eslint recommended rules. No `any`, no unused vars. Run in CI.

Kotlin

high Use Kotlin idioms over Java patterns

Data classes, extension functions, scope functions (let/apply/run). Null safety with `?` and `!!`.

high Use coroutines for async code

`suspend` functions, `Flow` for streams. Structured concurrency with scopes. No blocking in coroutines.

medium Use ktlint for formatting

ktlint for consistent style. Android Kotlin style guide. Run in CI with `--reporter=checkstyle`.

medium Use Kotest or JUnit 5 for testing

Kotest for expressive specs, JUnit 5 for familiarity. MockK for Kotlin-native mocking.

Laravel

high Use Laravel Eloquent properly

Eager loading with `with()`. Scopes for reusable queries. Mass assignment protection with $fillable.

high Use Laravel API Resources

API Resources for JSON responses. Transform models consistently. Collection resources for lists. Conditional attributes.

high Use Pest for Laravel testing

Pest is Laravel's default testing framework. Expressive syntax. Use arch tests for architecture rules. describe/it blocks.

high Use Laravel queues for heavy work

Queue jobs for email, notifications, processing. Use Horizon for monitoring. Retry with backoff.

high Use Laravel validation

Form Requests for complex validation. Validate all input. Custom rules when needed. Authorize in Form Request.

high Use Laravel migrations and seeders

Migrations for schema. Seeders for test data. Factories for dynamic data. Never edit applied migrations.

medium Use Laravel's service container

Bind interfaces to implementations in providers. Constructor injection. Use app() only in service providers. Contextual binding when needed.

Linting

high Use RuboCop for Ruby linting

RuboCop with .rubocop.yml config. Inherit from rubocop-rails, rubocop-minitest. Auto-correct safe cops.

high Use mypy for Python type checking

mypy with --strict mode. Check all files. Fix type errors, don't ignore. Part of CI pipeline.

medium Use Biome for JS/TS linting and formatting

Biome: fast all-in-one linter+formatter. Replaces ESLint+Prettier. Single config. Rust-based.

medium Use pyright for Python type checking

pyright: fast type checker. VS Code Pylance backend. strict or basic mode. Better inference than mypy.

medium Use flake8 for Python linting

flake8 for style checks. Use with .flake8 config. max-line-length: 88 (Black compat). Ruff is faster alternative.

Llm Behavior

critical User defines success

User and tests define done. Don't redefine scope or declare partial progress as complete.

critical No rationalizations

No excuses: 'pre-existing', 'unrelated', 'tedious', 'for now'. Recognize and continue working.

critical Own all code in the repository

You wrote every line. No 'pre-existing issues'—only issues you haven't fixed yet.

Nestjs

high Use NestJS modules properly

Feature modules for domain boundaries. CoreModule for singletons. SharedModule for reusable providers.

high Use NestJS dependency injection

Constructor injection. @Injectable() on services. Custom providers for factories. Scope: DEFAULT unless needed.

medium Use NestJS pipes and guards

ValidationPipe with class-validator DTOs. Guards for auth. Interceptors for transforms. Exception filters.

Nextjs

high Use Next.js data fetching

Fetch in Server Components. Use `cache: 'force-cache'` or `revalidate`. generateStaticParams for static paths.

high Use Server Actions

Server Actions for mutations. `'use server'` directive. Form actions. Revalidate with revalidatePath/revalidateTag.

high Use App Router

App Router over Pages Router (Next.js 13+). Server Components by default. 'use client' only when needed.

medium Use Next.js Image and Link

next/image for optimized images. next/link for client navigation. Automatic prefetching.

Package Manager

high Use npm properly

package-lock.json (commit it). `npm ci` in CI. Audit for vulnerabilities. Scripts for common tasks.

high Use Bundler for Ruby gems

Gemfile + Gemfile.lock. `bundle install --deployment` in prod. Groups for dev/test. `bundle exec` for commands.

medium Use pnpm for efficiency

pnpm: fast, disk-efficient. pnpm-lock.yaml. Workspaces for monorepos. Strict node_modules by default.

medium Use Poetry for Python dependency management

pyproject.toml + poetry.lock. `poetry install --no-dev` for prod. Groups for dev deps. Prefer uv for speed.

medium Use pip with requirements.txt

requirements.txt with pinned versions. `pip freeze > requirements.txt`. Virtual environments. Prefer uv.

medium Use Yarn properly

yarn.lock (commit it). Workspaces for monorepos. `yarn install --frozen-lockfile` in CI. Yarn Berry for PnP.

Php

high Use Composer for dependencies

composer.json and composer.lock. `composer install --no-dev` for prod. PSR-4 autoloading.

high Follow PSR standards

PSR-12 coding style, PSR-4 autoloading. Use php-cs-fixer in CI. Strict types: `declare(strict_types=1)`.

high Use PHPStan for static analysis

PHPStan level 9 (max) for strict analysis. Type declarations on all methods. Use baseline for legacy code migration.

high Use PHPUnit for testing

PHPUnit for all tests. Use data providers for parameterized tests. Pest for simpler syntax if preferred.

medium Use Symfony for enterprise PHP

Symfony for enterprise PHP. Bundles for modularity. Flex for recipes. Doctrine for ORM. Use makers for scaffolding.

medium Use PHP 8.3+ features

Constructor promotion, named arguments, match, attributes, typed properties, enums, readonly classes. PHP 8.3+ for typed class constants.

Python

critical Use uv for package management

Use `uv` (not pip/poetry/pipenv). 100x faster, lockfile support, built-in venv. Commands: `uv add`, `uv run`.

high Use logging module properly

logging module, not print. Configure at app entry point. Use __name__ for logger names. Structured logging with extra dict or structlog.

high Use context managers for resources

with statement for files, connections, locks. contextlib for custom managers. Never leave resources open. async with for async resources.

high Use async/await for I/O operations

Async for HTTP (httpx), database (asyncpg), files (aiofiles). Don't mix sync/async in same service.

high uv project structure

pyproject.toml for deps, uv.lock (commit it), .python-version, src/ layout. Python 3.12+.

high Use Alembic for database migrations

Alembic for SQLAlchemy migrations. `alembic revision --autogenerate`. Review generated migrations. Stamp for sync.

high Use type hints everywhere

Type hints on all functions and class attributes. Enables mypy/pyright static analysis.

high Use Pydantic for data validation

Pydantic BaseModel for validation. Field types with constraints. Serialization built-in. FastAPI integration.

high Use SQLAlchemy for database access

SQLAlchemy 2.0 style. Declarative models. Session management. Async with asyncio extension.

high Use Ruff for linting and formatting

Ruff for both linting and formatting (replaces flake8/isort/pylint/Black). Single tool, 100x faster. `ruff check` and `ruff format`.

medium Use boto3 for AWS

boto3 for AWS services. Use resource API for simple ops, client for advanced. Handle pagination.

medium Use dataclasses or Pydantic for data structures

Dataclasses for simple containers, Pydantic for validation. No plain dicts for structured data.

medium uv scripts and commands

Define entry points in `[project.scripts]`. Run any command with `uv run <cmd>`. CI: `uv sync --frozen`.

medium uv workspaces for monorepos

Use `[tool.uv.workspace]` for multi-package repos. Single lockfile, editable local packages.

medium Use pytest for testing

pytest with fixtures and parametrize. Simple asserts, rich plugin ecosystem.

medium Use Celery for distributed tasks

Celery for distributed task queue. Redis or RabbitMQ broker. Beat for scheduling. Flower for monitoring.

medium Migrate from pipenv to uv

pipenv is slow and unmaintained. Migrate to uv for speed and modern features. `uv init` from existing.

medium Use unittest for Python basics

unittest for simple cases or legacy code. TestCase classes. setUp/tearDown. Prefer pytest for new projects.

medium Use pylint for comprehensive Python linting

pylint for comprehensive checks. Disable noisy rules in pylintrc. Ruff is faster alternative.

medium Use httpx for async HTTP

httpx for async HTTP client. Requests-compatible API. Async context manager. HTTP/2 support.

medium Use requests for sync HTTP

requests for simple sync HTTP. Session for connection pooling. Timeout always. Use httpx for async.

Rails

critical Use Rails credentials for secrets

Rails.application.credentials for secrets. `rails credentials:edit`. Environment-specific credentials. Never commit master.key.

critical Use Strong Parameters correctly

Whitelist attributes explicitly. Never `.permit!`. Use `require(:model).permit(:field)`.

critical Use Rails built-in authentication, never Devise

Use `has_secure_password`, `authenticate_by`, `generates_token_for`. Never use Devise/Sorcery/Clearance.

high Use Pundit for authorization

Pundit policies for authorization. `authorize @record` in controllers. Policy classes match models.

high Use SolidQueue for Rails 8 jobs

SolidQueue: Rails 8 default job backend. Database-backed. No Redis needed. Mission Control for monitoring.

high Use service objects for complex operations

Service objects for multi-model operations. Single public method (call). Return Result/Response objects. Keep models focused on persistence.

high Use Minitest for Rails testing

Minitest only—no RSpec. Rails default, fast, simple, fixtures-integrated.

high Use Sidekiq for background jobs

Sidekiq for heavy background work. Redis required. Use perform_later. Retries with exponential backoff.

high Use Hotwire for Rails interactivity

Turbo Drive for SPA-like nav. Turbo Frames for partials. Turbo Streams for real-time. Stimulus for JS sprinkles.

high Fat models, skinny controllers

Controllers: auth, params, call service, render. Logic in models/services/form objects/query objects.

high Use database constraints

Add NOT NULL, UNIQUE indexes, foreign keys, check constraints. Don't rely only on ActiveRecord validations.

high Avoid N+1 queries

Use `includes`/`preload`/`eager_load` for associations. Use Bullet gem in development.

high Use background jobs for slow operations

Email, file processing, API calls, reports → background jobs (SolidQueue/Sidekiq). Keep requests <200ms.

high Use Hotwire for interactivity

Use Turbo (Drive/Frames/Streams) + Stimulus before React/Vue. JS frameworks only for complex client state.

medium Use Propshaft for Rails assets

Propshaft for asset pipeline. Simpler than Sprockets. No compilation, just fingerprinting. Rails 8 default.

medium Use SolidCable for Action Cable

SolidCable: database-backed pub/sub for Action Cable. No Redis needed. Rails 8 default.

medium Use has_many :through over HABTM

Always `has_many :through` with explicit join model. Never `has_and_belongs_to_many`.

medium Use SolidCache for Rails caching

SolidCache: database-backed cache. No Redis needed. Good for most apps. Rails 8 default.

medium Use Active Storage for file uploads

Active Storage for uploads. Direct uploads for large files. Variants for images. S3/GCS for production.

medium Use Action Cable for WebSockets

Action Cable for WebSockets. Channels for subscriptions. Redis adapter for multi-server. Use Turbo Streams when possible.

medium Use scopes for common queries

Define scopes for reusable queries. Enables chaining: `Order.recent.completed.for_user(user)`.

medium Use Importmap for Rails JavaScript

Importmap for JS without bundling. Pin packages from CDN or vendor. Works with Hotwire. No node_modules.

React

high Use React 19 features

Server Components for data fetching. Actions for mutations. use() hook for promises. Optimistic updates. React Compiler for auto-memoization.

high Use React Query for server state

TanStack Query for server state. Auto caching/revalidation. useQuery for reads, useMutation for writes.

high Use functional components with hooks

Functional components + hooks only. No class components. Hooks enable reuse without HOCs.

high Use React Query or SWR for data fetching

TanStack Query or SWR for fetching. Auto caching, revalidation, loading/error states. Not useEffect+fetch.

medium Use Zustand for React state

Zustand for simple global state. No boilerplate. Hooks-based. Persist middleware for storage.

medium Avoid prop drilling with Context or state management

Context for static data, Zustand/Jotai for simple state, Redux Toolkit for complex. No deep prop drilling.

Ruby

high Prefer composition over inheritance

Favor modules and dependency injection over deep inheritance. Max 2-3 inheritance levels. Duck typing over type checking.

low Use frozen string literals

Add `# frozen_string_literal: true` to files. Prevents mutation bugs, improves performance.

medium Use Hanami for clean Ruby architecture

Hanami for DDD-style Ruby apps. Explicit dependencies. Actions over controllers. Repositories for persistence.

medium Use Sinatra for simple Ruby APIs

Sinatra for microservices and simple APIs. Modular style for larger apps. Rack middleware compatible.

medium Explicit return values in methods

Return meaningful values or `self`. Predicates (`?`) return booleans. Bang methods (`!`) mutate or raise.

medium Use Ruby 3+ features

Use pattern matching, endless methods (`def x = ...`), hash shorthand `{x:}`, numbered params `_1`. Ruby 3.2+.

Rust

critical Handle Results and Options properly

No `.unwrap()` in production. Use `?` operator, `map`, `and_then`. `expect()` only with good messages.

high Use Tokio for async runtime

Tokio for async I/O. `#[tokio::main]` for entry point. Use tokio::spawn for concurrent tasks. Async channels for communication.

high Use Cargo for package management

Cargo.toml for deps, Cargo.lock (commit it). `cargo add` for new deps. Workspace for monorepos.

high Use cargo test for Rust

`cargo test` for all tests. Doc tests in comments. Integration tests in tests/. `#[cfg(test)]` modules.

high Use anyhow and thiserror for errors

`anyhow::Result` for applications (easy error propagation). `thiserror` for libraries (custom error types). context() for error messages.

high Use clippy and rustfmt

`cargo fmt` before commit. `cargo clippy` with `-D warnings` in CI. Fix all warnings.

high Understand ownership and borrowing

Prefer borrowing (&T, &mut T) to avoid moves. Use ownership for transfers. Clone for small Copy types is fine. Lifetimes express relationships, don't avoid them.

medium Use derive macros for common traits

`#[derive(Debug, Clone, PartialEq)]` for structs. Use `thiserror` for error types, `serde` for serialization.

Security

critical Implement proper authentication and authorization

Auth: bcrypt/argon2 for passwords, rate limiting, secure sessions/tokens. Authz: check permissions on every request, use policy objects or middleware.

critical Use HTTPS everywhere

Force SSL, redirect HTTP→HTTPS, secure cookies (Secure/HttpOnly/SameSite), HSTS headers.

critical Validate and sanitize all user input

Allowlists, not denylists. Validate type/length/format. Sanitize HTML. Parameterized queries only.

Spring

high Use Spring dependency injection

Constructor injection (preferred). @Service, @Repository, @Controller. @Autowired optional with single constructor.

high Use Spring Security

SecurityFilterChain bean. JWT or session auth. Method security with @PreAuthorize. CSRF for forms.

high Use Spring Data JPA properly

Repository interfaces. Query methods by naming. @Query for custom. Use projections for performance.

high Use Spring Boot starters

spring-boot-starter-* for dependencies. Auto-configuration. application.yml over .properties.

high Use Spring Boot 3+ features

Spring Boot 3.x with Java 17+. Native compilation with GraalVM. Virtual threads support. Observability with Micrometer. Jakarta EE namespace.

Svelte

high Use SvelteKit for applications

SvelteKit for routing, SSR, API routes. +page.svelte for pages. +layout.svelte for shared UI. Load functions for data.

high Use Svelte reactivity

$: for reactive statements. Stores for shared state. Runes ($state, $derived) in Svelte 5. Two-way binding with bind:.

Swift

high Use SwiftUI for new UI development

SwiftUI for declarative UI. @State/@Binding for local state. @Observable (iOS 17+) for view models. NavigationStack for navigation.

high Use Swift Concurrency

async/await, actors for shared state. @MainActor for UI. Structured concurrency with task groups.

high Use Swift Package Manager

SPM over CocoaPods/Carthage. Package.swift for dependencies. `swift build`, `swift test`.

high Use Swift 6 strict concurrency

Enable Swift 6 language mode for full concurrency checking. Sendable for thread-safe types. Actors for shared mutable state.

high Use Swift Testing for new tests

Swift Testing (@Test, #expect) for new code. Cleaner syntax than XCTest. Parameterized tests with @Test(arguments:). Parallel by default.

medium Use value types by default

Structs over classes unless you need reference semantics. Enums with associated values. Protocols for polymorphism.

medium Follow Swift API Design Guidelines

Clarity over brevity. Omit needless words. Use grammatical English phrases. SwiftLint for enforcement.

Testing

critical No mocking the class under test

Test real instances. Mocking the class under test hides bugs.

critical Never ignore failing tests

Fix failures immediately. No skipping, no "pre-existing issues." Own the codebase state—a test suite with ignored tests can't be trusted.

high Test behavior, not implementation

Test public interfaces, inputs/outputs. Tests must survive refactoring. Don't test private methods.

high Use Playwright for cross-browser E2E

Playwright for multi-browser E2E. Auto-wait for elements. Trace viewer for debugging. Parallel execution.

high Mock only at external boundaries

Mock only: external HTTP APIs, time, filesystem side effects, third-party services. Use real implementations for internal services, database, and business logic.

high TDD: Red -> Green -> Refactor

1) Write failing test 2) Minimum code to pass 3) Refactor. Every line has a reason.

high Use Cypress for E2E testing

Cypress for E2E tests. Commands for reusable actions. cy.intercept() for network. Avoid flaky selectors.

high Use Vitest for Vite projects

Vitest for Vite-based projects. Jest-compatible API. Native ESM. Use @testing-library for components.

high Use Jest for JavaScript testing

Jest for unit/integration tests. `describe`/`it` blocks. Mock with jest.mock(). Snapshot testing sparingly.

medium Use RSpec for Ruby BDD

RSpec describe/context/it. let/let! for setup. FactoryBot for data. Avoid excessive mocking.

medium Use Mocha for Node.js testing

Mocha with Chai assertions. describe/it blocks. Sinon for mocking. async/await in tests.

medium Use fixtures or factories for test data

Use consistent test data setup: fixtures for stable reference data, factories for dynamic scenarios. Avoid inline object creation scattered throughout tests.

medium Use Capybara for Rails integration

Capybara for system tests. Use semantic selectors. Wait for async. Headless Chrome in CI.

medium One assertion per test (conceptually)

One logical concept per test. Multiple asserts OK if same concept. Clear test names describing behavior.

medium Integration tests over unit tests for web apps

Integration tests for full request/response cycle. Unit tests for complex logic, edge cases, performance.

Typescript

high Use Zod for TypeScript validation

Zod schemas for runtime validation. Infer types from schemas. Composable. Works with React Hook Form.

Vue

high Use Vue 3 Composition API

Composition API over Options API. `<script setup>` for SFCs. Composables for reusable logic. ref/reactive for state.

high Use Pinia for state management

Pinia over Vuex. Define stores with `defineStore`. Composable pattern. DevTools integration.

medium Use Vue Router properly

Named routes, navigation guards. Lazy-load routes with dynamic imports. Use route meta for permissions.

Workflow

critical Code must work locally before pushing

Verify changes locally: run app, run tests, check for errors. CI catches environment issues, not basic bugs.

high Run formatter, linter, and tests before commit

Format → Lint → Test before every commit. Never rely on CI for basic checks.

Use this Ruleset

Sign in to adopt or fork this ruleset

Sign in with GitHub

Statistics

Rules
214
Standards
0
Projects using
0
Created
Jan 15, 2026