validators
Skill98 starsChanged 10 months agoMITView on GitHub
Validate Relentless documents (spec.md, plan.md, tasks.md, checklist.md, constitution.md) to ensure they follow required structure and contain all mandatory sections. Run validation after generating any document to catch structural issues early:
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analyzeSkill
- checklistSkill
- clarifySkill
- constitutionSkill
- convertSkill
- implementSkill
- learnSkill
- planSkill
- prdSkill
- relentlessSkill
- specifySkill
- tasksSkill
- taskstoissuesSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Run validation after generating any document to catch structural issues early:
- Very specific: line 11
After /relentless.specify → validate spec.md
- Very specific: line 12
After /relentless.plan → validate plan.md
- Very specific: line 13
After /relentless.tasks → validate tasks.md
- Very specific: line 14
After /relentless.checklist → validate checklist.md
- Very specific: line 15
After /relentless.constitution → validate constitution.md
- Very specific: line 167
Create a new script in .claude/skills/validators/scripts/ following the pattern:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Validators Skill
Purpose
Validate Relentless documents (spec.md, plan.md, tasks.md, checklist.md, constitution.md) to ensure they follow required structure and contain all mandatory sections.
When to Use
Run validation after generating any document to catch structural issues early:
- After
/relentless.specify→ validate spec.md - After
/relentless.plan→ validate plan.md - After
/relentless.tasks→ validate tasks.md - After
/relentless.checklist→ validate checklist.md - After
/relentless.constitution→ validate constitution.md
Usage
Validate Single Document
# Auto-detect type from filename
.claude/skills/validators/scripts/validate.sh path/to/spec.md
# Force specific type
.claude/skills/validators/scripts/validate.sh --type=spec path/to/document.mdValidate All Documents in Feature
.claude/skills/validators/scripts/validate.sh relentless/features/001-feature-nameIndividual Validators
# Validate spec
.claude/skills/validators/scripts/validate-spec.sh path/to/spec.md
# Validate plan
.claude/skills/validators/scripts/validate-plan.sh path/to/plan.md
# Validate tasks
.claude/skills/validators/scripts/validate-tasks.sh path/to/tasks.md
# Validate checklist
.claude/skills/validators/scripts/validate-checklist.sh path/to/checklist.md
# Validate constitution
.claude/skills/validators/scripts/validate-constitution.sh path/to/constitution.mdValidation Rules
spec.md
| Rule | Type | Description |
| Title | ERROR | Must have # Feature Specification: [Name] |
| User Scenarios | ERROR | Must have ## User Scenarios & Testing |
| User Stories | ERROR | Must have ### User Story N sections |
| Priorities | ERROR | Must have Priority: P1, P2, etc. |
| Given/When/Then | ERROR | Must have TDD acceptance format |
| Requirements | ERROR | Must have ## Requirements section |
| FR-XXX | ERROR | Must have functional requirements with FR-XXX format |
| Test Strategy | ERROR | Must have ## Test Strategy section |
| Success Criteria | ERROR | Must have ## Success Criteria section |
plan.md
| Rule | Type | Description |
| Title | ERROR | Must have # Technical Plan: [Name] |
| Technical Context | ERROR | Must have ## Technical Context |
| Constitution Compliance | ERROR | Must have ## Constitution Compliance |
| Implementation | ERROR | Must have ## Implementation or ## Architecture |
| Test Specifications | ERROR | Must have ## Test section |
| Quality Gates | ERROR | Must have ## Quality Gates |
tasks.md
| Rule | Type | Description |
| Title | ERROR | Must have # Implementation Tasks: [Name] |
| Phases | ERROR | Must have ## Phase N sections |
| US Tags | ERROR | Must have [US-XXX] tags |
| US Headings | ERROR | Must have ### [US-XXX] Title format |
| Task Checkboxes | ERROR | Must have - [ ] task items |
| Complexity | WARN | Should have **Complexity**: simple/medium/complex/expert |
| PRD Format | ERROR | Must be convertible to prd.json |
checklist.md
| Rule | Type | Description |
| Title | ERROR | Must have # [Type] Checklist: [Name] |
| Quality Gates | ERROR | Must have ## 0. Quality Gates (typecheck, lint, test) |
| TDD Compliance | ERROR | Must have ## 1. TDD Compliance |
| Routing Compliance | ERROR | Must have ## 2. Routing Compliance |
| CHK Items | ERROR | Must have at least 5 CHK-XXX items |
| Checkboxes | ERROR | Must have - [ ] or - [x] checkboxes |
constitution.md
| Rule | Type | Description |
| Title + Version | ERROR | Must have # Constitution vX.Y.Z |
| Principles | ERROR | Must have ## Principle N sections |
| MUST Rules | ERROR | Each principle must have ### MUST section with rules |
| SHOULD Rules | ERROR | Each principle must have ### SHOULD section with rules |
Exit Codes
0- All validations passed1- Validation errors found (document is incomplete)2- Usage error (bad arguments)
Output Format
━━━ Validating Spec: path/to/spec.md ━━━
ℹ Checking document structure...
✓ Title found: Feature Name
✓ Feature branch documented
...
✗ ERROR: Missing Given/When/Then acceptance scenarios
⚠ WARNING: No edge cases documented
...
━━━ Validation Summary for spec.md ━━━
Passed: 12
Warnings: 2
Errors: 1
VALIDATION FAILED: 1 error(s) foundIntegration with Skills
Skills should run validation after generating documents:
# In skill workflow after creating spec.md
echo "Validating generated spec..."
if ! .claude/skills/validators/scripts/validate-spec.sh "$FEATURE_PATH/spec.md"; then
echo "Validation failed - please fix errors before proceeding"
exit 1
fiTroubleshooting
"VALIDATION FAILED" after document generation
- Review the specific ERROR messages
- Edit the document to add missing sections
- Re-run validation
- Repeat until all errors are fixed
False Positives
Some warnings may not apply to your specific document. Warnings don't fail validation - they're recommendations.
Adding Custom Validators
Create a new script in .claude/skills/validators/scripts/ following the pattern:
#!/usr/bin/env bash
source "$SCRIPT_DIR/common.sh"
# ... your validation logic using check_section, check_min_count, etc.
print_summary "your-doc-type"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

