Skip to content

EPIC: Abstraction Level Improvements #1977

@bug-ops

Description

@bug-ops

Problem

  • Agent struct fields all pub(super) — no encapsulation within 30-file module tree
  • AgentSessionConfig exposes 25+ internal implementation detail fields
  • MessagePart serialization includes internal variants (ThinkingBlock, Compaction)
  • zeph-tools re-exports nearly everything (40+ types)
  • LLM providers have inconsistent constructor patterns
  • Error enums all have Other(String) catch-alls

Goal

Tighten abstraction boundaries, reduce public API surface, and improve encapsulation.

Audit Reference

.local/audit/005-abstraction-violations.md

Key Issues

  • ABS-01: AgentSessionConfig field visibility
  • ABS-02: Sanitizer types at zeph-core root
  • ABS-03: zeph-tools re-export surface too wide
  • ABS-04: Agent pub(super) field encapsulation
  • ABS-05: MessagePart internal variant exposure
  • ABS-06: AgentSessionConfig leaks implementation details
  • ABS-07: Agent builder required field validation
  • ABS-08: LLM provider constructor consistency
  • ABS-09: Error Other(String) catch-all reduction

Acceptance Criteria

  • Agent state accessed via accessor methods (not direct field access)
  • MessagePart internal variants hidden behind serde attribute
  • At least 2 LLM providers use consistent builder pattern
  • All tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureArchitecture improvementsepicMilestone-level tracking issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions