# 04 Spec

> Generate or refine a spec, a feature's immutable contract, from a request, a PRD, or review findings. Use when the user wants to draft or refine a spec. Not for writing code, a full PRD, or changing a locked spec.

- Skill: `ai-driven-dev/04-spec` (Agent Skill, multi-file: 6 files)
- Install (CLI): `npx skillmds@latest add ai-driven-dev/04-spec`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ai-driven-dev/04-spec/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Product & Planning
- Author: ai-driven-dev (https://skillmd.com/u/ai-driven-dev)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/ai-driven-dev/04-spec

---


# Spec

```mermaid
flowchart LR
  request([request or PRD path]) --> build --> done([spec.md])
  target([spec path + findings]) --> refine --> done
```

## Actions

Run the flow above. Read only the next action file.

| Action | Does                                             |
| ------ | -------------------------------------------------- |
| build  | draft a fresh spec from a request or PRD          |
| refine | rewrite an existing spec to address findings      |

## Transversal rules

- Never invent; mark every gap instead of guessing.
- Never explore the codebase.
- Hold intent, never implementation: solution-agnostic, no how, few acceptance criteria.
- Keep it readable: clear headers, bulleted criteria, explicit non-goals.
- Immutable once validated: never rewrite a locked spec.

