feat: Add intelligent auto-router and enhanced integrations

- Add intelligent-router.sh hook for automatic agent routing
- Add AUTO-TRIGGER-SUMMARY.md documentation
- Add FINAL-INTEGRATION-SUMMARY.md documentation
- Complete Prometheus integration (6 commands + 4 tools)
- Complete Dexto integration (12 commands + 5 tools)
- Enhanced Ralph with access to all agents
- Fix /clawd command (removed disable-model-invocation)
- Update hooks.json to v5 with intelligent routing
- 291 total skills now available
- All 21 commands with automatic routing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
admin
2026-01-28 00:27:56 +04:00
Unverified
parent 3b128ba3bd
commit b52318eeae
1724 changed files with 351216 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
from unittest.mock import Mock
import pytest
from langgraph.checkpoint.base import BaseCheckpointSaver
from prometheus.docker.base_container import BaseContainer
from prometheus.git.git_repository import GitRepository
from prometheus.lang_graph.subgraphs.bug_fix_verification_subgraph import BugFixVerificationSubgraph
from tests.test_utils.util import FakeListChatWithToolsModel
@pytest.fixture
def mock_container():
return Mock(spec=BaseContainer)
@pytest.fixture
def mock_checkpointer():
return Mock(spec=BaseCheckpointSaver)
@pytest.fixture
def mock_git_repo():
git_repo = Mock(spec=GitRepository)
git_repo.playground_path = "mock/playground/path"
return git_repo
def test_bug_fix_verification_subgraph_basic_initialization(
mock_container,
mock_git_repo,
):
"""Test that BugFixVerificationSubgraph initializes correctly with basic components."""
fake_model = FakeListChatWithToolsModel(responses=[])
subgraph = BugFixVerificationSubgraph(fake_model, mock_container, mock_git_repo)
assert subgraph.subgraph is not None

View File

@@ -0,0 +1,49 @@
from unittest.mock import Mock
import pytest
from prometheus.docker.base_container import BaseContainer
from prometheus.git.git_repository import GitRepository
from prometheus.graph.knowledge_graph import KnowledgeGraph
from prometheus.lang_graph.subgraphs.bug_reproduction_subgraph import BugReproductionSubgraph
from tests.test_utils.util import FakeListChatWithToolsModel
@pytest.fixture
def mock_container():
return Mock(spec=BaseContainer)
@pytest.fixture
def mock_kg():
kg = Mock(spec=KnowledgeGraph)
kg.get_all_ast_node_types.return_value = ["FunctionDef", "ClassDef", "Module", "Import", "Call"]
kg.root_node_id = 0
return kg
@pytest.fixture
def mock_git_repo():
git_repo = Mock(spec=GitRepository)
git_repo.playground_path = "mock/playground/path"
return git_repo
def test_bug_reproduction_subgraph_basic_initialization(mock_container, mock_kg, mock_git_repo):
"""Test that BugReproductionSubgraph initializes correctly with basic components."""
# Initialize fake model with empty responses
fake_advanced_model = FakeListChatWithToolsModel(responses=[])
fake_base_model = FakeListChatWithToolsModel(responses=[])
# Initialize the subgraph
subgraph = BugReproductionSubgraph(
fake_advanced_model,
fake_base_model,
mock_container,
mock_kg,
mock_git_repo,
None,
)
# Verify the subgraph was created
assert subgraph.subgraph is not None

View File

@@ -0,0 +1,47 @@
from unittest.mock import Mock
import pytest
from prometheus.docker.base_container import BaseContainer
from prometheus.graph.knowledge_graph import KnowledgeGraph
from prometheus.lang_graph.subgraphs.build_and_test_subgraph import BuildAndTestSubgraph
from tests.test_utils.util import FakeListChatWithToolsModel
@pytest.fixture
def mock_container():
return Mock(spec=BaseContainer)
@pytest.fixture
def mock_kg():
return Mock(spec=KnowledgeGraph)
def test_build_and_test_subgraph_basic_initialization(mock_container, mock_kg):
"""Test that BuildAndTestSubgraph initializes correctly with basic components."""
# Initialize fake model with empty responses
fake_model = FakeListChatWithToolsModel(responses=[])
# Initialize the subgraph
subgraph = BuildAndTestSubgraph(container=mock_container, model=fake_model, kg=mock_kg)
# Verify the subgraph was created
assert subgraph.subgraph is not None
def test_build_and_test_subgraph_with_commands(mock_container, mock_kg):
"""Test that BuildAndTestSubgraph initializes correctly with build and test commands."""
fake_model = FakeListChatWithToolsModel(responses=[])
build_commands = ["make build"]
test_commands = ["make test"]
subgraph = BuildAndTestSubgraph(
container=mock_container,
model=fake_model,
kg=mock_kg,
build_commands=build_commands,
test_commands=test_commands,
)
assert subgraph.subgraph is not None

View File

@@ -0,0 +1,69 @@
from unittest.mock import Mock
import pytest
from prometheus.docker.base_container import BaseContainer
from prometheus.git.git_repository import GitRepository
from prometheus.graph.knowledge_graph import KnowledgeGraph
from prometheus.lang_graph.subgraphs.issue_bug_subgraph import IssueBugSubgraph
from tests.test_utils.util import FakeListChatWithToolsModel
@pytest.fixture
def mock_container():
return Mock(spec=BaseContainer)
@pytest.fixture
def mock_kg():
kg = Mock(spec=KnowledgeGraph)
# Configure the mock to return a list of AST node types
kg.get_all_ast_node_types.return_value = ["FunctionDef", "ClassDef", "Module", "Import", "Call"]
kg.root_node_id = 0
return kg
@pytest.fixture
def mock_git_repo():
git_repo = Mock(spec=GitRepository)
git_repo.playground_path = "mock/playground/path"
return git_repo
def test_issue_bug_subgraph_basic_initialization(mock_container, mock_kg, mock_git_repo):
"""Test that IssueBugSubgraph initializes correctly with basic components."""
# Initialize fake model with empty responses
fake_advanced_model = FakeListChatWithToolsModel(responses=[])
fake_base_model = FakeListChatWithToolsModel(responses=[])
# Initialize the subgraph with required parameters
subgraph = IssueBugSubgraph(
advanced_model=fake_advanced_model,
base_model=fake_base_model,
container=mock_container,
kg=mock_kg,
git_repo=mock_git_repo,
repository_id=1,
)
# Verify the subgraph was created
assert subgraph.subgraph is not None
def test_issue_bug_subgraph_with_commands(mock_container, mock_kg, mock_git_repo):
"""Test that IssueBugSubgraph initializes correctly with build and test commands."""
fake_advanced_model = FakeListChatWithToolsModel(responses=[])
fake_base_model = FakeListChatWithToolsModel(responses=[])
test_commands = ["make test"]
subgraph = IssueBugSubgraph(
advanced_model=fake_advanced_model,
base_model=fake_base_model,
container=mock_container,
kg=mock_kg,
git_repo=mock_git_repo,
repository_id=1,
test_commands=test_commands,
)
assert subgraph.subgraph is not None

View File

@@ -0,0 +1,45 @@
from unittest.mock import Mock
import pytest
from prometheus.git.git_repository import GitRepository
from prometheus.graph.knowledge_graph import KnowledgeGraph
from prometheus.lang_graph.subgraphs.issue_classification_subgraph import (
IssueClassificationSubgraph,
)
from tests.test_utils.util import FakeListChatWithToolsModel
@pytest.fixture
def mock_kg():
kg = Mock(spec=KnowledgeGraph)
# Configure the mock to return a list of AST node types
kg.get_all_ast_node_types.return_value = ["FunctionDef", "ClassDef", "Module", "Import", "Call"]
kg.root_node_id = 0
return kg
@pytest.fixture
def mock_git_repo():
git_repo = Mock(spec=GitRepository)
git_repo.playground_path = "mock/playground/path"
return git_repo
def test_issue_classification_subgraph_basic_initialization(mock_kg, mock_git_repo):
"""Test that IssueClassificationSubgraph initializes correctly with basic components."""
# Initialize fake model with empty responses
fake_model = FakeListChatWithToolsModel(responses=[])
fake_advanced_model = FakeListChatWithToolsModel(responses=[])
# Initialize the subgraph with required parameters
subgraph = IssueClassificationSubgraph(
advanced_model=fake_advanced_model,
model=fake_model,
kg=mock_kg,
local_path=mock_git_repo.playground_path,
repository_id=1,
)
# Verify the subgraph was created
assert subgraph.subgraph is not None

View File

@@ -0,0 +1,51 @@
from unittest.mock import Mock
import pytest
from prometheus.git.git_repository import GitRepository
from prometheus.graph.knowledge_graph import KnowledgeGraph
from prometheus.lang_graph.subgraphs.issue_documentation_subgraph import (
IssueDocumentationSubgraph,
)
from tests.test_utils.util import FakeListChatWithToolsModel
@pytest.fixture
def mock_kg():
kg = Mock(spec=KnowledgeGraph)
# Configure the mock to return a list of AST node types
kg.get_all_ast_node_types.return_value = [
"FunctionDef",
"ClassDef",
"Module",
"Import",
"Call",
]
kg.root_node_id = 0
return kg
@pytest.fixture
def mock_git_repo():
git_repo = Mock(spec=GitRepository)
git_repo.playground_path = "mock/playground/path"
return git_repo
def test_issue_documentation_subgraph_basic_initialization(mock_kg, mock_git_repo):
"""Test that IssueDocumentationSubgraph initializes correctly with basic components."""
# Initialize fake model with empty responses
fake_advanced_model = FakeListChatWithToolsModel(responses=[])
fake_base_model = FakeListChatWithToolsModel(responses=[])
# Initialize the subgraph with required parameters
subgraph = IssueDocumentationSubgraph(
advanced_model=fake_advanced_model,
base_model=fake_base_model,
kg=mock_kg,
git_repo=mock_git_repo,
repository_id=1,
)
# Verify the subgraph was created
assert subgraph.subgraph is not None

View File

@@ -0,0 +1,49 @@
from unittest.mock import Mock
import pytest
from prometheus.docker.base_container import BaseContainer
from prometheus.git.git_repository import GitRepository
from prometheus.graph.knowledge_graph import KnowledgeGraph
from prometheus.lang_graph.subgraphs.issue_question_subgraph import IssueQuestionSubgraph
from tests.test_utils.util import FakeListChatWithToolsModel
@pytest.fixture
def mock_container():
return Mock(spec=BaseContainer)
@pytest.fixture
def mock_kg():
kg = Mock(spec=KnowledgeGraph)
# Configure the mock to return a list of AST node types
kg.get_all_ast_node_types.return_value = ["FunctionDef", "ClassDef", "Module", "Import", "Call"]
kg.root_node_id = 0
return kg
@pytest.fixture
def mock_git_repo():
git_repo = Mock(spec=GitRepository)
git_repo.playground_path = "mock/playground/path"
return git_repo
def test_issue_question_subgraph_basic_initialization(mock_container, mock_kg, mock_git_repo):
"""Test that IssueQuestionSubgraph initializes correctly with basic components."""
# Initialize fake model with empty responses
fake_advanced_model = FakeListChatWithToolsModel(responses=[])
fake_base_model = FakeListChatWithToolsModel(responses=[])
# Initialize the subgraph with required parameters
subgraph = IssueQuestionSubgraph(
advanced_model=fake_advanced_model,
base_model=fake_base_model,
kg=mock_kg,
git_repo=mock_git_repo,
repository_id=1,
)
# Verify the subgraph was created
assert subgraph.subgraph is not None