RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Tuya-Community/miniapp-smart-ui/diff

Two files, one repository

Tuya-Community/miniapp-smart-ui ships 2 formats across 5 indexed files. The question worth asking is whether the second one says anything the first does not.

CompareAGENTS.md ↔ Cursor rules
A · AGENTS.md · 115 wordsB · .cursor/rules/wxs-es5.mdc · 76 words
What each file covers, counted
DimensionSharedOnly in AOnly in BOverlap
Sections11133%
Commands000—
Section tags0200%

What each file covers

Sections

1 shared · 1 only in A · 1 only in B
  • − SmartUI miniapp 组件库仓库说明
  • + WXS 规范
  •   测试

Commands

neither file has any

Section tags

0 shared · 2 only in A · 0 only in B
  • − setup
  • − test

Line diff

+26 added−35 removed8 unchanged18.6% identical
Tuya-Community/miniapp-smart-ui · AGENTS.md
@@ −1 @@
1# SmartUI miniapp 组件库仓库说明
 
 
 
 
2 
3项目下有 project.tuya.json 文件,包含了基本信息,其中:
4- miniprogramRoot 字段表示 example 打包产物目录,不能为空
5 
6## 安装
7 
8- yarn install
 
9 
10## 项目结构
11 
12- 此项目为用 小程序 开发, 语法类似微信小程序,语言选用 Typescript、less;测试用例采用 jest + miniprogram 方式去测试小程序代码
 
 
 
 
 
 
 
 
 
 
13 
14总体项目目录:
15- packages 目录下为所有组件的代码以及组件目录下的demo目录为demo的代码
16- example 为组件库的demo 目录,在打包时我们会将 packages 目录下的组件 demo打包到 example 的dist 目录下用于在运行编辑器内预览实际运行的效果,但是我们实际在开发时只需要改动 packages 目录下的内容即可
17 
18单个组件目录结构:
19- demo 组件的demo 代码位置
20- test 测试用例代码位置 其中 demo.spec.ts 文件为 demo 代码的快照用于测试demo生成的一致性;部分组件会有index.spec.ts 文件是因为部分组件光使用测试快照的方式代码覆盖不全,需要单独书写测试用例去填补测试用例不足
21- index.json 基础配置文件,组件需要引入其他组件时 需要在 usingComponents 字段内配置
22- index.less 样式文件,会自动加载
23- index.ts 主要逻辑文件
24- index.wxml dom文件
25- index.wxs dom文件引入的计算逻辑文件,内部只能书写es5代码,但是计算时的性能会比放在 index.ts 文件内好
26- README.en.md 英文版本的README
27- README.md 中文版本的README
28 
29## 多语言
30 
31example/i18n/strings.json 其是一个JSON 对象,en 代表英文,zh 代表中文;
32在我们demo 书写时都需要使用例如:title="{{I18n.t('basicUsage')}}" 这样的代码,通过I18n方法去调用strings文件内的key 生成文案,这样可以在不同的语言环境下生成不同的多语言文案
33README文件内在将demo的代码书写时不需要使用 I18n 方法,直接根据README中英文类别直接写对应strings.json 对应语种文案即可
34 
35 
36## 启动开发
37 
38- yarn dev
39 
40## 测试
41 
42- yarn test 测试整个项目
43- yarn test:cover 测试整个项目并计算测试覆盖率
Tuya-Community/miniapp-smart-ui · .cursor/rules/wxs-es5.mdc
@@ +1 @@
1---
2description: WXS 仅允许 ES5,用于模板内性能敏感计算
3globs: packages/**/*.wxs
4alwaysApply: false
5---
6 
7# WXS 规范
 
8 
9## 语法限制
10 
11- **仅写 ES5 语法**:使用 `function`、`var`,禁止 `const`/`let`、箭头函数、模板字符串、解构、class 等。
12- 适用于在模板侧做的计算,减轻 index.ts 与 setData 压力;简单逻辑仍可放在 ts。
13 
14## 正确写法示例
15 
16```javascript
17// ✅ 使用 function、var、字符串拼接
18function getHeight(contentHeight) {
19 var height = contentHeight
20 ? typeof contentHeight === 'number'
21 ? contentHeight + 'rpx'
22 : contentHeight
23 : 'undefined';
24 return 'height: ' + height + ';';
25}
26```
27 
28## 避免
 
 
29 
30- ❌ `const` / `let`
31- ❌ `() => {}`
32- ❌ `` `height: ${h}` ``
33- ❌ 解构、展开、class、import/require
 
 
 
 
 
 
34 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
@@ −1 +1 @@
1−# SmartUI miniapp 组件库仓库说明
1+---
2+description: WXS 仅允许 ES5,用于模板内性能敏感计算
3+globs: packages/**/*.wxs
4+alwaysApply: false
5+---
26  
3−项目下有 project.tuya.json 文件,包含了基本信息,其中:
4−- miniprogramRoot 字段表示 example 打包产物目录,不能为空
7+# WXS 规范
58  
6−## 安装
9+## 语法限制
710  
8−- yarn install
11+- **仅写 ES5 语法**:使用 `function`、`var`,禁止 `const`/`let`、箭头函数、模板字符串、解构、class 等。
12+- 适用于在模板侧做的计算,减轻 index.ts 与 setData 压力;简单逻辑仍可放在 ts。
913  
10−## 项目结构
14+## 正确写法示例
1115  
12−- 此项目为用 小程序 开发, 语法类似微信小程序,语言选用 Typescript、less;测试用例采用 jest + miniprogram 方式去测试小程序代码
16+```javascript
17+// ✅ 使用 function、var、字符串拼接
18+function getHeight(contentHeight) {
19+ var height = contentHeight
20+ ? typeof contentHeight === 'number'
21+ ? contentHeight + 'rpx'
22+ : contentHeight
23+ : 'undefined';
24+ return 'height: ' + height + ';';
25+}
26+```
1327  
14−总体项目目录:
15−- packages 目录下为所有组件的代码以及组件目录下的demo目录为demo的代码
16−- example 为组件库的demo 目录,在打包时我们会将 packages 目录下的组件 demo打包到 example 的dist 目录下用于在运行编辑器内预览实际运行的效果,但是我们实际在开发时只需要改动 packages 目录下的内容即可
28+## 避免
1729  
18−单个组件目录结构:
19−- demo 组件的demo 代码位置
20−- test 测试用例代码位置 其中 demo.spec.ts 文件为 demo 代码的快照用于测试demo生成的一致性;部分组件会有index.spec.ts 文件是因为部分组件光使用测试快照的方式代码覆盖不全,需要单独书写测试用例去填补测试用例不足
21−- index.json 基础配置文件,组件需要引入其他组件时 需要在 usingComponents 字段内配置
22−- index.less 样式文件,会自动加载
23−- index.ts 主要逻辑文件
24−- index.wxml dom文件
25−- index.wxs dom文件引入的计算逻辑文件,内部只能书写es5代码,但是计算时的性能会比放在 index.ts 文件内好
26−- README.en.md 英文版本的README
27−- README.md 中文版本的README
30+- ❌ `const` / `let`
31+- ❌ `() => {}`
32+- ❌ `` `height: ${h}` ``
33+- ❌ 解构、展开、class、import/require
2834  
29−## 多语言
30− 
31−example/i18n/strings.json 其是一个JSON 对象,en 代表英文,zh 代表中文;
32−在我们demo 书写时都需要使用例如:title="{{I18n.t('basicUsage')}}" 这样的代码,通过I18n方法去调用strings文件内的key 生成文案,这样可以在不同的语言环境下生成不同的多语言文案
33−README文件内在将demo的代码书写时不需要使用 I18n 方法,直接根据README中英文类别直接写对应strings.json 对应语种文案即可
34− 
35− 
36−## 启动开发
37− 
38−- yarn dev
39− 
40−## 测试
41− 
42−- yarn test 测试整个项目
43−- yarn test:cover 测试整个项目并计算测试覆盖率

Also from Kynth Studios

Built for the same person as RuleStack

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

StillShipping

Which agent tools have stopped shipping

stillshipping.kynth.studio

BlockDex

Search inside every shadcn registry

blockdex.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

RuleStack

Built by

Kynth Studios

the studio behind ToolDrift, StillShipping and BlockDex

part of Toolproof, the measurement layer for AI agent tooling

Directory

Configs
Stacks
Compare formats
AGENTS.md vs CLAUDE.md
Cursor rules alternatives
Diff two configs
Best AGENTS.md examples
Best Cursor rules examples
What goes in a CLAUDE.md

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

© 2026 RuleStack. A Kynth Studios product. Changelog

RuleStack

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

RuleStack

Built by

Kynth Studios

the studio behind ToolDrift, StillShipping and BlockDex

part of Toolproof, the measurement layer for AI agent tooling

Directory

Configs
Stacks
Compare formats
AGENTS.md vs CLAUDE.md
Cursor rules alternatives
Diff two configs
Best AGENTS.md examples
Best Cursor rules examples
What goes in a CLAUDE.md

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

© 2026 RuleStack. A Kynth Studios product. Changelog

RuleStack

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

RuleStack

Built by

Kynth Studios

the studio behind ToolDrift, StillShipping and BlockDex

part of Toolproof, the measurement layer for AI agent tooling

Directory

Configs
Stacks
Compare formats
AGENTS.md vs CLAUDE.md
Cursor rules alternatives
Diff two configs
Best AGENTS.md examples
Best Cursor rules examples
What goes in a CLAUDE.md

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

© 2026 RuleStack. A Kynth Studios product. Changelog

RuleStack