Skill: Spec Interview
Purpose
Interview the user in depth about what they want to build, then produce a
complete specification in the project's specs directory: one spec per
file, never a single overwritten SPEC.md.
Location and naming
- Read
flux-config.yml at the project root: specs.dir gives the
directory (default: specs/). Create it if missing.
- Determine the
<ref>:
- if the spec starts from an existing GitHub issue → its number:
SPEC-42.md;
- otherwise → a short, stable kebab slug:
SPEC-candidate-pipeline.md.
The ref never changes once the file exists (even if an issue is opened
later; it is then recorded in the frontmatter instead).
- If a file already exists for this ref, update it rather than creating a
second one.
Phase 1: Interview
Use AskUserQuestion. Dig into the hard parts:
- Implementation: stack, data model, APIs, integrations, constraints
- UI/UX: flows, states, edge cases in the interface
- Business rules: the exact rules, who decides, what changes them
- Edge cases: what happens when X is missing, null, concurrent, invalid
- Tradeoffs: performance vs simplicity, flexibility vs consistency, now vs later
- Concerns: what worries the user, what is uncertain
Do not ask obvious questions. Go straight to the points the user has probably
not considered. 3 to 6 rounds of questions, grouped by theme (max 4 questions
per call).
Stop when: implementation could start without further clarification, edge
cases and tradeoffs are documented, acceptance criteria are clear.
Phase 2: Write the spec
Write <specs.dir>/SPEC-<ref>.md:
---
title: [Feature name]
ref: [ref]
status: draft # draft | validated | implemented
issue: # #N once the issue is created
date: [YYYY-MM-DD]
---
# Spec: [Feature name]
## Overview
[2-3 sentences: what, why, scope]
## Goals
- [Concrete, measurable goal]
## Non-goals
- [Explicitly out of scope]
## User flows
### [Flow name]
1. …
## Data model
[Tables / fields / relationships; only what is new or changed]
## API / Routes
[Method, path, auth, request, response, errors]
## Business rules
- …
## Edge cases
- [What happens when X]
## UI / UX
[Key screens, error states, empty states]
## Technical decisions & tradeoffs
| Decision | Choice | Rationale |
## Open questions
- [ ] …
## Acceptance criteria
- [ ] …
Omit sections that do not apply; add sections if needed.
Phase 3: Index and next step
- Maintain
<specs.dir>/README.md: a table
| Ref | Title | Status | Issue | File |. Add or update this spec's row.
- Tell the user where the file is and what remains open.
- When the user validates the spec: set
status: validated, then offer to
chain into /gh-issue to create the linked GitHub issue.
status: implemented is set when the corresponding PR is merged.
1---2name: spec-interview-23description: Interview the user about a feature they want to build, then write a complete spec to specs/SPEC-<ref>.md (with an index). Use when the user says "I want to build X" or asks for a spec/interview. Once the spec is validated, chain into /gh-issue.4---56# Skill: Spec Interview78## Purpose910Interview the user in depth about what they want to build, then produce a11complete specification in the project's specs directory: **one spec per12file**, never a single overwritten `SPEC.md`.1314## Location and naming15161. Read `flux-config.yml` at the project root: `specs.dir` gives the17 directory (default: `specs/`). Create it if missing.182. Determine the `<ref>`:19 - if the spec starts from an existing GitHub issue → its number: `SPEC-42.md`;20 - otherwise → a short, stable kebab slug: `SPEC-candidate-pipeline.md`.21 The ref never changes once the file exists (even if an issue is opened22 later; it is then recorded in the frontmatter instead).233. If a file already exists for this ref, update it rather than creating a24 second one.2526## Phase 1: Interview2728Use `AskUserQuestion`. Dig into the hard parts:2930- **Implementation**: stack, data model, APIs, integrations, constraints31- **UI/UX**: flows, states, edge cases in the interface32- **Business rules**: the exact rules, who decides, what changes them33- **Edge cases**: what happens when X is missing, null, concurrent, invalid34- **Tradeoffs**: performance vs simplicity, flexibility vs consistency, now vs later35- **Concerns**: what worries the user, what is uncertain3637Do not ask obvious questions. Go straight to the points the user has probably38not considered. 3 to 6 rounds of questions, grouped by theme (max 4 questions39per call).4041Stop when: implementation could start without further clarification, edge42cases and tradeoffs are documented, acceptance criteria are clear.4344## Phase 2: Write the spec4546Write `<specs.dir>/SPEC-<ref>.md`:4748```markdown49---50title: [Feature name]51ref: [ref]52status: draft # draft | validated | implemented53issue: # #N once the issue is created54date: [YYYY-MM-DD]55---5657# Spec: [Feature name]5859## Overview60[2-3 sentences: what, why, scope]6162## Goals63- [Concrete, measurable goal]6465## Non-goals66- [Explicitly out of scope]6768## User flows69### [Flow name]701. …7172## Data model73[Tables / fields / relationships; only what is new or changed]7475## API / Routes76[Method, path, auth, request, response, errors]7778## Business rules79- …8081## Edge cases82- [What happens when X]8384## UI / UX85[Key screens, error states, empty states]8687## Technical decisions & tradeoffs88| Decision | Choice | Rationale |8990## Open questions91- [ ] …9293## Acceptance criteria94- [ ] …95```9697Omit sections that do not apply; add sections if needed.9899## Phase 3: Index and next step1001011. Maintain `<specs.dir>/README.md`: a table102 `| Ref | Title | Status | Issue | File |`. Add or update this spec's row.1032. Tell the user where the file is and what remains open.1043. When the user validates the spec: set `status: validated`, then offer to105 chain into `/gh-issue` to create the linked GitHub issue.106 `status: implemented` is set when the corresponding PR is merged.