Skip to content

refactor: retire src/utils through owner-specific deletion slices #2129

Description

@thymikee

Outcome

Retire src/utils through owner-specific deletion slices. This is an umbrella: do not submit one giant move PR. First re-audit current main, publish concrete child issues for each independently reviewable owner slice, then execute only a child issue.

Required child slices

  1. Snapshot presentation policy to cohesive src/snapshot/ submodules.
  2. Host/file/process mechanics through existing host-kit capabilities while retaining app-log, provisioning, transport, update, Swift, and video policy with exact domain owners.
  3. Command/core parsing and validation beside their owning command/runtime modules.
  4. Client/CLI/MCP presentation beside the surface that owns each output.
  5. Proven multi-owner pure primitives into existing package facets only when closure improves.
  6. Terminal deletion of src/utils, stale zone metadata, and a planted-red no-regrowth rule.

Each child must name every source file, exact destination, production importers, focused tests, and blockers. Ambiguous files such as app-log-files.ts, swift-cache.ts, video*.ts, runtime-transport.ts, output.ts, screenshot-result.ts, and timing-safe-equal.ts must not be assigned by filename or Node-builtin heuristics.

Constraints

  • Preserve behavior, output text, wire shape, error codes, timeout/retry semantics, and lazy closure.
  • No utils, common, or shared replacement package/directory.
  • No compatibility shims or internal barrels.
  • Tests move with sources; splits require characterization before changing boundaries.
  • Prefer deletion and consolidation. Across the program, production LOC should decrease; every child PR reports gross additions/deletions and explains unavoidable growth.
  • Before pushing each child: pnpm format and pnpm check:affected --run.

Done criteria

  • Every tracked src/utils file has exactly one accepted owner and child issue.
  • Child issues carry explicit Blocked by: relationships.
  • The final child proves git ls-files 'src/utils/**' is empty and the no-regrowth plant fails by name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions