@squadbase/vantage 0.6.0-dev.3cc6138 → 0.6.1-dev.2d25e94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/add-DY4AXANK.js +6 -0
  2. package/dist/add-DY4AXANK.js.map +1 -0
  3. package/dist/{build-XXKKX6KB.js → build-JB4VOMUI.js} +9 -9
  4. package/dist/{build-XXKKX6KB.js.map → build-JB4VOMUI.js.map} +1 -1
  5. package/dist/{check-X2TDOILH.js → check-ZJYK6RLG.js} +7 -7
  6. package/dist/{check-X2TDOILH.js.map → check-ZJYK6RLG.js.map} +1 -1
  7. package/dist/{chunk-SVNOWE5U.js → chunk-6S4BAIGV.js} +2 -2
  8. package/dist/{chunk-SVNOWE5U.js.map → chunk-6S4BAIGV.js.map} +1 -1
  9. package/dist/{chunk-VVOXG6ZU.js → chunk-BCE22JSM.js} +186 -12
  10. package/dist/chunk-BCE22JSM.js.map +1 -0
  11. package/dist/{chunk-TDUIW7LD.js → chunk-C2CX6GLX.js} +3 -3
  12. package/dist/chunk-C2CX6GLX.js.map +1 -0
  13. package/dist/{chunk-LCN36MYX.js → chunk-EP6JHXSR.js} +4 -4
  14. package/dist/{chunk-LCN36MYX.js.map → chunk-EP6JHXSR.js.map} +1 -1
  15. package/dist/{chunk-B45WAO5Q.js → chunk-JGRMRXXZ.js} +42 -4
  16. package/dist/chunk-JGRMRXXZ.js.map +1 -0
  17. package/dist/{chunk-CIJWVFJD.js → chunk-QI3XQKHS.js} +40 -4
  18. package/dist/chunk-QI3XQKHS.js.map +1 -0
  19. package/dist/{chunk-46PPUW6Y.js → chunk-T3FLAGI6.js} +5 -5
  20. package/dist/{chunk-46PPUW6Y.js.map → chunk-T3FLAGI6.js.map} +1 -1
  21. package/dist/{chunk-V2FV5OJ6.js → chunk-U2M6HGKQ.js} +4 -4
  22. package/dist/{chunk-V2FV5OJ6.js.map → chunk-U2M6HGKQ.js.map} +1 -1
  23. package/dist/{chunk-FVWU275X.js → chunk-ZO62C6T4.js} +3 -3
  24. package/dist/{chunk-FVWU275X.js.map → chunk-ZO62C6T4.js.map} +1 -1
  25. package/dist/{chunk-YE4CPCXX.js → chunk-ZVANIULZ.js} +3 -3
  26. package/dist/{chunk-YE4CPCXX.js.map → chunk-ZVANIULZ.js.map} +1 -1
  27. package/dist/cli.js +15 -12
  28. package/dist/cli.js.map +1 -1
  29. package/dist/client/index.d.ts +2 -2
  30. package/dist/client/index.js +1 -1
  31. package/dist/{dev-4MQQDHA4.js → dev-FCEC3UKQ.js} +23 -12
  32. package/dist/dev-FCEC3UKQ.js.map +1 -0
  33. package/dist/doc/index.d.ts +39 -0
  34. package/dist/doc/index.js +38 -0
  35. package/dist/doc/index.js.map +1 -0
  36. package/dist/{docs-OTFWTCPW.js → docs-EJJ3BECT.js} +4 -4
  37. package/dist/{docs-OTFWTCPW.js.map → docs-EJJ3BECT.js.map} +1 -1
  38. package/dist/{doctor-QXA6DURZ.js → doctor-WHZXPERA.js} +8 -8
  39. package/dist/doctor-WHZXPERA.js.map +1 -0
  40. package/dist/{manifest-ttGMFi-Z.d.ts → manifest-DiOjyinq.d.ts} +1 -1
  41. package/dist/{preview-HVOM27FS.js → preview-OGMCNQUO.js} +13 -5
  42. package/dist/preview-OGMCNQUO.js.map +1 -0
  43. package/dist/router/index.d.ts +2 -2
  44. package/dist/router/index.js +2 -2
  45. package/dist/{routes-2QRAKMGK.js → routes-GTFO5PUF.js} +6 -6
  46. package/dist/{routes-2QRAKMGK.js.map → routes-GTFO5PUF.js.map} +1 -1
  47. package/dist/{search-7A43AZ7M.js → search-6Y422SV6.js} +4 -4
  48. package/dist/{search-7A43AZ7M.js.map → search-6Y422SV6.js.map} +1 -1
  49. package/dist/server/node.d.ts +1 -1
  50. package/dist/slide/index.js +2 -2
  51. package/dist/table/index.js +1 -1
  52. package/dist/{types-DQjLpLCs.d.ts → types-CXFlMl8S.d.ts} +1 -1
  53. package/dist/{upgrade-2QCP7UQQ.js → upgrade-AL4KZZR4.js} +7 -7
  54. package/dist/{upgrade-2QCP7UQQ.js.map → upgrade-AL4KZZR4.js.map} +1 -1
  55. package/dist/vite/index.d.ts +1 -1
  56. package/dist/vite/index.js +4 -4
  57. package/docs/en/agent-skills.md +3 -0
  58. package/docs/en/changelog.md +30 -0
  59. package/docs/en/cli-reference.md +35 -1
  60. package/docs/en/routing.md +31 -4
  61. package/docs/en/ui-and-theming.md +26 -0
  62. package/docs/index.json +2 -2
  63. package/docs/ja/agent-skills.md +3 -0
  64. package/docs/ja/changelog.md +30 -0
  65. package/docs/ja/cli-reference.md +34 -1
  66. package/docs/ja/routing.md +30 -3
  67. package/docs/ja/ui-and-theming.md +26 -0
  68. package/package.json +5 -1
  69. package/skills/vantage-design/SKILL.md +137 -0
  70. package/skills/vantage-design/references/extract.md +110 -0
  71. package/skills/vantage-design/references/format.md +172 -0
  72. package/skills/vantage-design/references/presets.md +110 -0
  73. package/skills/vantage-design/scripts/contrast.mjs +166 -0
  74. package/templates/AGENTS.md +17 -0
  75. package/templates/agents/doc.md +73 -0
  76. package/templates/agents/page.md +2 -0
  77. package/templates/agents/slide.md +7 -0
  78. package/theme.css +141 -0
  79. package/dist/add-S62E5MSP.js +0 -6
  80. package/dist/add-S62E5MSP.js.map +0 -1
  81. package/dist/chunk-B45WAO5Q.js.map +0 -1
  82. package/dist/chunk-CIJWVFJD.js.map +0 -1
  83. package/dist/chunk-TDUIW7LD.js.map +0 -1
  84. package/dist/chunk-VVOXG6ZU.js.map +0 -1
  85. package/dist/dev-4MQQDHA4.js.map +0 -1
  86. package/dist/doctor-QXA6DURZ.js.map +0 -1
  87. package/dist/preview-HVOM27FS.js.map +0 -1
@@ -15,6 +15,7 @@ All of these target an agent that is **building a Vantage app**.
15
15
  | `vantage-app` | Creating an app, and growing a single-file `index.tsx` SPA into a fullstack app with `server/api`, nested layouts, dynamic routes, and 404/error pages |
16
16
  | `vantage-add-feature` | Adding a page / API / UI / block (`vantage add` through to `check` / `routes`) |
17
17
  | `vantage-slide` | Writing a slide deck in `.slide.tsx` (the 1920×1080 canvas's vertical budget, the type scale, stepped reveals, transitions and morph, what a pptx export needs) |
18
+ | `vantage-design` | Creating / updating `DESIGN.md` (the design intent) and `styles.css` (the values) together — colors, chart palette, fonts, matching a brand from a URL, logo, document, or an external DESIGN.md, and checking contrast |
18
19
  | `vantage-pitfalls` | A pitfalls reference (Base UI ≠ Radix, `SelectValue` behavior, never importing `server/` from the client, and more) |
19
20
  | `project-storage` | Working with Squadbase Project Storage (uploaded files) from the browser — listing, embedding images / video / PDFs, uploading. For apps running on Squadbase |
20
21
 
@@ -42,6 +43,7 @@ Bundled skills:
42
43
  project-storage .claude/skills/project-storage/
43
44
  vantage-add-feature .claude/skills/vantage-add-feature/
44
45
  vantage-app .claude/skills/vantage-app/
46
+ vantage-design not placed
45
47
  vantage-pitfalls not placed
46
48
  vantage-slide not placed
47
49
  ```
@@ -60,6 +62,7 @@ your-app/
60
62
  └── skills/
61
63
  ├── vantage-app/SKILL.md
62
64
  ├── vantage-add-feature/SKILL.md
65
+ ├── vantage-design/SKILL.md (its references/ and scripts/ ride along)
63
66
  ├── vantage-pitfalls/SKILL.md
64
67
  ├── vantage-slide/SKILL.md (its references/ ride along)
65
68
  └── project-storage/SKILL.md
@@ -9,6 +9,30 @@ What changed in each Vantage release. Newest is on top.
9
9
  > minor release may include backwards-incompatible changes. A patch is limited to
10
10
  > backwards-compatible additions and bug fixes.
11
11
 
12
+ ## v0.6.2
13
+
14
+ The dev server can now run behind a reverse proxy (2026-09-23).
15
+
16
+ ### Added
17
+
18
+ - **`--host [addr]` and `--allowed-hosts <list|true>`** on `vantage dev` / SPA `vantage preview`.
19
+ Vite rejects with 403 any request whose `Host` header is not `localhost`, so anything with
20
+ **another hostname in front of the server** — a sandbox preview proxy, a tunnel — could not reach
21
+ it before. `--allowed-hosts` can also come from the **`VANTAGE_ALLOWED_HOSTS`** environment
22
+ variable (the flag wins). With neither, nothing changes. See the
23
+ [CLI reference](cli-reference).
24
+
25
+ ## v0.6.1
26
+
27
+ Pages can now be written as documents (2026-09-25).
28
+
29
+ ### Added
30
+
31
+ - **`<name>.doc.tsx` becomes a document page.** Wrap it in `Document` from
32
+ `@squadbase/vantage/doc` and the headings, paragraphs, lists, tables, quotes and code inside are
33
+ styled with no classes. Colour, type and column width come from the `--doc-*` tokens. See
34
+ [Routing](routing) and [UI & theming](ui-and-theming).
35
+
12
36
  ## v0.6.0
13
37
 
14
38
  What you can drop in `src/` is no longer just `.tsx`. A `.csv` or `.xlsx` becomes a page you can
@@ -78,6 +102,12 @@ your dashboard pages.
78
102
  set (`AGENTS.md` + `agents/`) into the app root, and `vantage upgrade` re-syncs it (files not
79
103
  in the bundle are never deleted).
80
104
 
105
+ - **`DESIGN.md` and a `vantage-design` skill.** Describe the design intent (color roles, charts,
106
+ type, layout) by token name in a `DESIGN.md` at the project root, and agents read it before
107
+ writing any UI (`AGENTS.md` / `agents/page.md` / `agents/slide.md` now point to it).
108
+ `DESIGN.md` belongs to you — `vantage upgrade` never touches it. Requests like "match our brand"
109
+ go through the `vantage-design` skill, which updates `DESIGN.md` and `styles.css` together.
110
+
81
111
  ### Changed
82
112
 
83
113
  - The `RouteInfo` returned by `useRoutes()` gained **`kind`** (`"module"` | `"file"`) and
@@ -357,6 +357,36 @@ vantage dev --strict-port # will not start unless 5173 is free
357
357
  > default silently. A fullstack `preview` binds its Node server to exactly one port, so it is **always**
358
358
  > strict and `--no-strict-port` has no effect there.
359
359
 
360
+ ## `--host` / `--allowed-hosts` — running behind a reverse proxy
361
+
362
+ By default `vantage dev` and a SPA `vantage preview` bind to `localhost` only and **reject with 403**
363
+ any request whose `Host` header is not `localhost` or the bound address (Vite's DNS-rebinding
364
+ protection). When something with **another hostname** sits in front of the server — a sandbox
365
+ preview proxy, a tunnel, a container network — these two flags let it through.
366
+
367
+ ```bash
368
+ vantage dev --host # listen on every interface
369
+ vantage dev --host 0.0.0.0 # or on one address (--host=:: works too)
370
+ vantage dev --allowed-hosts preview.example.com # allow the hostname the proxy presents (comma-separated for several)
371
+ vantage dev --allowed-hosts true # disable the Host check altogether
372
+ ```
373
+
374
+ | Flag | Meaning |
375
+ |---|---|
376
+ | `--host [addr]` | Without a value, bind to **every interface**; with one, bind to that address (Vite's `server.host`) |
377
+ | `--allowed-hosts <list\|true>` | The `Host` headers to accept, comma-separated. `true` disables the check (Vite's `server.allowedHosts`) |
378
+
379
+ `--allowed-hosts` can also come from the environment variable **`VANTAGE_ALLOWED_HOSTS`** (same
380
+ format), which suits a supervisor that starts the server and knows the hostname. When both are
381
+ present, **the flag wins**. With neither, Vite's default applies and only `localhost` is accepted,
382
+ exactly as before.
383
+
384
+ > [!NOTE]
385
+ > `--host` takes the next token as its value, so `vantage --host dev` would read `dev` as the
386
+ > address — write `--host=<addr>` or put `--host` last when a command or path follows it. A fullstack
387
+ > `preview` runs the Node server, which listens on every interface and does no `Host` check, so
388
+ > neither flag has an effect there (the command says so).
389
+
360
390
  ## Browser output in dev — forwarding and the overlay
361
391
 
362
392
  `vantage dev` **forwards what happens in the browser to the dev terminal**. By default that means
@@ -418,7 +448,7 @@ phases are `scan` (route discovery), `diagnostics` (the static checks),
418
448
 
419
449
  ## Static diagnostics (`check`)
420
450
 
421
- `vantage check` detects these eleven diagnostics (seven errors, four warnings).
451
+ `vantage check` detects these thirteen diagnostics (seven errors, six warnings).
422
452
 
423
453
  | Code | Severity | Meaning |
424
454
  |---|---|---|
@@ -433,9 +463,13 @@ phases are `scan` (route discovery), `diagnostics` (the static checks),
433
463
  | `PUBLIC_ENV_MISUSE` | warning | Client reads a non-`PUBLIC_` env variable |
434
464
  | `UNSUPPORTED_PAGE_FILE` | warning | A file with an extension Vantage has no viewer for (`.xls`, `.ods`, …); it does not become a route |
435
465
  | `FILE_PAGE_TOO_LARGE` | warning | A data-file page is over 25 MB, so it will render an error instead of a table |
466
+ | `HARDCODED_COLOR` | warning | A `.ts`/`.tsx` file hard-codes a color (`#hex`, `rgb()`/`hsl()`/`oklch()`, …, `bg-[#…]`, or a Tailwind palette class like `bg-blue-500`); reported per file as `path:line` with a suggested token |
467
+ | `DESIGN_MD_TOO_LONG` | warning | The root `DESIGN.md` is over 150 lines; keep values in `styles.css` and reference them by token name |
436
468
 
437
469
  None of them import or run your code — the checks are purely static.
438
470
 
471
+ `HARDCODED_COLOR` never reads `.css` (`styles.css` is where values belong). When a color carries data meaning (map fills, say), put `// vantage-ignore-color` (`{/* vantage-ignore-color */}` inside JSX) on that line or the line above it; `vantage-ignore-color-file` within the first five lines exempts the whole file.
472
+
439
473
  ## Build output
440
474
 
441
475
  Inside `dist/`:
@@ -1,6 +1,6 @@
1
1
  # File-based routing
2
2
 
3
- > Dropping a file creates a route. Conventions for pages, layouts, dynamic params and 404/error, plus the pages that are not .tsx (csv / xlsx / slides).
3
+ > Dropping a file creates a route. Conventions for pages, layouts, dynamic params and 404/error, plus the pages that are not .tsx (csv / xlsx / slides / documents).
4
4
 
5
5
  In Vantage, **where you place a file is its URL**. You never configure a router.
6
6
 
@@ -37,6 +37,7 @@ The "File" column below is relative to the page-scan root above.
37
37
  | `_404.tsx` | Not-found UI (**root only**) |
38
38
  | `_error.tsx` | Error UI (**root only**) |
39
39
  | `monthly-report.slide.tsx` | `/monthly-report` (a slide deck) |
40
+ | `june-summary.doc.tsx` | `/june-summary` (a document) |
40
41
  | `sales-export.csv` | `/sales-export` (drawn as a table) |
41
42
  | `data/june.xlsx` | `/data/june` (same) |
42
43
 
@@ -47,8 +48,8 @@ The "File" column below is relative to the page-scan root above.
47
48
  ## Pages that are not `.tsx`
48
49
 
49
50
  Routes do not come only from `.tsx` / `.jsx`. **`.csv` and `.xlsx`** become pages you can read as a
50
- table, and **`<name>.slide.tsx`** becomes a slide deck. Both build their URL exactly the way a
51
- `.tsx` page does, and both appear in `vantage routes` and in a `useRoutes()` nav alongside it.
51
+ table, **`<name>.slide.tsx`** becomes a slide deck, and **`<name>.doc.tsx`** becomes a document. All
52
+ of them build their URL exactly the way a `.tsx` page does, and all appear in `vantage routes` and in a `useRoutes()` nav alongside it.
52
53
 
53
54
  ### Data files (`.csv` / `.xlsx`)
54
55
 
@@ -109,6 +110,32 @@ deck as a pptx. See
109
110
  > `deck.slide.ts` raise `INVALID_PAGE_VARIANT`. And since `june.slide.tsx` and `june.tsx` — like
110
111
  > `sales.csv` and `sales.tsx` — resolve to the same URL, having both is a `ROUTE_CONFLICT`.
111
112
 
113
+ ### Documents (`.doc.tsx`)
114
+
115
+ `.doc` is a **page-kind suffix** too (`src/june-summary.doc.tsx` → `/june-summary`). A document is
116
+ prose read top to bottom; the file is an ordinary React component returning a `<Document>`.
117
+
118
+ ```tsx
119
+ import { definePage } from "@squadbase/vantage";
120
+ import { Document } from "@squadbase/vantage/doc";
121
+
122
+ export const page = definePage({ title: "June summary" });
123
+
124
+ export default function JuneSummary() {
125
+ return (
126
+ <Document>
127
+ <h1>June summary</h1>
128
+ <p>June revenue came in 5% above target.</p>
129
+ <table>…</table>
130
+ </Document>
131
+ );
132
+ }
133
+ ```
134
+
135
+ Headings, paragraphs, lists, tables, quotes and code inside `<Document>` are styled with no classes
136
+ written. See [UI & theming](ui-and-theming). As with `.slide`, only a page module that becomes a
137
+ route may carry `.doc`.
138
+
112
139
  ## Directories that are never routed
113
140
 
114
141
  These directories are never scanned, at any depth. Put whatever code you like here.
@@ -219,7 +246,7 @@ Each entry is a `RouteInfo`:
219
246
  | `label` | `string` | Display name: `navLabel`, else `title`, else `path` |
220
247
  | `title` / `description` / `navLabel` | `string \| undefined` | Values from [`definePage`](pages-and-metadata) |
221
248
  | `kind` | `"module" \| "file"` | What the page is drawn from; `"file"` is a `.csv` / `.xlsx` |
222
- | `variant` | `"slide" \| undefined` | The page-kind suffix the file carried |
249
+ | `variant` | `"slide" \| "doc" \| undefined` | The page-kind suffix the file carried |
223
250
 
224
251
  `useCurrentRoute()` returns the route being rendered, or `undefined` on the 404 route. Beyond the
225
252
  "you are here" check above, it fits breadcrumbs and page headings.
@@ -116,6 +116,32 @@ behind transitions, the rules morph rests on, and what breaks a pptx export —
116
116
  > Tailwind for dashboards, so projecting a scaled 1920×1080 canvas leaves a `text-sm` button at an
117
117
  > effective 8px — unreadable.
118
118
 
119
+ ## Documents (`/doc`)
120
+
121
+ A `<name>.doc.tsx` [becomes a document page](routing). Wrap it in `Document` and the plain HTML
122
+ elements written inside (`h1`–`h4`, `p`, `ul`/`ol`, `table`, `blockquote`, `pre`/`code`, `hr`, `a`,
123
+ `figure`/`figcaption`, `img`) get their heading sizes, spacing and rules. A
124
+ [`EChart`](parts/echart) can sit in the text as it is.
125
+
126
+ ```tsx
127
+ import { Document } from "@squadbase/vantage/doc";
128
+ ```
129
+
130
+ Colour, type and the width of the text column are `--doc-*` tokens. By default they alias the app's
131
+ tokens, so **they follow dark mode on their own**.
132
+
133
+ | Token | Default | What it styles |
134
+ |---|---|---|
135
+ | `--doc-fg` / `--doc-muted` | `--foreground` / `--muted-foreground` | Body text / quotes and captions |
136
+ | `--doc-accent` | `--primary` | Links |
137
+ | `--doc-border` / `--doc-subtle` | `--border` / `--muted` | Rules / background of code and table headers |
138
+ | `--doc-font-body` / `--doc-font-heading` / `--doc-font-mono` | The app's type | Body / headings / code |
139
+ | `--doc-size-body` / `--doc-line-height` / `--doc-max-width` | `1rem` / `1.8` / `48rem` | Type size / line height / column width |
140
+
141
+ Override them app-wide on `:root` in `styles.css`, or for one document with
142
+ `<Document theme={{ accent: "#2563eb" }}>`. A Tailwind utility on an element through `className`
143
+ wins over the default styling.
144
+
119
145
  ## Tailwind just works
120
146
 
121
147
  Write Tailwind utilities in `className` and they apply. You never write `tailwind.config` or
package/docs/index.json CHANGED
@@ -28,7 +28,7 @@
28
28
  "section": "guide",
29
29
  "sectionTitle": "ガイド",
30
30
  "title": "ファイルベースルーティング",
31
- "description": "ファイルを置くだけでルートが生まれる。ページ・レイアウト・動的パラメータ・404/error の規約と、tsx 以外のページ(csv / xlsx / スライド)。",
31
+ "description": "ファイルを置くだけでルートが生まれる。ページ・レイアウト・動的パラメータ・404/error の規約と、tsx 以外のページ(csv / xlsx / スライド / ドキュメント)。",
32
32
  "file": "ja/routing.md",
33
33
  "order": 1
34
34
  },
@@ -720,7 +720,7 @@
720
720
  "section": "guide",
721
721
  "sectionTitle": "Guide",
722
722
  "title": "File-based routing",
723
- "description": "Dropping a file creates a route. Conventions for pages, layouts, dynamic params and 404/error, plus the pages that are not .tsx (csv / xlsx / slides).",
723
+ "description": "Dropping a file creates a route. Conventions for pages, layouts, dynamic params and 404/error, plus the pages that are not .tsx (csv / xlsx / slides / documents).",
724
724
  "file": "en/routing.md",
725
725
  "order": 1
726
726
  },
@@ -15,6 +15,7 @@ Vantage は **Claude Code の Agent Skills** を同梱しています。Skill
15
15
  | `vantage-app` | アプリの新規作成と、`index.tsx` 単体の SPA から `server/api`・ネストレイアウト・動的ルート・404/error を備えた fullstack への拡張 |
16
16
  | `vantage-add-feature` | ページ / API / UI / ブロックの追加(`vantage add` + `check` / `routes` までの一連) |
17
17
  | `vantage-slide` | `.slide.tsx` でスライドデッキを書く(1920×1080 キャンバスの縦方向の予算、タイプスケール、段階表示、トランジションとモーフ、pptx 書き出しの前提) |
18
+ | `vantage-design` | 見た目の意図 `DESIGN.md` と値を持つ `styles.css` をまとめて作る / 更新する(配色・チャートの色・書体・ブランド合わせ。URL・ロゴ・資料・外部の DESIGN.md からの取り込み、コントラストの確認) |
18
19
  | `vantage-pitfalls` | 落とし穴リファレンス(Base UI ≠ Radix、`SelectValue` の挙動、クライアントから `server/` を import しない など) |
19
20
  | `project-storage` | Squadbase の Project Storage(アップロード済みファイル)をブラウザから扱う(一覧、画像 / 動画 / PDF の埋め込み、アップロード)。Squadbase 上で動くアプリ向け |
20
21
 
@@ -42,6 +43,7 @@ Bundled skills:
42
43
  project-storage .claude/skills/project-storage/
43
44
  vantage-add-feature .claude/skills/vantage-add-feature/
44
45
  vantage-app .claude/skills/vantage-app/
46
+ vantage-design not placed
45
47
  vantage-pitfalls not placed
46
48
  vantage-slide not placed
47
49
  ```
@@ -60,6 +62,7 @@ your-app/
60
62
  └── skills/
61
63
  ├── vantage-app/SKILL.md
62
64
  ├── vantage-add-feature/SKILL.md
65
+ ├── vantage-design/SKILL.md (references/ と scripts/ も一緒に配られる)
63
66
  ├── vantage-pitfalls/SKILL.md
64
67
  ├── vantage-slide/SKILL.md (references/ も一緒に配られる)
65
68
  └── project-storage/SKILL.md
@@ -8,6 +8,30 @@ Vantage のリリースごとの変更点です。新しいものが上に来ま
8
8
  > まだプロトタイプ(**0.x**)です。0.x の間は **minor が実質のメジャー**扱いで、後方互換性の
9
9
  > ない変更は minor で入ることがあります。patch は後方互換の機能追加とバグ修正のみです。
10
10
 
11
+ ## v0.6.2
12
+
13
+ リバースプロキシの後ろで dev サーバーを動かせるようになりました(2026-09-23)。
14
+
15
+ ### 追加
16
+
17
+ - **`--host [addr]` と `--allowed-hosts <list|true>`** を `vantage dev` / `vantage preview`(SPA)に
18
+ 追加しました。Vite は `Host` ヘッダが `localhost` 以外のリクエストを 403 で拒否するため、
19
+ サンドボックスのプレビュープロキシやトンネルなど**別のホスト名で前に立つもの**があると
20
+ そのままでは届きませんでした。`--allowed-hosts` は環境変数 **`VANTAGE_ALLOWED_HOSTS`** でも
21
+ 渡せます(フラグが優先)。どちらも指定しなければ挙動は従来どおりです。詳細は
22
+ [CLI リファレンス](cli-reference)を参照してください。
23
+
24
+ ## v0.6.1
25
+
26
+ ドキュメントのページを書けるようになりました(2026-09-25)。
27
+
28
+ ### 追加
29
+
30
+ - **`<name>.doc.tsx` がドキュメントのページになります。** `@squadbase/vantage/doc` の `Document` で
31
+ 包むと、中の見出し・段落・リスト・表・引用・コードにクラスなしでスタイルが当たります。配色・書体・
32
+ 本文の幅は `--doc-*` トークンで変えられます。詳しくは[ルーティング](routing)と
33
+ [UI とテーマ](ui-and-theming)を参照してください。
34
+
11
35
  ## v0.6.0
12
36
 
13
37
  `src/` に置けるものが `.tsx` だけではなくなりました。`.csv` / `.xlsx` はそのまま表として
@@ -75,6 +99,12 @@ Vantage のリリースごとの変更点です。新しいものが上に来ま
75
99
  減ります。`vantage add agents` はこのセット一式をアプリルート(`AGENTS.md` + `agents/`)へ
76
100
  配置し、`vantage upgrade` はまとめて再同期します(バンドルに無いファイルは消しません)。
77
101
 
102
+ - **`DESIGN.md` と `vantage-design` skill を追加しました。** プロジェクトルートの `DESIGN.md` に
103
+ 見た目の意図(配色の役割・チャート・書体・レイアウト)をトークン名で書いておくと、エージェントは
104
+ UI を書く前にそれを読みます(`AGENTS.md` / `agents/page.md` / `agents/slide.md` に案内を追加)。
105
+ `DESIGN.md` はユーザーの持ち物で、`vantage upgrade` は触りません。「ブランドに合わせて」などの
106
+ 依頼は `vantage-design` skill が `DESIGN.md` と `styles.css` をまとめて更新します。
107
+
78
108
  ### 変更
79
109
 
80
110
  - `useRoutes()` が返す `RouteInfo` に **`kind`**(`"module"` | `"file"`)と
@@ -351,6 +351,35 @@ vantage dev --strict-port # 5173 が取れなければ起動し
351
351
  > また fullstack の `preview` は Node サーバーを 1 ポートに bind するだけなので**常に厳格**で、
352
352
  > `--no-strict-port` は効きません。
353
353
 
354
+ ## `--host` / `--allowed-hosts` — リバースプロキシの後ろで動かす
355
+
356
+ `vantage dev` と `vantage preview`(SPA)は、既定では `localhost` にしか bind せず、`Host` ヘッダが
357
+ `localhost` か bind したアドレス以外のリクエストを **403 で拒否**します(Vite の DNS リバインディング
358
+ 対策)。サンドボックスのプレビュープロキシ・トンネル・コンテナのネットワークなど、**別のホスト名で
359
+ 前に立つもの**があるときは、この 2 つを組み合わせて通します。
360
+
361
+ ```bash
362
+ vantage dev --host # すべてのインターフェースで listen
363
+ vantage dev --host 0.0.0.0 # アドレスを明示(--host=:: の形も可)
364
+ vantage dev --allowed-hosts preview.example.com # プロキシが名乗るホスト名を許可(カンマ区切りで複数)
365
+ vantage dev --allowed-hosts true # Host の検査そのものを無効化
366
+ ```
367
+
368
+ | フラグ | 意味 |
369
+ |---|---|
370
+ | `--host [addr]` | 値なしなら**すべてのインターフェース**、値があればそのアドレスに bind する(Vite の `server.host`)|
371
+ | `--allowed-hosts <list\|true>` | 受け付ける `Host` ヘッダの一覧(カンマ区切り)。`true` で検査を無効化(Vite の `server.allowedHosts`)|
372
+
373
+ `--allowed-hosts` は環境変数 **`VANTAGE_ALLOWED_HOSTS`** でも渡せます(同じ書式)。サーバーを起動する
374
+ 側の仕組みがホスト名を知っている場合はそちらが便利です。フラグと環境変数の両方があれば**フラグが
375
+ 勝ちます**。どちらも無ければ Vite の既定のままで、これまでどおり `localhost` だけを受け付けます。
376
+
377
+ > [!NOTE]
378
+ > `--host` の値は次のトークンを取ります。`vantage --host dev` のように直後にコマンドやパスが来る
379
+ > 書き方は値と取り違えるので、その場合は `--host=<addr>` か、末尾に `--host` を置いてください。
380
+ > fullstack の `preview` は Node サーバーがすべてのインターフェースで listen し `Host` を検査しない
381
+ > ので、どちらのフラグも効きません(その旨が表示されます)。
382
+
354
383
  ## dev のブラウザ出力 — 転送とオーバーレイ
355
384
 
356
385
  `vantage dev` は、ブラウザ側で起きたことを**開発ターミナルへ転送します**。既定で転送するのは
@@ -411,7 +440,7 @@ VANTAGE_PROFILE=1 vantage dev
411
440
 
412
441
  ## 静的診断(`check`)
413
442
 
414
- `vantage check` が検出する診断は次の 11 種類です(エラー 7・警告 4)。
443
+ `vantage check` が検出する診断は次の 13 種類です(エラー 7・警告 6)。
415
444
 
416
445
  | コード | 深刻度 | 意味 |
417
446
  |---|---|---|
@@ -426,9 +455,13 @@ VANTAGE_PROFILE=1 vantage dev
426
455
  | `PUBLIC_ENV_MISUSE` | 警告 | クライアントが `PUBLIC_` 以外の env を読んでいる |
427
456
  | `UNSUPPORTED_PAGE_FILE` | 警告 | ビューアの無い拡張子(`.xls`・`.ods` など)を置いている。ルートにならない |
428
457
  | `FILE_PAGE_TOO_LARGE` | 警告 | データファイルページが 25MB を超えている。そのページはエラー表示になる |
458
+ | `HARDCODED_COLOR` | 警告 | `.ts`/`.tsx` に色を直書きしている(`#hex`・`rgb()`/`hsl()`/`oklch()` など・`bg-[#…]`・`bg-blue-500` などの Tailwind パレット)。ファイルごとに `path:行` と置き換え候補のトークンを出す |
459
+ | `DESIGN_MD_TOO_LONG` | 警告 | ルートの `DESIGN.md` が 150 行を超えている。実値は `styles.css` に置き、トークン名で参照する |
429
460
 
430
461
  いずれもユーザーコードを import・実行しません(純粋に静的な検査です)。
431
462
 
463
+ `HARDCODED_COLOR` は `.css` を見ません(値の置き場は `styles.css`)。地図の塗り分けのように色がデータの意味を持つ場合は、その行か直前の行に `// vantage-ignore-color`(JSX 内は `{/* vantage-ignore-color */}`)を付けると除外されます。ファイルごと除外するには先頭 5 行以内に `vantage-ignore-color-file` を書きます。
464
+
432
465
  ## 生成物と成果物
433
466
 
434
467
  `dist/` の中身:
@@ -1,6 +1,6 @@
1
1
  # ファイルベースルーティング
2
2
 
3
- > ファイルを置くだけでルートが生まれる。ページ・レイアウト・動的パラメータ・404/error の規約と、tsx 以外のページ(csv / xlsx / スライド)。
3
+ > ファイルを置くだけでルートが生まれる。ページ・レイアウト・動的パラメータ・404/error の規約と、tsx 以外のページ(csv / xlsx / スライド / ドキュメント)。
4
4
 
5
5
  Vantage のルーティングは **ファイルの配置がそのまま URL** になります。ルーターの設定は書きません。
6
6
 
@@ -36,6 +36,7 @@ Vantage のルーティングは **ファイルの配置がそのまま URL**
36
36
  | `_404.tsx` | not-found の UI(**ルートのみ**) |
37
37
  | `_error.tsx` | error の UI(**ルートのみ**) |
38
38
  | `monthly-report.slide.tsx` | `/monthly-report`(スライドデッキ) |
39
+ | `june-summary.doc.tsx` | `/june-summary`(ドキュメント) |
39
40
  | `sales-export.csv` | `/sales-export`(表として描かれる) |
40
41
  | `data/june.xlsx` | `/data/june`(同上) |
41
42
 
@@ -46,7 +47,7 @@ Vantage のルーティングは **ファイルの配置がそのまま URL**
46
47
  ## tsx 以外もページになる
47
48
 
48
49
  ルートになるのは `.tsx` / `.jsx` だけではありません。**`.csv` と `.xlsx`** はそのまま表として
49
- 読めるページになり、**`<name>.slide.tsx`** はスライドデッキになります。どちらも URL の作り方は
50
+ 読めるページになり、**`<name>.slide.tsx`** はスライドデッキに、**`<name>.doc.tsx`** はドキュメントになります。どれも URL の作り方は
50
51
  tsx と同じで、`vantage routes` にも `useRoutes()` のナビにも同格で並びます。
51
52
 
52
53
  ### データファイル(`.csv` / `.xlsx`)
@@ -104,6 +105,32 @@ export default function Deck() {
104
105
  > `deck.slide.ts` は `INVALID_PAGE_VARIANT` エラーになります。また `june.slide.tsx` と
105
106
  > `june.tsx`、`sales.csv` と `sales.tsx` はいずれも同じ URL に解決するので `ROUTE_CONFLICT` です。
106
107
 
108
+ ### ドキュメント(`.doc.tsx`)
109
+
110
+ `.doc` も**ページ種別サフィックス**です(`src/june-summary.doc.tsx` → `/june-summary`)。上から下へ
111
+ 読む文章のページで、中身は `<Document>` を返す普通の React コンポーネントです。
112
+
113
+ ```tsx
114
+ import { definePage } from "@squadbase/vantage";
115
+ import { Document } from "@squadbase/vantage/doc";
116
+
117
+ export const page = definePage({ title: "6月度サマリー" });
118
+
119
+ export default function JuneSummary() {
120
+ return (
121
+ <Document>
122
+ <h1>6月度サマリー</h1>
123
+ <p>6月の売上は目標を 5% 上回りました。</p>
124
+ <table>…</table>
125
+ </Document>
126
+ );
127
+ }
128
+ ```
129
+
130
+ `<Document>` の中の見出し・段落・リスト・表・引用・コードには、クラスを書かなくてもスタイルが
131
+ 当たります。詳しくは [UI とテーマ](ui-and-theming)。`.slide` と同じく、`.doc` を付けられるのは
132
+ ルートになるページモジュールだけです。
133
+
107
134
  ## ルーティングされないディレクトリ
108
135
 
109
136
  次のディレクトリは(どの階層でも)決して走査されません。ここには自由にコードを置けます。
@@ -214,7 +241,7 @@ export default function RootLayout() {
214
241
  | `label` | `string` | `navLabel` → `title` → `path` の順で決まる表示名 |
215
242
  | `title` / `description` / `navLabel` | `string \| undefined` | [`definePage`](pages-and-metadata) の値 |
216
243
  | `kind` | `"module" \| "file"` | 何から描かれるか。`"file"` は `.csv` / `.xlsx` |
217
- | `variant` | `"slide" \| undefined` | ページ種別サフィックス |
244
+ | `variant` | `"slide" \| "doc" \| undefined` | ページ種別サフィックス |
218
245
 
219
246
  `useCurrentRoute()` は今表示中のルートを返します(404 のときは `undefined`)。
220
247
  上の例のような「現在地」判定のほか、パンくずやページ見出しに使えます。
@@ -114,6 +114,32 @@ pptx 書き出しが壊れる条件 — は同梱の **`vantage-slide` スキル
114
114
  > Tailwind でダッシュボード向けに組まれているので、1920×1080 を縮小投影すると `text-sm` のボタンは
115
115
  > 実効 8px 程度になって読めません。
116
116
 
117
+ ## ドキュメント(`/doc`)
118
+
119
+ `<name>.doc.tsx` を[置くとドキュメントのページになります](routing)。`Document` で包むと、中に
120
+ 書いた素の HTML 要素(`h1`〜`h4`・`p`・`ul`/`ol`・`table`・`blockquote`・`pre`/`code`・`hr`・`a`・
121
+ `figure`/`figcaption`・`img`)に見出しの大きさ・余白・罫線が当たります。チャートは
122
+ [`EChart`](parts/echart) をそのまま文中に置けます。
123
+
124
+ ```tsx
125
+ import { Document } from "@squadbase/vantage/doc";
126
+ ```
127
+
128
+ 配色・書体・本文の幅は `--doc-*` トークンで、既定はアプリのトークンへの別名なので
129
+ **ダークモードにも自動で追従します**。
130
+
131
+ | トークン | 既定 | 何に効くか |
132
+ |---|---|---|
133
+ | `--doc-fg` / `--doc-muted` | `--foreground` / `--muted-foreground` | 本文 / 引用・キャプション |
134
+ | `--doc-accent` | `--primary` | リンク |
135
+ | `--doc-border` / `--doc-subtle` | `--border` / `--muted` | 罫線 / コード・表の見出し行の背景 |
136
+ | `--doc-font-body` / `--doc-font-heading` / `--doc-font-mono` | アプリの書体 | 本文 / 見出し / コード |
137
+ | `--doc-size-body` / `--doc-line-height` / `--doc-max-width` | `1rem` / `1.8` / `48rem` | 文字サイズ / 行間 / 本文の幅 |
138
+
139
+ アプリ全体では `styles.css` の `:root` で、1 つのドキュメントだけなら
140
+ `<Document theme={{ accent: "#2563eb" }}>` で上書きします。要素に `className` で Tailwind
141
+ ユーティリティを付けると、既定のスタイルより優先されます。
142
+
117
143
  ## Tailwind はそのまま使える
118
144
 
119
145
  `className` に Tailwind ユーティリティを書くだけで効きます。`tailwind.config` も `postcss.config`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squadbase/vantage",
3
- "version": "0.6.0-dev.3cc6138",
3
+ "version": "0.6.1-dev.2d25e94",
4
4
  "description": "Data dashboard framework for Squadbase Editor. Vite-powered, config-free, one-file first.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -67,6 +67,10 @@
67
67
  "types": "./dist/slide/index.d.ts",
68
68
  "default": "./dist/slide/index.js"
69
69
  },
70
+ "./doc": {
71
+ "types": "./dist/doc/index.d.ts",
72
+ "default": "./dist/doc/index.js"
73
+ },
70
74
  "./server": {
71
75
  "types": "./dist/server/index.d.ts",
72
76
  "default": "./dist/server/index.js"
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: vantage-design
3
+ description: Vantage(@squadbase/vantage)アプリの見た目の意図 `DESIGN.md` と、実際の値を持つ `styles.css` をまとめて作る / 更新する手順。配色・ブランドカラー・テーマ・チャートの色・フォント・角丸・トーンを変えたいとき、既存サイトやロゴ・資料・外部の DESIGN.md に合わせたいとき、プロジェクト作成時の初期デザイン(プリセット default / calm / vivid / mono)を決めるときに使う。「色を変えて」「ブランドに合わせて」「このサイトに合わせて」「落ち着いた感じに」「フォントを変えて」「テーマを作って」「DESIGN.md を作って」、"change the colors", "match our brand", "match this website", "theme", "color palette", "font", "design system", "DESIGN.md" で起動。
4
+ ---
5
+
6
+ # DESIGN.md と styles.css をまとめて更新する
7
+
8
+ Vantage アプリの見た目は 2 つのファイルで決まる。
9
+
10
+ | ファイル | 持つもの | 所有者 |
11
+ | --- | --- | --- |
12
+ | `DESIGN.md`(プロジェクトルート) | 意図とルール。**トークン名だけ**を書き、色コードは書かない(150 行以内) | ユーザー |
13
+ | `styles.css`(ページと同じ側。通常 `src/styles.css`) | トークンの実際の値(`:root` と `.dark`) | ユーザー |
14
+
15
+ **2 つは必ず同じステップで更新する。** 片方だけ直すと、次にページを書くエージェントが古い意図に
16
+ 従ってしまう。デザイン変更の依頼をページ単位の `className` 修正で済ませない。
17
+
18
+ 一般規約(トークンで色を書く・設定ファイルを作らない)は `AGENTS.md` が正本。ここでは手順だけを扱う。
19
+
20
+ ## リファレンス
21
+
22
+ | ファイル | 読む場面 |
23
+ | --- | --- |
24
+ | `references/format.md` | `DESIGN.md` を書く / 直すとき(書式・節の順番・雛形) |
25
+ | `references/extract.md` | URL・画像・pptx/pdf・言葉・外部 DESIGN.md から色と書体を取り出すとき |
26
+ | `references/presets.md` | プロジェクト作成時の初期デザイン(`default` / `calm` / `vivid` / `mono`) |
27
+ | `scripts/contrast.mjs` | 文字色と背景色のコントラスト比を確かめるとき |
28
+
29
+ ## 手順
30
+
31
+ ### 1. 入力を集める
32
+
33
+ - 何に合わせるのか(URL・ロゴ画像・資料・言葉・外部の `DESIGN.md`)を確認し、
34
+ `references/extract.md` の該当する節の手順で色・書体・トーンを取り出す。
35
+ - 既存の `DESIGN.md` と `styles.css` を読む。既にあるルールで今回触らないものは残す。
36
+ - スライド(`*.slide.tsx`)があるかを `ls` / `vantage routes` で確認しておく。
37
+
38
+ ### 2. 提案して確認を取る
39
+
40
+ 書き込む前に、次の 2 つをユーザーに見せて確認を取る。
41
+
42
+ - **役割 → トークンの対応表**(主色・強調・良い/悪い/注意・背景の段階・文字・チャート 5 色・書体)。
43
+ 各行に「何に合わせてその色にしたか」を 1 語添える。
44
+ - **トーンの説明**(2〜3 行。`DESIGN.md` の「全体のトーン」にそのまま入る文)。
45
+
46
+ プリセットで足りる場合はプリセット名(`references/presets.md`)で提案してよい。
47
+
48
+ ### 3. styles.css と DESIGN.md を同じステップで書く
49
+
50
+ `styles.css`:
51
+
52
+ - **マーカーブロックの中は手で編集しない。**
53
+ ``/* vantage-template:chart-preset — regenerated by `chart`; edits here are lost */`` 〜
54
+ `/* vantage-template:chart-preset:end */` の間はコマンドが丸ごと書き換える生成物で、手で直した
55
+ 値は次の適用で消える。
56
+ - チャートの 5 色は必ずコマンドで選ぶ: `npx @squadbase/vantage-template chart <preset>`
57
+ (`blue` / `ocean` / `sunset` / `forest` / `berry` / `mono`。プロジェクトルートで実行。
58
+ `--dry-run` で書き込まずに結果を見られる)。マーカーの中だけが置き換わり、他の記述は残る。
59
+ - プリセットに無いチャート色(ブランド色を `--chart-1` にしたいなど)は、マーカーブロックの**後ろ**に
60
+ 別の `:root { --chart-1: …; }` と `.dark, [data-theme="dark"] { --chart-1: …; }` を足して上書きする
61
+ (後に書いた方が勝つ)。上書きするのは変えたい番号だけにし、残りはプリセットに任せる。
62
+ - `--primary` / `--primary-foreground` / `--radius` などチャート以外のトークンは、マーカーの**外**
63
+ (ファイル先頭の `:root` ブロック)に書く。色は `:root` と `.dark, [data-theme="dark"]` の
64
+ **両方**に書く。片方だけだとダークモードで既定に戻る。値は `oklch()` か Tailwind のパレット変数
65
+ (`var(--color-sky-600)`)で書く。
66
+ - 書体は既定でシステムフォント。**ページの書体を決めるのは `body` セレクタの `font-family`**
67
+ (フレームワークの `theme.css` が `body` にシステムフォントを直接指定しているため、`:root` や
68
+ `html` に `font-family` を書いても本文には効かない)。スライドの書体は `:root` の
69
+ `--slide-font-display`(見出し)/ `--slide-font-body`(本文)で決まる。Web フォントを使うときの
70
+ レシピ:
71
+ 1. Google Fonts の CSS
72
+ (`curl -A '<ブラウザの User-Agent>' 'https://fonts.googleapis.com/css2?family=<Font>:wght@400;600&display=swap'`)
73
+ から使う subset の `@font-face` ブロックだけを `styles.css` の先頭に貼る。
74
+ **`@import url(...)` は使わない** ― `styles.css` はテーマの後ろに連結されるので
75
+ 「@import rules must precede all rules」の警告とともにビルドで捨てられる。
76
+ 2. マーカーの外に次を書く(フォールバックは `theme.css` の既定と同じ並び):
77
+
78
+ ```css
79
+ body {
80
+ font-family: "<Font>", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
81
+ }
82
+ :root {
83
+ --slide-font-display: "<Font>", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
84
+ --slide-font-body: var(--slide-font-display);
85
+ }
86
+ ```
87
+
88
+ 日本語の Web フォントは face が 100 を超えるので原則使わない(pptx 書き出しも壊れる。
89
+ `vantage-slide` の `references/tokens.md` 参照)。
90
+
91
+ `DESIGN.md`: `references/format.md` の書式で書く。**色コードを書かない**(トークン名だけ)。
92
+ 150 行を超えない(超えると `vantage check` が `DESIGN_MD_TOO_LONG` を出す)。ロゴなどの素材は
93
+ `public/brand/logo.svg` のように `public/` 配下のパスで「ブランド素材」行に書く。
94
+
95
+ ### 4. コントラストを確かめる
96
+
97
+ 主な文字色 / 背景色の組を、**ライトとダークの両方で**確かめる。
98
+
99
+ ```bash
100
+ node <このスキルの場所>/scripts/contrast.mjs '<文字色>' '<背景色>'
101
+ # 例: node .squadbase/skills/vantage-design/scripts/contrast.mjs 'oklch(0.985 0 0)' 'oklch(0.55 0.2 260)'
102
+ ```
103
+
104
+ 最低限の組: `--foreground` / `--background`、`--primary-foreground` / `--primary`、
105
+ `--muted-foreground` / `--card`、`--destructive` / `--background`。本文は AA(4.5:1)、大きな数字・
106
+ 見出しだけに使う色は 3:1 以上。`var(--color-*)` で書いた値は Tailwind の `oklch()` 値に直してから渡す。
107
+ 落ちたら明度を調整して、提案に戻らずに直してよい(直したことは報告する)。
108
+
109
+ ### 5. プレビューを見せる(省略しない)
110
+
111
+ - **必ず**使い捨てページ `src/design-preview.tsx`(`src/` が無ければルート直下)を作る: KPI カード
112
+ 3〜4 枚、`EChart` の棒または折れ線 1 つ(5 系列)、主要ボタン・破壊的ボタン、補足の文字。すべて
113
+ トークンで書く。既存ページやホームで代用しない ― ホームなどの画面はチャートやボタンを持たないことが
114
+ 多く、変更後の色が見えない。
115
+ - スライドがあるなら既存のデッキの URL を案内する(プレビュー用のデッキは作らない)。
116
+ - **ユーザーが承認したら `src/design-preview.tsx` を削除する。** 残すとナビに出る。
117
+
118
+ ### 6. 検証する
119
+
120
+ ```bash
121
+ npx vantage check
122
+ ```
123
+
124
+ `HARDCODED_COLOR`(ページ内の色コード)や `DESIGN_MD_TOO_LONG` が出たらその場で直す。
125
+
126
+ ### 7. 完了を報告する
127
+
128
+ 報告には、更新したファイル(`DESIGN.md` / `styles.css`)に加えて次を**必ず**入れる。
129
+
130
+ - プレビューページのパスと URL(`src/design-preview.tsx` → `/design-preview`)。
131
+ - 「ホームなど既存の画面は一部の色しか使っていないので、変更が見えないことがある。配色はプレビュー
132
+ ページで確認してほしい」という一言。
133
+
134
+ ## 会話中の指示との関係
135
+
136
+ - 会話中の個別の指示(「このグラフだけ赤で」)は `DESIGN.md` より優先する。そのページだけ直せばよい。
137
+ - 同じ指示が 2 回以上出たら、`DESIGN.md` への反映を提案する(反映するときはこの手順の 2 から)。