AgentSkillsCN

schema-evolution-governance

针对已运行系统中的安全向前迁移、兼容性管控与回滚就绪性,制定数据模式演进治理工作流程。当需跨服务协调数据模式的兼容性与长期迁移安全性时使用;切勿用于未对数据模式生命周期产生影响的孤立查询微优化。

SKILL.md
--- frontmatter
name: schema-evolution-governance
description: "Data schema evolution governance workflow for safe forward migration, compatibility control, and rollback readiness in operated systems. Use when coordinating cross-service schema compatibility and migration safety over time; do not use for isolated query micro-optimizations without schema lifecycle impact."

Schema Evolution Governance

Trigger Boundary

  • Use when schema changes affect multiple services or historical data compatibility.
  • Do not use for one-off query tuning; use db-query-optimization.
  • Do not use for API consumer contract tests only; use api-contract-testing.

Goal

Evolve schemas safely without breaking data integrity or dependent systems.

Inputs

  • Current schema and migration history
  • Dependent services, jobs, and consumer contracts
  • Data volume, retention, and rollback constraints

Outputs

  • Compatibility-aware schema change plan
  • Migration sequence with validation checkpoints
  • Rollback and recovery readiness criteria

Workflow

  1. Classify change type and compatibility impact.
  2. Define phased migration strategy for operated systems.
  3. Validate read/write compatibility across dependent systems.
  4. Define rollback trigger, data recovery, and cutover criteria.
  5. Publish execution and verification checklist.

Quality Gates

  • Compatibility impact is explicitly documented.
  • Migration and rollback paths are both testable.
  • Data integrity checks pass before and after cutover.
  • Ownership exists for every migration phase.

Failure Handling

  • Stop when backward/forward compatibility is unverified.
  • Escalate when rollback path is missing for operated systems.