# BrokenApp Brand Kit

The single source of truth for how BrokenApp looks and sounds. Every logo, icon, picture, social card and color token in this folder is generated from `tokens/tokens.json` by `build.py`, so the variants cannot drift apart.

| | |
|---|---|
| **Name** | BrokenApp |
| **Tagline** | A map of what your web app actually does. |
| **Idea** | The cut, and the record of it. |
| **Logo** | The wordmark `Broken/App` and the cleave icon. Two forms, never together. |
| **Colors** | Ink `#060606`, Bone `#EFEBE3`, Signal `#FF2A2A` |
| **Type** | Cormorant (the claim), IBM Plex Sans (the explanation), IBM Plex Mono (the evidence) |
| **Live guide** | <https://brokenapp.io/brand> |

---

## The idea

BrokenApp has one mark and two ways of speaking.

- **The cut** makes the claim. Black ground, one solid, one red slash through it, a large serif headline. Use it where the brand has to land: homepage, launch, social cards, the top of the README.
- **The record** backs the claim up. Figures with numbered captions, rows of observed fact, a file and a line for everything. Use it where an engineer decides whether to trust the output: docs, the CLI report, changelogs, terminal output.

Three rules of thumb cover most decisions:

1. **Red means broken.** The slash, and anything the tool reports as broken. Nothing else, ever.
2. **Mono means the tool said it.** Commands, paths, records, callouts.
3. **Pixels are for pictures,** never for letters.

---

## What's in the kit

| Folder | Contents |
|---|---|
| `logo/wordmark/` | `Broken/App`, outlined. `on-ink`, `on-paper`, `mono-bone`, `mono-ink`. PNGs at 64, 128 and 256 px tall. |
| `logo/icon/` | The cleave. `on-ink` and `on-paper` (clear ground), `small-on-ink` and `small-on-paper` (16 to 24 px), `tile-ink` and `tile-paper` (opaque tile), `mono-bone` and `mono-ink`. PNGs from 16 to 1024 px. |
| `logo/slash/` | The slash on its own, in `signal`, `signal-deep`, `bone`, `ink`. |
| `app-icons/` | `favicon.svg` (follows the reader's color scheme), `favicon.ico` (16/32/48), `apple-touch-icon.png` (180), `icon-192.png`, `icon-512.png`, `icon-maskable-512.png`. |
| `social/` | `og-default.png` (1200×630 link preview), `github-social-preview.png` (1280×640), `avatar-512/1024.png`. SVG masters alongside. |
| `pictures/` | The dithered pictures: four cut solids and the role figure, each for ink and for paper, plus `ground-grain.png`. `pictures.json` lists sizes and label anchors. |
| `guides/` | `icon-construction`, `wordmark-construction` and `clear-space` diagrams. |
| `tokens/` | `tokens.json` (W3C design-token format, **edit this**), generated `tokens.css` and `tailwind-theme.css`. |
| `pictures.py` | The picture generator. One command per picture. |
| `dist/brokenapp-brandkit.zip` | Everything above in one download (also served at `brokenapp.io/brand/brokenapp-brandkit.zip`). |

All SVGs are self-contained. Text is converted to outlines, so nothing depends on fonts being installed. `fonts/` holds build inputs only and is not part of the download.

---

## Logo

### Two forms, never together

The wordmark has the slash in it. The icon has the slash in it. Side by side they would say it twice, so there is no lockup: use the wordmark wherever there is width and the icon wherever there is not.

| Situation | Use |
|---|---|
| Dark grounds (site header, dark slides, terminal screenshots) | `wordmark/brokenapp-wordmark-on-ink.svg` |
| Light grounds (docs, print, light slides) | `wordmark/brokenapp-wordmark-on-paper.svg` |
| Square or tight spaces, on a ground you control | `icon/brokenapp-icon-on-ink.svg` or `-on-paper.svg` |
| 16 to 24 px | `icon/brokenapp-icon-small-on-ink.svg` or `-small-on-paper.svg` |
| App icons, avatars, any ground you do not control | `icon/brokenapp-icon-tile-ink.svg` (or `social/avatar-*.png` where it crops to a circle) |
| One-color printing, embossing, watermarks | `*-mono-bone` / `*-mono-ink` |
| The broken mark, bullets, inline accents | `slash/brokenapp-slash-signal.svg` (`-signal-deep` on paper) |

### The slash

A rectangle, one to seven (48 × 336 on a 512 artboard), square-ended, rotated **30° clockwise** from vertical so it leans right like `/`. It is Signal red on every ground. It is the `/` in every route and in `.brokenapp/map/`, and it is the cut where something breaks. It never changes.

### The wordmark

![Wordmark construction](guides/wordmark-construction.png)

- `Broken`, the slash, `App`, in IBM Plex Sans Medium, tracking −0.015 em.
- The slash is 1.126 em long, so it stands taller than the capitals and drops below the baseline. It takes 0.55 em of room between the words.
- In a sentence the name is still **BrokenApp**, one word. The slash belongs to the logo, not to the spelling.

### The icon

![Icon construction](guides/icon-construction.png)

- The old badge (512 units, corner radius 120), cut along the slash. The channel is 72 units wide, so the slash sits in it with 12 units of air each side. Each half slips 20 units along the cut.
- Halves are Bone on ink and Ink on paper. The slash stays Signal.
- **Small cut** (24 px and under): radius 112, slash 76 × 360, channel 112, slip 14, so it survives pixel snapping.

### Clear space and minimum size

![Clear space](guides/clear-space.png)

- Wordmark: its cap height on every side. Icon: a quarter of its size on every side.
- Minimum sizes: wordmark **72 px** wide, icon **16 px** (small cut from 16 to 24 px).

### Don't

- Change the slash's angle, proportion or color, or mirror it into a backslash.
- Put the wordmark and the icon next to each other as a lockup.
- Add glows, gradients, bevels, shadows or outlines.
- Retype the wordmark in another face, or close the cut in the icon.
- Write the name as "Broken App", "Broken/App", "Brokenapp" or "BROKENAPP" in running text.

---

## Color

Three colors. Ink and Bone carry almost everything; red is about two percent of any surface.

| Token | Hex | Role | Contrast |
|---|---|---|---|
| **Ink** | `#060606` | The ground on screen. The dots and the type on paper. | |
| **Bone** | `#EFEBE3` | Type and dots on screen, the ground on paper, every primary button. | 17.0:1 on Ink |
| **Signal** | `#FF2A2A` | The slash, and whatever is broken, on ink. | 5.4:1 on Ink |
| **Signal Deep** | `#CC1B1B` | The same two jobs on paper. | 4.7:1 on Bone |

- **Red has one job.** Buttons are Bone (Ink on paper), links are underlined, focus rings are the text color.
- **No separate greys.** Muted text, rules and raised surfaces are the text color at low strength over the ground.
- **Two grounds.** Ink is the default; paper (Bone ground, near-black `#0A0A0A` text) is for docs, reports and print.
- Greens and ambers exist in the tokens (`color.status`) for dense product screens only. The brand itself tells outcomes apart by mark, not hue.

---

## Typography: three voices

Each typeface has one job, so a reader can tell a claim from an explanation from a piece of evidence before reading a word.

| Voice | Face | Use for | Never |
|---|---|---|---|
| **The claim** | Cormorant, 500 and 600, italic 400 | Headlines and italic asides (the line under a headline, figure captions) | Under 18 px, or for interface text |
| **The explanation** | IBM Plex Sans, 400 and 500 | Body, navigation, buttons, forms, the wordmark | |
| **The evidence** | IBM Plex Mono, 400 | Only what the tool reads or prints: commands, paths, records, callouts | For labels a person wrote |

| Role | Font | Size / line height | Weight |
|---|---|---|---|
| Display | Cormorant | 96 / 0.95 (72 tablet, 54 mobile) | 500 |
| Page title | Cormorant | 68 / 1.0 (44 mobile) | 600 |
| Section | Cormorant | 46 / 1.04 (34 mobile) | 500 |
| Section, reference pages | Cormorant | 34 / 1.1 (28 mobile) | 600 |
| Aside, caption | Cormorant Italic | 18 to 35 / 1.25 | 400 |
| Card title | IBM Plex Sans | 17 / 1.4 | 500 |
| Body | IBM Plex Sans | 17 / 1.6 | 400 |
| Interface | IBM Plex Sans | 15 / 1.4 | 400, buttons 500 |
| Small | IBM Plex Sans | 13.5 / 1.5 | 400 |
| Record, callout | IBM Plex Mono | 13 / 1.5 | 400 |
| Command, code | IBM Plex Mono | 13.5 / 1.6 | 400 |

- Set the serif with **lining numerals** (`font-variant-numeric: lining-nums`). Its default old-style 1 reads as a capital I. Note that the CSS `font` shorthand resets this, so set it after.
- Headlines are sentence case and one color. No two-tone headlines, no all-caps labels.
- All three are free under the SIL Open Font License 1.1: [Cormorant](https://fonts.google.com/specimen/Cormorant), [IBM Plex Sans](https://fonts.google.com/specimen/IBM+Plex+Sans), [IBM Plex Mono](https://fonts.google.com/specimen/IBM+Plex+Mono).

---

## Pictures

Every illustration is rendered from code as light and shade, then reduced to **two tones of visible dots** by Atkinson error diffusion. Nothing is smoothed, nothing is greyscale.

- **The cut: one solid, one cut.** A plain shape for each thing the product maps (`app`, `control`, `route`, `roles`), cut clean through at the slash angle. The exposed cross-section is the red slash, and the only red in the picture.
- **The record: figures explain.** An exploded view (`figure roles`: one route as three login roles see it) with hairline leaders, mono labels and an italic numbered caption, added where the figure is used. A figure never gets a headline.
- **Dots are two pixels.** Files are drawn at 4 image pixels a dot. Show them at half the file's size with `image-rendering: pixelated`, so the dots are 2 CSS px and stay crisp on 1x and 2x screens.
- **Two grounds.** `-ink` files are Bone dots on a clear ground; `-paper` files are Ink dots. Use the one that matches.
- **Grain.** `ground-grain.png` is sparse pixel dust for grounds: tile it at 256 px, 9 to 12 percent opacity, inverted on paper.

Make more with the generator:

```bash
python3 brand/pictures.py cut app                      # the cut slab, for an ink ground
python3 brand/pictures.py cut roles --ground paper     # ink dots for a paper ground
python3 brand/pictures.py cut control --width 300 --height 240 --dot 3 -o control.png
python3 brand/pictures.py figure roles --ground paper  # also writes label anchors as JSON
python3 brand/pictures.py kit                          # everything the kit ships
```

---

## Outcome marks

The CLI gives every control a status. The brand tells them apart by shape, in the text color, so the one red mark on a page is the thing that needs fixing.

| Mark | Status | Meaning |
|---|---|---|
| filled circle | works (`ok`) | Exercised, and did something observable. |
| half-filled circle | no effect | A handler ran. Nothing observable changed. |
| dotted ring | dead | Nothing happened and nothing is bound to it. |
| **red slash** | broken | Errored: a handler exception, a 4xx or 5xx, a missing page. |
| short dash | skipped | Not exercised. Never counted as working. |

---

## Web system

How brokenapp.io turns the brand into pages.

- **Square corners, 1 px hairlines.** No gradients, no glow, no soft shadows, no rounded cards.
- **Primary action:** a solid Bone block (Ink on paper). **Secondary:** an underlined link. No arrows on buttons.
- **Figures, not boxes.** Content that is a picture or a demo is set off with crop marks and a mono label above it. Terminals are a hairline surface.
- **Records.** Rows of observed fact are mono, with hairline rules and a stronger rule on top.
- **Real output, not illustrations of output.** Show the map, the command and the result in the CLI's own words.
- **One moment of motion:** the crawl demo, played once on load with a replay control. Reduced-motion users get the finished state.

---

## Voice

BrokenApp is built like a compiler tool, and it should sound like one: **direct, technical and evidence-first.**

- **Claim only what was observed.** Use honest denominators ("41 of 44 controls exercised"), never "100% coverage" or "guaranteed".
- **Be mechanical about safety.** Say "write guard", "blocked at the CDP layer", "local-only by default".
- **Show the command.** Lead with something runnable: `brokenapp map --changed`.
- **Avoid:** "AI-powered", "magic", "revolutionary", "seamless", "effortless", exclamation marks, and emoji in product copy.

### Naming

| Write | When |
|---|---|
| **BrokenApp** | The product and company. One word, capital B and A. The slash is only ever in the logo. |
| `brokenapp` | The CLI binary and package. Always in code formatting. |
| `.brokenapp/` | The project folder (`.brokenapp/map/`, `.brokenapp/config.toml`). |
| brokenapp.io | The website. Lowercase. |

### Boilerplate

**One line:** A map of what your web app actually does.

**Short (about 30 words):** BrokenApp is a single local Rust binary that maps your web app across every login role behind a mechanical write guard. It produces greppable UI, RBAC, and customer-journey maps for humans and AI coding agents.

**Long (about 70 words):** BrokenApp drives your local web app in Chrome over the DevTools Protocol, with a write guard on by default. It exercises buttons, links, tabs, modals, and forms for every configured login role. It then writes a diffable behavioral map to `.brokenapp/map/`: UI inventories, RBAC truth tables, dead-control checks, and customer journeys. It's one MIT-licensed Rust binary, with no cloud account, no database daemon, and no Node runtime.

---

## Using the tokens

```css
/* Any web project */
@import "./tokens.css";            /* --ba-* primitives + mode-aware theme vars */
@import "./tailwind-theme.css";    /* optional, Tailwind v4 utilities: bg-surface, text-signal, ... */

body           { font-family: var(--ba-font-sans); }
h1, h2         { font-family: var(--ba-font-serif); font-variant-numeric: lining-nums; }
code, .record  { font-family: var(--ba-font-mono); }
.button        { background: var(--button); color: var(--button-fg); }
.broken        { color: var(--signal); }
```

Ink is the default theme. Set `data-theme="light"` on `<html>` for paper.

---

## Rebuilding

```bash
python3 brand/build.py           # regenerate every asset in brand/
python3 brand/build.py --sync    # ...and push them into the website and CLI repo
```

Requirements: Python 3 with `fontTools`, `numpy` and `Pillow`, and the `resvg` CLI (`cargo install resvg`).

`--sync` overwrites these files:

| Destination | From |
|---|---|
| `website/public/brand/**` | the whole kit, the zip, and this README |
| `website/src/app/favicon.ico`, `icon.svg`, `apple-icon.png` | `app-icons/` |
| `website/src/app/brand-tokens.css` | `tokens/tokens.css` |
| `website/src/components/brand-geometry.ts` | logo path data, generated from the tokens |
| `website/src/components/brand-pictures.json` | `pictures/pictures.json` |
| `website/public/og.png` | `social/og-default.png` |
| `website/public/logo.png` | `logo/icon/png/brokenapp-icon-tile-ink-1024.png` |
| `BrokenApp-Core/logo.png` | `logo/icon/png/brokenapp-icon-tile-ink-512.png` |

To change a color or the logo geometry, edit `tokens/tokens.json` and rebuild. Never hand-edit a generated file. The site's React logo components read `brand-geometry.ts`, so they follow automatically. The CLI's HTML report (`BrokenApp-Core/src/inventory/render.rs`) is self-contained and hard-codes the four colors, the three font stacks and the slash path, so update it in the same change.
