About productspec
productspec is an agent skill for using Product Specs as contracts throughout software planning and implementation. It guides agents to map work to acceptance criteria, preserve product intent, and verify evidence and completion.
Key features
- 01Read specs before planning or coding
- 02Map tasks to acceptance criteria
- 03Respect scope and dependencies
- 04Handle intent changes explicitly
- 05Check evidence and completion
Use cases
- 01Plan implementation against a spec
- 02Identify buildable specs and dependencies
- 03Resolve conflicts between code and intent
- 04Report progress with linked evidence
MCP support
If ProductSpec MCP is available, the skill directs agents to use tools such as begin_spec_session, check_spec_session, get_spec_graph, and get_evidence_checklist during planning and reporting.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ gokulrajaram/ productspec --skill productspecAfter installing, type/productspecin Claude Code to confirm it loaded.
Details
From the project READMEProductSpec Agent Skill
Product Specs are the product contract for consequential software work.
When a repo uses Agent Run files, treat them as the receipt for one agent execution against a pinned Product Spec revision.
Before planning, coding, testing, or changing scope, look for relevant .product-spec.md files in the repository. Common locations include:
specs/product-specs/docs/product-specs/- paths named in the task, issue, pull request, or engineering spec
If a relevant Product Spec exists, read it before acting.
How To Use A Product Spec
Read these sections in order:
Problem: who is hurting and why the work matters.Hypothesis: the causal bet behind the product.Product Summary: what should exist when the work is done.Scope: what is in, out, and deliberately cut.Acceptance Criteria: the build contract, including AI evals when present.Success Metrics: post-launch outcome checks.Related Artifacts: issues, pull requests, eval runs, dashboards, designs, engineering specs, or other Product Specs the work depends on.
Acceptance Criteria are the build contract. Plans, tasks, code changes, tests, and pull request summaries should cite the relevant AC-<number> IDs.
AI evals are pre-launch gates inside Acceptance Criteria, not a separate ## AI Evals section. Cite EVAL-<number> when implementing or changing model behavior.
Success Metrics are post-launch outcomes. Do not treat SM-<number> items as implementation tasks.
Planning Rules
When creating an implementation plan:
- List which Product Spec and
spec_revisionyou are implementing. - If ProductSpec MCP is available, call
begin_spec_sessionbefore planning and include the returnedspec_revisionand session id in your plan. - Map each task to the relevant Acceptance Criteria.
- Name any Acceptance Criteria that are not covered by the plan.
- Treat
scope.outandscope.cutas explicit non-goals. - Use
applies_toandRelated Artifactsto find relevant code, issues, pull requests, designs, evals, and dashboards. - Resolve
product_specrelated artifacts before planning. A spec whosedepends_ontarget is not built yet is blocked, not buildable, and the plan should say what it waits for. - For a folder of specs, run
productspec graph <dir> --json(or theget_spec_graphMCP tool) to get the buildable set, the blocked set with what each spec waits for, and a dependency-respecting build order in one call, instead of re-reading every spec to derive it. - For a repo with Product Specs, Agent Runs, Decision Traces, and evidence links, run
productspec garden <repo> --jsonbefore selecting work. Use it to find missing evidence, stale revision pins, run gaps, Decision Trace gaps, unscoped specs, contention, and waves. - If another agent may be working the same folder, read
contentionandwavesfrom that same call. Two specs that touch one surface must not be built at the same time, even when both are buildable. Take work from the current wave, and treat a spec listed inunscopedas unknown scope rather than safe scope. - Treat
RESOLVE-IN-PLAN:markers as unresolved technical bindings. Resolve each marker against the codebase with a source citation before coding. - Do not implement guessed table names, fields, endpoints, services, or file paths as if they were binding instructions.
Change Rules
Do not silently change product intent.
If implementation pressure conflicts with the Product Spec, state the conflict and propose one of:
- update the Product Spec
- update the implementation
- accept a tradeoff and record a Decision Trace
- reopen the work
If behavior changes after implementation, propose a Product Spec revision or a Decision Trace entry instead of treating code drift as intent.
Output Rules
When reporting progress or opening a pull request:
- If ProductSpec MCP is available, call
check_spec_sessionfirst. If the Product Spec changed, re-read it and re-plan before claiming done. - If ProductSpec MCP is available, call
get_evidence_checklistand attach or name evidence for coveredAC-andEVAL-IDs. - If the repo uses Agent Run files, call
draft_agent_runor runproductspec init-run <spec> <agent-run>to create a receipt, then fill in checkedAC-,EVAL-, andSM-IDs, evidence links, drift state, and completion claim. Validate it withproductspec validate-run. - Before claiming completion, run
productspec reconcile <spec> --against <agent-run>when a local CLI is available. Fix missing checked items, failed items, stale spec revisions, passed items without evidence, or drift without Decision Trace before saying the work is done. - cite the Product Spec path and
spec_revision - cite the Acceptance Criteria covered
- cite AI evals added or changed
- name scope items intentionally deferred
- link related issues, pull requests, eval runs, or dashboards when available