
speckl
SPECKL workflow commands for specification-driven development with human-AI collaboration. Create minimal specs (specks), break them into tasks, and maintain clear boundaries for AI assistance.
- version
- 1.0.0
- GitHub stars
- 6
Install
/plugin install speckl@specklRun it inside Claude Code after adding the marketplace with /plugin marketplace add mattbrailsford/speckl.
Contents
Commands 3
Current Spec Status
!ls -d spec/[0-9][0-9][0-9]-* 2>/dev/null | wc -l | xargs -I {} echo "Total specs: {}"
Your Task
Initialize a new specification directory for feature: $ARGUMENTS
Steps:
-
Check for CLAUDE.md
- Test if
CLAUDE.mdexists in project root - If missing, display warning:
⚠️ No CLAUDE.md found. SPECKL works best when your project has a CLAUDE.md file with: - Project overview and tech stack - Explicit non-goals (what you're NOT building) - Key constraints (performance, compliance, tech limits) - Design values (guiding principles) This helps `/spkl:spec` create better, more contextual specifications.
- Test if
-
Extract and validate short name
- Analyze the feature description in
$ARGUMENTS - Extract a concise, descriptive folder name (2-4 words max)
- Convert to kebab-case (lowercase, hyphens between words)
- Use only alphanumeric characters and hyphens
- Confirm the extracted name captures the essence of the feature
- Analyze the feature description in
-
Create spec/ directory if it doesn't exist
-
Determine next sequential ID
- Parse existing
spec/[0-9][0-9][0-9]-*directories - Calculate next number (001, 002, ..., 010, 011, etc.)
- Parse existing
-
Create specification directory
- Format:
spec/[ID]-<extracted-name>/ - Verify creation succeeded
- Format:
-
Create README.md with description
- Write
spec/[ID]-<extracted-name>/README.md - Format the original user description as markdown
- Use clear heading structure:
# <feature title> ## Description [Original user description]
- Write
-
Update tracking file
- Write
[ID]-<extracted-name>tospec/.current - This becomes the active spec for
/spkl:specand/spkl:tasks
- Write
-
Provide clear feedback
- Show extracted folder name
- Show created directory path
- Confirm README.md contains the full description
- Explain next step: run
/spkl:specto create spec.md
Use Bash and Write tools as needed. Handle errors gracefully.
Context
- Refinement instructions: $ARGUMENTS
- Current spec: !
cat spec/.current 2>/dev/null || echo "No active spec" - Project context: @CLAUDE.md
Your Task
Phase 0: Context Check
-
Check for CLAUDE.md
- If
CLAUDE.mdis not found in project root, display this warning once:⚠️ No CLAUDE.md found. SPECKL works best when your project has a CLAUDE.md file with: - Project overview and tech stack - Explicit non-goals (what you're NOT building) - Key constraints (performance, compliance, tech limits) - Design values (guiding principles) Proceeding without project context may result in less focused specifications.
- If
-
Check for README.md
- If
spec/<current-spec>/README.mdis not found, display this warning:⚠️ No README.md found in the spec directory. This file should contain the feature description to guide spec creation. Consider running `/spkl:init "feature description"` to set up properly.
- If
Phase 1: Read Feature Description
- Read the README.md in the current spec directory
- Read
spec/<current-spec>/README.mdto understand the feature description - This is your primary source of truth for what the user wants to build
- Read
Phase 2: Research (REQUIRED)
Always research before proceeding:
- Use the README.md description to understand the feature intent and context
- Search for similar existing implementations in the codebase
- Research relevant best practices, technical requirements, and security/performance considerations
- Validate assumptions about external APIs, libraries, or standards
For refinements, focus on how $ARGUMENTS impacts the existing spec. Present findings before Phase 3.
Note: The README.md acts as your research brief. Use it to guide what areas of the codebase need investigation.
Phase 3: Spec Creation or Review
-
If
spec/<current-spec>/spec.mddoes not exist, create it via Write with this minimal template (use README.md description and research findings to populate):# <short title> # Goal <user/system outcome> # Inputs - <specific data, params, triggers - include concrete values/enums if relevant> # Outputs - <UI state / API / file> # Constraints - <stack, performance, compliance> # Requirements - <WHAT needs to be built, not HOW - avoid code snippets, focus on components/capabilities> # Dependencies - <existing systems to study before implementing - read these to understand patterns and context> # Out of Scope - <explicit non-goals> # Done - <user-observable outcomes - behaviors the user can see/test, not technical tasks> -
If
spec/<current-spec>/spec.mdexists:- Print the current spec content for reference.
- If
$ARGUMENTSis provided, apply the refinement instructions to improve the spec. - If
$ARGUMENTSis empty, offer to review the spec for clarity and completeness. - Suggest improvements as a unified diff (GNU diff -u format) against the existing text.
- Interpret
$ARGUMENTSas guidance on what to clarify, tighten, or adjust (e.g., "make constraints more specific", "clarify the auth flow", "add performance requirements"). - Do not expand scope unless explicitly requested—focus on ambiguity removal, tighter constraints, clearer Done items.
Critical Constraints
Evidence-Based Suggestions Only:
✅ INCLUDE if there's direct evidence:
- Systems that already display/process this exact data type (e.g., if transaction log shows refunds, mention it for refund reason feature)
- Areas that must change because they currently handle the feature being modified
- Components explicitly named in the user's outline or existing spec
❌ EXCLUDE if speculative:
- Systems that could theoretically use this data but don't currently (e.g., analytics that doesn't mention refunds)
- "Nice to have" integrations that aren't already connected
- Tangentially related features that might benefit
Evidence test: Before suggesting any system/area, confirm:
- Does it currently handle this exact data/feature? OR
- Did the user explicitly mention it in their outline?
If both answers are "no", don't include it.
Guidelines
- KISS. Boundaries over blueprints.
- Dependencies: List existing systems developers should read/understand before starting. Include components you'll modify if understanding them is prerequisite.
- Requirements: State WHAT needs building, not HOW. No code snippets. "Create RefundReason enum", not "public enum RefundReason { ... }"
- Done: Observable user outcomes only. "Merchants can select refund reason" not "RefundReason enum created"
- Prefer edits that remove ambiguity rather than add new scope.
- Ground specs in research, not assumptions.
- If uncertain about technical details, search first, spec second.
- When in doubt, leave it out. Smaller, focused specs ship faster.
- Better to under-specify than over-promise.
- When refining, address the specific concerns in
$ARGUMENTSwhile maintaining the spec's structure.
After Completion
- For creation:
- Confirm the spec was written to
spec/<current-spec>/spec.md - Explain that the spec was created from the README.md description plus research findings
- Suggest running
/spkl:spec <refinements>if changes are needed
- Confirm the spec was written to
- For refinement: Ask if user wants to apply the suggested diff
Context
- Current spec: !
cat spec/.current 2>/dev/null || echo "No active spec" - Project context: @CLAUDE.md
Your Task
Phase 1: Validation
- Verify that
spec/<current-spec>/spec.mdexists - If not found, inform the user to run
/spkl:specfirst
Phase 2: Task Breakdown
Translate the spec into concrete, implementable tasks for human developers (not AI execution instructions):
- From Requirements section: Create concrete implementation tasks
- From Dependencies section: Understand context, but don't create "read X" tasks
- From Constraints section: Use to inform task creation, but don't duplicate them as tasks
- From Done criteria: Use to validate task completeness
Structure:
- Organize tasks into logical categories (e.g., "Core Models", "API Layer", "UI Components")
- Number categories sequentially (1, 2, 3, etc.)
- Number tasks within each category using decimal notation (1.1, 1.2, 1.3, etc.)
- Use markdown checkbox notation for each task:
- [ ] 1.1 Task description - Keep granularity appropriate (not too high-level, not overly detailed)
- Focus on what needs to be done, not how to do it
Update behavior:
-
If
spec/<current-spec>/tasks.mdexists, overwrite with fresh task list (developers manually check off completed tasks) -
Save tasks to
spec/<current-spec>/tasks.md
Critical Constraints
- Do not include constraints, dependencies, or success criteria in the task list - those remain in the spec to guide implementation
- Test scenarios/validation may be included as tasks if helpful, but consolidate into broad validation areas rather than individual test cases
Consolidation strategy for validation tasks:
- Group by system area (e.g., "API versioning", "UI validation", "persistence")
- Group by user flow (e.g., "refund flows", "authentication flows")
- Typically aim for 3-5 validation tasks total, not 7+
- Example: Instead of separate tasks for "test full refund" and "test partial refund", use "Verify refund flows work correctly (full and partial)"
Guidelines
- Tasks describe what to build, not implementation steps
- Avoid creating meta-tasks like "Read file X" or "Understand Y" (Dependencies section already lists these)
- Each task should be independently understandable and completable
- Tasks should map clearly back to Requirements in the spec
Example format:
# <spec name>: Implementation Tasks
**1. Core Models**
- [ ] 1.1 Create RefundReason enum in transaction domain
- [ ] 1.2 Add refund_reason field to Refund model
**2. API Layer**
- [ ] 2.1 Update RefundRequest schema to include reason
- [ ] 2.2 Add validation for required reason field
**3. UI Components**
- [ ] 3.1 Add reason dropdown to refund form
- [ ] 3.2 Update refund confirmation to display selected reason
**4. Validation**
- [ ] 4.1 Verify refund flows work correctly (full and partial refunds)
- [ ] 4.2 Verify UI validation and display (dropdown, confirmation, history)
- [ ] 4.3 Verify refund reason persistence in transaction logs
After Completion
- Confirm tasks were written to
spec/<current-spec>/tasks.md - Summarize the number of categories and tasks created
Sponsors
Details
- Marketplace
- mattbrailsford/speckl
- Author
- Matt Brailsford & Phil Whittaker
- Category
- Workflows
- License
- MIT
- Keywords
- specification, spec-driven, human-ai-collaboration, workflow, documentation, development, ai-assistant, task-management