| name | workspace-monitor-dev |
| description | Development of workspace-monitor cross-IDE dashboard system. TRIGGERS - workspace-monitor, wsd, dashboard, IDE integration, Windsurf, OpenCode. Use when this capability is needed. |
| metadata | {"author":"gauravahujame"} |
Workspace Monitor Development
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
When to Use This Skill
Use this skill when:
- Adding new features to workspace-monitor
- Fixing bugs in the core system
- Adding support for new IDEs
- Modifying database schema
- Updating CLI commands
- Working on web dashboard
- Integrating with Windsurf or OpenCode
- Setting up development environment
Architecture
| Component | Location | Purpose |
|---|
| Core | src/workspace_monitor/core.py | Database, project scanning, git analysis |
| CLI | src/workspace_monitor/cli.py | Command-line interface (wsd) |
| Web Server | src/workspace_monitor/web/server.py | FastAPI/Flask dashboard |
| Hooks | src/workspace_monitor/hooks/processor.py | Windsurf hook integration |
| OpenCode Plugin | opencode-plugin/workspace-monitor.ts | TypeScript plugin for OpenCode |
| Database | ~/.workspace-monitor/dashboard.db (Linux) or ~/Library/Application Support/workspace-monitor/dashboard.db (macOS) | SQLite data store |
1. Development Environment Setup
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/gauravahujame/workspace-monitor.git
cd workspace-monitor
uv venv
source .venv/bin/activate
uv pip install -e ".[dev,web]"
2. Run Tests
source .venv/bin/activate
pytest
3. Add CLI Command
Add to src/workspace_monitor/cli.py:
@cli.command()
@click.option('--option', default='value', help='Description')
def mycommand(option):
"""Command description."""
pass
4. Add API Endpoint
Add to src/workspace_monitor/web/server.py:
@app.get("/api/endpoint")
def endpoint():
return {"data": "response"}
5. Modify Database Schema
6. Add IDE Support
To add support for a new IDE (e.g., Cursor):
7. Code Quality Checks
black src/
ruff src/
mypy src/workspace_monitor
8. Platform-Specific Testing
export PLATFORM="darwin"
export PLATFORM="linux"
9. Debug Hook Issues
cat ~/.codeium/windsurf/hooks.json
~/.workspace-monitor/venv/bin/python -m workspace_monitor.hooks.processor
cat ~/.workspace-monitor/hook_errors.log
cat ~/Library/Application\ Support/workspace-monitor/hook_errors.log
10. Release Preparation
pytest
mypy src/workspace_monitor
black src/
ruff src/
./install.sh
Reference
Project docs: AGENTS.md, README.md
Troubleshooting
| Issue | Cause | Solution |
|---|
| Database locked | WAL mode not enabled, long transactions | Ensure WAL mode in initialize_schema(), check for long-running queries |
| Git status slow | Deep scanning, no caching | Limit max_depth, cache results with short TTL, skip excluded dirs |
| Hook not firing | Wrong path, not executable | Use absolute path to venv python, check file permissions |
| Type errors | Missing type hints | Run mypy, add type hints to all functions |
| UV not found | Not installed | Run `curl -LsSf https://astral.sh/uv/install.sh |
| Import errors | Virtual environment not activated | Run source .venv/bin/activate |
| Port 8765 in use | Another instance running | Kill existing process or use wsd server --port 8766 |
| Projects not showing | Wrong workspace path | Check WORKSPACE_ROOT env var or pass --workspace flag |
Post-Execution Reflection
After this skill completes, check before closing:
- Did the command succeed? — If not, fix the instruction or error table that caused the failure.
- Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
- Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.
Only update if the issue is real and reproducible — not speculative.
Source: gauravahujame/workspace-monitor — distributed by TomeVault.