Skip to content

arch: codebase architecture improvements #1741

@bug-ops

Description

@bug-ops

Overview

Architectural review identified several structural issues affecting maintainability, testability, and idiomatic Rust compliance. This epic tracks all findings as a cohesive improvement effort.

Child Issues

Priority Issue Category
P1 #1731 — Decompose Agent struct (40+ fields god object) arch
P1 #1732 — Remove anyhow from zeph-core library crate arch
P2 #1735 — Split config/types.rs (3331 lines) into domain modules refactor
P2 #1736 — Split semantic.rs (3335 lines) into sub-modules refactor
P3 #1737 — Box large LoopbackEvent variants to reduce enum size arch
P3 #1733 — Replace async-trait in search_code.rs tech-debt
P4 #1734 — Reduce 55 clippy::too_many_lines suppressions refactor

Positive Findings

  • Crate dependency graph is acyclic with clean domain boundaries
  • Native async traits (Edition 2024) used consistently in core traits
  • Feature gates are additive-only and correctly structured
  • Error handling: thiserror in library crates, typed error enums with good coverage

Acceptance Criteria

Notes

  • Pre-v1.0.0: no backward compatibility required, clean rewrites preferred
  • Each child issue should be a separate PR on its own branch (feat/mXX/arch-*)

Metadata

Metadata

Assignees

No one assigned

    Labels

    archArchitecture and designrefactorCode refactoring without functional changestech-debtTechnical debt

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions