Skip to content

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👁️ DevScope

Async Intelligence Layer for Engineering Teams

Capture Context. Analyze Flow. Query the Hive Mind.

License Python AI Database

"Software collaboration is broken. We interrupt engineers like routers. DevScope captures the context so you don't have to."


⚡ The problem — The Black Box of Engineering

  • Bus Factor: When a developer leaves, history leaves with them. Commits show what changed, never how we got there.
  • Interruption Tax: Getting context means DM pings (“Hey, how does the Auth API work?”). Every sync interruption kills flow.
  • Humans as Routers: Engineers burn cycles ferrying tribal knowledge instead of building.

DevScope solves this by creating an Organization-Wide Hive Mind. It runs silently on local machines, captures "Deep Work" context using Multimodal AI (Vision + LLM), and syncs it to a central JSON-based RAG system—allowing teams to query history without breaking flow.


🏗️ System Architecture

graph TD
    subgraph "Local Client (System)"
        A[Screen Telemetry] -->|Capture| B(Dual Context Engine)
        B -->|Frame + Metadata| C{Privacy Firewall}
        C -- Allowed --> D[Gemini 2.0 Vision]
        C -- Blocked --> X((Drop))
        D -->|Structured Log| E[Local Ring Buffer]
    end

    subgraph "Knowledge Layer"
        E -->|Sync| F[(MongoDB Atlas)]
        F -->|Indexing| G[Searchable Hive Mind]
    end

    subgraph "Interaction"
        H[Teammate] -->|Query| I[Oracle Interface]
        I -->|Retrieve| F
        F -->|Context| I
    end
Loading

🧬 Technology Pillars (Secret Sauce)

1. Dual-Context Visual Engine (src/monitor.py)

  • Panoramic + Resized Input: mss captures the stitched virtual desktop, then downsamples to 1080p via Pillow so Gemini never chokes on 4K dual-monitor payloads.
  • Foveal Focus Telemetry: AppKit/Quartz provides the active app and frontmost window title, giving Gemini an authoritative “what the engineer is actually touching” signal.
  • Smart Extractor Prompting: A senior-auditor style system prompt instructs Gemini to trust the active focus, describe the exact action/target (“Editing the JSON schema”), and ignore background noise (Spotify, Discord).
  • Ring Buffer & Auto-Cleanup: Each session’s deque stores ~30 minutes of entries; when it overflows we evict the oldest record and delete its PNG, guaranteeing bounded disk usage.

2. Batch Summarization Engine (src/batch.py)

  • Timed/On-Demand Runs: Daemon wakes every 30 minutes to sweep each session’s temp_disk folder.
  • Gemini 1.5 Pro Standup: Large-context prompt converts the entire visual reel into a markdown Daily Standup Report (features, bugs, research, context score).
  • Hive Mind Storage: Summaries land in the Atlas session_summaries collection with user_id, project_name, and timestamp, creating a searchable history.

3. MongoDB Atlas Hive Mind (src/db.py)

  • Deep Work Filter: Metadata is uploaded only if the frame is aligned with the stated goal. Social media, banking, or idle states never leave the laptop.
  • Flexible Schema: Each document stores timestamp, project, technical context, and alignment score—perfect for Visual RAG without schema migrations.
  • Org-Level Tagging: Every record automatically carries the NYU team org tag plus user_id and project_name, so queries can scope to a squad or span the entire company.

💡 Core Capabilities

Capability Engineering Logic
Dual-Context Capture Uses mss for panoramic capture + Quartz to identify active window focus. This prevents background noise from confusing the AI.
Privacy Firewall A local classifier runs before upload. If is_deep_work == False or app in blacklist, the frame is dropped instantly. Zero PII leaves the device.
Visual RAG Instead of just text embeddings, we store the semantic description of the screen state. Querying "Show me the UI glitch" actually finds the visual context.
Mission Control A PyQt dashboard for multi-session management, live activity buffer, and status logs. Features collapsible cards and real-time buffer updates.

🛠️ Setup & Installation

Prerequisites

  • macOS Sequoia/Sonoma with Screen Recording permission
  • Python 3.10+
  • GEMINI_API_KEY (Gemini 2.0 Flash)

Quick Start

# 1. Clone & Env
git clone git@github.com:NamanVashishta/DevScope.git
cd DevScope
python3 -m venv venv && source venv/bin/activate

# 2. Install
pip install -r requirements.txt

# 3. Configure
export GEMINI_API_KEY="AIza..."

# 4. Run
python3 src/main.py

Ghost Team Seeder

Want to test the Hive Mind without waiting 30 days?

# Generate ~840 activity entries and summaries for 7 team members
python3 scripts/ghost_team.py --entries-per-user 120 --days 30

🖥️ Collaborative Surfaces

1. Mission Control (src/ui.py)

A PyQt dashboard for multi-session management.

  • Live Activity Buffer: Watch the AI analyze your screen in real-time.
  • Debounced Updates: Zero-flicker UI updates even with high-frequency capture.

2. Stats & Reports

Productivity analytics dashboard.

  • Deep Work Metrics: Visualizes your "Flow State" vs "Fragmentation".
  • App Usage: Breakdowns of VS Code vs Slack vs Chrome.

3. Hive Mind Oracle

Query-specific project or org-wide scope.

  • Smart Formatting: Gemini returns answers with icons (📋 Summary, ⚠️ Risks).
  • Project Discovery: Automatically combines local projects with those found in the MongoDB Graph.

🛡️ Privacy & Security (The Firewall)

"Is this spyware?" No. We built a Privacy Firewall that runs locally before any data leaves your machine.

  1. Local Privacy Classifier: DEVSCOPE_PRIVACY_APPS (e.g., 1Password, Banking) triggers a hardware-level capture halt.
  2. Deep Work Gate: The Vision AI labels every frame. If is_deep_work == False (e.g., Reddit, YouTube), the frame is scrubbed locally.
  3. No Screenshots in Cloud: Only structured JSON metadata touches the database. Raw images are deleted from the local ring buffer every 30 mins.
  4. Maker-First: We verify Context before we verify Upload.

❓ The Hard Questions (Defense)

Question Response
Why MongoDB Atlas? Engineering context is messy. Mongo’s flexible document model ingests multimodal metadata (error codes, app names) without painful schema migrations.
How is this collaborative? DevScope enables “Async Omniscience.” Teammates unblock each other by querying the Hive Mind instead of DM’ing for status updates.
What about privacy apps? Configure DEVSCOPE_PRIVACY_APPS="Safari,Notes,1Password" etc. Blocklisted apps short-circuit capture before frames ever reach disk.

🗺️ Roadmap

  • Windows/Linux Support: Porting AppKit logic to Win32API and X11.
  • IDE Plugin: Bringing the Oracle directly into VS Code.
  • Self-Hosted Mode: Allow teams to bring their own S3/Mongo for total data sovereignty.

📄 License

DevScope is released under the MIT License.

Naman Vashishta | 2026

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages