/brain-spec-skills:brain-spec <subcommand> [args] — create|interview|list|get|update|validate|delete|archivefrom brain-spec-skills
Spec lifecycle management — create, interview, list, get, update, validate, delete, and archive feature specifications.
Ships in brain-spec-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Create, interview, view, update, delete, and archive feature specifications stored in .brain-spec/specs/.
/brain-spec <subcommand> [arguments]
Subcommands:
create <name> — Create a blank spec or start an interviewinterview <name> — Start/resume a guided interview for a speclist [--status <status>] — List all specs with status and task countsget <slug> — Display a spec's content and metadataupdate <slug> — Interactively update spec content or statusvalidate <slug> — Check a spec for completeness, EARS acceptance criteria, and task coveragedelete <slug> — Delete a spec (requires confirmation)archive <slug> — Move a spec to the archiveParse $ARGUMENTS to determine the subcommand and its parameters. The first word is the subcommand; remaining words are arguments.
Slugs are generated from spec names:
^[a-z0-9]([a-z0-9-]*[a-z0-9])?$Example: "User Authentication Flow" → user-authentication-flow
Each spec has a {slug}.meta.json file in .brain-spec/specs/:
{
"specSlug": "string",
"name": "string (original name)",
"description": "string",
"status": "draft | active | completed | archived",
"interview": {
"currentCategory": "string (one of 8 categories)",
"questionsAsked": "number",
"answers": [
{
"category": "string",
"question": "string",
"answer": "string"
}
],
"coverageMap": {
"functional": 0.0,
"technical": 0.0,
"data-model": 0.0,
"edge-cases": 0.0,
"security": 0.0,
"testing": 0.0,
"nonfunctional": 0.0,
"implementation": 0.0
}
},
"createdAt": "ISO 8601 timestamp",
"updatedAt": "ISO 8601 timestamp"
}
8 categories, 5 questions each (40 total):
Functional Requirements:
Technical Constraints:
Data Model:
Edge Cases & Error Handling:
Security:
Testing Strategy:
Non-Functional Requirements:
Implementation Approach:
Category display names:
# Spec: {{name}}
## Overview
{{description}}
## Functional Requirements
- [ ] TODO: Define functional requirements
## Technical Constraints
- TODO: Define technical constraints
## Data Model
TODO: Define data models and relationships
## Edge Cases & Error Handling
- TODO: Define edge cases
## Security Considerations
- TODO: Define security requirements
## Testing Strategy
- TODO: Define testing approach
## Non-Functional Requirements
- TODO: Define performance, scalability requirements
## Implementation Checklist
- [ ] TODO: Break down into tasks
## Acceptance Criteria
<!-- EARS notation: WHEN <event/condition> THE SYSTEM SHALL <observable behavior> -->
- [ ] WHEN TODO: define trigger THE SYSTEM SHALL TODO: define observable behavior
Acceptance criteria use EARS (Easy Approach to Requirements Syntax) so each criterion is unambiguous and testable. The core template is:
WHEN <event or condition> THE SYSTEM SHALL <observable behavior>
Common EARS forms:
WHEN a user submits an empty form THE SYSTEM SHALL display a validation errorWHILE the account is locked THE SYSTEM SHALL reject login attemptsIF the payment gateway times out THEN THE SYSTEM SHALL retry once before failingTHE SYSTEM SHALL store passwords hashed with bcryptEach criterion should map to at least one testable behavior. During the
interview and in validate, criteria that do not follow an EARS form are
flagged so they can be rewritten into a checkable shape.
{
"specSlug": "string",
"archivedAt": "ISO 8601 timestamp",
"reason": "completed | deprecated | superseded",
"supersededBy": "string | null",
"summary": "string",
"finalStatus": {
"totalTasks": 0,
"completedTasks": 0,
"specStatus": "string"
}
}
createUsage: /brain-spec create My Feature Name
.brain-spec/specs/ directory exists. If not, tell the user to run /brain-init first..brain-spec/specs/{slug}.meta.json already exists. If so, error with "Spec '{slug}' already exists."{slug}.meta.json and {slug}.md using the templates above, with status "draft". Display the file path and suggest next steps.{slug}.meta.json with status "draft" and empty interview state, then immediately begin the interview flow (see interview subcommand below).interviewUsage: /brain-spec interview my-feature-name
Runs a guided interview to build a spec. Can be started fresh or resumed.
Read .brain-spec/specs/{slug}.meta.json. If not found, error.
Check the interview field:
currentCategory: "functional", questionsAsked: 0, empty answers, all coverage at 0.0. Save the meta file.questionsAsked > 0: Resume from where we left off. Tell the user: "Resuming interview for '{name}' — {questionsAsked} questions answered so far."Read steering context: If .brain-spec/steering/ has any documents, read them to provide context for the interview. Mention relevant steering context when asking questions.
Interview loop: For each question:
[Functional Requirements] What is the primary purpose...{ category, question, answer }.questionsAsked counter.categoryAnswers.length / 5 (5 questions per category).[{questionsAsked} answered | {currentCategory} | coverage: {percentage}%]questionsAsked >= 3, offer the option to finish early: "You can continue answering or type 'done' to compile the spec now."Category advancement: When advancing categories, go in order: functional → technical → data-model → edge-cases → security → testing → nonfunctional → implementation. Skip categories already at >= 0.6 coverage. If all categories are covered, tell the user all categories are covered and offer to compile.
Compiling the spec (when user says "done" or all categories covered):
# Spec: {name}## Overview section using the first functional answer## {Category Display Name} section per category that has answers### {question} subsection per answer## Acceptance Criteria with a TODO checkbox## Implementation Checklist with a TODO checkbox (only if implementation answers exist)--- then italicized generation metadata (questions asked, categories covered).brain-spec/specs/{slug}.mdstatus to "active", update updatedAtlistUsage: /brain-spec list or /brain-spec list --status active
.brain-spec/specs/*.meta.json files.--status is provided, filter by that status..brain-spec/tasks/{slug}/tasks.json exists and count tasks.Slug Status Tasks Created
───────────────── ───────── ─────── ──────────
user-auth-flow active 3/5 2025-01-15
api-redesign draft 0/0 2025-01-20
If no specs exist, display: "No specs found. Create one with /brain-spec create <name>"
getUsage: /brain-spec get my-feature-name
.brain-spec/specs/{slug}.meta.json. If not found, error..brain-spec/specs/{slug}.md. If not found, show metadata only.updateUsage: /brain-spec update my-feature-name
.brain-spec/specs/{slug}.meta.json. If not found, error..brain-spec/specs/{slug}.md, show it, ask what to change. Apply edits using the Edit tool. Update updatedAt in meta.validateUsage: /brain-spec validate my-feature-name
Checks a spec for completeness, EARS-formed acceptance criteria, and task coverage, then reports a pass / warn / fail verdict. Read-only: it never edits the spec or tasks.
Read .brain-spec/specs/{slug}.meta.json. If not found, error: "No spec '{slug}'. Run /brain-spec list to see specs."
Read .brain-spec/specs/{slug}.md.
Completeness check. Flag every section whose body still contains a
TODO: placeholder. Required sections: Overview, Functional Requirements,
Acceptance Criteria. A TODO: in a required section is a FAIL; in any other
section it is a WARN.
EARS check. For each line under Acceptance Criteria, flag any criterion
that does not match an EARS form (contains THE SYSTEM SHALL, optionally led
by WHEN / WHILE / IF ... THEN). A non-EARS criterion is a WARN; zero
acceptance criteria is a FAIL.
Task coverage check. Read .brain-spec/tasks/{slug}/tasks.json if it
exists. If the spec has acceptance criteria but no tasks, WARN "no tasks cover
this spec." If tasks.json is missing entirely, WARN "run /brain-task create
to break this spec into tasks."
Report. Print a verdict line (PASS, WARN (n), or FAIL (n)) followed
by each finding as [FAIL|WARN] <section>: <message>. End with the single
highest-severity verdict so the result is scriptable. Exit without writing.
Read .brain-spec/specs/{slug}.meta.json. If not found, error.
Ask for confirmation: "Are you sure you want to delete spec '{name}' ({slug})? This will remove the spec file, metadata, and all associated tasks. This cannot be undone."
If confirmed:
.brain-spec/specs/{slug}.md.brain-spec/specs/{slug}.meta.json.brain-spec/tasks/{slug}/ directory if it existsIf not confirmed: "Deletion cancelled."
archiveUsage: /brain-spec archive my-feature-name
.brain-spec/specs/{slug}.meta.json. If not found, error..brain-spec/tasks/{slug}/tasks.json if it exists..brain-spec/archive/{slug}/.brain-spec/archive/{slug}/archive-metadata.json using the Archive Metadata Schema..brain-spec/specs/{slug}.md → .brain-spec/archive/{slug}/{slug}.md.brain-spec/specs/{slug}.meta.json → .brain-spec/archive/{slug}/{slug}.meta.json.brain-spec/tasks/{slug}/ → .brain-spec/archive/{slug}/tasks/ (if exists)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
4 skills in this plugin
/brain-initInitialize a .brain-spec/ workspace with directory tree, config, steering documents, and optional CLAUDE.md generation./brain-statusDisplay a quick overview of the Brain Spec workspace with steering doc status, specs, tasks, and progress./brain-taskTask management — create, update, list, log, and track progress for spec implementation tasks.npx claudepluginhub peopleforrester/brain_spec_skills_claude --plugin brain-spec-skills