Skip to content

feat(scout-templates): set up one scout from a template, after checking its events exist - #307

Draft
sarahxsanders wants to merge 1 commit into
mainfrom
posthog-code/scout-templates-skill
Draft

feat(scout-templates): set up one scout from a template, after checking its events exist#307
sarahxsanders wants to merge 1 commit into
mainfrom
posthog-code/scout-templates-skill

Conversation

@sarahxsanders

Copy link
Copy Markdown
Collaborator

Changes

Adds the scout-templates skill — a six-step chain that sets up one self-driving scout from
the PostHog template catalog:

  1. read the catalog + project state → 2. pick a template → 3. check the scout's prerequisites
    against real project state
    → 4. offer to instrument missing events → 5. create the scout →
  2. write a report.

Ships as role: skill (wizard skill scout-templates). No command is registered; promotion is a
follow-up once the shape has held.

Why: the web catalog already has an "Add this scout" button. What it can't do is notice the
scout watches events this project never sends — that scout doesn't fail loudly, it runs on schedule
forever, finds nothing, and spends an LLM run every tick. Step 3 is the whole point of the skill.

Also adds a docs.yaml entry publishing the catalog as a release asset. The agent has no network
reach to posthog.com (GitHub-only sandbox allowlist, no fetch tool), so the skill's docs_urls
bakes the catalog into the zip at build time and the agent reads it off disk.

⚠️ Blocked on posthog.com

npm run build fails on this branch until PostHog/posthog.com#19145 merges and deploys —
the catalog URL 404s today, and fetchDoc has no cache to fall back on for a first fetch, so the
whole build exits 1. Don't merge before then.

For reviewers

Verified by seeding the doc cache with the real catalog (generated by the emitter on the
posthog.com branch) and building green:

  • scout-templates.zip contains all six steps + references/self-driving-catalog.md, which is
    byte-identical to the emitter's output — and is exactly the path step 1 tells the agent to read.
  • {workflow} renders all six steps with "Start here" on step 1; the catalog is correctly excluded
    (no next_step).
  • Preamble injected and continuation link appended on steps 1–5; step 6 (next_step: null) has
    neither.
  • {{> mcp-tool-calling}} and {commandments} expand; no placeholders left.
  • cliEntries gets one role: skill entry — listed by wizard skill list, registers no command.
  • npm test 139/139, npm run security-scan:skills passed.

The five [ABORT] strings in description.md are matched verbatim wizard-side, so they need
corresponding abortCases when the command lands.


Created with PostHog Code

…ng its events exist

Adds the `scout-templates` skill: a six-step chain that picks one self-driving scout
template from the PostHog catalog, checks whether the project actually emits the events
that scout reads, offers to instrument what's missing, tailors the scout to what's really
there, and creates it.

The catalog lives on posthog.com as machine-readable frontmatter. The agent has no network
reach to it — the wizard's sandbox allowlist is GitHub-only and there is no fetch tool — so
the skill's `docs_urls` bakes the catalog into the zip at build time and the agent reads it
off disk. A `docs.yaml` entry publishes the same file as a release asset for other consumers.

Ships as `role: skill`, reachable via `wizard skill scout-templates`. Promotion to a
top-level command is a follow-up, once the shape has held.

The step that justifies the skill is step 3. The web catalog already has an "Add this
scout" button; what it can't do is notice that the scout watches events this project never
sends. That scout doesn't fail loudly — it runs on schedule forever, finds nothing, and
spends an LLM run every tick. Step 3 classifies each prerequisite (event-shaped,
product-in-use, integration, warehouse source), checks each against real project state, and
only the event-shaped class is fixable from inside a repo — which is precisely the class a
button can't reach. It also separates "defined but not firing" from "present", a difference
invisible in the PostHog UI and fatal to a scout.

Generated-By: PostHog Code
Task-Id: 68eb63f5-f67a-4882-a824-b800399344c4
@github-actions

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 basic-integration
  • /wizard-ci mcp-analytics
  • /wizard-ci revenue
  • /wizard-ci self-driving

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /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 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

Results will be posted here when complete.

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