Spec Authoring Skill
Purpose
This skill provides expertise in writing clear, testable, and structured specifications. It activates automatically when the user discusses requirements gathering, feature definitions, user stories, or acceptance criteria. The goal is to produce specification documents that are unambiguous, complete, and directly translatable into implementation tasks.
When It Activates
The skill is triggered when the conversation involves:
- Drafting or refining a new specification document (
spec.md)
- Defining functional requirements (FR) or non-functional requirements (NFR)
- Writing user stories or acceptance criteria
- Discussing feature scope, constraints, or success metrics
- Reviewing specification quality or completeness
Capabilities
1. Structured Specification Generation
Generate specifications following a consistent template structure:
- Overview: Project context, goals, and scope boundaries
- Functional Requirements: Numbered as
FR-001, FR-002, etc.
- Non-Functional Requirements: Numbered as
NFR-001, NFR-002, etc.
- Data Model: Entity definitions, relationships, and constraints
- API Contracts: Endpoint definitions with request/response schemas
- Success Metrics: Measurable criteria for feature validation
2. Requirement Numbering
All requirements follow a strict numbering convention:
- Functional requirements:
FR-001, FR-002, FR-003, ...
- Non-functional requirements:
NFR-001, NFR-002, NFR-003, ...
- Each requirement is atomic, testable, and traceable to user stories
3. User Story Decomposition
Break down features into user stories using the standard format:
As a [role],
I want to [action],
So that [benefit].
Each user story is labeled (e.g., US1, US2) and linked to one or more functional requirements.
4. Acceptance Criteria (Given/When/Then)
Every user story includes acceptance criteria in Gherkin-style syntax:
Given [precondition],
When [action is performed],
Then [expected outcome].
Acceptance criteria serve as the contract between specification and implementation.
5. Quality Validation
Before finalizing a specification, the skill validates against a quality checklist to ensure completeness and clarity.
Methodology
The spec authoring process follows a four-step pipeline:
- Read Project Context: Examine existing project files, README, constitution, and prior specs to understand the domain, conventions, and constraints.
- Detect Tech Stack: Identify the technology stack (languages, frameworks, databases) to tailor requirement language and feasibility assessments.
- Apply Spec Template: Generate the specification document using the standard template, populating each section with requirements derived from user input.
- Validate Quality Criteria: Run the quality checklist to flag missing sections, ambiguous language, untestable requirements, or orphaned user stories.
Quality Checklist
Before a specification is considered complete, verify the following:
References
For detailed templates, criteria, and examples, consult the following reference files:
references/spec-template.md -- The canonical specification template structure
references/quality-criteria.md -- Full quality validation criteria and scoring rubric
references/examples.md -- Annotated examples of well-written specifications
1---
2name: spec-authoring
3description: "Expertise in writing clear, testable specifications. Activates when user discusses requirements, features, user stories, or acceptance criteria. Trigger keywords: specification, requirements, user story, acceptance criteria, feature spec, functional requirement, non-functional requirement, spec.md"
4allowed-tools: Read, Write, Edit, Glob
5user-invocable: false
6metadata:
7 source: https://skillmd.com/skills/aibot88/spec-authoring
8---
9
10# Spec Authoring Skill
11
12## Purpose
13
14This skill provides expertise in writing clear, testable, and structured specifications. It activates automatically when the user discusses requirements gathering, feature definitions, user stories, or acceptance criteria. The goal is to produce specification documents that are unambiguous, complete, and directly translatable into implementation tasks.
15
16## When It Activates
17
18The skill is triggered when the conversation involves:
19
20- Drafting or refining a new specification document (`spec.md`)
21- Defining functional requirements (FR) or non-functional requirements (NFR)
22- Writing user stories or acceptance criteria
23- Discussing feature scope, constraints, or success metrics
24- Reviewing specification quality or completeness
25
26## Capabilities
27
28### 1. Structured Specification Generation
29
30Generate specifications following a consistent template structure:
31
32- **Overview**: Project context, goals, and scope boundaries
33- **Functional Requirements**: Numbered as `FR-001`, `FR-002`, etc.
34- **Non-Functional Requirements**: Numbered as `NFR-001`, `NFR-002`, etc.
35- **Data Model**: Entity definitions, relationships, and constraints
36- **API Contracts**: Endpoint definitions with request/response schemas
37- **Success Metrics**: Measurable criteria for feature validation
38
39### 2. Requirement Numbering
40
41All requirements follow a strict numbering convention:
42
43- Functional requirements: `FR-001`, `FR-002`, `FR-003`, ...
44- Non-functional requirements: `NFR-001`, `NFR-002`, `NFR-003`, ...
45- Each requirement is atomic, testable, and traceable to user stories
46
47### 3. User Story Decomposition
48
49Break down features into user stories using the standard format:
50
51```
52As a [role],
53I want to [action],
54So that [benefit].
55```
56
57Each user story is labeled (e.g., `US1`, `US2`) and linked to one or more functional requirements.
58
59### 4. Acceptance Criteria (Given/When/Then)
60
61Every user story includes acceptance criteria in Gherkin-style syntax:
62
63```
64Given [precondition],
65When [action is performed],
66Then [expected outcome].
67```
68
69Acceptance criteria serve as the contract between specification and implementation.
70
71### 5. Quality Validation
72
73Before finalizing a specification, the skill validates against a quality checklist to ensure completeness and clarity.
74
75## Methodology
76
77The spec authoring process follows a four-step pipeline:
78
791. **Read Project Context**: Examine existing project files, README, constitution, and prior specs to understand the domain, conventions, and constraints.
802. **Detect Tech Stack**: Identify the technology stack (languages, frameworks, databases) to tailor requirement language and feasibility assessments.
813. **Apply Spec Template**: Generate the specification document using the standard template, populating each section with requirements derived from user input.
824. **Validate Quality Criteria**: Run the quality checklist to flag missing sections, ambiguous language, untestable requirements, or orphaned user stories.
83
84## Quality Checklist
85
86Before a specification is considered complete, verify the following:
87
88- [ ] Every functional requirement has a unique ID (`FR-XXX`)
89- [ ] Every non-functional requirement has a unique ID (`NFR-XXX`)
90- [ ] All user stories follow the `As a / I want / So that` format
91- [ ] Every user story has at least one acceptance criterion in `Given/When/Then` format
92- [ ] Requirements use precise, measurable language (no "should be fast" or "easy to use")
93- [ ] Scope boundaries are explicitly defined (what is in scope vs. out of scope)
94- [ ] Data model entities are defined with fields, types, and constraints
95- [ ] API contracts specify HTTP methods, paths, request/response schemas, and error codes
96- [ ] Success metrics are quantifiable and time-bound where applicable
97- [ ] No orphaned requirements (every FR/NFR links to at least one user story)
98
99## References
100
101For detailed templates, criteria, and examples, consult the following reference files:
102
103- `references/spec-template.md` -- The canonical specification template structure
104- `references/quality-criteria.md` -- Full quality validation criteria and scoring rubric
105- `references/examples.md` -- Annotated examples of well-written specifications