terraphim / terraphim/terraphim-ai
[Architecture][P2] Phase 2: Decompose terraphim_service by capability
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 62
- Forks
- 5
- Avg merge
- 2h 27m
- Merged PRs (30d)
- 1
Description
Parent: https://github.com/terraphim/terraphim-ai/issues/520
Related plan: docs/architecture-improvement-plan.md
Goal
Decompose terraphim_service into capability-focused modules with stable trait boundaries so logic is reusable and easier to test.
Deliverables
- Capability modules for:
- search service
- KG/thesaurus service
- document service
- LLM/chat service
- Stable crate facade with explicit interfaces and reduced monolithic
lib.rs
Tasks
- Split branching workflows into strategy objects or focused modules
- Introduce typed service interfaces for integration and adapter reuse
- Keep external API compatibility while refactoring internals
- Add isolated tests per capability module
Acceptance Criteria
crates/terraphim_service/src/lib.rsis primarily a facade/wiring layer- Each service capability has isolated tests and explicit dependency boundaries
- Existing public consumers compile with no behavioral regression
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read docs/architecture-improvement-plan.md and inspect crates/terraphim_service/src/lib.rs to map the existing workflows and public consumers. Define capability boundaries and isolated tests for each listed service while preserving external API compatibility; done means lib.rs is mainly facade wiring, boundaries are explicit, and existing consumers compile without behavioral regression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100