Diff what producers write against what consumers assume — schema drift, ordering bets, missing idempotency keys — and find the message that breaks when a deploy staggers.
Free & open · no signup · read-only — it ends by asking · nothing leaves your machine
You are working inside this repo. Mission: audit the contracts between everything that publishes a message and everything that consumes one. The real schema is not in a doc — it is the diff between what producer code writes and what consumer code assumes. Find where that diff bites.
This brief owns the internal contracts — the messages your own services trade. For the outbound webhooks developers build against, run 111.
Read-only pass. Your only write is the report file.
Phase 2 sweeps the codebase through every one of these, citing file and line for each finding.
fields written that no consumer reads; fields consumers require that producers only sometimes write; optionality disagreements
how a field gets added or renamed today: versioned, additive-only, or edit-and-pray; do consumers tolerate unknown fields
old consumer meets new event and new consumer meets old event, mid-rollout: trace both directions per event
consumers that assume arrival order or exactly-once where the transport promises neither; cite the assuming line
re-delivery of each event: deduplicated by a key, tolerated by design, or a double side effect
the message that always fails: retried forever, dropped silently, or parked where a human actually looks
yesterday's events replayed today (backfill, recovery): idempotent catch-up or a duplication disaster
One structured report at the repo root — or in reports/, if you keep one — the same shape every time, ready for a teammate — or the optional Studio — to act on.
Every Goal Prompt follows the same four steps, so results are consistent and repeatable — no matter which one you run.
Inventory every event and message.
Every finding cites producer and consumer code.
Rank by side-effect severity × how ordinary the trigger is.
Create EVENTS.md at repo root.
Copy it and paste it into your agent inside the repo you want checked.
Install the goal plugin once — two commands — then just type /goal:event-contracts.
/plugin marketplace add GhostlyGawd/goal-prompts/plugin install goal@goal-promptsOr install only this Goal Prompt as /goal-event-contracts:
curl -fsSL https://goal-prompts.vercel.app/install | BRIEF=138 shLet an agent fetch it mid-conversation, or pull the raw Goal Prompt by URL.
https://goal-prompts.vercel.app/raw/138.mdNothing hidden — this is the whole Goal Prompt, verbatim. Read it in a minute, edit it, or copy it as-is.
# Goal: Event & Message Contracts You are working inside this repo. Mission: audit the contracts between everything that publishes a message and everything that consumes one. The real schema is not in a doc — it is the diff between what producer code writes and what consumer code assumes. Find where that diff bites. This brief owns the internal contracts — the messages your own services trade. For the outbound webhooks developers build against, run 111. Read-only pass. Your only write is the report file. ## Phase 1 — Build the contract matrix - Inventory every event and message: queues, topics, webhooks, pub/sub, outbox tables. For each, find every producer and every consumer in the code. - Extract each event's real shape from the producer's serialization code, and each consumer's real expectations from its parsing code — file:line both sides. - Note where a schema is declared (registry, shared types, protos) versus implied by code agreement alone. ## Phase 2 — Audit through 7 lenses Every finding cites producer and consumer code. 1. **Shape drift** — fields written that no consumer reads; fields consumers require that producers only sometimes write; optionality disagreements 2. **Evolution discipline** — how a field gets added or renamed today: versioned, additive-only, or edit-and-pray; do consumers tolerate unknown fields 3. **The staggered deploy** — old consumer meets new event and new consumer meets old event, mid-rollout: trace both directions per event 4. **Ordering bets** — consumers that assume arrival order or exactly-once where the transport promises neither; cite the assuming line 5. **Idempotency keys** — re-delivery of each event: deduplicated by a key, tolerated by design, or a double side effect 6. **Poison & dead letters** — the message that always fails: retried forever, dropped silently, or parked where a human actually looks 7. **Replay safety** — yesterday's events replayed today (backfill, recovery): idempotent catch-up or a duplication disaster ## Phase 3 — Curate - Rank by side-effect severity × how ordinary the trigger is: a staggered deploy happens every release; rank what it breaks first. - For each contract gap, name the mechanism: a version field, a tolerant reader, a dedup key, a DLQ with an owner. - Flag the contracts that exist only as code agreement — each one is drift waiting for a refactor. ## Phase 4 — Report Create `EVENTS.md` at repo root: 1. **Contract matrix** — event · producers · consumers · declared schema or code-implied · drift found 2. **The staggered-deploy trace** — per risky event: old↔new in both directions, what breaks 3. **Findings** — each: lens · event · producer/consumer (file:line) · failure it causes · the mechanism to fix it 4. **Replay verdict** — could yesterday's stream re-run safely today; the events that say no Start the report with today's date. If `EVENTS.md` already exists from a previous run, read it first and lead with what changed since. ## Rules - The producer's serializer and the consumer's parser are the contract; docs are commentary - Assume every message arrives twice, late, and out of order — the transport's fine print says it may - No queues, topics, webhooks, or event streams in this repo? Say so in a one-paragraph null report and stop — a null result is a valid finding. - If a `reports/` directory exists at the repo root, write the report there instead of the root. - Before asking, present the top findings as a ranked list in plain words - Report only — end by asking which contract gaps to close first
reports/ directory exists at the repo root, write the report there instead of the root.Curated neighbors — briefs that answer the adjacent question, worth running in the same session.
Missing indexes, absent constraints, JSON blobs hiding structure — with a migration plan sequenced safest-first.
Which user behaviors are invisible today — and the tracking plan that makes the five questions that matter answerable.
Trace where personal data enters, spreads, and lingers — then run the delete-request test: could you honor one today?
Mine the git history for churn, bug magnets, coupled files, and bus-factor silos — predict where the next bug lands.