Skip to content

Commit fcd01b4

Browse files
Partha-dev01claude
andcommitted
Reduce all stages to 4 items, stabilize action detection
- Communication: 6 words → 4 words - Preparation: 6 actions → 4 actions (wave, touch_nose, clap, raise_arms) - Action detection: require 8 consecutive frames (was 5) for more stable detection - Adjusted min criteria gates accordingly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c3a98a0 commit fcd01b4

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

app/intake/communication/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default function CommunicationPage() {
6565
const res = await fetch("/api/chat/generate-words", {
6666
method: "POST",
6767
headers: { "Content-Type": "application/json" },
68-
body: JSON.stringify({ ageMonths, count: 6, mode: "words" }),
68+
body: JSON.stringify({ ageMonths, count: 4, mode: "words" }),
6969
});
7070
if (!cancelled && res.ok) {
7171
const data = await res.json();

app/intake/preparation/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ const STEPS = [
1414
];
1515
const STEP_IDX = 5;
1616

17-
const ACTIONS: ActionId[] = ["wave", "touch_nose", "clap", "raise_arms", "touch_head", "touch_ears"];
17+
const ACTIONS: ActionId[] = ["wave", "touch_nose", "clap", "raise_arms"];
1818
const ACTION_TIMEOUT_MS = 15_000;
1919
const SUCCESS_DISPLAY_MS = 1500;
2020
const COUNTDOWN_SECONDS = 3;
21-
const MIN_DETECTED = 3; // Criteria gate
21+
const MIN_DETECTED = 2; // Criteria gate
2222

2323
type Phase = "pre_start" | "active" | "complete";
2424
type ActionPhase = "countdown" | "detecting" | "detected" | "timeout";

app/lib/actions/actionDetector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export function detectAction(
229229

230230
// ── Sustained detection tracker ─────────────────────────────────────
231231

232-
const REQUIRED_CONSECUTIVE = 5;
232+
const REQUIRED_CONSECUTIVE = 8;
233233

234234
export class ActionTracker {
235235
private consecutiveHits = 0;

0 commit comments

Comments
 (0)