WhyBug Logo whybug
Local-First Intent Archaeology • Zero Source Code Sent

Know why the code exists before you delete it.

Linters check syntax. Git blame shows who edited a line. WhyBug runs locally on your machine to uncover the hidden production edge case or race condition a block of logic was guarding against—before you refactor it.

1. Install globally once
$ npm install -g whybug
2. Run inside any repository
$ whybug
PaymentService.java — Working Tree Modification
1. Editor Save (100% Local RAM) Local Only
public void processPayment(String id) {
- for (int i = 0; i < 3; i++) {
- if (callGateway(id)) return;
- }
+ callGateway(id);
}
2. Instant Local Intent Log ~150ms
$ whybug
📁 Workspace: payment-service (isolated)
📌 Change #1 Logged:
Removed bounded 3-attempt retry loop in processPayment, exposing synchronous gateway calls to transient network drops.
> audit 1
3. Deep Architectural Report 0 bytes code sent
Historical Intent

Guarded against brief TLS handshake timeouts and HTTP 502 blips from the upstream payment gateway.

Breaking Impact

Single-packet drops will immediately fail customer checkouts and leave payment intents half-open.

Safe Refactor

Replace inline loop with an idempotency-keyed backoff policy rather than calling callGateway() bare.

The Core Problem

Chesterton's Fence in Production Engineering

Code in production often looks unusual or overly defensive: custom retry loops, 30-second clock-skew buffers, fallback shims, or manual cache locks. When another engineer "cleans up" that code six months later, they inadvertently reintroduce the exact race condition or outage it was written to prevent.

01 / INTENT ARCHAEOLOGY

Explain Why It Exists

Surfaces the human and architectural reason behind legacy guards the moment you modify or delete them in VS Code, IntelliJ, or Vim.

02 / ZERO CODE LEAKAGE

Strict Enterprise Privacy

Raw diffs, proprietary algorithms, and variables are parsed strictly in local RAM. Your source code never leaves your machine.

03 / LIGHTWEIGHT ENGINE

Under 500MB RAM Footprint

Runs silently on standard laptop CPUs under the native whybug process with no GPU required and zero IDE lag.

How WhyBug Compares

Enterprise Privacy & Intent Benchmark
Capability Static Linters Cloud AI Copilots WhyBug
Explains Why Defensive Logic Was Written No (Syntax only) Requires uploading raw code Yes — Real-Time Intent Archaeology
Zero Proprietary Code Sent to Cloud Yes No (Uploads files & snippets) Yes — 100% Local Diff Parsing
Per-Project Isolated Cache & History N/A Shared cloud chat Dedicated Workspace Cache per Repo
Complete 1-Command Uninstall Manual Leaves editor caches whybug uninstall wipes everything
2-Tier Architecture

Local Execution by Default. Abstracted Cloud Audits on Demand.

WhyBug splits continuous code watching from deep architectural collision analysis so your proprietary source code never leaves localhost.

STAGE 1 • LOCAL MACHINE <500MB RAM

On-Device Watcher & Isolated Project Cache

  • 01 Git Working-Tree Tracking: Detects modifications on save and extracts changed symbols strictly in local RAM.
  • 02 Isolated Per-Project Directories: Every repository gets its own dedicated cache directory and automatic port (4040, 4041, etc.) so projects never mix.
  • 03 Dual Real-Time Interface: Logs 1-sentence risk summaries in your terminal while streaming live cards to your local browser UI.
STAGE 2 • OPTIONAL DEEP AUDIT 0 Bytes Code Sent

Abstracted Architectural Collision Auditor

  • 01 Strict Schema Sanitization: Strips all raw code and diffs locally, transmitting only the 1-sentence abstracted intent statement.
  • 02 3-Part Architectural Report: Returns Historical Intent, Breaking Impact & Edge Cases, and an Intent-Preserving Safe Refactor.
  • 03 Cached Per Project: Completed audit reports are saved in the repository's local cache for instant offline viewing later.
3D Isolation Stack

Hardware-Enforced Local Boundary

Raw Git diffs stay locked in Layer 1 (Local RAM). Only sanitized, high-level intent statements pass through the Layer 2 filter when you request an audit.

Layer 1: Local RAM Diff & AST
100% On-Device
Layer 2: Sanitization Gate
Strips Raw Code
Layer 3: Deep Audit Report
Cached Locally
OUTBOUND PAYLOAD INSPECTOR 0 BYTES OF SOURCE CODE
{
  "metadata": {
    "summary": "Removed bounded 3-attempt retry loop in processPayment, exposing synchronous gateway calls to transient network drops.",
    "symbols": ["processPayment"],
    "affectedFiles": ["PaymentService.java"],
    "commitTitle": "feat: resilient payment service",
    "changeCategory": "intent-modification"
  }
}
Interactive Sandbox

Explore Real Production Regression Scenarios

Select a scenario below to preview the synchronized Terminal output and localhost:4040 Deep Audit report.

Terminal — whybug <500MB RAM
http://localhost:4040 — Local Web UI Zero Code Sent
CLI Guide

Install Once. Type whybug in Any Repository.

Install globally once via npm. From then on, simply run whybug inside any project folder—each repository automatically gets its own isolated workspace cache and port.

01 / INSTALL ONCE
npm install -g whybug

Installs the whybug binary globally on your PATH so it is ready in every terminal.

One-time global setup
02 / RUN IN ANY REPO
whybug

Creates an isolated project cache for the current repository and launches the live dashboard at localhost:4040.

Headless: whybug --no-ui
03 / DEEP AUDIT
audit 1

Type audit <id> in the terminal or click Request Deep Audit in the web UI for a 3-part collision report.

History log: list
04 / UNINSTALL ALL
whybug uninstall

Wipes all cached data, clears all project histories, and uninstalls the global CLI with zero residual files left behind.

Cache wipe only: whybug clean
FAQ

Frequently Asked Questions

Does any source code or git diff ever leave my machine?

Never. Raw Git diffs, variable names, and syntax are parsed strictly in local RAM. When you request an optional Deep Audit, only a 1-sentence abstracted intent statement is transmitted.

What happens when I work on multiple different projects?

WhyBug automatically isolates each repository into its own workspace session and assigns a dedicated local dashboard port (4040, 4041, etc.) so your project histories never mix.

How much memory does the local engine use?

WhyBug runs under its own native process (whybug) with a lightweight footprint under 500MB RAM on standard laptop CPUs—no GPU required.

How do I completely remove WhyBug and all cached data?

Run whybug uninstall (or whybug clean). It deletes all local cached data and project histories before uninstalling the global CLI package.