-
Notifications
You must be signed in to change notification settings - Fork 0
Split events.py into per-domain event modules #110
Copy link
Copy link
Closed
Labels
prio:mediumShould do, but not blockingShould do, but not blockingscope:medium1-3 days of work1-3 days of workscope:smallLess than 1 day of workLess than 1 day of workspec:architectureDESIGN_SPEC Section 15 - Technical ArchitectureDESIGN_SPEC Section 15 - Technical Architecturetype:refactorCode restructuring, cleanupCode restructuring, cleanup
Milestone
Description
Problem
observability/events.py is a single 141-line file containing ~50 event constants across 8+ domains (config, provider, task, template, routing, budget, tool, prompt). Every module that logs events imports from this one file.
As M3+ adds more domains (agent execution, communication, memory, HR, security), this will grow to 200+ constants in a single file — hard to navigate, easy to miss naming conflicts, and poor locality.
Proposed Solution
Split into per-domain modules under observability/events/:
observability/events/
__init__.py # re-exports everything for backward compatibility
config.py # CONFIG_* constants
provider.py # PROVIDER_* constants
routing.py # ROUTING_* constants
budget.py # BUDGET_* constants
tool.py # TOOL_* constants
task.py # TASK_* constants
template.py # TEMPLATE_* constants
prompt.py # PROMPT_* constants
role.py # ROLE_* constants
The __init__.py re-exports all constants so existing imports continue working:
from ai_company.observability.events.config import * # noqa: F403
from ai_company.observability.events.provider import * # noqa: F403
# etc.Modules can then import only what they need:
from ai_company.observability.events.provider import PROVIDER_CALL_STARTAcceptance Criteria
- Event constants split into per-domain modules under
observability/events/ -
observability/events/__init__.pyre-exports all constants - All existing imports continue to work unchanged
- No functional changes — pure file reorganization
- All tests pass
- Update CLAUDE.md logging convention to reference per-domain modules (already done in M2.5 doc update — verify still accurate)
- Verify DESIGN_SPEC.md §15.3 observability structure remains consistent after implementation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
prio:mediumShould do, but not blockingShould do, but not blockingscope:medium1-3 days of work1-3 days of workscope:smallLess than 1 day of workLess than 1 day of workspec:architectureDESIGN_SPEC Section 15 - Technical ArchitectureDESIGN_SPEC Section 15 - Technical Architecturetype:refactorCode restructuring, cleanupCode restructuring, cleanup