Files
ittoview/.claude/commands/timeline.md

121 lines
3.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
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
- [ ] 构建通过
- [ ] 用户确认提交