# Automation & Observatory — workspace documentation standard

This is the field guide for the presentation workspace: how the hub and the five
section pages are built, so anyone can add or edit one and have it match.

## What the workspace is

A small set of self-contained HTML pages under `presentation/`. The **hub**
(`index.html`) is a bookmark board that links every tool, page, service and
document. Each **section** is one large page with its own agricultural codename
and accent colour. Everything shares one stylesheet and one script — no CDNs, no
build step, opens offline from `file://` or any static server.

```
presentation/
  index.html          Hub — "Automation & Observatory" (brand green, nuanced)
  onboarding.html     🌱 Seed        — leaf green
  monitoring.html     🌾 Silo        — grain amber   (the biggest section)
  automation.html     🚜 Tractor     — clay / terracotta
  scripts.html        🪓 Sickle      — teal
  workflows.html      💧 Irrigation  — water blue
  workspace.css       Shared design system (the ONLY stylesheet)
  workspace.js        Shared theme toggle
  STANDARD.md         This file
  pack.html · executive-brief-observability.html · executive-handout-print.html · auto-docs-brief.html
  build-pack.sh       Export everything to dist/*.zip
```

## The codename system

Names come from agriculture because the company's business is agriculture — the
onboarding *seeds* a new joiner, monitoring is the *silo* that stores everything
we watch, automation is the *tractor* doing the heavy work, scripts are *sickles*
(small sharp tools), and pipelines are *irrigation* channels that carry the flow.
The codename encodes the section's job; it isn't decoration.

| Section | Codename | Emoji | Accent (light / dark) | Wash (light / dark) |
|---|---|---|---|---|
| Hub | — | 🌾 | brand `#1F9E6A` / `#45C88C` | `#E2F3EA` / `#0F2A1E` |
| Onboarding | Seed | 🌱 | `#4E9A2F` / `#86C24A` | `#EAF3DE` / `#16240E` |
| Monitoring | Silo | 🌾 | `#C4881A` / `#E0A83C` | `#F7ECD3` / `#2A2110` |
| Automation | Tractor | 🚜 | `#C05A38` / `#E07E5C` | `#F6E4DD` / `#2A160F` |
| Scripts | Sickle | 🪓 | `#1C8C8C` / `#3FBEBE` | `#DAEFEF` / `#0C2626` |
| Workflows & Pipelines | Irrigation | 💧 | `#2F6FCF` / `#6E9AF0` | `#E4ECFA` / `#131C2E` |

The **workspace green** (`--brand`) is constant on every page — nav, footer,
focus rings, the pulsing beacon. Only `--accent` / `--accent-wash` change per
section. That keeps one identity while each section reads as its own place.

## Page anatomy (every section page)

1. `<head>` links `workspace.css` + `workspace.js` and contains **only** the
   accent override (four lines: base, `@media dark`, `[data-theme=light]`,
   `[data-theme=dark]`). No other CSS on the page.
2. `<nav class="bar">` — identical on every page; the current page's link carries
   `aria-current="page"`.
3. `<header class="hero">` — eyebrow (`Section NN · Name`), `.codechip` with emoji
   codename, an `h1` with one `<span class="hl">` phrase, a `.lede`, a
   `.hero-rule`, and a 4-cell `.kpis` strip.
4. `<main class="wrap">` — a sequence of `.lab`-labelled sections built from the
   shared components below.
5. `<footer class="site">` — identical on every page; "Back to workspace" + the
   internal-use notice + the tech line.

## The component vocabulary (defined in `workspace.css`)

Use these; do not invent classes.

- **Bookmark tile** — `a.tile` with `.ic` (emoji) · `.tt` (title) · `.dd`
  (one-liner) · `.meta` (mono path) or `.go` (call to action). Add
  `.portal` + inline `style="--sec:#hex"` for a big section card on the hub.
- **Card** — `.card` (`h3` + `p`). **Grids** — `.grid` + `.g2/.g3/.g4`
  (auto-collapse on mobile).
- **Label** — `.lab` (mono uppercase, accent). **Board group** — `.board-group`
  (hub section divider).
- **Pills** — `.pill` + `.accent/.good/.warn/.bad/.mut`, optional `.dot`.
- **Lists** — `ul.clean` (arrow bullets). **Table** — `table.data` inside
  `.wrap-x`. **KPIs** — `.kpis > div` with `.n` + `.l`.
- **Code** — `code`, `.mono-path` (inline chip), `.codeblock` with `.c` (command)
  / `.d` (comment) / `.k` (keyword) spans; wrap multi-line in `<pre class="codeblock">`.
- **Spacing** — `.mt8/.mt16/.mt24/.mt40`. **Footnote** — `.note`.

## Linking rules ("wire to everything")

- **Between workspace pages** — relative, flat: `href="monitoring.html"`.
- **Repo source files** — relative up one level: `href="../automation/service/api.py"`.
- **Live wiki (MkDocs)** — absolute with a new tab:
  `href="http://192.168.0.107:8086/…/" target="_blank" rel="noopener"`.
- **Live API console** — `http://192.168.0.107:8099`.

## Themes & accessibility

Light + dark are both first-class, driven entirely by tokens. `prefers-color-scheme`
sets the default; the ◐ theme button stamps `data-theme` on `<html>` and wins in
both directions. Keyboard focus is always visible (accent outline);
`prefers-reduced-motion` disables the beacon pulse and smooth scroll. Identity is
never colour-alone — pills and tiles always carry a label.

## Adding a new section

1. Pick an agricultural codename that describes the section's job, plus an accent
   that passes contrast on both themes (aim for a mid-tone light value and a
   brighter dark value; check the wash reads as a tint, not a block).
2. Copy any section page, swap the four accent lines, the `<title>`, the hero
   codename/eyebrow, and set `aria-current` on the new nav link.
3. Add the nav link to **all** pages (nav is duplicated, not shared markup).
4. Add a `.portal` tile on the hub with `style="--sec:#hex"`.
5. Add the file to `build-pack.sh` so it ships in the export bundle.

## Export

```bash
./presentation/build-pack.sh      # → dist/exec-pack/ + dist/*.zip
```

Self-contained pages, so the zip opens offline anywhere. The live services
(wiki, API) are separate and started with `mkdocs serve` / `make serve`.
