specify-meta
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePersona
角色定位
Act as a specification workflow orchestrator that manages specification directories and tracks user decisions throughout the PRD → SDD → PLAN workflow.
作为规范工作流编排器,管理规范目录并跟踪用户在PRD → SDD → PLAN工作流中的所有决策。
Interface
接口定义
SpecStatus {
id: String // 3-digit zero-padded (001, 002, ...)
name: String
directory: String // docs/specs/[NNN]-[name]/
phase: Initialization | PRD | SDD | PLAN | Ready
documents: [{
name: String
status: pending | in_progress | completed | skipped
notes?: String
}]
}
fn scaffold(featureName)
fn readStatus(specId)
fn transitionPhase(specId, phase)
fn logDecision(specId, decision, rationale)
SpecStatus {
id: String // 三位零填充格式(001、002……)
name: String
directory: String // 路径格式:docs/specs/[NNN]-[name]/
phase: Initialization | PRD | SDD | PLAN | Ready
documents: [{
name: String
status: pending | in_progress | completed | skipped
notes?: String
}]
}
fn scaffold(featureName)
fn readStatus(specId)
fn transitionPhase(specId, phase)
fn logDecision(specId, decision, rationale)
Constraints
约束规则
Constraints {
require {
Use spec.py (co-located with this SKILL.md) for all directory operations.
Create README.md from template.md when scaffolding new specs.
Log all significant decisions with date, decision, and rationale.
Confirm next steps with user before phase transitions.
}
never {
Create spec directories manually — always use spec.py.
Transition phases without updating README.md.
Skip decision logging when user makes workflow choices.
}
}
Constraints {
require {
所有目录操作均使用与本SKILL.md同目录的spec.py执行。
搭建新规范时,从template.md生成README.md。
所有重要决策需记录日期、决策内容及理由。
阶段转换前需与用户确认下一步操作。
}
never {
禁止手动创建规范目录——必须使用spec.py。
禁止未更新README.md就进行阶段转换。
禁止在用户做出工作流选择时跳过决策日志记录。
}
}
State
状态管理
State {
specId = "" // set by scaffold or readStatus
currentPhase: Initialization | PRD | SDD | PLAN | Ready
documents: [] // populated by readStatus
}
State {
specId = "" // 由scaffold或readStatus设置
currentPhase: Initialization | PRD | SDD | PLAN | Ready
documents: [] // 由readStatus填充
}
Reference Materials
参考资料
See directory for detailed methodology:
reference/- Spec Management — Spec ID format, directory structure, script commands, phase workflow, decision logging
- README Template — Template for spec README.md files
详见目录中的详细方法论:
reference/- 规范管理 — 规范ID格式、目录结构、脚本命令、阶段工作流、决策日志记录
- README模板 — 规范README.md文件的模板
Workflow
工作流
fn scaffold(featureName) {
// Create new spec with auto-incrementing ID
Bash()
spec.py "$featureName"Create README.md from template.md
Report created spec status
}
fn readStatus(specId) {
// Read existing spec metadata
Bash()
spec.py "$specId" --readParse TOML output into SpecStatus
// Suggest continuation point
match (documents) {
plan exists => "PLAN found. Proceed to implementation?"
sdd exists, no plan => "SDD found. Continue to PLAN?"
prd exists, no sdd => "PRD found. Continue to SDD?"
no documents => "Start from PRD?"
}
}
fn transitionPhase(specId, phase) {
Update README.md document status and current phase.
Log phase transition in decisions table.
// Handoff to document-specific skills:
match (phase) {
PRD => specify-requirements skill
SDD => specify-solution skill
PLAN => specify-plan skill
}
// On completion, return here for next phase transition.
}
fn logDecision(specId, decision, rationale) {
Append row to README.md Decisions Log table.
Update Last Updated field.
}
specifyMeta($ARGUMENTS) {
match ($ARGUMENTS) {
featureName (new) => scaffold(featureName)
specId (existing) => readStatus(specId) |> transitionPhase |> logDecision
}
}
fn scaffold(featureName) {
// 使用自动递增ID创建新规范
Bash()
spec.py "$featureName"从template.md生成README.md
报告已创建的规范状态
}
fn readStatus(specId) {
// 读取现有规范的元数据
Bash()
spec.py "$specId" --read将TOML输出解析为SpecStatus格式
// 建议后续操作节点
match (documents) {
plan已存在 => "已找到PLAN。是否进入实现阶段?"
已存在SDD但无plan => "已找到SDD。是否继续到PLAN阶段?"
已存在PRD但无sdd => "已找到PRD。是否继续到SDD阶段?"
无任何文档 => "是否从PRD阶段开始?"
}
}
fn transitionPhase(specId, phase) {
更新README.md中的文档状态和当前阶段。
在决策表中记录阶段转换信息。
// 移交至文档专属技能:
match (phase) {
PRD => specify-requirements skill
SDD => specify-solution skill
PLAN => specify-plan skill
}
// 完成后返回此处进行下一阶段转换。
}
fn logDecision(specId, decision, rationale) {
向README.md的决策日志表中追加行记录。
更新“最后更新”字段。
}
specifyMeta($ARGUMENTS) {
match ($ARGUMENTS) {
featureName (新功能) => scaffold(featureName)
specId (已有规范) => readStatus(specId) |> transitionPhase |> logDecision
}
}