feat: add frontend development guidelines and structure documentation

- Introduced API guidelines for interface contracts and request handling.
- Added design tokens usage guidelines for consistent styling across the project.
- Established DTO guidelines for defining request parameters and response data types.
- Created frontend structure guidelines to clarify directory organization and code placement rules.
- Compiled a comprehensive frontend development guideline document covering various aspects of the development process.
- Implemented quality guidelines to ensure code maintainability and adherence to best practices.
This commit is contained in:
yuxuanhui
2026-07-25 22:20:25 +08:00
commit 91861565bb
78 changed files with 5001 additions and 0 deletions
@@ -0,0 +1,33 @@
---
id: INTAKE-20260629-001
case_id: REQ-20260629-001-example
type: intake
stage: user-requirement
owner_role: PM
status: draft
source_ids: []
derived_ids:
- UR-20260629-001
created: 2026-06-29
updated: 2026-06-29
---
# 原始输入:AI 研发工作流
## 背景
希望在当前 vault 中开始研究 AI 研发工作流,方向是 `spec + skill` 双驱动。
## 原始描述
每个需求由多个文档关联起来,从开始输入到后续逐项产出都能追踪。阶段包括用户需求、研发需求、详细设计、编码、测试。
## 期望结果
逐步完成相关 skill 和规范说明,支持长期迭代和调优。
## 待确认问题
- OR、DR、DS 的最终命名和字段是否需要贴合现有公司标准。
- 每个阶段是否需要正式审批人和审批记录。
- 是否需要自动化脚本检查追踪关系。
@@ -0,0 +1,37 @@
---
id: RA-20260629-001
case_id: REQ-20260629-001-example
type: requirement-analysis
stage: user-requirement
owner_role: PM
status: draft
source_ids:
- UR-20260629-001
derived_ids:
- OR-20260629-001
created: 2026-06-29
updated: 2026-06-29
---
# 需求分析:AI 研发工作流研究区
## 问题拆解
- 需求链路容易断裂,需要统一 artifact 模型。
- skill 容易散落,需要独立源目录。
- 真实需求和规范资产容易混淆,需要分层目录。
## 约束
- 当前阶段以 vault 内 Markdown 为主。
- 不要求一次完成所有 skill。
- 需要支持后续反复调优。
## 风险
- 过早细化字段会导致维护成本高。
- skill 如果直接做成正式安装版,迭代成本会变高。
## 决策点
- 先用本目录维护 skill 草稿,稳定后再安装到 Codex skill 目录。
@@ -0,0 +1,33 @@
---
id: SA-20260629-001
case_id: REQ-20260629-001-example
type: scenario-analysis
stage: user-requirement
owner_role: PM
status: draft
source_ids:
- UR-20260629-001
- RA-20260629-001
derived_ids:
- OR-20260629-001
created: 2026-06-29
updated: 2026-06-29
---
# 场景分析:AI 研发工作流研究区
## 主场景
用户提出一个新需求后,在 `50-cases/` 下创建 case,并按阶段生成 UR、RA、SA、OR、DR、DS、TASK、TP、TC。
## 替代场景
用户只想打磨某一个 skill,则在 `20-skills/` 中修改草稿,并用 `60-evaluations/` 中的评测样本验证。
## 异常场景
如果某个下游产物找不到上游来源,则需要在追踪矩阵中标记为 `missing` 或补齐 `source_ids`。
## 边界场景
如果只是零散想法,还不进入正式 case,可以先放入现有 `AI Coding/inbox/`,成熟后再转入本工作区。
@@ -0,0 +1,50 @@
---
id: UR-20260629-001
case_id: REQ-20260629-001-example
type: user-requirement
stage: user-requirement
owner_role: PM
status: draft
source_ids:
- INTAKE-20260629-001
derived_ids:
- RA-20260629-001
- SA-20260629-001
created: 2026-06-29
updated: 2026-06-29
---
# 用户需求:建立 AI 研发工作流研究区
## 一句话需求
作为 AI 研发工作流研究者,我希望建立一套可长期迭代的目录、规范、模板和 skill 草稿,以便逐步沉淀从需求到测试的完整链路。
## 用户目标
- 能按阶段组织需求产物。
- 能追踪每个需求从输入到最终测试的链路。
- 能逐步调优 PM、SE、RD、测试侧 skill。
## 业务价值
降低 AI 参与研发时的上下文断裂,提高需求、设计、编码、测试之间的一致性。
## 范围
### 包含
- 目录结构。
- 初始规范。
- 初始模板。
- 初始 skill 草稿。
- 示例 case。
### 不包含
- 一次性完成所有正式 skill。
- 直接接入外部项目管理系统。
## 验收方向
能在 vault 中看到完整骨架,并能基于示例 case 继续完善下一阶段产物。
@@ -0,0 +1,39 @@
---
id: DR-20260629-001
case_id: REQ-20260629-001-example
type: development-requirement
stage: development-requirement
owner_role: SE
status: draft
source_ids:
- OR-20260629-001
derived_ids:
- DS-20260629-001
created: 2026-06-29
updated: 2026-06-29
---
# DR:研发需求
## 功能需求
- 创建长期研究目录。
- 创建标准文档。
- 创建模板文档。
- 创建 skill 草稿。
- 创建示例 case。
## 非功能需求
- 文档应便于 Obsidian 浏览。
- 结构应支持长期迭代。
- skill 草稿应尽量接近 Codex skill 格式。
## 数据需求
- 每个 artifact 使用 frontmatter 维护追踪字段。
## 兼容性
- 不破坏 `AI Coding` 现有目录。
- 不要求立即安装到 Codex skill 目录。
@@ -0,0 +1,40 @@
---
id: OR-20260629-001
case_id: REQ-20260629-001-example
type: objective-requirement
stage: development-requirement
owner_role: SE
status: draft
source_ids:
- RA-20260629-001
- SA-20260629-001
derived_ids:
- DR-20260629-001
created: 2026-06-29
updated: 2026-06-29
---
# OR:研发目标需求
## 工程目标
在 vault 中建立一个可长期演化的 AI 研发工作流知识区,并支持需求链路追踪。
## 交付范围
- 目录结构。
- 元模型规范。
- 生命周期和追踪规范。
- 模板。
- skill 草稿。
- 示例 case。
## 成功标准
- 所有核心目录存在。
- 核心文档可被用户继续编辑。
- 示例 case 能表达从 INTAKE 到 TC 的链路。
## 风险
- 当前 OR/DR/DS 定义是初始约定,后续可能按用户习惯调整。
@@ -0,0 +1,43 @@
---
id: DS-20260629-001
case_id: REQ-20260629-001-example
type: design-specification
stage: detailed-design
owner_role: RD
status: draft
source_ids:
- OR-20260629-001
- DR-20260629-001
derived_ids:
- TASK-20260629-001
- TP-20260629-001
created: 2026-06-29
updated: 2026-06-29
---
# DS:详细设计
## 影响范围
新增 `AI Coding/AI-RD-Workflow/`,不修改现有文件。
## 模块拆分
- `00-meta`:元信息。
- `10-standards`:规范。
- `20-skills`:skill 草稿。
- `30-templates`:模板。
- `40-workflows`:工作流。
- `50-cases`:需求实例。
- `60-evaluations`:评测。
- `90-archive`:归档。
## 开发任务拆分
- TASK-20260629-001:创建目录和初始文档。
## 测试点
- 检查目录是否存在。
- 检查关键文档是否存在。
- 检查示例 case 是否有完整追踪链路。
@@ -0,0 +1,34 @@
---
id: TASK-20260629-001
case_id: REQ-20260629-001-example
type: implementation-task
stage: implementation
owner_role: RD
status: draft
source_ids:
- DS-20260629-001
derived_ids: []
created: 2026-06-29
updated: 2026-06-29
---
# TASK:创建目录和初始文档
## 目标
创建 AI 研发工作流研究区的第一版骨架。
## 文件范围
- `AI Coding/AI-RD-Workflow/`
## 完成标准
- 目录存在。
- 核心规范和模板存在。
- 示例 case 存在。
- 追踪矩阵存在。
## 验证方式
使用 `find` 检查目录和文件结构。
@@ -0,0 +1,21 @@
---
id: TC-20260629-001
case_id: REQ-20260629-001-example
type: test-case
stage: test
owner_role: QA
status: draft
source_ids:
- TP-20260629-001
derived_ids: []
created: 2026-06-29
updated: 2026-06-29
---
# 测试用例:目录骨架
| 用例 ID | 类型 | 来源 ID | 前置条件 | 步骤 | 预期结果 | 优先级 |
| --- | --- | --- | --- | --- | --- | --- |
| TC-20260629-001-01 | positive | DS-20260629-001 | vault 可访问 | 枚举 `AI Coding/AI-RD-Workflow/` | 核心目录存在 | P0 |
| TC-20260629-001-02 | positive | DS-20260629-001 | 文件已创建 | 检查 `50-cases/REQ-20260629-001-example/traceability.md` | 能看到从 INTAKE 到 TC 的链路 | P0 |
| TC-20260629-001-03 | boundary | DR-20260629-001 | 已有 `AI Coding` 内容 | 检查现有目录 | 现有文件未被修改 | P1 |
@@ -0,0 +1,32 @@
---
id: TP-20260629-001
case_id: REQ-20260629-001-example
type: test-plan
stage: test
owner_role: QA
status: draft
source_ids:
- DS-20260629-001
derived_ids:
- TC-20260629-001
created: 2026-06-29
updated: 2026-06-29
---
# 测试计划:目录骨架
## 测试范围
- 目录结构。
- 核心文档。
- 示例 case 追踪链路。
## 测试策略
通过文件枚举检查结构,通过人工阅读检查文档是否可继续迭代。
## 准出条件
- 关键目录和文件存在。
- 示例 case 中每个阶段至少有一个 artifact。
- `traceability.md` 能表达上游和下游关系。
@@ -0,0 +1,23 @@
---
id: TRACE-REQ-20260629-001
case_id: REQ-20260629-001-example
type: traceability-matrix
status: draft
created: 2026-06-29
updated: 2026-06-29
---
# 追踪矩阵
| 上游 ID | 下游 ID | 关系 | 覆盖状态 | 备注 |
| --- | --- | --- | --- | --- |
| INTAKE-20260629-001 | UR-20260629-001 | derives | covered | 原始输入转用户需求 |
| UR-20260629-001 | RA-20260629-001 | analyzes | covered | 用户需求分析 |
| UR-20260629-001 | SA-20260629-001 | scenarios | covered | 场景分析 |
| RA-20260629-001 | OR-20260629-001 | translates | partial | 待补 SE 细化 |
| SA-20260629-001 | OR-20260629-001 | translates | partial | 待补 SE 细化 |
| OR-20260629-001 | DR-20260629-001 | details | partial | 待补工程要求 |
| DR-20260629-001 | DS-20260629-001 | designs | partial | 待补详细设计 |
| DS-20260629-001 | TASK-20260629-001 | implements | partial | 待补任务拆分 |
| DS-20260629-001 | TP-20260629-001 | tests | partial | 待补测试计划 |
| TP-20260629-001 | TC-20260629-001 | cases | partial | 待补测试用例 |