Skip to content

J5 analytics, later: UI-only moments and health measures #510

Open

Description

@Jacksondr5

Problem

Every analytics event the server sends to PostHog is upstream's. No code under any src/j5 directory calls AnalyticsService, so we can't see whether A2A, the Inbox, Crews, personas, playbooks, artifacts, skills or the Fleet page are used, or whether they work.

The upstream events also undercount fleet activity. client.turn.requested and client.thread.started fire only when a person sends from the composer over the websocket (apps/server/src/ws.ts). Turns started by an agent-to-agent delivery, an Inbox reply, a spawn_agent brief, a Crew seat launch, a Crew notice, a playbook hand-off, delegate_task or a scheduled task skip that path. They still produce provider.turn.completed, but that event has nothing saying who started the turn or whether it was a Crew seat. "Active use" is therefore composer-only, and gets less representative the more J5 is used.

Decision

Jackson, 2026-10-10: J5 will send its own events, starting with the first cut below.

First cut

Event Fires when Properties (counts, enums, durations only) Answers
j5.turn.started J5 starts a turn without the composer origin (a2a, spawn_brief, crew_seat, playbook_step, notice), senderKind (human, agent, system), steer How much work happens without a human turn; fixes the undercount
j5.fleet.snapshot Periodically running agents, agent-spawned agents, live Crews, largest Crew, open asks to the person and to agents, stuck runs Fleet size and concurrency per install
j5.exchange.closed An Exchange closes or is dropped outcome, receiverKind, urgency, durationMs, crossServer Reply rate, time to reply, how long asks wait in the Inbox
j5.crew.proposal.resolved The person approves or declines a roster or an addition kind, decision, requested and approved seat counts, edit counts, seconds open Approval, edit and decline rates; gate latency
j5.crew.launched Seats are spawned seat count, persona vs custom, per-driver and runtime-mode counts, spawn failure counts Crew size and mix; seat launch failures
j5.playbook.run.finished A run completes or is cancelled outcome, cause, position, stepCount, crewBound, durationMs Completion rate and how far runs get

Constraints

  • Collection boundary (docs/internals/product-analytics.md): no prompts, message bodies, briefs or document contents; no thread, participant, Exchange or Crew IDs; no user- or agent-written text. That rules out Crew, persona, playbook and skill names, artifact paths, Exchange intent, peer labels, and error message strings (send the error tag only).
  • Count once. Most J5 commands are idempotent and several workers re-run at boot. Record on the committed-once branch (for the ledger, a subscriber on LedgerService.subscribeCommitted), not in the service method a retry re-enters.
  • Stay out of upstream's files. Labelling provider.turn.completed with turn origin would mean editing upstream's ingestor, so j5.turn.started is a separate event instead.
  • Opt-out unchanged. J5 events go through AnalyticsService and so honour T3CODE_TELEMETRY_ENABLED=false.
  • Docs ship with the events. The privacy page lists events exhaustively (and already omits the ChatGPT auth events), and docs/user/telemetry.md describes only turn-completion fields. docs/internals/product-analytics.md tells readers to use client.turn.requested for active use; that guidance is upstream's file, so J5's caveat belongs under docs/j5/.

Later

  • UI-only moments (Fleet page opened, expanders, archive warning shown or cancelled) have no route to PostHog, because clients have no analytics call. This needs a small J5-owned client-to-server path; see Move J5's client-facing actions onto WebSocket methods #506 for which transport.
  • Delivery health per provider, MCP tool mix and rejection codes, silence notices, handoff written or missing, artifact reads, skill link targets, archive outcomes, peer pairing and poll failures.

Memos and the Spawning Guide aren't built, and scheduled tasks are upstream's, so none of the three is in scope.

Activity

  1. Jacksondr5 commented on Oct 10, 2026

    @Jacksondr5
    OwnerAuthor

    First cut status, 2026-10-10:

  2. Jacksondr5 commented on Oct 24, 2026

    @Jacksondr5
    OwnerAuthor

    Upstream now has generic feature and tool counting (Jackson, 2026-10-24)

    The 2026-10-24 upstream advance brings three upstream analytics additions, adopted as shipped:

    Decision: J5's person-triggered actions report through feature.used instead of separate j5.* events wherever that fits. J5's client actions are WebSocket RPCs (apps/server/src/j5/wsRpc.ts, a2a/clientActionRpc.ts, agents/agentPersonaRpc.ts, skills/skillCatalogRpc.ts), so a J5-owned allowlist joined to upstream's lookup can count them: Inbox replies, Crew proposal approve, edit and decline, playbook start and cancel, persona assignment, skill install and link, artifact actions, and sharing. That needs one small integration case.

    This lands as its own PR after the advance merges, not inside the advance.

    What stays as j5.* events from the first cut: the things feature.used can't express, because they aren't one person's request:

    • j5.turn.started (turn origin);
    • j5.fleet.snapshot;
    • j5.exchange.closed (outcomes and durations);
    • j5.crew.launched (seat mix);
    • j5.playbook.run.finished (outcomes).

    j5.crew.proposal.resolved may become a feature.used variant, with only its counts and timing left over. Settle that when building.

    The privacy page and docs/user/telemetry.md gain the new upstream data in the advance itself.

  3. Jacksondr5 commented on Oct 28, 2026

    @Jacksondr5
    OwnerAuthor

    The feature.used part of the decision above is now tracked as #766, in the v0.1.3 advance milestone.

  4. Jacksondr5 commented on Nov 7, 2026

    @Jacksondr5
    OwnerAuthor

    Narrowed to the "Later" list (Jackson, 2026-11-06, during the v0.1.7 advance review).

    The first cut shipped. Checked by event name in the code at j5/main 2487e4240f, not in PostHog:

    • j5.turn.started, j5.fleet.snapshot, j5.exchange.closed, j5.crew.launched and j5.playbook.run.finished are sent.
    • j5.crew.proposal.resolved was built as upstream's feature.used with feature crew.proposal.resolve and variant approve or decline (apps/server/src/j5/a2a/CrewProposalService.ts:343). It doesn't carry the requested and approved seat counts, edit counts or time open that the table above listed.
    • feature.used for J5's person-triggered actions shipped in Count J5's person actions through upstream's feature.used #766.

    What remains here:

    • UI-only moments, such as the Fleet page opened, expanders, and an archive warning shown or cancelled. These need a small J5-owned route from the client to the server (Move J5's client-facing actions onto WebSocket methods #506 for the transport).
    • Health measures: delivery health per provider, MCP tool mix and refusal codes, silence notices, handoff written or missing, artifact reads, skill link targets, archive outcomes, and peer pairing and poll failures.
    • Optional: add seat counts, edit counts and time open to Crew proposal decisions, if those rates turn out to matter.

    Claude Opus 5.5

  5. changed the title [-]J5 features send no product analytics, and agent-started turns are invisible in what we do send[/-] [+]J5 analytics, later: UI-only moments and health measures[/+] on Nov 7, 2026
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions