From 04c587a5a31f328de37114536a59b73719a2d764 Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Mon, 28 Sep 2026 22:25:34 +0200 Subject: [PATCH] docs(11.1): UI design contract --- .../11.1-UI-SPEC.md | 425 ++++++++++++++++++ 1 file changed, 425 insertions(+) create mode 100644 .planning/phases/11.1-summercms-documentation-for-humans-and-ai-agents/11.1-UI-SPEC.md diff --git a/.planning/phases/11.1-summercms-documentation-for-humans-and-ai-agents/11.1-UI-SPEC.md b/.planning/phases/11.1-summercms-documentation-for-humans-and-ai-agents/11.1-UI-SPEC.md new file mode 100644 index 0000000..f407c2a --- /dev/null +++ b/.planning/phases/11.1-summercms-documentation-for-humans-and-ai-agents/11.1-UI-SPEC.md @@ -0,0 +1,425 @@ +--- +phase: "11.1" +slug: "summercms-documentation-for-humans-and-ai-agents" +status: approved +shadcn_initialized: false +preset: none +created: "2026-09-28" +reviewed_at: "2026-09-28" +--- + +# Phase 11.1 — UI Design Contract + +> Visual and interaction contract for frontend phases. Generated by gsd-ui-researcher, verified by gsd-ui-checker. + +**Scope of this contract.** Phase 11.1 adds one new visual surface: the **static documentation site** that `summer docs:build` renders from `docs/**/*.md` and the ingested `modules/*/README.md` files, plus the terminal output of `summer docs:build`, `docs:serve` and `docs:sync`. It does not touch the admin SPA. + +**What the site is built from.** `internal/docsite` uses stdlib `html/template` with goldmark. The theme lives in `internal/docsite/theme/` and is embedded with `//go:embed`. It is hand-written CSS plus about 3 small vanilla JS files. There is no Tailwind, no npm and no Node at build time (D-02, D-03). The AI outputs (`llms.txt`, `llms-full.txt`, per-page `.md`) carry no visual design, and their format is fixed in RESEARCH §Q3. + +**Design source of truth.** The brand and tokens come from the admin SPA: `admin/src/styles/main.css` (`:root` and `.dark` blocks, lines 83-125) and `.planning/phases/10-admin-vue-spa/design/README.md` (Direction C v2: dark navy with sunny yellow). CONTEXT.md lets us reuse the admin tokens ("reuse the admin SPA's design tokens if convenient"). This contract copies their **values** into plain CSS custom properties with the same `--c-*` names. It does not add a colour outside that palette, except the five syntax-highlight values in the Color section. + +**Layout reference.** wintercms.com/docs anatomy (RESEARCH §Q1). It has a header with search, a left sidebar grouped by section, an "On this page" TOC, prev/next links, an edit link and a light/dark/system toggle. The version selector and the Docs/API/Markup/UI tabs are left out (RESEARCH §Q1 table). + +--- + +## Design System + +| Property | Value | +|----------|-------| +| Tool | none. It is a stdlib `html/template` static site. shadcn is not applicable because there is no React and no npm (D-03). | +| Preset | not applicable | +| Component library | none. The theme parts are Go templates listed under "Theme Parts" below. | +| Icon library | Lucide (ISC). 15 icons are inlined as SVG in a `theme/templates/icons.html` partial, with path data copied from `@lucide/vue@1.17.0` (`admin/node_modules/@lucide/vue/dist/esm/icons/.mjs`, all 15 verified present on 2026-09-28): `sun`, `moon`, `monitor`, `search`, `menu`, `x`, `chevron-left`, `chevron-right`, `pencil`, `file-text`, `copy`, `check`, `info`, `lightbulb`, `triangle-alert`. Each is `stroke="currentColor"`, `stroke-width="2"`, `fill="none"`, `aria-hidden="true"`. They are 16px inside 14px text rows and 20px in header buttons. Ship `theme/assets/LICENSE-lucide.txt` (ISC). | +| Font | DM Sans (UI and prose) and DM Mono (code), self-hosted as woff2. These are the same families as the admin (main.css:25-26). Vendor exactly 8 files from `@fontsource/dm-sans@5.3.0` and `@fontsource/dm-mono@5.3.0` (`license: OFL-1.1`, read from their package.json on 2026-09-28, which resolves RESEARCH assumption A4). The files are `dm-sans-latin-{400,600}-normal.woff2`, `dm-sans-latin-ext-{400,600}-normal.woff2`, `dm-sans-latin-400-italic.woff2`, `dm-sans-latin-ext-400-italic.woff2`, `dm-mono-latin-400-normal.woff2` and `dm-mono-latin-ext-400-normal.woff2`. They go into `internal/docsite/theme/assets/fonts/` with both `LICENSE` files. Copy the `@font-face` `unicode-range` values from the matching fontsource CSS and use `font-display: swap`. Stacks: `"DM Sans", ui-sans-serif, system-ui, sans-serif` and `"DM Mono", ui-monospace, monospace`. **Do not** reference the hashed files in `modules/boardwalk/dist/assets/`. | +| New dependencies | **None.** `go.mod` is unchanged (RESEARCH §Standard Stack). Fonts and icon paths are copied once as static files. Nothing reads `node_modules` at build time. | +| CSP posture | No inline `