Skip to content

Add annotated-trace discovery and dataset export workflows #305

Description

@johnnygreco

Objective

Make annotated traces easy to find and gather into dataset-friendly JSON without scraping the UI, so annotations can support self-improvement, skill development, evaluation, and fine-tuning workflows.

Context

Scope

Implementation Notes

The export workflow should include enough context to be useful outside Beacon:

  • session metadata;
  • ordered events/messages used by the annotation target;
  • annotation records with structured fields and note text;
  • source/runtime/provider/model/project fields where available;
  • stable schema version marker.

Possible surfaces include JSON API endpoints, CLI subcommands, and/or MCP read tools. Choose the smallest cohesive surface that satisfies dataset collection without duplicating logic. If a CLI command is added, keep it local and deterministic.

Dashboard/session lists should expose annotation counts or filters where practical so users can discover annotated sessions. The transcript UI should remain the primary authoring surface from #303.

Acceptance Criteria

  • Beacon can list annotated sessions/events through a documented API or command.
  • Users/agents can filter or query for sessions/events with annotations.
  • Beacon can export annotated traces in stable dataset-friendly JSON or JSONL.
  • Export includes session context, ordered event context, annotation metadata, and a schema marker.
  • Export behavior is tested for session-level annotations, event-level annotations, mixed annotations, deleted annotations, and empty results.
  • README or docs explain how to collect annotated trace datasets.

Required Validation

  • make generate-check
  • make fmt-check
  • make test
  • npm run test:frontend if frontend discovery controls change
  • targeted API/CLI/MCP export tests depending on chosen surface

PR Expectations

Open a focused PR against feature/trace-annotations. Include example export output, documented schema notes, and exact validation results. If UI discovery controls are added, include screenshots.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions