Schema Extension System for Modular ProjectBundle Extensions
Why
Modules need a mechanism to extend ProjectBundle with custom fields without modifying core models, enabling marketplace-ready interoperability where external services (ADO, Jira, Linear) can persist metadata without core coupling. Without this, modules either duplicate schema logic or introduce tight coupling, blocking parallel development and ecosystem growth.
What Changes
- NEW: Add
extensions field to Feature and ProjectBundle models with namespace-prefixed accessors/mutators
- NEW: Create
src/specfact_cli/models/dynamic_extensions.py for Pydantic dynamic model creation
- MODIFY: Extend module manifest schema (
module-package.yaml) with schema_extensions declaration
- MODIFY: Extend module lifecycle registration to load and validate schema extensions from manifests
- NEW: Add namespace enforcement (module-prefixed fields) with static analysis guards
- NEW: Add documentation for extending ProjectBundle and best practices
OpenSpec Change Proposal: arch-07-schema-extension-system
Schema Extension System for Modular ProjectBundle Extensions
Why
Modules need a mechanism to extend ProjectBundle with custom fields without modifying core models, enabling marketplace-ready interoperability where external services (ADO, Jira, Linear) can persist metadata without core coupling. Without this, modules either duplicate schema logic or introduce tight coupling, blocking parallel development and ecosystem growth.
What Changes
extensionsfield toFeatureandProjectBundlemodels with namespace-prefixed accessors/mutatorssrc/specfact_cli/models/dynamic_extensions.pyfor Pydantic dynamic model creationmodule-package.yaml) withschema_extensionsdeclarationOpenSpec Change Proposal:
arch-07-schema-extension-system