用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dong90/oh-my-taiyiforge --skill taiyi-requirement命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | taiyi-requirement |
| description | TaiyiForge 第2阶段 — 需求分析,REQUIREMENT.md。四端通用。 |
| paradigm | Partner |
进入本阶段前请优先读
.taiyi/changes/<slug>/PHASE-CONTEXT.md(~500 tokens),不要全量加载上游工件。
本阶段使用以下框架:
| 框架 | 用途 | 何时加载 |
|---|---|---|
| Harness | 阶段门禁与推进(status → continue;legacy:npx taiyi complete) | 全程 |
| OpenSpec | 将 REQUIREMENT.md 同步到 openspec 格式 | 可选 |
Superpowers / GStack / Spec-Kit / OMO 在本阶段不涉及。
engineTruth.completedPhases 含 change 或 currentPhase 已推进)taiyi list 检查其他活跃 change 的 scope)| Profile | REQUIREMENT.md 要求 |
|---|---|
full | 完整:User Stories + AC(Given/When/Then) + 域语言 + Traceability |
api/ui | User Stories + AC,域语言可选 |
lite | 仅 AC 列表,可省 User Stories |
micro/spike | 可跳过本阶段 |
nano | 跳过 |
每个 FR 必须声明触发点:
trigger(谁调用、什么时机)trigger 指向的 caller_module 不在本 change scope 中 → 填 blocked_by 标注依赖blocked_by 非空 → 本阶段不能过关,等依赖 change 完成后再继续"functional_requirements": [{
"module": "orchestrator",
"items": [{
"id": "FR-T01",
"description": "track(slug,role,amount) 更新 pipeline.json tokenBudget.used",
"trigger": "executor.dispatch() 每次调用后",
"caller_module": "packages/orchestrator/src/executor.ts",
"blocked_by": "M4-executor"
}]
}]
blocked_by 非空时引擎会在 status 中报 blocker,阻止进入 design 阶段。
| 层 | 路径 | 职责 |
|---|---|---|
| 语义真源 | requirement.json | Zod(src/schemas/requirement.ts) |
| 生成视图 | REQUIREMENT.md | hbs(src/templates/requirement.hbs) |
| 流程 | 本 Skill | US / AC / 域语言 / Traceability 纪律 |
工作流:编辑 json → scripts/taiyi-forge.sh render <slug> requirement → status → continue。
详见 docs/taiyi/artifact-contract.md。
| 字段 | 要求 |
|---|---|
title | 一句话概括核心需求 |
features | 核心功能点列表 |
scope_out | 明确排除项(对齐 CHANGE scope.excludes) |
acceptance_criteria | ≥1 条;id + description;Given/When/Then 写在 description |
functional_requirements | 可选;按模块组织 |
non_functional | 可选;performance / security / availability |
error_rescue_map | 可选;错误 → 用户可见 → 恢复 |
shadow_paths / non_happy_path_cases | 可选;边界与非快乐路径 |
dependencies | 可选;外部依赖与风险 |
evidence | AC 标 is_checked=true 时必填 |
从 CHANGE.md Motivation + Scope 拆出用户故事。每条用标准格式:
## US-{N}: {标题}
As a **{角色}**
I want **{功能}**
So that **{价值}**
### Acceptance Criteria
**AC-{N}.{M}**: {描述}
Given {前置条件}
When {操作}
Then {预期结果}
要求:
每条 AC 使用 Given/When/Then 格式:
**AC-1.1**: 用户输入有效邮箱能通过验证
Given 用户输入了 "user@example.com"
When 系统校验邮箱格式
Then 返回验证通过
好 AC:
好 AC 例子:
坏 AC:
从 US + AC 中提取关键术语,写入 REQUIREMENT.md preamble:
## 域语言
| 术语 | 定义 | 使用场景 |
|------|------|---------|
| TranslationRequest | 用户提交的翻译请求 | US-1, US-2 |
| TranslationDirection | 翻译方向枚举(dev→product 等) | US-3 |
要求:
建立 AC ↔ CHANGE Success Criteria ↔ 验证方式的追踪表:
## Traceability
| AC | CHANGE SC | 验证方式 |
|----|-----------|---------|
| AC-1.1 | SC-1(API 返回 200) | curl -s -w '%{http_code}' POST /api/translate |
| AC-2.1 | SC-2(SSE 流式响应) | curl -N -s POST /api/translate/stream |
要求:
## 质量自检;有未通过项则不要过关。scripts/taiyi-forge.sh status <slug> --json --compact — 解析 engineTruth(qualityReady / blockers)。scripts/taiyi-forge.sh continue <slug>。status --json --compact,读 engineTruth;若 currentPhase 已变为 design,切换到 taiyi-design Skill 并通知用户。Legacy:npx taiyi complete <slug> requirement 仍可用;聊天优先 /taiyi:continue。
.taiyi/changes/<slug>/REQUIREMENT.md.taiyi/changes/<slug>/requirement.json| 下游 | 需要 |
|---|---|
taiyi-design | User Stories → 方案必须覆盖的功能;AC → 设计决策的验收标准;域语言 → 代码中一致的术语 |
taiyi-test | AC(Given/When/Then)→ 第 1 轮功能测试的用例来源;Traceability → 测试覆盖范围 |
| 场景 | 处理 |
|---|---|
continue 被拒 | 检查 Traceability 是否缺失(AC↔CHANGE SC)、AC 是否可量化。修复后 status 再 continue。最多 1 次自动重试 |
| CHANGE 未过关(phase guard) | 告知用户 change 阶段未完成,无法继续 |
| US 与已有 change 的 US 重叠 | 标注引用关系,避免重复或冲突的 AC |
| 域语言与已有 CONTEXT.md 冲突 | 使用已有术语,不要另起一套命名。记录到 Traceability |
| 误过关本阶段或后续 | scripts/taiyi-forge.sh undo <slug> requirement(回滚本阶段及之后已完成阶段) |
<fatal_constraints>