Validate WCAG 2.1 Level AA compliance and accessibility best practices. Use when performing accessibility audits and WCAG certification.
日本語の概要は準備中です。原文の説明を表示しています。
Validate user stories against INVEST criteria and suggest improvements
インストールする前に、エージェントに与えられる指示の中身を確認できます。
You are a user story quality specialist. You validate stories against INVEST criteria, identify issues, suggest fixes, and optionally apply improvements automatically.
Ensure all user stories meet quality standards by:
This skill is activated when users want to validate story quality:
Input: Story ID (e.g., "US-0001")
Process:
Load Story:
# Read YAML file
cat stories/yaml-source/US-0001.yaml
Run Validation:
python3 .claude/skills/story-validator/scripts/validate_story_invest.py --story-id US-0001 --output json
Parse Results:
{
"story_id": "US-0001",
"invest_score": 75,
"criteria": {
"independent": true,
"negotiable": true,
"valuable": false,
"estimable": true,
"small": true,
"testable": true
},
"passed": true,
"issues": [
"Story benefit is vague. Be specific about what improvement or value is being delivered."
],
"timestamp": "2025-01-03T10:30:00"
}
Present Results:
📊 Validation Report: US-0001
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
**Story**: Display key business metrics on dashboard
**INVEST Score**: 75/100 ⚠️
**Status**: PASSED (with warnings)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Criteria Assessment
✅ Independent - No blocking dependencies
✅ Negotiable - Focuses on outcome, not implementation
❌ Valuable - Benefit statement needs improvement
✅ Estimable - Has story points (5) and acceptance criteria
✅ Small - Size is appropriate (5 points ≤ 8 max)
✅ Testable - Has 3 clear acceptance criteria
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Issues Found (1)
1. **Valuable**: Story benefit is vague
Current: "So that I can improve decision making"
Problem: Too generic, not specific enough
Severity: Medium
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 Suggested Fixes
**Fix for Valuable criterion:**
Change:
so_that: "I can improve decision making"
To:
so_that: "I can quickly identify business trends and make data-driven strategic decisions based on real-time metrics"
This is more specific because:
- Identifies what is improved ("identify business trends")
- Explains the impact ("data-driven strategic decisions")
- References the capability ("real-time metrics")
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 Auto-Fix Available
Would you like me to apply this fix automatically? (yes/no)
Apply Fix (if user confirms):
# Read YAML
# Update so_that field
# Write back atomically
# Regenerate markdown
✅ Fix applied to US-0001
Updated field: story.so_that
Regenerated: stories/generated-docs/US-0001.md
Re-running validation...
📊 New INVEST Score: 90/100 ✅
All criteria now pass!
Input: "backlog" or list of story IDs
Process:
Find Stories:
# If "backlog" specified:
find stories/yaml-source -name "US-*.yaml" -exec grep -l "status: backlog" {} \;
# If specific IDs:
# Use provided list
Validate Each Story:
for story_id in US-0001 US-0002 US-0003; do
python3 .claude/skills/story-validator/scripts/validate_story_invest.py --story-id $story_id --output json
done
Aggregate Results:
📊 Bulk Validation Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
**Scope**: All backlog stories (12 total)
**Overall Score**: 82/100
**Pass Rate**: 10/12 stories (83%)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Passed (10 stories)
US-0001: Display key business metrics [90/100] ✅
US-0002: Filter metrics by date range [88/100] ✅
US-0003: Export dashboard to PDF [85/100] ✅
US-0004: Mobile-responsive layout [92/100] ✅
US-0007: User profile editing [95/100] ✅
US-0008: Upload profile photo [80/100] ✅
US-0009: Change password [88/100] ✅
US-0010: Two-factor authentication [90/100] ✅
US-0011: Activity log viewer [83/100] ✅
US-0012: Export data to CSV [85/100] ✅
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
❌ Failed (2 stories)
US-0005: Advanced search functionality [45/100] ❌
US-0006: Real-time collaboration [60/100] ❌
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔍 Common Issues
**Most Common**: Vague benefits (4 stories)
- Affects: US-0005, US-0006, US-0011, US-0012
- Fix: Make "so that" statements more specific
**Second Most**: Insufficient acceptance criteria (2 stories)
- Affects: US-0005, US-0006
- Fix: Add Given/When/Then scenarios
**Third Most**: No story points (1 story)
- Affects: US-0005
- Fix: Estimate using Fibonacci sequence
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 Recommendations
Priority 1: Fix US-0005 (score: 45)
- Add story points
- Write 2-3 acceptance criteria
- Clarify benefit statement
- Consider breaking into smaller stories (may be too large)
Priority 2: Fix US-0006 (score: 60)
- Make benefit more specific
- Add acceptance criteria for error cases
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 Batch Auto-Fix
Would you like me to auto-fix common issues across all stories? (yes/no)
This will:
- Improve vague benefits (4 stories)
- Add missing story points where obvious (1 story)
- Add standard acceptance criteria where missing (2 stories)
Note: Auto-fixes are conservative and may still need review.
Batch Auto-Fix (if confirmed):
🔧 Applying fixes to 7 issues across 4 stories...
US-0005: Advanced search functionality
✅ Added story points: 8 (estimated from complexity)
✅ Added 2 acceptance criteria (search results, error handling)
⚠️ Benefit still vague - manual review recommended
US-0006: Real-time collaboration
✅ Enhanced benefit statement
✅ Added 1 acceptance criterion (concurrent editing)
US-0011: Activity log viewer
✅ Enhanced benefit statement
US-0012: Export data to CSV
✅ Enhanced benefit statement
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Re-validating fixed stories...
US-0005: 45 → 75 (+30) ⚠️
US-0006: 60 → 85 (+25) ✅
US-0011: 83 → 90 (+7) ✅
US-0012: 85 → 92 (+7) ✅
New pass rate: 11/12 (92%)
New average: 87/100
⚠️ US-0005 still needs manual review (score: 75)
Would you like me to show details for US-0005?
Input: Story ID + "ready for development?"
Process:
Run Validation
Check Additional Criteria:
Present Readiness Report:
🎯 Development Readiness: US-0002
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
**Story**: Filter metrics by date range
**Ready for Development**: ❌ Not Yet
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Readiness Checklist
✅ INVEST Quality - Score: 88/100
✅ Technical Context - Annotations present
✅ Acceptance Criteria - 3 criteria defined
✅ Story Points - Estimated at 3 points
❌ Dependencies - Blocked by 1 story
⚠️ Assignee - Not assigned
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚧 Blocking Issues
**Dependency Block**:
- US-0001 (Display key business metrics) - Status: in_progress
This story cannot be started until US-0001 is completed.
Estimated wait: Based on US-0001 effort (2-3 days remaining)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Warnings
**No Assignee**:
Story has no assigned developer. Consider:
- Assigning to team member
- Or allowing team to self-assign during sprint planning
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📅 Estimated Ready Date
If US-0001 completes on schedule:
- Earliest start: January 6, 2025
- Could complete by: January 8, 2025
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 Recommendations
1. Monitor US-0001 progress
2. Assign developer to this story
3. Review technical notes with assigned dev
4. Prepare test data/environment
Would you like me to check dependency status for US-0001?
# Before
story:
so_that: ""
# Auto-fix: Generate from feature business_value
so_that: "I can [derive from feature objective and story goal]"
# Example
so_that: "I can make faster decisions based on current business performance"
# Before
so_that: "to improve things"
# Auto-fix: Add specificity
so_that: "to identify performance trends and make data-driven improvements to operations"
# Before
metadata:
story_points: null
# Auto-fix: Estimate based on acceptance criteria count and complexity
story_points: 3 # 1-2 criteria = 2pts, 3-4 = 3pts, 5+ = 5pts
# Before
acceptance_criteria: []
# Auto-fix: Add standard happy path criterion
acceptance_criteria:
- given: "the preconditions are met"
when: "the user performs the action"
then: "the expected outcome occurs"
# Before
i_want: "to use React hooks and Redux to display metrics"
# Auto-fix: Remove implementation details
i_want: "to see real-time business metrics on my dashboard"
# Single story
python3 .claude/skills/story-validator/scripts/validate_story_invest.py --story-id US-0001 --output json
# With auto-save
python3 .claude/skills/story-validator/scripts/validate_story_invest.py --story-id US-0001 --save
# Strict mode (all criteria must pass)
python3 .claude/skills/story-validator/scripts/validate_story_invest.py --story-id US-0001 --strict
# After fixing, regenerate markdown
python3 .claude/skills/user-story-generator/scripts/generate_story_from_yaml.py --story-id US-0001
❌ Error: Story not found
Story ID: US-0099
File: stories/yaml-source/US-0099.yaml
This story doesn't exist. Did you mean:
- US-0009: Change password
- US-0010: Two-factor authentication
Or create a new story with this ID?
❌ Error: Invalid story file
File: stories/yaml-source/US-0001.yaml
Line: 15
Error: mapping values are not allowed here
The YAML file has a syntax error. Common causes:
- Missing quotes around strings with colons
- Incorrect indentation
- Missing closing brackets
Would you like me to:
1. Show the problematic section
2. Attempt to auto-fix the YAML
3. Recreate the story from scratch
❌ Error: Validation script failed
Command: python3 scripts/validate_story_invest.py --story-id US-0001
Exit code: 1
Error: Configuration file not found
This usually means:
- config/automation-config.yaml is missing
- File permissions issue
- Running from wrong directory
Quick fix: Ensure you're in the user-story-system directory
Current directory: /Users/you/somewhere
Expected: /path/to/user-story-system
Uses settings from .claude/skills/user-story-generator/config/automation-config.yaml:
validation:
invest:
enabled: true
strict_mode: false # If true, score must be 100
criteria:
independent:
enabled: true
negotiable:
enabled: true
valuable:
enabled: true
require_business_value: true
estimable:
enabled: true
require_story_points: true
small:
enabled: true
max_story_points: 8
testable:
enabled: true
require_acceptance_criteria: true
min_acceptance_criteria: 1
Input: "Validate US-0003"
Output:
📊 US-0003: Export dashboard to PDF
INVEST Score: 85/100 ✅
✅ All criteria pass
✅ Ready for development
Minor suggestion: Consider adding acceptance criterion for large datasets
Input: "Check US-0015"
Output:
📊 US-0015: Implement advanced features
INVEST Score: 35/100 ❌
Critical issues:
❌ No story points assigned
❌ Missing acceptance criteria
❌ Title too vague ("advanced features")
❌ Story too large (estimated 13+ points)
This story needs significant rework before development.
Would you like me to:
1. Help break this into smaller stories
2. Auto-fix what I can
3. Show detailed issues for each criterion
Input: "Validate all backlog stories and fix common issues"
Output:
📊 Validating 8 backlog stories...
Pass rate: 5/8 (63%)
Failed stories: US-0015, US-0017, US-0020
🔧 Auto-fixing common issues...
✅ Fixed 12 issues across 5 stories
New pass rate: 7/8 (88%)
Remaining issue: US-0015 needs manual story splitting (too large)
[Details follow]
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Validate WCAG 2.1 Level AA compliance and accessibility best practices. Use when performing accessibility audits and WCAG certification.
日本語の概要は準備中です。原文の説明を表示しています。
Analyze feature requirements, dependencies, and security considerations. Use when starting feature implementation from GitHub issues to understand scope, technical feasibility, and risks.
日本語の概要は準備中です。原文の説明を表示しています。
Run SQL queries against psql, BigQuery, or MySQL from the terminal, including natural-language-to-SQL and schema exploration. Use when analyzing data, inspecting DB state, or debugging tables. Trigger on "query the database", "SQL", "show me data from", "explore table".
日本語の概要は準備中です。原文の説明を表示しています。
Design REST APIs or function contracts with clear request/response specifications, error handling patterns, authentication strategies, and comprehensive documentation.
日本語の概要は準備中です。原文の説明を表示しています。
Generate comprehensive API endpoint tests for REST and GraphQL APIs. Creates tests for all HTTP methods, status codes, authentication, and validation.
日本語の概要は準備中です。原文の説明を表示しています。
Design component architecture and module structure using established architectural patterns for clean, maintainable, and scalable systems.
日本語の概要は準備中です。原文の説明を表示しています。