[chat] builtin_actions.py at 2194 lines massively exceeds AGENTS.md ~400 line limit #723

Closed
opened 2026-06-03 00:07:25 +02:00 by sleepy · 0 comments
Owner

Problem

src/builtin_actions.py is 2194 lines — 5.5× the AGENTS.md ~400 line limit.

The file is a registry of unrelated scheduled actions, each completely independent:

  1. action_tidy_sessions — session cleanup
  2. action_tidy_documents — document cleanup
  3. action_consolidate_memory — memory dedup (~170 lines alone)
  4. SSH/script execution actions
  5. action_tidy_research — research file cleanup
  6. action_tidy_calendar — calendar dedup (~100 lines)
  7. action_summarize_emails / action_draft_email_replies — email processing
  8. action_classify_events — LLM-based calendar event classification (~160 lines)
  9. action_mark_email_boundaries — email boundary detection (~200 lines)
  10. action_learn_sender_signatures — sender signature learning (~200+ lines)
  11. More actions beyond line 1000 (truncated)

AGENTS.md violations

  • Split files exceeding ~400 lines or containing multiple concerns
  • Each action is a separate domain concern that should live in its own module

Suggested fix

Move each action to its own module under src/builtin_actions/ or src/actions/:

  • tidy_sessions.py, tidy_documents.py, tidy_calendar.py, tidy_research.py
  • memory_consolidate.py
  • ssh_command.py, run_script.py
  • email_actions.py (summarize, draft, boundaries, signatures)
  • calendar_classify.py
  • Keep builtin_actions.py as a thin registry that imports and re-exports
## Problem `src/builtin_actions.py` is 2194 lines — 5.5× the AGENTS.md ~400 line limit. The file is a registry of unrelated scheduled actions, each completely independent: 1. `action_tidy_sessions` — session cleanup 2. `action_tidy_documents` — document cleanup 3. `action_consolidate_memory` — memory dedup (~170 lines alone) 4. SSH/script execution actions 5. `action_tidy_research` — research file cleanup 6. `action_tidy_calendar` — calendar dedup (~100 lines) 7. `action_summarize_emails` / `action_draft_email_replies` — email processing 8. `action_classify_events` — LLM-based calendar event classification (~160 lines) 9. `action_mark_email_boundaries` — email boundary detection (~200 lines) 10. `action_learn_sender_signatures` — sender signature learning (~200+ lines) 11. More actions beyond line 1000 (truncated) ## AGENTS.md violations - **Split files exceeding ~400 lines or containing multiple concerns** - Each action is a separate domain concern that should live in its own module ## Suggested fix Move each action to its own module under `src/builtin_actions/` or `src/actions/`: - `tidy_sessions.py`, `tidy_documents.py`, `tidy_calendar.py`, `tidy_research.py` - `memory_consolidate.py` - `ssh_command.py`, `run_script.py` - `email_actions.py` (summarize, draft, boundaries, signatures) - `calendar_classify.py` - Keep `builtin_actions.py` as a thin registry that imports and re-exports
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/odysseus#723
No description provided.