Skip to content

feat(agents): add the error-tracking orchestrator flow - #377

Draft
ablaszkiewicz wants to merge 4 commits into
mainfrom
error-tracking-flow
Draft

feat(agents): add the error-tracking orchestrator flow#377
ablaszkiewicz wants to merge 4 commits into
mainfrom
error-tracking-flow

Conversation

@ablaszkiewicz

Copy link
Copy Markdown
Contributor

Problem

The wizard is gaining a one-command error-tracking setup (wizard error-tracking, PostHog/wizard#1185) that installs PostHog first when the repo doesn't have it — the replay-vision pattern. The orchestrator flow backing it needs to live here.

Changes

New flow context/agents/error-tracking/ — nine prompts:

  • setup-error-tracking.md (seed) establishes two facts: is PostHog integrated, and which source-map uploader variant applies (or none, on readable-stack-trace platforms). It then queues one graph: install + init (only when PostHog is missing) → capture-exceptions → the upload subgraph (credentials as a root so the API-key ask reaches the user early, configure after the code edits, wire-ci, test-setup) → report.
  • install / init reuse the integration-v2 step-skills, near-verbatim from replay-vision's.
  • capture-exceptions uses the existing integration-v2-error-tracking-step bundle, adapted from integration-v2's task (verification is the user-driven test-setup step here, not a build task).
  • configure / credentials / wire-ci / test-setup are adapted from the error-tracking-upload-source-maps flow, secret-vault handling included; the seed passes { skillId, displayName } inputs so no task re-detects.
  • report merges the handoffs, enables the Error Tracking product via posthog_exec (non-fatal on failure), and writes posthog-error-tracking-report.md.

Companion PRs: PostHog/wizard#1185 (program + wiring), wizard-workbench (picker registration).

Test plan

  • node scripts/build.js — the flow validates and all nine prompts land in dist/agents/ + agent-menu.json.
  • pnpm test — 173/173.
  • End-to-end against a live app still pending (needs the wizard PR + local stack).

🤖 Generated with Claude Code

https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY

Nine prompts under context/agents/error-tracking/ backing the wizard's
new `error-tracking` command. The seed establishes whether PostHog is
integrated and which uploader variant applies, then queues install/init
(integration-v2 step-skills, like replay-vision) on uninstrumented
repos, exception capture via integration-v2-error-tracking-step, the
source-map subgraph (adapted from the error-tracking-upload-source-maps
flow) where the platform ships minified bundles or stripped binaries,
and a report that merges it all.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci mcp-analytics
  • /wizard-ci replay-vision
  • /wizard-ci revenue
  • /wizard-ci self-driving
  • /wizard-ci warehouse
  • /wizard-ci warehouse-seeded

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/groq
  • /wizard-ci ai-observability/manual-capture
Show more apps
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/flutter
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci replay-vision/javascript-node
  • /wizard-ci replay-vision/next-js
  • /wizard-ci replay-vision/react-vite
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit
  • /wizard-ci warehouse/monorepo-env
  • /wizard-ci warehouse/multi-source-next
  • /wizard-ci warehouse/stripe-node
  • /wizard-ci warehouse/zero-source
  • /wizard-ci warehouse-seeded/next-stripe
  • /wizard-ci warehouse-seeded/next-stripe-declined

Test against a wizard branch:

  • /wizard-ci all wizard:my-branch

Add wizard:<branch> to any command above to pin the wizard branch. It defaults to main.

Results will be posted here when complete.

ablaszkiewicz and others added 3 commits September 1, 2026 18:21
…ness

install/init move terra→sol low, capture-exceptions terra low→sol
medium. Pairs with the wizard binding change routing the program to the
orchestrator on pi; seed stays terra and report stays luna, matching
the metrics flow's pattern.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
…nager

A configure run in a pnpm workspace copied the docs' npm install and
npm hard-fails on workspace:* deps (EUNSUPPORTEDPROTOCOL); the agent
retried npm three ways and never switched. New skill bullet: detect the
manager from the lockfile, translate the docs' npm commands, and read
EUNSUPPORTEDPROTOCOL as wrong-manager, never a flag to retry. The
error-tracking flow's configure task now also mandates
detect_package_manager before the first install. Verified: the pnpm
monorepo fixture run that failed now completes 4/4, recovering to
`pnpm add -D` on first contact with the error.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
…anning

A seed run saw "PostHog already integrated" and enqueued only
capture+report, never applying the uploader precedence to a tsc-built
Node service — while an identical sibling fixture planned the full
graph. The two facts are now declared independent, a compiled/bundled
JS project is explicitly never "none", and the success criteria demand
the plan state the uploader decision (or the readable-stack reason)
explicitly. Verified: the fixture that under-planned now queues the
full node-uploader graph and completes 5/5.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant