New Component Validation Workflow
Purpose
Ensure all new components (standards, commands, agents, skills, hooks, validators) meet quality requirements before activation.
Trigger Conditions
- New component file created in CODITECT directories
/component-createcommand executed- Manual invocation with component path
Workflow Phases
Phase Details
Phase 1: Structure Validation
Tools: self-healing-component-validator
Validates:
- YAML frontmatter presence and validity
- Required fields for component type
- File naming conventions
- Directory placement
Auto-Fixes:
- Missing frontmatter fields
- Invalid YAML syntax
- Indentation errors
- Default value insertion
Phase 2: Quality Analysis
Agent: component-analyzer
Evaluates:
- Success Output section (20%)
- Completion Checklist (15%)
- When to Use (15%)
- When NOT to Use (15%)
- Anti-Patterns (10%)
- Verification Steps (10%)
- Principles Link (5%)
- Frontmatter Quality (10%)
Output:
- Quality score (A-F grade)
- Gap identification
- Priority recommendations
Phase 3: Enhancement
Agent: component-enhancer
Applies:
- Missing required sections
- Template-based content
- Cross-references
- Standard formatting
Templates:
- Success Output template
- Completion Checklist template
- Anti-Patterns table template
- Principles footer template
Phase 4: Index & Activate
Scripts:
component-indexer.py- Add to databasecomponent_activator.py- Enable in frameworkupdate-component-counts.py- Update inventory
python3 scripts/component-indexer.py -i
python3 scripts/core/ensure_component_registered.py <path>
python3 scripts/update-component-counts.py
Phase 5: Self-Validator Check
Pattern: self-validating-agent-patterns
Checks:
- Does component have associated validator?
- Is validator registered in hooks?
- Does validator pass self-test?
Creates (if missing):
- PostToolUse validator hook
- Validation rules from component spec
- Test cases for validator
Component-Specific Requirements
Standards (CODITECT-STANDARD-*.md)
| Requirement | Weight |
|---|---|
| Clear scope definition | 15% |
| Compliance criteria | 20% |
| Examples for each rule | 15% |
| Validation checklist | 15% |
| Cross-references | 10% |
| Version history | 10% |
| Review schedule | 5% |
| Owner designation | 10% |
Commands (commands/*.md)
| Requirement | Weight |
|---|---|
| Usage examples | 20% |
| Argument documentation | 15% |
| Options table | 15% |
| System prompt | 15% |
| Error handling | 10% |
| Related components | 10% |
| Changelog | 5% |
| Standards compliance | 10% |
Validators (hooks/validators/*.py)
| Requirement | Weight |
|---|---|
| Input/output protocol | 20% |
| Exit code handling | 15% |
| Fail-open policy | 15% |
| Logging | 10% |
| Configuration support | 10% |
| CLI test mode | 10% |
| Documentation | 10% |
| Error handling | 10% |
Execution Commands
Full Workflow
# Run complete validation workflow
/component-improve <path> --full
# Or via agent
/agent component-enhancer "Validate and improve <path>"
Individual Phases
# Phase 1: Structure validation
python3 scripts/validate-component.py <path> --auto-fix
# Phase 2: Quality analysis
/agent component-analyzer "Analyze <path>"
# Phase 3: Enhancement
/agent component-enhancer "Enhance <path>"
# Phase 4: Index and activate
python3 scripts/component-indexer.py -i
python3 scripts/core/ensure_component_registered.py <path>
# Phase 5: Create validator
/agent self-validator-generator "Create validator for <path>"
Success Criteria
Phase 1: Structure valid (no errors)
Phase 2: Quality score >= 80% (Grade B)
Phase 3: All required sections present
Phase 4: Component indexed and activated
Phase 5: Validator exists and passes self-test
Integration Points
| Trigger | Action |
|---|---|
PostToolUse:Write | Auto-validate new .md files in component directories |
PostToolUse:Edit | Re-validate edited components |
/component-create | Run full workflow automatically |
| Git pre-commit | Validate changed components |
Related Components
- Skill:
component-improvement - Skill:
self-validating-agent-patterns - Skill:
self-healing-component-validator - Agent:
component-analyzer - Agent:
component-enhancer - Script:
component-improvement-orchestrator.py - Script:
validate-component.py
Changelog
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2026-01-23 | Initial workflow definition |
Author: Claude Opus 4.5 + Hal Casteel Owner: AZ1.AI INC