figma-cache-toolchain 2.0.2 → 2.0.3

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/package.json CHANGED
@@ -1,74 +1,75 @@
1
- {
2
- "name": "figma-cache-toolchain",
3
- "version": "2.0.2",
4
- "description": "Figma link normalization, local cache index, validation, and Node CLI (framework-agnostic core).",
5
- "homepage": "https://github.com/907086379/figma-cache-toolchain#readme",
6
- "keywords": [
7
- "figma",
8
- "cache",
9
- "cli",
10
- "design-tokens",
11
- "mcp"
12
- ],
13
- "license": "MIT",
14
- "engines": {
15
- "node": ">=16.20.0"
16
- },
17
- "bin": {
18
- "figma-cache": "bin/figma-cache.js"
19
- },
20
- "files": [
21
- "LICENSE",
22
- "bin",
23
- "cursor-bootstrap",
24
- "figma-cache/figma-cache.js",
25
- "figma-cache/js/flow-cli.js",
26
- "figma-cache/js/validate-cli.js",
27
- "figma-cache/js/budget-cli.js",
28
- "figma-cache/js/index-store.js",
29
- "figma-cache/js/cursor-bootstrap-cli.js",
30
- "figma-cache/js/entry-files.js",
31
- "figma-cache/js/backfill-cli.js",
32
- "figma-cache/js/project-config.js",
33
- "figma-cache/js/upsert-core.js",
34
- "figma-cache/docs/*.md"
35
- ],
36
- "publishConfig": {
37
- "registry": "https://registry.npmjs.org/"
38
- },
39
- "scripts": {
40
- "test": "npm run cursor:shadow:check && npm run docs:encoding:check && node tests/rules-guard.js && node tests/smoke.js",
41
- "prepack": "npm run cursor:shadow:check && npm run docs:encoding:check && node bin/figma-cache.js validate",
42
- "figma:cache:normalize": "node bin/figma-cache.js normalize",
43
- "figma:cache:get": "node bin/figma-cache.js get",
44
- "figma:cache:upsert": "node bin/figma-cache.js upsert",
45
- "figma:cache:ensure": "node bin/figma-cache.js ensure",
46
- "figma:cache:validate": "node bin/figma-cache.js validate",
47
- "figma:cache:stale": "node bin/figma-cache.js stale",
48
- "figma:cache:budget": "node bin/figma-cache.js budget --mcp-only",
49
- "figma:cache:backfill": "node bin/figma-cache.js backfill",
50
- "figma:cache:init": "node bin/figma-cache.js init",
51
- "figma:cache:config": "node bin/figma-cache.js config",
52
- "figma:cache:flow:init": "node bin/figma-cache.js flow init",
53
- "figma:cache:flow:add-node": "node bin/figma-cache.js flow add-node",
54
- "figma:cache:flow:link": "node bin/figma-cache.js flow link",
55
- "figma:cache:flow:chain": "node bin/figma-cache.js flow chain",
56
- "figma:cache:flow:show": "node bin/figma-cache.js flow show",
57
- "figma:cache:flow:mermaid": "node bin/figma-cache.js flow mermaid",
58
- "figma:cache:cursor:init": "node bin/figma-cache.js cursor init",
59
- "cursor:shadow:sync": "node scripts/sync-cursor-shadow.js",
60
- "cursor:shadow:check": "node scripts/check-cursor-shadow.js",
61
- "docs:encoding:check": "node scripts/check-doc-encoding.js",
62
- "figma:cache:mobile:spec": "node scripts/mobile/generate-mobile-spec.js"
63
- },
64
- "volta": {
65
- "node": "16.20.2"
66
- },
67
- "repository": {
68
- "type": "git",
69
- "url": "git+https://github.com/907086379/figma-cache-toolchain.git"
70
- },
71
- "bugs": {
72
- "url": "https://github.com/907086379/figma-cache-toolchain/issues"
73
- }
74
- }
1
+ {
2
+ "name": "figma-cache-toolchain",
3
+ "version": "2.0.3",
4
+ "description": "Figma link normalization, local cache index, validation, and Node CLI (framework-agnostic core).",
5
+ "homepage": "https://github.com/907086379/figma-cache-toolchain#readme",
6
+ "keywords": [
7
+ "figma",
8
+ "cache",
9
+ "cli",
10
+ "design-tokens",
11
+ "mcp"
12
+ ],
13
+ "license": "MIT",
14
+ "engines": {
15
+ "node": ">=16.20.0"
16
+ },
17
+ "bin": {
18
+ "figma-cache": "bin/figma-cache.js"
19
+ },
20
+ "files": [
21
+ "LICENSE",
22
+ "bin",
23
+ "cursor-bootstrap",
24
+ "figma-cache/figma-cache.js",
25
+ "figma-cache/js/flow-cli.js",
26
+ "figma-cache/js/validate-cli.js",
27
+ "figma-cache/js/budget-cli.js",
28
+ "figma-cache/js/index-store.js",
29
+ "figma-cache/js/cursor-bootstrap-cli.js",
30
+ "figma-cache/js/entry-files.js",
31
+ "figma-cache/js/backfill-cli.js",
32
+ "figma-cache/js/project-config.js",
33
+ "figma-cache/js/upsert-core.js",
34
+ "figma-cache/docs/*.md"
35
+ ],
36
+ "publishConfig": {
37
+ "registry": "https://registry.npmjs.org/"
38
+ },
39
+ "scripts": {
40
+ "test": "npm run cursor:shadow:check && npm run docs:encoding:check && node tests/rules-guard.js && node tests/smoke.js",
41
+ "prepack": "npm run cursor:shadow:check && npm run docs:encoding:check && node bin/figma-cache.js validate",
42
+ "figma:cache:normalize": "node bin/figma-cache.js normalize",
43
+ "figma:cache:get": "node bin/figma-cache.js get",
44
+ "figma:cache:upsert": "node bin/figma-cache.js upsert",
45
+ "figma:cache:ensure": "node bin/figma-cache.js ensure",
46
+ "figma:cache:validate": "node bin/figma-cache.js validate",
47
+ "figma:cache:stale": "node bin/figma-cache.js stale",
48
+ "figma:cache:budget": "node bin/figma-cache.js budget --mcp-only",
49
+ "figma:cache:backfill": "node bin/figma-cache.js backfill",
50
+ "figma:cache:init": "node bin/figma-cache.js init",
51
+ "figma:cache:config": "node bin/figma-cache.js config",
52
+ "figma:cache:flow:init": "node bin/figma-cache.js flow init",
53
+ "figma:cache:flow:add-node": "node bin/figma-cache.js flow add-node",
54
+ "figma:cache:flow:link": "node bin/figma-cache.js flow link",
55
+ "figma:cache:flow:chain": "node bin/figma-cache.js flow chain",
56
+ "figma:cache:flow:show": "node bin/figma-cache.js flow show",
57
+ "figma:cache:flow:mermaid": "node bin/figma-cache.js flow mermaid",
58
+ "figma:cache:cursor:init": "node bin/figma-cache.js cursor init",
59
+ "cursor:shadow:sync": "node scripts/sync-cursor-shadow.js",
60
+ "cursor:shadow:check": "node scripts/check-cursor-shadow.js",
61
+ "docs:encoding:check": "node scripts/check-doc-encoding.js",
62
+ "figma:cache:mobile:spec": "node scripts/mobile/generate-mobile-spec.js",
63
+ "figma:ui:gate": "npm run figma:cache:validate && npm run cursor:shadow:check && npm test"
64
+ },
65
+ "volta": {
66
+ "node": "16.20.2"
67
+ },
68
+ "repository": {
69
+ "type": "git",
70
+ "url": "git+https://github.com/907086379/figma-cache-toolchain.git"
71
+ },
72
+ "bugs": {
73
+ "url": "https://github.com/907086379/figma-cache-toolchain/issues"
74
+ }
75
+ }
@@ -1,51 +0,0 @@
1
- ---
2
- name: ui-baseline-governance
3
- description: 为新项目或老项目建立可执行的全局样式基线,并把约束固化到组件生成行为。
4
- ---
5
-
6
- # UI Baseline Governance Skill
7
-
8
- 本 Skill 用于“要不要上全局 reset / 如何在老项目安全落地 / 如何约束后续组件生成”三类问题。
9
- 若与规则冲突,以 `.cursor/rules/04-ui-baseline-governance.mdc` 为准。
10
-
11
- ## 触发场景
12
-
13
- - 用户询问:全局 `border-box`、reset、默认样式基线。
14
- - 用户反馈:组件反复出现超高/超宽/对齐漂移/图标不可见。
15
- - 用户要求:把经验沉淀为长期规范,约束后续 Agent 生成行为。
16
-
17
- ## 执行步骤(按序)
18
-
19
- 1. 判断项目类型:`新项目` 或 `老项目`(**必须**按 `.cursor/rules/04-ui-baseline-governance.mdc` §1.0 机械启发式执行,输出结论 + 命中证据;不确定则按老项目)。
20
- 2. 输出一份“基线实施决策”:
21
- - 新项目:一次性全局基线
22
- - 老项目:分层分批迁移
23
- 3. 给出最小基线清单(不与栈强耦合):
24
- - `border-box`
25
- - margin/padding reset
26
- - 媒体元素 display 规则
27
- - 字体基线
28
- - focus-visible
29
- 4. 同步“生成约束”到执行口径:
30
- - 默认 `box-border`
31
- - 文本溢出显式处理
32
- - 弹层锚定触发器
33
- - 图标优先项目库,兜底 `inline svg`
34
- - 状态覆盖完整
35
- 5. 给出验证与回滚方案:
36
- - lint + 视觉检查
37
- - 影响范围
38
- - 回滚点
39
-
40
- ## 用户可见输出模板(精简)
41
-
42
- 1. 当前项目类型与推荐策略(全局 or 分层)
43
- 2. 本轮要落的基线条目(最多 5 条)
44
- 3. 对后续组件生成的强约束(最多 5 条)
45
- 4. 验证与回滚
46
-
47
- ## 禁止事项
48
-
49
- - 不得在老项目直接“全局 reset + 大规模重构”同轮执行。
50
- - 不得把框架私有实现写入 `figma-cache/files/**` 的通用缓存文档。
51
- - 不得在未声明风险的情况下修改大范围全局样式。