Skip to content

Contract Re Engagement Manifest

Reese Hodge edited this page Sep 26, 2026 · 1 revision

Contract: Re-Engagement Manifest

This page mirrors specs/001-max-height-ai-character/contracts/re-engagement-manifest.md. Re-engagements are pre-recorded mid-session idle messages used by Contract-Message-Protocol, separate from the one post-greeting nudge.

File layout

public/
  greetings/
    re-engagements/
      re-engagement-manifest.json
      audio/
        re-engagement-001.mp3
        ...
      video/
        re-engagement-001.mp4
        ...

The source contract requires videoPath for re-engagement entries. Unlike Contract-Greeting-Manifest, this contract has not yet been updated to make video optional/deferred.

Manifest shape

interface ReEngagementManifest {
  version: string;                 // semver
  generatedAt?: string;            // ISO date-time
  voiceConfig?: {
    voiceId: 'Matthew';
    engine: 'neural';
    ssmlPitch?: string;
    ssmlRate?: string;
  };
  reEngagements: ReEngagement[];   // min 12
}

type ReEngagementArchetype =
  | 'SIGNAL_CHECK'
  | 'FAKE_CONCERN'
  | 'RAMBLING_FILL'
  | 'SELF_ENTERTAINMENT'
  | 'MOCK_SIGN_OFF'
  | 'AUDIENCE_ADDRESS';

interface ReEngagement {
  id: string;                      // /^re-engagement-\d{3}$/
  archetype: ReEngagementArchetype;
  text: string;                    // 20-80 words, max 400 chars by schema
  audioPath: string;               // /^audio\/re-engagement-\d{3}\.mp3$/
  audioDurationMs: number;         // 1000-12000
  videoPath: string;               // /^video\/re-engagement-\d{3}\.mp4$/
  weight?: number;                 // 0.0-1.0, default 1.0
}

Selection algorithm

  1. Load re-engagement-manifest.json on app init.
  2. Track usedIds and lastArchetype for the current session.
  3. On idle timer fire with reEngagementCount < 2, filter out used IDs and the last archetype.
  4. Weighted-random select from the remaining pool.
  5. Store selected ID in usedIds and selected archetype in lastArchetype.
  6. If filtering exhausts the pool, relax no-repeat-within-session but keep archetype rotation.
  7. If still exhausted, relax all constraints.

Validation rules

Rule Constraint
Minimum pool at least 12 entries
Archetype coverage at least 2 per archetype
No duplicates id unique
Text 20-80 words target
Audio path MP3 path matches audio/re-engagement-NNN.mp3
Video path MP4 path matches video/re-engagement-NNN.mp4
Duration audioDurationMs from 1000 to 12000

Verified implementation status

packages/frontend/public/greetings/re-engagements/re-engagement-manifest.json contains 12 entries, two per archetype, with all required fields. packages/frontend/src/services/reEngagementSelector.ts implements weighted selection, no-repeat-within-session, archetype rotation, and fallbacks. packages/frontend/src/validation/validateReEngagementManifest.ts validates semver, minimum entries, archetypes, ID/audio/video path patterns, duplicate IDs, and duration range.

The verified manifest exists, but the listed videoPath files were not verified in packages/frontend/public/greetings/re-engagements/video/. Treat video availability as an implementation gap unless the assets are added or the contract is aligned with the greeting video deferral. See Feature-Max-Height-Core and Contract-Greeting-Manifest.

Clone this wiki locally