一键导入
event-driven-messaging-patterns
Build reliable event pipelines with reconnect-safe subscriptions, idempotency, and contract fidelity.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Build reliable event pipelines with reconnect-safe subscriptions, idempotency, and contract fidelity.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Make Codex CLI behave more like Claude Code for Kookr by preserving the known fork, branch, build, deploy, daily upstream sync, and live-verification workflow for Claude-compatible skills, agents, settings, hooks, and related UX.
Kookr-internal extension to rfc-iterative-review that captures append-only critic traces for later meta-analysis of RFC reviewer subagents.
Analyze an open question by casting 3-5 deliberately conflicting expert roles, running them in parallel and blind to each other, sharpening them in a debate round, attacking their consensus with a devil's advocate, then synthesizing a verdict that preserves disagreement instead of averaging it. Use for decisions, strategy, idea generation, hypothesis triage, experiment post-mortems, or any question where a single lens would return "it depends".
Iterative RFC drafting workflow — draft in worktree, run parallel critic subagents, incorporate feedback over N rounds, present to user before any action
How to create, structure, and launch Kookr playbook tasks — reusable agent task templates with dynamic sources and project identity
Build a Ralph-like sequential Kookr task chain where each task completes one independent unit, records durable state, and spawns the next task with the same continuation contract. Use for issue batches, queue drains, staged migrations, or other long runs that should proceed one task at a time without relying on conversation memory.
| name | event-driven-messaging-patterns |
| description | Build reliable event pipelines with reconnect-safe subscriptions, idempotency, and contract fidelity. |
| keywords | event driven, outbox, idempotency, redis reconnect, resubscribe, field fidelity, source attribution, dead letter queue, migration cleanup |
| related | realtime-state-sync, websocket-dashboard |
name, reason, counts).| Symptom | Cause | Verify | Fix |
|---|---|---|---|
| Pub/sub quiet after reconnect | Subscription not restored | Simulate Redis reconnect | Re-subscribe on reconnect-ready hook |
| UI text degraded | Bridge dropped payload fields | Compare source event vs emitted frame | Enforce field-fidelity contract tests |
| Duplicate actions | Missing idempotency key handling | Replay same message | Consumer dedup + side-effect guard |
| Migration regressions | Deprecated transport paths still active | grep code/docs/tests/config | Complete cleanup checklist below |
| Pattern | Rule | Checkpoint |
|---|---|---|
| Reconnect-safe subscription | On client reconnect-ready, explicitly subscribe all channels again | Channel count restored after reconnect test |
| Field fidelity | Bridge mappings are additive-only; no dropping/renaming without versioning | Contract test compares required fields end-to-end |
| Source attribution | Every emitted event includes normalized source and transport metadata | Debug traces can identify origin path |
| Outbox discipline | Publish from outbox/transaction boundary, not ad-hoc post-commit fire-and-forget | No lost events on partial failures |
| Idempotent consumers | Consumer side-effects guarded by stable idempotency key | Replay does not duplicate writes |
| Category | Required Fields |
|---|---|
| Identity | event_type, event_id, occurred_at |
| Context | workflow_id/task_id when applicable |
| Human-facing | name, reason, counts (if source has them) |
| Routing | source, transport, version |
| Area | Required Action |
|---|---|
| Runtime code | Remove deprecated transport handlers, feature flags, and fallback branches |
| Tests | Replace legacy transport assertions with snapshot/delta WebSocket assertions |
| Docs/runbooks | Remove deprecated transport setup and troubleshooting steps |
| Config | Delete deprecated transport env keys, ports, and health probes no longer used |
| Monitoring | Retire deprecated transport dashboards/alerts; add WebSocket reconnect + gap recovery signals |
| Pitfall | Why It Fails | Safer Alternative |
|---|---|---|
| Assuming Redis subscriptions persist forever | v4 reconnect clears active subscriptions | Always re-subscribe on reconnect-ready |
| Mapping event payload by manual ad-hoc picks | Fields silently lost | Central mapping schema + contract tests |
| Keeping deprecated transport “just in case” | Drift, duplicate paths, stale docs | Time-boxed migration and explicit removal PR |