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 從公開儲存庫中收錄這些內容。

檢舉或申請下架