using-aisdlc
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseusing-aisdlc(在 sdlc-dev 中使用 AI SDLC / Spec Pack 流程)
using-aisdlc (Using AI SDLC / Spec Pack Process in sdlc-dev)
概览
Overview
这是一个“导航 + 门禁”型 Skill:用于在 sdlc-dev 的 Spec Pack()流程里,由本 Skill 作为“唯一路由器(Router)”决定下一步要用的 skill,并用硬门禁防止上下文漂移与写错目录。
{num}-{short-name}开始时宣布:「我正在使用 using-aisdlc 技能导航 Spec Pack 流程并执行门禁校验。」
本 Skill 现在同时覆盖两条链路:
- 需求链路(R0–R4):
raw.md → solution.md → prd.md → prototype.md → demo/ - 设计链路(D0–D2,可整体跳过):
D0 分流 →(可选)D1 research →(未跳过时)D2 RFC - 开发链路(I1–I2 + Finish):
solution/prd/design → implementation/plan.md → 执行实现 → finishing-development
核心原则:
- 先上下文,再读写:凡读写 、
{FEATURE_DIR}/requirements/*、{FEATURE_DIR}/design/*(或 R4 写 demo)→ 先{FEATURE_DIR}/implementation/*得到spec-context(失败就停止)。FEATURE_DIR - 一个节点 = 一个 skill = 一个落盘产物:R0/R1/R2/R3/R4 分步执行,禁止“一次性把 PRD+原型+Demo 全做了”。
- 渐进式披露:先读项目级 与相关契约索引;明确处理某个 Spec 后再读写
memory/。{FEATURE_DIR}/requirements/* - 不确定性不写“待确认问题清单”:统一进入“验证清单”(Owner/截止/信号/动作)。
- 回流闭环:R3/R4 的验证发现会回流更新 R1/R2/R3(必要时再做 R4)。
- 实现侧 SSOT:实现阶段以 作为唯一执行清单与状态 SSOT(checkbox + 审计信息);执行状态只回写到
{FEATURE_DIR}/implementation/plan.md。plan.md
This is a "Navigation + Guardrail" type Skill: used in the Spec Pack () process of sdlc-dev, this Skill acts as the "only Router" to determine which skill to use next, and uses hard guardrails to prevent context drift and incorrect directory writes.
{num}-{short-name}Announce at the start: "I am using the using-aisdlc skill to navigate the Spec Pack process and perform guardrail checks."
This Skill now covers two main paths:
- Demand Path (R0–R4):
raw.md → solution.md → prd.md → prototype.md → demo/ - Design Path (D0–D2, can be skipped entirely):
D0 Diversion → (Optional) D1 research → (If not skipped) D2 RFC - Development Path (I1–I2 + Finish):
solution/prd/design → implementation/plan.md → Execute Implementation → finishing-development
Core Principles:
- Context first, read/write later: For any read/write operations on ,
{FEATURE_DIR}/requirements/*,{FEATURE_DIR}/design/*(or writing demo in R4) → first run{FEATURE_DIR}/implementation/*to getspec-context(stop if it fails).FEATURE_DIR - One node = one skill = one persisted artifact: Execute R0/R1/R2/R3/R4 step by step; prohibit "completing PRD + prototype + Demo all at once".
- Progressive disclosure: First read project-level and related contract indexes; only read/write
memory/after clearly handling a specific Spec.{FEATURE_DIR}/requirements/* - Do not write "to-be-confirmed issue list" for uncertainties: Uniformly enter into a "validation checklist" (Owner/Deadline/Signal/Action).
- Closed-loop feedback: Verification findings from R3/R4 will flow back to update R1/R2/R3 (re-run R4 if necessary).
- SSOT for implementation phase: During implementation, serves as the single source of truth (SSOT) for the execution checklist and status (checkbox + audit information); execution status is only written back to
{FEATURE_DIR}/implementation/plan.md.plan.md
路由契约(唯一权威:下一步只由 using-aisdlc 判定)
Routing Contract (Only Authority: Next Step Determined Solely by using-aisdlc)
本仓库 Spec Pack 场景下,“下一步做什么/是否跳过/走哪条链路”的判断,只有 using-aisdlc 有权做出。
其它技能(R1/R2/R3/R4/D1/D2/I1/I2/Finish)是 worker skill:只负责本阶段门禁 + 产物落盘 + DoD 自检,不得:
其它技能(R1/R2/R3/R4/D1/D2/I1/I2/Finish)是 worker skill:只负责本阶段门禁 + 产物落盘 + DoD 自检,不得:
- 在技能内部“自主分流到下一个技能”(例如“完成后自动进入 X”)
- 在技能内部决定“跳过/不跳过某阶段”的路由结论(最多做防呆校验:不满足前置则停止,并提示回到 using-aisdlc)
**重要补充:Router 允许自动推进。**using-aisdlc 作为 Router,可以在同一轮对话内按门禁串联执行:。
worker skill 仍然不得“自己决定下一步”,但可以在结尾提供结构化的产物与状态摘要,方便 Router 判断是否可继续自动推进。
spec-context → worker skill →(可选)再次路由worker skill 仍然不得“自己决定下一步”,但可以在结尾提供结构化的产物与状态摘要,方便 Router 判断是否可继续自动推进。
**统一回环输出:**任一 worker skill 完成后,结尾统一输出(两段都要有):
- 「本阶段产物已落盘。请回到 进行下一步路由(如未触发人工门禁,Router 可自动续跑)。」
using-aisdlc - (结构化摘要,便于自动路由;建议使用 YAML 形态,字段固定,避免自由文本):
ROUTER_SUMMARY- : 例如
stage/R1/R2/D2/I1/I2Finish - : 产物路径数组(可空)
artifacts - :
needs_human_reviewtrue|false - :
blockedtrue|false - : string(无则空)
block_reason - : string(可空)
notes
In the Spec Pack scenario of this repository, the judgment of "what to do next/whether to skip/which path to take" can only be made by using-aisdlc.
Other skills (R1/R2/R3/R4/D1/D2/I1/I2/Finish) are worker skills: they only handle guardrails for their phase, persist artifacts, and perform DoD self-checks. They must not:
Other skills (R1/R2/R3/R4/D1/D2/I1/I2/Finish) are worker skills: they only handle guardrails for their phase, persist artifacts, and perform DoD self-checks. They must not:
- "Autonomously divert to the next skill" within the skill (e.g., "automatically proceed to X after completion")
- Make routing conclusions like "skip/not skip a phase" within the skill (at most perform foolproof checks: stop if preconditions are not met, and prompt to return to using-aisdlc)
Important Supplement: Router allows auto-advance. As the Router, using-aisdlc can execute in series within the same conversation following guardrails: .
Worker skills still cannot "decide the next step on their own", but can provide structured artifact and status summaries at the end to facilitate the Router's judgment on whether to continue auto-advancing.
spec-context → worker skill → (Optional) re-routeWorker skills still cannot "decide the next step on their own", but can provide structured artifact and status summaries at the end to facilitate the Router's judgment on whether to continue auto-advancing.
Unified Loop Output: After any worker skill completes, output the following uniformly (both sections are required):
- "The artifact for this phase has been persisted. Please return to for next-step routing (if no manual guardrail is triggered, the Router can continue automatically)."
using-aisdlc - (structured summary for automatic routing; YAML format is recommended with fixed fields, avoid free text):
ROUTER_SUMMARY- : e.g.,
stage/R1/R2/D2/I1/I2Finish - : array of artifact paths (can be empty)
artifacts - :
needs_human_reviewtrue|false - :
blockedtrue|false - : string (empty if none)
block_reason - : string (can be empty)
notes
自动推进(Auto-Advance)策略(提升体验与效率)
Auto-Advance Strategy (Improve Experience and Efficiency)
目标:在不牺牲门禁与 SSOT的前提下,把“回到 using-aisdlc”从人工操作变成默认自动行为;只有在确实需要用户介入时才停下。
Goal: Without sacrificing guardrails and SSOT, turn "return to using-aisdlc" from manual operation to default automatic behavior; only stop when user intervention is truly needed.
自动推进的触发条件(满足其一即可)
Trigger Conditions for Auto-Advance (Satisfy Any One)
- 用户明确表达:“继续 / 下一步 / 按推荐 / 自动推进 / 跑通最短闭环 / 直接带我走流程”
- 当前对话意图明确且单向:例如用户说“我要出 PRD/原型/Demo/实现计划/开始实现”,且前置产物齐全
- 上一步 worker skill 的 标记:
ROUTER_SUMMARY且needs_human_review=falseblocked=false
- User explicitly states: "Continue / Next step / Follow recommendation / Auto-advance / Run through the shortest loop / Take me through the process directly"
- Current conversation intent is clear and unidirectional: e.g., user says "I want to create PRD/prototype/Demo/implementation plan/start implementation", and all pre-requisite artifacts are complete
- from the previous worker skill marks:
ROUTER_SUMMARYandneeds_human_review=falseblocked=false
必须停止并交给用户的场景(人工门禁)
Scenarios That Must Stop and Hand Over to the User (Manual Guardrails)
- 需要用户评审与确认:产物会成为后续阶段的权威输入,且错误代价高
- 典型:(尤其是
solution.md)、#impact-analysis、prd.md、prototype.md、design/design.mdimplementation/plan.md
- 典型:
- 需要用户做路径选择更好:存在多条合理路线,且 Router 仅凭默认策略可能选错
- 典型分流点:是否补 R2/R3/R4;是否进入实现(I1/I2);D0 是否跳过 design(如用户未给出倾向)
- 缺关键外部输入:拿不到就无法继续
- 典型:失败;R4 找不到
spec-context;worker skill 标记DEMO_PROJECT_ROOTblocked=true
- 典型:
例外:如果用户明确要求“按最短闭环直接开发并接受默认决策”,using-aisdlc 可在 D0 依据决策表自动判定是否跳过 design,并自动进入 I1;但在进入 I2(改代码)前,仍应确认用户意图为“开始实现”而非“只产出计划”。
- Requires user review and confirmation: The artifact will become the authoritative input for subsequent phases, and the cost of errors is high
- Typical examples: (especially
solution.md),#impact-analysis,prd.md,prototype.md,design/design.mdimplementation/plan.md
- Typical examples:
- Better for user to make path choices: Multiple reasonable routes exist, and the Router may choose the wrong one with default strategies alone
- Typical diversion points: Whether to supplement R2/R3/R4; whether to enter implementation (I1/I2); whether to skip design in D0 (if user has not indicated preference)
- Missing critical external input: Cannot proceed without it
- Typical examples: fails; R4 cannot find
spec-context; worker skill marksDEMO_PROJECT_ROOTblocked=true
- Typical examples:
Exception: If the user explicitly requests "directly develop following the shortest loop and accept default decisions", using-aisdlc can automatically determine whether to skip design in D0 based on the decision table, and automatically enter I1; however, before entering I2 (modifying code), it should still confirm the user's intent is "start implementation" rather than "only produce a plan".
默认自动推进顺序(当可自动推进时)
Default Auto-Advance Sequence (When Auto-Advance is Allowed)
- 先门禁:若下一步会触发读写 或写 demo,则先
{FEATURE_DIR}/...并回显spec-context(失败即停)FEATURE_DIR=... - 再执行:调用路由出的唯一 worker skill 并完成落盘
- 再路由:读取 ,满足自动推进条件则继续;否则输出“停下原因 + 需要用户选择/评审的最小动作”
ROUTER_SUMMARY
- Guardrails first: If the next step triggers read/write operations on or writes demo, first run
{FEATURE_DIR}/...and echospec-context(stop if it fails)FEATURE_DIR=... - Then execute: Call the only routed worker skill and complete artifact persistence
- Then re-route: Read , continue if auto-advance conditions are met; otherwise output "reason for stopping + minimal action requiring user selection/review"
ROUTER_SUMMARY
路由输入/输出(对话级协议)
Routing Input/Output (Conversation-Level Protocol)
- 输入(路由所需最小信息):用户意图(想产出什么/想进入哪个阶段)+ 当前 Spec 上下文(必须经 得到
spec-context)。FEATURE_DIR/CURRENT_BRANCH/REPO_ROOT - 决策依据(只认 SSOT 文件与门禁):
- R0:
{FEATURE_DIR}/requirements/raw.md - R1:(必须含
{FEATURE_DIR}/requirements/solution.md,锚点## Impact Analysis)#impact-analysis - R2:
{FEATURE_DIR}/requirements/prd.md - R3:
{FEATURE_DIR}/requirements/prototype.md - D1:
{FEATURE_DIR}/design/research.md - D2:
{FEATURE_DIR}/design/design.md - I1:
{FEATURE_DIR}/implementation/plan.md
- R0:
- 输出(唯一“下一步指令”格式):
- 你现在处于:
<阶段> - 下一步(唯一):
<skill 名称> - 必须先过:(以及本 skill 的硬门禁)
spec-context → FEATURE_DIR=... - 将产生:
<落盘产物路径>
- 你现在处于:
- Input (Minimum Information Required for Routing): User intent (what to produce/which phase to enter) + current Spec context (must obtain via
FEATURE_DIR/CURRENT_BRANCH/REPO_ROOT).spec-context - Decision Basis (Only Recognize SSOT Files and Guardrails):
- R0:
{FEATURE_DIR}/requirements/raw.md - R1: (must contain
{FEATURE_DIR}/requirements/solution.md, anchor## Impact Analysis)#impact-analysis - R2:
{FEATURE_DIR}/requirements/prd.md - R3:
{FEATURE_DIR}/requirements/prototype.md - D1:
{FEATURE_DIR}/design/research.md - D2:
{FEATURE_DIR}/design/design.md - I1:
{FEATURE_DIR}/implementation/plan.md
- R0:
- Output (Only "Next Step Instruction" Format):
- You are currently in:
<Phase> - Next step (only one):
<Skill Name> - Must pass first: (and hard guardrails of this Skill)
spec-context → FEATURE_DIR=... - Will produce:
<Persisted Artifact Path>
- You are currently in:
何时使用 / 不使用
When to Use / Not to Use
- 使用时机
- 你要开始/继续一个 Spec:生成或更新
raw.md / solution.md / prd.md / prototype.md / demo - 你要把一个“简单需求”直接推进到开发闭环:
solution.md → plan.md → execute → finishing - 你要决定设计阶段路线:是否跳过 design、是否需要 research、是否需要 RFC(design/design.md)
- 你不确定“现在该跑哪个 spec-product-* skill”
- 你不确定“现在该跑 spec-implementation-plan / spec-implementation-execute 还是先补需求输入”
- 用户在施压时提出:不想跑脚本、直接给你路径、要求你先写再补上下文
- 你要开始/继续一个 Spec:生成或更新
- 不要用在
- 仅讨论概念、不涉及本仓库 Spec Pack 的落盘文件与目录结构
-
Use Cases
- You want to start/continue a Spec: generate or update
raw.md / solution.md / prd.md / prototype.md / demo - You want to push a "simple requirement" directly to the development loop:
solution.md → plan.md → execute → finishing - You want to decide the design phase route: whether to skip design, whether research is needed, whether RFC (design/design.md) is needed
- You are unsure "which spec-product-* skill to run now"
- You are unsure "whether to run spec-implementation-plan / spec-implementation-execute or first supplement demand inputs"
- You want to start/continue a Spec: generate or update
-
Do Not Use
- Only discussing concepts, not involving persisted files and directory structures of the Spec Pack in this repository
唯一门禁(必须遵守)
Only Guardrails (Must Be Followed)
规则:只要任务会读写以下任意内容,就必须先跑 并回显 :
spec-contextFEATURE_DIR=...{FEATURE_DIR}/requirements/raw.md{FEATURE_DIR}/requirements/solution.md{FEATURE_DIR}/requirements/prd.md{FEATURE_DIR}/requirements/prototype.md- (例如
{FEATURE_DIR}/design/*.md、design/design.md)design/research.md {FEATURE_DIR}/implementation/plan.md- (R4)
{REPO_ROOT}/demo/prototypes/{CURRENT_BRANCH}/...
即使用户口头给了 也不例外。(基线压测中最常见的违规点:把“用户给的路径”当成可信上下文。)
FEATURE_DIR命令书写约定:默认面向 PowerShell;同一行多命令请用分隔(不要用;)。&&
Rule: As long as the task involves reading/writing any of the following, you must first run and echo :
spec-contextFEATURE_DIR=...{FEATURE_DIR}/requirements/raw.md{FEATURE_DIR}/requirements/solution.md{FEATURE_DIR}/requirements/prd.md{FEATURE_DIR}/requirements/prototype.md- (e.g.,
{FEATURE_DIR}/design/*.md,design/design.md)design/research.md {FEATURE_DIR}/implementation/plan.md- (R4)
{REPO_ROOT}/demo/prototypes/{CURRENT_BRANCH}/...
This applies even if the user verbally provides . (The most common violation in baseline testing: treating "user-provided path" as trusted context.)
FEATURE_DIRCommand Writing Convention: Default to PowerShell; useto separate multiple commands on the same line (do not use;).&&
你要的最短闭环(简单需求开发):raw → solution.md → plan.md → execute → finishing-development
The Shortest Loop You Need (Simple Requirement Development): raw → solution.md → plan.md → execute → finishing-development
适用前提(满足其一即可):
- 范围单一、边界清晰,风险低,不需要额外设计阶段决策文档(可按 的 D0 判定跳过 design)
design/aisdlc_spec_design.md - 验收口径可追溯:至少能在 (或更完整的
solution.md)里写清楚验收点prd.md
最短闭环(建议先跑通):
- R0:落盘 raw(如尚未建包)
- 用什么:
spec-init - 输出:
{FEATURE_DIR}/requirements/raw.md
- 用什么:
- 门禁:定位 Spec 上下文
- 用什么:
spec-context - 要求:对话中必须回显 ;失败即停止
FEATURE_DIR=...
- 用什么:
- R1:raw → solution(收敛方案)
- 用什么:
spec-product-clarify - 输出:
{FEATURE_DIR}/requirements/solution.md - 产物门禁:必须包含
solution.md(锚点## Impact Analysis),作为后续 D2/I1 的约束输入#impact-analysis - 兼容说明:用户可能会说 ,但本仓库需求侧 SSOT 以
solutions.md(单数) 为准;不要新建solution.md造成双 SSOTsolutions.md
- 用什么:
- D0:分流判定(是否需要 design 阶段)
- 用什么:(本 Skill 负责判定;不落盘或在后续产物中引用分流结论)
using-aisdlc - 结论:跳过 design → I1;不跳过 →(按需)D1/D2
- 用什么:
- I1:solution/prd/design → plan(写到可执行)
- 用什么:
spec-implementation-plan - 输出:(唯一执行清单与状态 SSOT)
{FEATURE_DIR}/implementation/plan.md
- 用什么:
- I2:按 plan 分批执行(实现 + 回写状态/审计)
- 用什么:
spec-implementation-execute - 规则:执行状态只回写 ;遇到
implementation/plan.md/ 阻塞即停NEEDS CLARIFICATION
- 用什么:
- Finish:开发收尾确认(仅验证,全绿才算完成)
- 用什么:
finishing-development - 输出:一份“完成确认报告”(包含实际运行的命令与结果)
- 用什么:
Applicable Premises (Satisfy Any One):
- Single scope, clear boundaries, low risk, no need for additional design phase decision documents (can determine to skip design per D0 in )
design/aisdlc_spec_design.md - Traceable acceptance criteria: At least can write clear acceptance points in (or more complete
solution.md)prd.md
Shortest Loop (Recommended to Run First):
- R0: Persist raw (if package not yet created)
- Use:
spec-init - Output:
{FEATURE_DIR}/requirements/raw.md
- Use:
- Guardrail: Locate Spec Context
- Use:
spec-context - Requirement: Must echo in the conversation; stop if it fails
FEATURE_DIR=...
- Use:
- R1: raw → solution (Converge on a Solution)
- Use:
spec-product-clarify - Output:
{FEATURE_DIR}/requirements/solution.md - Artifact Guardrail: must contain
solution.md(anchor## Impact Analysis), as constrained input for subsequent D2/I1#impact-analysis - Compatibility Note: Users may say , but the SSOT for demand side in this repository is
solutions.md(singular); do not createsolution.mdto avoid dual SSOTsolutions.md
- Use:
- D0: Diversion Judgment (Whether Design Phase is Needed)
- Use: (This Skill is responsible for judgment; no persistence or reference to diversion conclusion in subsequent artifacts)
using-aisdlc - Conclusion: Skip design → I1; Do not skip → (As needed) D1/D2
- Use:
- I1: solution/prd/design → plan (Write to Executable)
- Use:
spec-implementation-plan - Output: (SSOT for execution checklist and status)
{FEATURE_DIR}/implementation/plan.md
- Use:
- I2: Execute in Batches per Plan (Implementation + Write Back Status/Audit)
- Use:
spec-implementation-execute - Rule: Execution status is only written back to ; stop when encountering
implementation/plan.md/ blockedNEEDS CLARIFICATION
- Use:
- Finish: Development Completion Confirmation (Verification Only, Complete Only When All Green)
- Use:
finishing-development - Output: A "completion confirmation report" (including actually executed commands and results)
- Use:
核心工作流(需求侧 R0 → R4;设计侧 D0 →(可选)D1 →(可选)D2;实现侧 I1 → I2 → Finish)
Core Workflows (Demand Side R0 → R4; Design Side D0 → (Optional) D1 → (Optional) D2; Implementation Side I1 → I2 → Finish)
dot
digraph aisdlc_flow {
rankdir=LR;
node [shape=box];
"要处理某个需求(Spec)" -> "是否已有合法 spec 分支/Spec Pack?";
"是否已有合法 spec 分支/Spec Pack?" [shape=diamond];
"是否已有合法 spec 分支/Spec Pack?" -> "R0: spec-init" [label="否 / 不确定"];
"R0: spec-init" -> "运行 spec-context" ;
"是否已有合法 spec 分支/Spec Pack?" -> "运行 spec-context" [label="是"];
"运行 spec-context" -> "得到 FEATURE_DIR / CURRENT_BRANCH / REPO_ROOT";
"得到 FEATURE_DIR / CURRENT_BRANCH / REPO_ROOT" -> "选择需求链路 R1-R4(可选)";
"得到 FEATURE_DIR / CURRENT_BRANCH / REPO_ROOT" -> "D0: 是否跳过 design?";
"选择需求链路 R1-R4(可选)" -> "R1: raw->solution (含Impact Analysis)";
"R1: raw->solution (含Impact Analysis)" -> "R2: solution->prd(可选)";
"R2: solution->prd(可选)" -> "R3: prd->prototype(可选)";
"R3: prd->prototype(可选)" -> "R4: prototype->demo(可选)";
"D0: 是否跳过 design?" [shape=diamond];
"D0: 是否跳过 design?" -> "I1: spec-implementation-plan" [label="是(跳过)"];
"D0: 是否跳过 design?" -> "D1: spec-design-research(可选)" [label="否,且需要 research"];
"D0: 是否跳过 design?" -> "D2: spec-design(RFC)" [label="否,且不需要 research"];
"D1: spec-design-research(可选)" -> "D2: spec-design(RFC)";
"R1: raw->solution (含Impact Analysis)" -> "D0: 是否跳过 design?";
"R2: solution->prd(可选)" -> "D0: 是否跳过 design?";
"R3: prd->prototype(可选)" -> "D0: 是否跳过 design?";
"D2: spec-design(RFC)" -> "I1: spec-implementation-plan";
"I1: spec-implementation-plan" -> "I2: spec-implementation-execute";
"I2: spec-implementation-execute" -> "Finish: finishing-development";
}dot
digraph aisdlc_flow {
rankdir=LR;
node [shape=box];
"Need to handle a requirement (Spec)" -> "Is there a valid spec branch/Spec Pack?";
"Is there a valid spec branch/Spec Pack?" [shape=diamond];
"Is there a valid spec branch/Spec Pack?" -> "R0: spec-init" [label="No / Uncertain"];
"R0: spec-init" -> "Run spec-context" ;
"Is there a valid spec branch/Spec Pack?" -> "Run spec-context" [label="Yes"];
"Run spec-context" -> "Obtain FEATURE_DIR / CURRENT_BRANCH / REPO_ROOT";
"Obtain FEATURE_DIR / CURRENT_BRANCH / REPO_ROOT" -> "Select demand path R1-R4 (Optional)";
"Obtain FEATURE_DIR / CURRENT_BRANCH / REPO_ROOT" -> "D0: Skip design?";
"Select demand path R1-R4 (Optional)" -> "R1: raw->solution (with Impact Analysis)";
"R1: raw->solution (with Impact Analysis)" -> "R2: solution->prd (Optional)";
"R2: solution->prd (Optional)" -> "R3: prd->prototype (Optional)";
"R3: prd->prototype (Optional)" -> "R4: prototype->demo (Optional)";
"D0: Skip design?" [shape=diamond];
"D0: Skip design?" -> "I1: spec-implementation-plan" [label="Yes (Skip)"];
"D0: Skip design?" -> "D1: spec-design-research (Optional)" [label="No, and research needed"];
"D0: Skip design?" -> "D2: spec-design (RFC)" [label="No, and no research needed"];
"D1: spec-design-research (Optional)" -> "D2: spec-design (RFC)";
"R1: raw->solution (with Impact Analysis)" -> "D0: Skip design?";
"R2: solution->prd (Optional)" -> "D0: Skip design?";
"R3: prd->prototype (Optional)" -> "D0: Skip design?";
"D2: spec-design (RFC)" -> "I1: spec-implementation-plan";
"I1: spec-implementation-plan" -> "I2: spec-implementation-execute";
"I2: spec-implementation-execute" -> "Finish: finishing-development";
}D0/D1/D2 路由规则(using-aisdlc 负责判定)
D0/D1/D2 Routing Rules (Determined by using-aisdlc)
设计阶段口径与细则以为准;这里仅给出可执行的路由决策表。design/aisdlc_spec_design.md
The caliber and details of the design phase are subject to; only the executable routing decision table is provided here.design/aisdlc_spec_design.md
D0:是否跳过 design 阶段(只在 using-aisdlc 判定)
D0: Whether to Skip Design Phase (Only Determined by using-aisdlc)
- 可考虑跳过(满足其一即可考虑):范围单一边界清晰 / 无对外承诺变化(API/事件/权限/数据口径)且无迁移回滚 / 无关键技术不确定性 / 验收口径已足够可追溯
- 默认不跳过(任一命中):对外契约/权限/口径变更、数据迁移/回滚、高风险不确定性、多系统/上下游影响面大、团队明确要求出 RFC 评审
结论:
- 跳过 → 路由到 (I1),并要求在
spec-implementation-plan补齐最小决策信息plan.md - 不跳过 → 进入 D1/D2 分流
- Consider skipping (satisfy any one to consider): Single scope with clear boundaries / no changes to external commitments (API/events/permissions/data caliber) and no migration rollback / no critical technical uncertainties / acceptance criteria are sufficiently traceable
- Default to not skip (hit any one): Changes to external contracts/permissions/calibers, data migration/rollback, high-risk uncertainties, large impact on multiple systems/upstream and downstream, team explicitly requires RFC review
Conclusion:
- Skip → Route to (I1), and require supplementing minimal decision information in
spec-implementation-planplan.md - Do not skip → Enter D1/D2 diversion
D1:是否需要 research(只在 using-aisdlc 判定)
D1: Whether Research is Needed (Only Determined by using-aisdlc)
命中任一则需要 D1(路由到 ):
spec-design-research- 方案正确性依赖未知事实(若 X 不成立会推倒重来)
- 多方案缺证据支撑取舍
- 对外契约/迁移/安全/性能/一致性存在高风险点需先验证
否则:直接路由到 产出 D2(RFC)。
spec-designRoute to (need D1) if any of the following are hit:
spec-design-research- Solution correctness depends on unknown facts (if X is not true, the entire solution will be overturned)
- Multiple solutions lack evidence to support trade-offs
- High-risk points exist in external contracts/migration/security/performance/consistency that need to be verified first
Otherwise: Directly route to to produce D2 (RFC).
spec-designD2:执行 RFC(由 spec-design
作为 worker skill 落盘)
spec-designD2: Execute RFC (Worker Skill spec-design Persists Artifact)
当路由到 D2 时, 只负责产出/更新:
spec-design{FEATURE_DIR}/design/design.md
并强制消费: + 受影响模块组件页全文 + 相关 ADR 全文;缺失必须显式 。
solution.md#impact-analysisCONTEXT GAPWhen routed to D2, is only responsible for producing/updating:
spec-design{FEATURE_DIR}/design/design.md
And must consume: + full text of affected module component pages + full text of related ADRs; must explicitly mark if any are missing.
solution.md#impact-analysisCONTEXT GAPR0:初始化新 Spec Pack
R0: Initialize New Spec Pack
- 用什么:
spec-init - 什么时候:还没有 分支与
{num}-{short-name}目录.aisdlc/specs/{num}-{short-name}/ - 输出:(UTF-8 with BOM)
{FEATURE_DIR}/requirements/raw.md - 完成后:回到 路由下一步(通常先
using-aisdlc,再进入 R1)spec-context
- Use:
spec-init - When: No branch and
{num}-{short-name}directory exist yet.aisdlc/specs/{num}-{short-name}/ - Output: (UTF-8 with BOM)
{FEATURE_DIR}/requirements/raw.md - After completion: Return to for next-step routing (usually first
using-aisdlc, then enter R1)spec-context
R1:澄清 + 方案决策(raw → solution)
R1: Clarification + Solution Decision (raw → solution)
- 用什么:
spec-product-clarify - 前置输入:成功;
spec-context存在且非空{FEATURE_DIR}/requirements/raw.md - 关键纪律:一次一问(优先选择题)+ 增量回写 + 停止机制
raw.md/## 澄清记录 - 输出:
{FEATURE_DIR}/requirements/solution.md - 产物门禁:必须包含
solution.md(## Impact Analysis),且可被 D2/I1/I2 直接引用#impact-analysis - 完成后:回到 路由下一步(R2/R3/R4/D0→I1/D1/D2 等由本 Skill 统一判定)
using-aisdlc
- Use:
spec-product-clarify - Pre-requisite Input: succeeds;
spec-contextexists and is non-empty{FEATURE_DIR}/requirements/raw.md - Key Discipline: One question at a time (prioritize multiple-choice questions) + incrementally write back to + stop mechanism
raw.md/## Clarification Records - Output:
{FEATURE_DIR}/requirements/solution.md - Artifact Guardrail: must contain
solution.md(## Impact Analysis), and can be directly referenced by D2/I1/I2#impact-analysis - After completion: Return to for next-step routing (R2/R3/R4/D0→I1/D1/D2 etc., uniformly determined by this Skill)
using-aisdlc
R2:PRD(solution → prd,可选)
R2: PRD (solution → prd, Optional)
- 用什么:
spec-product-prd - 前置输入:必须存在
{FEATURE_DIR}/requirements/solution.md - 输出:
{FEATURE_DIR}/requirements/prd.md - 完成后:回到 路由下一步
using-aisdlc
- Use:
spec-product-prd - Pre-requisite Input: must exist
{FEATURE_DIR}/requirements/solution.md - Output:
{FEATURE_DIR}/requirements/prd.md - After completion: Return to for next-step routing
using-aisdlc
R3:原型(prd → prototype,可选)
R3: Prototype (prd → prototype, Optional)
- 用什么:
spec-product-prototype - 前置输入:必须存在
{FEATURE_DIR}/requirements/prd.md - 输出:
{FEATURE_DIR}/requirements/prototype.md - 完成后:回到 路由下一步(按需进入 R4;发现问题回流 R1/R2/R3)
using-aisdlc
- Use:
spec-product-prototype - Pre-requisite Input: must exist
{FEATURE_DIR}/requirements/prd.md - Output:
{FEATURE_DIR}/requirements/prototype.md - After completion: Return to for next-step routing (enter R4 as needed; flow back to R1/R2/R3 if issues are found)
using-aisdlc
R4:可交互 Demo(prototype → demo,可选)
R4: Interactive Demo (prototype → demo, Optional)
- 用什么:
spec-product-demo - 前置输入:必须存在;Demo 工程根目录可定位(找不到就停止并要
{FEATURE_DIR}/requirements/prototype.md)DEMO_PROJECT_ROOT - 输出:默认
{REPO_ROOT}/demo/prototypes/{CURRENT_BRANCH}/ - 完成后:回到 路由下一步(运行走查;发现问题按需回流更新 R1/R2/R3/R4)
using-aisdlc
- Use:
spec-product-demo - Pre-requisite Input: must exist; Demo project root directory can be located (stop and request
{FEATURE_DIR}/requirements/prototype.mdif not found)DEMO_PROJECT_ROOT - Output: Default to
{REPO_ROOT}/demo/prototypes/{CURRENT_BRANCH}/ - After completion: Return to for next-step routing (run walkthrough; flow back to update R1/R2/R3/R4 as needed if issues are found)
using-aisdlc
D1:research(可选)
D1: Research (Optional)
- 用什么:
spec-design-research - 前置输入:已存在且可追溯;(如已存在)
requirements/solution.md可增量更新design/research.md - 输出:
{FEATURE_DIR}/design/research.md - 完成后:回到 路由到 D2 或回到 R1 修输入
using-aisdlc
- Use:
spec-design-research - Pre-requisite Input: exists and is traceable;
requirements/solution.md - Output:
{FEATURE_DIR}/design/research.md - After completion: Return to to route to D2 or return to R1 to revise inputs
using-aisdlc
D2:design(RFC / 决策文档;未跳过时必做)
D2: Design (RFC / Decision Document; Mandatory if Not Skipped)
- 用什么:
spec-design - 前置输入:必须读取 ,并全文读取受影响模块组件页与相关 ADR(读不到必须写
solution.md#impact-analysis)CONTEXT GAP - 输出:
{FEATURE_DIR}/design/design.md - 完成后:回到 路由到 I1
using-aisdlc
- Use:
spec-design - Pre-requisite Input: Must read , and read full text of affected module component pages and related ADRs (must write
solution.md#impact-analysisif not readable)CONTEXT GAP - Output:
{FEATURE_DIR}/design/design.md - After completion: Return to to route to I1
using-aisdlc
I1:实现计划(solution/prd/design → plan.md,必做)
I1: Implementation Plan (solution/prd/design → plan.md, Mandatory)
- 用什么:
spec-implementation-plan - 前置输入:成功;
spec-context或{FEATURE_DIR}/requirements/solution.md至少其一存在(否则必须在prd.md标注plan.md并阻断进入 I2)NEEDS CLARIFICATION - 输出:(唯一执行清单与状态 SSOT)
{FEATURE_DIR}/implementation/plan.md - 完成后:回到 路由到 I2
using-aisdlc
- Use:
spec-implementation-plan - Pre-requisite Input: succeeds; at least one of
spec-contextor{FEATURE_DIR}/requirements/solution.mdexists (otherwise must markprd.mdinNEEDS CLARIFICATIONand block entry to I2)plan.md - Output: (SSOT for execution checklist and status)
{FEATURE_DIR}/implementation/plan.md - After completion: Return to to route to I2
using-aisdlc
I2:执行(按 plan.md 分批实现并回写,必做)
I2: Execution (Batch Implementation per plan.md and Write Back, Mandatory)
- 用什么:
spec-implementation-execute - 前置输入:必须存在且可执行;不存在/不可执行则回到 I1
{FEATURE_DIR}/implementation/plan.md - 输出:代码与配置变更 + checkbox/审计信息回写(唯一状态来源)
plan.md - 完成后:回到 路由到 Finish
using-aisdlc
- Use:
spec-implementation-execute - Pre-requisite Input: must exist and be executable; return to I1 if it does not exist/is not executable
{FEATURE_DIR}/implementation/plan.md - Output: Code and configuration changes + write back of checkbox/audit information (only source of status)
plan.md - After completion: Return to to route to Finish
using-aisdlc
Finish:开发收尾确认(仅验证,全绿才算完成)
Finish: Development Completion Confirmation (Verification Only, Complete Only When All Green)
- 用什么:
finishing-development - 输出:完成确认报告(实际运行的命令与结果可复现)
- 完成后:回到 (或结束;本 Skill 不做合并/PR/清理)
using-aisdlc
- Use:
finishing-development - Output: Completion confirmation report (executed commands and results are reproducible)
- After completion: Return to (or end; this Skill does not handle merging/PR/cleanup)
using-aisdlc
Quick reference(高频速查)
Quick Reference (High-Frequency Lookup)
| 你要做什么 | 必须先有 | 执行 skill | 主要产物 |
|---|---|---|---|
| 新需求建包 | 原始需求(文本或文件) | | |
| 收敛方案(含影响分析) | | | |
| 冻结交付规格 | | | |
| 消除交互歧义 | | | |
| 高保真走查 | | | |
| 设计调研(可选) | | | |
| 产出 RFC(未跳过时) | | | |
| 写可执行计划(必做) | | | |
| 按计划实现(必做) | | | 代码变更 + |
| 开发收尾确认(必做) | 代码已实现 + 计划任务已完成 | | 完成确认报告 |
只要会读写、{FEATURE_DIR}/requirements/*、{FEATURE_DIR}/design/*,或 R4 写 demo:先{FEATURE_DIR}/implementation/*,失败就停止。spec-context
| What You Want to Do | Must Have First | Execute Skill | Main Artifact |
|---|---|---|---|
| Create package for new requirement | Original requirement (text or file) | | |
| Converge on solution (with impact analysis) | | | |
| Freeze delivery specification | | | |
| Eliminate interaction ambiguity | | | |
| High-fidelity walkthrough | | | |
| Design research (Optional) | | | |
| Produce RFC (if not skipped) | | | |
| Write executable plan (Mandatory) | | | |
| Implement per plan (Mandatory) | | | Code changes + |
| Development completion confirmation (Mandatory) | Code implemented + plan tasks completed | | Completion confirmation report |
As long as you read/write,{FEATURE_DIR}/requirements/*,{FEATURE_DIR}/design/*, or write demo in R4: first run{FEATURE_DIR}/implementation/*, stop if it fails.spec-context
红旗清单(出现任一条:停止并纠正)
Red Flag List (Stop and Correct if Any Appears)
- 没跑 就开始读写
spec-context、{FEATURE_DIR}/requirements/*、{FEATURE_DIR}/design/*(或开始 R4 写 demo){FEATURE_DIR}/implementation/* - 用户口头给了 ,你就“信了并跳过脚本”
FEATURE_DIR - 报错仍继续(例如 main 分支也要“先写一版”)
spec-context - 为了赶进度先生成文档,事后再补上下文/再回头澄清
- 在 R4 找不到可运行 demo 工程根目录时,自行初始化 Vite/Next.js 工程“放你觉得合适的位置”
- 没有 (或 plan 不可执行)就开始“直接写代码”
{FEATURE_DIR}/implementation/plan.md - 执行中把状态/审计写到别处(issue/聊天记录/另一个文件),而不是回写
implementation/plan.md
- Start reading/writing ,
{FEATURE_DIR}/requirements/*,{FEATURE_DIR}/design/*(or start R4 demo writing) without running{FEATURE_DIR}/implementation/*spec-context - Accept verbal from user and "trust it and skip scripts"
FEATURE_DIR - Continue even if reports an error (e.g., "write a version first" even on main branch)
spec-context - Generate documents first to catch up on progress, then supplement context/clarify later
- When R4 cannot find the runnable demo project root directory, initialize a Vite/Next.js project "in the location you think is appropriate" on your own
- Start "directly writing code" without (or if the plan is not executable)
{FEATURE_DIR}/implementation/plan.md - Write status/audit information elsewhere (issue/chat record/another file) during execution instead of writing back to
implementation/plan.md
常见错误(以及怎么修)
Common Errors (and How to Fix Them)
- 把“用户给的路径/分支名”当作上下文:仍然必须 回显
spec-context;无法执行就停止。FEATURE_DIR=... - 先生成再回头澄清/补证据:先完成 R1 澄清循环(一次一问 + 回写),达到 DoD 后再生成产物。
- 越级执行:缺 就写
solution.md,缺prd.md就写prd.md,缺prototype.md就做 demo → 一律停止并回到上一步。prototype.md - 越级开发:缺 就开始实现 → 回到 I1 写到“可执行 + 可验证 + 可审计”,再进入 I2。
implementation/plan.md
- Treat "user-provided path/branch name" as context: Still must run to echo
spec-context; stop if it cannot be executed.FEATURE_DIR=... - Generate first, then clarify/supplement evidence later: First complete the R1 clarification loop (one question at a time + write back), then generate artifacts after meeting DoD.
- Skip levels: Write without
prd.md, writesolution.mdwithoutprototype.md, make demo withoutprd.md→ stop and return to the previous step in all cases.prototype.md - Skip levels in development: Start implementation without → return to I1 to write until "executable + verifiable + auditable", then enter I2.
implementation/plan.md
常见借口与反制(来自基线压测)
Common Excuses and Countermeasures (From Baseline Testing)
| 借口(压力来源) | 常见违规行为 | 必须的反制动作 |
|---|---|---|
| “我已经把 FEATURE_DIR 告诉你了,别跑脚本” | 接受口头路径并直接写文件 | 仍然必须跑 |
| “我很急,先在 main 上写 solution.md” | 跳过门禁、猜目录写入 | |
| “把 PRD/原型/Demo 一次性都做了” | 节点耦合导致漂移、无法回流 | 拆成 R1→R2→R3→R4;每步完成给下一步与 DoD 自检 |
| “别写 plan 了,直接改代码吧” | 跳过 I1、执行不可审计、容易越界 | 先 |
| Excuse (Source of Pressure) | Common Violations | Mandatory Countermeasures |
|---|---|---|
| "I already told you the FEATURE_DIR, don't run the script" | Accept verbal path and write files directly | Still must run |
| "I'm in a hurry, write solution.md on main first" | Skip guardrails, guess directory to write | |
| "Do PRD/prototype/Demo all at once" | Node coupling leads to drift, cannot flow back | Split into R1→R2→R3→R4; provide next step and DoD self-check after each step |
| "Don't write the plan, directly modify the code" | Skip I1, execution is not auditable, easy to go out of bounds | First use |
一个好例子(最短路径的正确开场)
A Good Example (Correct Opening for the Shortest Path)
用户:“我要做一个新需求,先出方案(solution.md),我不想自己找目录。”
正确做法(第一轮):
- 若尚未创建 spec 分支/Spec Pack → 先 (把原始需求落到
spec-init)raw.md - 然后执行 并回显
spec-contextFEATURE_DIR=... - 进入 R1:对用户只问 1 个最高杠杆选择题;回答后增量回写
raw.md/## 澄清记录 - DoD 达标或触发停止机制后生成 ,并给出下一步:
solution.md- 简单需求要开发:I1 → I2
spec-implementation-plan→spec-implementation-executefinishing-development - 需要更完整规格/原型:R2/R3/R4(按需)后再进入 I1/I2
- 简单需求要开发:I1
User: "I want to work on a new requirement, first create a solution (solution.md), I don't want to find the directory myself."
Correct Approach (First Round):
- If no spec branch/Spec Pack has been created yet → first run (persist the original requirement to
spec-init)raw.md - Then execute and echo
spec-contextFEATURE_DIR=... - Enter R1: Ask the user only 1 highest-leverage multiple-choice question; incrementally write back to after receiving the answer
raw.md/## Clarification Records - After meeting DoD or triggering the stop mechanism, generate , and provide the next step:
solution.md- Simple requirement for development: I1 → I2
spec-implementation-plan→spec-implementation-executefinishing-development - Need more complete specification/prototype: Enter I1/I2 only after R2/R3/R4 (as needed)
- Simple requirement for development: I1