Standards

The 496 review rules every onboarded repository is held to: a core set for every file, plus 20 stack sets. Look up any rule id you see in a review comment.

ℹ

For product engineers who want to know what a finding means, and for anyone proposing a rule change. Editing a rule is a platform change: see Changing a rule.

Why the standards exist

AI reviewers comment on whatever they notice. The standards turn that into a fixed list: what to flag, how severe it is, and what not to flag at all. Every finding names the rule it applies, so you can look it up here and argue with the rule rather than the reviewer.

What a finding looks like

You never open standards/ yourself. You meet a rule as a review comment on your pull request. Every comment starts with its severity and the rule id in brackets:

a finding
Redline/BLOCKER [core/query-string-concatenation]: No query built by string concatenation with external input — parameterised only.
Use a parameterised query: db.Query("SELECT id FROM users WHERE name = $1", name)

A BLOCKER must be fixed before merge, a HIGH needs a reviewer to accept the trade-off, and a SUGGESTION is optional. What each one obliges you to do is on The output contract. Whether a BLOCKER actually stops the merge depends on your repository's rung, its position on the enforcement ladder — see Enforcement.

Which rules your repository gets

A stack is one rule file for one language or framework, such as React or Go. It applies only to files matching its globs. A profile is a named list of stacks, such as web-react. Each repository installs exactly one of the 19 profiles, and always gets core. redline init detects the profile; --profile <name> overrides it. More on Profiles & stacks.

All standards

StandardCoversBLOCKERHIGHSUGGESTIONIn profiles
Core standardsSecurity, type safety, error handling, scope discipline and the severity output contract.1390All
JavaScriptUntyped and loosely-typed JS: build scripts, config, serverless handlers, legacy app code.89411
TypeScriptType evidence in every .ts/.tsx file: unknown at the boundary only, no widening, no reflective escapes.19312
React (web)React web applications.131364
React NativeReact Native apps — extends the React rules.61131
Next.js (App Router)Next.js App Router — extends the React rules. Server Actions, the server/client boundary, caching and redirects.101141
AngularAngular applications — subscription teardown, change detection, injection sinks, guards.81951
VueVue 3 and Nuxt — reactivity that silently stops updating, v-html, SSR state leaks.61741
Svelte / SvelteKitSvelte 4 and 5 plus SvelteKit — runes, stores, and what load runs where.81641
Browser / DOMFramework-free browser code — the sinks and leaks a framework normally hides.81551
Node.js (NestJS)NestJS services.7942
ExpressExpress HTTP services — routers, middleware, handlers. Written for Express 5, with Express 4 differences called out.8931
Microservice cross-cuttingCross-cutting service rules: idempotency, timeouts, queues, observability.6837
Java (Spring Boot)Spring Boot services.101441
GoGo services and tools.121441
PythonPython services and tooling.91541
C# (.NET).NET services.91541
KotlinKotlin / Android.81431
Swift (iOS)iOS applications.61231
Terraform / HCLInfrastructure as code.71541
EffectRepositories built on the effect library — typed error handling, tagged constructors, Layers.0321

manifest.json ties them together: each stack's globs, the profiles, and the standards version, currently 0.2.2.

Where the rules live

The rules are written once, in standards/core.md and standards/stacks/*.md. These are the only files a human edits. The CLI renders them into the files each assistant reads: .github/copilot-instructions.md, AGENTS.md, CLAUDE.md and .cursor/rules/. redline init writes them into a repository, and sync keeps them current.

Changing a rule

A merged change reaches every onboarded repository as a pull request, so treat it as a production change. Rule ids are permanent: reword a rule freely, but never rename or delete its id.

  1. Edit the markdownstandards/ is the only place a human edits a rule. AGENTS.md, CLAUDE.md, .github/copilot-instructions.md and .github/instructions/ are rendered from it, and the next render overwrites any hand edit there.
  2. node scripts/assign-rule-ids.mjsAssigns a permanent <stack>/<slug> id to any new rule bullet and rewrites the file in place. Do not invent an id by hand. CI runs the same script with --check and fails if a rule is missing one.
  3. node scripts/render-self.mjsRe-renders this repository's own copies of those files. CI runs it with --check, so a stale copy fails the build.
  4. Bump standards/manifest.json → versionIn the same pull request as the rule change. Sync pull requests quote the version, so every repository can tell which standards it is on.
  5. Add a CHANGELOG.md entryAlso in the same pull request. Say what changed and why, and record the seed score: a standards change with no measurement is an opinion.
  6. node scripts/validate.mjsThe self-check CI runs: the manifest is consistent, rule ids are well formed, the output contract is intact, and every glob is one Copilot can read.