3.3 KiB
3.3 KiB
Tasks — enterprise-react-audio-stream-session-core (chunk A)
0. Pre-flight (non-negotiable)
- 0.1 Confirm clean working tree (
git statusreports nothing) and no in-flight worktrees with uncommitted work (git worktree listthengit statusin each) - 0.2 Account for every
.claude/worktrees/*entry; prune stale ones viabun scripts/worktree-prune.ts --remove. - 0.3 Confirm
MANIFEST.mdmatchesfind packages -maxdepth 3 -name package.json | wc -l.
1. Package shell
- 1.1
package.json(workspace:^ deps:@suaveplan/audio-fx-plugin-base,@suaveplan/fsm,@suaveplan/events,@suaveplan/error,@suaveplan/types,@suaveplan/opentelemetry,@suaveplan/audio-transport,@suaveplan/react-audio; react 19 peer;catalog:formszod;catalog:statezustand) - 1.2
tsconfig.lib.json,vite.config.ts,vitest.config.tsviacreateTestConfig()(forks, fileParallelism:false) - 1.3 Subpath exports —
.,./session,./error-codesonly for now - 1.4
README.mdwith quickstart + roadmap noting chunks B/C/D
2. Error codes
- 2.1
src/error-codes/error-codes.ts— 7REACT_AUDIO_STREAM.*codes viadefineCodes - 2.2
src/error-codes/error-codes.types.ts,.test.ts,.md,index.ts
3. FSM
- 3.1
src/session/session-fsm/session-fsm.ts— 7-state machine via@suaveplan/fsm - 3.2
src/session/session-fsm/session-fsm.types.ts,.test.ts,.md,index.ts
4. StreamSession
- 4.1
src/session/stream-session/stream-session.ts— class wrapping FSM, injectable transport adapter contractStreamTransportAdapter - 4.2
src/session/stream-session/stream-session.types.ts,.test.ts,.md,index.ts - 4.3 Tests cover: happy path (8 state-changed events), illegal transition throws
INVALID_STATE,interruptionemission, peer-stream-added/removed events
5. InterruptionClassifier
- 5.1
src/session/interruption-classifier/interruption-classifier.ts - 5.2
.types.ts,.test.ts,.md,index.ts
6. StreamSourcePlugin
- 6.1
src/session/stream-source-plugin/stream-source-plugin.ts— implementsAudioFxPlugin,io.inputs[0].count === 0,setSourceStream(MediaStream) - 6.2
.types.ts,.test.ts,.md,index.ts
7. Telemetry
- 7.1
src/telemetry/telemetry.ts— 6 OTel instruments (2 counters + gauge + 2 counters + histogram per spec) - 7.2
.test.ts,.md,index.ts
8. Tests
- 8.1 Per-feature
.test.tscovering every scenario in the spec subset - 8.2
tests/purity.test.ts— built dist references no audio context - 8.3 Every
it(...)carries{ timeout: 5000 }(30000 async)
9. Documentation
- 9.1 Sibling
.mdper implementation.ts(≥200 words, basic + advanced examples) - 9.2 README links every co-located
.mdunder## Modules
10. Pre-archive verification
- 10.1
bunx turbo lint typecheck test --filter=@suaveplan/react-audio-stream— green - 10.2
bunx turbo test:coverage --filter=@suaveplan/react-audio-stream— 100/100/100/100 on touched modules
11. Hand-off (no archive yet)
- 11.1 Commit on
feat/react-audio-stream-session-core. Spec fold + archive of the parententerprise-react-audio-streamfolder happens after chunk D merges; this chunk does NOT archive.