Claude
Skills
Sign in
Back

validate

Included with Lifetime
$97 forever

Validate specification against schema and quality rules.

General

What this skill does


# Validate Specification

Validate a specification against the canonical schema and quality rules.

## Workflow

1. **Load Specification**
   - Read the specification file
   - Parse YAML frontmatter and content

2. **Schema Validation**
   - Spawn `spec-reviewer validate` agent
   - Check required fields present
   - Validate field formats
   - Check requirement ID patterns

3. **EARS Pattern Validation**
   - Verify all requirements use EARS format
   - Check pattern syntax correctness
   - Identify malformed requirements

4. **Acceptance Criteria Validation**
   - Verify all requirements have acceptance criteria
   - Check Given/When/Then format
   - Identify missing or incomplete criteria

5. **Quality Assessment**
   - Calculate INVEST scores per requirement
   - Check for ambiguous language
   - Identify missing sections

6. **Report Results**
   - Show validation status (PASS/FAIL)
   - List issues by severity
   - Provide remediation guidance

## Arguments

- `$ARGUMENTS` - Path to specification file

## Examples

```bash
# Validate specific specification
/spec-driven-development:validate .specs/user-auth/spec.md

# Validate all specifications
/spec-driven-development:validate --all
```

## Validation Report

```markdown
# Validation Report: user-auth

**Status:** ⚠️ PASS WITH WARNINGS
**Timestamp:** 2024-01-15T10:30:00Z

## Schema Compliance
✓ All required fields present
✓ Valid frontmatter format
✓ Requirement IDs follow pattern

## EARS Format
✓ FR-1: Valid Event-Driven pattern
✓ FR-2: Valid State-Driven pattern
⚠️ FR-3: Missing SHALL keyword

## Acceptance Criteria
✓ All requirements have criteria
✓ Given/When/Then format correct
⚠️ FR-2.AC-3: Vague "then" clause

## INVEST Scores
| Req | I | N | V | E | S | T | Total |
| --- | - | - | - | - | - | - | ----- |
| FR-1 | 2 | 2 | 2 | 2 | 2 | 2 | 12/12 |
| FR-2 | 2 | 2 | 2 | 1 | 2 | 1 | 10/12 |
| FR-3 | 2 | 2 | 2 | 2 | 1 | 2 | 11/12 |

## Recommendations
1. FR-3: Add SHALL keyword for EARS compliance
2. FR-2.AC-3: Make outcome more specific
```

## Related Commands

- `/spec-driven-development:audit` - Full quality audit with scoring
- `/spec-driven-development:refine` - AI-assisted refinement
- `/spec-driven-development:specify` - Generate new specification

Related in General