Skip to content

Module Lifecycle Management for Dependencies, Compatibility, and Safe Disable #203

Description

@djm81

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_compatibility version constraints.
  • NEW: Extend module manifests with core_compatibility (PEP 440 specifier string) across all module packages.
  • NEW: Add safe-disable checks in specfact init so disabling a module fails when enabled dependents require it, with explicit --force override.
  • NEW: Add specfact init --list-modules to 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) and specfact init ide for 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.commands for non-app symbols.
  • 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 under src/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

Activity

  1. added theissue type on Feb 6, 2026
  2. self-assigned this
    on Feb 6, 2026
  3. moved this from Todo to In Progress in SpecFact CLIon Feb 6, 2026
  4. moved this from In Progress to No status in SpecFact CLIon Feb 6, 2026
  5. changed the title [-][Change] Module lifecycle management for dependency validation and safe disable[/-] [+]Module Lifecycle Management for Dependencies, Compatibility, and Safe Disable[/+] on Feb 6, 2026
  6. linked a pull request that will close this issuerelease: v0.29.0 #205on Feb 6, 2026
  7. moved this from In Progress to Done in SpecFact CLIon Feb 6, 2026
  8. changed the issue type fromtoon Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions