diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 2848573..7f0d66d 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -12,7 +12,7 @@ "displayName": "PostHog", "source": "./", "description": "Access PostHog analytics, feature flags, experiments, error tracking, and insights directly from your AI coding tool. Optionally capture Claude Code sessions to PostHog LLM Analytics.", - "version": "1.1.62", + "version": "1.1.63", "author": { "name": "PostHog", "email": "hey@posthog.com", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 5325958..9fcd8e8 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "posthog", "description": "Access PostHog analytics, feature flags, experiments, error tracking, and insights directly from your AI coding tool. Optionally capture Claude Code sessions to PostHog LLM Analytics.", - "version": "1.1.62", + "version": "1.1.63", "author": { "name": "PostHog", "email": "hey@posthog.com", diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 6638b86..31d5083 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "posthog", - "version": "1.0.60", + "version": "1.0.61", "description": "Access PostHog analytics, feature flags, experiments, error tracking, and insights directly from Codex", "author": { "name": "PostHog", diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json index a7c8457..40137c8 100644 --- a/.cursor-plugin/plugin.json +++ b/.cursor-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "posthog", "displayName": "PostHog", - "version": "1.1.56", + "version": "1.1.57", "description": "Access PostHog analytics, feature flags, experiments, error tracking, and insights directly from Cursor", "author": { "name": "PostHog", diff --git a/gemini-extension.json b/gemini-extension.json index cd26fe2..bd00d13 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "posthog", - "version": "1.0.58", + "version": "1.0.59", "description": "Access PostHog analytics, feature flags, experiments, error tracking, and insights directly from Gemini CLI", "mcpServers": { "posthog": { diff --git a/skills/authoring-scouts/SKILL.md b/skills/authoring-scouts/SKILL.md index 72a09ad..50d659e 100644 --- a/skills/authoring-scouts/SKILL.md +++ b/skills/authoring-scouts/SKILL.md @@ -127,6 +127,13 @@ For an **existing scout**, tune with `posthog:scout-config-update` (find the `id A scout whose reports nobody engages with (no open, rating, or action — the cloud web inbox records reads; other clients don't yet) is warned and then paused automatically (`pause_reason=ignored`) — every run costs a sandbox agent, so a scout producing output no human consumes shouldn't keep running forever. A scout that is merely quiet is only flagged (`pause_reason=no_output`, a warning that never advances to a pause), since a watch scout's silence can be its job. `-config-list` shows the warning as `status=pending_pause` and the pause as `status=paused_by_system`; setting `enabled=true` again resumes the scout with a fresh grace window before the sweep may judge it again. Set `auto_pause_exempt=true` up front for a watchdog scout whose whole job is to stay quiet, so it never even picks up the quiet flag. +- `write_scopes` — defaults to `[]`: the scout reads the project and writes only what every scout writes (its findings, its memory, and notebooks). + Grant `dashboard:write`, `insight:write`, `annotation:write`, or `alert:write` to a scout whose job is to **maintain** one of those things rather than only describe what it would change. + Each scope is project-wide and covers update and delete of every object of its kind, not only the ones the scout made, so grant only what the scout's body actually tends, and say in the body what it may change and when. + Only the person the scout's runs act as (whoever authored it) or a project admin can set the field, and grants are activity-logged. A scoped API key must itself carry each scope it grants. + A granted scout is told in its run prompt which objects it may change, and is asked to name every change in its close-out. The grant is an upper bound: the acting user's own permissions still apply to each object, and the scout reports a refused write rather than retrying it. + A dry run (`emit: false`) never holds the grant, so a scout can be previewed without it changing anything. + Applies from the scout's next run. - `tags` — free-form labels grouping the fleet, e.g. `["revenue", "on-call"]`. Up to 10 per scout, normalized to lowercase kebab-case (`On Call` → `on-call`) and deduped. Set them at create time: a scout that lands already grouped saves a follow-up edit, and the desktop app's scout list filters on them. Prefer a tag that already exists on the fleet (`-config-list` shows every scout's tags) over minting a near-duplicate — `revenue` and `revenue-analytics` fragment the same group. diff --git a/skills/authoring-scouts/references/dedupe-and-memory.md b/skills/authoring-scouts/references/dedupe-and-memory.md index ff2ae9f..7cf0595 100644 --- a/skills/authoring-scouts/references/dedupe-and-memory.md +++ b/skills/authoring-scouts/references/dedupe-and-memory.md @@ -10,7 +10,7 @@ Every scout classifies each candidate finding against prior runs, the inbox, and Bake this classifier into the scout's Decide section: 1. **Net new** — no prior run mentions the topic, no inbox report and no scratchpad entry covers it. → Author a report via `emit_report` if it clears the report bar (see [`report-contract.md`](report-contract.md)). -2. **Material update on an existing live report** — a live report already covers the topic (one this scout authored last run, or a pipeline report), but there's new evidence (a different corroborating source, a fresh deploy correlation, contradicting data, a meaningful escalation in scope). → **`edit_report` it** — `append_note` with the fresh evidence, or rewrite `title`/`summary` on a report the scout authored. +2. **Material update on an existing live report** — a live report already covers the topic (one this scout authored last run, or a pipeline report), but there's new evidence (a different corroborating source, a fresh deploy correlation, contradicting data, a meaningful escalation in scope). → **`edit_report` it** — use `append_evidence` for the new observation, `append_note` for a reading of it, or rewrite `title`/`summary` on a report the scout authored. Don't mint a near-duplicate. **Live reports only:** `edit_report` never changes a report's status, so if the prior report is suppressed or resolved and the issue is genuinely back, author a **fresh** report (citing the prior `report_id` in the summary) rather than editing a closed one nobody will see. 3. **Same fact already covered** — an existing report already captures the same evidence shape, nothing has changed. → Skip. diff --git a/skills/authoring-scouts/references/report-contract.md b/skills/authoring-scouts/references/report-contract.md index 5b945f5..6d60b59 100644 --- a/skills/authoring-scouts/references/report-contract.md +++ b/skills/authoring-scouts/references/report-contract.md @@ -231,15 +231,21 @@ The fleet's reviewer map should compound over time. ## `edit_report` — update an existing report -Rewrite `title`/`summary`, append a note, set `suggested_reviewers`, and/or replace `charts` / `suggested_prompts` on a report that already exists. -Pass `run_id` (the current run) and `report_id`, plus at least one of `title`, `summary`, `append_note`, `suggested_reviewers`, `charts`, `suggested_prompts`. -An edit that supplies content (`title`, `summary`, `charts`, `suggested_prompts`, `append_note`, or a reviewer `reason`) passes the same safety judge as `emit_report`; an unsafe edit is rejected whole and the report keeps what it had. +Rewrite `title`/`summary`, append evidence or a note, set `suggested_reviewers`, and/or replace `charts` / `suggested_prompts` on a report that already exists. +Pass `run_id` (the current run) and `report_id`, plus at least one of `title`, `summary`, `append_note`, `append_evidence`, `suggested_reviewers`, `charts`, `suggested_prompts`. +An edit that supplies content (`title`, `summary`, `charts`, `suggested_prompts`, `append_note`, `append_evidence`, or a reviewer `reason`) passes the same safety judge as `emit_report`; an unsafe edit is rejected whole and the report keeps what it had. `edit_report` can target **any** of the team's inbox reports — not just ones a scout authored. That makes it the right tool when a later run learns something about a report the pipeline (or another scout) created. Rules of good behavior: -- **Prefer `append_note` over rewriting** `title`/`summary` on a report you didn't author. +- Use **`append_evidence`** for a new observation that a reader can check. + It takes the same `{description, source_id}` items as `emit_report`, and each one lands in the report's evidence rail as a bound signal, so the report's `signal_count` and `total_weight` grow with it. +- Use **`append_note`** for commentary — a reading of the report that adds nothing to check, such as the owning team already knowing, or a deploy having fixed it. + Send both in one call when an observation needs a reading alongside it. +- **A recovery is a note, not evidence.** `signal_count` and `total_weight` only grow, and both feed the inbox ranking, so evidence that an issue is over would rank the report as stronger. +- **At the cap, the note is the channel that still lands.** Emit plus every append share the report's **50** evidence rows, and the grouping pipeline can raise the count too, so a long-lived report can fill up. An append past the cap is rejected and the report keeps what it had. +- Prefer these additive fields over rewriting `title`/`summary` on a report you didn't author. A note is additive and audit-friendly (it carries your scout as the author); a rewrite silently overwrites a human- or pipeline-authored headline. - **Don't fight an in-flight pipeline.** A report the summary/research workflow is mid-run on can have its fields overwritten under you. If a report is actively being worked, append a note rather than rewriting. diff --git a/skills/authoring-scouts/references/scout-patterns.md b/skills/authoring-scouts/references/scout-patterns.md index 003827a..4307179 100644 --- a/skills/authoring-scouts/references/scout-patterns.md +++ b/skills/authoring-scouts/references/scout-patterns.md @@ -390,8 +390,8 @@ So the trigger for this pattern is any of: **a judgment with more than one axis* - **Bound what you write for non-candidates.** "Record which axis failed" is right for items that are close, and ruinous as a blanket rule on a busy queue — one `remember` call per rejected item can spend the run before the real candidates get read. Persist a **state transition** (an item that changed axis since last run) or a capped set of near-misses, and roll the rest into one aggregate backlog entry. - **Close the loop on what you filed — and know what closing it can and cannot do.** A "ready to pick up" report is wrong the moment someone picks it up, and it costs a person duplicating work already underway. - Re-check each `report:` entry every run and `edit_report` once the item is assigned, PR-linked, or closed — but note that `edit_report` mutates `title`, `summary`, `append_note`, `suggested_reviewers`, `charts`, and `suggested_prompts` **only**. - It cannot change status or actionability, so an appended note does not retire the report. + Re-check each `report:` entry every run and `edit_report` once the item is assigned, PR-linked, or closed — but note that `edit_report` mutates `title`, `summary`, `append_note`, `append_evidence`, `suggested_reviewers`, `charts`, and `suggested_prompts` **only**. + It cannot change status or actionability, so an appended note or evidence row does not retire the report. Rewrite the **title and summary** so the stale framing is gone from the surface a human scans, and leave the status change to a person. - **Routing the outcome is part of the design.** On the report channel a queue scout can hand work straight to a draft PR: `actionability: immediately_actionable` + `repository` + a `priority` makes the report **eligible** to autostart one. Eligible is not automatic — the team's autostart toggle, its priority threshold, the org's self-driving quota, and resolving a runner identity each gate it independently, so a correctly-filed report can sit still for reasons that have nothing to do with the scout. diff --git a/skills/building-html-canvases/SKILL.md b/skills/building-html-canvases/SKILL.md index b6ff60d..0408ec2 100644 --- a/skills/building-html-canvases/SKILL.md +++ b/skills/building-html-canvases/SKILL.md @@ -47,6 +47,12 @@ build pipeline's dependency admission ships. Define your colors as CSS variables under `:root { … }` with overrides under `html.dark { … }`, or use theme token utilities (`bg-background`, `text-foreground`, `border-border`) — never a light-only hardcoded color. +- Give your own CSS variables a prefix (`--doc-bg`, `--doc-muted`). Never reuse a platform token + name: the bundled Quill stylesheet sets `--background`, `--border`, `--card`, `--chrome`, + `--input`, `--muted`, `--primary`, and `--fill-*` on every element, so a `:root` or `html.dark` + value with one of those names never reaches any element. A page that colors its text with its own + `--muted` then renders unreadable (pale text on a pale page). Validation rejects such a + declaration with `platform_token_redeclared`. - For canvas/WebGL drawing colors, read the resolved token at runtime (`getComputedStyle(document.documentElement).getPropertyValue("--primary")`) or your own CSS variables, and re-read on theme change if the scene is long-lived. diff --git a/skills/building-react-quill-canvases/SKILL.md b/skills/building-react-quill-canvases/SKILL.md index b36c115..59809c9 100644 --- a/skills/building-react-quill-canvases/SKILL.md +++ b/skills/building-react-quill-canvases/SKILL.md @@ -71,6 +71,11 @@ text-card-foreground`; borders `border-border`. Never a hardcoded hex or light-o always use the `-foreground` utility; a filled pill pairs `bg-success text-success-foreground`. Prefer the Quill `Badge` (`variant="success"`/`"destructive"`) for deltas so you don't hand-pick. - `bg-secondary`, `text-secondary`, `bg-accent`, and `bg-popover` are not defined in the canvas — avoid them. +- Never declare a CSS variable with a platform token name (`--background`, `--border`, `--card`, + `--chrome`, `--input`, `--muted`, `--primary`, `--fill-*`), in a stylesheet or a `