check-impl-against-spec
warpdotdev/common-skills
Compare PR implementation against spec_context.md and flag material mismatches in review.json
What is check-impl-against-spec?
Validates that a pull request's implementation matches the approved specification by comparing concrete commitments (required behaviors, file changes, constraints) against the actual diff and code. Use this during PR review when spec_context.md is available to catch spec drift without requiring literal one-to-one implementation.
- Extracts concrete commitments from spec_context.md (product spec behaviors, tech spec file changes, constraints, validations)
- Compares spec commitments against pr_diff.txt and checked-out PR branch contents
- Flags material mismatches: missing required behavior, contradicted spec decisions, unplanned scope, absent validations or migrations
- Folds findings into review.json with broad concerns in summary and inline comments tied to changed lines
- Accepts harmless implementation-level adjustments that preserve spec intent (naming, structure, technique variations)
How to install check-impl-against-spec
npx skills add https://github.com/warpdotdev/common-skills --skill check-impl-against-spec- spec_context.md must exist in the repository
- pr_diff.txt must be available (annotated diff of the PR)
- PR branch must be checked out in the working tree
- Optionally: pr_description.md for additional scope or rationale
How to use check-impl-against-spec
- 1.Ensure spec_context.md is present and contains product spec (behaviors, acceptance criteria) and/or tech spec (file changes, implementation details)
- 2.Run the skill during PR review to read and extract concrete commitments from the spec
- 3.The skill compares those commitments against pr_diff.txt and the checked-out PR files
- 4.Review the findings folded into review.json: check the summary for broad spec-drift concerns and inline comments for line-specific mismatches
- 5.Treat material spec drift (missing behavior, contradicted decisions, unplanned scope, absent validations) as at least an important concern; accept harmless implementation variations
Use cases
- Review a PR against an approved product and tech spec to catch behavioral gaps before merge
- Validate that required file changes and subsystems from the spec are actually modified in the implementation
- Ensure migration steps, validation procedures, or compatibility requirements from the spec are not omitted
- Detect when a PR introduces significant unplanned scope beyond the spec's stated commitments
- Supplement normal code review with spec-alignment verification when repository spec context exists
- Code reviewers working in repositories with formal spec_context.md documentation
- Teams using spec-driven development who need to verify implementation fidelity
- Pull request reviewers responsible for catching scope creep or missing requirements
check-impl-against-spec FAQ
Material mismatches include: required behavior from the product spec is missing, the implementation contradicts a spec decision, the change introduces significant unplanned scope, or a required validation, migration, or compatibility step from the tech spec is absent. Small naming, structure, or technique adjustments that preserve spec intent are acceptable.
Findings are folded into review.json. Broad spec-drift concerns go in the review summary, and inline comments are added only when the mismatch can be tied to specific changed lines in the diff.
No. The skill accepts implementation approaches that achieve the same outcome safely, even if they differ from the spec's stated technique or structure.
Do not use this skill. It is designed only for repositories with spec_context.md available during PR review.
No. It only produces findings in review.json for your review; it does not post comments or feedback directly to GitHub.
Full instructions (SKILL.md)
Source of truth, from warpdotdev/common-skills.
name: check-impl-against-spec description: 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.
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.mdcontains 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.txtcontains the annotated diff for the PR.pr_description.mdmay contain additional scope or rationale.- The working tree contains the PR branch contents.
Process
- Read
spec_context.mdand 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
- Compare those commitments against the actual implementation in
pr_diff.txtand the checked-out files. - 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.
- 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.
Related skills
More from warpdotdev/common-skills and the wider catalog.

complain
Autonomously submit raw, unfiltered complaints about agent work to Slack without permission or polish.

council
Run a model-diverse council of subagents to investigate problems from multiple perspectives and synthesize a final recommendation.

create-pr
Create pull requests in the warp repository with best practices for validation, testing, and review.

cross-critique
Run a second round of structured critique on contested proposals by circulating each author's work to others for pros/cons analysis.

diagnose-ci-failures
Diagnose CI failures for a PR, extract error logs, and generate a fix plan using GitHub CLI.

fix-errors
Fix Rust compilation errors, linting issues, and test failures in the warp codebase.