feat(sdm): inject structural dependency mapping tags across codebase

Adds [C: caller] tags to functions/methods and [M: mutation] / [U: usage] tags to class variables based on cross-module call analysis.
This commit is contained in:
2026-05-13 22:35:41 -04:00
parent 5bb3a9026f
commit b5e512f483
110 changed files with 1673 additions and 1008 deletions
+8 -6
View File
@@ -23,7 +23,7 @@ class UserSimAgent:
def wait_to_read(self, text: str) -> None:
"""
[C: simulation/workflow_sim.py:WorkflowSimulator.wait_for_ai_response]
[C: simulation/workflow_sim.py:WorkflowSimulator.wait_for_ai_response]
"""
if self.enable_delays:
delay = self.calculate_reading_delay(text)
@@ -31,7 +31,7 @@ class UserSimAgent:
def wait_to_think(self, probability: float = 0.2, min_delay: float = 2.0, max_delay: float = 5.0) -> None:
"""
[C: simulation/workflow_sim.py:WorkflowSimulator.wait_for_ai_response]
[C: simulation/workflow_sim.py:WorkflowSimulator.wait_for_ai_response]
"""
if self.enable_delays and random.random() < probability:
delay = random.uniform(min_delay, max_delay)
@@ -39,7 +39,7 @@ class UserSimAgent:
def simulate_typing(self, text: str, jitter_range: tuple[float, float] = (0.01, 0.05), batch_typing: bool = False) -> None:
"""
[C: simulation/workflow_sim.py:WorkflowSimulator.run_discussion_turn_async]
[C: simulation/workflow_sim.py:WorkflowSimulator.run_discussion_turn_async]
"""
if not self.enable_delays:
return
@@ -60,8 +60,9 @@ class UserSimAgent:
def generate_response(self, conversation_history: list[dict]) -> str:
"""
Generates a human-like response based on the conversation history.
conversation_history: list of dicts with 'role' and 'content'
Generates a human-like response based on the conversation history.
conversation_history: list of dicts with 'role' and 'content'
[C: simulation/workflow_sim.py:WorkflowSimulator.run_discussion_turn_async]
"""
last_ai_msg = ""
@@ -79,7 +80,8 @@ class UserSimAgent:
def perform_action_with_delay(self, action_func: Callable, *args: Any, **kwargs: Any) -> Any:
"""
Executes an action with a human-like delay if enabled.
Executes an action with a human-like delay if enabled.
[C: tests/test_user_agent.py:test_perform_action_with_delay]
"""
if self.enable_delays: