/bi - Business Intelligence Dashboard
Launch a local React-based business intelligence dashboard for real-time project and track analytics.
Usage
# Launch dashboard (default port 5174)
/bi
# Custom port
/bi --port 3000
# Don't open browser automatically
/bi --no-open
# Export current report as Markdown
/bi --export markdown
# Export as JSON
/bi --export json
System Prompt
EXECUTION DIRECTIVE:
When the user invokes /bi, you MUST:
- Navigate to BI dashboard tool directory
- Launch the development server using the CLI
- Open browser automatically (unless --no-open)
- Display dashboard URL in terminal
Execution Steps
# Step 1: Navigate to tool
cd ~/.coditect/tools/bi-dashboard
# Step 2: Launch server (auto-installs deps if needed)
node cli.js
# Or with options:
node cli.js --port 3000 --no-open
Export Reports
# Export Markdown report
python3 ~/.coditect/scripts/context-query.py --export-bi-report markdown > bi-report.md
# Export JSON report
python3 ~/.coditect/scripts/context-query.py --export-bi-report json > bi-report.json
Dashboard Views
1. Overview Dashboard
Executive summary with KPIs:
- Overall completion percentage
- Active/complete/pending tracks
- Active agents count
- Token usage and costs
2. Track Progress View
Detailed track-by-track breakdown:
- Progress bars with status colors
- Task counts (total/complete/pending)
- Primary agent assignments
- Click-through to track details
3. Resource Allocation View
Agent workload analysis:
- Allocation percentages
- Assigned tracks per agent
- Active task information
- Bottleneck identification
4. Analytics View
Token economics and trends:
- Total tokens (lifetime/month/week/today)
- Cost tracking
- Usage trends (when connected to sessions.db)
- Model distribution
Data Sources
The dashboard connects to:
| Source | Data | Location |
|---|---|---|
| sessions.db | Token economics, tool usage | ~/.coditect-data/context-storage/sessions.db |
| org.db | Decisions, learnings | ~/.coditect-data/context-storage/org.db |
| platform.db | Components, agents | ~/.coditect-data/context-storage/platform.db |
| TRACK files | Task progress | internal/project/plans/tracks/TRACK-*.md |
Technical Details
- Framework: React 18 + Vite 6
- Styling: Tailwind CSS
- Charts: Recharts (planned)
- Port: 5174 (default)
- Browser: Auto-opens on launch
Options
| Option | Description | Default |
|---|---|---|
--port <number> | Server port | 5174 |
--host <address> | Host address | localhost |
--no-open | Don't open browser | false |
--export <format> | Export report (markdown/json) | - |
-h, --help | Show help | - |
-v, --version | Show version | - |
Examples
Quick Launch
/bi
# Opens http://localhost:5174 in browser
Export for Documentation
/bi --export markdown > docs/reports/BI-REPORT-2026-01-28.md
Development Mode
cd ~/.coditect/tools/bi-dashboard
npm run dev
# Vite HMR enabled for development
Related
- ADR: ADR-130 BI Dashboard Architecture
- Tool: bi-dashboard/
- Skill: business-intelligence
- Query: context-query.py
Success Output
╔═══════════════════════════════════════════════════════════════╗
║ CODITECT Business Intelligence Dashboard ║
╠═══════════════════════════════════════════════════════════════╣
║ Starting server... ║
╚═══════════════════════════════════════════════════════════════╝
Data Sources:
Sessions DB: ✓ ~/.coditect-data/context-storage/sessions.db
Org DB: ✓ ~/.coditect-data/context-storage/org.db
Platform DB: ✓ ~/.coditect-data/context-storage/platform.db
Track Dir: ✓ internal/project/plans/tracks/
Opening browser at: http://localhost:5174
✅ COMMAND COMPLETE: /bi
Dashboard running at http://localhost:5174
Press Ctrl+C to stop
Completion Checklist
- Tool directory exists
- Dependencies installed
- Server started
- Browser opened
- Data sources connected
Failure Indicators
- ❌ Port already in use
- ❌ Missing dependencies
- ❌ Database files not found
- ❌ Track directory not found
Principles
This command embodies:
- #3 Complete Execution - Auto-installs, auto-opens browser
- #9 Based on Facts - Real data from databases
- #6 Clear, Understandable - Visual dashboard interface
Version: 1.0.0 Created: 2026-01-28 Author: CODITECT Core Team