From b09e203a90fa0dae5ca82ff41bf10803e58ce6ed Mon Sep 17 00:00:00 2001 From: ittoview Date: Sun, 22 Mar 2026 14:59:59 +0000 Subject: [PATCH] =?UTF-8?q?feat(=E5=91=BD=E4=BB=A4):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=BD=B4=E6=95=B0=E6=8D=AE=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=20Skill=20=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/commands/timeline.md | 120 +++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 .claude/commands/timeline.md diff --git a/.claude/commands/timeline.md b/.claude/commands/timeline.md new file mode 100644 index 0000000..abf1cf4 --- /dev/null +++ b/.claude/commands/timeline.md @@ -0,0 +1,120 @@ +--- +name: timeline +description: 维护软考高项时间轴数据 +--- + +# 时间轴数据维护 + +维护 `src/data/timeline-items.json` 的时间轴数据。 + +## 核心数据结构 + +```typescript +interface TimelineItem { + id: string; // TL001, TL002... + timeText: string; // "2035年", "2021年3月" + sortKey: string; // "20350000", "20210300" + timePrecision: 'year' | 'month' | 'day'; + theme: string; // 主题/章节 + excerpt: string; // 原文摘录(必须保真) + sourceAnchor?: string; // 来源锚点 + sourceAnchorType?: 'meeting' | 'document' | 'organization' | 'person' | 'policy' | 'report' | 'other'; + sourcePosition?: string; // 教材定位 +} +``` + +## sortKey 生成规则 + +- 年: `2035年` → `20350000` +- 年月: `2021年3月` → `20210300` +- 年月日: `2021年3月15日` → `20210315` + +## 时间类型判断 + +**提出时间 vs 目标时间:** +- 提出时间: 政策/文件发布时间 +- 目标时间: "到XX年实现"的目标年份 + +示例: +``` +"《十四五规划和2035年远景目标纲要》提出..." +→ 挂载到 2021年(提出时间) + +"到2035年基本实现现代化" +→ 挂载到 2035年(目标时间) +``` + +## 原文摘录规范 + +**必须遵守:** +- 保留原文句式 +- 只修正明显 OCR 错字(如"深人"→"深入") +- 不改写、不总结、不替换 +- 不确定的内容必须标记或询问 + +## 操作流程 + +1. 读取 `src/data/timeline-items.json` +2. 校验数据(ID唯一性、sortKey格式、原文校对) +3. 执行修改 +4. 更新 `src/data/changelog.json` +5. 询问用户是否提交 +6. 运行 `npm run build` 检查 +7. 提交推送 + +## 注意事项 + +- `excerpt` 必须是原文,只修正OCR错字 +- 同类主题统一命名 +- 提交格式: `feat(时间轴): 添加XX年XX主题节点` + +## 常见错误 + +### ❌ 错误示例 + +**时间类型混淆:** +```json +// 错误:将远景目标年份当作提出时间 +{ "timeText": "2035年", "excerpt": "《...2035年远景目标纲要》提出..." } +``` + +**sortKey 格式错误:** +```json +// 错误:月份未补零 +{ "timeText": "2021年3月", "sortKey": "202103" } +``` + +**原文改写:** +```json +// 错误:用摘要替代原文 +{ "excerpt": "提出了数字化转型目标" } +``` + +### ✅ 正确示例 + +```json +{ + "id": "TL004", + "timeText": "2021年", + "sortKey": "20210000", + "timePrecision": "year", + "theme": "产业数字化转型", + "excerpt": "《中华人民共和国国民经济和社会发展第十四个五年规划和2035年远景目标纲要》明确提出了推进产业数字化转型,实施"上云用数赋智"行动,推动数据赋能全产业链协同转型。", + "sourceAnchor": "《中华人民共和国国民经济和社会发展第十四个五年规划和2035年远景目标纲要》", + "sourceAnchorType": "document" +} +``` + +## 快速检查清单 + +添加新节点前必须确认: + +- [ ] ID 按序递增且唯一 +- [ ] timeText 与 sortKey 匹配 +- [ ] timePrecision 正确 +- [ ] excerpt 为校对后的原文 +- [ ] theme 命名统一 +- [ ] sourceAnchor 准确 +- [ ] 已更新 changelog +- [ ] 构建通过 +- [ ] 用户确认提交