明确哪些章节故意省略,别用空章节遮住缺项
本页展示随包原生输入和验收参考。Stitch云端运行状态:未运行;下方CLI区域保留实际本地执行。表格与图片不代表产品已经生成的结果。
input.csv / practice-data.json
本课实际输入字段
| section | intentional | reason | value |
|---|---|---|---|
| rounded | True | 平面直角品牌,本练习不设置圆角 | |
| typography | False | 忘记填写正文 | |
| spacing | False | 8px |
只标记有理由的省略
reference.csv:作者验收映射,不是目标API回包
| omitted | typography | check | expected |
|---|---|---|---|
| [{"section": "rounded", "reason": "平面直角品牌"}] | |||
| body-md restored | |||
| omitted-rules | review real finding |
规则与输入文件原文
{
"inputRows": [
{
"section": "rounded",
"intentional": true,
"reason": "平面直角品牌,本练习不设置圆角"
},
{
"section": "typography",
"intentional": false,
"reason": "忘记填写正文"
},
{
"section": "spacing",
"intentional": false,
"value": "8px"
}
],
"referenceRows": [
{
"omitted": [
{
"section": "rounded",
"reason": "平面直角品牌"
}
]
},
{
"typography": "body-md restored"
},
{
"check": "omitted-rules",
"expected": "review real finding"
}
],
"invalidRows": [
{
"omitted": [
"typography",
"colors",
"spacing"
],
"error": "hides essential missing input"
},
{
"omitted": [
"imaginary-field"
],
"error": "unknown omitted rule"
}
],
"notes": [
"作者自制可编辑输入与验收参考,非官方CLI或云端返回。",
"完整合法基础稿采用官方frontmatter schema;仅按本课故意更改对应字段。"
],
"designMdTemplate": "---\nversion: alpha\nname: Field Kit\ncolors:\n primary: \"#184A45\"\n surface: \"#F7F4EC\"\ntypography:\n body-md:\n fontFamily: Arial\n fontSize: 16px\n fontWeight: 400\n lineHeight: 1.6\nrounded:\n sm: 8px\nspacing:\n sm: 8px\ncomponents:\n button-primary:\n backgroundColor: \"{colors.primary}\"\n textColor: \"#FFFFFF\"\n typography: \"{typography.body-md}\"\n rounded: \"{rounded.sm}\"\n padding: \"{spacing.sm}\"\n---\n## Overview\nField Kit的预约界面。\n## Colors\n主色用于主要操作。\n## Typography\n正文使用body-md。\n## Layout\n使用8px间距。\n## Shapes\n使用8px圆角。\n## Components\n主要按钮统一消费语义引用。\n",
"officialSchemaUrl": "https://github.com/google-labs-code/design.md/blob/main/docs/spec.md",
"files": {
"input.json": "[\n {\n \"section\": \"rounded\",\n \"intentional\": true,\n \"reason\": \"平面直角品牌,本练习不设置圆角\"\n },\n {\n \"section\": \"typography\",\n \"intentional\": false,\n \"reason\": \"忘记填写正文\"\n },\n {\n \"section\": \"spacing\",\n \"intentional\": false,\n \"value\": \"8px\"\n }\n]\n",
"reference.json": "{\n \"identity\": \"作者验收参考,非模型返回\",\n \"rows\": [\n {\n \"omitted\": [\n {\n \"section\": \"rounded\",\n \"reason\": \"平面直角品牌\"\n }\n ]\n },\n {\n \"typography\": \"body-md restored\"\n },\n {\n \"check\": \"omitted-rules\",\n \"expected\": \"review real finding\"\n }\n ]\n}\n",
"invalid.json": "{\n \"identity\": \"作者构造负例,非实际错误回包\",\n \"rows\": [\n {\n \"omitted\": [\n \"typography\",\n \"colors\",\n \"spacing\"\n ],\n \"error\": \"hides essential missing input\"\n },\n {\n \"omitted\": [\n \"imaginary-field\"\n ],\n \"error\": \"unknown omitted rule\"\n }\n ]\n}\n",
"case.md": "# DESIGN.md omitted配置:明确哪些章节故意省略,别用空章节遮住缺项\n\nDESIGN.md omitted配置用于说明有意识的取舍。本课的平面界面确实不需要阴影,但正文仍需要字体;把两者都藏进“省略”会让规范失去可用性,因此要逐项说明并回看真实finding。\n\n## 写出有意和无意两类缺项\n\n准备一个无阴影的预约面板,注明它刻意保持平面层次。\n\n同时故意漏写正文typography,让两个问题在同一练习中可被区别。\n\n## 查看当前alpha规范\n\n使用designmd spec --rules查看已安装版本的omitted结构与规则,同时保存版本。\n\n不要从旧博客复制可能过期的字段形状,本课以实际规范为准。\n\n## 只标记有理由的省略\n\n按当前规范在omitted中说明不使用rounded;无阴影取舍写入Elevation的用途说明。\n\n正文仍需要排版数据,不能把漏字体也声明为“故意省略”来压掉提示。\n\n## 运行并读取不同finding\n\nlint后记录当前版本实际规则:本课0.4.0出现declared-omission、unknown-omission、missing-typography等;main规则名不等于已发布版全部相同。\n\ninfo、warning和error分开列,不能用总条数减少就判设计更完整。\n\n## 补回必要的字体规范\n\n加入body-md字体与行高,保留无阴影决定。\n\n不需要的章节不填空值,避免产生一份表面齐全但无法消费的文件。\n\n## 检查多余与拼错的省略项\n\n在负例中加入一个当前规范不识别的omitted名称,观察真实反馈。\n\n只记录当前版本实际行为,不把未知名称默默接受当跨版本保证。\n\n## 交付取舍与完整性说明\n\n保存正确omitted、负例、字体补全记录以及平面界面预览。\n\n列出还需由页面实现的层次线索,例如间距和边框,而不是仅写“不用阴影”。\n\n身份:输入与参考为作者材料;localCli有实测记录时仅证明对应CLI运行,目标云端与模型推理未执行。\n",
"DESIGN-incomplete.md": "---\nversion: alpha\nname: Field Kit\ncolors:\n primary: \"#184A45\"\n surface: \"#F7F4EC\"\nomitted:\n - section: rounded\n reason: \"平面直角品牌,无圆角\"\nspacing:\n sm: 8px\ncomponents:\n button-primary:\n backgroundColor: \"{colors.primary}\"\n textColor: \"#FFFFFF\"\n padding: \"{spacing.sm}\"\n---\n## Overview\nField Kit的预约界面。\n## Colors\n主色用于主要操作。\n## Typography\n正文使用body-md。\n## Layout\n使用8px间距。\n## Shapes\n本练习使用直角,无阴影以边框和间距区分层次。\n## Components\n主要按钮统一消费语义引用。\n",
"DESIGN-fixed.md": "---\nversion: alpha\nname: Field Kit\ncolors:\n primary: \"#184A45\"\n surface: \"#F7F4EC\"\ntypography:\n body-md:\n fontFamily: Arial\n fontSize: 16px\n fontWeight: 400\n lineHeight: 1.6\nomitted:\n - section: rounded\n reason: \"平面直角品牌,无圆角\"\nspacing:\n sm: 8px\ncomponents:\n button-primary:\n backgroundColor: \"{colors.primary}\"\n textColor: \"#FFFFFF\"\n typography: \"{typography.body-md}\"\n padding: \"{spacing.sm}\"\n---\n## Overview\nField Kit的预约界面。\n## Colors\n主色用于主要操作。\n## Typography\n正文使用body-md。\n## Layout\n使用8px间距。\n## Shapes\n本练习使用直角,无阴影以边框和间距区分层次。\n## Components\n主要按钮统一消费语义引用。\n",
"DESIGN-negative.md": "---\nversion: alpha\nname: Field Kit\ncolors:\n primary: \"#184A45\"\n surface: \"#F7F4EC\"\ntypography:\n body-md:\n fontFamily: Arial\n fontSize: 16px\n fontWeight: 400\n lineHeight: 1.6\nomitted:\n - section: imaginary-field\n reason: \"平面直角品牌,无圆角\"\nspacing:\n sm: 8px\ncomponents:\n button-primary:\n backgroundColor: \"{colors.primary}\"\n textColor: \"#FFFFFF\"\n typography: \"{typography.body-md}\"\n padding: \"{spacing.sm}\"\n---\n## Overview\nField Kit的预约界面。\n## Colors\n主色用于主要操作。\n## Typography\n正文使用body-md。\n## Layout\n使用8px间距。\n## Shapes\n本练习使用直角,无阴影以边框和间距区分层次。\n## Components\n主要按钮统一消费语义引用。\n",
"flat-panel.html": "<!doctype html><html lang=\"zh-CN\"><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><title>平面直角预约面板</title><style>body{font:16px/1.6 Arial,sans-serif;background:#f7f4ec;color:#183b39;margin:32px;max-width:1100px}h1{font-size:32px}article{padding:24px;border:1px solid #cbd4cc;background:white;margin:16px 0}button{background:#184a45;color:white;padding:12px 20px;border:0;border-radius:8px}table{border-collapse:collapse;width:100%}th,td{padding:10px;border:1px solid #cbd4cc;text-align:left}pre{white-space:pre-wrap;overflow-wrap:anywhere}article,button{border-radius:0;box-shadow:none}</style><h1>预约</h1><article><p>2026-11-07 19:00</p><button>确认预约</button></article></html>",
"omitted-valid.stdout.txt": "{\n \"findings\": [\n {\n \"severity\": \"info\",\n \"message\": \"Design system defines 2 colors, 1 typography scale, 1 spacing token, 1 component.\",\n \"rule\": \"token-summary\"\n },\n {\n \"severity\": \"info\",\n \"path\": \"omitted.rounded\",\n \"message\": \"rounded intentionally omitted — no rounded tokens will be validated\",\n \"rule\": \"declared-omission\"\n }\n ],\n \"summary\": {\n \"errors\": 0,\n \"warnings\": 0,\n \"infos\": 2\n }\n}\n",
"omitted-valid.stderr.txt": "",
"omitted-unknown.stdout.txt": "{\n \"findings\": [\n {\n \"severity\": \"info\",\n \"message\": \"Design system defines 2 colors, 1 typography scale, 1 spacing token, 1 component.\",\n \"rule\": \"token-summary\"\n },\n {\n \"severity\": \"info\",\n \"path\": \"rounded\",\n \"message\": \"No 'rounded' section defined. Corner rounding will fall back to agent defaults.\",\n \"rule\": \"missing-sections\"\n },\n {\n \"severity\": \"warning\",\n \"path\": \"omitted\",\n \"message\": \"unknown section name 'imaginary-field' in omitted key\",\n \"rule\": \"unknown-omission\"\n }\n ],\n \"summary\": {\n \"errors\": 0,\n \"warnings\": 1,\n \"infos\": 2\n }\n}\n",
"omitted-unknown.stderr.txt": "",
"omitted-missing-type.stdout.txt": "{\n \"findings\": [\n {\n \"severity\": \"info\",\n \"message\": \"Design system defines 2 colors, 1 spacing token, 1 component.\",\n \"rule\": \"token-summary\"\n },\n {\n \"severity\": \"warning\",\n \"path\": \"typography\",\n \"message\": \"No typography tokens defined. Agents will use default font choices, reducing your control over the design system's typographic identity.\",\n \"rule\": \"missing-typography\"\n },\n {\n \"severity\": \"info\",\n \"path\": \"omitted.rounded\",\n \"message\": \"rounded intentionally omitted — no rounded tokens will be validated\",\n \"rule\": \"declared-omission\"\n }\n ],\n \"summary\": {\n \"errors\": 0,\n \"warnings\": 1,\n \"infos\": 2\n }\n}\n",
"omitted-missing-type.stderr.txt": "",
"local-cli-receipt.json": "{\n \"status\": \"executed\",\n \"package\": \"@google/design.md\",\n \"version\": \"0.4.0\",\n \"cases\": [\n {\n \"case\": \"omitted-valid\",\n \"exitCode\": 0,\n \"stdoutSha256\": \"c1505405a72e9444bb13192579871e94eb4081c8cafa315654eece1819c92963\"\n },\n {\n \"case\": \"omitted-unknown\",\n \"exitCode\": 0,\n \"stdoutSha256\": \"132921d8c775fad1bd726340a3350fc742a365d2a74e5aec805b7e6d0847bf9b\"\n },\n {\n \"case\": \"omitted-missing-type\",\n \"exitCode\": 0,\n \"stdoutSha256\": \"6eca320dda4014cd6bb3b785971af54af58881bfcee0c96ab140814e6acd3783\"\n }\n ]\n}\n"
}
}官方CLI本地实测 · 0.4.0
以下stdout由当前包内同字节输入实际执行,退出码单独保留。Stitch云端生成未运行。
omitted-missing-type / exit 0
{
"findings": [
{
"severity": "info",
"message": "Design system defines 2 colors, 1 spacing token, 1 component.",
"rule": "token-summary"
},
{
"severity": "warning",
"path": "typography",
"message": "No typography tokens defined. Agents will use default font choices, reducing your control over the design system's typographic identity.",
"rule": "missing-typography"
},
{
"severity": "info",
"path": "omitted.rounded",
"message": "rounded intentionally omitted — no rounded tokens will be validated",
"rule": "declared-omission"
}
],
"summary": {
"errors": 0,
"warnings": 1,
"infos": 2
}
}
omitted-valid / exit 0
{
"findings": [
{
"severity": "info",
"message": "Design system defines 2 colors, 1 typography scale, 1 spacing token, 1 component.",
"rule": "token-summary"
},
{
"severity": "info",
"path": "omitted.rounded",
"message": "rounded intentionally omitted — no rounded tokens will be validated",
"rule": "declared-omission"
}
],
"summary": {
"errors": 0,
"warnings": 0,
"infos": 2
}
}
应当保留的约束
| omitted | typography | check | expected |
|---|---|---|---|
| [{"section": "rounded", "reason": "平面直角品牌"}] | |||
| body-md restored | |||
| omitted-rules | review real finding |
故意构造的错误样例
| omitted | error |
|---|---|
| ["typography", "colors", "spacing"] | hides essential missing input |
| ["imaginary-field"] | unknown omitted rule |
先保存真实产品输出,再逐项对照。actualOutput / actualResult 在未执行时保持 not_run,不能把这里的期望值复制成已测结果。