**Context:**
PR #163 fixed critical venv detection bugs but used aggressive
--break-system-packages flag as immediate fallback.
**Improvement:**
Now when no venv is found, the script:
1. Warns user about missing virtual environment
2. Offers to create one automatically (y/n prompt)
3. If yes: Creates venv, activates it, proceeds safely
4. If creation fails: Falls back to system install with warning
5. If no: Proceeds with system install but shows clear warning
**Benefits:**
- Encourages best practices (venv usage)
- Less aggressive about bypassing system protections
- Still supports system install when needed
- Better user experience with clear choices
**Backward Compatibility:**
- All three original scenarios still work
- Only adds new prompt in "no venv" scenario
- Default behavior unchanged for existing venv users
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
## ✅ Merged - All Bugs Fixed
Excellent work fixing both critical bugs from the initial review! All 390 tests passing.
**Original bugs fixed:**
- ✅ Double "install" command issue resolved
- ✅ pytest line now uses $PIP_INSTALL_CMD
**What's merged:**
- Virtual environment detection (active venv)
- Auto-activation of inactive venv/
- System install fallback with --user --break-system-packages
**Next:** Will add refinements to the system install fallback in a follow-up commit.
🤖 Merged with [Claude Code](https://claude.com/claude-code)