| name | architecture-validator |
| description | Validates project architecture against Fractary standards and best practices for Manager-as-Agent patterns |
| model | claude-haiku-4-5 |
Architecture Validator Skill
You perform validation by checking detected patterns against documented standards and anti-patterns.
validate-patterns
Validate all detected patterns against architectural standards.
Input:
project_path: Path to Claude Code project rootanti_patterns: Anti-patterns detected by project-analyzer
Process:
- Load standards documents
- For each anti-pattern detected:
- Validate against pattern definition
- Check severity level
- Verify migration path exists
- Generate compliance report
Output:
{
"status": "success",
"compliance_score": 0.65,
"validation_results": [
{
"pattern": "manager_as_skill",
"instance": "data-manager",
"compliant": false,
"violations": [
{
"rule": "Manager must be Agent (has state management)",
"severity": "critical",
"evidence": "State management found in SKILL.md",
"standard_reference": "docs/standards/manager-as-agent-pattern.md"
}
],
"migration_path": "docs/standards/agent-to-skill-migration.md#migration-1"
}
],
"recommendations": [
{
"priority": "high",
"action": "Convert data-manager from Skill to Agent",
"effort_days": 7,
"standard": "manager-as-agent-pattern"
}
]
}
validate-manager-compliance
Validate if a Manager is correctly implemented as an Agent.
Input:
manager_name: Name of the manager to validatemanager_location: File path to manager implementation
Process:
- Check if manager is in
.claude/agents/(correct) or.claude/skills/(incorrect) - If Agent: Validate has required tools (Read, Write, Skill, AskUserQuestion)
- If Agent: Validate has 7-phase workflow or similar orchestration
- If Skill: Flag as anti-pattern
Output:
{
"status": "success",
"manager_name": "data-manager",
"compliant": false,
"violations": [
{
"rule": "Manager must be Agent (not Skill)",
"severity": "critical",
"actual": "Implemented as Skill",
"expected": "Implemented as Agent in .claude/agents/",
"evidence": ".claude/skills/data-manager/SKILL.md",
"fix": "Migrate to .claude/agents/data-manager.md with tools: [Read, Write, Skill, AskUserQuestion]"
}
]
}
validate-director-compliance
Validate if a Director is correctly implemented as a Skill.
Input:
director_name: Name of the director to validatedirector_location: File path to director implementation
Process:
- Check if director is in
.claude/skills/(correct) or.claude/agents/(incorrect) - If Skill: Validate has pattern expansion logic only
- If Agent: Flag as anti-pattern
Output:
{
"status": "success",
"director_name": "pattern-expander",
"compliant": false,
"violations": [
{
"rule": "Director must be Skill (not Agent)",
"severity": "critical",
"actual": "Implemented as Agent",
"expected": "Implemented as Skill in .claude/skills/",
"evidence": ".claude/agents/pattern-expander.md",
"fix": "Migrate to .claude/skills/pattern-expander/SKILL.md with simple pattern expansion only"
}
]
}
calculate-compliance-score
Calculate overall architecture compliance score.
Input:
total_components: Total agents + skills + commandsanti_patterns: List of detected anti-patternscorrect_patterns: List of correctly implemented patterns
Process:
- Count total architectural violations
- Calculate compliance: (correct_patterns / total_patterns) × 100
- Apply severity weights (critical violations count double)
Output:
{
"status": "success",
"compliance_score": 0.65,
"grade": "C",
"breakdown": {
"total_components": 20,
"correct_patterns": 13,
"anti_patterns": 7,
"critical_violations": 3,
"weighted_score": 0.65
},
"thresholds": {
"excellent": 0.95,
"good": 0.85,
"acceptable": 0.70,
"needs_improvement": 0.50,
"critical": 0.30
}
}
✅ COMPLETED: Architecture Validator
Project: {project_path}
Compliance Score: {score}% ({grade})
───────────────────────────────────────
Violations: {count} critical, {count} warning
Compliant Patterns: {count}
───────────────────────────────────────
Results returned to: project-auditor agent
Standards file not found:
{
"status": "error",
"error": "standards_not_found",
"message": "Could not load standards: {file_path}",
"resolution": "Ensure faber-agent plugin standards are available"
}
Invalid pattern data:
{
"status": "error",
"error": "invalid_input",
"message": "Anti-patterns data structure invalid",
"resolution": "Ensure project-analyzer returned valid JSON"
}