feat(scout-templates): set up one scout from a template, after checking its events exist - #307
Draft
sarahxsanders wants to merge 1 commit into
Draft
feat(scout-templates): set up one scout from a template, after checking its events exist#307sarahxsanders wants to merge 1 commit into
sarahxsanders wants to merge 1 commit into
Conversation
…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
🧙 Wizard CIRun 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:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Adds the
scout-templatesskill — a six-step chain that sets up one self-driving scout fromthe PostHog template catalog:
against real project state → 4. offer to instrument missing events → 5. create the scout →
Ships as
role: skill(wizard skill scout-templates). No command is registered; promotion is afollow-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.yamlentry publishing the catalog as a release asset. The agent has no networkreach to posthog.com (GitHub-only sandbox allowlist, no fetch tool), so the skill's
docs_urlsbakes the catalog into the zip at build time and the agent reads it off disk.
npm run buildfails on this branch until PostHog/posthog.com#19145 merges and deploys —the catalog URL 404s today, and
fetchDochas no cache to fall back on for a first fetch, so thewhole 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.zipcontains all six steps +references/self-driving-catalog.md, which isbyte-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).next_step: null) hasneither.
{{> mcp-tool-calling}}and{commandments}expand; no placeholders left.cliEntriesgets onerole: skillentry — listed bywizard skill list, registers no command.npm test139/139,npm run security-scan:skillspassed.The five
[ABORT]strings indescription.mdare matched verbatim wizard-side, so they needcorresponding
abortCaseswhen the command lands.Created with PostHog Code