/agent - Universal CODITECT Agent Invoker
Invoke any of the 130+ CODITECT agents by name without needing individual Python wrappers, skills, or complex dispatchers.
System Prompt
⚠️ EXECUTION DIRECTIVE: When the user invokes this command, you MUST:
- IMMEDIATELY execute - no questions, no explanations first
- ALWAYS show full output from script/tool execution
- ALWAYS provide summary after execution completes
DO NOT:
- Say "I don't need to take action" - you ALWAYS execute when invoked
- Ask for confirmation unless
requires_confirmation: truein frontmatter - Skip execution even if it seems redundant - run it anyway
The user invoking the command IS the confirmation.
Usage
/agent <agent-name> <task-description>
Examples
# Git workflow operations
/agent git-workflow-orchestrator sync all submodules to master
# Documentation tasks
/agent codi-documentation-writer update the README.md with new component counts
# Code review
/agent code-reviewer review the changes in src/auth/ for security issues
# Multi-agent coordination
/agent orchestrator coordinate implementation of user authentication feature
# Security audit
/agent security-specialist audit the API endpoints for OWASP vulnerabilities
# DevOps tasks
/agent devops-engineer setup CI/CD pipeline for the frontend module
List Available Agents
/agent --list
Get Agent Info
/agent --info <agent-name>
How It Works
This command uses the universal invocation pattern that bridges CODITECT's 130+ custom agents with Claude Code's Task tool:
/agent <name> <task>
↓
invoke-agent.py reads agents/<name>.md
↓
Extracts system prompt and capabilities
↓
Task(subagent_type="general-purpose",
prompt="You are <agent>. <system_prompt>. Task: <task>")
Key Insight: Claude Code's Task tool has ~52 built-in subagent_type values. CODITECT agents are NOT built-in types. This command uses general-purpose as a proxy, injecting the agent's system prompt into the task prompt.
Architecture
CODITECT Custom Agents (130+) Claude Code Task Tool
├── agents/git-workflow-orchestrator.md subagent_type:
├── agents/codi-documentation-writer.md → - general-purpose (PROXY)
├── agents/orchestrator.md - devops-engineer (built-in)
├── agents/security-specialist.md - cloud-architect (built-in)
└── ... (127 more) - ... (49 more built-in)
↓
invoke-agent.py
↓
Task(subagent_type="general-purpose",
prompt="Use {agent} subagent to {task}...")
When to Use This vs Built-in Agents
| Scenario | Use |
|---|---|
| CODITECT custom agent (130+) | /agent <name> <task> |
| Claude Code built-in agent | Task(subagent_type="<type>") |
| Intelligent multi-agent routing | agent_dispatcher.py |
| Simple single-agent task | /agent or direct Task() |
Available Agent Categories
| Category | Count | Examples |
|---|---|---|
| Development | 25+ | code-reviewer, debugger, frontend-development-agent |
| DevOps | 15+ | devops-engineer, cicd-automation, cloud-architect |
| Documentation | 10+ | codi-documentation-writer, documentation-generation |
| Security | 8+ | security-specialist, penetration-testing-agent |
| QA/Testing | 8+ | codi-qa-specialist, codi-test-engineer |
| Research | 6+ | market-researcher, competitive-analyst |
| Orchestration | 5+ | orchestrator, git-workflow-orchestrator |
Run /agent --list for complete inventory.
Script Location
scripts/core/invoke-agent.py
Direct Script Usage
# From coditect-core root
python3 scripts/core/invoke-agent.py git-workflow-orchestrator "sync all submodules"
python3 scripts/core/invoke-agent.py --list
python3 scripts/core/invoke-agent.py --info orchestrator
python3 scripts/core/invoke-agent.py --json git-workflow-orchestrator "sync all"
Success Output
When agent invocation completes successfully:
✅ COMMAND COMPLETE: /agent <name>
Agent: <agent-name>
Task: <task-description>
Result: Task completed successfully
Completion Checklist
Before marking complete:
- Agent file found and loaded
- System prompt extracted
- Task executed by agent
- Result returned to user
Failure Indicators
This command has FAILED if:
- ❌ Agent file not found in agents/
- ❌ Agent name misspelled
- ❌ Task prompt empty
- ❌ Agent execution timed out
When NOT to Use
Do NOT use when:
- Task matches Claude Code built-in agent (use Task() directly)
- Need multi-agent orchestration (use /agent orchestrator)
- Agent doesn't exist (check with /agent --list first)
Anti-Patterns (Avoid)
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Wrong agent name | File not found | Use /agent --list |
| Empty task prompt | No action taken | Provide clear task description |
| Built-in vs custom confusion | Suboptimal routing | Check if built-in exists first |
Principles
This command embodies:
- #1 Recycle, Extend, Re-Use - Leverages 130+ existing agents
- #4 Separation of Concerns - Each agent has focused capability
- #5 No Assumptions - Verify agent exists before invoking
Full Standard: CODITECT-STANDARD-AUTOMATION.md
Version: 1.0.0 Created: 2025-12-22 Author: CODITECT Team