Skip to main content

CODITECT Agent Validation Test Suite

Comprehensive tests to verify all 130+ agents have correct configuration, valid frontmatter, proper invocation patterns, and can be loaded by invoke-agent.py.

Run: python3 scripts/tests/test_agents.py python3 scripts/tests/test_agents.py -v # Verbose python3 scripts/tests/test_agents.py --agent git-workflow-orchestrator # Single agent

Author: CODITECT Team Version: 1.0.0 Created: 2025-12-22

File: test_agents.py

Classes

Colors

No description

TestResult

Result of a single test

AgentValidation

Validation results for an agent

AgentTestSuite

Comprehensive test suite for CODITECT agents

Functions

main()

No description

log(message, level)

Log message with color

parse_frontmatter(content)

Parse YAML frontmatter from markdown content

test_frontmatter_required_fields(frontmatter, agent_name)

Test that required frontmatter fields are present

Test that recommended frontmatter fields are present

test_component_type(frontmatter, agent_name)

Test that component_type is 'agent'

test_valid_status(frontmatter, agent_name)

Test that status is a valid value

test_valid_model(frontmatter, agent_name)

Test that model is a valid value if specified

test_invocation_pattern(frontmatter, agent_name)

Test that invocation_pattern uses correct format

test_has_system_prompt(body, agent_name)

Test that agent has a system prompt (body content)

test_no_placeholder_content(content, agent_name)

Test that agent doesn't have placeholder content

test_title_matches_filename(frontmatter, agent_name)

Test that title somewhat matches the filename

validate_agent(agent_path)

Run all validation tests on a single agent

run_all_tests(single_agent)

Run tests on all agents or a single agent

Print test summary

Usage

python test_agents.py