Contract
- Input: business workflows, service boundaries, data change frequency, and consistency requirements.
- Output: event architecture with topic/stream design, schema registry plan, and flow diagrams.
- Scope: stay within the skill's declared boundaries; do not broaden without explicit direction.
- Rule: documented standards override defaults; explicit project rules take precedence.
- Rule: if blocked by missing context or dependencies, surface the blocker before proceeding.
Provenance
| Question |
Answer |
| What is the source of truth? |
The user's request, originating spec/issue, and the skill's declared outputs |
| What is in scope? |
Work covered by the skill's acceptance criteria and completion rules |
| What is explicitly out of scope? |
Files, behaviors, and decisions outside the skill's declared boundary |
| Who or what consumes this artifact afterward? |
The next skill in the workflow or the user |
| What evidence proves it is done? |
Completion criteria met, artifact saved, validation passed |
| What risk remains? |
Subjective judgment calls, missing context, or external dependency failures |
Artifact
Emit EventDrivenArchitectureArtifact as both:
- JSON:
.agents/skills/platform/artifacts/event-driven-architecture/{identifier}.json
- Markdown view: same filename with
.md extension
Event-Driven Architecture
Use this skill when designing event-driven systems — Kafka, NATS, EventBridge, SQS/SNS — with choreography, orchestration, event schemas, and delivery guarantees.
Process
1. Inventory events and workflows
- List business events and their producers and consumers.
- Identify synchronous vs asynchronous boundaries and where eventual consistency is acceptable.
- Map workflows that span multiple services.
Completion criterion: event inventory and workflow map documented.
2. Choose messaging pattern
- Evaluate choreography (each service reacts to events independently) vs orchestration (central coordinator).
- Choose broker: Kafka (high throughput, log-based), NATS (lightweight, low latency), EventBridge (serverless, AWS-native), or SQS/SNS (simple queueing).
- Justify choice against durability, ordering, throughput, and operational cost.
Completion criterion: pattern and broker chosen with rationale per workflow.
3. Design topics, streams, and queues
- Define topic naming convention, partition strategy, and retention policy.
- Plan consumer groups, subscription patterns, and replay requirements.
- Design dead-letter queues and retry policies for poison messages.
Completion criterion: topic/stream design documented with partition, retention, and DLQ strategy.
4. Define event schema and contracts
- Choose schema format (Avro, Protobuf, JSON Schema) and schema registry tooling.
- Define backward and forward compatibility rules for schema evolution.
- Document required vs optional fields and schema versioning policy.
Completion criterion: schema format, compatibility rules, and versioning policy documented.
5. Plan delivery guarantees and idempotency
- Define required delivery semantics per event type: at-most-once, at-least-once, exactly-once.
- Design idempotency keys and consumer deduplication strategies.
- Plan ordering guarantees where required and how to handle out-of-order delivery.
Completion criterion: delivery guarantee matrix and idempotency strategy documented.
6. Design observability and operations
- Configure metrics: publish rate, consume rate, consumer lag, error rate, retry rate.
- Enable distributed tracing with event context propagation.
- Document schema migration procedure and consumer compatibility testing.
Completion criterion: observability strategy and operational runbook documented.
Rules
- Rule: never couple event schema to internal database schema; use an anti-corruption layer.
- Rule: treat events as immutable; never update or delete a published event.
- Rule: version schemas from day one; breaking changes require a new topic or schema version.
- Rule: design consumers to be resilient to missing, duplicate, or out-of-order events.
- Rule: set retention and compaction policies based on replay and debugging needs, not unlimited storage.
- Rule: avoid chatty event topologies; prefer fewer, richer events over many tiny events.
Completion
- the skill's completion criteria are explicitly checked
- the artifact is saved and validated
- any blockers or skipped validations are documented
- the next consumer is identified or the work is handed off
@include .agents/skills/platform/contract-base.xml
1---2name: "event-driven-architecture"3category: "backend"4maturity: "stable"5version: "1"6description: "Event-driven architecture (Kafka, NATS, EventBridge, choreography vs orchestration)."7license: "MIT"8capabilities:9 - apply event driven architecture methods within explicit backend boundaries10 - analyze event-driven architecture (kafka, nats, eventbridge, choreography vs orchestration) with assumptions, constraints, and failure modes11 - produce and validate a backend artifact with evidence, decisions, and next steps12outputs: "event architecture with topic/stream design, schema registry plan, and flow diagrams."13sideEffects: []14dependencies: []15stopCondition: "Event-driven architecture design complete; artifact saved; completion criteria checked."16risk: "medium"17trustTier: "3"18maxIterations: "6"19promptVersion: "2.0"20artifactType: "backend"21modelTier: "reasoning"22evaluators: ["behavioral", "regression"]23fixturesPath: .agents/skills/platform/fixtures/behavioral/event-driven-architecture.json24diataxis: "how-to"25tags: ["backend"]26compatibility: []27approvalRequired: "true"28approvalFor: []29metadata:30 source: https://skillmd.com/skills/quantumquirkxyz/event-driven-architecture31---3233## Contract3435- Input: business workflows, service boundaries, data change frequency, and consistency requirements.36- Output: event architecture with topic/stream design, schema registry plan, and flow diagrams.37- Scope: stay within the skill's declared boundaries; do not broaden without explicit direction.38- Rule: documented standards override defaults; explicit project rules take precedence.39- Rule: if blocked by missing context or dependencies, surface the blocker before proceeding.4041## Provenance4243| Question | Answer |44|---|---|45| What is the source of truth? | The user's request, originating spec/issue, and the skill's declared outputs |46| What is in scope? | Work covered by the skill's acceptance criteria and completion rules |47| What is explicitly out of scope? | Files, behaviors, and decisions outside the skill's declared boundary |48| Who or what consumes this artifact afterward? | The next skill in the workflow or the user |49| What evidence proves it is done? | Completion criteria met, artifact saved, validation passed |50| What risk remains? | Subjective judgment calls, missing context, or external dependency failures515253## Artifact5455Emit `EventDrivenArchitectureArtifact` as both:56- JSON: `.agents/skills/platform/artifacts/event-driven-architecture/{identifier}.json`57- Markdown view: same filename with `.md` extension585960# 61# 62# Event-Driven Architecture6364Use this skill when designing event-driven systems — Kafka, NATS, EventBridge, SQS/SNS — with choreography, orchestration, event schemas, and delivery guarantees.656667## Process6869### 1. Inventory events and workflows70- List business events and their producers and consumers.71- Identify synchronous vs asynchronous boundaries and where eventual consistency is acceptable.72- Map workflows that span multiple services.7374**Completion criterion:** event inventory and workflow map documented.7576### 2. Choose messaging pattern77- Evaluate choreography (each service reacts to events independently) vs orchestration (central coordinator).78- Choose broker: Kafka (high throughput, log-based), NATS (lightweight, low latency), EventBridge (serverless, AWS-native), or SQS/SNS (simple queueing).79- Justify choice against durability, ordering, throughput, and operational cost.8081**Completion criterion:** pattern and broker chosen with rationale per workflow.8283### 3. Design topics, streams, and queues84- Define topic naming convention, partition strategy, and retention policy.85- Plan consumer groups, subscription patterns, and replay requirements.86- Design dead-letter queues and retry policies for poison messages.8788**Completion criterion:** topic/stream design documented with partition, retention, and DLQ strategy.8990### 4. Define event schema and contracts91- Choose schema format (Avro, Protobuf, JSON Schema) and schema registry tooling.92- Define backward and forward compatibility rules for schema evolution.93- Document required vs optional fields and schema versioning policy.9495**Completion criterion:** schema format, compatibility rules, and versioning policy documented.9697### 5. Plan delivery guarantees and idempotency98- Define required delivery semantics per event type: at-most-once, at-least-once, exactly-once.99- Design idempotency keys and consumer deduplication strategies.100- Plan ordering guarantees where required and how to handle out-of-order delivery.101102**Completion criterion:** delivery guarantee matrix and idempotency strategy documented.103104### 6. Design observability and operations105- Configure metrics: publish rate, consume rate, consumer lag, error rate, retry rate.106- Enable distributed tracing with event context propagation.107- Document schema migration procedure and consumer compatibility testing.108109**Completion criterion:** observability strategy and operational runbook documented.110111## Rules112113- Rule: never couple event schema to internal database schema; use an anti-corruption layer.114- Rule: treat events as immutable; never update or delete a published event.115- Rule: version schemas from day one; breaking changes require a new topic or schema version.116- Rule: design consumers to be resilient to missing, duplicate, or out-of-order events.117- Rule: set retention and compaction policies based on replay and debugging needs, not unlimited storage.118- Rule: avoid chatty event topologies; prefer fewer, richer events over many tiny events.119120## Completion121122- the skill's completion criteria are explicitly checked123- the artifact is saved and validated124- any blockers or skipped validations are documented125- the next consumer is identified or the work is handed off126---127@include .agents/skills/platform/contract-base.xml