What problem does it solve?
As AI systems evolve, their configuration schemas often change, risking breakage for existing users. This skill provides robust patterns to safely evolve Pydantic config schemas with backward compatibility and automated migration paths, ensuring smooth updates.
Core Features & Use Cases
- Backward Compatibility: Add new config sections and fields without breaking old configurations, preserving user experience.
- Automated Migrations: Generate scripts to automatically update user config files to the latest schema, eliminating manual editing.
- Environment Variable Support: Securely inject secrets and dynamic values using environment variable substitution, enhancing security.
- Type Discrimination: Utilize Pydantic's discriminated unions for flexible, type-safe configuration of different component types (e.g., CLI vs. HTTP adapters).
- Use Case: You're refactoring how adapters are configured, moving from a simple
cli_tools list to a more structured adapters section with type discriminators. This skill guides you through the schema changes, migration script creation, and comprehensive testing.
Quick Start
Explain how to add a new optional field to an existing Pydantic configuration schema while maintaining backward compatibility for users who haven't updated their config files.