back to gallery
design language·margin-note-operations

Margin Note Operations

A portable design language for agents: download the markdown first, then inspect the preview, tokens, and rules as needed.

Download DESIGN.md

Portable DESIGN.md source of truth for most agents and apps.

the spec

specification

philosophy
summary
Margin Note Operations makes live data feel like annotations in a working document: operational signals sit beside prose, metrics behave like quiet evidence, and charts are small peripheral cues rather than dashboard destinations.
values
Text remains the primary surface; numbers support reading instead of competing with it.Operational state is visible at the edge through low-contrast cues, not large colored panels.Context accumulates through summaries, captions, sparklines, and inline deltas woven into document flow.Progressive disclosure keeps dense analytics available without making the default screen feel analytical.
anti-values
×No KPI billboard rows, equal card grids, dark command centers, or saturation-coded status walls.×No decorative chart chrome, oversized legends, traffic-light dependence, or generic SaaS dashboard composition.×No floating glass panels, heavy shadows, or colorful gradients used to manufacture importance.
tokens
borders4 items
accent width
2px
character
low-contrast warm gray dividers; amber accent only marks changed or attention states
default width
1px
style
solid hairline with dotted leader variants
colors12 items
accent
#A96E2B
background
#F7F6F1
border
#DDDDD4
error
#9B4B3F
info
#526F86
muted
#777C75
primary
#26312E
secondary
#6E756F
success
#5C7A62
surface
#FFFFFC
text
#202622
warning
#A96E2B
motion3 items
duration
160ms
easing
cubic-bezier(0.2, 0, 0.1, 1)
philosophy
motion is limited to short reveal, focus, and disclosure transitions that feel like unfolding a margin note
radii5 items
full
9999px
lg
16px
md
10px
none
0
sm
4px
shadows3 items
lg
0 18px 44px rgba(32,38,34,0.08)
md
0 8px 24px rgba(32,38,34,0.06)
sm
0 1px 2px rgba(32,38,34,0.04)
spacing2 items
base
8px
scale
4, 8, 12, 16, 24, 32, 48, 64
surfaces3 items
bg pattern
barely visible 24px ruled paper grid using rgba border lines below three percent contrast
card style
low-elevation panels with 1px borders, top-rule hierarchy, and no decorative fill gradients
treatment
warm off-white canvas with white document leaves and pale rule-based annotation strips
typography8 items
base size
16px
body font
Source Serif 4
google fonts url
https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Literata:opsz,wght@7..72,500;7..72,600&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&display=swap
heading font
Literata
letter spacing
-0.012em
line height
1.58
mono font
IBM Plex Mono
scale ratio
1.18
rules
composition
Begin with a readable document spine and let data attach as margin evidence, inline annotations, and short operational footnotes rather than separate dashboard zones.
density

Medium density with compact modules in the rail, generous line-height in the document, and collapsed details for secondary analytics.

hierarchy

Hierarchy comes from prose scale, indentation, top rules, tabular numerals, and caption order; color appears only for state changes or selected focus.

signature patterns
Dotted leader lines connect margin modules to exact paragraphs, making analytics feel cited instead of detached.Inline metric lozenges use tabular numerals, small caps labels, and sentence punctuation so data reads as part of prose.Sparkline strips sit beneath summary sentences with one muted stroke and one amber endpoint dot for changed state only.Operational status appears as quiet ledger rows with top-rule grouping, timestamp monospace, and text-first state descriptions.
layout
breakpoints

mobile <= 640px, tablet 641px-980px, desktop >= 981px; the rail becomes inline expandable notes below each cited paragraph.

grid

Desktop uses a centered 12-column workspace: 7 columns for the document, 3 for the annotation rail, 2 for quiet navigation.

whitespace

Whitespace protects reading: 64px outer margins on desktop, 24px paragraph rhythm, and compact 8-12px gaps inside data modules.

guidance
do
  • Write summary sentences before showing numbers so every metric has context and information scent.
  • Use amber only for changed state, current selection, or a single operational warning; keep normal data neutral.
  • Keep charts tiny, captioned, accessible, and adjacent to the text they support.
  • Prefer top rules, leader lines, and indentation over card walls or bright badges.
avoid
  • Do not build a dashboard of KPI cards, equal chart tiles, or a command-center overview.
  • Do not rely on red/yellow/green status coding without text labels and shape-independent hierarchy.
  • Do not add gradients, glass, large shadows, or decorative illustration to make sparse data feel exciting.
  • Do not separate analytics from the document context that explains why the numbers matter.
katagami spec
# Margin Note Operations

## Philosophy

Margin Note Operations makes live data feel like annotations in a working document: operational signals sit beside prose, metrics behave like quiet evidence, and charts are small peripheral cues rather than dashboard destinations.

### Values

- Text remains the primary surface; numbers support reading instead of competing with it.
- Operational state is visible at the edge through low-contrast cues, not large colored panels.
- Context accumulates through summaries, captions, sparklines, and inline deltas woven into document flow.
- Progressive disclosure keeps dense analytics available without making the default screen feel analytical.

### Anti-Values

- No KPI billboard rows, equal card grids, dark command centers, or saturation-coded status walls.
- No decorative chart chrome, oversized legends, traffic-light dependence, or generic SaaS dashboard composition.
- No floating glass panels, heavy shadows, or colorful gradients used to manufacture importance.

### Visual Character

- Use a 68ch document column with a narrow right annotation rail, connected by hairline leader rules and shared baselines.
- Render metrics as inline tabular figures inside sentences and margin chips, using muted labels and one restrained amber state accent.
- Place small SVG sparklines on pale paper strips with no axes, one-pixel strokes, and captions that explain meaning before showing value.
- Separate panels with low-contrast top rules, shallow 10px radii, and almost no shadow so surfaces feel document-adjacent.

## Tokens

### Borders

- **Accent Width**: 2px
- **Character**: low-contrast warm gray dividers; amber accent only marks changed or attention states
- **Default Width**: 1px
- **Style**: solid hairline with dotted leader variants

### Colors

| Name | Value |
|------|-------|
| accent | `#A96E2B` |
| background | `#F7F6F1` |
| border | `#DDDDD4` |
| error | `#9B4B3F` |
| info | `#526F86` |
| muted | `#777C75` |
| primary | `#26312E` |
| secondary | `#6E756F` |
| success | `#5C7A62` |
| surface | `#FFFFFC` |
| text | `#202622` |
| warning | `#A96E2B` |

### Motion

- **Duration**: 160ms
- **Easing**: cubic-bezier(0.2, 0, 0.1, 1)
- **Philosophy**: motion is limited to short reveal, focus, and disclosure transitions that feel like unfolding a margin note

### Radii

- **Full**: 9999px
- **Lg**: 16px
- **Md**: 10px
- **None**: 0
- **Sm**: 4px

### Shadows

- **Lg**: 0 18px 44px rgba(32,38,34,0.08)
- **Md**: 0 8px 24px rgba(32,38,34,0.06)
- **Sm**: 0 1px 2px rgba(32,38,34,0.04)

### Spacing

- **Base**: 8px
- **Scale**: [4,8,12,16,24,32,48,64]

### Surfaces

- **Bg Pattern**: barely visible 24px ruled paper grid using rgba border lines below three percent contrast
- **Card Style**: low-elevation panels with 1px borders, top-rule hierarchy, and no decorative fill gradients
- **Treatment**: warm off-white canvas with white document leaves and pale rule-based annotation strips

### Typography

- **Base Size**: 16px
- **Body Font**: Source Serif 4
- **Google Fonts Url**: https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Literata:opsz,wght@7..72,500;7..72,600&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&display=swap
- **Heading Font**: Literata
- **Letter Spacing**: -0.012em
- **Line Height**: 1.58
- **Mono Font**: IBM Plex Mono
- **Scale Ratio**: 1.18

## Rules

### Composition

Begin with a readable document spine and let data attach as margin evidence, inline annotations, and short operational footnotes rather than separate dashboard zones.

### Density

Medium density with compact modules in the rail, generous line-height in the document, and collapsed details for secondary analytics.

### Hierarchy

Hierarchy comes from prose scale, indentation, top rules, tabular numerals, and caption order; color appears only for state changes or selected focus.

### Signature Patterns

- Dotted leader lines connect margin modules to exact paragraphs, making analytics feel cited instead of detached.
- Inline metric lozenges use tabular numerals, small caps labels, and sentence punctuation so data reads as part of prose.
- Sparkline strips sit beneath summary sentences with one muted stroke and one amber endpoint dot for changed state only.
- Operational status appears as quiet ledger rows with top-rule grouping, timestamp monospace, and text-first state descriptions.

## Layout

### Breakpoints

mobile <= 640px, tablet 641px-980px, desktop >= 981px; the rail becomes inline expandable notes below each cited paragraph.

### Grid

Desktop uses a centered 12-column workspace: 7 columns for the document, 3 for the annotation rail, 2 for quiet navigation.

### Whitespace

Whitespace protects reading: 64px outer margins on desktop, 24px paragraph rhythm, and compact 8-12px gaps inside data modules.

## Guidance

### Do

- Write summary sentences before showing numbers so every metric has context and information scent.
- Use amber only for changed state, current selection, or a single operational warning; keep normal data neutral.
- Keep charts tiny, captioned, accessible, and adjacent to the text they support.
- Prefer top rules, leader lines, and indentation over card walls or bright badges.

### Don't

- Do not build a dashboard of KPI cards, equal chart tiles, or a command-center overview.
- Do not rely on red/yellow/green status coding without text labels and shape-independent hierarchy.
- Do not add gradients, glass, large shadows, or decorative illustration to make sparse data feel exciting.
- Do not separate analytics from the document context that explains why the numbers matter.

### Accessibility

Maintain AA contrast for body text, pair all color states with text, use visible focus outlines, keep sparkline values summarized in captions, and preserve 16px minimum body size.

### Usage Context

Best for document-heavy operations tools, research assistants, compliance review, product analytics notes, health of workflows, and AI copilots that need calm peripheral awareness.
DESIGN.md
---
version: "alpha"
name: "Margin Note Operations"
description: "Agent-curated design language exported from Katagami as DESIGN.md."
colors:
  accent: "#A96E2B"
  background: "#F7F6F1"
  border: "#DDDDD4"
  error: "#9B4B3F"
  info: "#526F86"
  muted: "#777C75"
  primary: "#26312E"
  secondary: "#6E756F"
  success: "#5C7A62"
  surface: "#FFFFFC"
  text: "#202622"
  warning: "#A96E2B"
typography:
  headline-lg:
    fontFamily: "Literata"
    fontSize: "1.643rem"
    fontWeight: 700
    lineHeight: 1.1
    letterSpacing: "-0.012em"
  headline-md:
    fontFamily: "Literata"
    fontSize: "1.392rem"
    fontWeight: 600
    lineHeight: 1.15
    letterSpacing: "-0.012em"
  body-md:
    fontFamily: "Source Serif 4"
    fontSize: "16px"
    fontWeight: 400
    lineHeight: 1.58
    letterSpacing: "-0.012em"
  label-md:
    fontFamily: "IBM Plex Mono"
    fontSize: "0.75rem"
    fontWeight: 600
    lineHeight: 1
    letterSpacing: "0.08em"
rounded:
  full: "9999px"
  lg: "16px"
  md: "10px"
  none: "0px"
  sm: "4px"
spacing:
  base: "8px"
  xs: "4px"
  sm: "8px"
  md: "12px"
  lg: "16px"
  xl: "24px"
  2xl: "32px"
  3xl: "48px"
  4xl: "64px"
components:
  color-reference-accent:
    backgroundColor: "{colors.accent}"
  color-reference-background:
    backgroundColor: "{colors.background}"
  color-reference-border:
    backgroundColor: "{colors.border}"
  color-reference-error:
    backgroundColor: "{colors.error}"
  color-reference-info:
    backgroundColor: "{colors.info}"
  color-reference-muted:
    backgroundColor: "{colors.muted}"
  color-reference-primary:
    backgroundColor: "{colors.primary}"
  color-reference-secondary:
    backgroundColor: "{colors.secondary}"
  color-reference-success:
    backgroundColor: "{colors.success}"
  color-reference-surface:
    backgroundColor: "{colors.surface}"
  color-reference-text:
    backgroundColor: "{colors.text}"
  color-reference-warning:
    backgroundColor: "{colors.warning}"
  button-primary:
    backgroundColor: "{colors.primary}"
    textColor: "#ffffff"
    typography: "{typography.label-md}"
    rounded: "{rounded.md}"
    padding: "{spacing.md}"
  card-surface:
    backgroundColor: "{colors.surface}"
    textColor: "{colors.text}"
    rounded: "{rounded.md}"
    padding: "{spacing.md}"
  input-default:
    backgroundColor: "{colors.surface}"
    textColor: "{colors.text}"
    rounded: "{rounded.md}"
    height: "44px"
---

# Margin Note Operations

## Overview

Margin Note Operations makes live data feel like annotations in a working document: operational signals sit beside prose, metrics behave like quiet evidence, and charts are small peripheral cues rather than dashboard destinations.

### Values

- Text remains the primary surface; numbers support reading instead of competing with it.
- Operational state is visible at the edge through low-contrast cues, not large colored panels.
- Context accumulates through summaries, captions, sparklines, and inline deltas woven into document flow.
- Progressive disclosure keeps dense analytics available without making the default screen feel analytical.

### Anti-Values

- No KPI billboard rows, equal card grids, dark command centers, or saturation-coded status walls.
- No decorative chart chrome, oversized legends, traffic-light dependence, or generic SaaS dashboard composition.
- No floating glass panels, heavy shadows, or colorful gradients used to manufacture importance.

### Visual Character

- Use a 68ch document column with a narrow right annotation rail, connected by hairline leader rules and shared baselines.
- Render metrics as inline tabular figures inside sentences and margin chips, using muted labels and one restrained amber state accent.
- Place small SVG sparklines on pale paper strips with no axes, one-pixel strokes, and captions that explain meaning before showing value.
- Separate panels with low-contrast top rules, shallow 10px radii, and almost no shadow so surfaces feel document-adjacent.

## Colors

Use the YAML color tokens as the normative palette. The prose below names the roles agents should preserve when generating UI.

| Token | Value |
|-------|-------|
| accent | `#A96E2B` |
| background | `#F7F6F1` |
| border | `#DDDDD4` |
| error | `#9B4B3F` |
| info | `#526F86` |
| muted | `#777C75` |
| primary | `#26312E` |
| secondary | `#6E756F` |
| success | `#5C7A62` |
| surface | `#FFFFFC` |
| text | `#202622` |
| warning | `#A96E2B` |

## Typography

- **Headline-Lg**: Literata, 1.643rem, weight 700, line-height 1.1.
- **Headline-Md**: Literata, 1.392rem, weight 600, line-height 1.15.
- **Body-Md**: Source Serif 4, 16px, weight 400, line-height 1.58.
- **Label-Md**: IBM Plex Mono, 0.75rem, weight 600, line-height 1.

## Layout

### Spacing Tokens

- **Base**: `8px`
- **Xs**: `4px`
- **Sm**: `8px`
- **Md**: `12px`
- **Lg**: `16px`
- **Xl**: `24px`
- **2xl**: `32px`
- **3xl**: `48px`
- **4xl**: `64px`

### Breakpoints

mobile <= 640px, tablet 641px-980px, desktop >= 981px; the rail becomes inline expandable notes below each cited paragraph.

### Grid

Desktop uses a centered 12-column workspace: 7 columns for the document, 3 for the annotation rail, 2 for quiet navigation.

### Whitespace

Whitespace protects reading: 64px outer margins on desktop, 24px paragraph rhythm, and compact 8-12px gaps inside data modules.

## Elevation & Depth

### Shadows

- **Lg**: 0 18px 44px rgba(32,38,34,0.08)
- **Md**: 0 8px 24px rgba(32,38,34,0.06)
- **Sm**: 0 1px 2px rgba(32,38,34,0.04)

## Shapes

### Rounded

- **Full**: `9999px`
- **Lg**: `16px`
- **Md**: `10px`
- **None**: `0px`
- **Sm**: `4px`

### Surfaces

- **Bg Pattern**: barely visible 24px ruled paper grid using rgba border lines below three percent contrast
- **Card Style**: low-elevation panels with 1px borders, top-rule hierarchy, and no decorative fill gradients
- **Treatment**: warm off-white canvas with white document leaves and pale rule-based annotation strips

### Borders

- **Accent Width**: 2px
- **Character**: low-contrast warm gray dividers; amber accent only marks changed or attention states
- **Default Width**: 1px
- **Style**: solid hairline with dotted leader variants

## Components

### Composition

Begin with a readable document spine and let data attach as margin evidence, inline annotations, and short operational footnotes rather than separate dashboard zones.

### Density

Medium density with compact modules in the rail, generous line-height in the document, and collapsed details for secondary analytics.

### Hierarchy

Hierarchy comes from prose scale, indentation, top rules, tabular numerals, and caption order; color appears only for state changes or selected focus.

### Signature Patterns

- Dotted leader lines connect margin modules to exact paragraphs, making analytics feel cited instead of detached.
- Inline metric lozenges use tabular numerals, small caps labels, and sentence punctuation so data reads as part of prose.
- Sparkline strips sit beneath summary sentences with one muted stroke and one amber endpoint dot for changed state only.
- Operational status appears as quiet ledger rows with top-rule grouping, timestamp monospace, and text-first state descriptions.

## shadcn/ui Usage

When the target app uses shadcn/ui, copy DESIGN.md with shadcn instead of the plain DESIGN.md. It contains the same Katagami design-language source plus the shadcn/ui primitives, imports, theme variables, component recipes, and preview-shot guidance.

DESIGN.md with shadcn: `/language/en-019edab3-30c5-7c80-91eb-2faf83e8ea09/DESIGN.with-shadcn.md`.

The shadcn page also exposes optional machine-readable files for automation, but the human-facing handoff is DESIGN.md with shadcn.

Install recommended primitives with `npx shadcn@latest add button card input textarea select dialog sheet tabs badge separator checkbox switch slider tooltip dropdown-menu table`.

Use these primitives in shadcn apps:
- button
- card
- input
- textarea
- select
- dialog
- sheet
- tabs
- badge
- separator
- checkbox
- switch
- slider
- tooltip
- dropdown-menu
- table

Implementation rule for agents: import shadcn primitives from `@/components/ui/*`, apply the generated CSS variables first, then compose the language-specific recipes from the companion MD. Katagami remains the source of truth; shadcn names are the implementation surface.

## Do's and Don'ts

- Do Write summary sentences before showing numbers so every metric has context and information scent.
- Do Use amber only for changed state, current selection, or a single operational warning; keep normal data neutral.
- Do Keep charts tiny, captioned, accessible, and adjacent to the text they support.
- Do Prefer top rules, leader lines, and indentation over card walls or bright badges.
- Don't Do not build a dashboard of KPI cards, equal chart tiles, or a command-center overview.
- Don't Do not rely on red/yellow/green status coding without text labels and shape-independent hierarchy.
- Don't Do not add gradients, glass, large shadows, or decorative illustration to make sparse data feel exciting.
- Don't Do not separate analytics from the document context that explains why the numbers matter.

### Accessibility

Maintain AA contrast for body text, pair all color states with text, use visible focus outlines, keep sparkline values summarized in captions, and preserve 16px minimum body size.

### Usage Context

Best for document-heavy operations tools, research assistants, compliance review, product analytics notes, health of workflows, and AI copilots that need calm peripheral awareness.
shadcn/ui theme
```json
{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "margin-note-operations",
  "type": "registry:theme",
  "title": "Margin Note Operations shadcn Theme",
  "cssVars": {
    "theme": {},
    "light": {
      "background": "#F7F6F1",
      "foreground": "#202622",
      "card": "#FFFFFC",
      "card-foreground": "#202622",
      "popover": "#FFFFFC",
      "popover-foreground": "#202622",
      "primary": "#26312E",
      "primary-foreground": "#ffffff",
      "secondary": "#6E756F",
      "secondary-foreground": "#ffffff",
      "muted": "#777C75",
      "muted-foreground": "#202622",
      "accent": "#A96E2B",
      "accent-foreground": "#ffffff",
      "destructive": "#9B4B3F",
      "border": "#DDDDD4",
      "input": "#DDDDD4",
      "ring": "#A96E2B",
      "chart-1": "#26312E",
      "chart-2": "#6E756F",
      "chart-3": "#A96E2B",
      "chart-4": "#5C7A62",
      "chart-5": "#A96E2B",
      "sidebar": "#FFFFFC",
      "sidebar-foreground": "#202622",
      "sidebar-primary": "#26312E",
      "sidebar-primary-foreground": "#ffffff",
      "sidebar-accent": "#526F86",
      "sidebar-accent-foreground": "#ffffff",
      "sidebar-border": "#DDDDD4",
      "sidebar-ring": "#A96E2B",
      "radius": "10px"
    },
    "dark": {
      "background": "#0f1115",
      "foreground": "#f8fafc",
      "card": "#181b22",
      "card-foreground": "#f8fafc",
      "popover": "#181b22",
      "popover-foreground": "#f8fafc",
      "primary": "#26312E",
      "primary-foreground": "#ffffff",
      "secondary": "#252a33",
      "secondary-foreground": "#f8fafc",
      "muted": "#252a33",
      "muted-foreground": "#a1a1aa",
      "accent": "#A96E2B",
      "accent-foreground": "#ffffff",
      "destructive": "#9B4B3F",
      "border": "#303642",
      "input": "#303642",
      "ring": "#A96E2B",
      "chart-1": "#26312E",
      "chart-2": "#6E756F",
      "chart-3": "#A96E2B",
      "chart-4": "#5C7A62",
      "chart-5": "#A96E2B",
      "sidebar": "#181b22",
      "sidebar-foreground": "#f8fafc",
      "sidebar-primary": "#26312E",
      "sidebar-primary-foreground": "#ffffff",
      "sidebar-accent": "#A96E2B",
      "sidebar-accent-foreground": "#ffffff",
      "sidebar-border": "#303642",
      "sidebar-ring": "#A96E2B",
      "radius": "10px"
    }
  },
  "meta": {
    "source": "katagami",
    "languageId": "en-019edab3-30c5-7c80-91eb-2faf83e8ea09",
    "slug": "margin-note-operations",
    "componentManifest": [
      "button",
      "card",
      "input",
      "textarea",
      "select",
      "dialog",
      "sheet",
      "tabs",
      "badge",
      "separator",
      "checkbox",
      "switch",
      "slider",
      "tooltip",
      "dropdown-menu",
      "table"
    ],
    "installCommand": "npx shadcn@latest add button card input textarea select dialog sheet tabs badge separator checkbox switch slider tooltip dropdown-menu table",
    "nativeTokenNames": {
      "borders": [
        "accent_width",
        "character",
        "default_width",
        "style"
      ],
      "colors": [
        "accent",
        "background",
        "border",
        "error",
        "info",
        "muted",
        "primary",
        "secondary",
        "success",
        "surface",
        "text",
        "warning"
      ],
      "motion": [
        "duration",
        "easing",
        "philosophy"
      ],
      "radii": [
        "full",
        "lg",
        "md",
        "none",
        "sm"
      ],
      "shadows": [
        "lg",
        "md",
        "sm"
      ],
      "spacing": [
        "base",
        "scale"
      ],
      "surfaces": [
        "bg_pattern",
        "card_style",
        "treatment"
      ],
      "typography": [
        "base_size",
        "body_font",
        "google_fonts_url",
        "heading_font",
        "letter_spacing",
        "line_height",
        "mono_font",
        "scale_ratio"
      ]
    }
  }
}
```
in the wild

embodiments

the full element showcase
embodiment · margin-note-operations
DESIGN.md

at a glance

Palette

Typography

headline-lgLiterata · 26px · 700

The quick brown fox jumps

headline-mdLiterata · 22px · 600

The quick brown fox jumps

body-mdSource Serif 4 · 16px · 400

The quick brown fox jumps

label-mdIBM Plex Mono · 12px · 600

The quick brown fox jumps

Components

New
Card title

Components rendered with this language’s tokens — colors, type, and rounded corners as specified.

Spacing

  • base8px
  • xs4px
  • sm8px
  • md12px
  • lg16px
  • xl24px
  • 2xl32px
  • 3xl48px
  • 4xl64px

Shape

full9999px
lg16px
md10px
none0px
sm4px
shadcn/ui

implementation kit

needs agent-authored kitcompatibility fallback
shadcn compatibility only
The generated theme variables are available, but the polished shadcn component recipes and shots have not been authored by the Katagami agent yet.
fallbackprimitives render
Compatibility proof
Local shadcn-style primitives accept the generated theme variables.
primaryaccentsurfacemutederror
table rhythm
buttonok
cardok
inputok
recommendedcompatibility fallback

DESIGN.md with shadcn

Copy this when the target app uses shadcn/ui. It packages the Katagami DESIGN.md context with the install list, theme variables, component recipes, preview-shot contract, and starter TSX in one Markdown companion.

advanced implementation filesoptional machine-readable theme, CSS, TSX starter, recipes, and preview contract
shadcn add
npx shadcn@latest add button card input textarea select dialog sheet tabs badge separator checkbox switch slider tooltip dropdown-menu table
theme css
:root {
  --background: #F7F6F1;
  --foreground: #202622;
  --card: #FFFFFC;
  --card-foreground: #202622;
  --popover: #FFFFFC;
  --popover-foreground: #202622;
  --primary: #26312E;
  --primary-foreground: #ffffff;
  --secondary: #6E756F;
  --secondary-foreground: #ffffff;
  --muted: #777C75;
  --muted-foreground: #202622;
  --accent: #A96E2B;
  --accent-foreground: #ffffff;
  --destructive: #9B4B3F;
  --border: #DDDDD4;
  --input: #DDDDD4;
  --ring: #A96E2B;
  --chart-1: #26312E;
  --chart-2: #6E756F;
  --chart-3: #A96E2B;
  --chart-4: #5C7A62;
  --chart-5: #A96E2B;
  --sidebar: #FFFFFC;
  --sidebar-foreground: #202622;
  --sidebar-primary: #26312E;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #526F86;
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: #DDDDD4;
  --sidebar-ring: #A96E2B;
  --radius: 10px;
}

.dark {
  --background: #0f1115;
  --foreground: #f8fafc;
  --card: #181b22;
  --card-foreground: #f8fafc;
  --popover: #181b22;
  --popover-foreground: #f8fafc;
  --primary: #26312E;
  --primary-foreground: #ffffff;
  --secondary: #252a33;
  --secondary-foreground: #f8fafc;
  --muted: #252a33;
  --muted-foreground: #a1a1aa;
  --accent: #A96E2B;
  --accent-foreground: #ffffff;
  --destructive: #9B4B3F;
  --border: #303642;
  --input: #303642;
  --ring: #A96E2B;
  --chart-1: #26312E;
  --chart-2: #6E756F;
  --chart-3: #A96E2B;
  --chart-4: #5C7A62;
  --chart-5: #A96E2B;
  --sidebar: #181b22;
  --sidebar-foreground: #f8fafc;
  --sidebar-primary: #26312E;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #A96E2B;
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: #303642;
  --sidebar-ring: #A96E2B;
  --radius: 10px;
}
tsx starter
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import {
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
} from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";

export function MarginNoteOperationsShadcnKit() {
  return (
    <section className="grid gap-4 rounded-[var(--radius)] border bg-background p-4 text-foreground">
      <div className="flex items-start justify-between gap-4">
        <div>
          <Badge variant="outline">shadcn/ui</Badge>
          <h2 className="mt-3 text-2xl font-semibold tracking-tight">Margin Note Operations</h2>
          <p className="mt-1 max-w-xl text-sm text-muted-foreground">
            Use the Katagami registry theme, then compose these shadcn primitives
            with the language-specific component recipes.
          </p>
        </div>
        <Button>Apply theme</Button>
      </div>

      <Tabs defaultValue="components">
        <TabsList>
          <TabsTrigger value="components">Components</TabsTrigger>
          <TabsTrigger value="states">States</TabsTrigger>
          <TabsTrigger value="export">Export</TabsTrigger>
        </TabsList>
      </Tabs>

      <Card>
        <CardHeader>
          <CardTitle>Component recipe</CardTitle>
          <CardDescription>
            Replace this starter content with the agent-authored product scene
            from components.md and preview-shots.json.
          </CardDescription>
        </CardHeader>
        <CardContent className="grid gap-3 sm:grid-cols-[1fr_auto]">
          <Input defaultValue="Tokenized shadcn surface" aria-label="Recipe name" />
          <Button variant="secondary">Preview state</Button>
        </CardContent>
        <CardFooter className="justify-between">
          <Badge>Ready</Badge>
          <Button variant="outline">Copy recipe</Button>
        </CardFooter>
      </Card>
    </section>
  );
}
theme JSONcompatibility fallback
{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "margin-note-operations",
  "type": "registry:theme",
  "title": "Margin Note Operations shadcn Theme",
  "cssVars": {
    "theme": {},
    "light": {
      "background": "#F7F6F1",
      "foreground": "#202622",
      "card": "#FFFFFC",
      "card-foreground": "#202622",
      "popover": "#FFFFFC",
      "popover-foreground": "#202622",
      "primary": "#26312E",
      "primary-foreground": "#ffffff",
      "secondary": "#6E756F",
      "secondary-foreground": "#ffffff",
      "muted": "#777C75",
      "muted-foreground": "#202622",
      "accent": "#A96E2B",
      "accent-foreground": "#ffffff",
      "destructive": "#9B4B3F",
      "border": "#DDDDD4",
      "input": "#DDDDD4",
      "ring": "#A96E2B",
      "chart-1": "#26312E",
      "chart-2": "#6E756F",
      "chart-3": "#A96E2B",
      "chart-4": "#5C7A62",
      "chart-5": "#A96E2B",
      "sidebar": "#FFFFFC",
      "sidebar-foreground": "#202622",
      "sidebar-primary": "#26312E",
      "sidebar-primary-foreground": "#ffffff",
      "sidebar-accent": "#526F86",
      "sidebar-accent-foreground": "#ffffff",
      "sidebar-border": "#DDDDD4",
      "sidebar-ring": "#A96E2B",
      "radius": "10px"
    },
    "dark": {
      "background": "#0f1115",
      "foreground": "#f8fafc",
      "card": "#181b22",
      "card-foreground": "#f8fafc",
      "popover": "#181b22",
      "popover-foreground": "#f8fafc",
      "primary": "#26312E",
      "primary-foreground": "#ffffff",
      "secondary": "#252a33",
      "secondary-foreground": "#f8fafc",
      "muted": "#252a33",
      "muted-foreground": "#a1a1aa",
      "accent": "#A96E2B",
      "accent-foreground": "#ffffff",
      "destructive": "#9B4B3F",
      "border": "#303642",
      "input": "#303642",
      "ring": "#A96E2B",
      "chart-1": "#26312E",
      "chart-2": "#6E756F",
      "chart-3": "#A96E2B",
      "chart-4": "#5C7A62",
      "chart-5": "#A96E2B",
      "sidebar": "#181b22",
      "sidebar-foreground": "#f8fafc",
      "sidebar-primary": "#26312E",
      "sidebar-primary-foreground": "#ffffff",
      "sidebar-accent": "#A96E2B",
      "sidebar-accent-foreground": "#ffffff",
      "sidebar-border": "#303642",
      "sidebar-ring": "#A96E2B",
      "radius": "10px"
    }
  },
  "meta": {
    "source": "katagami",
    "languageId": "en-019edab3-30c5-7c80-91eb-2faf83e8ea09",
    "slug": "margin-note-operations",
    "componentManifest": [
      "button",
      "card",
      "input",
      "textarea",
      "select",
      "dialog",
      "sheet",
      "tabs",
      "badge",
      "separator",
      "checkbox",
      "switch",
      "slider",
      "tooltip",
      "dropdown-menu",
      "table"
    ],
    "installCommand": "npx shadcn@latest add button card input textarea select dialog sheet tabs badge separator checkbox switch slider tooltip dropdown-menu table",
    "nativeTokenNames": {
      "borders": [
        "accent_width",
        "character",
        "default_width",
        "style"
      ],
      "colors": [
        "accent",
        "background",
        "border",
        "error",
        "info",
        "muted",
        "primary",
        "secondary",
        "success",
        "surface",
        "text",
        "warning"
      ],
      "motion": [
        "duration",
        "easing",
        "philosophy"
      ],
      "radii": [
        "full",
        "lg",
        "md",
        "none",
        "sm"
      ],
      "shadows": [
        "lg",
        "md",
        "sm"
      ],
      "spacing": [
        "base",
        "scale"
      ],
      "surfaces": [
        "bg_pattern",
        "card_style",
        "treatment"
      ],
      "typography": [
        "base_size",
        "body_font",
        "google_fonts_url",
        "heading_font",
        "letter_spacing",
        "line_height",
        "mono_font",
        "scale_ratio"
      ]
    }
  }
}
component recipescompatibility fallback
# Margin Note Operations shadcn/ui Components

Artifact: `component-recipes-v1`
Author: `katagami-ui-projection`
Language ID: `en-019edab3-30c5-7c80-91eb-2faf83e8ea09`
Slug: `margin-note-operations`

## Intent

Margin Note Operations makes live data feel like annotations in a working document: operational signals sit beside prose, metrics behave like quiet evidence, and charts are small peripheral cues rather than dashboard destinations.

## Required primitives

- button
- card
- input
- textarea
- select
- dialog
- sheet
- tabs
- badge
- separator
- checkbox
- switch
- slider
- tooltip
- dropdown-menu
- table

Install with `npx shadcn@latest add button card input textarea select dialog sheet tabs badge separator checkbox switch slider tooltip dropdown-menu table`.

## Token cues

Colors:

{
  "accent": "#A96E2B",
  "background": "#F7F6F1",
  "border": "#DDDDD4",
  "error": "#9B4B3F",
  "info": "#526F86",
  "muted": "#777C75",
  "primary": "#26312E",
  "secondary": "#6E756F",
  "success": "#5C7A62",
  "surface": "#FFFFFC",
  "text": "#202622",
  "warning": "#A96E2B"
}

Typography:

{
  "base_size": "16px",
  "body_font": "Source Serif 4",
  "google_fonts_url": "https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Literata:opsz,wght@7..72,500;7..72,600&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&display=swap",
  "heading_font": "Literata",
  "letter_spacing": "-0.012em",
  "line_height": 1.58,
  "mono_font": "IBM Plex Mono",
  "scale_ratio": 1.18
}

## Visual character to preserve

- Use a 68ch document column with a narrow right annotation rail, connected by hairline leader rules and shared baselines.
- Render metrics as inline tabular figures inside sentences and margin chips, using muted labels and one restrained amber state accent.
- Place small SVG sparklines on pale paper strips with no axes, one-pixel strokes, and captions that explain meaning before showing value.
- Separate panels with low-contrast top rules, shallow 10px radii, and almost no shadow so surfaces feel document-adjacent.

## ShadSync visual profile

{
  "family": "paper-collage",
  "material": "paper",
  "contour": "default",
  "border": "solid",
  "underlay": false,
  "grain": true,
  "stickerBadges": true,
  "motion": "still",
  "density": "dense",
  "accents": [
    "primary",
    "accent",
    "secondary",
    "muted"
  ]
}

## Signature component recipes

### Button
Use `Button` for primary, secondary, outline, and ghost actions. Primary actions must expose the language's strongest contrast pair, while secondary and ghost actions should preserve the surface treatment instead of falling back to default neutral SaaS styling.

### Card
Use `Card`, `CardHeader`, `CardContent`, `CardFooter`, and `CardAction` as the main composition frame. Cards should demonstrate the language's surface, border, hierarchy, and density rules rather than appearing as generic rounded rectangles.

### Input and Textarea
Use `Input` and `Textarea` with visible focus rings, field labels, validation states, and the language's rhythm. Forms should show real product content, not placeholder-only controls.

### Select, Tabs, and Table
Use `Select`, `Tabs`, and `Table` to prove navigation, filtering, and dense data states. The table should show row rhythm, separators, hover/focus states, and an empty or status state when the language calls for it.

### Dialog and Sheet
Use `Dialog` for centered decisions and `Sheet` for contextual editing. Both should inherit the language's spacing, border, overlay, and motion rules.

## Preview shots

- `application-shell`: dashboard or workspace shell with navigation, cards, forms, and state badges.
- `detail-editor`: focused editing flow using input, textarea, select, switch/checkbox, dialog or sheet, and action buttons.
- `data-operations`: table-heavy operational view with tabs, dropdown menu affordances, badges, and destructive/empty states.
- Each preview shot must include a renderable `scene` payload with concrete headline, description, actions, and rows/fields/stats for the UI preview.

## Implementation contract

- Start from local `ui/src/components/ui` shadcn-style primitives; do not create a second component system.
- Apply `/katagami/shadcn/margin-note-operations/registry-theme.json` variables, then use these recipes for composition and state design.
- Preserve Katagami token names as source metadata; shadcn semantic names are only the export surface.
- Do: Write summary sentences before showing numbers so every metric has context and information scent.; Use amber only for changed state, current selection, or a single operational warning; keep normal data neutral.; Keep charts tiny, captioned, accessible, and adjacent to the text they support.; Prefer top rules, leader lines, and indentation over card walls or bright badges.
- Do not: Do not build a dashboard of KPI cards, equal chart tiles, or a command-center overview.; Do not rely on red/yellow/green status coding without text labels and shape-independent hierarchy.; Do not add gradients, glass, large shadows, or decorative illustration to make sparse data feel exciting.; Do not separate analytics from the document context that explains why the numbers matter.

## Copy-paste component example

This generated starter proves the import shape. Production Katagami agents should replace it with a language-specific product composition.

```tsx
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import {
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
} from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";

export function MarginNoteOperationsShadcnKit() {
  return (
    <section className="grid gap-4 rounded-[var(--radius)] border bg-background p-4 text-foreground">
      <div className="flex items-start justify-between gap-4">
        <div>
          <Badge variant="outline">shadcn/ui</Badge>
          <h2 className="mt-3 text-2xl font-semibold tracking-tight">Margin Note Operations</h2>
          <p className="mt-1 max-w-xl text-sm text-muted-foreground">
            Use the Katagami registry theme, then compose these shadcn primitives
            with the language-specific component recipes.
          </p>
        </div>
        <Button>Apply theme</Button>
      </div>

      <Tabs defaultValue="components">
        <TabsList>
          <TabsTrigger value="components">Components</TabsTrigger>
          <TabsTrigger value="states">States</TabsTrigger>
          <TabsTrigger value="export">Export</TabsTrigger>
        </TabsList>
      </Tabs>

      <Card>
        <CardHeader>
          <CardTitle>Component recipe</CardTitle>
          <CardDescription>
            Replace this starter content with the agent-authored product scene
            from components.md and preview-shots.json.
          </CardDescription>
        </CardHeader>
        <CardContent className="grid gap-3 sm:grid-cols-[1fr_auto]">
          <Input defaultValue="Tokenized shadcn surface" aria-label="Recipe name" />
          <Button variant="secondary">Preview state</Button>
        </CardContent>
        <CardFooter className="justify-between">
          <Badge>Ready</Badge>
          <Button variant="outline">Copy recipe</Button>
        </CardFooter>
      </Card>
    </section>
  );
}
```

## Layout notes

{
  "breakpoints": "mobile <= 640px, tablet 641px-980px, desktop >= 981px; the rail becomes inline expandable notes below each cited paragraph.",
  "grid": "Desktop uses a centered 12-column workspace: 7 columns for the document, 3 for the annotation rail, 2 for quiet navigation.",
  "whitespace": "Whitespace protects reading: 64px outer margins on desktop, 24px paragraph rhythm, and compact 8-12px gaps inside data modules."
}
preview shotscompatibility fallback
{
  "artifact": "katagami:shadcn-preview-shots",
  "version": "preview-shots-v1",
  "generator": "katagami-ui-compatibility-projection",
  "generatedBy": "katagami-ui-projection",
  "requiresVisualProfile": true,
  "schema": "katagami:shadcn-preview-shots/renderable-v1",
  "renderable": true,
  "language": {
    "id": "en-019edab3-30c5-7c80-91eb-2faf83e8ea09",
    "name": "Margin Note Operations",
    "slug": "margin-note-operations"
  },
  "installCommand": "npx shadcn@latest add button card input textarea select dialog sheet tabs badge separator checkbox switch slider tooltip dropdown-menu table",
  "primitives": [
    "button",
    "card",
    "input",
    "textarea",
    "select",
    "dialog",
    "sheet",
    "tabs",
    "badge",
    "separator",
    "checkbox",
    "switch",
    "slider",
    "tooltip",
    "dropdown-menu",
    "table"
  ],
  "identityNotes": [
    "Use a 68ch document column with a narrow right annotation rail, connected by hairline leader rules and shared baselines.",
    "Render metrics as inline tabular figures inside sentences and margin chips, using muted labels and one restrained amber state accent.",
    "Place small SVG sparklines on pale paper strips with no axes, one-pixel strokes, and captions that explain meaning before showing value.",
    "Separate panels with low-contrast top rules, shallow 10px radii, and almost no shadow so surfaces feel document-adjacent."
  ],
  "visualProfile": {
    "family": "paper-collage",
    "material": "paper",
    "contour": "default",
    "border": "solid",
    "underlay": false,
    "grain": true,
    "stickerBadges": true,
    "motion": "still",
    "density": "dense",
    "accents": [
      "primary",
      "accent",
      "secondary",
      "muted"
    ]
  },
  "shots": [
    {
      "id": "application-shell",
      "title": "Application shell",
      "viewport": "desktop",
      "primitives": [
        "button",
        "card",
        "input",
        "select",
        "tabs",
        "badge",
        "separator",
        "table"
      ],
      "composition": "A real product workspace with navigation, summary cards, filtering controls, and one dense content region.",
      "mustShow": [
        "primary and secondary actions",
        "card hierarchy",
        "filterable state",
        "table or list density"
      ],
      "avoid": [
        "component inventory walls",
        "placeholder-only content",
        "generic rounded SaaS chrome"
      ],
      "scene": {
        "eyebrow": "workspace spread",
        "headline": "Margin Note Operations launch room",
        "description": "A product team workspace where navigation, filters, metrics, and dense rows carry the language's visible structure.",
        "primaryAction": "Apply theme",
        "secondaryAction": "Review states",
        "stats": [
          {
            "label": "components",
            "value": "16",
            "tone": "accent"
          },
          {
            "label": "states",
            "value": "ready"
          },
          {
            "label": "density",
            "value": "balanced",
            "tone": "warning"
          }
        ],
        "rows": [
          {
            "label": "Primary flow",
            "value": "mapped",
            "status": "active"
          },
          {
            "label": "Token coverage",
            "value": "semantic",
            "status": "synced"
          },
          {
            "label": "Responsive proof",
            "value": "queued",
            "status": "review"
          }
        ],
        "statuses": [
          "Active",
          "Synced",
          "Draft"
        ]
      }
    },
    {
      "id": "detail-editor",
      "title": "Detail editor",
      "viewport": "tablet",
      "primitives": [
        "button",
        "card",
        "input",
        "textarea",
        "select",
        "checkbox",
        "switch",
        "slider",
        "dialog",
        "sheet"
      ],
      "composition": "A focused editing flow with form fields, validation, confirmation, and a contextual side panel.",
      "mustShow": [
        "focus ring",
        "error or destructive state",
        "dialog or sheet treatment",
        "written guidance content"
      ],
      "avoid": [
        "unstyled browser controls",
        "floating cards inside cards",
        "missing labels"
      ],
      "scene": {
        "eyebrow": "editing flow",
        "headline": "Language recipe editor",
        "description": "A focused form proving labels, validation, toggles, panel rhythm, and action hierarchy.",
        "primaryAction": "Save recipe",
        "secondaryAction": "Open sheet",
        "fields": [
          {
            "label": "Component family",
            "value": "Narrative cards"
          },
          {
            "label": "State treatment",
            "value": "Visible focus + validation"
          },
          {
            "label": "Motion",
            "value": "Small lift, no opacity-only fade"
          }
        ],
        "statuses": [
          "Focus",
          "Invalid",
          "Confirmed"
        ]
      }
    },
    {
      "id": "data-operations",
      "title": "Data operations",
      "viewport": "mobile",
      "primitives": [
        "button",
        "tabs",
        "badge",
        "dropdown-menu",
        "table",
        "tooltip",
        "separator"
      ],
      "composition": "A compact operational view proving row rhythm, stacked actions, menu states, badges, and empty/destructive states.",
      "mustShow": [
        "responsive reflow",
        "dense row styling",
        "menu affordance",
        "status badge system"
      ],
      "avoid": [
        "desktop-only tables",
        "text overflow",
        "default shadcn spacing without Katagami character"
      ],
      "scene": {
        "eyebrow": "operations",
        "headline": "Compact review queue",
        "description": "A narrow viewport scene with rows, menus, tooltips, badges, and destructive affordances.",
        "primaryAction": "Resolve",
        "secondaryAction": "Filter",
        "rows": [
          {
            "label": "Button hierarchy",
            "value": "approved",
            "status": "ok"
          },
          {
            "label": "Table rhythm",
            "value": "needs pass",
            "status": "watch"
          },
          {
            "label": "Empty state",
            "value": "designed",
            "status": "done"
          }
        ],
        "statuses": [
          "Queued",
          "Blocked",
          "Done"
        ]
      }
    }
  ],
  "componentRecipes": [
    {
      "primitive": "button",
      "intent": "Prove action hierarchy, focus, disabled, and destructive states."
    },
    {
      "primitive": "card",
      "intent": "Carry the language surface, border, elevation, and density rules."
    },
    {
      "primitive": "input",
      "intent": "Show labels, focus rings, validation, and spacing rhythm."
    },
    {
      "primitive": "textarea",
      "intent": "Show longer guidance, validation copy, and writing density."
    },
    {
      "primitive": "select",
      "intent": "Show filtering, selection contrast, and menu trigger styling."
    },
    {
      "primitive": "dialog",
      "intent": "Show centered decision states and overlay treatment."
    },
    {
      "primitive": "sheet",
      "intent": "Show contextual side panels and responsive editing."
    },
    {
      "primitive": "tabs",
      "intent": "Show navigational structure and active/inactive contrast."
    },
    {
      "primitive": "badge",
      "intent": "Show compact status vocabulary and semantic colors."
    },
    {
      "primitive": "separator",
      "intent": "Show section rhythm without generic gray dividers."
    },
    {
      "primitive": "checkbox",
      "intent": "Show binary selection with visible focus and checked states."
    },
    {
      "primitive": "switch",
      "intent": "Show settings toggles and on/off contrast."
    },
    {
      "primitive": "slider",
      "intent": "Show numeric adjustment with track/thumb styling."
    },
    {
      "primitive": "tooltip",
      "intent": "Show concise explanation styling above compact controls."
    },
    {
      "primitive": "dropdown-menu",
      "intent": "Show action menus, destructive items, and grouped choices."
    },
    {
      "primitive": "table",
      "intent": "Show dense operational data, separators, row states, and responsive behavior."
    }
  ],
  "qualityRules": {
    "do": [
      "Write summary sentences before showing numbers so every metric has context and information scent.",
      "Use amber only for changed state, current selection, or a single operational warning; keep normal data neutral.",
      "Keep charts tiny, captioned, accessible, and adjacent to the text they support.",
      "Prefer top rules, leader lines, and indentation over card walls or bright badges."
    ],
    "dont": [
      "Do not build a dashboard of KPI cards, equal chart tiles, or a command-center overview.",
      "Do not rely on red/yellow/green status coding without text labels and shape-independent hierarchy.",
      "Do not add gradients, glass, large shadows, or decorative illustration to make sparse data feel exciting.",
      "Do not separate analytics from the document context that explains why the numbers matter."
    ]
  }
}
related

More like this