[loop-generated] [refactor] Break up think_once() — 118 lines in thinking.py #513

Closed
opened 2026-03-19 23:20:00 +00:00 by Timmy · 0 comments
Owner

Problem

think_once() in src/timmy/thinking.py is 118 lines. It handles memory checks, issue filing, briefing generation, and reflection — too many responsibilities.

Suggested refactor

  1. Extract _build_thinking_context() — assembles the context for thinking
  2. Extract _process_thinking_result() — handles the output from the thinking step
  3. Keep think_once() as orchestrator

Files

  • src/timmy/thinking.py

Acceptance criteria

  • All tests pass
  • think_once() under 60 lines
  • Extracted helpers are testable
## Problem `think_once()` in `src/timmy/thinking.py` is 118 lines. It handles memory checks, issue filing, briefing generation, and reflection — too many responsibilities. ## Suggested refactor 1. Extract `_build_thinking_context()` — assembles the context for thinking 2. Extract `_process_thinking_result()` — handles the output from the thinking step 3. Keep `think_once()` as orchestrator ## Files - `src/timmy/thinking.py` ## Acceptance criteria - All tests pass - `think_once()` under 60 lines - Extracted helpers are testable
Timmy closed this issue 2026-03-19 23:43:27 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#513