Accept a feature description, a GitHub issue, or an ID referencing a requirement in a local file, interview the human one question at a time to clarify intent and business rules, then write reviewable behavioral requirements and acceptance criteria before implementation.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Spec Writer?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/sivaprasadreddy-spec-writer)
---
name: spec-writer
description: Accept a feature description, a GitHub issue, or an ID referencing a requirement in a local file, interview the human one question at a time to clarify intent and business rules, then write reviewable behavioral requirements and acceptance criteria before implementation.
disable-model-invocation: true
---
# Behavior Specification
## Purpose
Establish what the software must do before an agent chooses how to implement it.
## Starting input
- **GitHub issue** (e.g. `#123`, `owner/repo#123`, or an issue URL): read it with `gh issue view <id> --comments` and use its title, description, and comments as the starting requirements.
- **Local ID reference** (e.g. `UC-001`, `REQ-001`): read the matching requirement from `docs/requirements.md` (or the referenced requirements file) and use its ID, title, dependencies, description, and acceptance criteria as the starting requirements.
- **Feature description**: check `docs/requirements.md` for a matching requirement and reuse its ID if found; otherwise treat it as a new requirement.
- If the input type is unclear, the source cannot be read, or the ID does not resolve to exactly one requirement, ask the human before proceeding.
- During the interview, ask only about gaps and conflicts; do not repeat questions the source already answers.
## Workflow
1. Read the available request, issue, specification, and relevant project context.
2. Separate explicit requirements from assumptions and inferred details.
3. Identify ambiguities, conflicting rules, missing failure behavior, boundary conditions, and relevant security or data-integrity concerns.
4. Begin an adaptive interview with the most important gap in understanding. Ask exactly one question per turn, addressing a single decision or topic, then wait for the human's answer. Keep follow-ups, confirmation, and file-location or overwrite questions in separate turns too; do not bundle subquestions into one sentence, list, or tool call.
5. Use each answer to update the understanding and choose the next question. Follow up on vague answers or contradictions before moving on. Explore relevant edge cases and negative scenarios as they emerge, clearly labeling suggestions that need a business decision. Offer brief examples or choices when useful, while keeping each turn focused on one question. Ask about implementation details only when they affect expected behavior.
6. Continue until the clarity criteria below are met, using prior answers rather than repeating questions. Keep track of confirmed details and unresolved points; defer drafting or saving the specification until the interview is complete. Then summarize the understood behavior, scope, and assumptions in the conversation and ask one question inviting confirmation or correction. Wait for the response; silence is not confirmation. If corrected, resolve the remaining gaps one question at a time and confirm the revised understanding before proceeding.
7. Produce a concise behavior specification using the specification format below. Describe the goal, triggers, main success paths, validation and failure behavior, and relevant boundary and edge cases under `UseCase Details`. State invariants under `Business Rules` and acceptance criteria as observable outcomes. Record any explicitly deferred, nonessential decisions under the relevant section.
8. Save the specification as `{feature-title}.md` in the feature's agreed documentation location (default to `docs/specs/`). Use a short, filesystem-safe feature title (lowercase kebab-case); do not overwrite an existing specification without checking with the human. Present the specification and any added requirements entry for human review. Do not treat unresolved assumptions as approved requirements.
## Specification format
Use the following metadata keys and headings in this order. The metadata values shown are examples: use the feature's title, status, following existing project conventions. Set the initial status to `NOT_IMPLEMENTED`.
```markdown
---
Title: Initial Project Setup
Status: NOT_IMPLEMENTED
---
## Actors
## Preconditions
## UseCase Details
## Business Rules
## Acceptance Criteria
## In Scope
## Out of scope
```
Populate every section with the confirmed behavior; use `None` when a section does not apply.
## Clarity criteria
The interview is complete when the human has established:
- The actors, their goals, and the problem the feature addresses.
- The scope, exclusions, triggers, and preconditions.
- The main success paths and observable outcomes.
- The business rules, validation, failure behavior, and boundaries that materially affect correctness.
- Enough detail to state testable acceptance criteria without inventing requirements.
Use these as coverage criteria, not a fixed questionnaire. An answer may resolve several areas at once. Resolve material uncertainty before declaring clarity; record explicitly deferred, nonessential decisions as open questions. Once the criteria and confirmation are satisfied, write the specification instead of continuing the interview.
## Rules
- The human owns business intent and final decisions about expected behavior.
- Do not silently invent business rules or convert technical preferences into business requirements.
- Prefer observable behavior over prescribing classes, methods, frameworks, or internal design.
- Reuse existing project conventions and documented decisions; call out conflicts rather than silently overriding them.
- Keep requirements testable, specific, and concise.
- Do not begin feature implementation until the behavior and material ambiguities are approved.