feat(integration-v2): publish the handoff via publish_handoff in one call - #303
Conversation
…call Coordinated with PostHog/wizard, which adds a publish_handoff wizard tool that writes the report file, mirrors it into a PostHog notebook, and pushes handoff_text to the session in one deterministic host-side call. The integration- v2 report step now calls that tool with the full report markdown instead of Write-ing the file and then driving notebooks-create by hand; the notebook step becomes a no-op confirmation. The events-audit notebook step (a richer ProseMirror artifact) is left intact for now as a follow-up. Generated-By: PostHog Code Task-Id: 42ae71e9-0c89-4553-97a6-53c62e784fbb
🧙 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. |
…he notebook skill The wizard now ships a publish_handoff tool: one call takes the full report markdown, mirrors it into a shareable PostHog notebook (direct API, credentials from the wizard session), and publishes it to the wizard session as handoff_text. The notebook is no longer produced by the agent driving notebooks-create through MCP, and no report file is written to the project. - integration-v2-notebook skill: deleted (superseded by the tool). - integration-v2 report agent + skill: compose the report from the run's queue log and event plan, then one publish_handoff call. Write dropped from allowedTools; no [NOTEBOOK_URL] marker. - quack: publishes a short duck report via publish_handoff — the cheap end-to-end test of the tool without a real integration. events-audit's notebook flow (a rich multi-node ProseMirror artifact) is intentionally untouched. Release order: the wizard change (PostHog/wizard#1045) must be released first — skills are fetched at runtime, so this lands only once the tool exists in the field. Generated-By: PostHog Code Task-Id: 42ae71e9-0c89-4553-97a6-53c62e784fbb
…ish_handoff only The wizard's publish_handoff tool now does exactly one thing: publish the report markdown to the wizard session. The notebook stays the agent's job, created via notebooks-create as before. - integration-v2-notebook skill restored; it now takes the composed report markdown directly (there is no file to Read) and keeps the notebooks-create transport and [NOTEBOOK_URL] marker. - integration-v2 report agent + skill: compose the report, one publish_handoff call, then mirror into the notebook. No report file is written; Write stays out of allowedTools. - integration (v1) conclude step: same treatment — compose in memory, publish_handoff, notebook. The local posthog-setup-report.md is gone. - quack: keeps its publish_handoff ending as the cheap end-to-end test, with the notebook claims removed from the tool contract. Release order unchanged: PostHog/wizard#1045 ships the tool first; skills are fetched at runtime, so this lands only after that release. Generated-By: PostHog Code Task-Id: 6316a1d9-7a35-4a2b-8525-566e9931bcac
|
Real run, 1-file Express app, project 228144. This branch's skills + agents served from a local dev server on Notebook created on this path — Second run through the wizard's headless route produced its own: One { "runPhase": "completed", "skillsComplete": true, "newDeps": ["posthog-node"],
"screenPath": ["intro","auth","run","outro","mcp","slack-connect","keep-skills"] } |
| # Compose and publish the setup report | ||
|
|
||
| Compose the full setup report as markdown, then publish it in **one** | ||
| `publish_handoff` call — that call is how the report reaches the user's wizard | ||
| session. Do not write a report file. The same markdown is then mirrored into a | ||
| shareable PostHog notebook (see the notebook skill), whose URL you emit with | ||
| the `[NOTEBOOK_URL]` marker. | ||
|
|
||
| ## Sources |
There was a problem hiding this comment.
we can give it a few test runs to see how it works in prod. but if it works, let's reuse this prompting across all context mill skills
There was a problem hiding this comment.
I have a stacked PR for this. This is also backward compatible for now (we kept the notebooks separate as an agent driven MCP call like before). If we like this direction we can move every skill to this































Problem
The integration handoff relies on a passive path: the agent
Writes a report file into the user's project and a wizard-side watcher mirrors it into the session. The file is an artifact nobody asked for, and the watcher is one more moving part that can drift.Changes
Coordinated with PostHog/wizard#1045, which removes the handoff watcher and adds a
publish_handoffwizard tool — one explicit call that publishes the report markdown to the wizard session. The notebook remains the agent's job, created vianotebooks-createas before.integration-v2report agent + skill: compose the report from the run's queue log and event plan, onepublish_handoffcall, then mirror the same markdown into the notebook ([NOTEBOOK_URL]marker kept). No report file;Writestays out ofallowedTools.integration-v2-notebookskill: retained — now takes the composed report markdown directly instead of reading a file.integration(v1) conclude step: same treatment;posthog-setup-report.mdis no longer written.quack: ends with apublish_handoffcall — the cheap end-to-end test of the tool.events-audit's notebook flow and the self-driving skills are intentionally untouched.Release order
The wizard change (PostHog/wizard#1045) must be released first — skills are fetched at runtime, so this PR lands only once the tool exists in the field.
Test plan
npm test(137 pass) andnpm run build(integration-v2-notebookback in the manifest; the report, conclude, and quack bundles carry the new instructions).Created with PostHog Code