From 49bd9d38adbfdfc29fa9e3ffbb7d1496edacc8af Mon Sep 17 00:00:00 2001 From: axiomlogicnexus Date: Wed, 6 May 2026 17:02:50 +0200 Subject: [PATCH] Align recognition replay pressure with coach review continuity --- .../HyperTwistTrainingCoachLibrary.cpp | 26 ++++-- ...ION_REVIEW_CONTINUITY_PACKET_2026-05-06.md | 89 +++++++++++++++++++ 2 files changed, 107 insertions(+), 8 deletions(-) create mode 100644 docs/arch/HYPERTWIST_PHASE4_RECOGNITION_REVIEW_CONTINUITY_PACKET_2026-05-06.md diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp index ef7641e..01a1270 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp @@ -2300,6 +2300,17 @@ namespace HyperTwistTrainingCoachLibraryInternal }); } + bool ShouldPreferRecognitionReplayReview( + const FHyperTwistReplayReviewAnalytics& ReplayReviewAnalytics, + const FHyperTwistRecognitionReplaySummary& RecognitionReplaySummary) + { + return RecognitionReplaySummary.EpisodeCount > 0 + && (RecognitionReplaySummary.AmbiguousEpisodeCount > 0 + || ReplayReviewAnalytics.RecognitionCorrectionCount > 0 + || (RecognitionReplaySummary.AverageCommitConfidence >= 0.0f + && RecognitionReplaySummary.AverageCommitConfidence < 0.7f)); + } + void ApplyPrimarySignalToBrief( FHyperTwistCoachBrief& Brief, const FHyperTwistCoachSignal& PrimarySignal) @@ -2848,11 +2859,9 @@ TArray UHyperTwistTrainingCoachLibrary::DeriveCoachSigna Signals.Add(Signal); } - if (RecognitionReplaySummary.EpisodeCount > 0 - && (RecognitionReplaySummary.AmbiguousEpisodeCount > 0 - || ReplayReviewAnalytics.RecognitionCorrectionCount > 0 - || (RecognitionReplaySummary.AverageCommitConfidence >= 0.0f - && RecognitionReplaySummary.AverageCommitConfidence < 0.7f))) + if (HyperTwistTrainingCoachLibraryInternal::ShouldPreferRecognitionReplayReview( + ReplayReviewAnalytics, + RecognitionReplaySummary)) { const float ConfidencePenalty = RecognitionReplaySummary.AverageCommitConfidence >= 0.0f ? (1.0f - RecognitionReplaySummary.AverageCommitConfidence) * 25.0f @@ -3014,9 +3023,10 @@ FHyperTwistCoachBrief UHyperTwistTrainingCoachLibrary::DeriveCoachBrief( Brief.bNeedsCadenceRecovery = CoachMemorySnapshot.bNeedsCadenceRecovery || CoachMemorySnapshot.bNeedsScheduleFrictionRecovery; Brief.bNeedsVarietyRotation = CoachMemorySnapshot.bNeedsVarietyRotation; - Brief.bPreferRecognitionReplayReview = RecognitionReplaySummary.EpisodeCount > 0 - && (RecognitionReplaySummary.AmbiguousEpisodeCount > 0 - || ReplayReviewAnalytics.RecognitionCorrectionCount > 0); + Brief.bPreferRecognitionReplayReview = + HyperTwistTrainingCoachLibraryInternal::ShouldPreferRecognitionReplayReview( + ReplayReviewAnalytics, + RecognitionReplaySummary); Brief.Signals = DeriveCoachSignals( SessionSummary, diff --git a/docs/arch/HYPERTWIST_PHASE4_RECOGNITION_REVIEW_CONTINUITY_PACKET_2026-05-06.md b/docs/arch/HYPERTWIST_PHASE4_RECOGNITION_REVIEW_CONTINUITY_PACKET_2026-05-06.md new file mode 100644 index 0000000..ca56ab3 --- /dev/null +++ b/docs/arch/HYPERTWIST_PHASE4_RECOGNITION_REVIEW_CONTINUITY_PACKET_2026-05-06.md @@ -0,0 +1,89 @@ +# HyperTwist Phase 4 recognition review continuity packet + +Created on `2026-05-06` + +Status: + +- first-party HyperTwist packet +- bounded Phase `4` replay-to-coach validation slice + +## Purpose + +This packet closes a coherence gap between the already-landed recognition replay signal lane and the coach brief / follow-up lane. + +The open task is: + +- make low-confidence recognition replay cases preserve recognition-review preference all the way into the coach brief and downstream coach consumers + +It is not: + +- a new recognition transport packet +- a dashboard redesign +- a broad coaching heuristic rewrite +- a speech or simulation packet + +## Scope + +Bounded lane: + +- unify the recognition-review preference predicate used by: + - recognition clarity signal derivation + - coach brief derivation +- keep the threshold consistent for: + - ambiguous recognition episodes + - replay correction pressure + - low average commit confidence + +Out of scope: + +- new provider behavior +- frame-submission logic changes +- replay packet schema changes +- broad queue or action-plan redesign + +## Why this was the right next packet + +Before this slice: + +- replay-derived recognition pressure could already emit a `recognition_clarity` coach signal +- ambiguous episodes and correction-heavy replay already propagated into recognition-review preference +- but low-confidence-only replay cases could still diverge: + - the signal lane treated them as recognition pressure + - the brief/follow-up lane did not consistently preserve that recognition-review preference + +So the next honest move was: + +- validate and tighten the replay-to-coach handoff so one recognition-pressure rule drives both signal generation and coach-review preference + +## What landed + +Primary code changes: + +- `UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp` + - added one shared recognition-review preference predicate + - recognition clarity signal derivation now uses that shared predicate + - coach brief derivation now uses the same shared predicate + +## Product effect + +Recognition replay pressure is now more coherent: + +- low-confidence recognition replay cases no longer stop at the signal layer +- the coach brief, action-plan carry-forward, follow-up derivation, and dashboard inspection state now stay aligned with the same recognition-review preference rule +- replay-to-coach validation is stronger without widening the runtime transport lane + +## Acceptance criteria + +- low-confidence recognition replay cases now set recognition-review preference even when ambiguity and correction counts stay at zero +- recognition clarity signal and coach brief use the same predicate +- the packet stays bounded to coach-library replay/brief continuity +- full product build succeeds + +## Validation checklist + +1. build `UnrealHyperTwist.sln` / `UnrealHyperTwistEditor` +2. confirm recognition clarity signal derivation still compiles and retains existing ambiguity/correction behavior +3. confirm coach brief derivation now preserves recognition-review preference for low-confidence replay cases too +4. confirm no recognition transport or dashboard-only packet is reopened + +That is the packet.