[arch] Break cross-feature coupling: agent code imports route internals #904

Closed
sleepy wants to merge 0 commits from fix/cross-feature-coupling-674 into dev
Owner
No description provided.
Fixes #674.

Violations fixed:
1. prefs_routes: Removed private _load_for_user/_save_for_user/_load/_save
   aliases. All callers already use src.prefs_helpers (public API). Updated
   test monkeypatches to use the public name load_for_user.

2. SkillsManager: No fix needed — services/memory/skills.py is a service
   module, not a route. The existing imports are legitimate per AGENTS.md.

3. contacts_routes: Expanded src/contacts_helpers.py into a proper service
   facade that re-exports fetch_contacts, create_contact, update_contact,
   delete_contact, get_carddav_config as public names. Updated all callers:
   - src/tools/contact_tools.py (was importing routes.contacts_routes as cc)
   - scripts/odysseus-contacts (was importing private functions directly)
   routes/email_helpers.py already used src.contacts_helpers.fetch_contacts.

Behavior unchanged. Tests: 694 pass, 9 fail (same baseline).
sleepy closed this pull request 2026-06-04 03:39:33 +02:00

Pull request closed

Sign in to join this conversation.
No description provided.