docs(creating-cloud-persona): correct to the v4 event model + field-tested gotchas#84
Conversation
…ested gotchas
Authoring against this skill on runtime 4.1.14 / persona-kit & cli 4.1.12
surfaced several stale instructions that fail to typecheck, compile, or deploy.
- Event model: the pre-v4 `event.source` / `event.payload` / `event.name`
shape (and `WorkforceProviderEvent`) was removed. Handlers now branch on the
provider-prefixed `event.type` (`slack.message.created`, `cron.tick`, …) and
read the payload via `await event.expand('full')`. Added an authoritative
"Event model (v4)" section and fixed the trigger model, the canonical starter
agent.ts, event-shape guidance, and the handler-pattern guards.
- Cron has no schedule name: branch on `cron.tick`; the only fields are
`event.schedule` / `event.scheduledFor`. Removed the `event.name` guidance.
- Added "Field gotchas": intent must be a PERSONA_INTENTS value (`planning` is
a tag, not an intent); an input can't set both `optional` and `default`;
`agentworkforce deploy` takes the persona.json FILE (a dir → EISDIR); memory
is append-only (no delete/upsert, recall ranks by relevance) so tightness
needs single-author + newest-by-createdAt + carry-forward + TTLs +
consolidation; teamSolve fan-out is all-or-nothing on the lead's fire, so
prefer an independent shared-memory collective when teammates need distinct
cadences.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 42 minutes and 30 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the SKILL.md documentation to align with the new Event model (v4) for cloud personas, replacing deprecated properties like event.source and event.payload with event.type and async payload expansion. It also adds a new section on field gotchas and updates deploy commands to use the persona.json file path. The reviewer correctly noted a factual inaccuracy in the updated text, which still claimed that inline examples used the old shape, and provided a helpful suggestion to fix it.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| The handler branches on `event.type` (a provider-prefixed dotted string like | ||
| `slack.message.created`, `linear.issue.create`, or `cron.tick`) and reads the | ||
| payload via `await event.expand('full')`. **See "Event model (v4)" below — the | ||
| pre-v4 `event.source` / `event.payload` / `event.name` shape is GONE in | ||
| runtime ≥ 4, and most of the inline examples further down still use it.** |
There was a problem hiding this comment.
The sentence states that "most of the inline examples further down still use it [the pre-v4 shape]", but this pull request actually updates all the inline examples in this file to use the new v4 event model. To avoid confusing the reader, this sentence should be updated to reflect that the examples have been updated.
| The handler branches on `event.type` (a provider-prefixed dotted string like | |
| `slack.message.created`, `linear.issue.create`, or `cron.tick`) and reads the | |
| payload via `await event.expand('full')`. **See "Event model (v4)" below — the | |
| pre-v4 `event.source` / `event.payload` / `event.name` shape is GONE in | |
| runtime ≥ 4, and most of the inline examples further down still use it.** | |
| The handler branches on `event.type` (a provider-prefixed dotted string like | |
| `slack.message.created`, `linear.issue.create`, or `cron.tick`) and reads the | |
| payload via `await event.expand('full')`. **See "Event model (v4)" below — the | |
| pre-v4 `event.source` / `event.payload` / `event.name` shape is GONE in | |
| runtime ≥ 4, and the inline examples further down have been updated to reflect this.** |
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. Confirmed: the PR touches only There is no CI/build/test for this docs repo (no Here is my review. Review summaryPR #84 is documentation-only: it rewrites I made no edits. The added prose is mechanically clean (no typos, no broken markdown, all internal cross-references — "Event model (v4)", G2, §7 — resolve). The remaining findings are accuracy/consistency matters that require human judgment, so I'm leaving them as comments rather than changing files. Findings (review comments — not auto-fixed)
Advisory Notes
Addressed comments
Verification
I am not printing READY: findings #1 and #2 are unresolved accuracy questions that need the author/human to confirm the v4 event model against the actual runtime (and likely re-vendor the reference types). Those require human judgment, and I could not verify the underlying claims from this checkout. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4dd86ebc1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| declared. **The pre-v4 `{ source, payload, workspaceId }` shape — and | ||
| `WorkforceProviderEvent` / `WorkforceCronEvent` — were removed.** Authoring | ||
| against them fails to typecheck (`has no exported member 'WorkforceProviderEvent'`, | ||
| `Property 'source' does not exist`). Many examples below still show the old shape; | ||
| prefer this section. |
There was a problem hiding this comment.
Update the vendored event references
This caveat only points readers away from inline examples, but the skill still tells agents to read the vendored examples and “current types” first, and listed files such as references/workforce/packages/runtime/src/types.ts and references/workforce/examples/weekly-digest/agent.ts still export/use the removed WorkforceProviderEvent, event.source, and event.name shape. In practice, following the First read section can still lead authors to copy the exact APIs this section says fail to typecheck, so either update those vendored references or explicitly mark them stale here too.
Useful? React with 👍 / 👎.
| `PERSONA_INTENTS`). Note `planning` is a valid **tag**, not an intent — don't | ||
| confuse the two. `tags` is open-ish; `intent` is a closed enum. |
There was a problem hiding this comment.
Avoid calling deployment tags open
For personas deployed with the current persona-kit/cloud flow, tags are only leniently parsed locally; deployment validates them against the closed PERSONA_TAGS vocabulary, so off-vocabulary tags can still be rejected with 400 invalid_persona. Calling tags “open-ish” here can make generated personas use arbitrary catalog tags that compile locally but fail at deploy time; this should instead say that planning is a valid member of the closed tag vocabulary.
Useful? React with 👍 / 👎.
Why
Authoring two real cloud personas against this skill (on runtime 4.1.14 / persona-kit & cli 4.1.12) surfaced several instructions that are now stale and fail to typecheck, compile, or deploy. This PR brings the skill in line with the shipped runtime.
What changed (
SKILL.mdonly)event.source/event.payload/event.nameshape — andWorkforceProviderEvent— were removed. Handlers branch on the provider-prefixedevent.type(slack.message.created,linear.issue.create,cron.tick, …) and read the payload viaawait event.expand('full')(async). Added an authoritative "Event model (v4)" section and updated the trigger model, the canonical starteragent.ts, the event-shape guidance, and the handler-pattern guards.event.type === 'cron.tick'; the only fields areevent.schedule/event.scheduledFor. Removed theevent.namediscrimination guidance (it became a permanent silent no-op).intentmust be aPERSONA_INTENTSvalue (planningis a valid tag, not an intent);optional: trueanddefault;agentworkforce deploytakes thepersona.jsonfile path, not the directory (a dir →EISDIR);recallranks by relevance) → tightness needs single-author + newest-by-createdAt+ carry-forward + short TTLs + consolidation;teamSolvefan-out is all-or-nothing on the lead's fire (and wired to the GitHub-issue path), so prefer an independent shared-memory collective when teammates need distinct cadences.Net: +153 / -55 lines, docs only.
🤖 Generated with Claude Code