Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions context/skills/integration-v2/notebook/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ Once `posthog-setup-report.md` exists, mirror it into a shareable PostHog notebo
so the user has an in-app copy to link and comment on. The notebook is an extra
copy, not a replacement — keep the local report file in place.

Call `notebooks-create` through `posthog_exec` with a `title` (e.g.
`PostHog setup (wizard) – <repo name>`) and `content` set to a single markdown
node that wraps the report verbatim:
First `Read` the finished `posthog-setup-report.md` — don't reconstruct the
report from memory, and don't try to read it before the report step has written
it.

Then call `notebooks-create` through `posthog_exec` — that exact tool name, no
tool search needed — with a `title` (e.g. `PostHog setup (wizard) – <repo name>`)
and `content` set to a single markdown node that wraps the report verbatim:

```json
{
Expand All @@ -17,6 +21,13 @@ node that wraps the report verbatim:
}
```

The `markdown` value is a JSON string, so the report's raw contents cannot be
pasted in verbatim: escape every newline as `\n`, every double quote as `\"`,
and every backslash as `\\`, yielding one single-line string. Getting this wrong
is the most common failure in this step — the tool call fails to parse and you
burn attempts re-escaping. If the payload is rejected, fix the escaping; do not
trim or summarize the report to make it fit.

Take the `short_id` from the response, build the URL as
`<host>/project/<project_id>/notebooks/<short_id>`, and emit it on its own line in
your final message with this exact marker so the wizard surfaces it:
Expand Down
5 changes: 4 additions & 1 deletion context/skills/integration-v2/report/description.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Write the setup report

Write `posthog-setup-report.md` at the project root summarizing the integration.
It is a new file you create — write it directly, do not read it first.
When the file doesn't exist, write it directly — don't attempt a read first. If
a previous run left one behind, `Read` it, then replace it wholesale (harnesses
refuse to overwrite a file that wasn't read; nothing in the old report is worth
merging).
Draw on two sources only:

- the run's queue log — `.posthog-wizard-cache/queue.json`, which holds each
Expand Down
Loading