Skip to main content
KEEP THIS ULTRA SIMPLE: This document is context for other AI agents. Do NOT add extra content, explanations, or “waffle”. Only include the absolute minimum needed.
DOUBLE HEADING BUG: MDX files automatically generate H1 from the title. Do NOT add a second H1 heading or you’ll get duplicate headings in the rendered page.

Writing Principles

One Technical Concept Per Page

Each technical doc should focus on one single technical concept only. Never combine multiple technical concepts in a single page.

Simple Technical Titles

  • Title: Simple noun-focused titles - DO NOT include “How to” or “Understanding”
  • Description: Use simple, clear language - avoid “comprehensive” or overly complex descriptions
  • No Double Headings: Don’t add H1 (#) after the frontmatter title

Content Structure

  • Always start with a flowchart or diagram
  • Use clear subheadings to organize technical concepts
  • Break down complex systems into simple components
  • Keep explanations minimal and focused

Examples

Good: “Authentication Flow” Bad: “How Authentication Works” or “Understanding Authentication System” Good: “Database Schema” Bad: “How Database Schema Works” or “Understanding the Database Structure” Good Description: “Authentication system architecture with flowchart” Bad Description: “Comprehensive technical documentation explaining authentication”

Page Structure Rules

NEVER Include These Sections:

  • Overview - If they’re on the page, they want the technical details
  • Prerequisites - Only include critical technical requirements inline
  • Introduction paragraphs - Keep opening content minimal
  • Background - Jump straight to the technical content
  • Opening sentences that repeat the title/description - No waffle at the top

ALWAYS Follow This Structure:

For Simple Technical Pages:

Components

[Component Name]

  • Purpose: [Single sentence]
  • Technology: [Stack/tools]
  • Key Functions: [Bullet points]

[Component Name]

  • Purpose: [Single sentence]
  • Technology: [Stack/tools]
  • Key Functions: [Bullet points]

Implementation

[Implementation Detail]

[Minimal technical explanation]

[Implementation Detail]

[Minimal technical explanation]

[Technical Section Name]

[Component Name]

  • Purpose: [Single sentence]
  • Technology: [Stack/tools]
  • Key Functions: [Bullet points]

[Technical Section Name]

[Component Name]

  • Purpose: [Single sentence]
  • Technology: [Stack/tools]
  • Key Functions: [Bullet points]
Only include notes for critical technical warnings

2. Document Structure

3. Required Sections

  • Architecture: Always include Mermaid flowchart
  • Components: List technical components with purpose/technology/functions
  • Implementation: Minimal technical details only

4. Flowchart Rules

  • Use Mermaid syntax
  • Keep diagrams simple and focused
  • Show flow, not details
  • Use consistent node shapes
  • Include external integrations

5. Component Documentation

Flowchart Guidelines

Node Types

  • Rectangles: Internal components
  • Diamonds: Decision points
  • Cylinders: Databases
  • Clouds: External services
  • Circles: Start/end points

Flow Direction

  • Top to Bottom: graph TB
  • Left to Right: graph LR
  • Choose based on what makes the flow clearest

Labeling

  • Use clear, technical names
  • Avoid generic terms like “System” or “Service”
  • Be specific: “Supabase Auth”, “DHL API”, “PostgreSQL”

Examples

Good: Auth[Supabase Auth] --> DB[(PostgreSQL)] Bad: System[System] --> Data[Database]

File Naming

  • Use kebab-case: authentication-flow.mdx
  • Be specific: database-schema.mdx not database.mdx
  • Match the title concept: “Authentication Flow” = authentication-flow.mdx