Fixed critical bug where all DevStream projects were forced to use the same database at /Users/fulvioventura/devstream/data/devstream.db, regardless of project location.
- File Modified:
.claude/hooks/devstream/utils/direct_client.py - Change: Replaced hardcoded
data/devstream.dbwith intelligent path resolution - Priority Order:
- Explicit
db_pathparameter DEVSTREAM_DB_PATHenvironment variable- Default relative
data/devstream.db
- Explicit
- File Created:
.env.devstream.template - Purpose: Complete multi-project configuration template
- Features: All DevStream settings with project-specific customization
# For each existing project (e.g., accountabilly, my-project, etc.)
cd /path/to/your/project
cp /Users/fulvioventura/devstream/.env.devstream.template .env.devstream# Edit the project-specific configuration
nano .env.devstream
# Set at minimum:
DEVSTREAM_PROJECT_NAME=your-project-name
DEVSTREAM_PROJECT_DESCRIPTION=Your project description# Test that each project uses its own database
cd /path/to/your/project
DEVSTREAM_DB_PATH=data/devstream.db /Users/fulvioventura/devstream/.devstream/bin/python -c "
import asyncio
import sys
sys.path.append('/Users/fulvioventura/devstream/.claude/hooks/devstream/utils')
from direct_client import get_direct_client
async def test():
client = get_direct_client()
print(f'Database path: {client.db_path}')
result = await client.create_task('test', 'test', 'test', 5, 'test')
print(f'Task created: {result[\"success\"]}')
asyncio.run(test())
"- ✅ True Multi-Project Support: Each project now has its own isolated database
- ✅ Best Practice Implementation: Following Dynaconf patterns for configuration management
- ✅ Backward Compatibility: Existing installations continue to work
- ✅ Zero Configuration: Works out-of-the-box with sensible defaults
- ✅ Environment Variable Support: Respects
DEVSTREAM_DB_PATHwhen set
The fix was verified with the accountabilly project:
- Before: All projects used
/Users/fulvioventura/devstream/data/devstream.db - After:
accountabillyuses/Users/fulvioventura/accountabilly/data/devstream.db - Result: Task creation successful in project-specific database
.claude/hooks/devstream/utils/direct_client.py- Core multi-project logic.env.devstream.template- Configuration templateMULTI_PROJECT_FIX_INSTRUCTIONS.md- This documentation
- Apply this fix to all existing DevStream projects
- Update installation scripts to auto-generate
.env.devstreamfrom template - Consider adding project detection logic to auto-configure
DEVSTREAM_PROJECT_NAME
Status: ✅ COMPLETE - Multi-project support is now fully functional