Skip to content

nikmcfly/vibepatent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

VibePatent

The "Zero-Knowledge" AI Patent Attorney

VibePatent is a local-first desktop application that uses autonomous AI agents to draft adversarial, legally-defensible Provisional Patent Applications (PPAs) in ~18 minutes. It replaces the $15k law firm retaining fee with a $4 AI run.

Key Features

  • Local-First Privacy - All data stays on your machine. No cloud storage.
  • BYOK (Bring Your Own Key) - Use your own API keys for AI services
  • Multi-Source Prior Art Search - USPTO, Google Patents, academic databases
  • USPTO-Compliant Output - Proper formatting, paragraph numbering, claim structure
  • Cross-Platform - macOS, Windows, Linux

Architecture

Component Technology
Type Local-First Desktop App (Right to Repair / Privacy Focused)
Shell Electron 35 + React 18 + Vite + TypeScript
Core Claude API (@anthropic-ai/sdk) with specialized agents
Mechanism "Kill Chain" - Swarm of hostile agents (Examiner, Architect, Investigator)
Security Zero-Knowledge. Direct API calls from your machine (BYOK)

Project Structure

vibepatent-app/
├── app/                          # Main Electron application
│   ├── electron/                 # Electron main process
│   │   ├── main.ts              # App entry, window management, IPC
│   │   └── preload.ts           # Secure bridge between main/renderer
│   │
│   ├── src/                      # React frontend (renderer process)
│   │   ├── App.tsx              # Main UI component, workflow views
│   │   ├── App.css              # Styles (dark theme)
│   │   └── main.tsx             # React entry point
│   │
│   ├── agent-srv/                # Agent sidecar (Node.js subprocess)
│   │   ├── index.js             # Sidecar entry, stdin/stdout IPC
│   │   └── services/            # Core services
│   │       ├── kill-chain.js    # Main workflow orchestrator
│   │       ├── orchestrator.js  # Claude API wrapper
│   │       ├── architect.js     # Claims drafting agent
│   │       ├── examiner.js      # Hostile USPTO examiner agent
│   │       ├── investigator.js  # Prior art search agent
│   │       ├── gemini.js        # Gemini API for large context
│   │       ├── vault.js         # Local filesystem storage
│   │       └── state-machine.js # Workflow state management
│   │
│   ├── package.json             # Dependencies
│   ├── vite.config.ts           # Vite bundler config
│   └── tsconfig.json            # TypeScript config
│
├── docs/                         # Documentation
│   ├── 1-universal/             # General references
│   │   └── ai-coding-sdlc.md    # AI coding methodology
│   │
│   └── 3-project/               # Project-specific docs
│       ├── UNIFIED_ROADMAP.md        # Active development roadmap
│       ├── FSD_VIBEPATENT_v2.md      # Functional Specification
│       ├── TSD_VIBEPATENT.md         # Technical Specification
│       ├── VALIDATION_PROTOCOL.md    # Testing protocol
│       ├── PRIVACY_ARCHITECTURE.md   # Security requirements
│       ├── PRODUCT_SHAPE_DECISION.md # Architecture decisions
│       ├── ULTIMATE_VIBEPATENTING_GUIDE.md
│       ├── *_REMEDIATION_PLAN.md     # Implementation guides
│       └── archive/                  # Superseded documents
│
└── README.md                     # This file

Core Components

Kill Chain Workflow (kill-chain.js)

The main orchestrator that runs the 7-phase patent drafting process:

Phase Description Agent
1. THESIS_INTAKE Analyze user's invention description Orchestrator
2. KILL_QUERY_GENERATION Generate adversarial search queries Examiner
3. SEARCH_EXECUTION Triple-tap search (Web, Academic, Patents) Investigator
4. THREAT_ANALYSIS Analyze prior art threats Gemini/Orchestrator
5. CLAIM_DRAFTING Draft patent claims v1 Architect
6. VALIDATION_LOOP 7-Strike adversarial validation Examiner + Architect
7. DOCUMENT_COMPILATION Generate specification + abstract Architect

Agent System

Agent File Role Model
Orchestrator orchestrator.js Workflow coordination Claude Sonnet 4
Architect architect.js Claim construction specialist Claude Sonnet 4
Examiner examiner.js Hostile USPTO examiner Claude Sonnet 4
Investigator investigator.js Prior art search Perplexity API

7-Strike Validation Loop

Each draft goes through 7 examination strikes with different angles:

Strike Angle Focus
1 §102 Anticipation Find single references disclosing all elements
2 §103 Obviousness Find obvious combinations
3 §112 Indefiniteness Find unclear terms, missing antecedent basis
4 Aggressive §103 Assume PHOSITA combines any references
5 Re-examination Fresh perspective on passed claims
6 Final §102/§103 Last chance sweep
7 Comprehensive Synthesize all findings

Signal System

Signal Meaning Action
GREEN_LIGHT White space - no prior art threat Proceed to next strike
YELLOW_LIGHT Near miss - close prior art Refine claims + retry
RED_LIGHT Direct hit - fatal conflict Pivot to new draft

Vault Structure

All project data is stored locally in ~/Documents/VibePatent_Vault/{projectId}/:

{projectId}/
├── 00_input/              # User input
│   └── thesis.md          # Original invention description
├── 01_active_draft/       # Working claims
│   ├── claims_v1.json     # First draft
│   ├── claims_v2.json     # After pivots
│   └── claims_final.json  # Validated claims
├── 02_analysis/           # Research artifacts
│   ├── thesis_analysis.json
│   ├── kill_queries.json
│   ├── search_results.json
│   └── threat_matrix.json
├── 03_validation/         # Examiner reports
│   ├── strike_1_report.json
│   └── ...
├── 04_submission/         # Final output
│   └── ppa_draft.json
├── 99_logs/               # Audit trail
│   └── agent_thoughts.log
└── manifest.json          # Project metadata

Getting Started

Prerequisites

  • Node.js 18+
  • Anthropic API key
  • Perplexity API key (optional, for real prior art search)

Installation

cd app
npm install

Configuration

Set API keys in the app Settings page, or via environment:

export ANTHROPIC_API_KEY=sk-ant-...
export PERPLEXITY_API_KEY=pplx-...

Run Development

cd app
npm run dev

This launches:

  1. Vite dev server (React frontend)
  2. Electron main process
  3. Agent sidecar subprocess

Documentation Map

Core Specifications

Document Description
UNIFIED_ROADMAP.md Active development roadmap (MVP Week 3)
FSD_VIBEPATENT_v2.md Functional Specification - features, agents, workflow
TSD_VIBEPATENT.md Technical Specification - architecture, IPC, security
VALIDATION_PROTOCOL.md Testing protocol for quality validation

Requirements & Design

Document Description
PRIVACY_ARCHITECTURE.md Zero-Knowledge security requirements
PRODUCT_SHAPE_DECISION.md Architecture decision: Desktop vs SaaS
ULTIMATE_VIBEPATENTING_GUIDE.md Patent strategy and methodology

Implementation Guides

Document Description
PRIVACY_REMEDIATION_PLAN.md Security implementation (safeStorage, CSP)
PRODUCT_SHAPE_REMEDIATION_PLAN.md UI components (Claims Tree, Heatmap)
VIBEPATENTING_GUIDE_REMEDIATION_PLAN.md LaTeX/PDF generation

Archive (Superseded)

Document Description
archive/ROADMAP.md Original roadmap (superseded by UNIFIED_ROADMAP)
archive/ULTIMATE_REMEDIATION_PLAN.md Merged into UNIFIED_ROADMAP
archive/PRIORITY_DECISION_MATRIX.md Scoring analysis (complete)
archive/CLAUDE_AGENT_SDK_REFERENCE.md Described non-existent SDK

Implementation Status

CORE ENGINE         ████████████████████  95%   COMPLETE
├─ Kill Chain       ████████████████████  100%
├─ 7-Strike Loop    ████████████████████  100%
├─ Agents           ████████████████████  100%
└─ Prior Art Search ████████████████░░░░  80%   (No Google Patents yet)

SECURITY            ████████████████████  100%  COMPLETE
├─ Local-First      ████████████████████  100%
├─ Key Storage      ████████████████████  100%  (safeStorage encryption)
└─ Network Guard    ████████████████████  100%  (CSP + navigation guards)

OUTPUT PIPELINE     ████░░░░░░░░░░░░░░░░  20%   INCOMPLETE
├─ JSON Export      ████████████████████  100%
├─ LaTeX Generation ░░░░░░░░░░░░░░░░░░░░  0%    (In progress)
└─ PDF Compilation  ░░░░░░░░░░░░░░░░░░░░  0%    (In progress)

Roadmap (see UNIFIED_ROADMAP.md)

Week Focus Key Deliverables
1 Foundation Google Patents, Smoke Tests, Cost Guardrail
2 Security OS Keychain (safeStorage), CSP, Linux Build
3 Output LaTeX Generator, PDF Compiler → MVP READY
4-5 Validation Test Types A/B/C, Quality Metrics
6 Polish Entity Selector, Documentation

API Usage & Costs

Approximate costs per patent application run (2026 pricing):

API Calls Est. Cost
Anthropic (Claude Sonnet 4) ~15-25 $2-4
Perplexity (Sonar Search) ~10-15 $0.30-0.50
Gemini (Threat Analysis) ~1-2 $0.05-0.10
Total $2.50-5

Usage is tracked in real-time and displayed in the UI.


Disclaimer

VibePatent is an AI tool, not a lawyer. It produces drafts for review. Always consult a qualified patent attorney before filing non-provisional applications.


Contributing

See CONTRIBUTING.md for development setup and guidelines.

Security

See SECURITY.md for the security model and vulnerability reporting.

License

Apache License 2.0 — see LICENSE.


Last updated: February 6, 2026

About

AI-powered patent application generator

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors