Skip to main content

---

title: "Multi Tool Orchestration" component_type: hook version: "1.0.0" audience: contributor status: stable summary: " Multi-Tool Orchestration Hook for CODITECT" keywords: ['analysis', 'backend', 'deployment', 'docker', 'generation'] tokens: ~1500 created: 2025-12-22 updated: 2025-12-22

Multi-Tool Orchestration Hook for CODITECT

Coordinates execution across multiple tools and manages dependencies. Detects when multiple tools work together and ensures proper sequencing. Enables complex workflows like "Create agent → Update inventory → Commit to git → Run tests".

Event: PreToolUse and PostToolUse Matcher: tool_name = "*" (all tools)

File: multi_tool_orchestration.py

Classes

ToolOrchestrator

Orchestrates multi-tool workflows

Functions

main()

Main hook entry point

load_session_state()

Load session state for multi-tool tracking

init_session_state()

Initialize new session state

save_session_state()

Save session state to file

detect_workflow_pattern(tool_name, tool_input)

Detect which workflow pattern this tool is part of

get_workflow_guidance(pattern, tool_name)

Get guidance for next steps in workflow

track_tool_execution(tool_name, tool_input, event)

Track tool execution for workflow analysis

validate_tool_prerequisites(tool_name, previous_tools)

Validate that prerequisite tools have been run

analyze_tool_sequence()

Analyze the sequence of tools used in session

Usage

python multi_tool_orchestration.py