-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Task: Implement YAML frontmatter validation script
Description
Create validate-frontmatter.sh script that validates YAML frontmatter and internal link dependencies in epic task files before GitHub synchronization.
Acceptance Criteria
- Script accepts directory path as input parameter
- Recursively validates all
.mdfiles in directory - Validates presence of YAML frontmatter block (--- delimited)
- Validates required
titlefield exists in frontmatter - Validates files referenced in
depends_onexist within same epic - Returns exit code 0 for success, 2 for validation failures
- Provides clear error messages for each validation failure
- Handles edge cases: missing files, malformed YAML, empty frontmatter
Technical Details
Implementation approach:
- Use POSIX shell for maximum compatibility
- Parse YAML frontmatter using sed/awk (avoid external dependencies)
- Validate file references relative to input directory
- Accumulate all errors before final exit code
Key considerations:
- Must be fast for large epics (< 2 second execution time)
- Robust error handling for malformed content
- Clear, actionable error messages for users
Code locations/files affected:
- Create:
.claude/scripts/pm/validate-frontmatter.sh - Make executable:
chmod +x .claude/scripts/pm/validate-frontmatter.sh
Dependencies
- Understanding of CCPM epic file structure
- Access to sample epic files for testing
- POSIX shell environment for testing
Effort Estimate
- Size: M
- Hours: 2 hours
- Parallel: true (independent development)
Definition of Done
- Script implemented with all validation rules
- Script is executable and follows POSIX standards
- Manual testing with valid/invalid frontmatter scenarios
- Error messages are clear and actionable
- Performance validated (< 2 seconds for typical epic)
- Code follows shell scripting best practices
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels