ai-sdlc-workflow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseai-sdlc-workflow: Declarative Workflow Planning
ai-sdlc-workflow:声明式工作流规划
Internal AI SDLC skill, not client-facing by default. Planning never executes actions, hooks, approvals, or shell commands.
内部AI SDLC技能,默认不面向客户。 规划过程绝不会执行操作、钩子、审批或Shell命令。
0. Skill Card
0. 技能卡片
- Skill name:
ai-sdlc-workflow - Primary audience: Delivery, Dev
- Supporting audience: QA, Security, Architecture
- Audience tags: Delivery, Dev, QA, Security
- SDLC stage: Controlled execution planning
- Purpose: Compile portable workflow intent into deterministic, gated, host-safe waves.
- Output:
_ai_sdlc/workflows/<workflow-id>/plan.{toon,json,md}
- 技能名称:
ai-sdlc-workflow - 主要受众:交付团队、开发人员
- 支持受众:QA、安全团队、架构师
- 受众标签:交付、开发、QA、安全
- SDLC阶段:受控执行规划
- 用途:将可移植工作流意图编译为确定性、带关卡、主机安全的任务波。
- 输出:
_ai_sdlc/workflows/<workflow-id>/plan.{toon,json,md}
0.1 Required Inputs
0.1 必填输入
- Versioned workflow JSON, declared capabilities, typed steps, dependencies, bounded conditions, approval gates, and deterministic hook declarations.
- Optional JSON context and explicit host concurrency/isolation capabilities.
- 版本化工作流JSON、已声明能力、类型化步骤、依赖项、边界条件、审批关卡以及确定性钩子声明。
- 可选JSON上下文和明确的主机并发/隔离能力。
0.2 Clarification Rules
0.2 澄清规则
- Ask when an action, approval owner, or required capability is missing.
- Reject unknown fields, undeclared capabilities, cycles, unsafe identifiers, invalid conditions, and hooks without exact targets.
- Never infer approval, shell authority, network authority, or safe isolation.
- 当操作、审批负责人或所需能力缺失时,需主动询问。
- 拒绝未知字段、未声明的能力、循环、不安全标识符、无效条件以及无明确目标的钩子。
- 绝不推断审批权限、Shell权限、网络权限或安全隔离。
0.2.1 Flow Mode Flags
0.2.1 流模式标志
- Support and
--quick-flow; full flow takes precedence.--full-flow - Both modes use identical validation, cycle, capability, and fallback rules.
- Full flow requires review of every skipped/deferred condition, gate, hook, and fallback.
- 支持和
--quick-flow;完整流模式优先级更高。--full-flow - 两种模式使用相同的验证、循环检测、能力检查和回退规则。
- 完整流模式需要审核所有跳过/延迟的条件、关卡、钩子和回退项。
0.3 Output Rules
0.3 输出规则
- Default to complete TOON with workflow fingerprint, step decisions, waves, gates, hooks, fallbacks, host capabilities, and plan fingerprint.
- Return validation and handoff summaries directly in the Codex response.
- Emit with
ai-sdlc-handoff/v1,result,blockers, andnext_required; actions includenext_optional,reason, andcommand.expected_artifact - Do not create ,
summary.txt, or another standalone summary file.*-summary.txt
- 默认生成完整的TOON格式文件,包含工作流指纹、步骤决策、任务波、关卡、钩子、回退项、主机能力以及规划指纹。
- 在Codex响应中直接返回验证和交接摘要。
- 输出格式内容,包含
ai-sdlc-handoff/v1、result、blockers和next_required;操作信息包含next_optional、reason和command。expected_artifact - 不得创建、
summary.txt或其他独立摘要文件。*-summary.txt
0.4 Artifact Routing
0.4 工件路由
- Write generated plans only below .
_ai_sdlc/workflows/<workflow-id>/ - Keep authored workflow definitions in visible repository-owned paths.
- Never execute or rewrite the authored workflow during planning.
- 生成的规划文件仅写入路径下。
_ai_sdlc/workflows/<workflow-id>/ - 已编写的工作流定义需保存在可见的仓库所属路径中。
- 规划过程中绝不执行或重写已编写的工作流。
0.5 Feature State Machine
0.5 特性状态机
- Read the owning feature before planning feature work.
_ai_sdlc/state.toon - Workflow plans do not advance feature state or runtime task state.
- 在规划特性工作前,先读取所属特性的文件。
_ai_sdlc/state.toon - 工作流规划不会推进特性状态或运行时任务状态。
0.6 Artifact Metadata And Metatags
0.6 工件元数据与元标签
- Machine records use and
ai-sdlc-workflow/v1.ai-sdlc-workflow-plan/v1 - Workflow-related Markdown uses canonical and
artifact_metadatawhen authored.metatags
- 机器记录使用和
ai-sdlc-workflow/v1格式。ai-sdlc-workflow-plan/v1 - 工作流相关的Markdown文件在编写时需使用标准的和
artifact_metadata。metatags
0.7 Specs Index
0.7 规范索引
- Read before resolving feature-local actions and use
_ai_sdlc/specs-index.toonfor human review.specs-index.md - Planning does not refresh either specs index.
- 在解析特性本地操作前,先读取,并使用
_ai_sdlc/specs-index.toon供人工审核。specs-index.md - 规划过程不会刷新任何一个规范索引。
References
参考资料
- Read before authoring or reviewing workflows.
references/workflow-contract.md - Validate definitions with and generated plans with
references/workflow.schema.json.references/workflow-plan.schema.json - Use for validation and planning.
scripts/workflow.py
- 在编写或审核工作流前,先阅读。
references/workflow-contract.md - 使用验证定义,使用
references/workflow.schema.json验证生成的规划。references/workflow-plan.schema.json - 使用进行验证和规划。
scripts/workflow.py
Script Usage
脚本使用
bash
python3 skills/ai-sdlc-workflow/scripts/workflow.py . --workflow workflow.json --validate --format toon
python3 skills/ai-sdlc-workflow/scripts/workflow.py . --workflow workflow.json --plan --context context.json --concurrency 4 --isolation-supported --writebash
python3 skills/ai-sdlc-workflow/scripts/workflow.py . --workflow workflow.json --validate --format toon
python3 skills/ai-sdlc-workflow/scripts/workflow.py . --workflow workflow.json --plan --context context.json --concurrency 4 --isolation-supported --writePurpose
用途
Separate portable workflow semantics from host execution while preserving gates,
capability boundaries, deterministic hooks, and safe parallelism.
将可移植工作流语义与主机执行分离,同时保留关卡、能力边界、确定性钩子和安全并行性。
Inputs
输入项
- Exact workflow identity and version.
- Declared capability set and typed steps.
- Optional bounded condition context.
- Explicit host concurrency and isolation support.
- 明确的工作流标识和版本。
- 已声明的能力集和类型化步骤。
- 可选的边界条件上下文。
- 明确的主机并发和隔离支持情况。
Steps
步骤
- Validate schema shape, IDs, actions, declared capabilities, and hook targets.
- Detect dependency cycles before evaluating conditions.
- Evaluate only ,
eq, andinconditions against explicit context.exists - Preserve approval steps as exclusive gates; never auto-satisfy them.
- Build topological dependency waves from eligible steps.
- Keep a parallel wave only for isolated task/validation steps when the host supports it.
- Otherwise split deterministically into sequential waves and report exact fallbacks.
- Emit complete TOON and optional JSON/Markdown projections without executing actions.
- 验证架构结构、ID、操作、已声明能力和钩子目标。
- 在评估条件前检测依赖循环。
- 仅针对明确上下文评估、
eq和in条件。exists - 将审批步骤保留为专属关卡;绝不自动满足审批要求。
- 从符合条件的步骤构建拓扑依赖任务波。
- 仅当主机支持时,为孤立的任务/验证步骤保留并行任务波。
- 否则确定性地拆分为顺序任务波,并报告明确的回退项。
- 生成完整的TOON格式文件和可选的JSON/Markdown投影,不执行任何操作。
Output Spec
输出规范
The plan records every step as eligible, skipped, or deferred; selected waves;
approval gates; hooks; fallback reason codes; source and plan fingerprints; and
explicit host capabilities.
Quality gate:
- Pass when the workflow is acyclic, capabilities are declared, conditions are bounded, hook targets resolve, and every planned parallel step is isolated.
- Fail closed on invalid workflow structure or ambiguous authority.
规划记录会将每个步骤标记为符合条件、已跳过或已延迟;包含选定的任务波、审批关卡、钩子、回退原因代码、源和规划指纹,以及明确的主机能力。
质量关卡:
- 当工作流无循环、能力已声明、条件有边界、钩子目标可解析,且所有规划的并行步骤均为孤立状态时,判定为通过。
- 若工作流结构无效或权限不明确,则判定为失败并终止。
Scope Boundary
范围边界
- Do not execute workflow actions or hooks.
- Do not grant capabilities, approvals, isolation, or concurrency implicitly.
- Do not mutate policy, feature state, runtime state, or canonical artifacts.
- 绝不执行工作流操作或钩子。
- 绝不隐式授予能力、审批权限、隔离或并发权限。
- 绝不修改策略、特性状态、运行时状态或标准工件。