async def test_dependency_analysis_triggers_clarification(self, mock_create_model):
        """Test that asking about dependencies without package files triggers clarification"""
        tool = AnalyzeTool()

        # Mock Gemini to request package.json when asked about dependencies
        clarification_json = json.dumps(
            {
                "status": "requires_clarification",
                "question": "I need to see the package.json file to analyze npm dependencies",
                "files_needed": ["package.json", "package-lock.json"],
            }
        )

        mock_model = Mock()
        mock_model.generate_content.return_value = Mock(
            candidates=[Mock(content=Mock(parts=[Mock(text=clarification_json)]))]
        )
        mock_create_model.return_value = mock_model

        # Ask about dependencies with only source files
        result = await tool.execute(
            {
                "files": ["/absolute/path/src/index.js"],
                "question": "What npm packages and versions does this project use?",
            }
        )

        response = json.loads(result[0].text)
        assert (
            response["status"] == "requires_clarification"
        ), "Should request clarification when asked about dependencies without package files"

        clarification = json.loads(response["content"])
        assert "package.json" in str(clarification["files_needed"]), "Should specifically request package.json"
Test that asking about dependencies without package files triggers clarification
tests/test_collaboration.py