Engineering Conventions Code Style

Coding Conventions for AI

Tell AI your code style once. List the stack and the engine returns the naming rules and conventions it implies — plus your own house rules carried verbatim.

Overview

AI writes plausible code that quietly ignores your conventions — class components in a hooks codebase, hard-coded colors in a tokenized design system. This setup captures the conventions for Atlas UI, a shared React component library, where a breaking change ripples across every product team. You list the house rules (additive props, tokens not hard-coded values); the engine adds the React, TypeScript, and Vitest conventions and naming rules automatically. The AI stops guessing your style and starts following it.

Workflow

  1. List the stack

    React, TypeScript, Vitest — each maps to known naming and convention rules.

  2. Add your house rules

    Additive props, tokens over hard-coded values; these travel verbatim.

  3. Hand the AI the conventions

    It writes code that matches the codebase instead of generic defaults.

Why This Works

  • Stack detection means you list "TypeScript" and get "no any, strict mode on" for free
  • Your own conventions are carried word-for-word, never paraphrased
  • A design-system library is exactly where convention drift causes the most damage

Best for

  • Shared libraries and design systems
  • Teams with a documented style guide
  • Codebases AI keeps writing against the grain of

Not for

  • Reviewing a specific diff against the rules — use the Code Review Prompt Generator
  • Defining a reviewer persona — use the System Prompt Generator

Use cases

  • Shared libraries and design systems
  • Teams with a documented style guide
  • Codebases AI keeps writing against the grain of

Tip: Save time by exploring related resources and tools that integrate with this workflow.

Explore all resources