Skip to main content
Glama
README.md
# VibeGraph — Visual Node Engine & Skill Compiler

**The Blueprint Before the Prompt.**  
VibeGraph is an open-source visual architecture studio and **Model Context Protocol (`vibegraph-mcp`)** server that stops AI coding agents from drifting, breaking working code, or shipping generic UIs.

Instead of writing fragile, one-off prompts, you wire your project visually using **CW (Execution) + ACW (Highstakes Checkpoint)** nodes, compile conflict-free rulebooks (`AGENTS.md`, `.cursorrules`, `CLAUDE.md`, `SKILL.md`), and enforce them with real disk-touching MCP build & security gates.

---

## How It Works

```mermaid
flowchart LR
    A["Visual Node Studio (React Flow)"] --> B["Skill Compiler"]
    B --> C["AGENTS.md / .cursorrules / CLAUDE.md / SKILL.md (.zip)"]
    A --> D["vibegraph-mcp (Stdio JSON-RPC)"]
    D --> E["Disk Audits & Scaffolding"]
    D --> F["Real Build/Test Gates (.vibegraph/run-history.json)"]
```

1. **Wire**: Pick one of 5 production pipelines (78 total nodes) or compose your own in **Custom Studio**.
2. **Compile**: Export a `.zip` bundle containing `AGENTS.md`, `.cursorrules`, `CLAUDE.md`, `SKILL.md`, and `mcp_config.json`.
3. **Enforce**: Connect `vibegraph-mcp` to **Antigravity**, **Cursor**, or **Claude Code** so the agent scans real files, scaffolds missing configs, and runs `npm run build` / `tsc` gates before finishing.

---

## Deep Dive: 5 Built-In Pipelines (78 Nodes)

### 1. Website Pipeline — RQL Atelier (26 Nodes)
13 CW Execution nodes paired with 13 ACW Highstakes Checkpoints:
- **Strategy & Brand**: Purpose, positioning, visual design system, typography, and motion tokens.
- **Engineering & SEO/GEO**: Frontend/backend boundaries, `robots.txt`, `sitemap.xml`, `llms.txt`, JSON-LD Schema, and Core Web Vitals.
- **MCP Tools**: `inspect_project`, `scaffold_project`.

### 2. Software Pipeline — Hexagon Engine (16 Nodes)
8 CW Execution nodes paired with 8 ACW Highstakes Checkpoints:
- **Architecture**: Domain & Spec → Core Architecture → State & Persistence → UI / CLI Surface → Security & Auth → Tests & Benchmarks → Packaging & Release.
- **MCP Tools**: `audit_software_project`, `generate_software_guardrails`.

### 3. AI Agent / RAG Pipeline (12 Nodes)
6 CW Execution nodes paired with 6 ACW Highstakes Checkpoints:
- **Reliability**: Agent Goal & Tools → Prompt & Zod Schema Contracts → Memory & Retrieval (RAG) → Tool-Call Sandboxing → Evals & Benchmarks → Guardrails & Deployment.
- **MCP Tool (`audit_agentic_project`)**: Scans `.ts/.tsx/.js/.jsx/.py/.rs` for hardcoded LLM API keys (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GEMINI_API_KEY`), unguarded `JSON.parse()` calls, and missing `evals/` or `prompts/` directories.

### 4. Mobile / PWA Pipeline (12 Nodes)
6 CW Execution nodes paired with 6 ACW Highstakes Checkpoints:
- **Installability**: App Shell & Navigation → Offline & Local Storage → Responsive Touch UI → Auth & Notifications → Manifest, Icons & PWA → Device QA & Release.
- **MCP Tool (`scaffold_mobile_pwa`)**: Writes `public/manifest.webmanifest` and `public/sw.js` to disk and verifies `index.html` for `<meta name="viewport">` and `<link rel="manifest">`.

### 5. Security & DPDP Gate (12 Nodes)
6 CW Execution nodes paired with 6 ACW Highstakes Checkpoints:
- **Compliance**: Threat Model & Auth → Secrets & Env Hygiene → Input Validation & Injection → Headers, CORS & CSP → Privacy & DPDP / GDPR Consent → Security QA & Release.

### 6. Custom Studio
Compose any combination of nodes from `src/data/nodeCatalog.ts` (including **Liquid Glass & Dynamic Video**, **Anti-Slop Editorial UI**, **Auth & RBAC**, **Database & Migrations**, **Safe-Edit Guardrails**) or add your own `+ Custom` nodes on the fly.

---

## `vibegraph-mcp` Setup

Build the MCP server once:

```bash
cd mcp-server
npm install
npm run build
```

Add `vibegraph` to your AI coding client (`~/.gemini/antigravity/mcp_config.json`, `~/.cursor/mcp.json`, or `~/.claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "vibegraph": {
      "command": "node",
      "args": ["C:/Users/rehan/.gemini/antigravity/scratch/vibegraph/mcp-server/dist/index.js"]
    }
  }
}
```

### Exposed MCP Tools
| Tool | What It Actually Does |
| :--- | :--- |
| `list_presets` | Lists all built-in pipelines and node counts. |
| `get_pipeline` | Returns ordered CW Execution + ACW Checkpoint steps. |
| `audit_software_project` | Scans source files for secrets, panics, and missing guardrails. |
| `inspect_project` | Checks web projects for SEO, metadata, and structure. |
| `scaffold_project` | Writes starter project configs and guardrails to disk. |
| `audit_agentic_project` | Scans for hardcoded LLM keys, unguarded `JSON.parse()`, and missing `evals/`. |
| `scaffold_mobile_pwa` | Writes `manifest.webmanifest` + `sw.js` and checks `index.html`. |
| `run_gate_check` | Executes real build/test commands and logs duration + exit code. |
| `get_benchmarks` | Reads `.vibegraph/run-history.json` for pass rate & average ms. |

---

## Quick Start (Web Studio)

```bash
git clone https://github.com/mohammadrehan1621/vibegraph.git
cd vibegraph
npm install
npm run dev
```

### Production Build & Cloudflare Pages Deploy

```bash
npm run build
npx wrangler pages deploy dist --project-name vibegraph
```

---

## License
Open Source under **AGPLv3 + Commercial Dual-License** (see [LICENSE](LICENSE)).