ai-sdlc-delivery-graph
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseai-sdlc-delivery-graph: Repository Traceability
ai-sdlc-delivery-graph:仓库可追溯性
Internal AI SDLC skill, not client-facing by default. Every rule below is important to follow. None of it can be skipped. The graph is a generated projection; repository artifacts and Git remain authoritative.
内部AI SDLC技能,默认不面向客户。 以下每条规则都必须遵守,无一例外。 该图是生成的投影;仓库工件和Git仍为权威来源。
0. Skill Card
0. 技能卡片
- Skill name:
ai-sdlc-delivery-graph - Primary audience: Delivery, Dev, QA, Architecture
- Supporting audience: PM, BA, Security, Release
- Audience tags: Delivery, Dev, QA, Architecture, BA
- SDLC stage: Traceability and readiness
- Purpose: Build a deterministic repository-wide lifecycle graph and answer trace, gap, coverage, and orphan questions from stable evidence anchors.
- Output: complete for agents, plus
_ai_sdlc/delivery-graph.toonfor schema/interoperability and_ai_sdlc/delivery-graph.jsonfor human review when_ai_sdlc/delivery-graph.mdis requested--write
- 技能名称:
ai-sdlc-delivery-graph - 主要受众:交付、开发、QA、架构
- 支持受众:产品经理、业务分析师、安全、发布
- 受众标签:交付、开发、QA、架构、业务分析师
- SDLC阶段:可追溯性与就绪性
- 用途:构建确定性的全仓库生命周期图,基于稳定证据锚点回答追溯、缺口、覆盖率和孤立项相关问题。
- 输出:供Agent使用的完整,以及供 Schema/互操作性使用的
_ai_sdlc/delivery-graph.toon,当使用_ai_sdlc/delivery-graph.json参数时还会生成供人工审核的--write_ai_sdlc/delivery-graph.md
0.1 Required Inputs
0.1 必填输入
- Repository root containing lifecycle Markdown and, optionally, Git history.
- A stable trace ID or graph node ID for path queries.
- Explicit structured trace lines when a relationship cannot be derived safely.
- 包含生命周期Markdown文件的仓库根目录,可选包含Git历史。
- 用于路径查询的稳定追溯ID或图节点ID。
- 当无法安全推导关系时,需提供明确的结构化追溯行。
0.2 Clarification Rules
0.2 澄清规则
- Report ambiguous short IDs with all matching scoped node IDs.
- Never invent an edge because two terms look semantically similar.
- Treat missing links as gaps or orphans instead of guessing intent.
- 报告模糊的短ID时,需附带所有匹配的作用域节点ID。
- 绝不能因两个术语语义相似就凭空创建关联边。
- 将缺失的链接视为缺口或孤立项,而非猜测意图。
0.2.1 Flow Mode Flags
0.2.1 流程模式标志
- Support and
--quick-flow; full flow takes precedence.--full-flow - Both modes rebuild from current authoritative inputs before answering.
- Full flow requires reviewers to resolve every reported ambiguity and high-value requirement coverage gap before claiming readiness.
- 支持和
--quick-flow;全流程模式优先级更高。--full-flow - 两种模式在回答前都会基于当前权威输入重新构建。
- 全流程模式要求审核者解决所有报告的模糊点和高价值需求覆盖率缺口后,才能宣称就绪。
0.3 Output Rules
0.3 输出规则
- Report the graph fingerprint, node and edge counts, source fingerprint, coverage, gaps, and orphans.
- Return query paths as ordered node and edge evidence, not prose-only claims.
- Return the validation and handoff summary 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 - Do not create ad hoc summaries outside the canonical graph outputs.
- 报告图指纹、节点和边的数量、源指纹、覆盖率、缺口和孤立项。
- 查询路径以有序的节点和边证据形式返回,而非仅纯文本声明。
- 在Codex响应中直接返回验证与交接摘要。
- 输出包含、
result、blockers和next_required的next_optional;操作信息包含ai-sdlc-handoff/v1、reason和command。expected_artifact - 不得创建、
summary.txt或其他独立的摘要文件。*-summary.txt - 不得在规范图输出之外创建临时摘要。
0.4 Artifact Routing
0.4 工件路由
- Write generated graph data only below repository .
_ai_sdlc/ - Keep versioned schemas and interpretation rules in this skill package.
- Preserve repository-relative evidence paths and one-based source line numbers.
- 仅在仓库的目录下写入生成的图数据。
_ai_sdlc/ - 在此技能包中保留版本化Schema和解释规则。
- 保留仓库相对证据路径和从1开始的源文件行号。
0.5 Feature State Machine
0.5 特性状态机
- Graph indexing is read-only with respect to feature lifecycle state.
- Read canonical before interpreting feature status; do not create a feature-local
_ai_sdlc/state.toonor change its sequencing.state.toon - A graph gap may block a later gate but cannot advance or reopen state itself.
- 图索引对特性生命周期状态为只读。
- 在解释特性状态前,先读取规范的;不得创建特性本地的
_ai_sdlc/state.toon或修改其顺序。state.toon - 图缺口可能会阻塞后续关卡,但无法自行推进或重新打开状态。
0.6 Artifact Metadata And Metatags
0.6 工件元数据与元标签
- Node and edge records use and
ai-sdlc-delivery-node/v1.ai-sdlc-delivery-edge/v1 - The aggregate uses and deterministic SHA-256 fingerprints derived from normalized content.
ai-sdlc-delivery-graph/v1 - Evidence producers use ; generated freshness records and ledgers use
ai-sdlc-evidence-source/v1andai-sdlc-evidence-record/v1.ai-sdlc-evidence-ledger/v1 - Source Markdown participates through canonical and
artifact_metadata; graph output does not replace or rewrite that metadata.metatags
- 节点和边记录使用和
ai-sdlc-delivery-node/v1。ai-sdlc-delivery-edge/v1 - 聚合数据使用,以及基于标准化内容生成的确定性SHA-256指纹。
ai-sdlc-delivery-graph/v1 - 证据生成者使用;生成的新鲜度记录和分类账使用
ai-sdlc-evidence-source/v1和ai-sdlc-evidence-record/v1。ai-sdlc-evidence-ledger/v1 - 源Markdown通过规范的和
artifact_metadata参与;图输出不会替换或重写该元数据。metatags
0.7 Specs Index
0.7 规范索引
- Read canonical first and use
_ai_sdlc/specs-index.toonfor human discovery across implementation and refinement workspaces.specs-index.md - Scope short trace IDs by feature directory to prevent cross-feature identity collisions.
- Do not mutate either specs index during graph generation.
- 先读取规范的,并使用
_ai_sdlc/specs-index.toon在实现和细化工作区中供人工查找。specs-index.md - 按特性目录限定短追溯ID的作用域,防止跨特性标识冲突。
- 在图生成过程中不得修改任一规范索引。
References
参考资料
- Read before interpreting nodes, edges, gaps, or query paths.
references/delivery-graph-contract.md - Use ,
references/delivery-node.schema.json, andreferences/delivery-edge.schema.jsonfor machine contracts.references/delivery-graph.schema.json - Use for deterministic indexing and queries.
scripts/delivery_graph.py - Read before registering or judging evidence freshness. Validate inputs and outputs with
references/evidence-ledger-contract.mdandreferences/evidence-source.schema.json.references/evidence-ledger.schema.json - Use to recalculate current file identities, propagate stale state, and query fresh coverage.
scripts/evidence_ledger.py
- 在解释节点、边、缺口或查询路径前,先阅读。
references/delivery-graph-contract.md - 使用、
references/delivery-node.schema.json和references/delivery-edge.schema.json作为机器契约。references/delivery-graph.schema.json - 使用进行确定性索引和查询。
scripts/delivery_graph.py - 在注册或判断证据新鲜度前,先阅读。使用
references/evidence-ledger-contract.md和references/evidence-source.schema.json验证输入和输出。references/evidence-ledger.schema.json - 使用重新计算当前文件标识、传播过期状态并查询有效覆盖率。
scripts/evidence_ledger.py
Script Usage
脚本用法
bash
python3 skills/ai-sdlc-delivery-graph/scripts/delivery_graph.py . --index --write --format toon --quick-flow
python3 skills/ai-sdlc-delivery-graph/scripts/delivery_graph.py . --trace AC-004 --to T006 --format toon
python3 skills/ai-sdlc-delivery-graph/scripts/delivery_graph.py . --gaps --format markdown
python3 skills/ai-sdlc-delivery-graph/scripts/delivery_graph.py . --orphans --format toon
python3 skills/ai-sdlc-delivery-graph/scripts/evidence_ledger.py . --index --as-of 2026-07-19 --write --format toon
python3 skills/ai-sdlc-delivery-graph/scripts/evidence_ledger.py . --coverage --as-of 2026-07-19 --format toon
python3 skills/ai-sdlc-delivery-graph/scripts/evidence_ledger.py . --stale --as-of 2026-07-19 --format markdownbash
python3 skills/ai-sdlc-delivery-graph/scripts/delivery_graph.py . --index --write --format toon --quick-flow
python3 skills/ai-sdlc-delivery-graph/scripts/delivery_graph.py . --trace AC-004 --to T006 --format toon
python3 skills/ai-sdlc-delivery-graph/scripts/delivery_graph.py . --gaps --format markdown
python3 skills/ai-sdlc-delivery-graph/scripts/delivery_graph.py . --orphans --format toon
python3 skills/ai-sdlc-delivery-graph/scripts/evidence_ledger.py . --index --as-of 2026-07-19 --write --format toon
python3 skills/ai-sdlc-delivery-graph/scripts/evidence_ledger.py . --coverage --as-of 2026-07-19 --format toon
python3 skills/ai-sdlc-delivery-graph/scripts/evidence_ledger.py . --stale --as-of 2026-07-19 --format markdownPurpose
目的
Make lifecycle traceability executable so reviewers can prove why work exists,
what verifies it, what shipped it, and where delivery evidence is missing.
让生命周期可追溯性可执行,以便审核者能够证明工作存在的原因、验证依据、交付渠道以及交付证据缺失的位置。
Inputs
输入
- Stable trace identifiers in lifecycle Markdown.
- lines or co-located declaration references.
Refs: - Optional explicit and
Component: <path> -> <trace-id>links.Evidence: <path> -> <trace-id> - Conventional commit bodies containing and
Spec:and annotated Git tags for release nodes.Task:
- 生命周期Markdown中的稳定追溯标识符。
- 行或同位置的声明引用。
Refs: - 可选的显式和
Component: <path> -> <trace-id>链接。Evidence: <path> -> <trace-id> - 包含和
Spec:的常规提交正文,以及用于发布节点的带注释Git标签。Task:
Steps
步骤
- Scan canonical lifecycle Markdown and hash every input file.
- Scope declared and referenced trace IDs to their feature.
- Add only evidence-backed semantic edges and Git task/release edges.
- Normalize and fingerprint nodes, edges, sources, gaps, and coverage.
- Inspect orphan and missing-coverage results.
- Run trace queries using a scoped node ID when a short ID is ambiguous.
- Write generated projections only when explicitly requested.
- Register evidence with captured artifact and dependency hashes, expiry, and upstream evidence identities.
- Rebuild the ledger for an explicit date; resolve missing, changed, expired, unknown, ambiguous, or cyclic evidence before claiming coverage.
as_of
- 扫描规范的生命周期Markdown并哈希每个输入文件。
- 将声明和引用的追溯ID限定到其所属特性。
- 仅添加有证据支持的语义边和Git任务/发布边。
- 对节点、边、源、缺口和覆盖率进行标准化处理并生成指纹。
- 检查孤立项和缺失覆盖率结果。
- 当短ID模糊时,使用作用域节点ID执行追溯查询。
- 仅在明确请求时写入生成的投影。
- 注册证据时,捕获工件和依赖哈希、过期时间以及上游证据标识。
- 针对明确的日期重新构建分类账;在宣称覆盖率前,解决缺失、变更、过期、未知、模糊或循环的证据问题。
as_of
Output Spec
输出规范
The graph contains sorted nodes, edges, gaps, orphans, coverage counters, source
hashes, and fingerprints. Rebuilding identical inputs produces byte-identical
TOON, JSON, and Markdown.
The TOON/JSON evidence ledger contains recalculated file identities, resolved subjects,
freshness states, reason codes, upstream state, stale paths, and fresh-only
requirement coverage.
Quality gate:
- Pass when all node and edge evidence resolves, identities are unambiguous, fingerprints recompute, and required coverage gaps are understood.
- Fail when an explicit query is absent or ambiguous, an edge endpoint is missing, or generated output drifts from current authoritative inputs.
图包含排序后的节点、边、缺口、孤立项、覆盖率计数器、源哈希和指纹。重新构建相同输入会生成字节完全一致的TOON、JSON和Markdown文件。
TOON/JSON证据分类账包含重新计算的文件标识、解析后的主题、新鲜度状态、原因代码、上游状态、过期路径以及仅有效需求的覆盖率。
质量关卡:
- 当所有节点和边证据都已解析、标识明确、指纹可重新计算,且已理解所需覆盖率缺口时,判定为通过。
- 当显式查询缺失或模糊、边端点缺失,或生成的输出与当前权威输入偏离时,判定为失败。
Examples
示例
TC-004 / AC-004verifiesRefs: AC-004T006traces-toTask: T006implementsTC-004 / AC-004verifiesT006Refs: AC-004traces-toTask: T006implementsEdge Cases
边缘情况
- The same in two features is two nodes and requires a scoped query.
AC-001 - A reference without a local declaration still becomes a placeholder node and is reported as an orphan or coverage gap.
- Git-less fixture directories still produce valid lifecycle graphs.
- Generated graph files never become their own inputs.
- Evidence dependency cycles, duplicate IDs, ambiguous subjects, and unknown upstream evidence fail closed.
- 两个特性中的同一个是两个节点,需要使用作用域查询。
AC-001 - 没有本地声明的引用仍会成为占位节点,并被报告为孤立项或覆盖率缺口。
- 无Git的 fixture目录仍能生成有效的生命周期图。
- 生成的图文件永远不会成为自身的输入。
- 证据依赖循环、重复ID、模糊主题和未知上游证据会导致封闭失败。
Scope Boundary
范围边界
- Do not infer semantic similarity, ownership, or policy decisions.
- Do not mark evidence fresh without matching current hashes, expiry, and all upstream evidence states.
- Do not edit lifecycle artifacts to make a graph appear complete.
- Do not treat graph generation as approval, validation evidence, or release.
- Do not overwrite producer manifests or evidence artifacts during indexing.
- 不得推断语义相似性、所有权或政策决策。
- 若未匹配当前哈希、过期时间和所有上游证据状态,不得标记证据为有效。
- 不得编辑生命周期工件以使图看起来完整。
- 不得将图生成视为批准、验证证据或发布。
- 在索引过程中不得覆盖生成者清单或证据工件。