Summary
Use when 需要在本仓库的 AI DLC 流程中初始化新的 Spec Pack(创建三位编号分支与 `.aidlc/specs/{num}-{short-name}` 目录),或在执行 `spec-init` 时不确定输入解析、短名称规则、UTF-8 BOM 文件路径传参、脚本调用方式与输出物。
zixun-github/ai-dlc · Archived
Use when 需要在本仓库的 AI DLC 流程中初始化新的 Spec Pack(创建三位编号分支与 `.aidlc/specs/{num}-{short-name}` 目录),或在执行 `spec-init` 时不确定输?
npx skills add zixun-github/ai-dlc --skill spec-init
Use when 需要在本仓库的 AI DLC 流程中初始化新的 Spec Pack(创建三位编号分支与 `.aidlc/specs/{num}-{short-name}` 目录),或在执行 `spec-init` 时不确定输入解析、短名称规则、UTF-8 BOM 文件路径传参、脚本调用方式与输出物。
This repository is archived — consider an actively maintained alternative.
Use when executing implementation plans with independent tasks in the current session
5 installsUse when 需要在 dlc-dev 的产品需求 Spec 流程执行 R2,将 requirements/solution.md 转写为可交付、…
5 installsUse when 在 dlc-dev 的 spec 分支上需要完成 R1(raw→solution)的需求澄?
5 installsUse when 需要在 Spec 级设计阶段执行 D1 research(产出 `{FEATURE_DIR}/design/research.md`),或…
5 installsRelated neighbors and high-traction skills in the same topics — useful to compare before installing.
Create a new specification file for the solution, optimized for Generative AI consumption.
13.4K installsCreate a formal specification for an existing GitHub Actions CI/CD workflow, optimized for AI c…
10.5K installsUpdate an existing specification file for the solution, optimized for Generative AI consumption…
9.2K installsCreate GitHub Issues for unimplemented requirements from specification files using feature_requ…
9K installsCreate GitHub Issue for feature request from specification file using feature_request.yml templ…
8.9K installsOther skills from zixun-github/ai-dlc · top by installs.
npx skills add zixun-github/ai-dlc
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
master
Files included with this skill beyond the listing page.
SKILL.md
7,697 B
SUMMARY.md
300 B
spec-init 用于在本仓库里创建一个新的需求级 Spec Pack:自动递增三位编号、创建并切换到 {num}-{short-name} 分支、生成 .aidlc/specs/{num}-{short-name}/ 目录结构,并把原始需求写入 requirements/raw.md(UTF-8 with BOM)。
约束:即使仓库包含 .gitmodules,spec-init 也只初始化根项目的 Spec 分支与 Spec Pack;子仓分支不在本阶段批量创建。
- 用户要开始一个"新需求"的 Spec(还没有 {num}-{short-name} 分支与 .aidlc/specs/... 目录)。 - 用户只给了中文需求文本(不方便先手动建文件),担心参数编码导致乱码。 - 需要确保分支命名、编号来源、目录结构符合仓库约定。
- 已经在一个合法的 {num}-{short-name} spec 分支上,且 .aidlc/specs/{num}-{short-name}/ 已存在并结构完整(这时直接进入后续命令)。
{num}-{short-name}(num 为三位数字;short-name 为 kebab-case,小写字母/数字/连字符).aidlc/specs/{num}-{short-name}/requirements/、design/、implementation/、verification/、release/requirements/raw.md(内容=原始需求;编码=UTF-8 with BOM)<本SKILL.md目录>/scripts/spec-create-branch.ps1(-File 直接执行,需 PowerShell 5.0+)spec-create-branch.sh(命令行参数见 --help;stdout 输出 JSON)I1 -> I2 之间创建并校验与根项目同名的 Spec 分支强制规则:始终以文件路径方式传入需求内容(避免中文内容在参数传递/编码上出问题)。
$sourceFilePath(但要提示"会被删除")。_dlc-raw-temp.md,然后用该路径作为 $sourceFilePath。- 无需担心残留:脚本执行成功后会自动删除该源文件。
示例(Agent 操作):
1. Write 工具 → 路径: {REPO_ROOT}/_dlc-raw-temp.md,内容: 用户提供的原始需求文本
2. 将 {REPO_ROOT}/_dlc-raw-temp.md 作为 $sourceFilePath / --source-file 传入脚本
short-name(2-4 词,kebab-case)从原始需求提炼 2-4 个词的短名称,优先"动词-名词",保留常见技术缩写(如 oauth2、jwt、api):
export-orders-batch 或 add-order-exportexport-orders按操作系统自动选择脚本实现(不要硬跑"另一种")。
powershell -NoProfile -ExecutionPolicy Bypass -File "<脚本路径>" ... 调用spec-create-branch.sh(stdout 输出 JSON)执行参数(只填参数即可)
Main):- -ShortName <kebab-case> - -SourceFilePath <需求文件路径> - -Title <可选> - 调用形态:
``powershell powershell -NoProfile -ExecutionPolicy Bypass -File "<本SKILL.md目录>/scripts/spec-create-branch.ps1" -ShortName "<kebab-case>" -SourceFilePath "<需求文件路径>" [-Title "<标题>"] ``
spec-create-branch.sh):- --short-name <kebab-case> - --source-file <需求文件路径> - --title <可选> - 调用形态:spec-create-branch.sh --short-name <...> --source-file <...> [--title <...>]
脚本职责边界:
.aidlc/specs/...检查以下事实是否同时成立(缺一不可):
git branch --show-current)符合 {num}-{short-name}。.aidlc/specs/<branchName>/ 存在,且包含 5 个必需子目录(requirements/、design/、implementation/、verification/、release/)。.aidlc/specs/<branchName>/requirements/raw.md 存在,内容等于原始需求(注意文件头有 UTF-8 BOM)。.gitmodules:本阶段不要求任何子仓已创建分支;后续应由 I1/I2 门禁处理using-aidlc 继续自动推进spec-init 的 DoD 通过后,本技能不做"下一步分流"判定(避免出现第二个路由源)。统一做法:
ROUTER_SUMMARY(见下节)using-aidlc 路由下一步(Router 默认自动续跑;进入 R1:spec-product-clarify)Spec Pack 初始化完成后(无论成功或失败),必须完成以下动作(按顺序,不可省略):
创建成功时:
ROUTER_SUMMARY:
stage: R0
artifacts:
- "{FEATURE_DIR}/requirements/raw.md"
needs_human_review: false
blocked: false
block_reason: ""
notes: "Spec Pack 已初始化完成;建议 Router 进入 R1(spec-product-clarify)"
任一 DoD 未满足并停止时:
ROUTER_SUMMARY:
stage: R0
artifacts: []
needs_human_review: true
blocked: true
block_reason: "<填写失败点与最小修复动作>"
notes: "未完成初始化,需先修复再继续"
using-aidlc:将上述 ROUTER_SUMMARY 作为路由输入传递给 using-aidlc,由 Router 判定下一步并自动推进(无需等待用户说「继续」)。- 若 Router 判定可自动续跑:在同一轮对话内继续执行下一步 worker skill(如 R1 等) - 若 Router 触发硬中断:停下并输出阻断原因、需要的输入、候选下一步
spec/<slug>、feature/<slug>、features/<slug>;本仓库规范是 {num}-{short-name} + .aidlc/specs/...。SourceFilePath 指向的文件;对用户的原始文件务必先确认是否需要备份。--;尽量 2-4 词。.aidlc/specs/...