Skip to content

Deep refactoring v2: type safety, error consistency, further decomposition #282

@bug-ops

Description

@bug-ops

Overview

Second-pass architectural refactoring after epic #268. Focuses on remaining type safety, error consistency, and further decomposition.

Plan: .local/plan/refactoring-plan-v2.md

Issues

Phase 1 — Quick wins (parallel) ✅

Phase 2 — Core improvements ✅

Phase 3 — Cleanup

Phase 4 — Typed agent errors

Dependency Graph

#283 (EmbedFuture) ──┐
                     ├──► #288 (remove anyhow)
#286 (Channel err) ──┘

#287 (mod.rs decomp) ──► #289 (field grouping)

#288, #289 ──► #293 (AgentError)

#284, #285, #290 — independent

Deferred (confirmed)

Item Reason
File watcher dedup (R3.2) ~40 LOC each, stable
blake3 shared (R3.3) Only one crate now
Test mock consolidation (R3.4) Mocks legitimately differ
Embedder trait (R5.2) Superseded by EmbedFn
Embedding newtype (R6.2) No confusion risk

Metrics

Priority Count Est.
P1 6 ~20h
P2 3 ~5h
Total 9 ~25h

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicMilestone-level tracking issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions