book-ddia-data-design
Guides data-intensive design checks for consistency, reliability, schema evolution, and data flow risks. In strict tasks, mandatory before design stabilizes or implementation begins when changing persisted/shared data, schemas, migrations, shared/persistent/cross-request/cross-process caches, async or cross-service flows, data ownership, or recovery; in default/lite tasks, use on demand when those risks or explicit delivery requirements are present.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-05
- Stars
- ★ 195
- Forks
- 1
01 前言 Front Matter
- name
- book-ddia-data-design
- license
- Apache-2.0
- metadata
- { "sbtd.category": "data", "sbtd.portable": "true", "sbtd.source-revision": "1d82494d74f6df9bca7dccef2da409f87091883e" }
- description
- Guides data-intensive design checks for consistency, reliability, schema evolution, and data flow risks. In strict tasks, mandatory before design stabilizes or implementation begins when changing persisted/shared data, schemas, migrations, shared/persistent/cross-request/cross-process caches, async or cross-service flows, data ownership, or recovery; in default/lite tasks, use on demand when those risks or explicit delivery requirements are present.
- allowed-tools
- read grep glob bash
- compatibility
- Requires project architecture and data-flow evidence; migration tools, Trellis, GitNexus, and tests are optional.
02 资源文件 2
03 SKILL.md 正文
Book DDIA Data Design
Use this Skill when a change can fail because of data semantics, distributed behavior, or operational reality rather than ordinary code structure.
It is derived from the mini rule style of agent-rules-books and should complement project architecture, task design, source/LSP/contract impact analysis, tests, and production validation.
Strict Development Gate
In a strict task, run this Skill before design artifacts become stable or implementation begins when the task changes any of the following:
- Persisted or shared data, databases, schemas, or migrations.
- shared, persistent, cross-request, or cross-process caches; queues, events, streams, jobs, ETL, or analytics pipelines.
- Cross-service data flow or API ownership.
- Data ownership, source of truth, transaction boundaries, or read / write paths.
- Backfill, replay, rollback, or recovery behavior.
Emit a separate visible review:
DDIA Data Design Review
Status: confirmed | needs-design-change | blocked
Data owner and source of truth: ...
Write / read / async / failure paths: ...
Consistency model: ...
Idempotency / ordering / retry / deduplication: ...
Schema / migration / backfill / rollback / replay: ...
Observability and repair: ...
Required tests: ...
confirmed: the data design and failure / recovery behavior are explicit enough to implement safely.needs-design-change: update the design or task artifacts, then rerun this Skill before implementation.blocked: required ownership, contract, environment, migration, or Skill evidence is missing; state the blocker and do not stabilize design or implement the data change.
When To Use
- Strict: every development task matching a persisted/shared-data, shared-cache, async-flow, cross-service-flow, ownership, migration, or recovery trigger above. In default/lite, use this Skill when those risks, project rules, or explicit delivery requirements apply.
- A change affects databases, schemas, migrations, shared / persistent / cross-request / cross-process caches, queues, streams, jobs, ETL, analytics, or cross-service APIs.
- The system must handle duplicate messages, retries, partial failure, reordering, eventual consistency, or replay.
- A feature changes data ownership, source of truth, transactional boundaries, or read/write paths.
- Backfill, migration, rollback, or recovery behavior matters.
When no mandatory trigger matches, do not use this Skill for purely local UI work, simple in-memory code, or data changes already covered by clear project conventions unless the user requests it or another concrete data-semantics risk warrants it.
Workflow
- Identify the source of truth and data owner.
- Map the write path, read path, async path, and failure path.
- State consistency expectations: strong, eventual, read-your-writes, monotonic reads, or best effort.
- Check idempotency, ordering, retry, deduplication, and poison-message handling.
- Check schema compatibility, migrations, backfills, rollback, and replay.
- Define observability and repair signals for data drift or stuck processing.
- Validate with focused tests and project validation commands.
Output
Always emit the visible DDIA Data Design Review for a strict gate. For task-level records, also write concise design/check notes:
- Data owner and source of truth.
- Consistency model.
- Failure and recovery behavior.
- Migration/backfill/rollback plan.
- Required tests and validation.
Promote only long-lived data architecture rules to docs/spec.
Guardrails
Do not design a distributed system when a local transaction is enough. A mandatory review may confirm that the existing simple model is sufficient; keep the design as simple as project constraints allow.
04 同仓库更多 Skills
gherkin-bdd
Use when adding, changing, reviewing, testing, synchronizing, or read-only ingesting user-visible behavior with BDD, Gherkin, Given/When/Then scenarios, .feature files, acceptance criteria, knowledge catalogs, or bug-fix behavior specs.
sbtd-workflow-onboard
Checks, installs, or resets SBTD workflow tools, global Skills, managed AGENTS templates, and per-project configuration for local project roots in Oh My Pi.
web-ui-autotest-generator
从前端和后端源码中生成可维护的 Web UI 自动化测试。适用于分析页面、路由、组件、接口、用户流程,生成 Playwright UI 测试,运行测试,生成中文报告,并自检页面功能和跨页面逻辑是否被独立测试资产覆盖。 Generate maintainable Web UI automated tests from frontend and backend source code. Use for analyzing pages, routes, components, APIs, and user flows; generating and running Playwright UI tests; producing Chinese test reports; and checking whether page features and cross-page logic are covered by independent test assets.
seo-geo
SEO & GEO (Generative Engine Optimization) for websites. Analyze keywords, generate schema markup, optimize for AI search engines (ChatGPT, Perplexity, Gemini, Copilot, Claude) and traditional search (Google, Bing). Use when user wants to improve search visibility, search optimization, search ranking, AI visibility, ChatGPT ranking, Google AI Overview, indexing, JSON-LD, meta tags, or keyword research.
sbtd-task
Use for SBTD task execution and continuation, explicit default/lite/strict mode selection, task records and status changes, cross-session recovery, and task handoffs. Load strict gates only for strict tasks; ordinary questions and read-only work do not create task files.
project-validation
Use after code changes to choose and run validation commands for Node, JavaScript, TypeScript, Python, Go, Dart, Java, Kotlin, C++, Swift, or Objective-C projects. Prefer project-defined commands and report skipped checks and risks.