@lism-css/mcp 0.27.0 → 0.28.1

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.
package/README.ja.md CHANGED
@@ -9,7 +9,7 @@ AIツール(Claude Code, Cursor 等)が、インストールされている
9
9
 
10
10
  | ツール | 説明 |
11
11
  |--------|------|
12
- | `get_overview` | フレームワークの全体像(アーキテクチャ、設計思想、パッケージ構成、ブレークポイント、CSS Layers、実装ルール) |
12
+ | `get_overview` | フレームワークの全体像(基本ルール、何を書く前にどの資料を引くか、目的別のPrimitive/コンポーネント選定、クラス一覧、CSS Layers、ブレークポイント) |
13
13
  | `get_tokens` | デザイントークン(色、余白、フォントサイズ、影、角丸など)のリファレンス全文を取得 |
14
14
  | `get_props_system` | Propsシステム対応表 — React/Astro のpropsがCSSクラス・スタイルにどう変換されるか。CSSプロパティ名での逆引き(例: `padding` → `p`)や Property Class 記法(`-g:5` 等)にも対応 |
15
15
  | `get_component` | コンポーネント詳細(props、使用例、サブコンポーネント構成)。パッケージ(`lism-css` / `@lism-css/ui`)での絞り込みも可能 |
package/README.md CHANGED
@@ -9,7 +9,7 @@ Enables AI tools (Claude Code, Cursor, etc.) to accurately reference Lism CSS do
9
9
 
10
10
  | Tool | Description |
11
11
  |------|-------------|
12
- | `get_overview` | Framework overview (architecture, design philosophy, packages, breakpoints, CSS layers, implementation rules) |
12
+ | `get_overview` | Framework overview (core rules, which reference to look up before writing what, primitive/component selection by goal, class inventory, CSS layers, breakpoints) |
13
13
  | `get_tokens` | Get the full design token reference (colors, spacing, font sizes, shadows, radii, etc.) |
14
14
  | `get_props_system` | Props system reference — how React/Astro props map to CSS classes and styles. Supports reverse lookup by CSS property name (e.g. `padding` → `p`) and Property Class notation (e.g. `-g:5`) |
15
15
  | `get_component` | Component details (props, usage examples, sub-component structure). Optionally filter by package (`lism-css` or `@lism-css/ui`) |
@@ -150,7 +150,7 @@
150
150
  "max-",
151
151
  "min-"
152
152
  ],
153
- "snippet": "Lism CSS の命名規則をまとめたページ。CSS変数はトークン変数 `--{prop}--{token}`、Property Class 用変数 `--{prop}` / `--{prop}_{bp}`、状態管理用の内部変数 `--_{varName}` などの形式で統一。クラスはプレフィックス(`b--`, `c--`, `a--`, `l--`, `is--`, `set--`, `u--`)で分類を示し、続く名称は camelCase。Prop 名は Emmet を参考に 1 文字プロパティ(p, m, g, c, f, w, h, d, o, v, i, t, b, l, r, z)やグループ略称 + サブプロパティ形式(fz, bgc, gtc 等)で省略。方向サフィックスは `-t` / `-b` / `-l` / `-r` / `-x` / `-y` / `-s` / `-e` を使用し、p/m のみ最初のハイフンを省略(pt, px, my 等)。値は基本的に CSS の実値をそのまま使用し、トークン値を使う場合は `--{prop}--{value}` の `{value}` 部分を採用。"
153
+ "snippet": "Lism CSS の命名規則をまとめたページ。CSS変数はトークン変数 `--{prop}--{token}`、Property Class 用変数 `--{prop}` / `--{prop}_{bp}`、上書きを想定しない内部処理用の変数・状態判定用の変数 `--_{varName}` などの形式で統一。クラスはプレフィックス(`b--`, `c--`, `a--`, `l--`, `is--`, `set--`, `u--`)で分類を示し、続く名称は camelCase。Prop 名は Emmet を参考に 1 文字プロパティ(p, m, g, c, f, w, h, d, o, v, i, t, b, l, r, z)やグループ略称 + サブプロパティ形式(fz, bgc, gtc 等)で省略。方向サフィックスは `-t` / `-b` / `-l` / `-r` / `-x` / `-y` / `-s` / `-e` を使用し、p/m のみ最初のハイフンを省略(pt, px, my 等)。値は基本的に CSS の実値をそのまま使用し、トークン値を使う場合は `--{prop}--{value}` の `{value}` 部分を採用。"
154
154
  },
155
155
  {
156
156
  "sourcePath": "tokens.mdx",
@@ -173,7 +173,7 @@
173
173
  "--s-unit",
174
174
  "typography"
175
175
  ],
176
- "snippet": "デザイントークンの一覧ページ。COLOR, Typography, RADIUS, SHADOW, SPACE, OPACITY, SIZE トークンを掲載。SPACEはフィボナッチ数列ベースの余白スケール --s5〜--s80(s25/s35 を含む12段階)で、--s-unit(デフォルト 0.5rem ≒ 8px)を基準単位として算出。SHADOWは --bxsh--10〜--bxsh--50(5段階)、OPACITYは音楽強弱記号に由来するセマンティック命名(mp/p/pp/ppp)を採用。カラー・タイポグラフィは個別ページでも詳細を解説。"
176
+ "snippet": "デザイントークンの一覧ページ。COLOR, Typography, RADIUS, SHADOW, SPACE, OPACITY, SIZE トークンを掲載。SPACEはフィボナッチ数列ベースの余白スケール --s5〜--s70(s25/s35/s45 を含む12段階)で、--s-unit(デフォルト 0.5rem ≒ 8px)を基準単位として算出。SHADOWは --bxsh--10〜--bxsh--50(5段階)、OPACITYは音楽強弱記号に由来するセマンティック命名(mp/p/pp/ppp)を採用。カラー・タイポグラフィは個別ページでも詳細を解説。"
177
177
  },
178
178
  {
179
179
  "sourcePath": "tokens/colors.mdx",
@@ -462,7 +462,7 @@
462
462
  "full_no_layer.css",
463
463
  "!important"
464
464
  ],
465
- "snippet": "lism-css パッケージに同梱された複数のビルド済みCSSの使い分けを解説。main.css(標準)/ main_no_layer.css(@layerなし)/ full.css(全部入り、purge前提)/ full_no_layer.css から選択可能。@layer なし版は既存サイト・WordPress テーマなどカスケードを制御できない環境向けで、Property Class は常に !important 付き、u--trim / u--trimAll / u--cbox / u--divide / u--enclose はセレクタ二重化(.u--trim.u--trim = 0-2-0)で出力され「Property Class > Utility Class > 単一クラス」の序列を再現する(lism.config.js の defaultImportant: false・$default_important: 0・props の個別 important: 0 でも !important は外れない)。full.css には main.css 非収録の Property Class ブレイクポイント対応クラス(isVar 系・border ショートハンド系を除く。border は bds / bdc のサブプロパティで BP 対応)と、カラー系 Property Class(bgc / c / bdc)の全カラートークン分のクラス(-bgc:red など。main.css は厳選したセマンティックカラーと keycolor のみ)を含む。スペーシング系(padding / margin / gap)のトークンユーティリティは main.css に収録済み。コンポーネント出力も full.css に合わせるには lism.config.js の isFullMode を使う(詳細は customize/config.mdx)。"
465
+ "snippet": "lism-css パッケージに同梱された複数のビルド済みCSSの使い分けを解説。main.css(標準)/ main_no_layer.css(@layerなし)/ full.css(全部入り、purge前提)/ full_no_layer.css から選択可能。@layer なし版は既存サイト・WordPress テーマなどカスケードを制御できない環境向けで、Property Class は常に !important 付き、u--trim / u--trimAll / u--cbox はセレクタ二重化(.u--trim.u--trim = 0-2-0)で出力され「Property Class > Utility Class > 単一クラス」の序列を再現する(lism.config.js の defaultImportant: false・$default_important: 0・props の個別 important: 0 でも !important は外れない)。full.css には main.css 非収録の Property Class ブレイクポイント対応クラス(isVar 系・border ショートハンド系を除く。border は bds / bdc のサブプロパティで BP 対応)と、カラー系 Property Class(bgc / c / bdc)の全カラートークン分のクラス(-bgc:red など。main.css は厳選したセマンティックカラーと keycolor のみ)を含む。スペーシング系(padding / margin / gap)のトークンユーティリティは main.css に収録済み。コンポーネント出力も full.css に合わせるには lism.config.js の isFullMode を使う(詳細は customize/config.mdx)。"
466
466
  },
467
467
  {
468
468
  "sourcePath": "customize/config.mdx",
@@ -561,7 +561,7 @@
561
561
  "title": "Utility Class",
562
562
  "description": "スタイルや装飾をまとめて適用できる Lism CSS のユーティリティクラスについて解説します。",
563
563
  "category": "guide",
564
- "headings": ["u--cbox", "u--trim & u--trimAll", "u--srOnly", "u--divide & u--enclose", "u--clipText", "Opt-in", "u--inlineCenter"],
564
+ "headings": ["u--cbox", "u--trim & u--trimAll", "u--srOnly", "u--clipText", "Opt-in", "u--inlineCenter", "u--divide / u--enclose"],
565
565
  "keywords": [
566
566
  "utility",
567
567
  "ユーティリティ",
@@ -576,7 +576,7 @@
576
576
  "u--clipText",
577
577
  "u--inlineCenter"
578
578
  ],
579
- "snippet": "用途が明確な装飾・機能をまとめてセットするユーティリティクラス (.u--{style}) の一覧。u--cbox(keycolorベースの色自動生成), u--trim/u--trimAll(ハーフレディング余白調整), u--srOnly(スクリーンリーダー専用), u--divide/u--enclose(区切り線・セル枠), u--clipText(テキストで背景クリッピング)等を解説。Opt-inとして u--inlineCenter(絵文字・インラインアイコン中央揃え)の作成例も紹介。"
579
+ "snippet": "用途が明確な装飾・機能をまとめてセットするユーティリティクラス (.u--{style}) の一覧。u--cbox(keycolorベースの色自動生成), u--trim/u--trimAll(ハーフレディング余白調整), u--srOnly(スクリーンリーダー専用), u--clipText(テキストで背景クリッピング)を解説。Opt-in(コア外・追加CSS例)として u--inlineCenter(絵文字・インラインアイコン中央揃え)と u--divide/u--enclose(区切り線・セル枠)も紹介。"
580
580
  },
581
581
  {
582
582
  "sourcePath": "set-class.mdx",
@@ -1676,10 +1676,10 @@
1676
1676
  "Markup",
1677
1677
  "Examples",
1678
1678
  "チェックマークのリスト(b--list--check)",
1679
- "アイコンを差し替える(--_icon-c / --_icon-img)"
1679
+ "アイコンを差し替える(--icon-c / --icon-img)"
1680
1680
  ],
1681
1681
  "keywords": ["List", "b--list", "リスト", "箇条書き", "アイコン", "チェックマーク", "checklist"],
1682
- "snippet": "行頭にアイコンを表示する装飾リストUIの実装例。primitivesと少量のCSS(b--list)で構成し、CSSをlism-blockレイヤーへコピーして利用。b--list--checkでチェックマークに切り替え、--_icon-c / --_icon-imgでアイコンの色・画像を変更できる。"
1682
+ "snippet": "行頭にアイコンを表示する装飾リストUIの実装例。primitivesと少量のCSS(b--list)で構成し、CSSをlism-blockレイヤーへコピーして利用。b--list--checkでチェックマークに切り替え、--icon-c / --icon-imgでアイコンの色・画像を変更できる。"
1683
1683
  },
1684
1684
  {
1685
1685
  "sourcePath": "ui/components/Others.mdx",
@@ -1811,12 +1811,12 @@
1811
1811
  },
1812
1812
  {
1813
1813
  "sourcePath": "utility-class.mdx",
1814
- "title": "u--divide & u--enclose",
1815
- "description": "グリッド・フレックス子要素間の区切り線・セル枠を表示するユーティリティクラス。",
1814
+ "title": "u--divide / u--enclose(Opt-in)",
1815
+ "description": "グリッド・フレックス子要素間の区切り線・セル枠を表示する、コア外(Opt-in)のユーティリティクラス例。",
1816
1816
  "category": "guide",
1817
- "headings": ["u--divide & u--enclose"],
1818
- "keywords": ["u--divide", "u--enclose", "グリッド区切り", "ボーダー", "テーブル風", "カレンダー", "box-shadow"],
1819
- "snippet": "u--divide は子要素間にのみ区切り線を表示(外周なし)。u--enclose は各セルを枠で囲む(table セル/カレンダー風)。どちらも box-shadow で実装。"
1817
+ "headings": ["u--divide / u--enclose"],
1818
+ "keywords": ["u--divide", "u--enclose", "opt-in", "グリッド区切り", "ボーダー", "テーブル風", "カレンダー", "box-shadow"],
1819
+ "snippet": "コアには含まれない追加CSSの例。@layer lism-utility に追加して使う(@layer なし版のビルドでは @layer で囲まず .u--divide.u--divide のようにセレクタを二重化する)。u--divide は子要素間にのみ区切り線を表示(外周なし)、u--enclose は各セルを枠で囲む。gap と子要素の box-shadow で実装するため border より描画が粗く、並び方向が切り替わるレイアウトでは bdw のブレイクポイント切り替えを推奨。"
1820
1820
  },
1821
1821
  {
1822
1822
  "sourcePath": "trait-class.mdx",
@@ -1893,11 +1893,11 @@
1893
1893
  {
1894
1894
  "sourcePath": "set-class.mdx",
1895
1895
  "title": "set--s",
1896
- "description": "余白トークン(--s5〜--s80)を現在のフォントサイズ基準で再計算するSetクラス。",
1896
+ "description": "余白トークン(--s5〜--s70)を現在のフォントサイズ基準で再計算するSetクラス。",
1897
1897
  "category": "guide",
1898
1898
  "headings": ["set--s"],
1899
1899
  "keywords": ["set--s", "余白", "フォントサイズ", "--s-unit", "spacing", "スペーシング", "em", "ボタン", "バッジ"],
1900
- "snippet": "set--s クラスを使うと --s-unit が 0.5em に切り替わり、--s10〜--s80 がフォントサイズ基準で再計算される。Button や Badge など、内部余白を要素自身の font-size に追従させたい部品で活用。"
1900
+ "snippet": "set--s クラスを使うと --s-unit が 0.5em に切り替わり、--s10〜--s70 がフォントサイズ基準で再計算される。Button や Badge など、内部余白を要素自身の font-size に追従させたい部品で活用。"
1901
1901
  },
1902
1902
  {
1903
1903
  "sourcePath": "set-class.mdx",
@@ -9,7 +9,7 @@ Lism CSSでUI・ページ・コンポーネントを実装する時の判断の
9
9
 
10
10
  公式ドキュメント: https://lism-css.com/docs/overview.md
11
11
 
12
- **バージョン:** `lism-css@0.27.0`/`@lism-css/ui@0.27.0`時点の情報。プロジェクトのバージョンが異なる場合はユーザーに伝え、パッケージ更新またはこのスキルの更新を案内する。
12
+ **バージョン:** `lism-css@0.28.0`/`@lism-css/ui@0.28.0`時点の情報。プロジェクトのバージョンが異なる場合はユーザーに伝え、パッケージ更新またはこのスキルの更新を案内する。
13
13
 
14
14
  ## 実装フロー(厳守)
15
15
 
@@ -124,8 +124,8 @@ Lism CSS側が用意しているトークン値と異なるものを書かない
124
124
  | --- | --- | --- |
125
125
  | `p="8"` | `p="10"` | スペーストークンは離散値のみ。tailwindのような4の倍数で連続するスケールではない |
126
126
  | `g="6"` | `g="5"` | 同上 |
127
- | `m="45"`, `m="55"` | `m="40"` or `m="50"` | `40` 以降の中間値は用意されていない(前半は `5/15/25/35` まで補完済み) |
128
- | `m="100"` | `m="80"` | 上限は `80`(ユーザーが追加定義している可能性はある) |
127
+ | `m="55"`, `m="65"` | `m="50"` or `m="60"` | `50` 以降の中間値は用意されていない(5 刻みは `45` まで) |
128
+ | `m="100"` | `m="70"` | 上限は `70`(ユーザーが追加定義している可能性はある) |
129
129
 
130
130
  ### フォントサイズ(`fz`)
131
131
 
@@ -223,7 +223,7 @@ HTML の `details/summary` 要素をラップしたコンポーネント。Accor
223
223
  | --- | --- | --- | --- | --- |
224
224
  | `hovBgc` | Root | `string` | — | ホバー時の背景カラー。`--hov-bgc` 変数として出力 |
225
225
  | `hovC` | Root | `string` | — | ホバー時のテキストカラー。`--hov-c` 変数として出力 |
226
- | `itemP` | Root | `string` | — | 各アイテムのパディング。`--_item-p` 変数として出力 |
226
+ | `itemP` | Root | `string` | — | 各アイテムのパディング。`--item-p` 変数として出力 |
227
227
  | `href` | Link | `string` | — | リンク先URL(Link は常に `a` 要素として出力) |
228
228
  | `hov` | Link | `string` | `-bgc` | ホバー時のスタイル。デフォルトで背景色が変化 |
229
229
 
@@ -342,8 +342,8 @@ HTML の `details/summary` 要素をラップしたコンポーネント。Accor
342
342
  | `viewBox` | `string` | — | SVG の viewBox |
343
343
  | `level` | `number` | `5` | シェイプの高さレベル。`0` で非表示 |
344
344
  | `flip` | `'X' \| 'Y' \| 'XY'` | — | 反転方向。`data-flip` 属性として出力 |
345
- | `stretch` | `string` | — | 水平方向の引き伸ばし量。`--_inner-stretch` 変数として出力 |
346
- | `offset` | `string` | — | 水平方向のオフセット。`--_inner-offset` 変数として出力 |
345
+ | `stretch` | `string` | — | 水平方向の引き伸ばし量。`--inner-stretch` 変数として出力 |
346
+ | `offset` | `string` | — | 水平方向のオフセット。`--inner-offset` 変数として出力 |
347
347
  | `isEmpty` | `boolean` | — | シェイプを非表示にしてスペーサーとして使用 |
348
348
  | `isAnimation` | `boolean` | — | アニメーションを有効化。`data-has-animation` 属性として出力 |
349
349
 
@@ -56,7 +56,7 @@ Lism CSSで定義されるクラスは、その役割とレイヤーの所属が
56
56
  | Custom Class | Lism 本体に含まれない、ユーザーが自由に定義するカスタムクラス | `c--` | `c--featureList`, `c--header` |
57
57
  | `is--` Trait | 要素に役割(〜である)を宣言 | `is--` | `is--container`, `is--wrapper`, `is--layer`, `is--boxLink` |
58
58
  | `has--` Trait | 要素に機能(〜を持つ)を付与 | `has--` | `has--transition`, `has--gutter`, `has--snap`, `has--mask` |
59
- | Utility Class | 用途が明確な装飾系ユーティリティ | `u--` | `u--cbox`, `u--trim`, `u--divide`, `u--enclose` |
59
+ | Utility Class | 用途が明確な装飾系ユーティリティ | `u--` | `u--cbox`, `u--trim`, `u--trimAll`, `u--clipText` |
60
60
  | Property Class | 単一プロパティの制御 | `-` | `-fz:l`, `-p:20`, `-d:none` |
61
61
 
62
62
  **併用ルール:**
@@ -22,7 +22,7 @@
22
22
  ## `@layer` をオフにする
23
23
 
24
24
  `lism-css/main.css` の代わりに `lism-css/main_no_layer.css` を読み込むだけで、`@layer` を使わない CSS に切り替えられます。
25
- no-layer版は既存サイトや WordPress テーマなど、カスケードを制御できない環境向けです。レイヤーの代わりに、Property Class は常に `!important` 付き、`u--trim` / `u--trimAll` / `u--cbox` / `u--divide` / `u--enclose` はセレクタ二重化(`.u--trim.u--trim` = 0-2-0)で出力され、「Property Class > Utility Class > 単一クラス」の序列を再現します。`lism.config.js` の `defaultImportant: false`・`$default_important: 0`・`props` の個別 `important: 0` を指定しても `!important` は外れません。`b--` など上記以外のクラス同士の優先度は読み込み順・詳細度に依存します。
25
+ no-layer版は既存サイトや WordPress テーマなど、カスケードを制御できない環境向けです。レイヤーの代わりに、Property Class は常に `!important` 付き、`u--trim` / `u--trimAll` / `u--cbox` はセレクタ二重化(`.u--trim.u--trim` = 0-2-0)で出力され、「Property Class > Utility Class > 単一クラス」の序列を再現します。`lism.config.js` の `defaultImportant: false`・`$default_important: 0`・`props` の個別 `important: 0` を指定しても `!important` は外れません。`b--` など上記以外のクラス同士の優先度は読み込み順・詳細度に依存します。
26
26
 
27
27
  ```js
28
28
  // 通常
@@ -45,10 +45,14 @@
45
45
 
46
46
  | 形式 | 用途 | 例 |
47
47
  | --- | --- | --- |
48
- | `--{target}-{prop}` | 要素・クラスに対するプロパティ(`:root`で上書き可) | `--link-td`, `--headings-ff` |
48
+ | `--{target}-{prop}` | 特定のセレクタを起点に、子要素へ設定するプロパティ | `--link-td`, `--headings-ff`, `--icon-size` |
49
49
  | `--{propName}` | クラス自身の主要機能を制御する変数。要素側で値が初期化され、`:root` からは初期値の定義ができないもの | `--sideW`, `--mainW` |
50
- | `--_{item}-{propName}` | `c--` の子要素プロパティ | `--_icon-size` |
51
- | `--_{varName}` | 状態管理用の内部変数 | `--_isHov`, `--_notHov` |
50
+ | `--_{varName}` | 上書きを想定しない内部処理用の変数・状態判定用の変数 | `--_panelH`、`--_flipX`、`--_isHov` |
51
+
52
+ `--{target}-{prop}`は、`:root`を起点にする場合も、`.b--*`や`.c--*`を起点にする場合も同じ形式です。`:root`以外を起点にする変数は、次のルールで外部からの影響を閉じます。
53
+
54
+ - 起点のセレクタで必ず初期値をセットする(例: `.b--list { --icon-size: 1em; }`)。祖先や他のコンポーネントから同名の値を継承しないため。
55
+ - 値を変えるときは`:root`ではなく、起点の要素にインラインstyleやpropsで指定する。
52
56
 
53
57
  ## クラスの命名規則
54
58
 
@@ -153,7 +153,7 @@
153
153
  | `pt` | `padding-top` | `-pt:5`, `-pt:10`, `-pt:20`, ... (SPACEトークン) | ✔ |
154
154
  | `pb` | `padding-bottom` | `-pb:5`, `-pb:10`, `-pb:20`, ... (SPACEトークン) | ✔ |
155
155
 
156
- SPACEトークンの全値(`5`〜`80`の離散値)は [tokens.md の余白 (space)](../tokens.md#余白-space) を参照。
156
+ SPACEトークンの全値(`5`〜`70`の離散値)は [tokens.md の余白 (space)](../tokens.md#余白-space) を参照。
157
157
 
158
158
  ### 余白 — Margin
159
159
 
@@ -31,6 +31,7 @@ hover 時の挙動を制御する Property Class。`:hover` 擬似クラスで
31
31
  | `-hov:-bgc` | `background-color` | `var(--hov-bgc, var(--hov-bgc--default, color-mix(in srgb, var(--bgc, var(--base)), var(--neutral) 25%)))` |
32
32
  | `-hov:-o` | `opacity` | `var(--hov-o, var(--o--p))` |
33
33
  | `-hov:-bxsh` | `box-shadow` | `var(--hov-bxsh, var(--bxsh--50))` |
34
+ | `-hov:-transform` | `transform` | `var(--hov-transform, translate(0, -4px))` |
34
35
 
35
36
  任意の値へ変化させたい場合は、`--hov-{prop}` 変数で値を指定する。
36
37
 
@@ -107,7 +107,7 @@ Lism CSS のボーダーは CSS 変数(`--bds` / `--bdw` / `--bdc`)で管理
107
107
  | `-hov:{preset}` | hover 時のスタイルをプリセットで適用 | `:hover`(同上) |
108
108
  | `-hov:in:{preset}` | 親の `set--hov` を起点に子のスタイルを変化させる | 親に `set--hov` が必要 |
109
109
 
110
- **標準クラス:** `-hov:-c`, `-hov:-bgc`, `-hov:-bdc`, `-hov:-o`, `-hov:-bxsh`, `-hov:underline`, `-hov:in:hide`, `-hov:in:show`, `-hov:in:zoom`
110
+ **標準クラス:** `-hov:-c`, `-hov:-bgc`, `-hov:-bdc`, `-hov:-o`, `-hov:-bxsh`, `-hov:-transform`, `-hov:underline`, `-hov:in:hide`, `-hov:in:show`, `-hov:in:zoom`
111
111
 
112
112
  **`<Lism>` の `hov` prop:** 文字列指定(`hov="-c"` → `-hov:-c`。自動変換なし、カンマ区切りで複数可)とオブジェクト指定(`hov={{ c: 'red' }}` → `-hov:-c` + `--hov-c: var(--red)`。値 `true` でクラスのみ出力)が可能。
113
113
 
@@ -1,6 +1,6 @@
1
1
  # ページ定番セクションの構成例
2
2
 
3
- ヒーロー・サイトヘッダー・フッターなど、ページの定番セクションを`Group`/`Wrapper`/`Stack`+Propsで組む時の出発点です。ここにある構成をベースにし、実際の値は値・トークン照合(C5)を通してから確定します。
3
+ ヒーロー・サイトヘッダー・フッターなど、ページの定番セクションを`Group`/`Wrapper`/`Stack`+Propsで組む時の出発点です。ここにある構成をベースにし、実際の値は`tokens.md`のトークンと照合してから確定します。
4
4
 
5
5
  共通の考え方:
6
6
 
@@ -40,7 +40,7 @@ import { Group, Wrapper, Cluster, Link } from 'lism-css/astro';
40
40
  ```jsx
41
41
  import { Group, Wrapper, Stack, Cluster, Heading, Text } from 'lism-css/astro';
42
42
 
43
- <Group as="section" className="c--frontHero" bgc="base-2" py={['60', null, '80']} hasGutter isContainer>
43
+ <Group as="section" className="c--frontHero" bgc="base-2" py={['60', null, '70']} hasGutter isContainer>
44
44
  <Wrapper contentSize="l">
45
45
  <Stack g="30" ai="center" ta="center">
46
46
  <Heading level="1" fz={['3xl', null, '5xl']}>キャッチコピー</Heading>
@@ -94,6 +94,6 @@ import { Group, Wrapper, Stack, Heading, Columns } from 'lism-css/astro';
94
94
 
95
95
  ## 使う前の確認
96
96
 
97
- - 使うPrimitive/Traitの詳細ファイル(`primitives/l--*.md`・`trait-class/*.md`)を、`SKILL.md`の資料確認トリガーに従って読む。
97
+ - 使うPrimitive/Traitの詳細ファイル(`primitives/*.md`・`trait-class/*.md`)で、既定のスタイル・Props・CSS変数を確認する。
98
98
  - レスポンシブ値(配列・オブジェクト指定)を使う場合は、祖先の`isContainer`または`@media`運用の確認が必要([`responsive.md`](../responsive.md))。
99
- - ここに書いた値はすべて例。実際のデザイン値は`tokens.md`との照合(C5)とトークン差分表を通す。
99
+ - ここに書いた値はすべて例。実際のデザイン値を`tokens.md`と照合し、使うトークンを決める。
@@ -191,7 +191,7 @@ Lism CSSでは、クラスを持つリスト(`ul` / `ol`)ではスタイル
191
191
 
192
192
  ## `set--s`
193
193
 
194
- 余白トークン(`--s5`〜`--s80`)を現在のフォントサイズ基準で再計算するためのクラスです。ButtonやBadgeなど、内部余白を要素自身のfont-sizeに追従させたい時に利用します。
194
+ 余白トークン(`--s5`〜`--s70`)を現在のフォントサイズ基準で再計算するためのクラスです。ButtonやBadgeなど、内部余白を要素自身のfont-sizeに追従させたい時に利用します。
195
195
 
196
196
  詳細なスケールと使い方は[tokens.mdの`set--s`ユーティリティ](./tokens.md#set--s-ユーティリティ)を参照してください。
197
197
 
@@ -30,7 +30,7 @@ CSSコードを書く場合やコンポーネントのPropsに値を指定する
30
30
 
31
31
  | カテゴリ | トークン値 | CSS変数パターン | 例 |
32
32
  | --- | --- | --- | --- |
33
- | 余白 (space) | `5`, `10`, `15`, `20`, `25`, `30`, `35`, `40`, `50`, `60`, `70`, `80` | `--s{N}` | `--s20` |
33
+ | 余白 (space) | `5`, `10`, `15`, `20`, `25`, `30`, `35`, `40`, `45`, `50`, `60`, `70` | `--s{N}` | `--s20` |
34
34
  | フォントサイズ (fz) | `base`, `2xs`, `xs`, `s`, `m`, `l`, `xl`, `2xl`, `3xl`, `4xl`, `5xl` | `--fz--{key}` | `--fz--l` |
35
35
  | ハーフレディング (hl) | `base`, `xs`, `s`, `l`, `xl` | `--hl--{key}` | `--hl--s` |
36
36
  | 行間比率 (lh) | `xs`, `s`, `m`, `l`, `xl` | `--lh--{key}` | `--lh--m` |
@@ -64,16 +64,16 @@ CSSコードを書く場合やコンポーネントのPropsに値を指定する
64
64
  | `--s30` | `calc(var(--s-unit) * 3)` | ≒ 24px |
65
65
  | `--s35` | `calc(var(--s-unit) * 4)` | ≒ 32px |
66
66
  | `--s40` | `calc(var(--s-unit) * 5)` | ≒ 40px |
67
+ | `--s45` | `calc(var(--s-unit) * 6.5)` | ≒ 52px |
67
68
  | `--s50` | `calc(var(--s-unit) * 8)` | ≒ 64px |
68
69
  | `--s60` | `calc(var(--s-unit) * 13)` | ≒ 104px |
69
70
  | `--s70` | `calc(var(--s-unit) * 21)` | ≒ 168px |
70
- | `--s80` | `calc(var(--s-unit) * 34)` | ≒ 272px |
71
71
 
72
- `--s40` 以降の主軸は係数 `1, 2, 3, 5, 8, 13, 21, 34`(フィボナッチ数列)に基づく。`--s5`〜`--s35` の前半部分は、主軸トークン間を補う中間値(4px / 12px / 20px / 32px 相当)として配置している。`--s-unit` を上書きするとスケール全体を比例的に調整できる。`--fz--base` を流体値にしていて余白も連動させたい場合は、`:root` で `--s-unit: calc(var(--fz--base) * 0.5)` に上書きする。
72
+ 10 刻みの主軸は係数 `1, 2, 3, 5, 8, 13, 21`(フィボナッチ数列)に基づき、タイポグラフィの縦のリズムを作る。5 刻み(`--s5`〜`--s45`)は主軸トークン間のちょうど中間値(4px / 12px / 20px / 32px / 52px 相当)で、縦のリズムに縛られない水平方向の gap / padding 用。中間値は `50` まで。`--s-unit` を上書きするとスケール全体を比例的に調整できる。`--fz--base` を流体値にしていて余白も連動させたい場合は、`:root` で `--s-unit: calc(var(--fz--base) * 0.5)` に上書きする。
73
73
 
74
74
  ### `set--s` ユーティリティ
75
75
 
76
- `set--s` クラスを当てた要素のスコープ内では `--s-unit` が `0.5em` に切り替わり、`--s10`〜`--s80` が現在のフォントサイズ基準で再計算される。Button / Badge / インライン要素など、内部余白をフォントサイズに追従させたい部品で使う。
76
+ `set--s` クラスを当てた要素のスコープ内では `--s-unit` が `0.5em` に切り替わり、`--s10`〜`--s70` が現在のフォントサイズ基準で再計算される。Button / Badge / インライン要素など、内部余白をフォントサイズに追従させたい部品で使う。
77
77
 
78
78
  ```html
79
79
  <!-- ボタンの padding が button 自身の font-size に追従する -->
@@ -139,11 +139,13 @@ CSSコードを書く場合やコンポーネントのPropsに値を指定する
139
139
 
140
140
  | CSS変数 | 値 | 説明 |
141
141
  | --- | --- | --- |
142
- | `--lts--base` | `normal` | 基本の文字間隔 |
143
- | `--lts--xs` | `-0.05em` | より狭い文字間隔 |
144
- | `--lts--s` | `-0.025em` | 狭めの文字間隔 |
145
- | `--lts--l` | `0.05em` | 広めの文字間隔 |
146
- | `--lts--xl` | `0.1em` | より広い文字間隔 |
142
+ | `--lts--base` | `0em` | 基本の文字間隔。長さで指定(`normal` 不可) |
143
+ | `--lts--xs` | `calc(var(--lts--base) - 0.05em)` | より狭い文字間隔 |
144
+ | `--lts--s` | `calc(var(--lts--base) - 0.025em)` | 狭めの文字間隔 |
145
+ | `--lts--l` | `calc(var(--lts--base) + 0.05em)` | 広めの文字間隔 |
146
+ | `--lts--xl` | `calc(var(--lts--base) + 0.1em)` | より広い文字間隔 |
147
+
148
+ `xs`〜`xl` は `--lts--base` からの相対値。`:root` で `--lts--base` を変えると全体が連動する(子孫要素での上書きは `xs`〜`xl` に伝わらない)。
147
149
 
148
150
 
149
151
  ## フォント (ff)
@@ -29,8 +29,6 @@ Lism コンポーネントでの `util` prop による指定方法は [component
29
29
  | `u--trim` | ハーフレディングのネガティブマージンでテキスト上下の余白を詰める | [`_trim.scss`](https://raw.githubusercontent.com/lism-css/lism-css/main/packages/lism-css/src/scss/utility/_trim.scss) |
30
30
  | `u--trimAll` | 直下の子要素(`:empty`, `figure`, `picture`, `video`, `button`, `textarea`, `table` を除く)にハーフレディングトリムを一括適用する除外方式のクラス | [`_trim.scss`](https://raw.githubusercontent.com/lism-css/lism-css/main/packages/lism-css/src/scss/utility/_trim.scss) |
31
31
  | `u--cbox` | `--keycolor` を使い `color-mix()` で `--c` / `--bgc` / `--bdc` を自動生成する色付きボックス | [`_cbox.scss`](https://raw.githubusercontent.com/lism-css/lism-css/main/packages/lism-css/src/scss/utility/_cbox.scss) |
32
- | `u--divide` | Grid / Flex の子要素**間**にのみ `box-shadow` で区切り線を表示する | [`_divide.scss`](https://raw.githubusercontent.com/lism-css/lism-css/main/packages/lism-css/src/scss/utility/_divide.scss) |
33
- | `u--enclose` | Grid / Flex の各子要素を `box-shadow` で枠囲みし、table セル風に表示する | [`_divide.scss`](https://raw.githubusercontent.com/lism-css/lism-css/main/packages/lism-css/src/scss/utility/_divide.scss) |
34
32
  | `u--srOnly` | スクリーンリーダー専用(視覚的に非表示)。`clip-path: inset(50%)` で実装 | [`_srOnly.scss`](https://raw.githubusercontent.com/lism-css/lism-css/main/packages/lism-css/src/scss/utility/_srOnly.scss) |
35
33
  | `u--clipText` | テキストで背景をクリッピング(`background-clip: text`) | [`_clipText.scss`](https://raw.githubusercontent.com/lism-css/lism-css/main/packages/lism-css/src/scss/utility/_clipText.scss) |
36
34
 
@@ -43,19 +41,12 @@ Lism コンポーネントでの `util` prop による指定方法は [component
43
41
 
44
42
  <!-- u--trim: テキスト余白の詰め -->
45
43
  <p class="u--trim">テキスト...</p>
46
-
47
- <!-- u--divide: グリッド子要素間の区切り線 -->
48
- <div class="l--grid u--divide" style="--gtc: 1fr 1fr">
49
- <div>A</div>
50
- <div>B</div>
51
- </div>
52
44
  ```
53
45
 
54
46
  ```jsx
55
47
  // JSX での使用(className で指定)
56
48
  <Lism className="u--cbox" keycolor="red" bd p="20">...</Lism>
57
49
  <Text className="u--trim">テキスト...</Text>
58
- <Grid className="u--divide" gtc="1fr 1fr">...</Grid>
59
50
  ```
60
51
 
61
52
 
@@ -64,6 +55,7 @@ Lism コンポーネントでの `util` prop による指定方法は [component
64
55
  コアには含まれないが、ドキュメントで紹介されている追加ユーティリティの例:
65
56
 
66
57
  - `u--inlineCenter`: 絵文字やインラインアイコンをテキスト中央に揃える
58
+ - `u--divide` / `u--enclose`: Grid / Flex の子要素間の区切り線・セル枠を `gap` と子要素の `box-shadow` で描く。描画が `border` より粗く、並び方向が切り替わるレイアウトでは `bdw` のブレイクポイント切り替えを優先する
67
59
 
68
60
  これらは必要に応じて自分で CSS を追加して使用します。
69
61
 
@@ -1,5 +1,7 @@
1
1
  /** 指定見出しから同レベル以上の次の見出しまでを抽出する。headingは#の有無を問わない。 */
2
2
  export declare function extractSection(md: string, heading: string): string;
3
+ /** 冒頭(frontmatter を除き、最初の `##` 見出しの手前まで)を返す。H1 は含む。 */
4
+ export declare function extractPreamble(md: string): string;
3
5
  export declare function listHeadings(md: string): {
4
6
  level: number;
5
7
  text: string;
@@ -28,6 +28,13 @@ export function extractSection(md, heading) {
28
28
  }
29
29
  return lines.slice(startIdx, endIdx).join('\n').trimEnd();
30
30
  }
31
+ /** 冒頭(frontmatter を除き、最初の `##` 見出しの手前まで)を返す。H1 は含む。 */
32
+ export function extractPreamble(md) {
33
+ const body = md.replace(/^---\n[\s\S]*?\n---\n/, '');
34
+ const lines = body.split('\n');
35
+ const endIdx = lines.findIndex((line) => headingLevel(line) >= 2);
36
+ return (endIdx === -1 ? lines : lines.slice(0, endIdx)).join('\n').trim();
37
+ }
31
38
  export function listHeadings(md) {
32
39
  return md.split('\n').flatMap((line, i) => {
33
40
  const lv = headingLevel(line);
@@ -97,6 +97,9 @@ function getBasename(withoutExt) {
97
97
  function getNextTool(entry, guideTopics) {
98
98
  const withoutExt = entry.sourcePath.replace(/\.mdx$/, '');
99
99
  const basename = getBasename(withoutExt);
100
+ if (withoutExt === 'overview') {
101
+ return 'get_overview()';
102
+ }
100
103
  if (withoutExt === 'core-components/lism-props') {
101
104
  return 'get_props_system()';
102
105
  }
@@ -124,7 +124,8 @@ function detectComponent(declarations) {
124
124
  const display = propMap.get('display');
125
125
  const flexDirection = propMap.get('flex-direction');
126
126
  const placeItems = propMap.get('place-items');
127
- if (display === 'flex' && (flexDirection === 'column' || flexDirection === 'column-reverse')) {
127
+ // column-reverse Stack にせず、Flex + fxd で方向を保つ。
128
+ if (display === 'flex' && flexDirection === 'column') {
128
129
  return {
129
130
  name: 'Stack',
130
131
  reason: 'display: flex + flex-direction: column → Stack (vertical flex)',
@@ -161,20 +162,25 @@ function findCategory(mappings, propName) {
161
162
  const found = mappings.find((m) => m.prop === propName);
162
163
  return found?.sectionName ?? 'unknown';
163
164
  }
165
+ /** `property: value` を比較用に正規化する。 */
166
+ function normalizeDeclaration(css) {
167
+ const [prop, ...rest] = css.split(':');
168
+ return `${prop.trim().toLowerCase()}: ${rest.join(':').trim().toLowerCase()}`;
169
+ }
164
170
  /** 変換結果からJSX使用例を組み立てる。 */
165
171
  function buildExample(conversions, component) {
166
172
  const tagName = component?.name ?? 'Lism';
167
- const implicitCssSet = new Set(component?.implicitCss.map((c) => c.split(':')[0].trim()) ?? []);
173
+ // プロパティ名だけで照合すると値違い(例: flex-direction: column-reverse)まで落ちるため、値込みで照合する。
174
+ const implicitCssSet = new Set(component?.implicitCss.map(normalizeDeclaration) ?? []);
168
175
  const props = [];
169
176
  const styles = [];
170
177
  for (const conv of conversions) {
171
- const cssProp = conv.css.split(':')[0].trim();
172
178
  if (!conv.lismProp) {
173
179
  styles.push(conv.css);
174
180
  continue;
175
181
  }
176
182
  // コンポーネントが暗黙に持つCSSは重複出力しない。
177
- if (implicitCssSet.has(cssProp))
183
+ if (implicitCssSet.has(normalizeDeclaration(conv.css)))
178
184
  continue;
179
185
  if (conv.suggestedValue != null) {
180
186
  props.push(`${conv.lismProp}='${conv.suggestedValue}'`);
@@ -9,7 +9,7 @@ function normalizeComponentKey(input) {
9
9
  .trim()
10
10
  .toLowerCase()
11
11
  .replace(/^<|>$/g, '')
12
- .replace(/^(l--|is--|a--|c--)/, '');
12
+ .replace(/^(l--|is--|has--|a--|c--)/, '');
13
13
  }
14
14
  /** 入力が `<ComponentName>` 形式(React コンポーネントとしての問い合わせ)か判定する */
15
15
  function isAngleBracketNotation(input) {
@@ -18,7 +18,7 @@ function isAngleBracketNotation(input) {
18
18
  /** primitives/*.md の先頭行 `# l--flex / \`<Flex>\`` からクラス名とコンポーネント名を抽出する */
19
19
  function parsePrimitiveHeading(md) {
20
20
  const firstLine = md.split('\n', 1)[0] ?? '';
21
- const match = firstLine.match(/^#\s+((?:l|is|a|c)--[A-Za-z0-9]+)(?:\s*\/\s*`<([A-Za-z0-9]+)>`)?/);
21
+ const match = firstLine.match(/^#\s+((?:l|is|has|a|c)--[A-Za-z0-9]+)(?:\s*\/\s*`<([A-Za-z0-9]+)>`)?/);
22
22
  if (!match)
23
23
  return null;
24
24
  return { className: match[1], componentName: match[2] };
@@ -63,7 +63,7 @@ export function registerGetComponent(server) {
63
63
  'Accepts multiple notations: "Flex", "<Flex>", "l--flex", "flex" all resolve to the same entry.\n' +
64
64
  'Do NOT use this for broad topic guides (use get_guide with "components-core" or "components-ui") or keyword search across all docs (use search_docs).\n' +
65
65
  'If the component is not found, suggestions will be provided — follow up with search_docs for a broader query.\n' +
66
- 'The response is pre-formatted Markdown. Output it verbatim. Do NOT summarize or omit code examples.',
66
+ 'The response is Markdown reference material. Use it as context; when you write code, follow the code examples and class names exactly as documented rather than inventing variants.',
67
67
  inputSchema: {
68
68
  name: z.string().describe('Component name to look up (e.g. "Box", "Flex", "Accordion", "l--flex", "<Flex>").'),
69
69
  package: z
@@ -4,7 +4,6 @@ import { markdownResponse, loadFailureError, READ_ONLY_ANNOTATIONS } from '../li
4
4
  // files に複数指定したトピックは結合して返す。
5
5
  // MCP クライアントは Markdown 内の相対リンクを辿れないため、分冊ファイルは本体に結合する。
6
6
  const GUIDE_TOPICS = {
7
- overview: { files: ['SKILL.md'], label: 'Framework overview, packages, implementation rules' },
8
7
  tokens: { files: ['tokens.md'], label: 'Design tokens (spacing, colors, font sizes, etc.)' },
9
8
  'property-class': {
10
9
  files: ['property-class.md', 'property-class/all-props.md', 'property-class/bd.md', 'property-class/hov.md', 'property-class/max-sz.md'],
@@ -47,6 +46,10 @@ const GUIDE_TOPICS = {
47
46
  files: ['antipatterns-layout.md'],
48
47
  label: 'AI code-generation antipatterns (structure / layout / responsive): layout choice errors, responsive omissions, is-- misuse, naming mistakes',
49
48
  },
49
+ 'page-sections': {
50
+ files: ['references/page-sections.md'],
51
+ label: 'Standard page section patterns (hero, site header, footer, etc.) built from Group + Wrapper / Stack / Cluster',
52
+ },
50
53
  };
51
54
  /** get_guide が受理するトピックキーの集合。search.ts の nextTool 判定で利用する。 */
52
55
  export const GUIDE_TOPIC_KEYS = new Set(Object.keys(GUIDE_TOPICS));
@@ -56,8 +59,8 @@ const TOPIC_DESCRIPTION = Object.entries(GUIDE_TOPICS)
56
59
  export function registerGetGuide(server) {
57
60
  server.registerTool('get_guide', {
58
61
  description: 'Get a detailed guide on a specific lism-css topic. Use this when you need comprehensive documentation on a broad topic rather than a specific component or prop.\n' +
59
- 'For individual component lookup, get_component is more direct. For individual prop lookup, use get_props_system.\n' +
60
- 'The response is the full guide as pre-formatted Markdown. Output it verbatim. Do NOT summarize or omit sections.\n' +
62
+ 'For the framework overview, use get_overview. For individual component lookup, get_component is more direct. For individual prop lookup, use get_props_system.\n' +
63
+ 'The response is the full guide as Markdown reference material. Use it as context; apply its rules and examples exactly as documented rather than paraphrasing them from memory.\n' +
61
64
  `\nAvailable topics:\n${TOPIC_DESCRIPTION}`,
62
65
  inputSchema: {
63
66
  topic: z.enum(Object.keys(GUIDE_TOPICS)).describe('The guide topic to retrieve.'),
@@ -1,33 +1,53 @@
1
1
  import { loadMarkdown } from '../lib/load-markdown.js';
2
- import { extractSection } from '../lib/markdown-utils.js';
2
+ import { extractPreamble, extractSection } from '../lib/markdown-utils.js';
3
3
  import { markdownResponse, loadFailureError, READ_ONLY_ANNOTATIONS } from '../lib/response.js';
4
4
  /**
5
- * SKILL.md を中核に、css-rules.md Layer 構造セクションと
6
- * responsive.md のブレイクポイントセクションを付加して返す。
5
+ * SKILL.md から MCP でも意味を持つ節だけを抜き出す。
6
+ * 実装フロー・判定記号・C0–C8・実行レベル・提出前セルフチェックはスキル(ファイル参照と `.lism/` 保存)前提の作業手順なので含めない。
7
7
  */
8
+ const SKILL_SECTIONS = ['最小ゲート', '資料確認トリガー', '目的別実装ガイド', 'クラス単位の詳細リファレンス'];
9
+ /** 抜き出した節に残るガイドファイル名・判定記号を MCP ツールへ読み替えるための案内。 */
10
+ const TOOL_ROUTING = `## Looking up details with this MCP server
11
+
12
+ Guide file names mentioned below map to tools as follows:
13
+
14
+ - \`primitives/*.md\`, \`trait-class/*.md\` → \`get_component\` with the class or component name (e.g. "l--stack", "Stack", "a--icon", "is--container", "has--transition")
15
+ - \`tokens.md\` → \`get_tokens\`
16
+ - \`property-class.md\`, \`property-class/*.md\` → \`get_props_system\` for a single prop, or \`get_guide\` topic "property-class" for the whole system
17
+ - \`references/page-sections.md\` → \`get_guide\` topic "page-sections"
18
+ - Any other \`*.md\` → \`get_guide\` with the topic of the same name (e.g. \`css-rules.md\` → "css-rules", \`antipatterns.md\` → "antipatterns")
19
+ - Keyword search across all docs → \`search_docs\`; bulk CSS-to-Lism conversion → \`convert_css\`
20
+
21
+ Markers used in the rules below: 🔁 = look up the referenced guide before writing that code; ⏸ = confirm with the user before implementing (hardcoded px values, rounding to a nearby token, changing public classes, etc.). Do not write code while a decision is still 🔁. A hardcoded value is allowed as a documented exception (✅例外) only when the "直書きしてよい例外" section of \`antipatterns.md\` (\`get_guide\` topic "antipatterns") lists that case; user instructions such as "reproduce it exactly" do not count.`;
8
22
  function buildOverviewMarkdown() {
9
23
  const skill = loadMarkdown('SKILL.md');
10
24
  const cssRules = loadMarkdown('css-rules.md');
11
25
  const responsive = loadMarkdown('responsive.md');
26
+ // 冒頭(タイトル・公式ドキュメント URL・対象バージョン)。
27
+ // スキルの作業手順(実行レベル判定→セルフチェック)の一文は落とし、スキル更新の案内は MCP 向けに読み替える。
28
+ const preamble = extractPreamble(skill)
29
+ .replace(/変更規模から実行レベルを判定し、[^。]*。/, '')
30
+ .replace('このスキルの更新', '`@lism-css/mcp`の更新');
31
+ const parts = [preamble, TOOL_ROUTING];
32
+ for (const heading of SKILL_SECTIONS) {
33
+ const section = extractSection(skill, heading);
34
+ if (section)
35
+ parts.push(section);
36
+ }
12
37
  const layerSection = extractSection(cssRules, 'CSS Layer 構造');
13
- const bpSection = extractSection(responsive, 'ブレイクポイント');
14
- const parts = [skill];
15
- if (layerSection) {
16
- parts.push('\n---\n');
38
+ if (layerSection)
17
39
  parts.push(layerSection);
18
- }
19
- if (bpSection) {
20
- parts.push('\n---\n');
40
+ const bpSection = extractSection(responsive, 'ブレイクポイント');
41
+ if (bpSection)
21
42
  parts.push(bpSection);
22
- }
23
- return parts.join('\n');
43
+ return parts.join('\n\n---\n\n');
24
44
  }
25
45
  export function registerGetOverview(server) {
26
46
  server.registerTool('get_overview', {
27
- description: 'Get an overview of the lism-css framework: architecture, design philosophy, packages, breakpoints, CSS layers, and implementation rules.\n' +
47
+ description: 'Get an overview of the lism-css framework: core rules (minimum gates), which reference to look up before writing what, primitive/component selection by goal, class inventory, CSS layers, and breakpoints.\n' +
28
48
  'Use this as your FIRST call when starting any lism-css task — it provides the foundational context needed to use other tools effectively.\n' +
29
49
  'Do NOT use this to look up specific components (use get_component), individual props (use get_props_system), or design tokens (use get_tokens).\n' +
30
- 'The response is pre-formatted Markdown. Output it verbatim to the user. Do NOT summarize or omit sections.',
50
+ 'The response is Markdown reference material. Use it as context for your answer or implementation; do not paraphrase rules or invent class names, props, or token values that are not in it.',
31
51
  annotations: READ_ONLY_ANNOTATIONS,
32
52
  }, () => {
33
53
  try {
@@ -16,7 +16,7 @@ export function registerGetPropsSystem(server) {
16
16
  description: 'Get the lism-css Props system reference: how React/Astro props map to CSS classes and styles. Supports lookup by lism prop name (e.g. "p", "fz") OR by CSS property name (e.g. "padding", "font-size"). Omit the prop parameter to get the full reference.\n' +
17
17
  'Use this when you need to find a specific prop mapping, understand the Property Class system, or check what CSS property a lism prop corresponds to.\n' +
18
18
  'For bulk CSS-to-lism conversion, convert_css is more efficient. For component-specific documentation, use get_component.\n' +
19
- 'The response is pre-formatted Markdown. Output it verbatim. Do NOT summarize the prop tables.',
19
+ 'The response is Markdown reference material. Use prop names and preset values exactly as listed in the tables; do not invent props or values that are not there.',
20
20
  inputSchema: {
21
21
  prop: z
22
22
  .string()
@@ -5,7 +5,7 @@ export function registerGetTokens(server) {
5
5
  description: 'Get design tokens (colors, spacing, font sizes, shadows, etc.) used in lism-css. Returns the full token reference including CSS variable names and available values.\n' +
6
6
  'Use this when you need to check available token values, variable names, or design scales (e.g. "what spacing values exist?", "what are the font size tokens?").\n' +
7
7
  'For prop-to-CSS mappings, get_props_system is more suitable. For CSS conversion, use convert_css. Call get_overview first if you have not yet.\n' +
8
- 'The response is pre-formatted Markdown. Output it verbatim. Do NOT summarize or omit token values.',
8
+ 'The response is Markdown reference material. Use token names and values exactly as listed; do not invent tokens or values that are not there.',
9
9
  annotations: READ_ONLY_ANNOTATIONS,
10
10
  }, () => {
11
11
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lism-css/mcp",
3
- "version": "0.27.0",
3
+ "version": "0.28.1",
4
4
  "description": "MCP server for lism-css documentation and API reference.",
5
5
  "keywords": [
6
6
  "mcp",