Generated: 2025-12-23 10:22:31
| Function | File | Complexity | Nesting Depth | Risk |
|---|---|---|---|---|
| _get_where_clauses | agent\tools\product_search_helpers.py | 7 | 2 | low |
| data_retrieval_tool | agent\tools\data_retrieval_tool.py | 6 | 2 | low |
| CANIFAGraph._agent_node | agent\graph.py | 5 | 4 | low |
| CANIFAGraph._should_continue | agent\graph.py | 5 | 1 | low |
✓ No dead code detected
Code fragments grouped by similarity
| File | Lines | Size |
|---|---|---|
| agent\graph.py | 105-136 | 32 lines |
| agent\tools\product_search_helpers.py | 13-55 | 43 lines |
Coupling Between Objects (CBO) metrics
| Class | File | CBO | Risk Level | Dependent Classes |
|---|---|---|---|---|
| AgentState | agent\models.py | 3 | low | TypedDict, BaseMessage, add_messages |
| CANIFAGraph | agent\graph.py | 1 | low | BaseChatModel |
| QueryRequest | agent\models.py | 1 | low | BaseModel |
| SearchParams | agent\tools\data_retrieval_tool.py | 1 | low | BaseModel |
Project-wide module dependency graph metrics
All modules have acyclic dependency relationships.
| # | Depth | Path |
|---|---|---|
| 1 | 5 | agent.controller → agent.graph → agent.tools.get_tools → agent.tools.data_retrieval_tool → agent.tools.product_search_helpers |
| 2 | 4 | agent.controller → agent.graph → agent.tools.get_tools → agent.tools.data_retrieval_tool |
| 3 | 4 | agent.controller → agent.graph → agent.tools.get_tools → agent.tools.customer_info_tool |
| 4 | 4 | agent.graph → agent.tools.get_tools → agent.tools.data_retrieval_tool → agent.tools.product_search_helpers |
| 5 | 3 | agent.controller → agent.graph → agent.prompt |
| 6 | 3 | agent.controller → agent.graph → agent.tools.get_tools |
| 7 | 3 | agent.controller → agent.graph → agent.models |
| 8 | 3 | agent.graph → agent.tools.get_tools → agent.tools.data_retrieval_tool |
| 9 | 3 | agent.graph → agent.tools.get_tools → agent.tools.customer_info_tool |
| 10 | 3 | agent.tools.get_tools → agent.tools.data_retrieval_tool → agent.tools.product_search_helpers |
| Severity | Rule | From | To |
|---|---|---|---|
| warning | strict_mode | agent.controller | agent.graph |
| warning | strict_mode | agent.controller | agent.memory |
| warning | strict_mode | agent.graph | agent.models |
| warning | strict_mode | agent.graph | agent.prompt |
| warning | strict_mode | agent.graph | agent.tools.get_tools |
| warning | strict_mode | agent.nodes | agent |
| warning | strict_mode | agent.tools.data_retrieval_tool | agent.tools.product_search_helpers |
| warning | strict_mode | agent.tools.get_tools | agent.tools.customer_info_tool |
| warning | strict_mode | agent.tools.get_tools | agent.tools.data_retrieval_tool |