Compare commits
2 Commits
86c72f7090
...
8d439f068f
| Author | SHA1 | Date | |
|---|---|---|---|
| 8d439f068f | |||
| 9651c39f83 |
+9
-1
@@ -402,8 +402,16 @@
|
||||
"title": "ua verify 增加 llms-full.txt 生成同步校验",
|
||||
"motivation": "llms-full.txt 是手工触发 ua docs 生成的产物,改 manifest 后忘记跑 docs 会产生文档漂移,目前无门禁",
|
||||
"acceptance": "verify 内联重渲染 Agent 文档(时间戳归一化)与根目录 llms-full.txt 比对,不一致即报错提示 npm run docs;npm run check 全绿",
|
||||
"status": "open",
|
||||
"status": "done",
|
||||
"notes": "自补:工具链防漂移方向"
|
||||
},
|
||||
{
|
||||
"id": "g06",
|
||||
"title": "组件数门禁扩展 README 计数文本",
|
||||
"motivation": "f01 的计数漂移校验只覆盖 AGENTS/ARCHITECTURE,README 的「N 个 DOM 组件」文本仍可漂移",
|
||||
"acceptance": "checkCountDocs 扫描列表加入 README.md,漂移即 verify 失败;npm run check 全绿",
|
||||
"status": "open",
|
||||
"notes": "自补:f01 收尾"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -49,3 +49,4 @@
|
||||
{"ts":"2026-10-23T18:59:34+08:00","id":"g02","result":"done","commit":"33979b2","summary":"新增 image 组件:缩略图点击/回车开遮罩大图,Esc/点击遮罩关闭并归还焦点;组件 33→34,manifest/docs/README/demo 同步"}
|
||||
{"ts":"2026-10-23T19:04:29+08:00","id":"g03","result":"done","commit":"bfa7013","summary":"textField/textarea/inputNumber 新增 prefix/suffix(addonWrap 零侵入包装,无附加不包裹),样式聚焦光环由组承载;demo 与 manifest 同步"}
|
||||
{"ts":"2026-10-23T19:05:48+08:00","id":"g04","result":"done","commit":"c0bb8d7","summary":"dataTable 筛选输入框用 g03 的 prefix 放搜索图标,事件冒泡与筛选回归正常,门禁全绿"}
|
||||
{"ts":"2026-10-23T19:07:37+08:00","id":"g05","result":"done","commit":"9651c39","summary":"verify 内联重渲染 Agent 文档与 llms-full.txt 归一化比对,漂移即拦截提示 npm run docs"}
|
||||
|
||||
@@ -623,6 +623,18 @@ function checkCountDocs(actual) {
|
||||
return issues;
|
||||
}
|
||||
|
||||
/*** llms-full.txt 同步校验:内联重渲染 Agent 文档(时间戳归一化)与落盘产物比对,防 manifest 改后忘跑 docs ***/
|
||||
function checkLlmsFull(pkgs, issues) {
|
||||
if (!fs.existsSync(LLMS_FULL)) return; // 卫语句:产物缺失不算漂移(可能是新仓库)
|
||||
const tokensPath = path.join(ROOT, 'packages', 'design', 'tokens', 'tokens.json');
|
||||
const tokens = fs.existsSync(tokensPath) ? JSON.parse(fs.readFileSync(tokensPath, 'utf8')) : null;
|
||||
const norm = (s) => s.replace(/\r\n/g, '\n').replace(/自动生成于 [^,]*/, '自动生成于 X');
|
||||
const expected = renderAgentDocs({ generatedAt: '', packages: pkgs }, tokens);
|
||||
if (norm(fs.readFileSync(LLMS_FULL, 'utf8')) !== norm(expected)) {
|
||||
issues.push('llms-full.txt 与清单不一致,请运行 npm run docs 重新生成');
|
||||
}
|
||||
}
|
||||
|
||||
/*** 清单一致性校验:组件文档块的 id / props 说明 / demo 锚点必须与代码和演示产物对齐 ***/
|
||||
function cmdVerify() {
|
||||
const issues = [];
|
||||
@@ -663,6 +675,7 @@ function cmdVerify() {
|
||||
.flatMap((p) => p.docs?.components ?? []).length;
|
||||
issues.push(...checkCountDocs(skinTotal));
|
||||
issues.push(...checkReadme(pkgs));
|
||||
checkLlmsFull(pkgs, issues);
|
||||
|
||||
if (issues.length) {
|
||||
for (const it of issues) console.error('verify: ' + it);
|
||||
|
||||
Reference in New Issue
Block a user