[claude] Add ResearchOrchestrator pipeline (#975) #1000

Closed
Rockachopa wants to merge 1 commits from claude/issue-975 into main
Owner

Fixes #975

Summary

  • Implements ResearchOrchestrator class in src/timmy/research.py with full 7-step pipeline:
    1. Check local knowledge — semantic memory cache (confidence > 0.85 returns instantly)
    2. Generate queries — LLM produces 8-12 diverse search queries
    3. Search — concurrent web search with deduplication
    4. Fetch — top 10 pages fetched concurrently
    5. Synthesize — structured report via LLM cascade
    6. Crystallize — store result in semantic memory for future cache hits
    7. Write artifact — create Gitea issues from extracted action items
  • Graceful degradation at every step (missing tools, LLM errors, memory failures)
  • MemoryInterface and ResearchTools abstractions for dependency injection
  • Metrics tracking: research_cache_hit, research_api_call
  • Convenience run_research() function wiring cascade router singleton
  • 25 unit tests covering all pipeline steps, cache hits, error handling, and Gitea integration

Test plan

  • All 25 new tests pass (tox -e unit -- tests/unit/test_research.py)
  • No regressions in existing test suite (pre-existing calm/tools failures unchanged)
  • Integration test with live Ollama and web tools (P1 follow-up)
Fixes #975 ## Summary - Implements `ResearchOrchestrator` class in `src/timmy/research.py` with full 7-step pipeline: 1. **Check local knowledge** — semantic memory cache (confidence > 0.85 returns instantly) 2. **Generate queries** — LLM produces 8-12 diverse search queries 3. **Search** — concurrent web search with deduplication 4. **Fetch** — top 10 pages fetched concurrently 5. **Synthesize** — structured report via LLM cascade 6. **Crystallize** — store result in semantic memory for future cache hits 7. **Write artifact** — create Gitea issues from extracted action items - Graceful degradation at every step (missing tools, LLM errors, memory failures) - `MemoryInterface` and `ResearchTools` abstractions for dependency injection - Metrics tracking: `research_cache_hit`, `research_api_call` - Convenience `run_research()` function wiring cascade router singleton - 25 unit tests covering all pipeline steps, cache hits, error handling, and Gitea integration ## Test plan - [x] All 25 new tests pass (`tox -e unit -- tests/unit/test_research.py`) - [x] No regressions in existing test suite (pre-existing calm/tools failures unchanged) - [ ] Integration test with live Ollama and web tools (P1 follow-up)
Rockachopa added 1 commit 2026-03-22 22:44:40 +00:00
feat: add ResearchOrchestrator pipeline (src/timmy/research.py)
Some checks failed
Tests / lint (pull_request) Failing after 4s
Tests / test (pull_request) Has been skipped
03f9a42fbc
Implements autonomous research pipeline that chains:
- Check local knowledge (semantic memory cache, confidence > 0.85)
- Generate queries via LLM cascade
- Web search (concurrent, deduplicated)
- Fetch top pages
- Synthesize structured report via LLM
- Crystallize results in semantic memory
- Write artifact (create Gitea issues from action items)

Includes full unit test suite (25 tests) covering all pipeline steps,
cache hits, graceful degradation, and Gitea integration.

Fixes #975

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Timmy closed this pull request 2026-03-23 15:11:35 +00:00
Owner

[loop-cycle-5] Closing — large feature PR from a previous agent session. Lines of code are a liability. Features need smaller, tested increments. Reopen linked issue if still wanted.

[loop-cycle-5] Closing — large feature PR from a previous agent session. Lines of code are a liability. Features need smaller, tested increments. Reopen linked issue if still wanted.
Some checks failed
Tests / lint (pull_request) Failing after 4s
Tests / test (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1000