| name | yaml-validator |
| description | Validate Hyper-Extract YAML templates for syntax and structure errors.
Use when user says: "validate template", "check YAML", "fix errors", "validate syntax".
Trigger: User wants to verify their YAML configuration is correct.
Skip: User wants to design a new template (use record-designer or graph-designer instead).
|
YAML Validator
Validation Workflow
- Syntax check: YAML is valid
- Required fields: All required fields present
- Type check: Valid AutoType value
- Identifiers check: Proper configuration for type
- Field validation: Types and descriptions present
Quick Validation Checklist
All Types
- [ ] language: zh/en
- [ ] name: PascalCase
- [ ] type: valid AutoType
- [ ] tags: lowercase array
- [ ] description: non-empty
- [ ] output: exists
- [ ] guideline: exists
Graph Types
- [ ] output.entities: exists
- [ ] output.relations: exists
- [ ] identifiers.entity_id: exists
- [ ] identifiers.relation_id: exists
- [ ] identifiers.relation_members: configured
Hypergraph
- [ ] relation_members is string OR list
- [ ] If list: all fields are type: list
Temporal/Spatial
- [ ] identifiers.time_field: configured (temporal)
- [ ] identifiers.location_field: configured (spatial)
Validation Levels
| Level | Meaning | Action |
|---|
| ERROR | Must fix | Won't work without fix |
| WARNING | Should fix | May affect quality |
| INFO | Reference | Recommended to follow |
Reference Files
Important: Check these files only when needed during validation process.
Validation Order
Recommended order: Follow this sequence for efficient validation:
- Syntax ā rules-syntax.md - Check YAML validity first
- Structure ā rules-types.md - Validate based on type
- Identifiers ā rules-identifiers.md - Check identifier config
- Errors ā rules-errors.md - Look up fixes if needed
Error Message Format
## Validation Results
### Syntax Validation
ā
PASSED
### Structure Validation
ā
PASSED
- language: ā
- name: ā
- type: ā
- tags: ā
- description: ā
- output: ā
### Semantic Validation
ā ļø 2 warnings
- WARNING: [message]
- WARNING: [message]
### Overall Assessment
ā
Configuration valid