ai-sdlc-change-impact
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseai-sdlc-change-impact: Evidence-Backed Lifecycle Recovery
ai-sdlc-change-impact: 基于证据的生命周期恢复
Internal AI SDLC skill, not client-facing by default. Every rule below is important to follow. None of it can be skipped. Analysis proposes recovery actions; the owning lifecycle skill applies them.
内部AI SDLC技能,默认不面向客户。 以下每条规则都必须遵守,无一例外。 分析仅提出恢复操作,由所属的生命周期技能执行这些操作。
0. Skill Card
0. 技能卡片
- Skill name:
ai-sdlc-change-impact - Primary audience: Delivery, Dev, BA, QA
- Supporting audience: PM, Architecture, Security
- Audience tags: Delivery, Dev, BA, QA
- SDLC stage: Cross-lifecycle change recovery
- Purpose: Trace changed sources to stale artifacts and safe reopen actions.
- Output: and
change-impact.md_ai_sdlc/change-impact.toon
- 技能名称:
ai-sdlc-change-impact - 主要受众:交付团队、开发人员、业务分析师(BA)、质量保证人员(QA)
- 支持受众:项目经理(PM)、架构师、安全人员
- 受众标签:交付团队、开发人员、BA、QA
- SDLC阶段:跨生命周期变更恢复
- 用途:追踪变更源到过时工件,并提供安全的重新开启操作建议。
- 输出:和
change-impact.md_ai_sdlc/change-impact.toon
0.1 Required Inputs
0.1 必填输入
- Feature root in or
specs/.specs-refiniment/ - A JSON change set with stable changed references and exact source evidence.
- Readable feature artifacts and, in full flow, canonical lifecycle state.
- 位于或
specs/中的功能根目录。specs-refiniment/ - 包含稳定变更引用和精确源证据的JSON变更集。
- 可读的功能工件,在全流程模式下还需规范的生命周期状态。
0.2 Clarification Rules
0.2 澄清规则
- Ask only when the feature, changed reference, or source evidence is ambiguous.
- Do not infer that an artifact is stale without an exact trace occurrence.
- Report missing state or unowned artifacts as blockers, not guessed stages.
- Preserve multiple changes independently even when they affect one artifact.
- 仅当功能、变更引用或源证据存在歧义时才询问。
- 若无精确的追踪匹配,不得推断工件已过时。
- 将缺失状态或无归属的工件报告为阻塞问题,而非猜测阶段。
- 即使多个变更影响同一个工件,也要独立保留每个变更的记录。
0.2.1 Flow Mode Flags
0.2.1 流程模式标志
- Support and
--quick-flow; full flow takes precedence.--full-flow - Quick flow scans feature Markdown and reports missing state as a blocker.
- Full flow requires canonical state plus valid changed-reference source lines.
- Neither mode changes state, artifacts, decisions, tasks, or indexes.
- 支持和
--quick-flow;全流程模式优先级更高。--full-flow - 快速流程模式扫描功能Markdown文件,并将缺失状态报告为阻塞问题。
- 全流程模式需要规范状态以及有效的变更引用源行。
- 两种模式均不得修改状态、工件、决策、任务或索引。
0.3 Output Rules
0.3 输出规则
- Return changed refs, stale artifacts, affected stages, blockers, and ordered reopen actions directly in the Codex response.
- Before the final response, emit with
ai-sdlc-handoff/v1,result,blockers, andnext_required; every action includesnext_optional,reason, andcommand.expected_artifact - Do not create ,
summary.txt, or ad hoc recovery files.*-summary.txt - Every affected artifact and reopen action must retain exact evidence.
- 在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 human analysis to .
<feature-root>/change-impact.md - Write machine analysis to .
<feature-root>/_ai_sdlc/change-impact.toon - Never overwrite the changed source, downstream artifacts, or state.
- Route approved actions through the owning lifecycle skill.
- 将人工分析结果写入。
<feature-root>/change-impact.md - 将机器分析结果写入。
<feature-root>/_ai_sdlc/change-impact.toon - 绝不得覆盖变更源、下游工件或状态。
- 经批准的操作需通过所属的生命周期技能进行路由。
0.5 Feature State Machine
0.5 功能状态机
- Read before proposing stage actions.
<feature-root>/_ai_sdlc/state.toon - validates read-only state availability.
--state-check - and
--begin-stateare rejected because analysis cannot authorize reopening.--complete-state - A proposal applies only to a stage currently in a complete state; active and not-started stages receive revalidation or pre-start gates.
reopen - The owning workflow records accepted recovery in state and decision log.
- 在提出阶段操作建议前,读取。
<feature-root>/_ai_sdlc/state.toon - 用于验证只读状态的可用性。
--state-check - 拒绝和
--begin-state,因为分析无法授权重新开启。--complete-state - 建议仅适用于当前处于完成状态的阶段;活跃和未启动阶段需进行重新验证或启动前校验。
reopen - 所属工作流会将已接受的恢复操作记录到状态和决策日志中。
0.6 Artifact Metadata And Metatags
0.6 工件元数据与元标签
- Markdown starts with using schema
artifact_metadata.ai-sdlc-change-impact-metadata/v1 - Include for
metatags,ai-sdlc,change-impact, and the affected stage identifiers.recovery - Record feature, workspace, changed refs, state file, and flow mode.
- Markdown文件需以开头,使用
artifact_metadataschema。ai-sdlc-change-impact-metadata/v1 - 包含:
metatags、ai-sdlc、change-impact以及受影响的阶段标识符。recovery - 记录功能、工作区、变更引用、状态文件和流程模式。
0.7 Specs Index
0.7 规范索引
- Read or
specs/_ai_sdlc/specs-index.toonbefore feature analysis.specs-refiniment/_ai_sdlc/specs-index.toon - Do not refresh or
specs/specs-index.mdduring read-only analysis.specs-refiniment/specs-index.md - The owning workflow refreshes indexes only after an accepted state or authoritative artifact change.
- 在分析功能前,读取或
specs/_ai_sdlc/specs-index.toon。specs-refiniment/_ai_sdlc/specs-index.toon - 在只读分析期间,不得刷新或
specs/specs-index.md。specs-refiniment/specs-index.md - 仅当状态或权威工件变更被接受后,所属工作流才会刷新索引。
References
参考资料
- Read before preparing change evidence.
references/change-set-contract.md - Use for deterministic trace scanning, stage mapping, validation, and canonical report generation.
scripts/change_impact.py
- 在准备变更证据前,阅读。
references/change-set-contract.md - 使用进行确定性的追踪扫描、阶段映射、验证和规范报告生成。
scripts/change_impact.py
Script Usage
脚本使用
bash
python3 skills/ai-sdlc-change-impact/scripts/change_impact.py specs/payments --changes /tmp/changes.json --emit --quick-flow
python3 skills/ai-sdlc-change-impact/scripts/change_impact.py specs/payments --changes /tmp/changes.json --write --full-flow --format toon
python3 skills/ai-sdlc-change-impact/scripts/change_impact.py specs/payments --changes /tmp/changes.json --state-check --format toonThe change set is read-only input. atomically creates both report
formats after all evidence gates pass.
--writebash
python3 skills/ai-sdlc-change-impact/scripts/change_impact.py specs/payments --changes /tmp/changes.json --emit --quick-flow
python3 skills/ai-sdlc-change-impact/scripts/change_impact.py specs/payments --changes /tmp/changes.json --write --full-flow --format toon
python3 skills/ai-sdlc-change-impact/scripts/change_impact.py specs/payments --changes /tmp/changes.json --state-check --format toon变更集为只读输入。会在所有证据校验通过后,以原子方式创建两种报告格式。
--writePurpose
目的
Make late change recovery explicit and bounded so teams update the smallest
credible lifecycle surface instead of either ignoring drift or restarting all
delivery work.
使后期变更恢复过程明确且可控,让团队只需更新最小的可信生命周期范围,而非忽略漂移或重启所有交付工作。
Inputs
输入要求
- Use repository-relative source evidence with a positive line number.
- Use stable trace IDs already present in source and downstream artifacts.
- Read state status and artifact ownership from canonical repository records.
- Exclude generated change-impact reports from their own analysis.
- 使用仓库相对路径的源证据,并包含有效的行号。
- 使用已存在于源和下游工件中的稳定追踪ID。
- 从规范的仓库记录中读取状态和工件归属信息。
- 排除变更影响报告本身,不将其纳入分析范围。
Steps
步骤
- Record each changed reference and exact changed-source evidence.
- Validate that the source path is inside the feature and the evidence line contains the changed reference.
- Scan feature Markdown for exact downstream trace occurrences.
- Map affected artifacts to lifecycle skills and stages using metadata.
- Classify the safe action from current state: reopen complete work, revalidate active work, or add a pre-start validation gate.
- Order actions by canonical lifecycle stage order and retain all evidence.
- Emit or write the analysis, then hand approved actions to owning skills.
- 记录每个变更引用和精确的变更源证据。
- 验证源路径位于功能目录内,且证据行包含变更引用。
- 扫描功能Markdown文件,查找精确的下游追踪匹配。
- 使用元数据将受影响的工件映射到生命周期技能和阶段。
- 根据当前状态分类安全操作:重新开启已完成的工作、重新验证活跃工作,或添加启动前校验 gate。
- 按照规范的生命周期阶段顺序对操作排序,并保留所有证据。
- 输出或写入分析结果,然后将已批准的操作移交至所属技能。
Output Spec
输出规范
The TOON schema contains changes, affected artifacts,
stage status, blockers, and actions with , , , ,
, , , and .
ai-sdlc-change-impact/v1stageskillactionreasonevidence_pathevidence_linechanged_refexpected_artifactQuality gate:
- Pass when every change has valid source evidence and every impact/action is backed by an exact downstream trace occurrence.
- Full flow fails when state is absent, source evidence is invalid, or an affected artifact cannot be mapped to a lifecycle owner.
TOON schema 包含变更、受影响工件、阶段状态、阻塞问题以及操作,每个操作包含、、、、、、和。
ai-sdlc-change-impact/v1stageskillactionreasonevidence_pathevidence_linechanged_refexpected_artifact质量校验:
- 当每个变更都有有效的源证据,且每个影响/操作都有精确的下游追踪匹配时,校验通过。
- 全流程模式下,若状态缺失、源证据无效或受影响工件无法映射到生命周期所有者,则校验失败。
Examples
示例
Valid change:
json
{"id":"CHG-001","changed_ref":"AC-004","source":{"path":"requirements.md","line":121,"detail":"Retry behavior changed from optional to required."}}Invalid counter-example: It cannot prove
which durable source changed or which downstream artifacts are stale.
The requirements changed recently.有效变更:
json
{"id":"CHG-001","changed_ref":"AC-004","source":{"path":"requirements.md","line":121,"detail":"Retry behavior changed from optional to required."}}无效反例: 该描述无法证明哪个持久源发生了变更,也无法证明哪些下游工件已过时。
The requirements changed recently.Edge Cases
边缘情况
- A valid change with no downstream occurrence reports no stale artifact and recommends targeted trace review rather than broad reopening.
- Multiple occurrences in one artifact are collapsed into one affected row per changed reference using the earliest exact line as evidence.
- Unknown artifact owners block full flow but remain visible in quick flow.
- Already active stages are revalidated, never reopened concurrently.
- 若有效变更无下游匹配,则报告无过时工件,并建议针对性的追踪审查,而非大范围重新开启。
- 同一工件中的多个匹配项会按变更引用合并为一行受影响记录,使用最早的精确行作为证据。
- 未知的工件所有者会阻塞全流程模式,但在快速流程模式下仍可见。
- 已活跃的阶段仅进行重新验证,绝不会同时重新开启。
Scope Boundary
范围边界
- Do not mutate lifecycle state, indexes, source artifacts, or policy.
- Do not reopen a stage solely because it follows another stage chronologically.
- Do not treat filename similarity or model intuition as impact evidence.
- Do not approve recovery actions on behalf of artifact owners.
- Use when the owning workflow is unclear.
$ai-sdlc-navigator
- 不得修改生命周期状态、索引、源工件或策略。
- 不得仅因为某个阶段在时间上晚于另一个阶段就重新开启它。
- 不得将文件名相似性或模型直觉作为影响证据。
- 不得代表工件所有者批准恢复操作。
- 若所属工作流不明确,使用。
$ai-sdlc-navigator