Repository navigation
Module Lifecycle Management for Dependencies, Compatibility, and Safe Disable #203
Copy link
Copy link
Closed
Copy link
Labels
change-proposalProposal for a new changeProposal for a new changeenhancementNew feature or requestNew feature or requestmodule-systemModule system and registryModule system and registry
Description
Module Lifecycle Management for Dependencies, Compatibility, and Safe Disable
Why
arch-02 completed module package separation, but module lifecycle constraints are still unenforced at runtime. module_dependencies is currently declarative-only, module manifests do not constrain CLI core compatibility, and init --disable-module can disable required modules without preflight protection.
This creates avoidable runtime breakage and weakens contract-first guarantees for modular command loading. We need registry-time lifecycle validation and safe-disable protection while preserving backward compatibility.
What Changes
- NEW: Add module lifecycle validation at registration time for dependency existence/enabled state and
core_compatibilityversion constraints. - NEW: Extend module manifests with
core_compatibility(PEP 440 specifier string) across all module packages. - NEW: Add safe-disable checks in
specfact initso disabling a module fails when enabled dependents require it, with explicit--forceoverride. - NEW: Add
specfact init --list-modulesto show discovered installed modules with effective enabled/disabled status. - NEW: Add interactive up/down module selection for enable/disable flows, with explicit-id enforcement in non-interactive mode.
- NEW: Split initialization behavior into bootstrap-first
specfact init(no IDE template side effects) andspecfact init idefor prompt/template setup. - NEW: Extract shared bundle conversion and constitution helper utilities from cross-module command imports into
specfact_cli.utils.bundle_converters. - NEW: Add boundary guard coverage that blocks cross-module imports from
specfact_cli.modules.<other>.src.commandsfor non-appsymbols. - EXTEND: Add contract-first tests for dependency validation, version compatibility behavior, extracted utility helpers, and safe-disable logic.
- EXTEND: Update user-facing documentation and changelog/version synchronization for lifecycle management behavior and module manifest schema.
Capabilities
- module-lifecycle-management: Enforce module dependency integrity, version compatibility, safe-disable semantics, and module boundary hygiene.
Impact
- Affected specs: New
openspec/changes/arch-03-module-lifecycle-management/specs/module-lifecycle-management/spec.md. - Affected code:
src/specfact_cli/registry/,src/specfact_cli/modules/*/module-package.yaml,src/specfact_cli/modules/init/src/commands.py, and shared utility extraction undersrc/specfact_cli/utils/. - Affected tests: Registry/unit test coverage, module boundary guard tests, and utility conversion tests.
- Affected documentation (https://docs.specfact.io): CLI/module docs and contributor guidance that describe module metadata, lifecycle constraints, and disable behavior.
- Backward compatibility: Preserved for command-level behavior; lifecycle checks prevent invalid module states earlier with actionable errors.
OpenSpec Change Proposal: arch-03-module-lifecycle-management
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
change-proposalProposal for a new changeProposal for a new changeenhancementNew feature or requestNew feature or requestmodule-systemModule system and registryModule system and registry
Type
Projects
- StatusShow more project fieldsDone
Activity
[-][Change] Module lifecycle management for dependency validation and safe disable[/-][+]Module Lifecycle Management for Dependencies, Compatibility, and Safe Disable[/+]