Bug Report: Module Detection Fails After Clean Install
Environment
- SpecFact Version: 0.46.18
- OS: Linux (Ubuntu/Debian)
- Python: 3.12.11
- Installation Method:
specfact init --profile solo-developer
Issue Description
After a clean installation, the code command group fails to execute despite modules showing as "enabled" in specfact module list.
Steps to Reproduce
- Remove existing modules:
rm -rf ~/.specfact/modules/
- Fresh install:
specfact init --profile solo-developer
- Verify installation:
specfact module list (shows nold-ai/specfact-codebase as enabled)
- Try to run command:
specfact code --help
Expected Behavior
specfact code --help should display help for code commands.
Actual Behavior
Command produces no output except timing info:
⏱️ Started: 2026-05-06 10:58:23
✓ Finished: 2026-05-06 10:58:23 | Duration: 0.19s
Or sometimes shows error:
Module 'nold-ai/specfact-codebase' is not installed.
The code command group is provided by that module.
Diagnostic Information
Module List Output
$ specfact module list | grep specfact-codebase
│ nold-ai/specfact-codebase │ 0.41.9 │ enabled │ [official] │ nold-ai │
Python Import Test
$ python -c "import importlib.util; spec = importlib.util.find_spec('specfact_codebase'); print(spec)"
None # Module not found in Python path
Module File Structure
$ ls ~/.specfact/modules/specfact-codebase/
src/ # Module code is in src/specfact_codebase/
Root Cause Hypothesis
The modules are installed in ~/.specfact/modules/specfact-codebase/src/, but this path is not being added to sys.path when SpecFact loads modules. Python cannot import specfact_codebase even though the files exist.
Workaround Attempted
- Uninstall + reinstall module: No effect
- Run
specfact init multiple times: No effect
- Module shows as enabled but commands don't work
Impact
Cannot use SpecFact codebase import functionality, blocking brownfield code analysis workflow.
Additional Context
- Bootstrap completes successfully: "Modules discovered: 10 (enabled=10, disabled=0)"
- Command indexing completes: "Indexing CLI commands for help cache…"
- Issue persists across multiple clean reinstalls
Bug Report: Module Detection Fails After Clean Install
Environment
specfact init --profile solo-developerIssue Description
After a clean installation, the
codecommand group fails to execute despite modules showing as "enabled" inspecfact module list.Steps to Reproduce
rm -rf ~/.specfact/modules/specfact init --profile solo-developerspecfact module list(showsnold-ai/specfact-codebaseas enabled)specfact code --helpExpected Behavior
specfact code --helpshould display help for code commands.Actual Behavior
Command produces no output except timing info:
Or sometimes shows error:
Diagnostic Information
Module List Output
$ specfact module list | grep specfact-codebase │ nold-ai/specfact-codebase │ 0.41.9 │ enabled │ [official] │ nold-ai │Python Import Test
Module File Structure
Root Cause Hypothesis
The modules are installed in
~/.specfact/modules/specfact-codebase/src/, but this path is not being added tosys.pathwhen SpecFact loads modules. Python cannot importspecfact_codebaseeven though the files exist.Workaround Attempted
specfact initmultiple times: No effectImpact
Cannot use SpecFact codebase import functionality, blocking brownfield code analysis workflow.
Additional Context