@guru-ai-product/ai-product-kit 0.2.251113215925 → 0.2.251117160442

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.
Files changed (23) hide show
  1. package/bin/setup.js +172 -0
  2. package/mcp/skills/aipk_init_project/template/AGENTS_TEMPLATE.md +1 -1
  3. package/package.json +1 -1
  4. package/skills/aipk_design/GURU_AI.md +5 -3
  5. package/skills/aipk_design/SKILL.md +5 -0
  6. package/skills/aipk_design/format-requirement-pages-with-design/SKILL.md +129 -0
  7. package/skills/aipk_design/format-requirement-pages-with-design/requirement-page-table-format.md +250 -0
  8. package/skills/aipk_design/update-requirements-from-design/SKILL.md +39 -21
  9. package/skills/aipk_development/GURU_AI.md +1 -1
  10. package/skills/aipk_init_project/GURU_AI.md +2 -2
  11. package/skills/aipk_init_project/template/AGENTS_TEMPLATE.md +1 -43
  12. package/skills/aipk_operations/GURU_AI.md +1 -1
  13. package/skills/aipk_requirements/GURU_AI.md +9 -7
  14. package/skills/aipk_requirements/documentation/template/1_/344/272/247/345/223/201/345/256/232/344/275/215/344/270/216/345/210/206/346/236/220.md +19 -17
  15. package/skills/aipk_requirements/documentation/template/2_/345/212/237/350/203/275/351/234/200/346/261/202.md +12 -12
  16. package/skills/aipk_requirements/documentation/template/3_/345/225/206/344/270/232/345/214/226/347/255/226/347/225/245.md +1 -1
  17. package/skills/aipk_requirements/documentation/template/{4_/347/224/250/346/210/267/347/225/214/351/235/242/344/270/216/344/275/223/351/252/214.md → 4.1_/347/224/250/346/210/267/344/275/223/351/252/214/346/265/201/347/250/213/344/270/216/344/277/241/346/201/257/346/236/266/346/236/204.md} +4 -278
  18. package/skills/aipk_requirements/documentation/template/4.2_/345/205/263/351/224/256/347/225/214/351/235/242.md +265 -0
  19. package/skills/aipk_requirements/documentation/template/4.3_/344/272/244/344/272/222/344/270/216/345/223/215/345/272/224/345/274/217/350/256/276/350/256/241.md +87 -0
  20. package/skills/aipk_requirements/documentation/template/index.md +19 -1
  21. package/skills/aipk_requirements/documentation/template//351/234/200/346/261/202/350/277/255/344/273/243/346/250/241/346/235/277.md +112 -122
  22. package/skills/aipk_skill_generate/GURU_AI.md +1 -1
  23. package/skills/aipk_tool_prompts/GURU_AI.md +1 -1
package/bin/setup.js CHANGED
@@ -5,6 +5,15 @@ const path = require('node:path');
5
5
 
6
6
  const packageRoot = path.resolve(__dirname, '..');
7
7
  const bundledSkillsDir = path.join(packageRoot, 'skills');
8
+ const AGENTS_FILENAME = 'AGENTS.md';
9
+ const AGENTS_TEMPLATE_PATH = path.join(
10
+ packageRoot,
11
+ 'skills',
12
+ 'aipk_init_project',
13
+ 'template',
14
+ 'AGENTS_TEMPLATE.md'
15
+ );
16
+ const AGENTS_TEMPLATE_PLACEHOLDER = '{{skills_section}}';
8
17
 
9
18
  function log(message) {
10
19
  process.stdout.write(`[ai-product-kit] ${message}\n`);
@@ -84,6 +93,169 @@ function main() {
84
93
  removeGuruDirectories(targetDir);
85
94
  copyBundledSkills(targetDir);
86
95
  log('Skills directory updated.');
96
+ ensureAgentsMd();
87
97
  }
88
98
 
89
99
  main();
100
+
101
+ function ensureAgentsMd() {
102
+ const agentsPath = path.join(process.cwd(), AGENTS_FILENAME);
103
+ let content;
104
+ if (!fs.existsSync(agentsPath)) {
105
+ content = buildDefaultAgentsContent();
106
+ fs.writeFileSync(agentsPath, content, 'utf8');
107
+ log('Created AGENTS.md');
108
+ } else {
109
+ content = fs.readFileSync(agentsPath, 'utf8');
110
+ }
111
+
112
+ const skills = collectSkillMetadata();
113
+ const newSection = renderAgentsTemplateForSkills(skills);
114
+ const updated = replaceSkillsSection(content, newSection);
115
+
116
+ if (updated !== content) {
117
+ fs.writeFileSync(agentsPath, updated, 'utf8');
118
+ log(`Updated AGENTS.md with ${skills.length} skill(s)`);
119
+ } else {
120
+ log('AGENTS.md already up to date');
121
+ }
122
+ }
123
+
124
+ function buildDefaultAgentsContent() {
125
+ return renderAgentsTemplateForSkills([]);
126
+ }
127
+
128
+ function renderAgentsTemplateForSkills(skills) {
129
+ const template = loadAgentsTemplate();
130
+ if (!template.includes(AGENTS_TEMPLATE_PLACEHOLDER)) {
131
+ exitWithError(`AGENTS template missing ${AGENTS_TEMPLATE_PLACEHOLDER} placeholder`);
132
+ }
133
+ const entries = generateSkillEntries(skills);
134
+ return template.replace(AGENTS_TEMPLATE_PLACEHOLDER, entries);
135
+ }
136
+
137
+ function loadAgentsTemplate() {
138
+ if (!fs.existsSync(AGENTS_TEMPLATE_PATH)) {
139
+ exitWithError('AGENTS template file is missing from the package.');
140
+ }
141
+ return fs.readFileSync(AGENTS_TEMPLATE_PATH, 'utf8');
142
+ }
143
+
144
+ function collectSkillMetadata() {
145
+ if (!fs.existsSync(bundledSkillsDir)) {
146
+ return [];
147
+ }
148
+
149
+ const entries = fs.readdirSync(bundledSkillsDir, { withFileTypes: true });
150
+ /** @type {{ name: string; description: string; location: string }[]} */
151
+ const skills = [];
152
+
153
+ for (const entry of entries) {
154
+ if (!entry.isDirectory()) {
155
+ continue;
156
+ }
157
+ const skillDir = path.join(bundledSkillsDir, entry.name);
158
+ const metadata = parseSkillFrontMatter(skillDir);
159
+ const name = metadata?.name || entry.name;
160
+ const description =
161
+ metadata?.description ||
162
+ `AI Product Kit skill ${name} (${entry.name})`;
163
+ skills.push({ name, description, location: 'project' });
164
+ }
165
+
166
+ return skills;
167
+ }
168
+
169
+ function parseSkillFrontMatter(skillDir) {
170
+ const skillFile = path.join(skillDir, 'SKILL.md');
171
+ if (!fs.existsSync(skillFile)) {
172
+ return null;
173
+ }
174
+
175
+ const content = fs.readFileSync(skillFile, 'utf8');
176
+ const match = content.match(/^---\s*[\r\n]+([\s\S]*?)[\r\n]+---/);
177
+ if (!match) {
178
+ return null;
179
+ }
180
+
181
+ return parseFrontMatter(match[1]);
182
+ }
183
+
184
+ function parseFrontMatter(block) {
185
+ const lines = block.split(/\r?\n/);
186
+ const metadata = {};
187
+
188
+ let index = 0;
189
+ while (index < lines.length) {
190
+ const rawLine = lines[index];
191
+ const line = rawLine.trim();
192
+ if (!line || line.startsWith('#')) {
193
+ index += 1;
194
+ continue;
195
+ }
196
+ const colonIndex = line.indexOf(':');
197
+ if (colonIndex === -1) {
198
+ index += 1;
199
+ continue;
200
+ }
201
+ const key = line.slice(0, colonIndex).trim();
202
+ let value = line.slice(colonIndex + 1).trim();
203
+ index += 1;
204
+ if (value === '|' || value === '>') {
205
+ const collected = [];
206
+ while (index < lines.length) {
207
+ const nextLine = lines[index];
208
+ if (!nextLine.trim()) {
209
+ break;
210
+ }
211
+ collected.push(nextLine.replace(/^[ \t]+/, ''));
212
+ index += 1;
213
+ }
214
+ value = collected.join('\n').trim();
215
+ } else {
216
+ if (
217
+ (value.startsWith('"') && value.endsWith('"')) ||
218
+ (value.startsWith("'") && value.endsWith("'"))
219
+ ) {
220
+ value = value.slice(1, -1);
221
+ }
222
+ }
223
+
224
+ if (value) {
225
+ metadata[key] = value;
226
+ }
227
+ }
228
+
229
+ return metadata;
230
+ }
231
+
232
+ function generateSkillEntries(skills) {
233
+ const sorted = [...skills].sort((a, b) => a.name.localeCompare(b.name));
234
+ return sorted
235
+ .map(
236
+ (skill) => `<skill>
237
+ <name>${skill.name}</name>
238
+ <description>${skill.description}</description>
239
+ <location>${skill.location}</location>
240
+ </skill>`
241
+ )
242
+ .join('\n\n');
243
+ }
244
+
245
+ function replaceSkillsSection(content, newSection) {
246
+ const xmlRegex = /<skills_system[\s\S]*?<\/skills_system>/;
247
+ if (xmlRegex.test(content)) {
248
+ return content.replace(xmlRegex, newSection);
249
+ }
250
+
251
+ const htmlRegex = /<!-- SKILLS_TABLE_START -->[\s\S]*?<!-- SKILLS_TABLE_END -->/;
252
+ if (htmlRegex.test(content)) {
253
+ const inner = newSection
254
+ .replace(/<skills_system[^>]*>/, '')
255
+ .replace('</skills_system>', '')
256
+ .trim();
257
+ return content.replace(htmlRegex, `<!-- SKILLS_TABLE_START -->\n${inner}\n<!-- SKILLS_TABLE_END -->`);
258
+ }
259
+
260
+ return content.trimEnd() + '\n\n' + newSection + '\n';
261
+ }
@@ -69,4 +69,4 @@ Use these MCP tools to load a Skill by name. The server maps known Skill names t
69
69
  </mcp_skills>
70
70
  <!-- MCP_SKILLS_TABLE_END -->
71
71
 
72
- <!-- rule: run node tools/build_package update-mcp to refresh this table -->
72
+ <!-- rule: use node tools/build_package update-skills to refresh this table -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guru-ai-product/ai-product-kit",
3
- "version": "0.2.251113215925",
3
+ "version": "0.2.251117160442",
4
4
  "description": "Sync the AI Product Kit Skill bundle through npx without cloning the repository.",
5
5
  "bin": {
6
6
  "ai-product-kit": "bin/setup.js",
@@ -1,10 +1,12 @@
1
1
  # GURU AI Snapshot
2
2
 
3
- Last refreshed: 2025-11-13T13:59:26.059Z
3
+ Last refreshed: 2025-11-17T08:04:42.861Z
4
4
 
5
5
  | File | Last Modified (UTC) |
6
6
  | --- | --- |
7
- | `SKILL.md` | 2025-11-13T13:11:54.681Z |
7
+ | `format-requirement-pages-with-design/requirement-page-table-format.md` | 2025-11-17T06:21:56.025Z |
8
+ | `format-requirement-pages-with-design/SKILL.md` | 2025-11-17T06:43:43.341Z |
9
+ | `SKILL.md` | 2025-11-17T06:17:37.196Z |
8
10
  | `update-requirements-from-design/scripts/sharp-runtime/node_modules/.bin/semver` | 2025-11-13T12:53:04.813Z |
9
11
  | `update-requirements-from-design/scripts/sharp-runtime/node_modules/.package-lock.json` | 2025-11-13T12:53:10.727Z |
10
12
  | `update-requirements-from-design/scripts/sharp-runtime/node_modules/@img/colour/color.cjs` | 2025-11-13T12:53:05.063Z |
@@ -119,4 +121,4 @@ Last refreshed: 2025-11-13T13:59:26.059Z
119
121
  | `update-requirements-from-design/scripts/sharp-runtime/package.json` | 2025-11-13T12:53:10.715Z |
120
122
  | `update-requirements-from-design/scripts/split-design-boards.js` | 2025-11-13T13:11:29.610Z |
121
123
  | `update-requirements-from-design/scripts/sync-design-to-requirements.js` | 2025-11-13T13:11:32.947Z |
122
- | `update-requirements-from-design/SKILL.md` | 2025-11-13T13:59:11.730Z |
124
+ | `update-requirements-from-design/SKILL.md` | 2025-11-17T06:12:02.571Z |
@@ -18,6 +18,11 @@ description: Central hub for automation-ready design-to-requirement workflows. W
18
18
  - 包含 `split-design-boards.js`(自动切分合成图)与 `sync-design-to-requirements.js`(资产映射与批量入库)等自动化工具。
19
19
  - **适用场景**:任务中提到"基于设计图更新需求"、"收到合成设计稿"、"根据视觉稿修改需求"时立即使用。
20
20
 
21
+ - **Format Requirement Pages with Design**(`./format-requirement-pages-with-design/`)
22
+ - 将需求文档中的页面说明和设计图按照标准表格格式组织。遵循两列表格格式(页面说明 | 设计图),支持多图处理、页面标题外部放置等规范。
23
+ - 包含 `requirement-page-table-format.md`(详细的表格格式规范和示例)参考文档。
24
+ - **适用场景**:任务中提到"将设计图放入表格"、"格式化需求页面"、"整理页面说明和设计图"时立即使用。
25
+
21
26
  如需扩展新的设计场景,请在 `skills/aipk_design/` 下创建子目录,按照模板完成 `SKILL.md`、`references/` 等结构,并在本文件的"当前可用的设计 Skill"中登记用途与入口路径。
22
27
 
23
28
  ## 使用方式
@@ -0,0 +1,129 @@
1
+ ---
2
+ name: format-requirement-pages-with-design
3
+ description: Format requirement document pages with design images into standardized tables. Use when requirement documents contain design images and need to be organized into a two-column table format (page description | design image) following the project's table formatting standards.
4
+ ---
5
+
6
+ # 需求页面表格格式化 Skill
7
+
8
+ **适用场景**:当需求文档中包含设计图时,将页面说明和设计图按照标准表格格式组织。当你看到任务中提到"将设计图放入表格"、"格式化需求页面"、"整理页面说明和设计图"或类似描述时,立即使用本 Skill。
9
+
10
+ ## 1. 技能定位
11
+
12
+ - **适用场景**:需求文档中包含设计图,需要将页面说明和设计图组织成标准表格格式
13
+ - **目标人群**:需求文档维护者、AI 协作写手、设计对接 PM
14
+ - **价值主张**:统一需求文档中页面说明和设计图的展示格式,提高文档可读性和一致性
15
+
16
+ ## 2. 快速上手
17
+
18
+ ### 2.1 核心规则
19
+
20
+ 1. **表格结构**:每个页面使用一个独立的 HTML 表格(`<table>`),包含两列(页面说明 | 设计图)
21
+ 2. **页面标题位置**:页面标题必须放在表格外部,作为表格的标题
22
+ 3. **多图处理**:如果一个页面有多张设计图,每张图必须单独占一行(`<tr>`),后续行页面说明列使用空的 `<td></td>`
23
+ 4. **换行格式**:表格单元格内使用 `<br>` 标签进行换行
24
+ 5. **图片引用**:使用 HTML `<img>` 标签,不使用 Markdown 图片语法
25
+
26
+ ### 2.2 基本格式示例
27
+
28
+ ```html
29
+ ##### 4.3.2.1 🆕 新增上传全身照页面
30
+
31
+ <table>
32
+ <tr>
33
+ <th>页面说明</th>
34
+ <th>设计图</th>
35
+ </tr>
36
+ <tr>
37
+ <td><strong>UI设计</strong>:<br>- 顶部:引导页进度条...</td>
38
+ <td><img src="./assets/1-上传全身照-1.png" alt=""></td>
39
+ </tr>
40
+ </table>
41
+ ```
42
+
43
+ ### 2.3 多图格式示例
44
+
45
+ ```html
46
+ ##### 4.3.2.1 🆕 新增上传全身照页面
47
+
48
+ <table>
49
+ <tr>
50
+ <th>页面说明</th>
51
+ <th>设计图</th>
52
+ </tr>
53
+ <tr>
54
+ <td><strong>UI设计</strong>:<br>- 顶部:引导页进度条...<br><br><strong>界面文案</strong>:<br>- 主标题:"Upload photo for feedback"</td>
55
+ <td><img src="./assets/1-上传全身照-1.png" alt=""></td>
56
+ </tr>
57
+ <tr>
58
+ <td></td>
59
+ <td><img src="./assets/1-上传全身照备份-1.png" alt=""></td>
60
+ </tr>
61
+ </table>
62
+ ```
63
+
64
+ ## 3. 标准流程
65
+
66
+ <table>
67
+ <tr>
68
+ <th>阶段</th>
69
+ <th>说明</th>
70
+ <th>交付物</th>
71
+ </tr>
72
+ <tr>
73
+ <td>识别</td>
74
+ <td>识别需求文档中包含设计图的页面</td>
75
+ <td>待格式化页面列表</td>
76
+ </tr>
77
+ <tr>
78
+ <td>提取</td>
79
+ <td>提取每个页面的说明内容和设计图引用</td>
80
+ <td>页面说明文本、设计图路径</td>
81
+ </tr>
82
+ <tr>
83
+ <td>格式化</td>
84
+ <td>按照表格格式规范组织内容</td>
85
+ <td>格式化的表格代码</td>
86
+ </tr>
87
+ <tr>
88
+ <td>验证</td>
89
+ <td>检查表格格式是否符合规范</td>
90
+ <td>验证通过的表格式需求文档</td>
91
+ </tr>
92
+ </table>
93
+
94
+ ## 4. 详细规范
95
+
96
+ 详细的格式规范、示例和注意事项请参考 [表格格式规范文档](./requirement-page-table-format.md)。该文档包含:
97
+
98
+ - 完整的表格结构规范
99
+ - 多张设计图的处理方式
100
+ - 页面说明内容的格式要求
101
+ - 设计图引用格式
102
+ - 正确和错误的示例对比
103
+ - 完整的检查清单
104
+
105
+ ## 5. AI 协作要点
106
+
107
+ ### 5.1 识别场景
108
+
109
+ 当遇到以下情况时,应使用本 Skill:
110
+
111
+ - 需求文档中包含设计图引用
112
+ - 需要将页面说明和设计图组织成表格
113
+ - 需要统一需求文档的格式规范
114
+
115
+ ### 5.2 处理步骤
116
+
117
+ 1. **扫描文档**:识别所有包含设计图的页面
118
+ 2. **提取内容**:提取每个页面的说明文本和设计图路径
119
+ 3. **应用格式**:按照规范将内容组织成表格
120
+ 4. **验证检查**:使用检查清单验证格式正确性
121
+
122
+ ### 5.3 检查清单
123
+
124
+ 详细的检查清单请参考 [表格格式规范文档](./requirement-page-table-format.md) 中的"检查清单"章节。
125
+
126
+ ## 6. 附加资源
127
+
128
+ - [表格格式规范参考](./requirement-page-table-format.md) - 详细的格式规范、示例和检查清单
129
+ - [需求文档撰写标准](../../../docs/guide_writing_standard/SKILL.md) - 项目文档撰写标准
@@ -0,0 +1,250 @@
1
+ # 需求文档页面表格格式规范
2
+
3
+ ## 概述
4
+
5
+ 本文档规范了在需求文档中如何将页面说明和设计图组织成 HTML 表格格式,以提高文档的可读性和渲染兼容性。
6
+
7
+ ## 基本格式
8
+
9
+ ### 表格结构
10
+
11
+ 每个页面使用一个独立的 HTML 表格,包含两列:
12
+
13
+ ```html
14
+ <table>
15
+ <tr>
16
+ <th>页面说明</th>
17
+ <th>设计图</th>
18
+ </tr>
19
+ <tr>
20
+ <td>[页面说明内容]</td>
21
+ <td>[设计图引用]</td>
22
+ </tr>
23
+ </table>
24
+ ```
25
+
26
+ ### 页面标题位置
27
+
28
+ **页面标题必须放在表格外部**,作为表格的标题。
29
+
30
+ **正确示例**:
31
+
32
+ ```html
33
+ ##### 4.3.2.1 🆕 新增上传全身照页面
34
+
35
+ <table>
36
+ <tr>
37
+ <th>页面说明</th>
38
+ <th>设计图</th>
39
+ </tr>
40
+ <tr>
41
+ <td><strong>UI设计</strong>:<br>- 顶部:引导页进度条...</td>
42
+ <td><img src="./assets/1-上传全身照-1.png" alt=""></td>
43
+ </tr>
44
+ </table>
45
+ ```
46
+
47
+ **错误示例**:
48
+
49
+ ```html
50
+ ##### 4.3.2.1 🆕 新增上传全身照页面
51
+
52
+ <table>
53
+ <tr>
54
+ <th>页面标题</th>
55
+ <th>页面说明</th>
56
+ <th>设计图</th>
57
+ </tr>
58
+ <tr>
59
+ <td>新增上传全身照页面</td>
60
+ <td><strong>UI设计</strong>:...</td>
61
+ <td><img src="./assets/1-上传全身照-1.png" alt=""></td>
62
+ </tr>
63
+ </table>
64
+ ```
65
+
66
+ ## 多张设计图的处理
67
+
68
+ ### 规则
69
+
70
+ 如果一个页面有多张设计图,**每张图必须单独占一行**,避免将左侧页面说明列撑得太高。
71
+
72
+ ### 格式
73
+
74
+ 第一行包含完整的页面说明和第一张图,后续行页面说明列为空,只包含对应的设计图。
75
+
76
+ **格式示例**:
77
+
78
+ ```html
79
+ <table>
80
+ <tr>
81
+ <th>页面说明</th>
82
+ <th>设计图</th>
83
+ </tr>
84
+ <tr>
85
+ <td><strong>UI设计</strong>:<br>- 顶部:引导页进度条...<br><br><strong>界面文案</strong>:<br>- 主标题:"Upload photo for feedback"<br>...</td>
86
+ <td><img src="./assets/1-上传全身照-1.png" alt=""></td>
87
+ </tr>
88
+ <tr>
89
+ <td></td>
90
+ <td><img src="./assets/1-上传全身照备份-1.png" alt=""></td>
91
+ </tr>
92
+ </table>
93
+ ```
94
+
95
+ ### 多图页面示例
96
+
97
+ **示例1:两张图**
98
+
99
+ ```html
100
+ ##### 4.3.2.1 🆕 新增上传全身照页面
101
+
102
+ <table>
103
+ <tr>
104
+ <th>页面说明</th>
105
+ <th>设计图</th>
106
+ </tr>
107
+ <tr>
108
+ <td><strong>UI设计</strong>:<br>- 顶部:引导页进度条和返回按钮<br>- 中央:功能示意图展示...<br><br><strong>界面文案</strong>:<br>- 主标题:"Upload photo for feedback"<br>...</td>
109
+ <td><img src="./assets/1-上传全身照-1.png" alt=""></td>
110
+ </tr>
111
+ <tr>
112
+ <td></td>
113
+ <td><img src="./assets/1-上传全身照备份-1.png" alt=""></td>
114
+ </tr>
115
+ </table>
116
+ ```
117
+
118
+ **示例2:四张图**
119
+
120
+ ```html
121
+ ##### 4.3.2.6 🆕 结果修改页面
122
+
123
+ <table>
124
+ <tr>
125
+ <th>页面说明</th>
126
+ <th>设计图</th>
127
+ </tr>
128
+ <tr>
129
+ <td><strong>UI设计</strong>:<br>- 复用现有手动输入页面的UI组件<br>- 预填充AI识别结果<br><br><strong>界面文案</strong>:<br>- 主标题:"Review and edit your information"<br>...</td>
130
+ <td><img src="./assets/7-性别-1.png" alt=""></td>
131
+ </tr>
132
+ <tr>
133
+ <td></td>
134
+ <td><img src="./assets/8-年龄-1.png" alt=""></td>
135
+ </tr>
136
+ <tr>
137
+ <td></td>
138
+ <td><img src="./assets/9-身高-1.png" alt=""></td>
139
+ </tr>
140
+ <tr>
141
+ <td></td>
142
+ <td><img src="./assets/10-身高-1.png" alt=""></td>
143
+ </tr>
144
+ </table>
145
+ ```
146
+
147
+ ## 页面说明内容格式
148
+
149
+ ### 使用HTML换行标签
150
+
151
+ 在表格单元格中,使用 `<br>` 标签进行换行,而不是使用 Markdown 的换行。
152
+
153
+ **正确示例**:
154
+
155
+ ```html
156
+ <table>
157
+ <tr>
158
+ <th>页面说明</th>
159
+ <th>设计图</th>
160
+ </tr>
161
+ <tr>
162
+ <td><strong>UI设计</strong>:<br>- 顶部:引导页进度条<br>- 中央:功能示意图<br><br><strong>界面文案</strong>:<br>- 主标题:"Upload photo for feedback"</td>
163
+ <td><img src="./assets/1.png" alt=""></td>
164
+ </tr>
165
+ </table>
166
+ ```
167
+
168
+ **错误示例**:
169
+
170
+ ```html
171
+ <table>
172
+ <tr>
173
+ <th>页面说明</th>
174
+ <th>设计图</th>
175
+ </tr>
176
+ <tr>
177
+ <td><strong>UI设计</strong>:
178
+ - 顶部:引导页进度条
179
+ - 中央:功能示意图
180
+
181
+ <strong>界面文案</strong>:
182
+ - 主标题:"Upload photo for feedback"</td>
183
+ <td><img src="./assets/1.png" alt=""></td>
184
+ </tr>
185
+ </table>
186
+ ```
187
+
188
+ ### 列表格式
189
+
190
+ 在表格单元格中,列表项使用 `-` 开头,并用 `<br>` 分隔。
191
+
192
+ **示例**:
193
+
194
+ ```html
195
+ <table>
196
+ <tr>
197
+ <th>页面说明</th>
198
+ <th>设计图</th>
199
+ </tr>
200
+ <tr>
201
+ <td><strong>界面文案</strong>:<br>- 主标题:"Upload photo for feedback"<br>- 被扫描后的功能示意图文案:<br> - 性别:"Female"<br> - 年龄:"20"</td>
202
+ <td><img src="./assets/1.png" alt=""></td>
203
+ </tr>
204
+ </table>
205
+ ```
206
+
207
+ ## 设计图引用格式
208
+
209
+ ### 基本格式
210
+
211
+ 使用 HTML `<img>` 标签:
212
+
213
+ ```html
214
+ <img src="./assets/image-name.png" alt="">
215
+ ```
216
+
217
+ ### 带描述文本的格式
218
+
219
+ 如果需要描述文本,使用 `alt` 属性:
220
+
221
+ ```html
222
+ <img src="./assets/image-name.png" alt="描述文本">
223
+ ```
224
+
225
+ **示例**:
226
+
227
+ ```html
228
+ <img src="./assets/12-传统方式上传-性别.png" alt="传统方式上传-性别">
229
+ ```
230
+
231
+ ## 注意事项
232
+
233
+ 1. **表格格式**:使用 HTML `<table>` 标签,不使用 Markdown 表格语法
234
+ 2. **页面标题位置**:页面标题(如 `##### 4.3.2.1`)必须放在表格外部
235
+ 3. **多图处理**:多张图时,每张图单独一行(`<tr>`),后续行页面说明列使用空的 `<td></td>`
236
+ 4. **换行格式**:表格单元格内使用 `<br>` 标签换行
237
+ 5. **图片引用**:使用 HTML `<img>` 标签,`src` 属性使用相对路径,`alt` 属性可添加描述文本
238
+ 6. **表格对齐**:保持表格格式整洁,列宽适中
239
+
240
+ ## 检查清单
241
+
242
+ 在创建或修改页面表格时,请检查:
243
+
244
+ - [ ] 使用 HTML `<table>` 标签,不使用 Markdown 表格语法
245
+ - [ ] 页面标题在表格外部
246
+ - [ ] 表格只有两列(`<th>页面说明</th>` 和 `<th>设计图</th>`)
247
+ - [ ] 多张图时,每张图单独一行(`<tr>`),后续行页面说明列为空 `<td></td>`
248
+ - [ ] 表格单元格内使用 `<br>` 进行换行
249
+ - [ ] 图片使用 `<img>` 标签,`src` 路径正确且可访问
250
+ - [ ] 表格格式整洁,列宽适中