ai-sdlc-change-impact

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ai-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:
    change-impact.md
    and
    _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
    specs/
    or
    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
    --quick-flow
    and
    --full-flow
    ; full flow takes precedence.
  • 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
    ai-sdlc-handoff/v1
    with
    result
    ,
    blockers
    ,
    next_required
    , and
    next_optional
    ; every action includes
    reason
    ,
    command
    , and
    expected_artifact
    .
  • Do not create
    summary.txt
    ,
    *-summary.txt
    , or ad hoc recovery files.
  • 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
    <feature-root>/_ai_sdlc/state.toon
    before proposing stage actions.
  • --state-check
    validates read-only state availability.
  • --begin-state
    and
    --complete-state
    are rejected because analysis cannot authorize reopening.
  • A
    reopen
    proposal applies only to a stage currently in a complete state; active and not-started stages receive revalidation or pre-start gates.
  • 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
    artifact_metadata
    using schema
    ai-sdlc-change-impact-metadata/v1
    .
  • Include
    metatags
    for
    ai-sdlc
    ,
    change-impact
    ,
    recovery
    , and the affected stage identifiers.
  • Record feature, workspace, changed refs, state file, and flow mode.
  • Markdown文件需以
    artifact_metadata
    开头,使用
    ai-sdlc-change-impact-metadata/v1
    schema。
  • 包含
    metatags
    ai-sdlc
    change-impact
    recovery
    以及受影响的阶段标识符。
  • 记录功能、工作区、变更引用、状态文件和流程模式。

0.7 Specs Index

0.7 规范索引

  • Read
    specs/_ai_sdlc/specs-index.toon
    or
    specs-refiniment/_ai_sdlc/specs-index.toon
    before feature analysis.
  • Do not refresh
    specs/specs-index.md
    or
    specs-refiniment/specs-index.md
    during read-only analysis.
  • 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
    references/change-set-contract.md
    before preparing change evidence.
  • Use
    scripts/change_impact.py
    for deterministic trace scanning, stage mapping, validation, and canonical report generation.
  • 在准备变更证据前,阅读
    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 toon
The change set is read-only input.
--write
atomically creates both report formats after all evidence gates pass.
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 toon
变更集为只读输入。
--write
会在所有证据校验通过后,以原子方式创建两种报告格式。

Purpose

目的

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

步骤

  1. Record each changed reference and exact changed-source evidence.
  2. Validate that the source path is inside the feature and the evidence line contains the changed reference.
  3. Scan feature Markdown for exact downstream trace occurrences.
  4. Map affected artifacts to lifecycle skills and stages using metadata.
  5. Classify the safe action from current state: reopen complete work, revalidate active work, or add a pre-start validation gate.
  6. Order actions by canonical lifecycle stage order and retain all evidence.
  7. Emit or write the analysis, then hand approved actions to owning skills.
  1. 记录每个变更引用和精确的变更源证据。
  2. 验证源路径位于功能目录内,且证据行包含变更引用。
  3. 扫描功能Markdown文件,查找精确的下游追踪匹配。
  4. 使用元数据将受影响的工件映射到生命周期技能和阶段。
  5. 根据当前状态分类安全操作:重新开启已完成的工作、重新验证活跃工作,或添加启动前校验 gate。
  6. 按照规范的生命周期阶段顺序对操作排序,并保留所有证据。
  7. 输出或写入分析结果,然后将已批准的操作移交至所属技能。

Output Spec

输出规范

The TOON schema
ai-sdlc-change-impact/v1
contains changes, affected artifacts, stage status, blockers, and actions with
stage
,
skill
,
action
,
reason
,
evidence_path
,
evidence_line
,
changed_ref
, and
expected_artifact
.
Quality 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/v1
包含变更、受影响工件、阶段状态、阻塞问题以及操作,每个操作包含
stage
skill
action
reason
evidence_path
evidence_line
changed_ref
expected_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:
The requirements changed recently.
It cannot prove which durable source changed or which downstream artifacts are stale.
有效变更:
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
    $ai-sdlc-navigator
    when the owning workflow is unclear.
  • 不得修改生命周期状态、索引、源工件或策略。
  • 不得仅因为某个阶段在时间上晚于另一个阶段就重新开启它。
  • 不得将文件名相似性或模型直觉作为影响证据。
  • 不得代表工件所有者批准恢复操作。
  • 若所属工作流不明确,使用
    $ai-sdlc-navigator