write-product-spec
$
npx mdskill add warpdotdev/oz-for-oss/write-product-specDefine unambiguous feature behavior before implementation.
- Clarifies user-facing behaviors and validation rules.
- Prevents implementation errors and review ambiguity.
- Outputs specs into the repository specs directory.
- Requires feature summary and edge case context.
SKILL.md
.github/skills/write-product-specView on GitHub ↗
--- name: write-product-spec description: Write a PRODUCT.md-style spec for a significant user-facing feature in this repository, focused on detailed behavior and validation. Use when the user asks for a product spec, desired behavior doc, or PRD, wants to define feature behavior before implementation, or when the feature is substantial or behaviorally ambiguous enough that a written spec would improve implementation or review. --- # write-product-spec Write a `PRODUCT.md`-style spec for a significant feature in this repository. ## Overview This skill is the local shared product-spec workflow for this repository. Local wrappers and workflows depend on it directly as the canonical product-spec contract. The product spec should make the desired behavior unambiguous enough that an agent can implement it correctly and avoid regressions while making changes. Focus on product behavior, UX, invariants, and validation rather than implementation details. Write specs into source control under a repository-appropriate path within `specs/`. If a repo-specific wrapper skill or explicit prompt provides an exact output path, follow that path. Otherwise prefer a clear structure such as: - `specs/<topic>/PRODUCT.md` ## Before writing Gather the minimum context needed to write the spec: - the feature summary - target users or workflow - key user-facing behaviors and constraints - known edge cases - expected verification plan - any tracker or issue identifier when the surrounding workflow depends on one When the request leaves important details unspecified, use `ask_user_question` to gather the missing context instead of guessing. If the feature includes UI or interaction changes, ask whether there is a Figma mock. ### Figma guidance If a Figma mock exists, include a link to it in the spec. If the user does not provide one and the session is interactive, ask whether a mock exists. Otherwise, note the absence and continue. Do not silently omit design context. For example, include a short note such as: - `Figma: <link>` - `Figma: none provided` No Figma mock is acceptable, but the absence should be explicit. ## What to write Use the following structure: ### 1. Summary Describe the feature in a few sentences and state the desired outcome. ### 2. Problem Explain what user or product problem is being solved. ### 3. Goals List the outcomes this change must achieve. ### 4. Non-goals List adjacent ideas or follow-ups that are explicitly out of scope. ### 5. Figma / design references Link the Figma mock if it exists, or explicitly note that none was provided. ### 6. User experience Describe expected behavior in concrete, exhaustive, testable terms. Aim for a complete textual description of the user-visible behavior that reviewers can verify through tests, screenshots, videos, and code review. Be explicit about: - default behavior - state transitions - edge cases - empty states - error states - keyboard or interaction expectations when relevant When useful, write this section as a list of invariants or behavior rules rather than broad prose. Prefer too much relevant detail over vague summary language. ### 7. Success criteria Define in high detail what will be true if the feature works correctly. Each criterion should map to observable user behavior and be specific enough that an implementer or reviewer can verify it with tests and by inspecting the code. Prefer concrete, observable outcomes over vague quality claims, and include important states, transitions, and edge cases when they matter to correctness. ### 8. Validation Describe how the behavior should be verified. Prefer checks that can map cleanly to tests, videos, screenshots, or manual validation steps. ### 9. Open questions Call out unresolved product decisions rather than burying them in the narrative. ## Writing guidance - Prefer concrete behavior over aspirational wording. - Write for the implementer and reviewer, not for marketing. - Make the spec precise enough that an agent can follow it. - Capture invariants that must not regress. - Include edge cases that are easy to miss in implementation. - Avoid implementation details unless they are unavoidable for understanding the UX. ## When to avoid this skill Skip the product spec when the change is small enough that the overhead outweighs the value. As a rough guideline, specs are most useful for significant features rather than small edits. ## Keep the spec current If the implementation changes the intended product behavior, update the checked-in product spec so it still matches what ships. Approved specs may be implemented in the same PR as the code. As implementation evolves, keep updates to the product spec, tech spec, and code in that same PR when practical. Update the product spec when any of these change: - user-facing behavior - UX details - success criteria - validation expectations For large features, the implementer may optionally keep a `DECISIONS.md` file that summarizes concrete product and technical decisions made during spec and implementation work. This is optional and should be offered when it would help keep the work coherent. ## Related Skills - `implement-specs` - `write-tech-spec` - `spec-driven-implementation`
More from warpdotdev/oz-for-oss
- bootstrap-issue-configBootstrap the issue triage configuration for a repository by analyzing existing issues, labels, and contributors to generate `.github/issue-triage/config.json` and `.github/STAKEHOLDERS`. Use when setting up triage automation on a new or existing repository for the first time.
- check-impl-against-specCompare 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.
- create-product-specCreate a product spec from a GitHub issue in this repository by applying the local shared `write-product-spec` workflow with Oz-specific issue context and output paths. Use when an issue should be turned into a product spec artifact stored under `specs/GH<issue-number>/product.md` and the agent should prepare file changes only, without creating commits or pull requests itself unless a cloud workflow explicitly asks for it.
- create-tech-specCreate a technical spec from a GitHub issue in this repository by applying the local shared `write-tech-spec` workflow with Oz-specific issue context and output paths. Use when an issue should be turned into a tech spec artifact stored under `specs/GH<issue-number>/tech.md` and the agent should prepare file changes only, without creating commits or pull requests itself unless a cloud workflow explicitly asks for it.
- dedupe-issueDetect duplicate GitHub issues by comparing the incoming issue's title and description against the repository issue list. Use during triage to identify 2+ existing issues that are similar and surface them as potential duplicates.
- dedupe-issue-localRepo-specific dedupe guidance for oz-for-oss. Only the categories declared overridable by the core dedupe-issue skill may be specialized here.
- implement-issueImplement a GitHub issue in this repository by applying the local shared `implement-specs` workflow with Oz-specific issue, spec-context, and summary-file handling. Use when issue details are provided in the prompt and the agent should produce the repository diff and a concise implementation summary, without creating commits or pull requests itself unless a cloud workflow explicitly asks for it.
- implement-specsImplement an approved feature from the repository's product and tech specs, keeping specs and code aligned in the same change as implementation evolves. Use after the product and tech specs are approved and the next step is building the feature.
- review-pr-localRepo-specific review guidance for oz-for-oss. Only the categories declared overridable by the core review-pr skill may be specialized here.
- review-specReview a spec/plan pull request diff and write structured feedback to review.json for the workflow to publish. Use when reviewing a PR that only modifies files under specs/ and producing machine-readable review output instead of posting directly to GitHub.