home / skills / arjenschwarz / agentic-coding / starwave-design

starwave-design skill

/claude/skills/starwave-design

This skill creates a comprehensive feature design document from requirements, researching needs, and detailing architecture, data models, and testing strategy.

npx playbooks add skill arjenschwarz/agentic-coding --skill starwave-design

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
5.1 KB
---
name: starwave:design
description: 2. Create Feature Design Document
---

### 2. Create Feature Design Document

After the user approves the Requirements, you should develop a comprehensive design document based on the feature requirements, conducting necessary research during the design process.
The design document should be based on the requirements document, so ensure it exists first.

**Constraints:**

- The user provides the {feature_name} as part of the prompt, or by way of the current branch which will contain the name of the feature, either in whole or prefixed by specs/.
- Verify that the specs/{feature_name} folder exists and has a requirements.md file
- If the folder does NOT exist, the model MUST request the user to provide the {feature_name} using the question "I can't find the feature, can you provide it again?"
- If the requirements.md file does not exist in the folder, the model MUST inform the user that they need to use the requirements skill to create it first.
- If a decision_log.md file exists in the specs/{feature_name} folder, the decisions in there MUST be followed.
- The model MUST create a 'specs/{feature_name}/design.md' file if it doesn't already exist
- The model MUST identify areas where research is needed based on the feature requirements
- The model MUST conduct research and build up context in the conversation thread
- The model SHOULD NOT create separate research files, but instead use the research as context for the design and implementation plan
- The model MUST summarize key findings that will inform the feature design
- The model SHOULD cite sources and include relevant links in the conversation
- The model MUST create a detailed design document at 'specs/{feature_name}/design.md'
- The model MUST incorporate research findings directly into the design process
- The model MUST include the following sections in the design document:
  - Overview
  - Architecture
  - Components and Interfaces
  - Data Models
  - Error Handling
  - Testing Strategy
- When writing the Testing Strategy section, the model SHOULD evaluate acceptance criteria for property-based testing (PBT) candidates:
  - Review requirements that express universal guarantees (invariants, round-trip behavior, idempotence)
  - For components like parsers, serializers, data structures, or algorithms, consider whether PBT would provide better coverage than example-based tests alone
  - If PBT is appropriate, specify: the properties to test, the framework to use (based on project language), and the input generation approach
  - If PBT is not appropriate for the feature, this should be omitted from the Testing Strategy
- The model SHOULD include diagrams or visual representations when appropriate (use Mermaid for diagrams if applicable)
- The model MUST ensure the design addresses all feature requirements identified during the clarification process
- The model MUST use tools like context7 to retrieve relevant information about the libraries and tools

**Self-Review Checklist (before skill review):**
Before triggering skill reviews, the model MUST verify:
- [ ] Each requirement from requirements.md has a corresponding design element
- [ ] All acceptance criteria can be traced to specific components or interfaces
- [ ] Data models support all required operations from the requirements
- [ ] Error handling covers failure modes implied by requirements
- [ ] Testing strategy includes tests for each acceptance criterion
- [ ] No design elements exist without a corresponding requirement (scope creep check)

**Self-Validation via Explanation:**
- The model MUST use the explain-like skill (invoke the Skill tool with skill="explain-like") to explain the design at multiple expertise levels (beginner, intermediate, expert)
- This serves as a self-review mechanism: if the design cannot be clearly explained at each level, it may indicate gaps, overcomplexity, or logic issues
- The model SHOULD address any issues discovered during this explanation process before proceeding to skill reviews

- The model MUST use relevant skills to receive feedback on the design, after writing the initial design. The requirements MUST always take precedence over this feedback.
- The model MUST highlight design decisions and their rationales in a decision log document at specs/{feature_name}/decision_log.md
- The model MUST ask the user for input on specific technical decisions during the design process
- When asking the user questions and offering options, the model MUST use the AskUserQuestion tool.
- After updating the design document, the model MUST use the Task tool with subagent_type="general-purpose" to run the design-critic skill (invoke the Skill tool with skill="design-critic"), and the Task tool with subagent_type="peer-review-validator" to review the document and provide its questions to the user.
- After the review by the skills, the model MUST ask the user "Does the design look good?"
- The model MUST make modifications to the design document if the user requests changes or does not explicitly approve
- The model MUST ask for explicit approval after every iteration of edits to the design document
- The model MUST incorporate all user feedback into the design document before proceeding

Overview

This skill generates a comprehensive feature design document from an approved requirements file. It verifies the feature folder and requirements.md, conducts targeted research, produces specs/{feature_name}/design.md, and enforces decision and review workflows to ensure traceability and testability. The design includes architecture, components, data models, error handling, and a testing strategy including property-based testing where appropriate.

How this skill works

The skill locates specs/{feature_name}/requirements.md and follows any decisions in decision_log.md. If the folder or requirements file is missing it prompts the user to provide the feature name or to run the requirements step first. It performs research (linked in conversation), synthesizes findings into the document, writes specs/{feature_name}/design.md, updates specs/{feature_name}/decision_log.md, and runs automated peer reviews and design-critic tools before asking the user for approval.

When to use it

  • You have an approved requirements.md and need a full design doc
  • Preparing for implementation or handoff to engineers
  • Needing research-driven tradeoffs documented alongside designs
  • When acceptance criteria must map to tests and architecture
  • Before creating tickets or implementation plans

Best practices

  • Ensure requirements.md is complete and stored at specs/{feature_name}/requirements.md before starting
  • Keep decision_log.md up to date so design follows prior decisions
  • Answer targeted technical questions when prompted to enable focused tradeoffs
  • Review and approve design iterations explicitly after each change
  • Use the provided testing guidance to align tests with acceptance criteria

Example use cases

  • Design a new API endpoint with data model, error handling, and PBT candidates
  • Define architecture and component interfaces for a background processing feature
  • Translate user-facing feature requirements into developer-facing implementation plans
  • Produce a test strategy that identifies when property-based testing improves coverage

FAQ

What happens if I don’t provide the feature name?

If the folder can’t be found the skill will ask: "I can't find the feature, can you provide it again?"

Can I request changes after the initial design?

Yes. The skill will iterate on the design, incorporate feedback, update design.md and decision_log.md, and ask for explicit approval after each iteration.