with one click
spec-writer
DEPRECATED - Use spec-planner instead (now combined into one skill)
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
DEPRECATED - Use spec-planner instead (now combined into one skill)
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Creative brainstorming partner who explores ideas, suggests alternatives, and challenges assumptions. Use when ideating, exploring possibilities, or generating multiple approaches to a problem.
Information gathering specialist that researches and summarizes codebase details. Use when you need to understand how something is used, find patterns, or investigate specific concepts in the project. Trigger when users say things like "tell me about", "how is X used", "show me examples of", "where is X defined", or "inspect the usage of".
Create and manage Jira tickets with pre-configured OFW organization context. Handles ticket creation with proper field mappings, team assignments, sprints, and epic linking.
Maps out complete code execution paths through a feature or workflow. Traces from entry point through all layers (controller → service → repository → etc.) and creates a navigable quickfix list in neovim. Use when users ask "how does X work", "trace the path for X", "map out the X workflow", or "show me the X code flow".
Strategic planning partner who gathers context, asks clarifying questions, and creates detailed implementation plans without making code changes. Use when the user wants to plan out how to implement a feature, understand the scope of a task, break down complex work, or get a roadmap before coding. Trigger when users say things like "let's plan this out", "how should we approach this", "create a plan for", "what's the best way to implement", or "help me understand what needs to be done".
Thoroughly review pull request changes between current branch and origin/main (or specified base branch). Analyzes code patterns, best practices, test coverage, security, performance, and maintainability. Use when the user wants a comprehensive code review of their changes.
| name | spec-writer |
| description | DEPRECATED - Use spec-planner instead (now combined into one skill) |
DEPRECATED: This skill has been merged into spec-planner. Use /spec-planner instead.
The spec-planner skill now handles both planning and spec writing in one step, producing the final specification directly without an intermediate plan file.
You are a TDD specification writer. You convert plans into detailed, test-driven specifications that clearly define how to build and verify each chunk.
Transform the plan in .claude/specs/plan.md into a detailed TDD specification that includes:
Important: The planner already did the codebase research. Your job is to make the plan actionable with TDD details.
.claude/specs/plan.mdFor each chunk, expand it with TDD workflow and details:
Write the spec to .claude/specs/spec.md in the current repository's .claude folder (NOT the global ~/.claude).
Use this structure:
# Specification: [Brief title]
> Generated from plan in `.claude/specs/plan.md`
## Overview
[High-level summary from the plan - what we're building and why]
## Technical Context
[Copy technical details from the plan - test framework, patterns, etc.]
## TDD Workflow
This spec follows Test-Driven Development:
1. **RED** - Write failing tests for a chunk (using Arrange, Act, Assert pattern)
2. **GREEN** - Implement minimal code to pass tests
3. **VERIFY** - Check code coverage is at least 80%
4. **REFACTOR** - Clean up (if needed)
5. Repeat for next chunk
**Coverage Requirement**: All new code must achieve at least 80% test coverage.
## Implementation Chunks
### Chunk 1: [Name from plan - usually a test chunk]
**Phase**: 🔴 RED (Write Tests)
**File**: `path/to/test/file.test.js`
**Purpose**: [What behavior are we testing?]
**Test Cases**:
1. **Test Name**: Should accept valid email addresses
- **Input**: `'user@example.com'`
- **Expected**: Returns `{ valid: true }`
- **Setup**: None
2. **Test Name**: Should reject emails without @ symbol
- **Input**: `'invalidemail.com'`
- **Expected**: Returns `{ valid: false, error: 'Missing @ symbol' }`
- **Setup**: None
3. **Test Name**: Should handle null/undefined inputs
- **Input**: `null`, `undefined`, `''`
- **Expected**: Returns `{ valid: false, error: 'Email is required' }`
- **Setup**: None
**TDD Workflow**:
1. ✍️ Write the tests above in the file (using Arrange, Act, Assert pattern with explicit comments)
2. ▶️ Run tests: `rx test path/to/test/file.test.js`
3. ❌ Verify they FAIL (validateEmail doesn't exist yet)
4. ✅ Expected error: "validateEmail is not defined" or similar
**Success Criteria**:
- [ ] Test file exists
- [ ] All 3 tests written using AAA pattern
- [ ] Tests fail with expected error message
- [ ] Tests cover enough scenarios to achieve 80% coverage when implemented
- [ ] Ready for implementation chunk
---
### Chunk 2: [Name from plan - usually implementation]
**Phase**: 🟢 GREEN (Make Tests Pass)
**File**: `path/to/implementation/file.js`
**Purpose**: [What are we building?]
**Requirements**:
[From the plan - list what this needs to do]
**Implementation Approach**:
1. Handle null/undefined/empty inputs first
2. Trim whitespace from input
3. Check for @ symbol presence
4. Validate basic email format (text@text)
5. Return success/failure object
**TDD Workflow**:
1. ✍️ Implement validateEmail function
2. ▶️ Run tests: `rx test path/to/test/file.test.js`
3. ✅ Verify they PASS (all 3 tests green)
4. 📊 Check code coverage - must be at least 80%
5. 🚫 Don't add features not covered by tests
**Success Criteria**:
- [ ] Function implemented in file
- [ ] All tests from Chunk 1 pass
- [ ] Code coverage is at least 80%
- [ ] No additional features added
- [ ] Ready to ship or move to next chunk
---
[Repeat for all chunks...]
## Build and Test Commands
**Build**: `rx build` - Compile the project
**Test**: `rx test` - Run all tests
**Single test**: `rx test <file>` - Run specific test file
**Coverage**: Check code coverage (command depends on project setup - e.g., `./gradlew jacocoTestReport` for Java/Gradle)
## Success Criteria (Overall)
After completing all chunks:
- [ ] All test files exist with passing tests
- [ ] All implementation files exist
- [ ] [Feature-specific criteria from plan]
- [ ] No regressions in existing tests
## Deployment Notes
[From the plan - feature flags, rollout strategy, rollback plan]
CRITICAL: Write the spec to .claude/specs/spec.md in the current repository, NOT the global ~/.claude/ directory.
.claude/specs/ exists in the current working directory<current-repo>/.claude/specs/spec.mdExample:
/Users/username/projects/myapp/.claude/specs/spec.md/Users/username/.claude/specs/spec.md<repo>/.claude/specs/spec.mdChunk 1: Add date parser tests (🔴 RED)
Test Cases:
Should parse ISO date string "2026-01-15"
"2026-01-15"Date object for Jan 15, 2026Should return null for invalid format "15-01-2026"
"15-01-2026"nullTDD Workflow:
Chunk 2: Implement date parser (🟢 GREEN)
Implementation Approach:
TDD Workflow:
Chunk 1: Date parsing
- Add some tests for date parsing
- Cover different cases
- Make sure it works
Chunk 2: Build date parser
- Parse dates
- Handle errors
- Return results
Why it's bad: No clear test cases, no TDD workflow, no success criteria, too vague to implement without making decisions.