agentleFS
ArvorCoArvorCo/Relentless/.claude/skills/validators/SKILL.md

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:

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
  1. Distinctive:

    Run validation after generating any document to catch structural issues early:

    line 9
  2. Very specific:

    After /relentless.specify → validate spec.md

    line 11
  3. Very specific:

    After /relentless.plan → validate plan.md

    line 12
  4. Very specific:

    After /relentless.tasks → validate tasks.md

    line 13
  5. Very specific:

    After /relentless.checklist → validate checklist.md

    line 14
  6. Very specific:

    After /relentless.constitution → validate constitution.md

    line 15
  7. Very specific:

    Create a new script in .claude/skills/validators/scripts/ following the pattern:

    line 167

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  1. After /relentless.specify → validate spec.md
  2. After /relentless.plan → validate plan.md
  3. After /relentless.tasks → validate tasks.md
  4. After /relentless.checklist → validate checklist.md
  5. 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.md

Validate All Documents in Feature

.claude/skills/validators/scripts/validate.sh relentless/features/001-feature-name

Individual 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.md

Validation Rules

spec.md

RuleTypeDescription
TitleERRORMust have # Feature Specification: [Name]
User ScenariosERRORMust have ## User Scenarios & Testing
User StoriesERRORMust have ### User Story N sections
PrioritiesERRORMust have Priority: P1, P2, etc.
Given/When/ThenERRORMust have TDD acceptance format
RequirementsERRORMust have ## Requirements section
FR-XXXERRORMust have functional requirements with FR-XXX format
Test StrategyERRORMust have ## Test Strategy section
Success CriteriaERRORMust have ## Success Criteria section

plan.md

RuleTypeDescription
TitleERRORMust have # Technical Plan: [Name]
Technical ContextERRORMust have ## Technical Context
Constitution ComplianceERRORMust have ## Constitution Compliance
ImplementationERRORMust have ## Implementation or ## Architecture
Test SpecificationsERRORMust have ## Test section
Quality GatesERRORMust have ## Quality Gates

tasks.md

RuleTypeDescription
TitleERRORMust have # Implementation Tasks: [Name]
PhasesERRORMust have ## Phase N sections
US TagsERRORMust have [US-XXX] tags
US HeadingsERRORMust have ### [US-XXX] Title format
Task CheckboxesERRORMust have - [ ] task items
ComplexityWARNShould have **Complexity**: simple/medium/complex/expert
PRD FormatERRORMust be convertible to prd.json

checklist.md

RuleTypeDescription
TitleERRORMust have # [Type] Checklist: [Name]
Quality GatesERRORMust have ## 0. Quality Gates (typecheck, lint, test)
TDD ComplianceERRORMust have ## 1. TDD Compliance
Routing ComplianceERRORMust have ## 2. Routing Compliance
CHK ItemsERRORMust have at least 5 CHK-XXX items
CheckboxesERRORMust have - [ ] or - [x] checkboxes

constitution.md

RuleTypeDescription
Title + VersionERRORMust have # Constitution vX.Y.Z
PrinciplesERRORMust have ## Principle N sections
MUST RulesERROREach principle must have ### MUST section with rules
SHOULD RulesERROREach principle must have ### SHOULD section with rules

Exit Codes

  • 0 - All validations passed
  • 1 - 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) found

Integration 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
fi

Troubleshooting

"VALIDATION FAILED" after document generation

  1. Review the specific ERROR messages
  2. Edit the document to add missing sections
  3. Re-run validation
  4. 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"

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.