Skip to main content

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-create command 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 database
  • component_activator.py - Enable in framework
  • update-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)

RequirementWeight
Clear scope definition15%
Compliance criteria20%
Examples for each rule15%
Validation checklist15%
Cross-references10%
Version history10%
Review schedule5%
Owner designation10%

Commands (commands/*.md)

RequirementWeight
Usage examples20%
Argument documentation15%
Options table15%
System prompt15%
Error handling10%
Related components10%
Changelog5%
Standards compliance10%

Validators (hooks/validators/*.py)

RequirementWeight
Input/output protocol20%
Exit code handling15%
Fail-open policy15%
Logging10%
Configuration support10%
CLI test mode10%
Documentation10%
Error handling10%

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

TriggerAction
PostToolUse:WriteAuto-validate new .md files in component directories
PostToolUse:EditRe-validate edited components
/component-createRun full workflow automatically
Git pre-commitValidate changed 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

VersionDateChanges
1.0.02026-01-23Initial workflow definition

Author: Claude Opus 4.5 + Hal Casteel Owner: AZ1.AI INC