# Provenance — Triage Design System v0.1.0

Lineage: the design pack exported from `vjsyong/mail-triage @ fd29e794`
(2026-10-02), plus the three restorations taken from the app's interaction
standard (`7a7f55c`) and its current flow-canvas rules. Triage renames the
app-coupled vocabulary and moves the palette/scale source of truth into
`tokens/tokens.json`; nothing here modifies the pack.

| Triage file | Source | Modifications |
|---|---|---|
| `tokens/tokens.json` | `css/base.css :root` + audits | DTCG format; verbatim palette; semantic alias tier, normalised spacing, motion and misc groups marked `derived`/`added` |
| `tokens/tokens.css` | generated | `:root` custom properties + `--ink` (P1); no other content |
| `core/base.css` | `css/base.css` | `:root` block stripped (tokens own it); `--ink` fixed; `\u25b8`→`\25B8` escapes fixed; `@font-face` URLs made relative to `fonts/`; P1 `.px-sw` appended; every class/global renamed per `rename-map.json` |
| `core/patterns.css` | `css/patterns.css` | renamed; P3 current condition-row rules appended |
| `core/shell.js` | `js/shell.js` | duplicated `.chat-del` delegate removed (superseded by P2); P2 unified armed-delete delegate appended; renamed |
| `core/app.js` | `js/app.js` | `VTPOS` route map replaced by `window.VTPOS || []`; renamed (`assistantChat`→`chatEngine`, dock ids/globals) |
| `core/keyboard-fit.js` | `js/keyboard-fit.js` | renamed only |
| `core/boot.js` | head snippet in `skeletons/shell.html` | renamed localStorage keys (`dock_open`, `dock_w`) |
| `core/vendor/turbo.js` | `js/vendor/turbo.js` | copied verbatim (Turbo Drive v8.0.12, MIT, 37signals LLC) |
| `fonts/*` | `fonts/*` | copied verbatim (Geist + Geist Mono, OFL 1.1) |
| `examples/*.html` | `skeletons/*.html` | renamed; stylesheet/script links point at `../tokens/` + `../core/`; quirks patch no longer needed |
| `patches/px-sw.css` | `app.py:915,1021-1030` | verbatim (P1) |
| `patches/arm-del.js` | `app.py:1182-1220` | verbatim (P2) |
| `patches/cond-row.css` | `app.py:5229-5241,5288` | verbatim (P3) |
| `rename-map.json` / `RENAME-MAP.md` | Triage | the mapping applied to everything above |

## Version history

- **0.1.0** — initial generic extraction: full rename sweep, tokens pipeline,
  P1–P3 merged, examples rewired, `--check` guard.

## Re-sync with the source app

`src/core/` is canonical. The generated `core/base.css` and `core/patterns.css`
are composed from `src/core/{base,additions,components,patterns}.css` by
`tools/build_core.py` (`python3 build.py core`); edit those sources, never the
generated files. The historical pack pipeline
(`tools/assemble_from_pack.py` → `tools/tokenize_core.py`) is provenance
maintenance only and is refused unless called with `--force`, so no normal build
path overwrites `core/` or `tokens/` from the pack.

`tools/assemble_from_pack.py` records SHA-256 prefixes of every input in
`.provenance.json`. When the mail-triage pack is re-exported, run it with
`--force`, rebuild and diff: the input hashes change, `--check` re-validates the
rename sweep, and the git-less pack dir can be compared file by file against the
recorded manifest. Re-run `python3 build.py core` afterwards, since the pack
pipeline predates the `src/core/` split.
