Repository navigation
docs: propose multi-turn AMD on an effects-based reply gate - #8766
Draft
chenghao-mou wants to merge 5 commits into
Draft
chenghao-mou wants to merge 5 commits into
chenghao-mou wants to merge 5 commits into
Conversation
Port Python's multi-turn answering-machine detection into the voice core as a pure machine stepped inside the session's transitions, behind a per-turn hook seam, so the DST checks its reply decisions under every ordering it explores. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A trait called inside session transitions does not fit the state-machine architecture. AMD now observes session effects and answers each turn's reply gate with turn-keyed inputs. The session holds at commit, drops answers for stale turns and supersedes turns itself, so the protocol is safe under any delivery order the DST explores. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviews found three orders the turn key does not cover: speech that restarts before AMD's silence release lands, completion while a turn is still in its customer hook, and an opening requested after the participant spoke. The session now times the silence hold, checks the opening against its own speech record, and applies a final decision to every turn committed under the gate before it detaches. Decisions key to the commit rather than the park, carry their profile version, and the DST gains liveness and outcome rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… hold Replace the reply profile with a DTMF flag, keep the preemptive generation when the reply's request is unchanged, and record when human_instructions apply. Release a held reply on every completion, let Detach replace decisions not yet applied, and list the spec rules the port keeps unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Detach removes the gate at once and respects a wait category. AMD counts a held reply from the session's silence hold. Preemptive generations never get the DTMF tool and are adopted only without stage instructions or DTMF. The session applying Activated is the activation instant for both sides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposes how to port multi-turn AMD (#6202) into the v2.0 voice core. AMD observes session effects and answers each turn's reply decision with run- and turn-keyed inputs. The session holds at commit, drops stale answers, supersedes turns itself, and keeps live facts local: speech, silence timing, and opening eligibility. The protocol then holds under any interleaving the DST explores. This builds on a63b7c1, which removed the one-shot sidecar.
The proposal also states the machine rules that live in Python's
detector.py, not only in_fsm.py: voicemail, idle, counters, classifier history, and the completed category. A "Ported unchanged" table lists the spec rules that carry over as written, with an owner for each.The proposal differs from Python in these places:
Detachwithout waiting for a customer hook.Review focus: the "proposed" rows in Decisions, and the open questions.
Initial prompt and agent context
Model: Claude Opus 5.5. Claude Fable 5.2 and GPT-6.2 Astra reviewed the hook-trait version, the gate design, and the latest revision. Two audits compared the proposal with
spec/amd.md,tests/test_amd.py, anddetector.pyonmain.🤖 Generated with Claude Code