Environment
- SpecFact Version: 0.46.18
- OS: Linux (Ubuntu/Debian)
- Python: 3.12.11
- Project Structure: Monorepo (multiple pyproject.toml in subdirectories)
Issue Description
specfact init ide reports "No Compatible Environment Manager Detected" despite uv being installed and available in PATH, and multiple pyproject.toml files existing in the repository.
Steps to Reproduce
- Have a monorepo project structure:
repo-root/
├── backend/
│ ├── pyproject.toml ✓ (exists, uses uv)
│ └── .venv/
├── worker/
│ ├── pyproject.toml ✓ (exists, uses uv)
│ └── .venv/
└── (no root pyproject.toml)
- Ensure
uv is installed: which uv → /home/kaesmad/.local/bin/uv
- Run:
specfact init ide
- See error: "⚠ No Compatible Environment Manager Detected"
Expected Behavior
SpecFact should:
- Detect
uv in PATH (or other supported tools)
- OR detect pyproject.toml files in subdirectories (monorepo pattern)
- OR allow manual specification of environment manager
Actual Behavior
╭───────────────────────────────────────────────────────╮
│ ⚠ No Compatible Environment Manager Detected │
╰───────────────────────────────────────────────────────╯
Supported tools: hatch, poetry, uv, pip
Despite:
- ✅
uv is installed and in PATH
- ✅
uv --version works: uv 0.9.28
- ✅ Multiple
pyproject.toml files exist in project subdirectories
- ✅ Project actively uses
uv (verified via uv run pytest commands)
Diagnostic Information
Environment Manager Check
$ which uv
/home/kaesmad/.local/bin/uv
$ uv --version
uv 0.9.28
$ echo $PATH | grep -o '\.local/bin'
.local/bin # Present in PATH
Project Structure
$ ls -la backend/pyproject.toml worker/pyproject.toml
-rw-r--r-- 1 kaesmad kaesmad 6364 May 5 11:07 backend/pyproject.toml
-rw-r--r-- 1 kaesmad kaesmad 806 Mar 25 09:06 worker/pyproject.toml
$ ls backend/.venv worker/.venv
backend/.venv: # Virtual environment exists
worker/.venv: # Virtual environment exists
Terminal History Shows Active uv Usage
$ history | grep "uv run" | tail -3
uv run pytest -v tests/
uv run ruff check .
uv run pytest
Root Cause Hypothesis
SpecFact's environment manager detection logic:
- Only checks for pyproject.toml in the current directory (repo root)
- Does NOT check for tools in PATH as a fallback
- Does NOT support monorepo patterns where pyproject.toml is in subdirectories
Impact
- Cannot complete IDE setup for monorepo projects
- Blocks prompt installation workflow
- Makes SpecFact unusable for multi-package repositories (common pattern)
Suggested Fix
Environment manager detection should:
- Check PATH first: If
uv, poetry, hatch, or pip exist in PATH → detect as available
- Scan subdirectories: Look for
*/pyproject.toml patterns (1-2 levels deep)
- Allow manual override:
--env-manager uv flag to skip detection
- Graceful degradation: If no env manager, warn but don't block IDE setup
Workaround
None available. User cannot proceed with IDE setup in monorepo projects.
Additional Context
- Monorepo structure is common for microservices, backends with multiple workers, etc.
- Projects like this often have separate virtual environments per package
- The repo actively uses
uv (proven by terminal history and .venv directories)
Related Issues
This may be related to the broader module detection issue, suggesting SpecFact's discovery mechanisms need improvement for non-standard project layouts.
Environment
Issue Description
specfact init idereports "No Compatible Environment Manager Detected" despiteuvbeing installed and available in PATH, and multiplepyproject.tomlfiles existing in the repository.Steps to Reproduce
uvis installed:which uv→/home/kaesmad/.local/bin/uvspecfact init ideExpected Behavior
SpecFact should:
uvin PATH (or other supported tools)Actual Behavior
Despite:
uvis installed and in PATHuv --versionworks:uv 0.9.28pyproject.tomlfiles exist in project subdirectoriesuv(verified viauv run pytestcommands)Diagnostic Information
Environment Manager Check
Project Structure
Terminal History Shows Active uv Usage
Root Cause Hypothesis
SpecFact's environment manager detection logic:
Impact
Suggested Fix
Environment manager detection should:
uv,poetry,hatch, orpipexist in PATH → detect as available*/pyproject.tomlpatterns (1-2 levels deep)--env-manager uvflag to skip detectionWorkaround
None available. User cannot proceed with IDE setup in monorepo projects.
Additional Context
uv(proven by terminal history and .venv directories)Related Issues
This may be related to the broader module detection issue, suggesting SpecFact's discovery mechanisms need improvement for non-standard project layouts.