Files
gh-launchcg-claude-marketpl…/skills/story-creator/SKILL.md
2025-11-30 08:36:58 +08:00

282 lines
6.7 KiB
Markdown

---
name: story-creator
description: Generates structured user stories from natural language requirements with proper formatting and AI-ready content
allowed-tools: mcp__atlassian__*
mcpServers:
- atlassian
---
# Story Creator Skill
This skill transforms natural language requirements, conversations, or feature requests into well-structured user stories that are ready for AI-assisted development.
## When This Skill is Invoked
Claude will automatically use this skill when you mention:
- "create user story"
- "write a story for"
- "turn this into a user story"
- "generate story from requirements"
- "new user story"
## Capabilities
### 1. Requirements Parsing
Extract key information from natural language input:
- **User/Persona**: Who is the user?
- **Capability**: What do they want to do?
- **Value**: Why do they want to do it?
- **Context**: Background information
- **Constraints**: Limitations or requirements
### 2. Story Structure Generation
Generate stories in AI-ready format:
```markdown
## User Story: [TITLE]
**As a** [user type]
**I want** [capability]
**So that** [business value]
### Context
[Background information, current state, pain points]
### Technical Approach (if applicable)
[High-level implementation notes]
### Acceptance Criteria
[Generated by acceptance-criteria-generator skill]
### Definition of Done
- [ ] Code complete and reviewed
- [ ] Unit tests written and passing
- [ ] Integration tests passing
- [ ] Documentation updated
- [ ] No security vulnerabilities
```
## How to Use This Skill
### Step 1: Parse Input Requirements
**Extract from natural language:**
```
Input: "Users are complaining they can't export their dashboard data.
They need to be able to download it as a PDF for sharing with
stakeholders who don't have system access."
Extracted:
- Persona: Dashboard user
- Capability: Export dashboard data as PDF
- Value: Share insights with stakeholders without system access
- Context: Current pain point - no export functionality
- Constraints: Must be PDF format, stakeholders are external
```
### Step 2: Identify Story Type
Determine the appropriate story format:
| Input Pattern | Story Type | Template |
|---------------|------------|----------|
| Feature request | Feature Story | User story format |
| Bug report | Bug Fix Story | Bug template |
| Technical improvement | Technical Story | Technical template |
| Spike/Research | Spike Story | Spike template |
### Step 3: Generate Story Structure
**Feature Story Template:**
```markdown
## User Story: [Action-oriented title]
**As a** [specific user persona]
**I want** [clear capability statement]
**So that** [measurable business value]
### Context
- **Current State:** [How things work now]
- **Problem:** [What's not working]
- **Impact:** [Business/user impact]
### Technical Approach
- [Implementation approach 1]
- [Implementation approach 2]
- [Key considerations]
### Out of Scope
- [What this story does NOT include]
- [Deferred items]
### Dependencies
- [Other stories or systems this depends on]
### Acceptance Criteria
[To be generated by acceptance-criteria-generator skill]
```
**Bug Fix Template:**
```markdown
## Bug Fix: [Clear bug description]
### Current Behavior
[What's happening now - the bug]
### Expected Behavior
[What should happen]
### Steps to Reproduce
1. [Step 1]
2. [Step 2]
3. [Observe bug]
### Root Cause (if known)
[Technical explanation]
### Proposed Fix
[How to resolve]
### Acceptance Criteria
- Bug no longer reproducible
- [Regression criteria]
- [Additional validation]
```
**Technical Story Template:**
```markdown
## Technical Story: [Technical improvement title]
### Problem Statement
[What technical issue exists]
### Proposed Solution
[How to address it]
### Technical Details
- [Specific implementation notes]
- [Libraries/frameworks involved]
- [Data models affected]
### Benefits
- [Performance improvement]
- [Maintainability improvement]
- [Security improvement]
### Risks
- [Potential issues]
- [Migration concerns]
### Acceptance Criteria
[Technical success criteria]
```
### Step 4: Validate AI-Readiness
Ensure story is suitable for AI-assisted development:
**AI-Readiness Checklist:**
- [ ] Clear, unambiguous requirements
- [ ] Testable acceptance criteria possible
- [ ] Scope is well-defined (not too broad)
- [ ] Technical approach is feasible
- [ ] No external dependencies blocking work
- [ ] Security considerations noted
**Scoring:**
- 6/6: Excellent - Ready for AI development
- 4-5/6: Good - Minor clarifications needed
- 2-3/6: Fair - Needs refinement before development
- 0-1/6: Poor - Requires significant rework
### Step 5: Create in Jira (if requested)
**Use Atlassian MCP to create story:**
```
mcp__atlassian__jira_create_issue(
projectKey="PROJ",
issueType="Story",
summary="[Story title]",
description="[Full story content in Jira format]",
labels=["ai-ready"],
customFields={
"acceptanceCriteria": "[AC content]"
}
)
```
## Output Format
Always structure skill output as:
```markdown
# Story Creation Result
## Generated Story
[Full story content]
## AI-Readiness Assessment
- **Score:** X/6
- **Status:** [Excellent/Good/Fair/Poor]
- **Issues:** [List any concerns]
## Recommendations
- [Suggestions for improvement]
## Next Steps
1. Review generated story
2. Invoke acceptance-criteria-generator for AC
3. Validate with dor-validator
4. Create in Jira (if ready)
```
## Best Practices
1. **Be Specific:** Avoid vague language like "improve" or "better"
2. **Focus on Value:** Always explain WHY the feature matters
3. **Keep Scope Manageable:** Stories should be completable in 1-3 days
4. **Include Context:** Background helps AI understand the domain
5. **Note Constraints:** Technical or business limitations
6. **Identify Persona:** Be specific about who the user is
## Error Handling
### Vague Requirements
```markdown
**Warning:** Input requirements are too vague to create a complete story.
**Missing Information:**
- User persona not specified
- Success criteria unclear
- Scope boundaries undefined
**Recommendation:** Please provide:
1. Who is the user?
2. What specific outcome do they need?
3. How will success be measured?
```
### Scope Too Large
```markdown
**Warning:** Requirements scope is too large for a single story.
**Suggested Breakdown:**
1. Story 1: [First capability]
2. Story 2: [Second capability]
3. Story 3: [Third capability]
**Recommendation:** Split into multiple stories for better AI-assisted development.
```
## Integration with Other Skills
This skill works with:
- **acceptance-criteria-generator**: Generate AC for the story
- **dor-validator**: Validate story meets Definition of Ready
- **story-refiner**: Improve existing stories
---
When invoked, this skill will analyze input requirements and generate a well-structured, AI-ready user story suitable for TDD development workflows.