Check Impl Against Spec

作者 warpdotdev2a03b403b4f8无许可证收录于 2026年10月8日更新于 2026年10月8日

Compare a pull request's implementation against spec context in spec_context.md and feed any material mismatches into review.json. Use during PR review when approved or repository spec context is available.

AI 生成的概览

将拉取请求的实现与已批准的规格上下文进行对比,并把重大不一致写入 review.json。

功能
该技能指导智能体将拉取请求的实现与 spec_context.md 中的规格上下文进行对比。它会提取具体承诺,例如必需行为、需要更改的文件或子系统、约束以及后续步骤,然后对照 PR 差异和已检出的文件进行检查。重大不一致会作为行内评论或摘要关注点写入 review.json,而不是生成单独报告。
适用场景
在拉取请求审查期间,当存在 spec_context.md 且可获得已批准或仓库规格上下文时使用。它通过检查规格一致性来补充常规代码审查。
运行要求
需要 spec_context.md、pr_diff.txt、可选的 pr_description.md 以及已检出的 PR 分支。它仅为说明,不附带脚本。

Check implementation against spec

Use this skill only when spec_context.md exists during PR review.

Goal

Determine whether the implementation in the checked-out PR materially matches the approved spec context. This is a supplement to the normal code review, not a separate output.

Inputs

  • spec_context.md contains the spec context to compare against. It may include both product spec content (intended behavior, acceptance criteria) and tech spec content (implementation details, file changes).
  • pr_diff.txt contains the annotated diff for the PR.
  • pr_description.md may contain additional scope or rationale.
  • The working tree contains the PR branch contents.

Process

  1. Read spec_context.md and extract the concrete commitments it makes:
    • required behaviors (from the product spec)
    • required files or subsystems to change (from the tech spec)
    • stated constraints
    • required follow-up steps, validation, or migrations
  2. Compare those commitments against the actual implementation in pr_diff.txt and the checked-out files.
  3. Treat small implementation-level adjustments as acceptable when they preserve the spec's intent. Do not flag harmless differences in naming, structure, or low-level technique.
  4. Flag a mismatch only when it is material, such as:
    • required behavior in the product spec is missing
    • the implementation contradicts a spec decision
    • the change introduces significant unplanned scope
    • a required validation, migration, or compatibility step from the tech spec is absent

Outputs

  • Do not create a separate report file.
  • Fold spec-alignment findings into review.json.
  • Put broad spec-drift concerns in the review summary.
  • Add inline comments only when the mismatch can be tied to changed lines in the diff.
  • Treat material spec drift as at least an important concern.
  • If the implementation matches the spec closely enough, do not add comments just to mention alignment.

Boundaries

  • Do not require literal one-to-one implementation of the spec when the PR achieves the same outcome safely.
  • Do not speculate about spec details that are not actually present in spec_context.md.
  • Do not post to GitHub directly.

来源与署名

来源:warpdotdev/common-skills位于.agents/skills/check-impl-against-spec提交2a03b40

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架