@sky.ui/mcp 0.0.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/LICENSE.md +139 -0
- package/README.md +182 -0
- package/data/chart-api-sections.json +4185 -0
- package/data/component-tier.json +25 -0
- package/data/design-guidelines/p0-guidelines.json +13381 -0
- package/data/reactivity-readme-snapshot.json +1 -0
- package/data/theme-authoring-contract.json +598 -0
- package/data/utils-suggestion-snapshot.json +1 -0
- package/dist/cache.d.ts +3 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +15 -0
- package/dist/cache.js.map +1 -0
- package/dist/catalog.d.ts +60 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +343 -0
- package/dist/catalog.js.map +1 -0
- package/dist/cem.d.ts +26 -0
- package/dist/cem.d.ts.map +1 -0
- package/dist/cem.js +348 -0
- package/dist/cem.js.map +1 -0
- package/dist/chart-usage-tool.d.ts +20 -0
- package/dist/chart-usage-tool.d.ts.map +1 -0
- package/dist/chart-usage-tool.js +153 -0
- package/dist/chart-usage-tool.js.map +1 -0
- package/dist/component-docs-tool.d.ts +45 -0
- package/dist/component-docs-tool.d.ts.map +1 -0
- package/dist/component-docs-tool.js +217 -0
- package/dist/component-docs-tool.js.map +1 -0
- package/dist/component-method-filter.d.ts +3 -0
- package/dist/component-method-filter.d.ts.map +1 -0
- package/dist/component-method-filter.js +32 -0
- package/dist/component-method-filter.js.map +1 -0
- package/dist/component-tier.d.ts +20 -0
- package/dist/component-tier.d.ts.map +1 -0
- package/dist/component-tier.js +59 -0
- package/dist/component-tier.js.map +1 -0
- package/dist/component-usage-tool.d.ts +20 -0
- package/dist/component-usage-tool.d.ts.map +1 -0
- package/dist/component-usage-tool.js +90 -0
- package/dist/component-usage-tool.js.map +1 -0
- package/dist/design-guidelines/a11y-engine.d.ts +22 -0
- package/dist/design-guidelines/a11y-engine.d.ts.map +1 -0
- package/dist/design-guidelines/a11y-engine.js +78 -0
- package/dist/design-guidelines/a11y-engine.js.map +1 -0
- package/dist/design-guidelines/compatibility-engine.d.ts +20 -0
- package/dist/design-guidelines/compatibility-engine.d.ts.map +1 -0
- package/dist/design-guidelines/compatibility-engine.js +57 -0
- package/dist/design-guidelines/compatibility-engine.js.map +1 -0
- package/dist/design-guidelines/component-guideline-engine.d.ts +19 -0
- package/dist/design-guidelines/component-guideline-engine.d.ts.map +1 -0
- package/dist/design-guidelines/component-guideline-engine.js +40 -0
- package/dist/design-guidelines/component-guideline-engine.js.map +1 -0
- package/dist/design-guidelines/composition-engine.d.ts +10 -0
- package/dist/design-guidelines/composition-engine.d.ts.map +1 -0
- package/dist/design-guidelines/composition-engine.js +29 -0
- package/dist/design-guidelines/composition-engine.js.map +1 -0
- package/dist/design-guidelines/pattern-engine.d.ts +20 -0
- package/dist/design-guidelines/pattern-engine.d.ts.map +1 -0
- package/dist/design-guidelines/pattern-engine.js +58 -0
- package/dist/design-guidelines/pattern-engine.js.map +1 -0
- package/dist/design-guidelines/recommendation-engine.d.ts +11 -0
- package/dist/design-guidelines/recommendation-engine.d.ts.map +1 -0
- package/dist/design-guidelines/recommendation-engine.js +88 -0
- package/dist/design-guidelines/recommendation-engine.js.map +1 -0
- package/dist/design-guidelines/repository.d.ts +19 -0
- package/dist/design-guidelines/repository.d.ts.map +1 -0
- package/dist/design-guidelines/repository.js +71 -0
- package/dist/design-guidelines/repository.js.map +1 -0
- package/dist/design-guidelines/review-engine.d.ts +20 -0
- package/dist/design-guidelines/review-engine.d.ts.map +1 -0
- package/dist/design-guidelines/review-engine.js +179 -0
- package/dist/design-guidelines/review-engine.js.map +1 -0
- package/dist/design-guidelines/schema.d.ts +256 -0
- package/dist/design-guidelines/schema.d.ts.map +1 -0
- package/dist/design-guidelines/schema.js +124 -0
- package/dist/design-guidelines/schema.js.map +1 -0
- package/dist/design-guidelines/token-engine.d.ts +23 -0
- package/dist/design-guidelines/token-engine.d.ts.map +1 -0
- package/dist/design-guidelines/token-engine.js +119 -0
- package/dist/design-guidelines/token-engine.js.map +1 -0
- package/dist/docs-read.d.ts +28 -0
- package/dist/docs-read.d.ts.map +1 -0
- package/dist/docs-read.js +102 -0
- package/dist/docs-read.js.map +1 -0
- package/dist/docs.d.ts +73 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +323 -0
- package/dist/docs.js.map +1 -0
- package/dist/example-site-doc-enrichment.d.ts +27 -0
- package/dist/example-site-doc-enrichment.d.ts.map +1 -0
- package/dist/example-site-doc-enrichment.js +171 -0
- package/dist/example-site-doc-enrichment.js.map +1 -0
- package/dist/example-site-fetch.d.ts +44 -0
- package/dist/example-site-fetch.d.ts.map +1 -0
- package/dist/example-site-fetch.js +255 -0
- package/dist/example-site-fetch.js.map +1 -0
- package/dist/framework-wrappers.d.ts +46 -0
- package/dist/framework-wrappers.d.ts.map +1 -0
- package/dist/framework-wrappers.js +131 -0
- package/dist/framework-wrappers.js.map +1 -0
- package/dist/mcp-response-truth.d.ts +18 -0
- package/dist/mcp-response-truth.d.ts.map +1 -0
- package/dist/mcp-response-truth.js +45 -0
- package/dist/mcp-response-truth.js.map +1 -0
- package/dist/mcp-runtime-status.d.ts +37 -0
- package/dist/mcp-runtime-status.d.ts.map +1 -0
- package/dist/mcp-runtime-status.js +96 -0
- package/dist/mcp-runtime-status.js.map +1 -0
- package/dist/mcp-stdio-entry.d.ts +3 -0
- package/dist/mcp-stdio-entry.d.ts.map +1 -0
- package/dist/mcp-stdio-entry.js +35 -0
- package/dist/mcp-stdio-entry.js.map +1 -0
- package/dist/mcp-tool-errors.d.ts +35 -0
- package/dist/mcp-tool-errors.d.ts.map +1 -0
- package/dist/mcp-tool-errors.js +42 -0
- package/dist/mcp-tool-errors.js.map +1 -0
- package/dist/parse-component-ast.d.ts +112 -0
- package/dist/parse-component-ast.d.ts.map +1 -0
- package/dist/parse-component-ast.js +695 -0
- package/dist/parse-component-ast.js.map +1 -0
- package/dist/post-endpoint-server.d.ts +19 -0
- package/dist/post-endpoint-server.d.ts.map +1 -0
- package/dist/post-endpoint-server.js +777 -0
- package/dist/post-endpoint-server.js.map +1 -0
- package/dist/reactivity-info.d.ts +22 -0
- package/dist/reactivity-info.d.ts.map +1 -0
- package/dist/reactivity-info.js +99 -0
- package/dist/reactivity-info.js.map +1 -0
- package/dist/reactivity-layer-tool.d.ts +18 -0
- package/dist/reactivity-layer-tool.d.ts.map +1 -0
- package/dist/reactivity-layer-tool.js +58 -0
- package/dist/reactivity-layer-tool.js.map +1 -0
- package/dist/reactivity-readme-topics.d.ts +46 -0
- package/dist/reactivity-readme-topics.d.ts.map +1 -0
- package/dist/reactivity-readme-topics.js +206 -0
- package/dist/reactivity-readme-topics.js.map +1 -0
- package/dist/read-only-tool-allowlist.d.ts +7 -0
- package/dist/read-only-tool-allowlist.d.ts.map +1 -0
- package/dist/read-only-tool-allowlist.js +17 -0
- package/dist/read-only-tool-allowlist.js.map +1 -0
- package/dist/server.d.ts +7 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +786 -0
- package/dist/server.js.map +1 -0
- package/dist/source-read.d.ts +31 -0
- package/dist/source-read.d.ts.map +1 -0
- package/dist/source-read.js +213 -0
- package/dist/source-read.js.map +1 -0
- package/dist/theme-authoring/contract-schema.d.ts +191 -0
- package/dist/theme-authoring/contract-schema.d.ts.map +1 -0
- package/dist/theme-authoring/contract-schema.js +49 -0
- package/dist/theme-authoring/contract-schema.js.map +1 -0
- package/dist/theme-authoring/repository.d.ts +18 -0
- package/dist/theme-authoring/repository.d.ts.map +1 -0
- package/dist/theme-authoring/repository.js +55 -0
- package/dist/theme-authoring/repository.js.map +1 -0
- package/dist/theme-tool.d.ts +26 -0
- package/dist/theme-tool.d.ts.map +1 -0
- package/dist/theme-tool.js +312 -0
- package/dist/theme-tool.js.map +1 -0
- package/dist/utils-guide-topics.d.ts +39 -0
- package/dist/utils-guide-topics.d.ts.map +1 -0
- package/dist/utils-guide-topics.js +202 -0
- package/dist/utils-guide-topics.js.map +1 -0
- package/dist/utils-info.d.ts +75 -0
- package/dist/utils-info.d.ts.map +1 -0
- package/dist/utils-info.js +219 -0
- package/dist/utils-info.js.map +1 -0
- package/dist/utils-suggestion-grounding.d.ts +59 -0
- package/dist/utils-suggestion-grounding.d.ts.map +1 -0
- package/dist/utils-suggestion-grounding.js +267 -0
- package/dist/utils-suggestion-grounding.js.map +1 -0
- package/docs/agent-recipe-example-site.md +91 -0
- package/docs/ai-design-mcp-blueprint.md +75 -0
- package/docs/cross-model-mcp-playbook.md +127 -0
- package/docs/example-site-and-mcp-training.md +82 -0
- package/docs/mcp-capability-status.md +51 -0
- package/docs/mcp-tooling-roadmap.md +36 -0
- package/docs/sky-chart-option-api.md +47 -0
- package/docs/starter-prompt.md +17 -0
- package/docs/theme-config-guide.md +178 -0
- package/docs/utils-usage-guide.md +110 -0
- package/docs/vue-wrapper-v-model.md +36 -0
- package/package.json +63 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Agent recipe — Example site (`sky-ui-example` / `/api/mcp`)
|
|
2
|
+
|
|
3
|
+
Unified workflow for **every** component doc page registered in **`COMPONENT_EXAMPLE_PAYLOAD_BUILDERS`** (`sky-ui-example/server/mcp/component-payload-registry.ts`).
|
|
4
|
+
|
|
5
|
+
**MCP surface (v1.1+):** Example-site matrices are **not** a separate tool. They merge into **`get_sky_component_docs`** when **`SKY_UI_EXAMPLE_SITE_BASE_URL`** is set or **`exampleSiteEmbed`** is shipped in `p0-guidelines.json`.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Authority split (all components)
|
|
10
|
+
|
|
11
|
+
| Need | Source |
|
|
12
|
+
|------|--------|
|
|
13
|
+
| Props, events, slots, methods, types | **`get_sky_component_docs`** (optional **`surface`**, **`include_deprecations`**) |
|
|
14
|
+
| Lit / React / Vue snippets | **`get_component_usage`** |
|
|
15
|
+
| Runnable matrices + `pageAi` routing + `sections[].ai` skeleton | **`get_sky_component_docs`** enrichment → live `GET /api/mcp/component/{id}` or offline **`exampleSiteEmbed`** |
|
|
16
|
+
| Theme / `userTheme` | **`get_theme`** (`guide` → `fields` / `field` / `match_intent` / `compose`) |
|
|
17
|
+
| Layout CSS classes | **`utility_classes`** + **`get_docs`** `utils-usage-guide.md` |
|
|
18
|
+
|
|
19
|
+
Payload shape (example site): top-level **`schema`** (e.g. `sky-ui-example-mcp/component/5`), **`pageAi.schema`** = `sky-ui-example/page-routing/1`, **`sections[].ai`** = structural blueprint.
|
|
20
|
+
|
|
21
|
+
**Interaction hints (optional, since `component/5`):** `pageAi.customEvents`, `pageAi.publicMethods`, and per-section `*InPlay` fields are routing aids — always confirm with **`get_sky_component_docs`**.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Minimal path (any `{id}` — low tokens)
|
|
26
|
+
|
|
27
|
+
1. **`get_sky_component_docs`** for the primary tag(s) in **`pageAi.guidelinesComponents`** (or the obvious root component).
|
|
28
|
+
2. If the response includes **`exampleSiteEmbed`** / enriched sections, use **`sections[].ai`** + one **`frameworks[]`** block for the user’s stack.
|
|
29
|
+
3. Otherwise **`get_component_usage`** for a paste-ready starter, then refine from docs surfaces.
|
|
30
|
+
|
|
31
|
+
Never invent `sky-*` tags, slot names, or `--sky-*` tokens.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 3. Full path (production UX)
|
|
36
|
+
|
|
37
|
+
After §2:
|
|
38
|
+
|
|
39
|
+
- **`get_sky_component_docs`** with **`names[]`** when multiple related tags matter
|
|
40
|
+
- **`get_component_usage`** (`lit` \| `react` \| `vue`) + split **`surface`** calls as needed
|
|
41
|
+
- **`get_docs`** → `packages/mcp/docs/vue-wrapper-v-model.md` for Vue two-way binding patterns
|
|
42
|
+
- Re-read **`pageAi.mcpToolChain`** inside enriched JSON when present (pages may customize ordering)
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 4. Adding a new component page (checklist)
|
|
47
|
+
|
|
48
|
+
**Authoring playbook (Vue page, `sky-title`, `setSection`, `sky-doctable`):** **`sky-ui-example/docs/component-docs-mcp-pipeline.md`**.
|
|
49
|
+
|
|
50
|
+
**In `sky-ui-example` (summary):**
|
|
51
|
+
|
|
52
|
+
1. Add **`app/frameworks/<id>.frameworks.ts`** — `FrameworkSnippet[]` + `*ExampleRouting` via **`createExamplePageRouting`**.
|
|
53
|
+
2. Add **`server/mcp/builders/<id>.ts`** — `buildXxxExamplePayload(): McpComponentExamplePayload`, or run **`npm run gen:mcp-builders`**.
|
|
54
|
+
3. Register in **`server/mcp/component-payload-registry.ts`**.
|
|
55
|
+
4. Wire the Vue page `sky-codebox` `:frameworks` to the same snippet arrays.
|
|
56
|
+
|
|
57
|
+
Shared types: **`app/frameworks/mcp-example.schema.ts`**, **`app/frameworks/mcp-example.defaults.ts`**.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 5. Environment (MCP server)
|
|
62
|
+
|
|
63
|
+
| Variable | Purpose |
|
|
64
|
+
|----------|---------|
|
|
65
|
+
| **`SKY_UI_EXAMPLE_SITE_BASE_URL`** | Origin only (e.g. `https://library.sky-ui.com`). Enables HTTP enrichment in **`get_sky_component_docs`**. |
|
|
66
|
+
| **`SKY_UI_EXAMPLE_SITE_EXTRA_HOSTS`** | Optional redirect allowlist (HTTP mode). |
|
|
67
|
+
| *(unset)* | Falls back to optional **`exampleSiteEmbed`** in **`packages/mcp/data/design-guidelines/p0-guidelines.json`**. |
|
|
68
|
+
|
|
69
|
+
Set these on the **machine running MCP** (e.g. Cursor `.cursor/mcp.json` → `env`).
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 6. Direct HTTP (humans / scripts)
|
|
74
|
+
|
|
75
|
+
When not using MCP:
|
|
76
|
+
|
|
77
|
+
| Method | Path |
|
|
78
|
+
|--------|------|
|
|
79
|
+
| GET | `/api/mcp/manifest` |
|
|
80
|
+
| GET | `/api/mcp/component/{id}` |
|
|
81
|
+
| GET | `/api/mcp/component/{id}?format=markdown` |
|
|
82
|
+
|
|
83
|
+
`{id}` is kebab-case (e.g. `accordion`).
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 7. Related `get_docs` files
|
|
88
|
+
|
|
89
|
+
- **`packages/mcp/docs/example-site-and-mcp-training.md`**
|
|
90
|
+
- **`packages/mcp/docs/cross-model-mcp-playbook.md`**
|
|
91
|
+
- **`packages/mcp/docs/starter-prompt.md`**
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# AI-Ready Design MCP Blueprint
|
|
2
|
+
|
|
3
|
+
> **Status (2026):** Research blueprint for design-assistant capabilities. The **published MCP surface** is the **9-tool standard** (see `mcp-capability-status.md`). Guideline JSON and embed data stay in-repo for validation and example-site enrichment.
|
|
4
|
+
|
|
5
|
+
**Goal:** evolve `@sky.ui/mcp` from metadata retrieval into a **design decision engine** that can answer: what to use, why, when **not** to use it, and how to compose accessible UI.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Current public MCP mapping (9 tools)
|
|
10
|
+
|
|
11
|
+
| Blueprint domain | Use today |
|
|
12
|
+
|------------------|-----------|
|
|
13
|
+
| Component API, methods, deprecations | **`get_sky_component_docs`** (+ optional `surface`, `include_deprecations`) |
|
|
14
|
+
| Discovery / search | **`sky_components`** (`list`, `search`, `search_by_api`) |
|
|
15
|
+
| Framework usage | **`get_component_usage`** |
|
|
16
|
+
| Theme / tokens | **`get_theme`** (`guide`, `fields`, `field`, `match_intent`, `compose`, `variables`) |
|
|
17
|
+
| Utils / layout | **`utility_classes`** + **`get_docs`** `utils-usage-guide.md` |
|
|
18
|
+
| Charts | **`get_chart_usage`** + **`get_sky_component_docs`** (`sky-chart`) |
|
|
19
|
+
| Reactivity | **`get_reactivity_layer`** |
|
|
20
|
+
| Install / bundler | **`get_project_guide`** |
|
|
21
|
+
| Prose guides | **`get_docs`** (allowlisted paths) |
|
|
22
|
+
| Example-site matrices | **`get_sky_component_docs`** enrichment when URL/embed configured |
|
|
23
|
+
| Blueprint domains (routing, patterns, a11y matrices) | Assistant reasoning + component docs; guideline JSON is data-only |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Why the blueprint still matters
|
|
28
|
+
|
|
29
|
+
| Gap | Blueprint target | Current mitigation |
|
|
30
|
+
|-----|------------------|-------------------|
|
|
31
|
+
| Selection logic | Use-case recommendation with trade-offs | **`sky_components`** search + assistant reasoning; guideline data internal |
|
|
32
|
+
| Composition recipes | Pattern-level component trees | Example-site **`sections[].ai`** via doc enrichment |
|
|
33
|
+
| State / variant intelligence | State matrices | **`get_sky_component_docs`** props/events; prose in component pages |
|
|
34
|
+
| Token semantics | Intent-based mapping | **`get_theme`** `match_intent` + `compose` |
|
|
35
|
+
| A11y design | Pattern checklists | Component docs + human review; guideline JSON for future tools |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Data contract (in-repo, versioned)
|
|
40
|
+
|
|
41
|
+
| Entity | Location |
|
|
42
|
+
|--------|----------|
|
|
43
|
+
| **ComponentGuideline** | `packages/mcp/data/design-guidelines/p0-guidelines.json` |
|
|
44
|
+
| **Theme authoring** | `packages/mcp/data/theme-authoring-contract.json` |
|
|
45
|
+
| **Chart API sections** | `packages/mcp/data/chart-api-sections.json` |
|
|
46
|
+
| **Utils catalog snapshot** | `packages/mcp/data/utils-suggestion-snapshot.json` |
|
|
47
|
+
| **Reactivity README snapshot** | `packages/mcp/data/reactivity-readme-snapshot.json` |
|
|
48
|
+
|
|
49
|
+
Build validates: schema, component refs, banned patterns, tool parity (`verify-mcp-tool-parity.mjs`).
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Future phases (optional re-expansion)
|
|
54
|
+
|
|
55
|
+
If product needs dedicated design-assistant tools again, prefer **one** consolidated tool (e.g. `design_assist`) rather than re-adding 10+ overlapping names. Until then:
|
|
56
|
+
|
|
57
|
+
| Phase | Outcome |
|
|
58
|
+
|-------|---------|
|
|
59
|
+
| **Phase 1** | ✅ Standard 9-tool surface + theme intent routing |
|
|
60
|
+
| **Phase 2** | Richer embed manifests; CI for example-site parity |
|
|
61
|
+
| **Phase 3** | Optional a11y/contrast helpers behind new tool(s) |
|
|
62
|
+
| **Phase 4** | Design lint / review with golden tests |
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Anti-rework guardrails
|
|
67
|
+
|
|
68
|
+
1. **Stable schemas** with `schemaVersion` on shipped JSON.
|
|
69
|
+
2. **Golden tests** (`test/mcp/run-mcp-test.mjs`, `contract-golden.mjs`).
|
|
70
|
+
3. **Additive evolution** — new fields over breaking response changes.
|
|
71
|
+
4. **Single tool parity check** on every `@sky.ui/mcp` build.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
*Document version: 1.1 — aligned with 9-tool standard surface; blueprint domains mapped to current tools.*
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Cross-model MCP playbook (Sky UI)
|
|
2
|
+
|
|
3
|
+
**Purpose:** Run Sky UI MCP across LLMs with **fewer tokens**, **predictable tool use**, and **verifiable** correctness. Fill the tables as you validate each vendor.
|
|
4
|
+
|
|
5
|
+
**Reality check:** No assistant + MCP stack can guarantee **literal 100% accuracy for every framework and coding case**—models hallucinate, tools can return partial data (missing CEM, offline packages), and user code differs. Treat **“accuracy”** as **(a)** deterministic outputs for the same tool + inputs, **(b)** schema-valid shipped JSON, **(c)** golden tests on critical paths, **(d)** explicit fallbacks when data is missing.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. One-block router (paste once per session; keep short)
|
|
10
|
+
|
|
11
|
+
Use this verbatim or trim per model token limits. The same text ships as **`packages/mcp/docs/starter-prompt.md`**.
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
You MUST use Sky UI MCP tools as the only source for component names, imports, props, events, slots, and theme tokens. Do not invent tags or --sky-* names.
|
|
15
|
+
|
|
16
|
+
Styling priority (pages, layouts, shells): Prefer @sky.ui/utils utility classes on elements (`class` / `className`) for layout, spacing, typography, and colors. Use get_docs `packages/mcp/docs/utils-usage-guide.md` for setup; utility_classes (variant_prefixes, search_classes, check_class) for class names; get_theme (operation guide, then fields/field) for userTheme. Do NOT default to large hand-written plain CSS or unrelated CSS frameworks unless the user asks or a case truly cannot be expressed with utilities.
|
|
17
|
+
|
|
18
|
+
Order: (1) get_project_guide (kind installation | setup) (2) get_sky_component_docs with optional surface (3) get_component_usage for lit/react/vue (4) get_reactivity_layer for @sky.ui/reactivity (5) get_chart_usage for sky-chart (6) theme: get_theme operation guide → match_intent/fields/field/compose (7) layout/styling: utility_classes + utils-usage-guide via get_docs.
|
|
19
|
+
|
|
20
|
+
JSON payloads include `_skyUiMcp.truthLayer` and `agentMust`: obey them — confirm API facts with get_sky_component_docs.
|
|
21
|
+
|
|
22
|
+
If a tool returns code starting with JSON parse errors or empty arrays, say what is missing (e.g. install or build @sky.ui/core for `custom-elements.json`) and retry after suggesting the user fix the environment.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 2. Low-token rules (tool choice)
|
|
28
|
+
|
|
29
|
+
| Goal | Prefer | Avoid |
|
|
30
|
+
|------|--------|--------|
|
|
31
|
+
| Single prop/event/slot/method slice | `get_sky_component_docs` + `surface` | Full docs when you only need one slice |
|
|
32
|
+
| Multiple components | `get_sky_component_docs` + `names[]` | Many sequential single-name calls |
|
|
33
|
+
| Theme JSON from user goals | `get_theme` `match_intent` → `compose` or `field` | Guessing ThemeConfig paths |
|
|
34
|
+
| Token names list | `get_theme` `variables` | Guessing `--sky-*` |
|
|
35
|
+
| Bundler wiring | `get_project_guide` (`kind: setup`) | Copying generic Vite docs from memory |
|
|
36
|
+
| React/Vue usage | `get_component_usage` | Hand-written wrappers from memory |
|
|
37
|
+
| Charts | `get_chart_usage` + `get_sky_component_docs` (`sky-chart`) | Inventing option keys |
|
|
38
|
+
| Page/layout styling | `utility_classes` + utils-usage-guide | Big ad-hoc CSS unless user opts out |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 3. Framework fast paths (minimal sequence)
|
|
43
|
+
|
|
44
|
+
### Lit (native web components)
|
|
45
|
+
|
|
46
|
+
| Step | Tool | Notes |
|
|
47
|
+
|------|------|-------|
|
|
48
|
+
| 1 | `get_project_guide` (`kind: installation`, `lit` or `vanilla`) | |
|
|
49
|
+
| 2 | `get_project_guide` (`kind: setup`, bundler param) | |
|
|
50
|
+
| 3 | `get_component_usage` (`lit`, component name) | |
|
|
51
|
+
| 4 | Split API: `get_sky_component_docs` + `surface` as needed | |
|
|
52
|
+
|
|
53
|
+
### React (`@sky.ui/react`)
|
|
54
|
+
|
|
55
|
+
| Step | Tool | Notes |
|
|
56
|
+
|------|------|-------|
|
|
57
|
+
| 1 | `get_project_guide` (`kind: installation`, `react`) | |
|
|
58
|
+
| 2 | `get_component_usage` (`react`) | |
|
|
59
|
+
| 3 | Split docs from core component name | |
|
|
60
|
+
|
|
61
|
+
### Vue (`@sky.ui/vue`)
|
|
62
|
+
|
|
63
|
+
| Step | Tool | Notes |
|
|
64
|
+
|------|------|-------|
|
|
65
|
+
| 1 | `get_project_guide` (`kind: installation`, `vue`) | |
|
|
66
|
+
| 2 | `get_component_usage` (`vue`) | |
|
|
67
|
+
| 3 | Split docs | |
|
|
68
|
+
|
|
69
|
+
### `@sky.ui/reactivity` only
|
|
70
|
+
|
|
71
|
+
| Step | Tool | Notes |
|
|
72
|
+
|------|------|-------|
|
|
73
|
+
| 1 | `get_reactivity_layer` (`operation: list_topics`) | |
|
|
74
|
+
| 2 | `get_reactivity_layer` (`get_topic`) | |
|
|
75
|
+
| 3 | Optional `get_docs` allowlisted README slice | |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 4. Accuracy guarantees you can enforce
|
|
80
|
+
|
|
81
|
+
| Mechanism | What it proves | Owner action |
|
|
82
|
+
|-----------|----------------|--------------|
|
|
83
|
+
| **Golden tests** | Same tool input → same JSON shape | `test/mcp/run-mcp-test.mjs`, `contract-golden.mjs` |
|
|
84
|
+
| **CEM present** (`npm run build:main`) | Manifest supplements AST docs | Document in onboarding |
|
|
85
|
+
| **`sky-ui://catalog/tools` resource** | Discover tool names | Kept in sync via `verify-mcp-tool-parity.mjs` |
|
|
86
|
+
| **Theme authoring contract** | Stable ThemeConfig paths + hooks | `get_theme` operations + `theme-authoring-contract.json` |
|
|
87
|
+
| **Tool errors (`isError: true`)** | `{ code, error, ...extras }` | `McpErrorCode` in `mcp-tool-errors.ts` |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 5. Known systemic gaps
|
|
92
|
+
|
|
93
|
+
| Gap | Symptom | Mitigation |
|
|
94
|
+
|-----|---------|------------|
|
|
95
|
+
| POST allowlist drift | 403 on valid tools | Build runs `verify-mcp-tool-parity.mjs` |
|
|
96
|
+
| Huge responses | Context blow-up | Use `surface`, limits, pagination |
|
|
97
|
+
| Offline / no CEM | AST-only or CEM-only docs | Build core; run from monorepo with source |
|
|
98
|
+
| Utils not installed | `utility_classes` uses snapshot | Shipped `utils-suggestion-snapshot.json` at MCP build |
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 6. Model evaluation matrix (your team fills)
|
|
103
|
+
|
|
104
|
+
| Model / client | Stdio MCP | HTTP POST `/tool` | Notes |
|
|
105
|
+
|----------------|-----------|-------------------|-------|
|
|
106
|
+
| | ☐ | ☐ | |
|
|
107
|
+
|
|
108
|
+
**Smoke checklist per row:** `sky_components` (`list`, limit 5) → `get_sky_component_docs` (`surface: props`, `sky-button`) → `get_theme` (`operation: guide`) → `get_theme` (`match_intent`, phrase `brand color`) → `get_theme` (`variables`, `max_names` 50) → `utility_classes` (`check_class`, `p-4`).
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 7. Improvement backlog
|
|
113
|
+
|
|
114
|
+
**Shipped (1.1.0):** Standard **9-tool** surface; `get_theme` guide/fields/field/match_intent/compose/variables; `get_reactivity_layer`; `get_chart_usage`; `utility_classes` snapshot fallback; docs aligned to new surface.
|
|
115
|
+
|
|
116
|
+
1. Expand golden tests as tools evolve.
|
|
117
|
+
2. Optional: richer component discovery heuristics without re-exposing removed guideline tools.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 8. How to fetch this file via MCP
|
|
122
|
+
|
|
123
|
+
1. **`get_docs`** with path **`packages/mcp/docs/cross-model-mcp-playbook.md`**
|
|
124
|
+
2. Short session prompt: **`packages/mcp/docs/starter-prompt.md`**
|
|
125
|
+
3. **`crossModelPlaybookPath`** from **`get_theme`** `variables` response → **`get_docs`**
|
|
126
|
+
|
|
127
|
+
*Last updated: 2026-06 — 9-tool standard surface.*
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Example site (`sky-ui-example`) vs MCP
|
|
2
|
+
|
|
3
|
+
Use **two layers**:
|
|
4
|
+
|
|
5
|
+
1. **`get_sky_component_docs`** — canonical **component API** from `@sky.ui/core` (CEM/AST). Names, types, slots, events, methods.
|
|
6
|
+
2. **Example-site enrichment** (internal to the same tool) — bounded HTTPS reads of the published app under **`/api/mcp/`**, or offline **`exampleSiteEmbed`**. Multi-framework snippets (HTML / Sky / Vue / React) and **`sections[].ai`** construction skeletons aligned with `sky-codebox` pages.
|
|
7
|
+
|
|
8
|
+
Do not treat rendered SPA HTML as ground truth; use the MCP endpoints or repo snippets.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Deployed endpoints (sky-ui-example)
|
|
13
|
+
|
|
14
|
+
| Method | Path | Purpose |
|
|
15
|
+
|--------|------|---------|
|
|
16
|
+
| GET | `/api/mcp/manifest` | JSON manifest: component ids, titles, `docPath` links. |
|
|
17
|
+
| GET | `/api/mcp/component/{id}` | JSON payload (`schema` `sky-ui-example-mcp/component/5`): `pageAi` routing + `sections[].ai` blueprints. Registry: **`sky-ui-example/server/mcp/component-payload-registry.ts`**. |
|
|
18
|
+
| GET | `/api/mcp/component/{id}?format=markdown` | One markdown file (fenced code per framework). |
|
|
19
|
+
|
|
20
|
+
`{id}` is kebab-case (e.g. `accordion`). Unknown id → 404.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## How MCP consumes the example site
|
|
25
|
+
|
|
26
|
+
Example-site data is merged into **`get_sky_component_docs`** when configured (see **Environment** below).
|
|
27
|
+
|
|
28
|
+
When **`SKY_UI_EXAMPLE_SITE_BASE_URL`** is set (or the default `https://library.sky-ui.com` is used):
|
|
29
|
+
|
|
30
|
+
- **`get_sky_component_docs`** may merge live data from **`GET /api/mcp/component/{id}`** (same shapes as the table above).
|
|
31
|
+
- Responses may include **`_skyUiMcp.enrichmentNote`** with `truthLayer: external_optional` — treat as supplementary to CEM/AST.
|
|
32
|
+
|
|
33
|
+
When the URL is **unset and disabled** (`SKY_UI_EXAMPLE_SITE_DISABLE=1`):
|
|
34
|
+
|
|
35
|
+
- Optional **`exampleSiteEmbed`** in **`packages/mcp/data/design-guidelines/p0-guidelines.json`** (`manifest` and/or `components` map).
|
|
36
|
+
- Supports **`npx @sky.ui/mcp`** offline without a deployed site.
|
|
37
|
+
|
|
38
|
+
### Guards (HTTP enrichment)
|
|
39
|
+
|
|
40
|
+
- Only **GET**; URLs built as `/api/mcp/manifest` or `/api/mcp/component/...`.
|
|
41
|
+
- Host allowlist + path must start with `/api/mcp/`.
|
|
42
|
+
- Body size cap (~600 KB); timeout (~25 s).
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Required / optional env (MCP host)
|
|
47
|
+
|
|
48
|
+
| Variable | Required | Notes |
|
|
49
|
+
|----------|----------|-------|
|
|
50
|
+
| **`SKY_UI_EXAMPLE_SITE_BASE_URL`** | No | Origin only, no path. Defaults to `https://library.sky-ui.com` (HeroUI-style). Override for local dev: `http://localhost:3000` |
|
|
51
|
+
| **`SKY_UI_EXAMPLE_SITE_DISABLE`** | No | Set `1` to skip live site fetches (offline-only) |
|
|
52
|
+
| **`SKY_UI_EXAMPLE_SITE_EXTRA_HOSTS`** | No | Comma-separated extra hosts after redirects |
|
|
53
|
+
|
|
54
|
+
Example Cursor config:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"mcpServers": {
|
|
59
|
+
"sky-ui": {
|
|
60
|
+
"command": "node",
|
|
61
|
+
"args": ["packages/mcp/dist/mcp-stdio-entry.js"],
|
|
62
|
+
"env": {
|
|
63
|
+
"SKY_UI_EXAMPLE_SITE_BASE_URL": "https://library.sky-ui.com"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Agent recipe
|
|
73
|
+
|
|
74
|
+
**`packages/mcp/docs/agent-recipe-example-site.md`** — checklist for every registered `{id}` (minimal/full paths, adding new builders).
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Adding a component to the manifest
|
|
79
|
+
|
|
80
|
+
Step-by-step: **`sky-ui-example/docs/component-docs-mcp-pipeline.md`**.
|
|
81
|
+
|
|
82
|
+
In **`sky-ui-example`**: add **`server/mcp/builders/<id>.ts`**, register in **`component-payload-registry.ts`**, add **`app/frameworks/<id>.frameworks.ts`**, reuse the same **`frameworks`** arrays on the Vue page.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# MCP Capability Status
|
|
2
|
+
|
|
3
|
+
Standard **9-tool** surface for `@sky.ui/mcp` (v1.1.x).
|
|
4
|
+
|
|
5
|
+
## Snapshot
|
|
6
|
+
|
|
7
|
+
- Scope: component discovery, docs, usage, reactivity, charts, theme authoring, utils classes, allowlisted guides
|
|
8
|
+
- Status: Standard surface shipped; docs and golden tests aligned
|
|
9
|
+
- Strength: predictable routing with smaller default payloads
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Capability Matrix
|
|
14
|
+
|
|
15
|
+
| Domain | Tool | Status | Maturity |
|
|
16
|
+
|---|---|---|---|
|
|
17
|
+
| Component discovery | `sky_components` (`list` \| `search` \| `search_by_api`) | Implemented | Stable |
|
|
18
|
+
| Structured docs | `get_sky_component_docs` (`name` \| `names[]`, optional `surface`, deprecations) | Implemented | Stable |
|
|
19
|
+
| Framework usage | `get_component_usage` (`lit` \| `react` \| `vue`) | Implemented | Stable |
|
|
20
|
+
| Setup | `get_project_guide` (`installation` \| `setup`) | Implemented | Stable |
|
|
21
|
+
| Reactivity | `get_reactivity_layer` (`list_topics` \| `get_topic` \| `package`) | Implemented | Stable |
|
|
22
|
+
| Charts | `get_chart_usage` (`list_types` \| `get_type` \| `option_guide`) | Implemented | Stable |
|
|
23
|
+
| Theme authoring | `get_theme` (`guide` \| `fields` \| `field` \| `match_intent` \| `compose` \| `variables`) | Implemented | Stable |
|
|
24
|
+
| Utils classes | `utility_classes` (live engine or shipped snapshot) | Implemented | Stable |
|
|
25
|
+
| Guides | `get_docs` (allowlisted paths) | Implemented | Stable |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Supporting data (not MCP tools)
|
|
30
|
+
|
|
31
|
+
| Data | Used by |
|
|
32
|
+
|------|---------|
|
|
33
|
+
| Example-site payloads | `get_sky_component_docs` enrichment when `SKY_UI_EXAMPLE_SITE_BASE_URL` or `exampleSiteEmbed` is set |
|
|
34
|
+
| `p0-guidelines.json` | Build validation; optional offline embed manifest |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Quality Gates
|
|
39
|
+
|
|
40
|
+
- Build: `npm run build -w @sky.ui/mcp` (parity, guideline refs, banned patterns)
|
|
41
|
+
- Smoke: `npm run test:mcp`
|
|
42
|
+
- Contract golden: `node test/mcp/contract-golden.mjs`
|
|
43
|
+
- Agent defaults: smaller omit-arg limits documented in README
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Recommended Next Milestones
|
|
48
|
+
|
|
49
|
+
1. Expand golden coverage for `get_theme` match_intent/compose edge cases
|
|
50
|
+
2. Publish `@sky.ui/mcp@1.1.0` and pin in consumer `.cursor/mcp.json`
|
|
51
|
+
3. Keep example-site embed manifest in sync with sky-ui-example page ids
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# MCP tooling roadmap
|
|
2
|
+
|
|
3
|
+
Complements **`mcp-capability-status.md`**. Follow-ups after the **9-tool standard surface** (`@sky.ui/mcp` 1.1.x).
|
|
4
|
+
|
|
5
|
+
## Shipped (1.1.x)
|
|
6
|
+
|
|
7
|
+
- **9 public tools:** `get_project_guide`, `sky_components`, `get_sky_component_docs`, `get_component_usage`, `get_reactivity_layer`, `get_chart_usage`, `get_theme`, `get_docs`, `utility_classes`
|
|
8
|
+
- **`get_theme`:** `guide`, `fields`, `field`, `match_intent`, `compose`, `variables`
|
|
9
|
+
- **Offline snapshots:** `utils-suggestion-snapshot.json`, `reactivity-readme-snapshot.json`, `chart-api-sections.json`
|
|
10
|
+
- **`_skyUiMcp`** metadata + **`--health`** diagnostics
|
|
11
|
+
- Example-site enrichment internal to **`get_sky_component_docs`**
|
|
12
|
+
- Guideline JSON for validation + embed only (`p0-guidelines.json`)
|
|
13
|
+
|
|
14
|
+
## High priority
|
|
15
|
+
|
|
16
|
+
| Area | Work |
|
|
17
|
+
|------|------|
|
|
18
|
+
| **Publish 1.1.x** | GitLab registry with `write_package_registry` |
|
|
19
|
+
| **Example-site embed CI** | Snapshot test when embed manifest ids change |
|
|
20
|
+
| **`get_project_guide`** | Optional JSON wrapper with `_skyUiMcp` |
|
|
21
|
+
|
|
22
|
+
## Medium priority
|
|
23
|
+
|
|
24
|
+
| Area | Work |
|
|
25
|
+
|------|------|
|
|
26
|
+
| **`utility_classes`** | Optional sandboxed read of user `skyui.config` |
|
|
27
|
+
| **`get_theme` `variables`** | Source hash / extract timestamp in response |
|
|
28
|
+
|
|
29
|
+
## Lower priority
|
|
30
|
+
|
|
31
|
+
- HTTP POST bridge: document `_skyUiMcp` in README POST section
|
|
32
|
+
- Optional consolidated design-assist tool (only if product asks)
|
|
33
|
+
|
|
34
|
+
## Principle
|
|
35
|
+
|
|
36
|
+
Prefer **`truthLayer` ∈ { `api_source`, `deterministic` }** for normative API answers. Treat **`external_optional`** and **`static_reference`** as supplementary.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# sky-chart — option API for AI assistants
|
|
2
|
+
|
|
3
|
+
Use this when the user needs **charts, dashboards, or ECharts-shaped configuration** on **`sky-chart`**. It complements **`get_sky_component_docs`** and **`get_chart_usage`**.
|
|
4
|
+
|
|
5
|
+
## Tool order
|
|
6
|
+
|
|
7
|
+
1. **`get_sky_component_docs`** with **`name: "sky-chart"`** (optional **`surface`**) for props, events, slots.
|
|
8
|
+
2. **`get_chart_usage`** — **`list_types`**, then **`get_type`** with **`chart_type`**, or **`option_guide`** for the compact mental model.
|
|
9
|
+
3. **`get_docs`** with **`packages/mcp/docs/sky-chart-option-api.md`** (this file) when you need prose without calling MCP again.
|
|
10
|
+
4. Example-site snippet matrices (when configured) arrive via **`get_sky_component_docs`** enrichment—not a separate tool.
|
|
11
|
+
|
|
12
|
+
## Mental model
|
|
13
|
+
|
|
14
|
+
| Input | Role |
|
|
15
|
+
|--------|------|
|
|
16
|
+
| **`type`** | Selects which **lazy-loaded renderer** runs (`bar`, `line`, `pie`, `map`, `radar`, `sankey`, `brush`, …). Must match the chart family you are building. |
|
|
17
|
+
| **`option`** | **Root chart configuration**: ECharts-style field names (`series`, `xAxis`, `tooltip`, …). The host merges theme and layout; renderers read the subset they need. |
|
|
18
|
+
| **`theme`** (attribute) | `light` \| `dark` \| `""`. Empty string follows the active **`sky-theme-provider`**. |
|
|
19
|
+
| **`option.theme`** | Optional **named palette** inside the option object (host may merge backgrounds / colors). |
|
|
20
|
+
|
|
21
|
+
**`type="brush"`** is a **range UI** (overview + detail). Use host **`start`** / **`end`** (0–100). Linked charts get their own **`option`** and usual **`type`** values.
|
|
22
|
+
|
|
23
|
+
## Root **`option`** shape (authoritative summary)
|
|
24
|
+
|
|
25
|
+
The shipped TypeScript root interface is **`EChartsOption`** in the Sky UI repo file **`components-raw/sky-chart/echarts-option.ts`**. Its **top-level keys** include:
|
|
26
|
+
|
|
27
|
+
- **`series`** (required in the type model; each entry has **`type`** for that series, e.g. `bar`, `line`, `pie`, `map`, …).
|
|
28
|
+
- **`xAxis`**, **`yAxis`**, **`grid`**, **`polar`**, **`angleAxis`**, **`radiusAxis`**, **`radar`**, **`geo`**, **`parallel`**, **`parallelAxis`**, **`calendar`** — coordinate and layout systems as needed.
|
|
29
|
+
- **`dataset`** (and optional **transform**, e.g. boxplot).
|
|
30
|
+
- **`tooltip`**, **`legend`**, **`axisPointer`**, **`dataZoom`**, **`visualMap`**, **`brush`**, **`timeline`** / **`options`** (multi-step timelines).
|
|
31
|
+
- **`color`**, **`backgroundColor`**, **`decal`**, **`graphic`**, **`fisheye`**, **`animation`** / **`animationDuration`** / related fields — presentation and motion.
|
|
32
|
+
|
|
33
|
+
Fields not listed in **`echarts-option.ts`** may still work when they match **Apache ECharts option** naming for features Sky has wired through; treat **extra fields** as **best-effort** unless confirmed in source or examples.
|
|
34
|
+
|
|
35
|
+
## Accuracy rules
|
|
36
|
+
|
|
37
|
+
1. **Prefer `get_sky_component_docs("sky-chart")`** over guessing tags or prop names.
|
|
38
|
+
2. **`type`** on the **custom element** picks the **primary renderer**; keep **`option.series`** consistent with that mode (avoid declaring an unsupported primary renderer).
|
|
39
|
+
3. **`option` is data**, not HTML: validate **untrusted** JSON before assigning (same risk class as remote config).
|
|
40
|
+
4. For **a11y**, pair charts with **text, tables, or live regions** when exact values matter; confirm keyboard/focus behavior from **`get_sky_component_docs`** events and slots.
|
|
41
|
+
|
|
42
|
+
## Repo paths (for humans / monorepo clones)
|
|
43
|
+
|
|
44
|
+
- **Root option type:** `components-raw/sky-chart/echarts-option.ts` — interface **`EChartsOption`**.
|
|
45
|
+
- **Renderer registry:** `components-raw/sky-chart/renderer/index.ts` — **`SkyChartType`** keys and lazy imports.
|
|
46
|
+
|
|
47
|
+
Published installs may not ship **`components-raw/`**; use **`get_sky_component_docs`** and this doc from **@sky.ui/mcp** instead.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Sky UI — starter prompt for assistants
|
|
2
|
+
|
|
3
|
+
Paste this at the start of a session when building with Sky UI (Cursor, Claude, Copilot, etc.).
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
You are helping build UI with Sky UI (@sky.ui/core web components, optional @sky.ui/react / @sky.ui/vue wrappers, @sky.ui/utils for layout CSS, @sky.ui/reactivity when needed).
|
|
7
|
+
|
|
8
|
+
You MUST use Sky UI MCP tools as the only source for component names, imports, props, events, slots, and theme tokens. Do not invent tags or --sky-* names.
|
|
9
|
+
|
|
10
|
+
Styling priority (pages, layouts, shells): Prefer @sky.ui/utils utility classes on elements (`class` / `className`) for layout, spacing, typography, and colors. Use get_docs with packages/mcp/docs/utils-usage-guide.md for setup; utility_classes (variant_prefixes, search_classes, check_class) to discover and validate class names; align get_theme (operation guide, then fields/field) for userTheme. Do NOT default to large hand-written plain CSS or unrelated CSS frameworks unless the user asks or a case truly cannot be expressed with utilities.
|
|
11
|
+
|
|
12
|
+
Order: (1) get_project_guide (kind installation | setup) for install/bundler (2) get_sky_component_docs with optional surface (3) get_component_usage for lit/react/vue (4) get_reactivity_layer for @sky.ui/reactivity topics (5) get_chart_usage for sky-chart types and option guide (6) theme: get_theme operation guide then fields/field (7) layout/styling: utility_classes + get_docs utils-usage-guide. For sky-chart props/events, get_sky_component_docs(name: sky-chart).
|
|
13
|
+
|
|
14
|
+
When citing MCP JSON, respect `_skyUiMcp.truthLayer` and `_skyUiMcp.agentMust` — do not treat guideline_scoring or heuristic_search as guaranteed API contracts.
|
|
15
|
+
|
|
16
|
+
If a tool returns code starting with JSON parse errors or empty arrays, say what is missing (e.g. `@sky.ui/core` not installed/built) and retry after suggesting the user fix the environment.
|
|
17
|
+
```
|