Commit Graph

7 Commits

Author SHA1 Message Date
opencode controller
9600839bf7 spec+plan(slice-4): revise trigger source — local VAD primary, advisory secondary
All checks were successful
CI / fmt (pull_request) Successful in 1m40s
CI / clippy (pull_request) Successful in 2m31s
CI / test (1.85) (pull_request) Successful in 5m28s
CI / test (stable) (pull_request) Successful in 6m34s
CI / deny (pull_request) Successful in 2m9s
Responds to the 2026-07-01 adversarial review's load-bearing finding:
advisory-only puts the brain round-trip in the barge-in trigger path,
contradicting wedge #1 (README:98-100, ARCHITECTURE.md:79-81).

Spec changes:
- §1.1: LocalVadReflex<P> added to scope as primary trigger
- §1.2: local VAD tuning framework deferred (the VAD itself in scope)
- §3.4: new — LocalVadReflex design (RMS, debounce, observe-then-delegate)
- §5.1: data flow shows local VAD as primary (≤80ms, zero brain round-trip);
  brain advisory as secondary (confirms ~300ms later)
- §6.1: 'Why advisory-only' → 'Why both, local VAD primary' (revised rationale)
- §7: done-criteria 5-12 (added LocalVadReflex unit tests + two e2e paths)

Plan changes:
- Task 2b: new — LocalVadReflex<P> + 6 unit tests
- Task 5: spawn_tap_engine signature revised (takes advisory_tx parameter;
  media thread owns the channel; two senders via tokio mpsc Sender Clone)
- Task 6: Connected spawn site wires LocalVadReflex<Reflex<TapAudioPipe>>
- Task 9: two e2e cases — PRIMARY (kill WITHOUT brain, wedge #1 proof) +
  SECONDARY (advisory backstop)
- Self-review: wedge-#1 audit line added — Task 9 step 1 is the proof

DCO signoff added per AGENTS.md (commit -s).

Signed-off-by: opencode controller <controller@local>
2026-07-01 20:21:38 -04:00
opencode controller
69d5feef59 plan(slice-4): barge-in implementation plan (10 tasks, TDD-stepped)
All checks were successful
CI / fmt (pull_request) Successful in 1m38s
CI / clippy (pull_request) Successful in 2m30s
CI / test (1.85) (pull_request) Successful in 5m28s
CI / test (stable) (pull_request) Successful in 6m7s
CI / deny (pull_request) Successful in 2m6s
Structured for multi-agent dispatch per AGENTS.md 5-rule parallelism:
Task 1 = critical-path foundation (AdvisoryEvent + ReflexMetrics +
barge_in_flush trait) — nothing else parallelizes until it lands.
Tasks 2-5 depend on Task 1 (Reflex state machine, barge_in_flush
override, advisory_tx threading, spawn_tap_engine return). Task 6 =
MediaThread (depends on 2+5). Task 7 = session_map rewire (depends on
6). Task 8 = MockRealtimeBrain schedule (parallelizable after 5).
Task 9 = barge e2e (depends on 6+7+8). Task 10 = CI seam gate.
2026-07-01 20:07:42 -04:00
c30a45232d Slice 3 — OpenAI Realtime brain: swap echo for the brain (#4)
All checks were successful
CI / fmt (push) Successful in 1m40s
CI / clippy (push) Successful in 2m24s
CI / test (1.85) (push) Successful in 5m8s
CI / test (stable) (push) Successful in 5m20s
CI / deny (push) Successful in 1m34s
2026-07-01 22:25:09 +00:00
opencode controller
3b7b0d6459 docs: propagate rutster-trunk rename + repo URL through plans/specs/DEVELOPMENT
Mechanical propagation of the crate rename ( rutster-signaling-sip →
rutster-trunk ) and the repo URL fix ( github.com/anomalyco →
git.adlee.work/alee ) through the documents that name them:

- docs/DEVELOPMENT.md: crate-layout sketch + stub-crate description.
- docs/superpowers/plans/2026-06-28-slice-1-webrtc-loopback.md: the
  workspace members list in the plan's binding-values section —
  repository URL updated.
- docs/superpowers/plans/2026-06-28-slice-2-agent-tap.md: workspace
  members list in binding-values + crate-layout sketch in the file-
  structure section (rutster-signaling-sip → rutster-trunk).
- docs/superpowers/specs/2026-06-28-slice-2-agent-tap-design.md: §2.1
  workspace-layout sketch's STUB crate-row.

No content changes beyond the substitutions; the slice-2 spec/plan
body (protocol, TapAudioPipe, TapClient, TapEngine, lifecycle, done-
  criteria) is untouched.
2026-06-29 20:27:01 -04:00
opencode controller
22d3f03b8c plan(slice-2): agent tap implementation plan (spec §1.1)
8 TDD tasks, 53 checkbox steps, sequentially dependent:
1. Workspace deps + rutster-tap-echo skeleton (build foundation)
2. Tap wire protocol (spec §3) — JSON envelope, explicit LE PCM codec
3. TapMetrics + TapAudioPipe (spec §4.1) — the seam object
4. TapClient WSS pump loop (spec §4.2) — async WS pump + seq gap detection
5. Rust echo brain crate (spec §2.3) — stereotype binary + in-process EchoServer
6. Call-model TapHandle + Channel field (spec §5.2, §6)
7. Binary wiring — TapEngine + session_map + routes + main (spec §5.1, §7)
8. Integration test + Python echo brain + LEARNING.md (spec §8.4, §8.5 #7)

Plan self-reviewed: no placeholders; TapHandle::new visibility fixed
(pub(crate) → pub); spawn_tap_engine return shape fixed (returns
(TapAudioPipe, TapConn) tuple, not TapConn holding the pipe's mpsc).

Spec ref: 2026-06-28-slice-2-agent-tap-design.md (commit f83bca9).
2026-06-28 13:54:57 -04:00
adlee-was-taken
8260c76824 toolchain: bump pinned Rust 1.80 → 1.85 (edition 2024 floor)
uuid 1.x → getrandom 0.4.x requires edition = "2024", stabilized in Rust 1.85.
The Task 1 pin of 1.80 was written when uuid 1.x resolved to a getrandom that
still compiled on edition 2021; the resolution has shifted. The brief said
'confirm the latest stable at impl time' — bumping the pin is faithful to that.

Plan doc's Task 6 CI matrix also updated: [stable, "1.85"].

Cross-task correction in response to Task 2 implementer's DONE_WITH_CONCERNS
escalation; not a Task 2 code change.
2026-06-28 11:29:46 -04:00
adlee-was-taken
3c5cc75015 plan(slice-1): adversarial review patches
Verified str0m 0.21 + opus 0.3.1 API surfaces via docs.rs subagents;
patched the plan with the real signatures and several design-level fixes.

API-surface patches (str0m 0.21, verified):
- Global Constraints: full verified API surface documented inline
  (Rtc::new takes Instant; SdpOffer::from_sdp_string is the entry
  point, NOT from_str_unchecked; add_local_candidate returns
  Option<&Candidate>; Writer::write takes rtp_time not media_time;
  MediaTime has no add(Duration) -> use mt + MediaTime::from(d);
  payload_params returns impl Iterator; MediaData.data is Arc<[u8]>).
- Task 4 accept_offer: rewritten with from_sdp_string + correct error
  mapping; RtcSessionError::SdpOffer changed to String (collapses parse
  + accept failures uniformly).
- Task 4 loop_driver: MediaTime::add -> + MediaTime::from(Duration);
  media.data deref coercion documented.

Design-level patches:
- Task 4: RtcSession::new_for_test -> pub fn new() (single idiomatic
  constructor, no test/prod split).
- Task 4: added accept_offer_transitions_channel_to_connecting test
  (the transition was claimed but untested in the original plan).
- Task 5: dropped reqwest from workspace deps (unused — integration
  test uses tower::ServiceExt::oneshot); added tower as workspace dep
  + binary crate dev-dependency.
- Task 5: removed duplicate DELETE /v1/sessions route (was incorrectly
  chained via .delete() on the collection route AND on /v1/sessions/:id
  — only the latter is correct).
- Task 5: clarified pub mod requirement (must be pub because the
  integration test references modules via absolute paths).
- Global Constraints: added task/PR strategy (one commit per task,
  merged in numeric order, granular history is load-bearing for the
  learning-codebase goal).

Self-review section updated to reflect the patches.

Plan is now implementation-ready.
2026-06-28 11:19:41 -04:00