Skip to content

Debugger Surface

Plan Metadata

  • Plan type: plan
  • Parent plan: N/A
  • Depends on:
  • wearables-integration.md
  • memory-upload-flow.md
  • memory-feed.md
  • frontend-logging.md
  • Status: draft

Status semantics: - draft: Plan is being created or updated and is not final. - approved: Plan is approved but not yet applied in code. - documentation: Code currently exists and matches the plan contract.

Update rule: - When an existing plan is edited, set status to draft until re-approved.

System Intent

  • What is being built: Basic debugger UI contract that maps each visible action button to the owning plan it validates.
  • Primary consumer(s): main/app/app/debugger.tsx and main/app/components/Debugger.tsx.
  • Boundary (black-box scope only): User-triggered debug actions and their intended plan ownership, not the internal implementation details of those downstream systems.

Stage Gate Tracker

  • [x] Stage 1 Mermaid approved
  • [x] Stage 2 I/O contracts approved
  • [x] Stage 3 pseudocode/technical details approved or skipped

1. Mermaid Diagram

Reference: .agent/skills/create-mermaid-diagram/SKILL.md

flowchart TD
  A[Debugger Screen - main/app/app/debugger.tsx] --> B[Debugger Buttons - main/app/components/Debugger.tsx]
  B -->|device registration stream controls| C[Wearables Integration Boundary - docs/plans/wearables-integration.md]
  B -->|upload debug recording/random video| D[Memory Upload Flow Boundary - docs/plans/memory-upload-flow.md]
  B -->|read resulting memory feed state| E[Memory Feed Boundary - docs/plans/memory-feed.md]
  B -->|emit debug telemetry| F[Frontend Logging Boundary - docs/plans/frontend-logging.md]

2. Black-Box Inputs and Outputs

Keep this short. Define types in JSON-style blocks and capture each flow with path-level rows. - Flow naming rule: each flow uses this format: - ### Flow: `<flowname>` - - Test files: <path/to/test_file.ext>, ... (or N/A when no automated test is required) - - Core files: <path/to/core_file.ext>, ... - N/A means explicit no-test-required waiver for that flow (not a missing mapping).

Global Types

Define shared types used across multiple flows.

DebuggerButtonPress {
  button_label: string
}

DebuggerActionResult {
  success: boolean
  logging_step?: string
}

PlanLink {
  plan_file: string
}

Flow: main/app/app/debugger.tsx.DebuggerScreen

  • Test files: N/A
  • Core files: main/app/app/debugger.tsx

Type Definitions

DebuggerScreenInput {
  route: "/debugger"
}

DebuggerScreenOutput {
  title: "Debugger"
  has_back_button: boolean
}

Paths

path-name input output/expected state change path-type notes updated
debugger-screen.render DebuggerScreenInput DebuggerScreenOutput title=Debugger has_back_button=true happy path wraps the debugger component in flow=debugger logging context Y
debugger-screen.back DebuggerScreenInput user presses back icon DebuggerScreenOutput unchanged subpath returns to previous route Y

Flow: main/app/components/Debugger.tsx.Debugger

  • Test files: N/A
  • Core files: main/app/components/Debugger.tsx

Type Definitions

DebuggerButtonsInput {
  press: DebuggerButtonPress
}

DebuggerButtonsOutput {
  result: DebuggerActionResult
  validated_plan: PlanLink
}

Paths

path-name input output/expected state change path-type notes updated
debugger-button.initialize DebuggerButtonsInput button_label=Initialize DebuggerButtonsOutput result.success=true validated_plan=wearables-integration.md happy path validates wearable SDK initialization surface Y
debugger-button.check-for-device DebuggerButtonsInput button_label=Check for device DebuggerButtonsOutput result.success=true validated_plan=wearables-integration.md happy path validates device-availability probe surface Y
debugger-button.get-device-debug-info DebuggerButtonsInput button_label=Get Device Debug Info DebuggerButtonsOutput result.success=true validated_plan=wearables-integration.md happy path validates debug-info fetch from wearable bridge Y
debugger-button.register-device DebuggerButtonsInput button_label=Register Device DebuggerButtonsOutput result.success=true validated_plan=wearables-integration.md happy path validates registration flow Y
debugger-button.unregister-device DebuggerButtonsInput button_label=Unregister Device DebuggerButtonsOutput result.success=true validated_plan=wearables-integration.md happy path validates unregistration flow Y
debugger-button.start-stream-session DebuggerButtonsInput button_label=start stream session DebuggerButtonsOutput result.success=true validated_plan=wearables-integration.md happy path validates streaming session start Y
debugger-button.stop-stream-session DebuggerButtonsInput button_label=stop stream session DebuggerButtonsOutput result.success=true validated_plan=wearables-integration.md happy path validates streaming session stop Y
debugger-button.start-recording-stream DebuggerButtonsInput button_label=start recording stream DebuggerButtonsOutput result.success=true validated_plan=wearables-integration.md happy path validates recording start path and debug logging Y
debugger-button.stop-recording-stream DebuggerButtonsInput button_label=stop recording stream DebuggerButtonsOutput result.success=true validated_plan=wearables-integration.md happy path validates recording stop path and local path state update Y
debugger-button.upload-last-recording DebuggerButtonsInput button_label=save last recording to s3 DebuggerButtonsOutput result.success=true validated_plan=memory-upload-flow.md happy path validates debug upload via useCreateNewMemory Y
debugger-button.upload-text-random-video DebuggerButtonsInput button_label=upload text + random video to s3 DebuggerButtonsOutput result.success=true validated_plan=memory-upload-flow.md happy path validates multi-part upload contract and logging Y

3. Pseudocode / Technical Details for Critical Flows (Optional)

  • Flow name:: debugger-button-to-plan-map
    render debugger action list
    for each button press:
      call matching debug action
      record logging step
      treat action as validation entry point for the mapped owning plan
    
  • Implementation notes:
  • This plan intentionally stays simple and button-oriented.
  • Downstream behavior belongs to the linked plans and can evolve without changing this mapping intent.

After all stages are approved, apply .agent/skills/reconcile-plans/SKILL.md to propagate contract updates across linked plans.