Skip to content

Commit a6c5815

Browse files
authored
Merge pull request #4503 from VisActor/001-vchart-skill-tutorial
feat: add VChart Skill usage tutorial and navigation entry
2 parents 245188f + 0e93da3 commit a6c5815

13 files changed

Lines changed: 822 additions & 2 deletions

File tree

.cursor/rules/specify-rules.mdc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Auto-generated from all feature plans. Last updated: 2026-01-15
55
## Active Technologies
66
- TypeScript 4.x+ (Project uses TS) + `@visactor/vchart` (Core logic), `@visactor/react-vchart` (React wrapper) (007-fix-datazoom-react)
77
- N/A (In-memory chart state) (007-fix-datazoom-react)
8+
- Markdown + JSON(文档内容与菜单配置) + `@internal/docs` 文档构建体系、`docs/assets/guide/menu.json` 导航配置、现有教程目录结构 (001-vchart-skill-tutorial)
89

910
- TypeScript/React 18 + @visactor/react-vchart, @visactor/vchar (001-react-vchart-demo)
1011

@@ -26,10 +27,10 @@ npm test && npm run lint
2627
TypeScript 4.9.5: Follow standard conventions
2728

2829
## Recent Changes
30+
- 001-vchart-skill-tutorial: Added Markdown + JSON(文档内容与菜单配置) + `@internal/docs` 文档构建体系、`docs/assets/guide/menu.json` 导航配置、现有教程目录结构
2931
- 007-fix-datazoom-react: Added TypeScript 4.x+ (Project uses TS) + `@visactor/vchart` (Core logic), `@visactor/react-vchart` (React wrapper)
3032
- 007-fix-datazoom-react: Added [if applicable, e.g., PostgreSQL, CoreData, files or N/A]
3133

32-
- 001-react-vchart-demo: Added TypeScript/React 18 + @visactor/react-vchart, @visactor/vchar
3334

3435

3536
<!-- MANUAL ADDITIONS START -->
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# VChart Skill Usage
2+
3+
VChart and VTable are core components of VisActor's visualization solution. To improve AI-assisted development efficiency and reduce onboarding cost, VisActor provides a developer skill.
4+
5+
## Relationship with Quick Start
6+
7+
- [Quick Start](./Getting_Started) covers VChart basics.
8+
- This guide focuses on using `vchart-skill` in AI editors.
9+
10+
## Installation
11+
12+
Use either command:
13+
14+
```bash
15+
npx skills add VisActor/VChart
16+
```
17+
18+
```bash
19+
npx skills add VisActor/VChart --skill vchart-development-assistant
20+
```
21+
22+
Installation preview:
23+
24+
![vchart-skill installation preview](https://p6-xtjj-sign.byteimg.com/tos-cn-i-73owjymdk6/030e176313614ac087853aca647b55df~tplv-73owjymdk6-jj-mark-v1:0:0:0:0:5o6Y6YeR5oqA5pyv56S-5Yy6IEAg546E6a2C:q75.awebp?rk3s=f64ab15b&x-expires=1773307752&x-signature=H2PzvppEZrBvra4nZh1fEo%2BiOJY%3D)
25+
26+
## Editor References
27+
28+
- Trae docs: `https://docs.trae.ai/ide/skills?_lang=zh`
29+
- Cursor docs: `https://cursor.com/cn/docs/context/skills`
30+
31+
Skill directory preview:
32+
33+
![skills directory preview](https://p6-xtjj-sign.byteimg.com/tos-cn-i-73owjymdk6/e3cd80683fb34e21a02d371b1bc360c9~tplv-73owjymdk6-jj-mark-v1:0:0:0:0:5o6Y6YeR5oqA5pyv56S-5Yy6IEAg546E6a2C:q75.awebp?rk3s=f64ab15b&x-expires=1773307752&x-signature=wrXQJFCJd%2B6sMd05mYc1Ehu3fu8%3D)
34+
35+
## Demo Scenarios
36+
37+
### 1. Generate a simple chart
38+
39+
Suggested prompt:
40+
41+
```text
42+
Use VChart to generate a basic bar chart with xField, yField, and a minimal runnable example.
43+
```
44+
45+
Expected result:
46+
47+
- A runnable minimal spec is generated.
48+
- The chart can render correctly.
49+
50+
![simple chart demo](https://p6-xtjj-sign.byteimg.com/tos-cn-i-73owjymdk6/fc55630c49a94d84bd3d7e3a5ca59da1~tplv-73owjymdk6-jj-mark-v1:0:0:0:0:5o6Y6YeR5oqA5pyv56S-5Yy6IEAg546E6a2C:q75.awebp?rk3s=f64ab15b&x-expires=1773307752&x-signature=fcmQ6R0EEMPMDp8y%2Fw38OE4nNjY%3D)
51+
52+
### 2. Adjust chart styles
53+
54+
Suggested prompt:
55+
56+
```text
57+
Optimize colors, label style, and legend readability for the existing bar chart while preserving the current data structure.
58+
```
59+
60+
Expected result:
61+
62+
- Style changes are clearly visible.
63+
- Existing chart structure and data mapping remain valid.
64+
65+
![style adjustment demo](https://p6-xtjj-sign.byteimg.com/tos-cn-i-73owjymdk6/3cec7ac8dc11486ca9a61eb157ac478d~tplv-73owjymdk6-jj-mark-v1:0:0:0:0:5o6Y6YeR5oqA5pyv56S-5Yy6IEAg546E6a2C:q75.awebp?rk3s=f64ab15b&x-expires=1773307752&x-signature=9ETSnU3R8KdgL%2Fl6bHV%2F70RoBDg%3D)
66+
67+
### 3. Fix spec/config issues
68+
69+
Suggested prompt:
70+
71+
```text
72+
Review the current VChart spec, identify configuration errors, and provide fixes with explanations.
73+
```
74+
75+
Expected result:
76+
77+
- Incorrect config locations are identified.
78+
- A directly replaceable fixed config is provided.
79+
80+
![config fix demo](https://p6-xtjj-sign.byteimg.com/tos-cn-i-73owjymdk6/bb4911d4db814a7ca3b777f7549cf69e~tplv-73owjymdk6-jj-mark-v1:0:0:0:0:5o6Y6YeR5oqA5pyv56S-5Yy6IEAg546E6a2C:q75.awebp?rk3s=f64ab15b&x-expires=1773307752&x-signature=J1olPfoWsglwVMxCukVu1otSycU%3D)
81+
82+
## Notes
83+
84+
- Make sure the skill is installed in your project editor skill directory.
85+
- If behavior differs by editor version, follow the latest official docs.

docs/assets/guide/menu.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
"en": "Quick Start"
2323
}
2424
},
25+
{
26+
"path": "VChart_Skill_Usage",
27+
"title": {
28+
"zh": "VChart Skill 使用",
29+
"en": "VChart Skill Usage"
30+
}
31+
},
2532
{
2633
"path": "Contribution_Guide",
2734
"title": {
@@ -967,4 +974,4 @@
967974
]
968975
}
969976
]
970-
}
977+
}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# VChart Skill 使用
2+
3+
VChart 和 VTable 作为 VisActor 数据可视化解决方案的核心组件,为了帮助开发者通过 AI 提升效率、降低使用门槛,VisActor 提供了开发者 skill。
4+
5+
## 与快速上手的关系
6+
7+
- [快速上手](./Getting_Started) 介绍的是 VChart 基础安装与绘图流程。
8+
- 本文聚焦 `vchart-skill` 在 AI 编辑器中的使用方式,帮助你更快完成图表生成、样式调整和配置修复。
9+
- 建议阅读顺序:先完成[快速上手](./Getting_Started),再阅读本文。
10+
11+
## 简介
12+
13+
`vchart-skill` 面向支持 skills 的 AI 编辑器,核心目标是让模型更准确理解 VChart 语义与实践路径,从而减少试错成本。
14+
15+
## 安装与简单 Demo
16+
17+
### 1. Skill 安装
18+
19+
VChart 开发 skill 已发布在 GitHub:
20+
21+
- 仓库入口:`https://github.com/VisActor/VChart`
22+
- skill 目录:`https://github.com/VisActor/VChart/tree/develop/skills/vchart-development-assistant`
23+
24+
可使用以下任一命令安装:
25+
26+
```bash
27+
npx skills add VisActor/VChart
28+
```
29+
30+
```bash
31+
npx skills add VisActor/VChart --skill vchart-development-assistant
32+
```
33+
34+
安装过程示意:
35+
36+
![vchart-skill 安装示意](https://p6-xtjj-sign.byteimg.com/tos-cn-i-73owjymdk6/030e176313614ac087853aca647b55df~tplv-73owjymdk6-jj-mark-v1:0:0:0:0:5o6Y6YeR5oqA5pyv56S-5Yy6IEAg546E6a2C:q75.awebp?rk3s=f64ab15b&x-expires=1773307752&x-signature=H2PzvppEZrBvra4nZh1fEo%2BiOJY%3D)
37+
38+
### 2. 编辑器参考
39+
40+
- Trae 文档:`https://docs.trae.ai/ide/skills?_lang=zh`
41+
- Cursor 文档:`https://cursor.com/cn/docs/context/skills`
42+
43+
安装后,通常会落到项目内编辑器对应的 skills 目录(例如 `.cursor/skills` 或其他 `.<editor>/skills` 目录),请确认目录中能看到 `vchart-development-assistant`
44+
45+
目录示意:
46+
47+
![skills 目录示意](https://p6-xtjj-sign.byteimg.com/tos-cn-i-73owjymdk6/e3cd80683fb34e21a02d371b1bc360c9~tplv-73owjymdk6-jj-mark-v1:0:0:0:0:5o6Y6YeR5oqA5pyv56S-5Yy6IEAg546E6a2C:q75.awebp?rk3s=f64ab15b&x-expires=1773307752&x-signature=wrXQJFCJd%2B6sMd05mYc1Ehu3fu8%3D)
48+
49+
### 3. 示例一:生成简单图表
50+
51+
建议提示词:
52+
53+
```text
54+
使用 VChart 生成一个基础柱状图,包含 xField、yField 和最小可运行示例。
55+
```
56+
57+
验收点:
58+
59+
- 能输出可运行的最小 spec。
60+
- 图表可正常渲染。
61+
62+
示例效果:
63+
64+
![生成简单图表示例](https://p6-xtjj-sign.byteimg.com/tos-cn-i-73owjymdk6/fc55630c49a94d84bd3d7e3a5ca59da1~tplv-73owjymdk6-jj-mark-v1:0:0:0:0:5o6Y6YeR5oqA5pyv56S-5Yy6IEAg546E6a2C:q75.awebp?rk3s=f64ab15b&x-expires=1773307752&x-signature=fcmQ6R0EEMPMDp8y%2Fw38OE4nNjY%3D)
65+
66+
### 4. 示例二:调整图表样式
67+
68+
建议提示词:
69+
70+
```text
71+
在已有柱状图基础上,优化颜色、标签样式和图例可读性,保留原有数据结构。
72+
```
73+
74+
验收点:
75+
76+
- 样式改动清晰可见。
77+
- 不破坏原有图表结构与数据映射。
78+
79+
示例效果:
80+
81+
![调整图表样式示例](https://p6-xtjj-sign.byteimg.com/tos-cn-i-73owjymdk6/3cec7ac8dc11486ca9a61eb157ac478d~tplv-73owjymdk6-jj-mark-v1:0:0:0:0:5o6Y6YeR5oqA5pyv56S-5Yy6IEAg546E6a2C:q75.awebp?rk3s=f64ab15b&x-expires=1773307752&x-signature=9ETSnU3R8KdgL%2Fl6bHV%2F70RoBDg%3D)
82+
83+
### 5. 示例三:修复配置问题
84+
85+
建议提示词:
86+
87+
```text
88+
检查当前 VChart spec 的配置错误并给出修复方案,解释每一处修复原因。
89+
```
90+
91+
验收点:
92+
93+
- 明确指出错误位置。
94+
- 给出可直接替换的修复配置。
95+
96+
示例效果:
97+
98+
![修复配置问题示例](https://p6-xtjj-sign.byteimg.com/tos-cn-i-73owjymdk6/bb4911d4db814a7ca3b777f7549cf69e~tplv-73owjymdk6-jj-mark-v1:0:0:0:0:5o6Y6YeR5oqA5pyv56S-5Yy6IEAg546E6a2C:q75.awebp?rk3s=f64ab15b&x-expires=1773307752&x-signature=J1olPfoWsglwVMxCukVu1otSycU%3D)
99+
100+
## 常见问题与注意事项
101+
102+
- 如果编辑器不支持 skills,需先确认当前版本是否提供该能力。
103+
- 如果命令执行成功但效果不明显,优先检查 skill 目录是否正确写入。
104+
- 若项目上下文不足,建议先补充图表目标、字段含义和预期输出。
105+
- 外部链接或命令可能随版本变化,请以最新官方文档为准。
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<!--
2+
First of all, thank you for your contribution! 😄
3+
For requesting to pull a new feature or bugfix, please send it from a feature/bugfix branch based on the `main` branch.
4+
Before submitting your pull request, please make sure the checklist below is confirmed.
5+
Your pull requests will be merged after one of the collaborators approve.
6+
Thank you!
7+
-->
8+
9+
[[中文版模板 / Chinese template](https://github.com/VisActor/VChart/blob/main/.github/PULL_REQUEST_TEMPLATE/pr_cn.md?plain=1)]
10+
11+
### 🤔 This is a ...
12+
13+
- [x] New feature
14+
- [ ] Bug fix
15+
- [ ] TypeScript definition update
16+
- [ ] Bundle size optimization
17+
- [ ] Performance optimization
18+
- [ ] Enhancement feature
19+
- [ ] Refactoring
20+
- [ ] Update dependency
21+
- [ ] Code style optimization
22+
- [ ] Test Case
23+
- [ ] Branch merge
24+
- [ ] Release
25+
- [ ] Site / documentation update
26+
- [ ] Demo update
27+
- [ ] Workflow
28+
- [ ] Other (about what?)
29+
30+
### 🔗 Related issue link
31+
32+
<!--
33+
1. Put the related issue or discussion links here.
34+
2. close #xxxx or fix #xxxx for instance.
35+
-->
36+
37+
### 🔗 Related PR link
38+
39+
<!-- Put the related PR links here. -->
40+
41+
### 🐞 Bugserver case id
42+
43+
<!-- paste the `fileid` field in the bugserver case url -->
44+
45+
### 💡 Background and solution
46+
47+
在 VChart 文档站新增一篇“VChart Skill 使用”教程,并将其挂载到与“快速上手”同级的导航层级。教程以用户提供的参考正文为语义来源,覆盖技能简介、安装方式、编辑器适配(Cursor/Trae)以及三个可执行场景(生成简单图表、调整图表样式、修复配置问题),同时保持与现有文档规范一致。
48+
49+
**Language/Version**: Markdown + JSON(文档内容与菜单配置)
50+
**Primary Dependencies**: `@internal/docs` 文档构建体系、`docs/assets/guide/menu.json` 导航配置、现有教程目录结构
51+
**Storage**: N/A
52+
**Testing**: 文档构建与链接可达性检查(本地 docs 预览 + 静态路径校验)
53+
**Target Platform**: VChart 官方文档站(zh 主路径,en 路径不新增正文)
54+
**Project Type**: Rush Monorepo(文档子系统变更)
55+
**Performance Goals**: 不引入额外运行时成本;页面加载复杂度与现有教程同级
56+
**Constraints**: 必须与“快速上手”同级;教程内容与参考正文一致但需可验证;不得破坏现有导航结构
57+
**Scale/Scope**: 1 篇新增教程 + 1 处导航配置调整 + 文档内链与示例片段
58+
### 📝 Changelog
59+
60+
<!--
61+
Describe changes from the user side, and list all potential break changes or other risks.
62+
--->
63+
64+
| Language | Changelog |
65+
| ---------- | --------- |
66+
| 🇺🇸 English | Add a VChart Skill tutorial and place it at the same navigation level as Quick Start, with installation, editor references, and guided demo scenarios. |
67+
| 🇨🇳 Chinese | |
68+
69+
### ☑️ Self-Check before Merge
70+
71+
⚠️ Please check all items below before requesting a reviewing. ⚠️
72+
73+
- [ ] Doc is updated/provided or not needed
74+
- [ ] Demo is updated/provided or not needed
75+
- [ ] TypeScript definition is updated/provided or not needed
76+
- [ ] Changelog is provided or not needed
77+
78+
---
79+
80+
<!--
81+
Below are template for copilot to generate CR message.
82+
Please DO NOT modify it.
83+
-->
84+
85+
### 🚀 Summary
86+
87+
copilot:summary
88+
89+
### 🔍 Walkthrough
90+
91+
copilot:walkthrough
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Specification Quality Checklist: 新增 vchart-skill 教程文档
2+
3+
**Purpose**: Validate specification completeness and quality before proceeding to planning
4+
**Created**: 2026-03-06
5+
**Feature**: [/Users/bytedance/Documents/GitHub/VChart/specs/001-vchart-skill-tutorial/spec.md](/Users/bytedance/Documents/GitHub/VChart/specs/001-vchart-skill-tutorial/spec.md)
6+
7+
## Content Quality
8+
9+
- [x] No implementation details (languages, frameworks, APIs)
10+
- [x] Focused on user value and business needs
11+
- [x] Written for non-technical stakeholders
12+
- [x] All mandatory sections completed
13+
14+
## Requirement Completeness
15+
16+
- [x] No [NEEDS CLARIFICATION] markers remain
17+
- [x] Requirements are testable and unambiguous
18+
- [x] Success criteria are measurable
19+
- [x] Success criteria are technology-agnostic (no implementation details)
20+
- [x] All acceptance scenarios are defined
21+
- [x] Edge cases are identified
22+
- [x] Scope is clearly bounded
23+
- [x] Dependencies and assumptions identified
24+
25+
## Feature Readiness
26+
27+
- [x] All functional requirements have clear acceptance criteria
28+
- [x] User scenarios cover primary flows
29+
- [x] Feature meets measurable outcomes defined in Success Criteria
30+
- [x] No implementation details leak into specification
31+
32+
## Notes
33+
34+
- 已完成一轮规范自检,全部检查项通过。
35+
- 无需额外澄清问题(0 个 [NEEDS CLARIFICATION] 标记)。
36+
- 已根据用户补充的参考正文(含安装命令、编辑器适配、3 个示例场景)完成二次 refine。
37+
- 已实现文档与导航变更:新增 `VChart_Skill_Usage` 菜单节点,并新增中英文教程文档文件。
38+
- 链接完整性校验通过:菜单路径存在,`zh/en` 对应文件存在,文内相对链接可解析。

0 commit comments

Comments
 (0)