spec-driven-implementation
warpdotdev/common-skills
Write PRODUCT.md and TECH.md specs before implementation to drive clarity and quality for substantial features.
What is spec-driven-implementation?
A spec-first workflow skill for significant features where written specifications improve implementation quality and reduce ambiguity. Use when starting substantial features, planning agent-driven implementation, or when product and tech specs should be checked into source control alongside code.
- Write PRODUCT.md to define user-facing behavior, problem solved, and success criteria before implementation
- Write TECH.md to document implementation approach, architecture, and tradeoffs when warranted
- Organize specs in source control under specs/<linear-ticket-number>/ directories
- Keep specs current as implementation evolves, updating them alongside code changes
- Integrate with Linear issue tracking to reference tickets in specs
- Validate behavior against specs through tests, integration tests, and demonstrations
How to install spec-driven-implementation
npx skills add https://github.com/warpdotdev/common-skills --skill spec-driven-implementation- Linear issue created for the feature (or create one using Linear MCP tools before writing specs)
- Access to specs/ directory in source control
- Clarity on whether the feature is substantial enough to warrant specs
How to use spec-driven-implementation
- 1.Evaluate whether the feature is substantial enough to need specs (size, ambiguity, risk)
- 2.Create or reference a Linear issue for the work
- 3.Write PRODUCT.md first using the write-product-spec skill, defining user behavior and success criteria
- 4.Write TECH.md using the write-tech-spec skill if implementation spans subsystems or has meaningful tradeoffs
- 5.Get specs approved through review
- 6.Implement using the implement-specs skill, keeping specs and code in the same PR
- 7.Update PRODUCT.md and TECH.md as implementation evolves to keep them current
- 8.Verify behavior against specs using tests, integration tests, and demonstrations
Use cases
- Starting a substantial feature (1k+ LOC) with architectural ambiguity or cross-cutting changes
- Planning agent-driven implementation where clearer inputs improve code quality
- Documenting risky behavior changes where regressions would be expensive
- Capturing product and technical decisions for features spanning multiple subsystems
- Preparing features for review by having specs describe the actual shipped behavior
- Engineering teams building substantial features in Warp
- Agents and engineers planning multi-subsystem implementation work
- Teams using spec-driven development and code review workflows
- Projects where source-controlled specs improve collaboration and reduce ambiguity
spec-driven-implementation FAQ
Write specs for substantial features (1k+ LOC), architectural ambiguity, cross-cutting changes, or risky behavior changes. Skip specs for small bug fixes, straightforward refactors, or narrow UI tweaks with little ambiguity. Be pragmatic—specs should improve execution or review quality.
Specs should live in specs/<linear-ticket-number>/ directories (e.g., specs/APP-1234/PRODUCT.md and specs/APP-1234/TECH.md). The specs/ directory should contain only ticket-named subdirectories as direct children.
PRODUCT.md is usually required for substantial features. TECH.md is optional but preferred when implementation spans multiple subsystems, has architectural implications, or has meaningful tradeoffs to document. For pure UI changes, PRODUCT.md is often sufficient.
Write PRODUCT.md before implementation to define desired behavior. TECH.md can be written before implementation or after an e2e prototype if that leads to a more accurate plan. Keep both specs current as implementation evolves.
Update the spec rather than leaving it stale. Update PRODUCT.md for user-facing behavior changes and TECH.md for implementation approach changes. Keep spec updates in the same PR as related code changes.
Full instructions (SKILL.md)
Source of truth, from warpdotdev/common-skills.
name: spec-driven-implementation description: Drive a spec-first workflow for substantial features by writing PRODUCT.md before implementation, writing TECH.md when warranted, and keeping both specs updated as implementation evolves. Use when starting a significant feature, planning agent-driven implementation, or when the user wants product and tech specs checked into source control.
spec-driven-implementation
Drive a spec-first workflow for substantial features in Warp.
Overview
Use this skill for significant features where a written spec will improve implementation quality, reduce ambiguity, or make review easier. Be pragmatic: not every change needs specs.
Specs should usually live in:
specs/<linear-ticket-number>/PRODUCT.mdspecs/<linear-ticket-number>/TECH.md
For example:
specs/APP-1234/PRODUCT.mdspecs/APP-1234/TECH.md
specs/ should contain only ticket-named directories as direct children. Do not create engineer-named subdirectories or feature-slug directories there.
If a relevant Linear issue does not already exist, create one before writing specs. Use the Linear MCP tools directly:
list_teamsto find the appropriate teamlist_issue_labelsto inspect the expected labels/tagssave_issueto create the issue with the appropriate team and labels
If the correct team or labels are not obvious from the request and surrounding context, use ask_user_question to clarify rather than guessing.
These specs should largely be written by agents, not by hand, and should be checked into source control so they can be reviewed and kept current with the code.
When specs are required
Strongly prefer specs when the change is substantial, such as:
- product or architectural ambiguity
- expected implementation size around 1k+ LOC
- deep or cross-cutting stack changes
- risky behavior changes where regressions would be expensive
- work where agent quality will improve materially from clearer inputs
Specs are often unnecessary for:
- small, local bug fixes
- straightforward refactors
- narrow UI tweaks with little ambiguity
For pure UI changes, the product spec is often useful while the tech spec may be unnecessary.
Workflow
1. Decide whether the feature needs specs
Evaluate the size, ambiguity, and risk of the feature. If specs will not meaningfully improve execution or review, skip them and focus on verification instead.
2. Write the product spec first
Before implementation, create PRODUCT.md describing the desired user-facing behavior.
Use the write-product-spec skill to produce it. The product spec should define:
- what problem is being solved
- the desired user experience
- invariants and edge cases
- success criteria
- how the behavior will be validated
If the feature has UI or interaction design, ask for a Figma mock if one exists. If there is no mock, continue but call that out explicitly in the product spec.
Reference the Linear issue in the spec when one exists. Because specs live under specs/<linear-ticket-number>/..., this should usually be straightforward.
3. Write the tech spec when warranted
Use the write-tech-spec skill for substantial or ambiguous implementation work.
Prefer a tech spec when:
- the implementation spans multiple subsystems
- architecture or extensibility matters
- there are meaningful tradeoffs to document
- reviewers will benefit more from reviewing the plan than the raw code
It is acceptable to write the tech spec after an e2e prototype if that leads to a more accurate implementation plan. Do not force a premature tech spec when the implementation details are still too uncertain.
4. Implement approved specs
After the specs are approved, use the implement-specs skill to build from the approved PRODUCT.md and TECH.md.
The implementation can often be pushed in the same PR as the product and tech specs. As the engineer iterates, keep PRODUCT.md, TECH.md, code changes, and tests in that same PR so the review reflects the feature that will actually ship.
For large features, the implementer may optionally offer:
PROJECT_LOG.mdto track explored paths, checkpoints, and current implementation stateDECISIONS.mdto capture concrete product and technical decisions made during design and implementation
These are optional aids, not required outputs.
5. Keep specs current during implementation
If implementation changes from the spec, update the spec rather than leaving it stale.
Update PRODUCT.md when:
- user-facing behavior changes
- success criteria change
- UX details or edge cases change
Update TECH.md when:
- the implementation approach changes
- architectural boundaries move
- risks, dependencies, or rollout details change
- the testing or validation plan changes
The checked-in specs should describe the feature that actually ships, not just the initial intent. Keep those spec updates in the same PR as the related code changes whenever practical.
6. Verify behavior against the spec
Before considering the work complete, make sure verification maps back to the specs. Prefer tests and artifacts that validate the product behavior directly:
- unit tests and regression coverage that follow the repository's local testing conventions
- integration tests for critical user flows
- loom walkthroughs or equivalent feature demonstrations when appropriate
- screenshots or videos when useful for UI-heavy work
Best Practices
- Be pragmatic above all else.
- Write specs to improve input quality for agents, not as ceremony.
- Keep product specs behavior-oriented and implementation-light.
- Keep tech specs implementation-oriented and grounded in current codebase patterns.
- When a spec references relevant code chunks, include the inspected commit SHA in the file reference when possible and link the reference to the exact GitHub
blob/<sha>/...#Lx-Lylines. - Use review time to validate specs and behavior, not to over-index on code style nits.
Related Skills
implement-specswrite-product-specwrite-tech-spec
Related skills
More from warpdotdev/common-skills and the wider catalog.
write-product-spec
Write detailed PRODUCT.md specs for significant Warp features, focused on user-visible behavior and invariants.
review-pr
Review pull request diffs and write structured feedback to review.json for workflow publication.
resolve-merge-conflicts
Extract conflict hunks and compact diffs to resolve Git merge conflicts without loading full files.
write-tech-spec
Write a TECH.md spec translating product intent into an implementation plan grounded in codebase structure.
fix-errors
Fix compilation errors, linting issues, and test failures in the warp Rust codebase.
implement-specs
Implement approved features while keeping PRODUCT.md and TECH.md synchronized with code in a single PR.