Skip to content

feat: module lifecycle management, init split, and interactive module UX#204

Merged
djm81 merged 12 commits intodevfrom
feature/arch-03-module-lifecycle-management
Feb 6, 2026
Merged

feat: module lifecycle management, init split, and interactive module UX#204
djm81 merged 12 commits intodevfrom
feature/arch-03-module-lifecycle-management

Conversation

@djm81
Copy link
Copy Markdown
Collaborator

@djm81 djm81 commented Feb 6, 2026

Description

Implements OpenSpec change arch-03-module-lifecycle-management and completes module lifecycle management for dependency safety, compatibility checks, and improved init UX.

Key outcomes:

  • Registry-time module lifecycle validation (module_dependencies, core_compatibility)
  • Safe enable/disable with dependency-aware guards and --force cascading behavior
  • Interactive module selection UX for --enable-module / --disable-module
  • Split init responsibilities:
    • specfact init for bootstrap/module lifecycle
    • specfact init ide for IDE prompt/template setup
  • Interactive-by-default runtime behavior in interactive terminals
  • Documentation refresh and version/changelog bump to 0.29.0

Fixes #203

New Features #203

Contract References: No new public API contract decorators introduced in this PR; existing contract coverage remains in place.

Type of Change

Please check all that apply:

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔒 Contract enforcement (adding/updating @icontract decorators)
  • 🧪 Test enhancement (scenario tests, property-based tests)
  • 🔧 Refactoring (code improvement without functionality change)

Contract-First Testing Evidence

Required for all changes affecting CLI commands or public APIs:

Contract Validation

  • Runtime contracts added/updated (@icontract decorators on public APIs)
  • Type checking enforced (@beartype decorators applied)
  • CrossHair exploration completed: hatch run contract-test-exploration
  • Contract violations reviewed and addressed

Test Execution

  • Contract validation: hatch run contract-test-contracts
  • Contract exploration: hatch run contract-test-exploration
  • Scenario tests: hatch run contract-test-scenarios
  • Full test suite: hatch run contract-test-full

Test Quality

  • CLI commands tested with typer test client
  • Edge cases covered with Hypothesis property tests
  • Error handling tested with invalid inputs
  • Rich console output verified manually or with snapshots

How Has This Been Tested?

Contract-First Approach: Added and updated unit/e2e tests for module lifecycle scenarios (safe enable/disable, force cascading, interactive/non-interactive paths), and validated OpenSpec change strictness.

Manual Testing

  • Tested CLI commands manually
  • Verified rich console output
  • Tested with different input scenarios
  • Checked error messages for clarity

Automated Testing

  • Contract validation passes
  • Property-based tests cover edge cases
  • Scenario tests cover user workflows
  • All existing tests still pass

Test Environment

  • Python version: 3.12
  • OS: Ubuntu

Checklist

  • My code follows the style guidelines (PEP 8, ruff format, isort)
  • I have performed a self-review of my code
  • I have added/updated contracts (@icontract, @beartype)
  • I have added/updated docstrings (Google style)
  • I have made corresponding changes to documentation
  • My changes generate no new warnings (basedpyright, ruff, pylint)
  • All tests pass locally
  • I have added tests that prove my fix/feature works
  • Any dependent changes have been merged

Quality Gates Status

  • Type checking ✅ (hatch run type-check)
  • Linting ✅ (hatch run lint)
  • Contract validation ✅ (hatch run contract-test-contracts)
  • Contract exploration ✅ (hatch run contract-test-exploration)
  • Scenario tests ✅ (hatch run contract-test-scenarios)

Screenshots/Recordings (if applicable)

Not attached in this PR. Interactive init/module selection and IDE selection were validated manually in terminal.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Module Lifecycle Management for Dependencies, Compatibility, and Safe Disable

1 participant