@wisdomgarden/torque-knowledge 1.0.3 → 1.0.4
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.md +11 -1
- package/dist/.meta.json +2 -2
- package/dist/components.db +0 -0
- package/dist/torque-components.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
| 文件 | 给谁 | 是什么 |
|
|
14
14
|
| --- | --- | --- |
|
|
15
15
|
| `dist/torque-components.md` | **diting**(`lms-web` 的 CI code review) | 选型决策树 + 可用组件清单 + 硬约束 + 禁止事项。**只有清单和策略,没有组件细节** —— 细节查 `components.db`。带 diting 认的 frontmatter(单行 `keywords` / `globs`),解包进它的 `rule_dirs` 就能被召回 |
|
|
16
|
-
| `dist/components.db` | **`lms-web` 的本地 MCP** + **diting** | SQLite 组件目录,MCP `search_component()` 和 diting `query_ui_components` 共同的数据源。44
|
|
16
|
+
| `dist/components.db` | **`lms-web` 的本地 MCP** + **diting** | SQLite 组件目录,MCP `search_component()` 和 diting `query_ui_components` 共同的数据源。44 个组件的导出名(含 `Combobox.InfiniteDropdown` 这类点号子组件名)、英文描述、keywords 和完整 props |
|
|
17
17
|
| `dist/.meta.json` | CI / 下游漂移检测 | `{ knowledge, torque, generatedAt }` —— 这份知识是哪个版本、描述的又是哪个 torque 版本 |
|
|
18
18
|
|
|
19
19
|
## 版本与 `@wisdomgarden/torque` 相互独立
|
|
@@ -77,6 +77,16 @@ node scripts/check-changes.mjs # 有变化就顺便重新生成
|
|
|
77
77
|
`query_ui_components` 都按字段名取值,改了名两边都静默返回 `undefined`,不会报错。
|
|
78
78
|
**表名 `components` 也是契约** —— diting 不认文件名,它在 `rule_dirs` 下逐个 SQLite
|
|
79
79
|
文件试探「有没有 `components` 表」来发现这份目录,所以文件名能改、表名不能。
|
|
80
|
+
- **一份文案只发一份。** `when_to_use` 列保留但写 `NULL` —— 它曾经是 `description`
|
|
81
|
+
的逐字节副本(44/44 个组件一字不差),同一段话发两遍不只是费 token,挂在两个字段名
|
|
82
|
+
下还会让模型当成两条独立信息。`fallback.json` 只有一份文案,就只写 `description`;
|
|
83
|
+
列不能删,消费方读到空值自己回落。
|
|
84
|
+
- **子组件名要进 `exported_names`。** `Combobox.InfiniteDropdown` / `Tabs.List` /
|
|
85
|
+
`Popover.Target` 在 barrel 里查不到(挂在父组件上),但调用方写的就是这个名字。
|
|
86
|
+
`gen.mjs` 扫组件源码的 `X.Sub = Y` 和 `Object.assign(Root, {...})` 两种写法把它们
|
|
87
|
+
补进去 —— 不补的话下游精确查询 miss、fuzzy 落回父组件,模型拿不到答案就去翻源码,
|
|
88
|
+
而 torque 在 `node_modules` 里根本翻不到。**md 清单不列它们**:数量不定又被
|
|
89
|
+
`slice(0, 4)` 截断,漏出随机的一两个比一个不列更误导。
|
|
80
90
|
- **db 保持默认的 `DELETE` journal 模式,不要设 WAL。** WAL 标记会持久化进 db header,
|
|
81
91
|
产物在只读目录下会直接打不开。
|
|
82
92
|
- **md 只放「有什么」和「怎么选」,组件细节一律留给 `components.db`。** 清单里只有
|
package/dist/.meta.json
CHANGED
package/dist/components.db
CHANGED
|
Binary file
|
|
@@ -6,7 +6,7 @@ keywords: torque, component, ui, mantine, layout, button, icon-button, link-butt
|
|
|
6
6
|
|
|
7
7
|
# Torque UI 组件库
|
|
8
8
|
|
|
9
|
-
> 由 `@wisdomgarden/torque-knowledge@1.0.
|
|
9
|
+
> 由 `@wisdomgarden/torque-knowledge@1.0.4` 生成,对应 `@wisdomgarden/torque@0.1.2`。
|
|
10
10
|
> 不要手改 —— 它是 npm 包解包出来的,下次装依赖就被覆盖。
|
|
11
11
|
|
|
12
12
|
## 导入方式
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wisdomgarden/torque-knowledge",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Machine-readable knowledge artifact for @wisdomgarden/torque — component catalog (SQLite) and AI coding rules (Markdown). Consumed by CI code review and local AI tooling, not by application runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|