Skip to content

Zemulax/devibecode-VS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Devibe

Level up when you code with AI. Devibe is an "Anti-Vibe-Coding" enforcer designed to ensure developers actually comprehend the code they generate with AI assistants. It works within VS Code, intercepting blind copy-pasting or fast auto-generations, completely obscuring the code, and forcing you to understand it through dynamic LLM-generated challenges before you can commit or read it again.


🚀 Features

  • Event-Driven Interception: Actively listens to your VS Code text buffers. If you paste or auto-generate 3+ lines of code in milliseconds, Devibe instantly categorizes it as "Unverified AI Code."
  • Code Obscurity: The intercepted code is instantly wrapped in a dashed border and its opacity drops to 0%. You literally cannot read your own AI code in the editor until you prove you understand it.
  • Dynamic Comprehension Challenges: Google's Gemini LLM generates 2-5 context-aware, highly specific code challenges based directly on the complexity of your snippet. Question types include explain, modify, and predict (multiple choice).
  • LLM Jury Validation: When you submit your answers, Gemini evaluates your deep understanding. Score 60%+ to pass and unlock your code. Skip questions to bypass them, but risk failing the sequence!
  • RPG Gamification System: Earn XP for every validation sequence passed. Climb the Global Leaderboard, level up your dynamic UI Shield, and maintain your Consecutive Passing Streak. All XP is stored server-side — no local manipulation possible.
  • 🏆 Global Leaderboard: Compete with developers worldwide. Rankings are synced in real-time to a cloud backend, showing GitHub avatars, levels, XP, and streaks. Top 3 earn medal badges (🥇🥈🥉).
  • GitHub Authentication (Required): Sign in with your GitHub account to access Devibe. Authentication is mandatory — a sleek login screen greets first-time users. Your identity is tied to VS Code's native GitHub OAuth — one-click, zero friction.
  • Auto-Enforcing Git Hook: Devibe automatically installs a pre-commit hook when it catches you pasting AI code. Try to git commit with unverified code? Your shell will reject the commit and force you back to validate.
  • Persistent State: Devibe records unverified lines to .devibe/locked.json within your active workspace. Restarting your IDE won't save you.
  • The Pause Toggle: Toggle Devibe on/off from the VS Code Status Bar or the in-app Settings panel — both stay in sync. Devibe prevents you from pausing if you currently have unverified locked files.
  • ⚙️ Settings Panel: Access via the gear icon in the header. Manage your Gemini API key (masked, encrypted) and toggle code protection on/off — all without leaving the Devibe panel.
  • Secure API Storage: Uses native VS Code SecretStorage to encrypt and store your Gemini API key locally. Configurable from the Settings panel.

🛠 Supported Languages

Devibe's listener and challenge generation works with any language Gemini can analyze, including:

  • Python 🐍
  • JavaScript 💛
  • TypeScript 💙
  • TSX / JSX ⚛️
  • Go, Rust, Java, C#, and more — Gemini handles them all.

📦 Architecture

Devibe is a self-contained VS Code extension with zero external dependencies:

VS Code Extension (TypeScript)

  • Webview Dashboard: Built in React/Tailwind/Vite with a modern light-mode UI, popover HUDs, smooth animations, and tab navigation (Validation + Leaderboard).
  • Extension Core (extension.ts): Injects VS Code EditorDecorations, listens to onDidChangeTextDocument for AI code interception, manages workspace state, handles GitHub OAuth, and communicates with Gemini via the @google/generative-ai Node.js SDK. All gamification data (XP, level, streak) is stored exclusively in the cloud.
  • Gemini Service (gemini.ts): Direct TypeScript integration with Google's Gemini 2.5 Flash for challenge generation and answer validation. No Python subprocess — all native Node.js.
  • Leaderboard Service (leaderboard.ts): Syncs scores to a Supabase (PostgreSQL) cloud backend via REST API for global rankings. Serves as the sole source of truth for all user XP data.

Cloud Backend (Supabase)

  • Leaderboard Table: Stores GitHub identity, XP, level, streak, and timestamps for all Devibe users worldwide.
  • Row Level Security: Public read access for leaderboard display, authenticated write access for score updates.

🏃 Getting Started

Prerequisites

Installation (Users)

  1. Download the latest .vsix file from Releases
  2. Open VS Code → Extensions → ... menu → Install from VSIX
  3. Open any project and start coding with an AI assistant
  4. When Devibe detects AI code, sign in with GitHub (required on first launch)
  5. Set your Gemini API key via the ⚙️ gear icon in the Devibe panel
  6. Prove your understanding, earn XP, and climb the leaderboard!

Installation (Developers)

  1. Clone the Repo:
    git clone https://github.com/Zemulax/devibe.git
    cd devibe
  2. Install Extension Dependencies:
    cd vscode-devibe
    npm install
  3. Build the React Webview:
    cd webview-ui
    npm install
    npm run build
  4. Compile the Extension:
    cd ../
    npm run compile
  5. Launch Dev Host: Press F5 in VS Code to test.

Packaging

cd vscode-devibe
vsce package --no-dependencies

This generates a .vsix file that can be installed on any machine. No Python, no pip, no virtual environments — just install and go.


🗺️ Roadmap (v2.0 Vision)

While Devibe v1.0 perfectly acts as an aggressive "bouncer" for pasted AI code, the next major release will focus on comprehensive code auditing:

  • Pre-Deploy Devibe Exam: A new "Deployment Audit" mode that scans your git diff against your main branch. Before allowing you to push or merge, Devibe will randomly sample modified files across your entire PR and generate a multi-file comprehension test. You must prove you understand the complete architecture of the features you just built before they ship.
  • Team Leaderboards: Private group leaderboards to challenge your colleagues and see who relies least on blind copying.
  • Custom LLM Selection: Modular support for Anthropics's Claude 3.5 Sonnet, OpenAI's GPT-4o, and local models via Ollama.

🔐 Privacy & Security

  • GitHub OAuth: We only request read:user scope — your public profile. No repository access.
  • Gemini API Key: Stored locally using VS Code's encrypted SecretStorage. Never transmitted anywhere except to Google's API.
  • Leaderboard Data: Only your GitHub username, avatar URL, XP, level, and streak are stored in the cloud.

"What happens if I just uninstall the extension?"

You win. But you also lose. The point of Devibe is intrinsic motivation. It is the ultimate personal trainer for software engineers surviving the AI age. Don't skip leg day.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors