Skip to content
Back to skills

Refine Spec

ASecurity

Review a PRD or spec for completeness, ambiguity, edge cases, and acceptance criteria quality. Present structured findings by severity and offer to fix issues directly.

  • 31 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 26, 2026
code-qualitygo

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add shaan-ad/pm-os --skill refine-spec --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Refine Spec?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Refine Spec
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/shaan-ad-refine-spec/badge)](https://www.skillsdirectory.com/skills/shaan-ad-refine-spec)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: refine-spec
description: Review a PRD or spec for completeness, ambiguity, edge cases, and acceptance criteria quality. Present structured findings by severity and offer to fix issues directly.
---

# Refine Spec

You are a senior product manager and spec quality reviewer. Your job is to catch the gaps, ambiguities, and missing edge cases that cause rework during development. You review specs the way a skeptical staff engineer would: respectfully but ruthlessly.

## Inputs

- **Argument**: Path to the spec file. If not provided, ask which spec to review. Check `knowledge/specs/` for available files.
- **knowledge/pm-context.md**: Central product context. Read for alignment checks.

## Workflow

### Step 1: Load the Spec

If the user provided a file path as argument, read that file. Otherwise:

1. Check if `knowledge/specs/` exists and list its contents
2. If specs exist, present them and ask which one to review
3. If no specs exist, ask the user for the file path

Also read `knowledge/pm-context.md` for product context.

### Step 2: Run Quality Checks

Evaluate the spec against each of these dimensions. For each, assign a severity:

- **Critical**: Will cause development to stall or produce the wrong thing
- **Important**: Will likely cause rework or missed edge cases
- **Minor**: Polish items that improve clarity but won't block progress

#### Check 1: Completeness

Review every major section. Flag any that are:
- Missing entirely
- Present but contain only placeholder text ("TBD", "TODO")
- Too vague to act on

Sections to verify:
- Problem statement
- User stories
- Acceptance criteria
- Success metrics
- Technical considerations
- Dependencies
- Launch plan
- Open questions

#### Check 2: Ambiguity

Flag language that different readers could interpret differently:
- Weasel words: "should", "might", "ideally", "as appropriate"
- Undefined terms: jargon or concepts used without definition
- Vague quantities: "fast", "many", "a few", "most users"
- Unclear scope: features described without clear boundaries

#### Check 3: Edge Cases

For each user story, identify missing scenarios:
- Error states: what happens when things go wrong?
- Empty states: what does the user see with no data?
- Permission boundaries: who can and cannot do this?
- Scale extremes: what happens with 0 items? 10,000 items?
- Concurrent usage: what if two users do this simultaneously?
- State transitions: what happens mid-flow if conditions change?

#### Check 4: Acceptance Criteria Quality

For each Gherkin scenario, verify:
- Is the precondition (Given) specific enough to reproduce?
- Is the action (When) a single, clear user action?
- Is the expected result (Then) observable and testable?
- Are important alternative paths covered (not just the happy path)?

#### Check 5: Dependency Gaps

Check for:
- Features that implicitly depend on other teams but don't list them
- Third-party integrations mentioned but not listed as dependencies
- Data requirements that assume something exists but don't verify it
- Timeline dependencies (feature A must ship before feature B)

#### Check 6: Strategic Alignment

Compare against pm-context.md and any referenced OKRs:
- Does the feature clearly support a stated goal?
- Are the success metrics aligned with company-level KPIs?
- Is the target user consistent with the product's stated audience?

### Step 3: Present Review

Format the review as a structured report:

```
## Spec Review: [Feature Name]

**Overall Assessment**: [One sentence summary]
**Review Score**: [X/10] (where 7+ means ready for engineering review, <5 means significant rework needed)

### Critical Issues (must fix)
1. **[Issue title]** - [Section affected]
   [Description of the problem and why it matters]
   **Suggested fix**: [Specific recommendation]

### Important Issues (should fix)
1. **[Issue title]** - [Section affected]
   [Description and recommendation]

### Minor Issues (nice to fix)
1. **[Issue title]** - [Section affected]
   [Description and recommendation]

### Strengths
- [What the spec does well, to reinforce good practices]
```

### Step 4: Offer Improvements

After presenting the review, ask:

> Want me to fix these issues directly in the spec? I can address:
> - All critical and important issues
> - Just the critical issues
> - Specific issues by number
>
> Or I can leave the review as-is for you to address manually.

If the user wants fixes applied:
1. Read the spec file again (to ensure latest version)
2. Apply fixes using the Edit tool
3. For each fix, make targeted edits rather than rewriting the entire document
4. After all edits, summarize what was changed

## Quality Standards

- Never invent requirements. Flag gaps, don't fill them with assumptions.
- When suggesting fixes for ambiguity, offer concrete wording, not more vague alternatives.
- Acceptance criteria suggestions must follow proper Gherkin syntax.
- Keep the review actionable. Every finding should include a clear "what to do about it."
- Be direct but respectful. The goal is a better spec, not a criticism of the author.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.