[cross-feature coupling] agent_loop and tool_implementations import route internals directly #674
Labels
No labels
area:chat
area:core
area:llm
area:routes
area:tools
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sleepy/odysseus#674
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Cross-feature coupling: agent_loop imports routes internals directly
AGENTS.md rule: "No cross-feature dependencies without explicit interfaces."
Violation 1: Route import in agent_loop
src/agent_loop.py:814:This directly imports a private function (
_load_for_user) from the routes layer into the core agent loop. Routes are an HTTP-layer concern; the agent loop is a core logic concern.Violation 2: Service layer import in agent_loop
src/agent_loop.py:820:And
src/agent_loop.py:1012:The agent loop directly instantiates
SkillsManagerinstead of going through an interface.Violation 3: Route import in tool_implementations
src/tool_implementations.pyimports fromroutes.contacts_routes(lines ~3810):Then calls private helpers:
cc._fetch_contacts,cc._create_contact,cc._update_contact,cc._delete_contact.Why this matters
routes.prefs_routeschanges its private API, the agent loop silently breaksSuggested fix
src/services/preferences.py) with typed interfacesFixed via PR #904 — removed private route aliases, expanded contacts_helpers.py as public service facade, updated all callers.