xiaohongshu
xiaohongshu
Event-driven design conventions: event envelope, naming, versioning, schema evolution rules, idempotency, ordering/partitioning, retry and dead-letter handling
Full skill instructions
มาตรฐานการออกแบบ events สำหรับ event-driven architecture: envelope format, naming, versioning, และ schema evolution ที่ทำให้ระบบ decouple ได้อย่างปลอดภัย
id, type, source, time, specVersioncorrelationId (ผูกกับ request/trace) และ causationId (optional)data เท่านั้น (หลีกเลี่ยง “metadata ปน payload”)<domain>.<entity>.<action>.v<major>created, updated, completed)changed, processed ถ้าไม่จำเป็น)type เป็น major เพื่อบอก breaking changes: user.created.v1v2 และรองรับ consumers เก่าในช่วง deprecationกฎหลัก: consumers ต้อง “ignore unknown fields” และ producers ต้องไม่ลบ/เปลี่ยนความหมาย field เดิมภายใน major เดียวกัน
order.payment.completed.v1id ต้อง unique (UUID v4) และใช้สำหรับ dedupe ที่ consumereventId ที่ process แล้ว หรือใช้ upsert/deterministic state transitionstenantId, orderId) และส่งไป partition เดียวกันsequence (optional) ใน data หรือ detailsexport interface EventEnvelope<T> {
id: string;
type: string;
source: string;
specVersion: "1.0";
time: string;
correlationId: string;
causationId?: string;
dataContentType: "application/json";
dataSchema?: string;
data: T;
}
export type UserCreatedV1 = EventEnvelope<{
userId: string;
email: string;
tenantId: string;
}>;
interface EventEnvelope<T> {
// Metadata
id: string; // UUID v4
type: string; // "user.created.v1"
source: string; // "user-service"
specVersion: string; // "1.0"
time: string; // ISO 8601
// Correlation
correlationId: string; // Request correlation
causationId?: string; // Causing event ID
// Payload
data: T; // Event-specific data
dataContentType: string; // "application/json"
dataSchema?: string; // Schema URL
}
VAL_, BIZ_, AUTH_, AUTHZ_ (ส่ง DLQ ทันทีหรือ discard ตาม policy)event.id, event.type, error summary, attempt count, first/last seen timestamp# Format: <domain>.<entity>.<action>.v<version>
# Examples:
user.account.created.v1
order.payment.completed.v1
inventory.stock.reserved.v1
notification.email.sent.v1
# Actions (past tense for domain events):
- created, updated, deleted
- completed, failed, cancelled
- started, finished, expired
| Change Type | Compatibility | Example |
|---|---|---|
| Add optional field | ✅ Safe | Add middleName?: string |
| Add required field | ❌ Breaking | Add email: string |
| Remove field | ❌ Breaking | Remove age |
| Rename field | ❌ Breaking | name → fullName |
| Change type | ❌ Breaking | age: string → age: number |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience