This document tracks readability risk and safe refactor slices.
- package boundaries are responsibility-oriented (
session,audio,riva,output,indicator) - state/FSM logic is separated from most I/O adapters
- test coverage is broad enough to support behavior-preserving extraction
Large handwritten files still carry higher review/refactor risk:
internal/config/parser.gointernal/audio/pulse.gointernal/app/app.gointernal/riva/client.gointernal/pipeline/transcriber.gointernal/session/session.go
Generated code is out of scope for these thresholds.
internal/config/parser.go- isolate token/scalar helpers
- isolate vocab block parser
internal/audio/pulse.go- separate device selection from capture loop
internal/app/app.go- split command dispatch, IPC forwarding, runtime bootstrap
internal/riva/client.go- split stream lifecycle from segment merge helpers
internal/pipeline/transcriber.go- split debug artifact writers from orchestration
internal/session/session.go- isolate transition handling from commit/result assembly
- soft target: handwritten files near
<= 250LOC - files above
~350LOC need an explicit extraction note inPLAN.md - extract in small slices with tests first