@squadbase/vantage 0.5.3 → 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 (134) hide show
  1. package/NOTICE +73 -0
  2. package/README.md +6 -5
  3. package/dist/add-DY4AXANK.js +6 -0
  4. package/dist/add-DY4AXANK.js.map +1 -0
  5. package/dist/{build-756WIEVI.js → build-JB4VOMUI.js} +10 -10
  6. package/dist/{build-756WIEVI.js.map → build-JB4VOMUI.js.map} +1 -1
  7. package/dist/{check-KZ5PHCA6.js → check-ZJYK6RLG.js} +8 -8
  8. package/dist/{check-KZ5PHCA6.js.map → check-ZJYK6RLG.js.map} +1 -1
  9. package/dist/chunk-5ZOP4SQR.js +47 -0
  10. package/dist/chunk-5ZOP4SQR.js.map +1 -0
  11. package/dist/{chunk-EHPJXDJU.js → chunk-6S4BAIGV.js} +4 -2
  12. package/dist/chunk-6S4BAIGV.js.map +1 -0
  13. package/dist/chunk-BCE22JSM.js +510 -0
  14. package/dist/chunk-BCE22JSM.js.map +1 -0
  15. package/dist/{chunk-C4MQRWXS.js → chunk-C2CX6GLX.js} +17 -3
  16. package/dist/chunk-C2CX6GLX.js.map +1 -0
  17. package/dist/{chunk-RA6Z3OX3.js → chunk-EP6JHXSR.js} +61 -9
  18. package/dist/chunk-EP6JHXSR.js.map +1 -0
  19. package/dist/{chunk-BAM33YZ6.js → chunk-JGRMRXXZ.js} +45 -6
  20. package/dist/chunk-JGRMRXXZ.js.map +1 -0
  21. package/dist/{chunk-VXAV2435.js → chunk-KLEIVDUV.js} +30 -7
  22. package/dist/chunk-KLEIVDUV.js.map +1 -0
  23. package/dist/{chunk-JC6MT5UU.js → chunk-MXI3PZFT.js} +3 -3
  24. package/dist/{chunk-JC6MT5UU.js.map → chunk-MXI3PZFT.js.map} +1 -1
  25. package/dist/chunk-PLST5Q7T.js +2221 -0
  26. package/dist/chunk-PLST5Q7T.js.map +1 -0
  27. package/dist/chunk-PVTHHV7X.js +105 -0
  28. package/dist/chunk-PVTHHV7X.js.map +1 -0
  29. package/dist/{chunk-HQDEYCDP.js → chunk-QI3XQKHS.js} +40 -4
  30. package/dist/chunk-QI3XQKHS.js.map +1 -0
  31. package/dist/{chunk-L3TW4FNA.js → chunk-T3FLAGI6.js} +34 -13
  32. package/dist/chunk-T3FLAGI6.js.map +1 -0
  33. package/dist/{chunk-X44ZTKID.js → chunk-U2M6HGKQ.js} +61 -9
  34. package/dist/chunk-U2M6HGKQ.js.map +1 -0
  35. package/dist/chunk-ZO62C6T4.js +91 -0
  36. package/dist/chunk-ZO62C6T4.js.map +1 -0
  37. package/dist/{chunk-D4Y5RWJA.js → chunk-ZVANIULZ.js} +81 -21
  38. package/dist/chunk-ZVANIULZ.js.map +1 -0
  39. package/dist/cli.js +18 -14
  40. package/dist/cli.js.map +1 -1
  41. package/dist/client/index.d.ts +5 -35
  42. package/dist/client/index.js +1 -1
  43. package/dist/components/index.js +3 -2212
  44. package/dist/components/index.js.map +1 -1
  45. package/dist/{dev-EILX2VTF.js → dev-FCEC3UKQ.js} +24 -13
  46. package/dist/dev-FCEC3UKQ.js.map +1 -0
  47. package/dist/doc/index.d.ts +39 -0
  48. package/dist/doc/index.js +38 -0
  49. package/dist/doc/index.js.map +1 -0
  50. package/dist/{docs-GP2ZHIQF.js → docs-EJJ3BECT.js} +4 -4
  51. package/dist/{docs-GP2ZHIQF.js.map → docs-EJJ3BECT.js.map} +1 -1
  52. package/dist/{doctor-FXZLMGC3.js → doctor-WHZXPERA.js} +9 -9
  53. package/dist/doctor-WHZXPERA.js.map +1 -0
  54. package/dist/manifest-DiOjyinq.d.ts +43 -0
  55. package/dist/{preview-WBQPCTTT.js → preview-OGMCNQUO.js} +13 -5
  56. package/dist/preview-OGMCNQUO.js.map +1 -0
  57. package/dist/query/index.js +1 -102
  58. package/dist/query/index.js.map +1 -1
  59. package/dist/router/index.d.ts +10 -0
  60. package/dist/router/index.js +2 -89
  61. package/dist/router/index.js.map +1 -1
  62. package/dist/{routes-WCN4KSZY.js → routes-GTFO5PUF.js} +17 -8
  63. package/dist/routes-GTFO5PUF.js.map +1 -0
  64. package/dist/{search-GLKCJXSI.js → search-6Y422SV6.js} +4 -4
  65. package/dist/{search-GLKCJXSI.js.map → search-6Y422SV6.js.map} +1 -1
  66. package/dist/server/node.d.ts +1 -1
  67. package/dist/server/node.js +6 -1
  68. package/dist/server/node.js.map +1 -1
  69. package/dist/slide/index.d.ts +230 -0
  70. package/dist/slide/index.js +1571 -0
  71. package/dist/slide/index.js.map +1 -0
  72. package/dist/table/index.d.ts +107 -0
  73. package/dist/table/index.js +680 -0
  74. package/dist/table/index.js.map +1 -0
  75. package/dist/types-CXFlMl8S.d.ts +121 -0
  76. package/dist/ui/index.js +3 -41
  77. package/dist/ui/index.js.map +1 -1
  78. package/dist/{upgrade-S64IXL42.js → upgrade-AL4KZZR4.js} +9 -9
  79. package/dist/upgrade-AL4KZZR4.js.map +1 -0
  80. package/dist/vite/index.d.ts +1 -1
  81. package/dist/vite/index.js +5 -5
  82. package/docs/en/agent-skills.md +22 -12
  83. package/docs/en/changelog.md +107 -0
  84. package/docs/en/cli-reference.md +42 -4
  85. package/docs/en/pages-and-metadata.md +17 -0
  86. package/docs/en/routing.md +102 -3
  87. package/docs/en/ui-and-theming.md +102 -0
  88. package/docs/index.json +2 -2
  89. package/docs/ja/agent-skills.md +21 -11
  90. package/docs/ja/changelog.md +105 -0
  91. package/docs/ja/cli-reference.md +41 -4
  92. package/docs/ja/pages-and-metadata.md +17 -0
  93. package/docs/ja/routing.md +98 -3
  94. package/docs/ja/ui-and-theming.md +100 -0
  95. package/package.json +33 -9
  96. package/skills/vantage-app/SKILL.md +4 -0
  97. package/skills/vantage-design/SKILL.md +137 -0
  98. package/skills/vantage-design/references/extract.md +110 -0
  99. package/skills/vantage-design/references/format.md +172 -0
  100. package/skills/vantage-design/references/presets.md +110 -0
  101. package/skills/vantage-design/scripts/contrast.mjs +166 -0
  102. package/skills/vantage-pitfalls/SKILL.md +41 -1
  103. package/skills/vantage-slide/SKILL.md +264 -0
  104. package/skills/vantage-slide/references/morph.md +102 -0
  105. package/skills/vantage-slide/references/steps.md +57 -0
  106. package/skills/vantage-slide/references/tokens.md +87 -0
  107. package/skills/vantage-slide/references/transitions.md +196 -0
  108. package/templates/AGENTS.md +43 -228
  109. package/templates/agents/api.md +49 -0
  110. package/templates/agents/csv.md +32 -0
  111. package/templates/agents/doc.md +73 -0
  112. package/templates/agents/page.md +187 -0
  113. package/templates/agents/slide.md +41 -0
  114. package/templates/agents/xlsx.md +33 -0
  115. package/theme.css +169 -0
  116. package/dist/add-PPCBMWEN.js +0 -6
  117. package/dist/add-PPCBMWEN.js.map +0 -1
  118. package/dist/chunk-BAM33YZ6.js.map +0 -1
  119. package/dist/chunk-C4MQRWXS.js.map +0 -1
  120. package/dist/chunk-D4Y5RWJA.js.map +0 -1
  121. package/dist/chunk-EHPJXDJU.js.map +0 -1
  122. package/dist/chunk-HQDEYCDP.js.map +0 -1
  123. package/dist/chunk-L3TW4FNA.js.map +0 -1
  124. package/dist/chunk-PSEYFYAP.js +0 -276
  125. package/dist/chunk-PSEYFYAP.js.map +0 -1
  126. package/dist/chunk-RA6Z3OX3.js.map +0 -1
  127. package/dist/chunk-VXAV2435.js.map +0 -1
  128. package/dist/chunk-X44ZTKID.js.map +0 -1
  129. package/dist/dev-EILX2VTF.js.map +0 -1
  130. package/dist/doctor-FXZLMGC3.js.map +0 -1
  131. package/dist/preview-WBQPCTTT.js.map +0 -1
  132. package/dist/routes-WCN4KSZY.js.map +0 -1
  133. package/dist/types-De3mo_hv.d.ts +0 -59
  134. package/dist/upgrade-S64IXL42.js.map +0 -1
@@ -14,6 +14,8 @@ All of these target an agent that is **building a Vantage app**.
14
14
  |---|---|
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
+ | `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 |
17
19
  | `vantage-pitfalls` | A pitfalls reference (Base UI ≠ Radix, `SelectValue` behavior, never importing `server/` from the client, and more) |
18
20
  | `project-storage` | Working with Squadbase Project Storage (uploaded files) from the browser — listing, embedding images / video / PDFs, uploading. For apps running on Squadbase |
19
21
 
@@ -41,7 +43,9 @@ Bundled skills:
41
43
  project-storage .claude/skills/project-storage/
42
44
  vantage-add-feature .claude/skills/vantage-add-feature/
43
45
  vantage-app .claude/skills/vantage-app/
46
+ vantage-design not placed
44
47
  vantage-pitfalls not placed
48
+ vantage-slide not placed
45
49
  ```
46
50
 
47
51
  With `--force`, the copies that were found are rewritten **where they are** (an explicit `--dir`
@@ -58,7 +62,9 @@ your-app/
58
62
  └── skills/
59
63
  ├── vantage-app/SKILL.md
60
64
  ├── vantage-add-feature/SKILL.md
65
+ ├── vantage-design/SKILL.md (its references/ and scripts/ ride along)
61
66
  ├── vantage-pitfalls/SKILL.md
67
+ ├── vantage-slide/SKILL.md (its references/ ride along)
62
68
  └── project-storage/SKILL.md
63
69
  ```
64
70
 
@@ -79,25 +85,28 @@ skill based on the task at hand. For other agents, pass whatever directory that
79
85
  - **The Squadbase template ships them pre-placed.** Apps created from the template already contain
80
86
  `.claude/skills/`. For a hand-made app, add them with `vantage add skill`.
81
87
 
82
- ## `AGENTS.md` (the app map)
88
+ ## `AGENTS.md` + `agents/*.md` (the app map and knowledge files)
83
89
 
84
90
  If a skill is a procedure, `AGENTS.md` is **the map an agent reads first**. It gathers Vantage's
85
- invariants, the import-subpath map, routing conventions, and the minimal data-fetching / API / env
86
- recipes onto a single page — enough to **build a minimal app from that page alone**. Deeper
87
- procedures are delegated to the skills above by name, so nothing is duplicated.
91
+ invariants, the import-subpath map, directory layout, and env conventions onto a single page, and
92
+ points into `agents/` via a "what are you writing → which file to read" table.
93
+ `agents/page.md` (regular pages), `agents/api.md` (`server/`), `agents/slide.md`
94
+ (`.slide.tsx`), `agents/xlsx.md`, and `agents/csv.md` are static, per-artifact-type references —
95
+ each is only needed when writing that kind of file. Deeper procedures are delegated to the skills
96
+ above by name, so nothing is duplicated.
88
97
 
89
- Like the skills, its **source of truth lives in the package**, and `vantage add agents` places it
90
- into the app root.
98
+ Like the skills, its **source of truth lives in the package**, and `vantage add agents` places
99
+ `AGENTS.md` together with `agents/*.md` into the app root.
91
100
 
92
101
  ```bash
93
- vantage add agents # place AGENTS.md into the app root
102
+ vantage add agents # place AGENTS.md + agents/*.md into the app root
94
103
  vantage add agents --force # overwrite an existing copy
95
104
  ```
96
105
 
97
- A placed `AGENTS.md` is kept in sync by `vantage upgrade` (it rewrites only when the content
98
- differs, and never creates the file in an app that hasn't opted in). When a framework convention
99
- changes, a **single source-of-truth edit** reaches apps through `upgrade`. The Squadbase template
100
- ships it pre-placed.
106
+ A placed `AGENTS.md` + `agents/*.md` are kept in sync by `vantage upgrade` (it rewrites only the
107
+ files whose content differs, and never creates them in an app that hasn't opted in). When a
108
+ framework convention changes, a source-of-truth edit reaches apps through `upgrade`. The Squadbase
109
+ template ships them pre-placed.
101
110
 
102
111
  ## Separation of concerns
103
112
 
@@ -108,6 +117,7 @@ the following:
108
117
  An agent without a browser reads the same content through [`vantage docs`](cli-reference)
109
118
  (`vantage docs button` for the prop table, `vantage docs --json` for machine-readable output,
110
119
  `vantage search <what you want>` when the name is unknown).
111
- - **`AGENTS.md`** (a static map) — where things live and how the project is laid out; placed with `vantage add agents`.
120
+ - **`AGENTS.md`** (a static map) — where things live and how the project is laid out; placed
121
+ together with `agents/*.md` (static, per-artifact-type references) via `vantage add agents`.
112
122
  - **Each other** — shared material like pitfalls is not copied into every skill; skills
113
123
  **cross-reference by name** instead (e.g. `vantage-app`'s procedure points at `vantage-pitfalls`).
@@ -9,6 +9,113 @@ 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
+
36
+ ## v0.6.0
37
+
38
+ What you can drop in `src/` is no longer just `.tsx`. A `.csv` or `.xlsx` becomes a page you can
39
+ read as a table, and `<name>.slide.tsx` becomes a slide deck — both sitting in the nav alongside
40
+ your dashboard pages.
41
+
42
+ ### Added
43
+
44
+ - **`.csv` / `.xlsx` become pages.** Drop `src/data/june.xlsx`, open `/data/june`, and the sheet
45
+ is readable in the browser — no download, no spreadsheet app. URLs are built exactly the way a
46
+ `.tsx` page's are (`index.csv` maps to its directory), and the page appears in `vantage routes`
47
+ and in a `useRoutes()` nav alongside everything else. An `.xlsx` with several sheets gets tabs,
48
+ and every file page offers the original file for download.
49
+
50
+ The title is derived from the file name (`june.xlsx` → "June"). Parsing happens in the browser,
51
+ so dev, the build output and the deployed app all return the same thing for the same URL.
52
+ Formulas, charts and cell formatting are not reproduced — readable as values is the contract.
53
+ Prefix a file with `_` to keep it out of routing.
54
+
55
+ It is drawn **as a spreadsheet**: column letters across the top, row numbers down the side, the
56
+ file's first row frozen as the header, sheet tabs along the bottom, and ruling that runs past
57
+ the data. Read-only — no toolbar and no sorting (a selected cell copies with `Cmd/Ctrl+C`).
58
+
59
+ - **A new `@squadbase/vantage/table` subpath.** The table viewer behind those pages. Use
60
+ `FilePageView` directly to render a file you kept out of routing from a page of your own, with
61
+ your own `definePage` (`TableViewer` takes one parsed sheet, `SheetGrid` is the grid itself).
62
+
63
+ - **`<name>.slide.tsx` becomes a slide deck.** `.slide` is a page-kind suffix and never reaches the
64
+ URL (`src/june.slide.tsx` → `/june`). The file is an ordinary React component returning a
65
+ `<SlideDeck>`, so `definePage` and the nav work as they do for any other page.
66
+
67
+ Slides are authored against a fixed 1920×1080 canvas in absolute pixels and scaled to fit.
68
+ Keyboard and click navigate, the current slide lives in the URL as `?p=`, and the toolbar
69
+ **exports the deck as a pptx**. The export bakes each slide as an image, so the file needs no
70
+ font on the receiving machine and non-Latin text survives intact.
71
+
72
+ A reader picks one of three views: **list + slide** (the default, a thumbnail rail down the
73
+ left), **the slide alone** (`L` closes the rail), and **fullscreen** (`F`, where the rail steps
74
+ aside). The rail's state rides in `?rail=`, so a link can hand someone either one; only a deck
75
+ that should start closed says so, with `<SlideDeck rail={false}>`.
76
+
77
+ - **A new `@squadbase/vantage/slide` subpath.** `SlideDeck`, `Slide`, `Steps`, `Step`,
78
+ `MorphElement`, `useSlideNumber`, `useIsActiveSlide` — including stepped reveals, page
79
+ transitions, and morphing a shared element across two slides (Keynote's "Magic Move"). The
80
+ runtime is ported from [open-slide](https://github.com/1weiho/open-slide) (MIT); attribution
81
+ ships in the package's `NOTICE`.
82
+
83
+ - **A `vantage-slide` skill now ships with Vantage.** How to budget the canvas vertically, the type
84
+ scale, stepped reveals, the design principles behind transitions, the rules morph rests on, and
85
+ what breaks a pptx export. Place it like any other skill with `vantage add skill --all`.
86
+
87
+ - **New `--slide-*` theme tokens.** They default to aliases of the app's own tokens, so a deck
88
+ follows light and dark without doing anything. Override them per deck with
89
+ `<SlideDeck theme={{ … }}>`.
90
+
91
+ - **Three more static diagnostics** (eleven in total: seven errors, four warnings).
92
+ `UNSUPPORTED_PAGE_FILE` (warning — an extension with no viewer never becomes a route, so this is
93
+ what tells you why the file never showed up), `FILE_PAGE_TOO_LARGE` (warning — over 25 MB), and
94
+ `INVALID_PAGE_VARIANT` (error — a suffix on a file that cannot be a route, like
95
+ `_layout.slide.tsx`).
96
+
97
+ - **`AGENTS.md` is now a map, plus `agents/*.md` per-artifact-type knowledge files.** One file
98
+ each for regular pages, API, slides, xlsx, and csv (`agents/page.md` / `agents/api.md` /
99
+ `agents/slide.md` / `agents/xlsx.md` / `agents/csv.md`); `AGENTS.md` keeps only the
100
+ invariants and a "what are you writing → which file to read" index table. An agent only needs
101
+ to open the one file for the kind it's about to write. `vantage add agents` places the whole
102
+ set (`AGENTS.md` + `agents/`) into the app root, and `vantage upgrade` re-syncs it (files not
103
+ in the bundle are never deleted).
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
+
111
+ ### Changed
112
+
113
+ - The `RouteInfo` returned by `useRoutes()` gained **`kind`** (`"module"` | `"file"`) and
114
+ **`variant`** (`"slide"`), so a nav can group or badge by what a page is. Existing nav code keeps
115
+ working unchanged.
116
+ - `vantage routes` now labels file pages and slide decks by kind (`--json` gains `kind`, `variant`
117
+ and `unrouted`).
118
+
12
119
  ## v0.5.3
13
120
 
14
121
  Adds a bundled skill for working with Squadbase Project Storage from the browser.
@@ -13,11 +13,11 @@
13
13
  | `vantage preview` | Run the production build locally (fullstack default `:4173`; spa via Vite preview) |
14
14
  | `vantage check` | Static checks (routes, boundaries, forbidden files). Exit 1 on error |
15
15
  | `vantage routes` | Print the page + API URL map (`--pages` / `--apis` for one side only, `--detail` for each route's spec) |
16
- | `vantage add <kind> <name>` | Scaffold or place a `page` / `api` / `ui` / `block` / `skill` / `agents` (`--force` to overwrite; `skill` scans for copies already placed and skips them, `--dir` picks the destination) |
16
+ | `vantage add <kind> <name>` | Scaffold or place a `page` / `api` / `ui` / `block` / `skill` / `agents` (`AGENTS.md` + `agents/*.md`) (`--force` to overwrite; `skill` scans for copies already placed and skips them, `--dir` picks the destination) |
17
17
  | `vantage docs [name]` | Show the bundled guide and component reference |
18
18
  | `vantage search <query>` | Search that same reference in full text (natural language or `--regex`) |
19
19
  | `vantage doctor` | Diagnose environment / installation health |
20
- | `vantage upgrade` | Regenerate artifacts and sync a placed `AGENTS.md` from the canonical copy |
20
+ | `vantage upgrade` | Regenerate artifacts and sync a placed `AGENTS.md` + `agents/*.md` from the canonical copies |
21
21
 
22
22
  ## Quick mode (pass a path directly)
23
23
 
@@ -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 eight diagnostics (six errors, two warnings).
451
+ `vantage check` detects these thirteen diagnostics (seven errors, six warnings).
422
452
 
423
453
  | Code | Severity | Meaning |
424
454
  |---|---|---|
@@ -428,11 +458,18 @@ phases are `scan` (route discovery), `diagnostics` (the static checks),
428
458
  | `MISSING_DEFAULT_EXPORT` | error | A page has no default export |
429
459
  | `INVALID_API_EXPORT` | error | An API exports no valid HTTP method |
430
460
  | `CLIENT_IMPORTS_SERVER` | error | Client code imports from `server/` |
461
+ | `INVALID_PAGE_VARIANT` | error | A page-kind suffix such as `.slide` sits on a file that cannot be a route (`_layout.slide.tsx`, …) |
431
462
  | `SUSPICIOUS_ROUTE_DIR` | warning | A scaffolding-looking directory (`pages/`, `app/`, `utils/`, …) shows up in a URL |
432
463
  | `PUBLIC_ENV_MISUSE` | warning | Client reads a non-`PUBLIC_` env variable |
464
+ | `UNSUPPORTED_PAGE_FILE` | warning | A file with an extension Vantage has no viewer for (`.xls`, `.ods`, …); it does not become a route |
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 |
433
468
 
434
469
  None of them import or run your code — the checks are purely static.
435
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
+
436
473
  ## Build output
437
474
 
438
475
  Inside `dist/`:
@@ -454,4 +491,5 @@ That's the end of the app-author guide. Start from the smallest `index.tsx` and
454
491
  UI as you need them.
455
492
 
456
493
  To hand those procedures to an AI agent, place the bundled [Agents and Skills](agent-skills)
457
- with `vantage add skill`, and place the app map `AGENTS.md` with `vantage add agents`.
494
+ with `vantage add skill`, and place the app map `AGENTS.md` plus its per-artifact-type
495
+ knowledge files `agents/*.md` with `vantage add agents`.
@@ -43,6 +43,23 @@ export default function MonthlyAnalysis() {
43
43
  > The **export name must be `page`** in `export const page = definePage({...})`. A different name means
44
44
  > the metadata is not read.
45
45
 
46
+ ## Titles for data-file pages
47
+
48
+ A `.csv` / `.xlsx` [file page](routing#pages-that-are-not-tsx) cannot carry a `definePage`, so
49
+ its title is **derived from the file name**.
50
+
51
+ | File | `title` |
52
+ |---|---|
53
+ | `june.xlsx` | `June` |
54
+ | `sales_by_region.csv` | `Sales By Region` |
55
+ | `salesByRegion.csv` | `Sales By Region` |
56
+ | `kpi/index.csv` | `KPI` (`index` borrows its directory; an all-caps token is kept as an acronym) |
57
+ | `index.csv` at the root | none — same as a root `index.tsx` with no `definePage` |
58
+
59
+ No `navLabel` is set, so the nav shows the same string. To change it, **rename the file** — or
60
+ prefix it with `_` to stop it routing and render it from a `.tsx` page with `FilePageView`, where a
61
+ `definePage` of your own applies.
62
+
46
63
  ## Relationship to Fast Refresh
47
64
 
48
65
  Even with a non-component export like `page`, Vantage handles it internally so React Fast Refresh
@@ -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.
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
 
@@ -36,11 +36,106 @@ The "File" column below is relative to the page-scan root above.
36
36
  | `_layout.tsx` | Layout for that directory (nestable) |
37
37
  | `_404.tsx` | Not-found UI (**root only**) |
38
38
  | `_error.tsx` | Error UI (**root only**) |
39
+ | `monthly-report.slide.tsx` | `/monthly-report` (a slide deck) |
40
+ | `june-summary.doc.tsx` | `/june-summary` (a document) |
41
+ | `sales-export.csv` | `/sales-export` (drawn as a table) |
42
+ | `data/june.xlsx` | `/data/june` (same) |
39
43
 
40
44
  - `[name]` → dynamic param, `[...name]` → catchall.
41
45
  - `index` maps to its own directory (the name drops from the URL).
42
46
  - Files starting with `_` are reserved (`_layout`/`_404`/`_error`) or private (not routed).
43
47
 
48
+ ## Pages that are not `.tsx`
49
+
50
+ Routes do not come only from `.tsx` / `.jsx`. **`.csv` and `.xlsx`** become pages you can read as a
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.
53
+
54
+ ### Data files (`.csv` / `.xlsx`)
55
+
56
+ Drop `src/data/june.xlsx`, open `/data/june`, and the sheet is readable in the browser — no
57
+ download, no spreadsheet app. An `.xlsx` with several sheets gets tabs, and every file page offers
58
+ the original file for download.
59
+
60
+ It is drawn **as a spreadsheet** — column letters across the top, row numbers down the side, the
61
+ file's first row frozen as the header, ruling that runs past the data, and sheet tabs along the
62
+ bottom. It is read-only: no editing and no sorting (though a selected cell copies with
63
+ `Cmd/Ctrl+C`). Data that needs sorting or filtering belongs behind `server/api/`, rendered with
64
+ `DataTable`.
65
+
66
+ - **The title is derived from the file name** (`june.xlsx` → "June"; `index.csv` borrows its
67
+ directory). A data file cannot carry a `definePage`, so renaming the file is how you rename
68
+ the page.
69
+ - **Parsing happens in the browser.** Dev, the build output and the deployed app all run the same
70
+ code over the same bytes, which is what makes the same URL return the same thing. A file over
71
+ 25 MB shows an error on its own page (`vantage check` warns first, with `FILE_PAGE_TOO_LARGE`).
72
+ - Formulas, charts and cell formatting are not reproduced. **Readable as values** is the contract.
73
+ - Prefix a file with `_` to keep it out of routing (`_june.xlsx`). That is also how you render one
74
+ yourself: stop it routing, then use `FilePageView` from `@squadbase/vantage/table`.
75
+
76
+ > [!WARNING]
77
+ > **An extension with no viewer does not become a route.** Dropping `.xls`, `.ods` or `.tsv` does not
78
+ > even produce a 404 — the file appears in neither the nav nor `vantage routes`. The
79
+ > `UNSUPPORTED_PAGE_FILE` warning from `vantage check` is the only place that says so.
80
+
81
+ ### Slides (`.slide.tsx`)
82
+
83
+ `.slide` is a **page-kind suffix** and never reaches the URL (`src/june.slide.tsx` → `/june`). The
84
+ file itself is an ordinary React component returning a `<SlideDeck>`, so `definePage` and the nav
85
+ work exactly as they do for any other page.
86
+
87
+ ```tsx
88
+ import { definePage } from "@squadbase/vantage";
89
+ import { Slide, SlideDeck } from "@squadbase/vantage/slide";
90
+
91
+ export const page = definePage({ title: "June review", navLabel: "June" });
92
+
93
+ export default function Deck() {
94
+ return (
95
+ <SlideDeck>
96
+ <Slide>…</Slide>
97
+ <Slide>…</Slide>
98
+ </SlideDeck>
99
+ );
100
+ }
101
+ ```
102
+
103
+ Slides are authored against a fixed 1920×1080 canvas and scaled to fit. Keyboard and click
104
+ navigate, `L` toggles the slide list beside it, `F` goes fullscreen, and the toolbar exports the
105
+ deck as a pptx. See
106
+ [UI & theming](ui-and-theming).
107
+
108
+ > [!WARNING]
109
+ > Only a page module that becomes a route may carry `.slide`. `_layout.slide.tsx` and
110
+ > `deck.slide.ts` raise `INVALID_PAGE_VARIANT`. And since `june.slide.tsx` and `june.tsx` — like
111
+ > `sales.csv` and `sales.tsx` — resolve to the same URL, having both is a `ROUTE_CONFLICT`.
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
+
44
139
  ## Directories that are never routed
45
140
 
46
141
  These directories are never scanned, at any depth. Put whatever code you like here.
@@ -150,6 +245,8 @@ Each entry is a `RouteInfo`:
150
245
  | `index` | `boolean` | Whether it is a directory's index route |
151
246
  | `label` | `string` | Display name: `navLabel`, else `title`, else `path` |
152
247
  | `title` / `description` / `navLabel` | `string \| undefined` | Values from [`definePage`](pages-and-metadata) |
248
+ | `kind` | `"module" \| "file"` | What the page is drawn from; `"file"` is a `.csv` / `.xlsx` |
249
+ | `variant` | `"slide" \| "doc" \| undefined` | The page-kind suffix the file carried |
153
250
 
154
251
  `useCurrentRoute()` returns the route being rendered, or `undefined` on the 404 route. Beyond the
155
252
  "you are here" check above, it fits breadcrumbs and page headings.
@@ -191,8 +288,10 @@ setSegments((prev) => [...prev, "enterprise"]);
191
288
 
192
289
  ## HMR and route regeneration
193
290
 
194
- Adding or removing a `.tsx` page or a `server/api` file regenerates routes and triggers a full
195
- reload. Editing a page body applies in place via React Fast Refresh.
291
+ Adding or removing a `.tsx` page, a data file or a `server/api` file regenerates routes and triggers
292
+ a full reload. Editing a page body applies in place via React Fast Refresh. Editing the *contents*
293
+ of a `.csv` / `.xlsx` also triggers a full reload — it is fetched at runtime from a fixed URL, so
294
+ nothing in the module graph changes when its bytes do.
196
295
 
197
296
  ## What to read next
198
297
 
@@ -40,6 +40,108 @@ In `/components` (a selection): `PageShell`, `AppShell`, `DashboardCard`, `DataT
40
40
 
41
41
  Props and usage for every component live in the [Components](components) tab.
42
42
 
43
+ ## UI behind its own subpath
44
+
45
+ Three pieces carry heavy dependencies, so they live behind their own subpath and only reach the
46
+ apps that import them.
47
+
48
+ | Subpath | What it holds |
49
+ |---|---|
50
+ | `@squadbase/vantage/markdown` | `MarkdownRenderer` (isolated because Shiki pulls in every language grammar) |
51
+ | `@squadbase/vantage/table` | `TableViewer` / `FilePageView` (the csv/xlsx parsers, loaded dynamically) |
52
+ | `@squadbase/vantage/slide` | The slide primitives (pptx export, loaded dynamically) |
53
+
54
+ Re-exporting them from the `/components` barrel would put an import edge on every app that only
55
+ wanted `DataTable`, and a bundler cannot drop that.
56
+
57
+ ### The table viewer (`/table`)
58
+
59
+ A `.csv` or `.xlsx` under `src/` [becomes a page on its own](routing). Reach for this directly
60
+ only when you want to set the title yourself, or embed a table inside a dashboard page.
61
+
62
+ ```tsx
63
+ import { FilePageView, TableViewer, SheetGrid, loadWorkbook } from "@squadbase/vantage/table";
64
+ ```
65
+
66
+ | Name | What it does |
67
+ |---|---|
68
+ | `FilePageView` | The file page itself: give it a URL and it fetches, parses and renders |
69
+ | `TableViewer` | One sheet in a frame — fills the rest of the viewport, sheet tabs and counts along the bottom |
70
+ | `SheetGrid` | The spreadsheet grid itself. Put it in a parent with a definite height |
71
+ | `loadWorkbook` | URL → parsed sheets |
72
+
73
+ It looks **like a spreadsheet**: column letters across the top, row numbers down the side, the
74
+ file's first row frozen as the header, ruling that runs past the data. It is read-only — no
75
+ toolbar, no sorting, no pagination (a selected cell copies with `Cmd/Ctrl+C`). Sorting and
76
+ filtering are [`DataTable`](parts/data-table)'s job, not the viewer's. Colours come
77
+ from the app's theme tokens, so dark mode follows.
78
+
79
+ ### Slides (`/slide`)
80
+
81
+ A `<name>.slide.tsx` [becomes a slide-deck page](routing).
82
+
83
+ ```tsx
84
+ import {
85
+ MorphElement, Slide, SlideDeck, Step, Steps, useSlideNumber,
86
+ } from "@squadbase/vantage/slide";
87
+ ```
88
+
89
+ | Name | Role |
90
+ |---|---|
91
+ | `SlideDeck` | The deck. `theme` overrides tokens; `embedded` renders it in the page flow; `rail={false}` starts with the slide list closed |
92
+ | `Slide` | One slide. `transition` declares its enter/exit |
93
+ | `Steps` / `Step` | Stepped reveals — `→` opens one at a time |
94
+ | `MorphElement` | Carries the same object across two slides (same `id` on both) |
95
+ | `useSlideNumber` | `{ current, total }`, for a page-number footer |
96
+ | `useIsActiveSlide` | Whether this is the instance the audience is watching; gate entrance animations on it |
97
+
98
+ A reader picks one of three views — **list + slide** (the default: a thumbnail rail down the left),
99
+ **the slide alone** (`L` closes the rail and the slide fills the viewport), and **fullscreen** (`F`,
100
+ where the rail steps aside). None of them is decided in code, and the rail's state rides in
101
+ `?rail=`, so a link can hand someone either one. Only a deck that should start closed says so, with
102
+ `<SlideDeck rail={false}>`; an `embedded` deck starts closed already, having no width to spare. The
103
+ rail is painted purely from mixes of the deck's own `--slide-bg` and `--slide-fg`, so it carries no
104
+ colour of its own.
105
+
106
+ Slides are authored against a **fixed 1920×1080 canvas** in absolute pixels and scaled to fit.
107
+ Colour and type come from the `--slide-*` tokens, which default to aliases of the app's own tokens
108
+ under "Override theme tokens" below — so **a deck follows dark mode without doing anything**.
109
+
110
+ How to actually write one — the canvas's vertical budget, the type scale, the design principles
111
+ behind transitions, the rules morph rests on, and what breaks a pptx export — lives in the bundled
112
+ **`vantage-slide` skill** ([Agent skills](agent-skills)).
113
+
114
+ > [!NOTE]
115
+ > Do not use `@squadbase/vantage/ui` primitives inside a slide. The kit is built in rem against
116
+ > Tailwind for dashboards, so projecting a scaled 1920×1080 canvas leaves a `text-sm` button at an
117
+ > effective 8px — unreadable.
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
+
43
145
  ## Tailwind just works
44
146
 
45
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 の規約。",
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.",
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
  },
@@ -14,6 +14,8 @@ Vantage は **Claude Code の Agent Skills** を同梱しています。Skill
14
14
  |---|---|
15
15
  | `vantage-app` | アプリの新規作成と、`index.tsx` 単体の SPA から `server/api`・ネストレイアウト・動的ルート・404/error を備えた fullstack への拡張 |
16
16
  | `vantage-add-feature` | ページ / API / UI / ブロックの追加(`vantage add` + `check` / `routes` までの一連) |
17
+ | `vantage-slide` | `.slide.tsx` でスライドデッキを書く(1920×1080 キャンバスの縦方向の予算、タイプスケール、段階表示、トランジションとモーフ、pptx 書き出しの前提) |
18
+ | `vantage-design` | 見た目の意図 `DESIGN.md` と値を持つ `styles.css` をまとめて作る / 更新する(配色・チャートの色・書体・ブランド合わせ。URL・ロゴ・資料・外部の DESIGN.md からの取り込み、コントラストの確認) |
17
19
  | `vantage-pitfalls` | 落とし穴リファレンス(Base UI ≠ Radix、`SelectValue` の挙動、クライアントから `server/` を import しない など) |
18
20
  | `project-storage` | Squadbase の Project Storage(アップロード済みファイル)をブラウザから扱う(一覧、画像 / 動画 / PDF の埋め込み、アップロード)。Squadbase 上で動くアプリ向け |
19
21
 
@@ -41,7 +43,9 @@ Bundled skills:
41
43
  project-storage .claude/skills/project-storage/
42
44
  vantage-add-feature .claude/skills/vantage-add-feature/
43
45
  vantage-app .claude/skills/vantage-app/
46
+ vantage-design not placed
44
47
  vantage-pitfalls not placed
48
+ vantage-slide not placed
45
49
  ```
46
50
 
47
51
  `--force` を付けると、**見つかった場所をそのまま**新しい内容で書き換えます(`--dir` を明示した
@@ -58,7 +62,9 @@ your-app/
58
62
  └── skills/
59
63
  ├── vantage-app/SKILL.md
60
64
  ├── vantage-add-feature/SKILL.md
65
+ ├── vantage-design/SKILL.md (references/ と scripts/ も一緒に配られる)
61
66
  ├── vantage-pitfalls/SKILL.md
67
+ ├── vantage-slide/SKILL.md (references/ も一緒に配られる)
62
68
  └── project-storage/SKILL.md
63
69
  ```
64
70
 
@@ -79,24 +85,27 @@ Skill の手順を読み込んで実行します。他のエージェントに
79
85
  - **Squadbase テンプレートには配置済み**です。テンプレートから作ったアプリには、最初から
80
86
  `.claude/skills/` が入っています。手で作ったアプリには `vantage add skill` で足してください。
81
87
 
82
- ## `AGENTS.md`(アプリの地図)
88
+ ## `AGENTS.md` + `agents/*.md`(アプリの地図と知識ファイル)
83
89
 
84
90
  Skill が「手順書」なら、`AGENTS.md` は**エージェントが最初に読む「地図」**です。Vantage の
85
- 不変条件・import サブパスの地図・ルーティング規約・データ取得/API/env の最小レシピを 1 ページに
86
- まとめてあり、**それだけ読んで最小アプリを組める**ことを狙っています。手順の深掘りは上の Skill へ
87
- 名前で誘導し、内容は重複させません。
91
+ 不変条件・import サブパスの地図・ディレクトリ構造・env の最小レシピを 1 ページにまとめ、
92
+ 「何を書くか → どのファイルを読むか」という表で `agents/` 配下の知識ファイルへ誘導します。
93
+ `agents/page.md`(通常ページ)・`agents/api.md`(`server/`)・`agents/slide.md`
94
+ (`.slide.tsx`)・`agents/xlsx.md`・`agents/csv.md` は、それぞれの種類のファイルを書くときだけ
95
+ 読めばよい種類ごとの静的リファレンスです。手順の深掘りは上の Skill へ名前で誘導し、内容は
96
+ 重複させません。
88
97
 
89
- Skill と同じく **source-of-truth はパッケージ内**にあり、`vantage add agents` でアプリルートへ
90
- 配置します。
98
+ Skill と同じく **source-of-truth はパッケージ内**にあり、`vantage add agents` で `AGENTS.md` と
99
+ `agents/*.md` をまとめてアプリルートへ配置します。
91
100
 
92
101
  ```bash
93
- vantage add agents # AGENTS.md をアプリルートに配置
102
+ vantage add agents # AGENTS.md + agents/*.md をアプリルートに配置
94
103
  vantage add agents --force # 既存を上書き
95
104
  ```
96
105
 
97
- 配置済みの `AGENTS.md` は `vantage upgrade` で正本と同期されます(差分があるときだけ書き換え、
98
- まだ配置していないアプリには作りません)。フレームワークの規約が変わっても、**正本 1 箇所の更新**が
99
- `upgrade` でアプリへ反映されます。Squadbase テンプレートには最初から配置済みです。
106
+ 配置済みの `AGENTS.md` + `agents/*.md` は `vantage upgrade` で正本と同期されます(差分がある
107
+ ファイルだけ書き換え、まだ配置していないアプリには作りません)。フレームワークの規約が変わっても、
108
+ **正本の更新**が `upgrade` でアプリへ反映されます。Squadbase テンプレートには最初から配置済みです。
100
109
 
101
110
  ## 責務の切り分け
102
111
 
@@ -106,6 +115,7 @@ Skill は「**手順を伴うワークフロー**」だけを担います。次
106
115
  エージェントには、同じ内容が [`vantage docs`](cli-reference) でそのまま読めます
107
116
  (`vantage docs button` で props の表、`vantage docs --json` で機械可読。名前が
108
117
  分からなければ `vantage search <やりたいこと>`)。
109
- - **`AGENTS.md`**(静的な地図)― 構成やファイルの居場所。`vantage add agents` で配置します。
118
+ - **`AGENTS.md`**(静的な地図)― 構成やファイルの居場所。`agents/*.md`(種類ごとの静的
119
+ リファレンス)と合わせて `vantage add agents` で配置します。
110
120
  - Skill 同士 ― 落とし穴などの共通内容は各 Skill に写経せず、**名前で相互参照**します
111
121
  (例: `vantage-app` の手順中から `vantage-pitfalls` を指す)。