Files
2026-05-27 23:29:53 +01:00

1.6 KiB

Capability Spec Delta: audio-transport (audio-shipped-file-size-cleanup)

Package: @suaveplan/audio-transport Status: PROPOSED

Every requirement below carries a **Verified by:** line at authoring time. No exceptions.

MODIFIED Requirements

Requirement: Transport source modules respect the 300-line cap

The Transport implementation MUST be split such that no single .ts file under src/transport/ exceeds the 300-line hard cap. The public class export from @suaveplan/audio-transport SHALL remain Transport with its existing constructor signature, public methods, and observable behavior (clock injection, BPM + time-signature + PPQ state, tick advance, lookahead scheduling, schedule/cancel, loop region, swing, tempo automation). Internal helper modules MAY be added under src/transport/ but SHALL NOT appear in the package.json exports map.

Scenario: every transport source file is at or under the 300-line cap

  • WHEN find packages/audio/audio-transport/src/transport -name "*.ts" ! -name "*.test.ts" | xargs awk 'END { if (NR > 300) print FILENAME, NR }' is run
  • THEN the output is empty

Scenario: public Transport surface is unchanged

  • WHEN a consumer imports Transport from @suaveplan/audio-transport and exercises every public method documented in src/transport/transport.md
  • THEN every method exists with its existing signature and returns the existing shape

Verified by: tests/exports.test.ts::"Transport surface is byte-identical to pre-split" AND tests/file-size.test.ts::"every transport src file is under 300 lines"