Spaces:
Sleeping
Sleeping
Commit ·
c300883
0
Parent(s):
Initial commit: Eddison Intelligence patent assistant
Browse files3-step AI-powered patent assistant (describe invention, search prior art, draft claims).
Single-file HTML/CSS/JS app using Claude API with demo fallback data.
Co-authored-by: Cursor <cursoragent@cursor.com>
Files changed (4)
- .gitignoreAdded+6
- README.mdAdded+31
- eddison-app.htmlAdded+1051
- eddison-slide.htmlAdded+266
123456.DS_Store*.swp*.swo*~.envnode_modules/12345678910111213141516171819202122232425262728293031# Eddison Intelligence – Patent Assistant
A 3-step AI-powered patent assistant that helps inventors go from idea to first claim draft.
## How It Works
1. **Describe Your Invention** — Type a description or upload notes. The app extracts technical keywords and suggests USPTO Kind Codes.2. **Prior Art Search** — Review and refine search parameters, then approve or reject patent results that could affect your claim.3. **Draft Claim** — AI generates a first-draft patent claim set (1 independent + 3 dependent claims) based on your invention and the approved prior art.
## Running Locally
Open `eddison-app.html` directly in your browser, or serve it with any static file server:
```bashpython3 -m http.server 8765# then open http://localhost:8765/eddison-app.html```
## Tech Stack
- Single-file HTML/CSS/JavaScript (no build step)- Claude API for keyword extraction, prior art search, and claim drafting- Falls back to demo data when API is unavailable
## Files
| File | Description ||------|-------------|| `eddison-app.html` | Main patent assistant application || `eddison-slide.html` | Presentation/slide deck |1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Eddison Intelligence – Patent Assistant</title><link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Mono:wght@300;400;500&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&display=swap" rel="stylesheet"><style>*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { --bg: #07090F; --surface: #0E1118; --surface2: #141821; --border: rgba(255,255,255,0.07); --border-active: rgba(200,241,53,0.4); --accent: #C8F135; --accent-dim: rgba(200,241,53,0.15); --red: #FF4757; --blue: #3B82F6; --text: #EDF0FF; --muted: rgba(237,240,255,0.45); --mono: 'DM Mono', monospace; --sans: 'DM Sans', sans-serif; --display: 'Bebas Neue', sans-serif;}
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); overflow-x: hidden;}
/* ─── NOISE OVERLAY ─── */body::after { content: ''; position: fixed; inset: 0; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E"); pointer-events: none; z-index: 9999; opacity: 0.4;}
/* ─── LAYOUT ─── */.app { display: grid; grid-template-rows: auto 1fr; min-height: 100vh;}
/* ─── HEADER ─── */header { display: flex; align-items: center; justify-content: space-between; padding: 20px 40px; border-bottom: 1px solid var(--border); background: rgba(7,9,15,0.9); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 100;}.logo { font-family: var(--display); font-size: 22px; letter-spacing: 0.15em; color: var(--text);}.logo span { color: var(--accent); }
.steps-nav { display: flex; align-items: center; gap: 4px;}.step-btn { display: flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 8px; border: none; background: transparent; cursor: pointer; font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--muted); transition: all 0.2s; position: relative;}.step-btn .num { width: 20px; height: 20px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; transition: all 0.2s;}.step-btn.active { color: var(--accent); }.step-btn.active .num { background: var(--accent-dim); border-color: var(--accent); color: var(--accent);}.step-btn.done { color: var(--muted); }.step-btn.done .num { background: rgba(200,241,53,0.08); border-color: rgba(200,241,53,0.3); color: rgba(200,241,53,0.6);}.step-divider { width: 28px; height: 1px; background: var(--border);}
/* ─── MAIN CONTENT ─── */main { display: grid; place-items: start center; padding: 48px 24px 80px;}
.panel { width: 100%; max-width: 820px; animation: fadeUp 0.4s ease both;}@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); }}
.panel-header { margin-bottom: 32px;}.panel-tag { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); font-weight: 500; margin-bottom: 10px;}.panel-title { font-family: var(--display); font-size: 48px; letter-spacing: 0.02em; line-height: 0.95; color: var(--text);}.panel-sub { font-size: 14px; color: var(--muted); margin-top: 10px; font-weight: 300;}
/* ─── CARDS / BOXES ─── */.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; margin-bottom: 16px; transition: border-color 0.2s;}.card:focus-within { border-color: var(--border-active); }
.card-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; font-weight: 500;}
textarea { width: 100%; background: transparent; border: none; outline: none; font-family: var(--sans); font-size: 14px; color: var(--text); resize: none; line-height: 1.6; font-weight: 300;}textarea::placeholder { color: rgba(237,240,255,0.2); }
/* ─── FILE UPLOAD ─── */.upload-zone { border: 1px dashed rgba(255,255,255,0.12); border-radius: 10px; padding: 24px; text-align: center; cursor: pointer; transition: all 0.2s; background: rgba(255,255,255,0.02);}.upload-zone:hover, .upload-zone.dragover { border-color: rgba(200,241,53,0.4); background: var(--accent-dim);}.upload-icon { font-size: 28px; margin-bottom: 8px; }.upload-text { font-size: 13px; color: var(--muted); font-weight: 300; }.upload-text strong { color: var(--accent); font-weight: 500; }#fileInput { display: none; }.file-attached { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--accent); background: var(--accent-dim); border-radius: 8px; padding: 10px 14px; margin-top: 12px;}
/* ─── OR DIVIDER ─── */.or-row { display: flex; align-items: center; gap: 16px; margin: 16px 0; color: var(--muted); font-size: 12px;}.or-row::before, .or-row::after { content: ''; flex: 1; height: 1px; background: var(--border);}
/* ─── TAGS (keywords / kind codes) ─── */.tags-area { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;}.tag { display: flex; align-items: center; gap: 6px; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; font-size: 12px; font-family: var(--mono); color: var(--text); cursor: pointer; transition: all 0.15s; user-select: none;}.tag:hover { border-color: rgba(200,241,53,0.3); }.tag.selected { background: var(--accent-dim); border-color: var(--accent); color: var(--accent);}.tag.kind-code { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); color: #93C5FD;}.tag.kind-code.selected { background: rgba(59,130,246,0.2); border-color: #3B82F6; color: #60A5FA;}.tag-remove { width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; opacity: 0.5; transition: opacity 0.15s; font-size: 14px; line-height: 1;}.tag-remove:hover { opacity: 1; }
.tag-input-row { display: flex; gap: 8px; margin-top: 12px;}.tag-input { flex: 1; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; font-family: var(--mono); font-size: 12px; color: var(--text); outline: none; transition: border-color 0.2s;}.tag-input:focus { border-color: var(--border-active); }.tag-input::placeholder { color: rgba(237,240,255,0.2); }
/* ─── BUTTONS ─── */.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; border-radius: 9px; border: none; font-family: var(--sans); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s; letter-spacing: 0.02em;}.btn-primary { background: var(--accent); color: #07090F;}.btn-primary:hover { background: #d4f54a; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(200,241,53,0.3); }.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }.btn-secondary { background: var(--surface2); border: 1px solid var(--border); color: var(--text);}.btn-secondary:hover { border-color: rgba(255,255,255,0.2); }.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); padding: 8px 14px; font-size: 12px;}.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.btn-row { display: flex; align-items: center; gap: 12px; margin-top: 24px;}
/* ─── LOADING SPINNER ─── */.spinner { width: 16px; height: 16px; border: 2px solid rgba(7,9,15,0.3); border-top-color: #07090F; border-radius: 50%; animation: spin 0.7s linear infinite;}@keyframes spin { to { transform: rotate(360deg); } }.spinner-accent { border-color: rgba(200,241,53,0.2); border-top-color: var(--accent);}
/* ─── PRIOR ART RESULTS ─── */.prior-art-list { display: flex; flex-direction: column; gap: 12px; }.prior-art-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; cursor: pointer; transition: all 0.2s; position: relative;}.prior-art-item:hover { border-color: rgba(255,255,255,0.15); }.prior-art-item.approved { border-color: var(--accent); background: rgba(200,241,53,0.04);}.prior-art-item.rejected { border-color: rgba(255,71,87,0.3); background: rgba(255,71,87,0.03); opacity: 0.5;}.pa-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px;}.pa-title { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.3; }.pa-num { font-family: var(--mono); font-size: 11px; color: var(--accent); background: var(--accent-dim); padding: 3px 8px; border-radius: 4px; white-space: nowrap; flex-shrink: 0;}.pa-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; font-weight: 300; }.pa-abstract { font-size: 13px; color: rgba(237,240,255,0.6); line-height: 1.55; font-weight: 300; }.pa-actions { display: flex; gap: 8px; margin-top: 14px;}.approve-btn { padding: 6px 14px; font-size: 12px; border-radius: 6px; border: none; cursor: pointer; background: var(--accent-dim); border: 1px solid rgba(200,241,53,0.3); color: var(--accent); font-family: var(--sans); font-weight: 500; transition: all 0.15s;}.approve-btn:hover { background: rgba(200,241,53,0.25); }.approve-btn.active { background: var(--accent); color: #07090F; }.reject-btn { padding: 6px 14px; font-size: 12px; border-radius: 6px; border: 1px solid rgba(255,71,87,0.2); color: rgba(255,71,87,0.6); background: transparent; cursor: pointer; font-family: var(--sans); transition: all 0.15s;}.reject-btn:hover { border-color: var(--red); color: var(--red); }.reject-btn.active { background: rgba(255,71,87,0.1); border-color: var(--red); color: var(--red); }
.approved-count { font-size: 12px; color: var(--muted); margin-top: 6px;}.approved-count strong { color: var(--accent); }
/* ─── CLAIM DRAFT ─── */.claim-output { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;}.claim-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface2);}.claim-toolbar-left { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 500;}.claim-content { padding: 28px; font-size: 14px; line-height: 1.8; color: rgba(237,240,255,0.85); font-weight: 300; white-space: pre-wrap; font-family: var(--sans); min-height: 300px;}.claim-content[contenteditable="true"] { outline: none; }.claim-content[contenteditable="true"]:focus { background: rgba(255,255,255,0.01);}.claim-num { font-family: var(--mono); font-size: 12px; color: var(--accent); font-weight: 400;}
/* ─── STATUS BADGE ─── */.status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 20px;}.status-badge.generating { background: rgba(59,130,246,0.15); color: #93C5FD; border: 1px solid rgba(59,130,246,0.3);}.status-badge.done { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(200,241,53,0.3);}
/* ─── SECTION DIVIDERS ─── */.section-gap { margin-top: 24px; }
/* ─── EMPTY STATE ─── */.empty-state { text-align: center; padding: 60px 40px; color: var(--muted); font-size: 14px; font-weight: 300;}.empty-icon { font-size: 40px; margin-bottom: 12px; }
/* ─── COPY BUTTON FEEDBACK ─── */.copied { color: var(--accent) !important; }</style></head><body><div class="app"> <header> <div class="logo"><span>EDDISON</span> INTELLIGENCE</div> <nav class="steps-nav"> <button class="step-btn active" id="nav1" onclick="goToStep(1)"> <span class="num">1</span> Idea & Codes </button> <div class="step-divider"></div> <button class="step-btn" id="nav2" onclick="goToStep(2)"> <span class="num">2</span> Prior Art Search </button> <div class="step-divider"></div> <button class="step-btn" id="nav3" onclick="goToStep(3)"> <span class="num">3</span> Draft Claim </button> </nav> <div style="width:200px"></div> </header>
<main> <!-- ══════════════ STEP 1 ══════════════ --> <div class="panel" id="step1"> <div class="panel-header"> <div class="panel-tag">Step 01 / 03</div> <div class="panel-title">Describe Your<br>Invention</div> <div class="panel-sub">Type a description or upload notes — we'll extract keywords and suggest USPTO Kind Codes.</div> </div>
<div class="card"> <div class="card-label">Describe your invention</div> <textarea id="ideaText" rows="5" placeholder="e.g. A machine learning system that automatically classifies patent applications and routes them to the correct examiner based on technical field..."></textarea> </div>
<div class="or-row">or</div>
<div class="card" style="padding:20px"> <div class="card-label">Upload notes or documents</div> <div class="upload-zone" id="uploadZone" onclick="document.getElementById('fileInput').click()"> <div class="upload-icon">📄</div> <div class="upload-text"><strong>Click to upload</strong> or drag & drop a .txt or .pdf file</div> </div> <input type="file" id="fileInput" accept=".txt,.pdf,.doc,.docx" onchange="handleFile(event)"> <div id="fileAttached" style="display:none"></div> </div>
<div class="btn-row"> <button class="btn btn-primary" id="analyzeBtn" onclick="analyzeIdea()"> ✦ Analyze & Extract Keywords </button> </div>
<div id="extractedSection" style="display:none" class="section-gap"> <div class="card"> <div class="card-label">Extracted Keywords — click to toggle selection</div> <div class="tags-area" id="keywordTags"></div> <div class="tag-input-row"> <input class="tag-input" id="kwInput" placeholder="+ Add keyword..." onkeydown="addTagOnEnter(event,'keyword')"> <button class="btn btn-ghost" onclick="addTag('keyword')">Add</button> </div> </div>
<div class="card section-gap"> <div class="card-label">Suggested USPTO Kind Codes <span style="font-size:10px;color:var(--muted);margin-left:8px;text-transform:none;letter-spacing:0"> (e.g. A1=Published App, B1=Granted Patent, B2=Reissue...) </span> </div> <div class="tags-area" id="kindCodeTags"></div> <div class="tag-input-row"> <input class="tag-input" id="kcInput" placeholder="+ Add kind code..." onkeydown="addTagOnEnter(event,'kindcode')"> <button class="btn btn-ghost" onclick="addTag('kindcode')">Add</button> </div> </div>
<div class="btn-row"> <button class="btn btn-primary" onclick="goToStep(2)">Continue to Prior Art Search →</button> </div> </div> </div>
<!-- ══════════════ STEP 2 ══════════════ --> <div class="panel" id="step2" style="display:none"> <div class="panel-header"> <div class="panel-tag">Step 02 / 03</div> <div class="panel-title">Prior Art<br>Search</div> <div class="panel-sub">Review your search parameters, then approve or reject results to inform your claim.</div> </div>
<div class="card"> <div class="card-label">Search Keywords</div> <div class="tags-area" id="searchKeywords"></div> <div class="tag-input-row"> <input class="tag-input" id="skInput" placeholder="+ Add keyword..." onkeydown="addSearchTagOnEnter(event,'kw')"> <button class="btn btn-ghost" onclick="addSearchTag('kw')">Add</button> </div> </div>
<div class="card"> <div class="card-label">Kind Codes to Include</div> <div class="tags-area" id="searchKindCodes"></div> </div>
<div class="btn-row"> <button class="btn btn-primary" id="searchBtn" onclick="runPriorArtSearch()"> ⌕ Search Prior Art </button> <button class="btn btn-secondary" onclick="goToStep(1)">← Back</button> </div>
<div id="priorArtResults" class="section-gap" style="display:none"> <div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:16px"> <div style="font-family:var(--display);font-size:22px;letter-spacing:0.05em">Results</div> <div class="approved-count" id="approvedCount"></div> </div> <div class="prior-art-list" id="paList"></div>
<div class="btn-row" style="margin-top:24px"> <button class="btn btn-primary" id="proceedBtn" onclick="goToStep(3)"> Draft Claim from Approved Art → </button> <button class="btn btn-secondary" onclick="runPriorArtSearch()">Re-search</button> </div> </div> </div>
<!-- ══════════════ STEP 3 ══════════════ --> <div class="panel" id="step3" style="display:none"> <div class="panel-header"> <div class="panel-tag">Step 03 / 03</div> <div class="panel-title">First Claim<br>Draft</div> <div class="panel-sub">AI-drafted independent and dependent claims based on your invention and approved prior art. Edit inline.</div> </div>
<div id="claimLoading" class="card" style="text-align:center;padding:60px"> <div style="display:flex;justify-content:center;margin-bottom:16px"> <div class="spinner spinner-accent" style="width:28px;height:28px;border-width:3px"></div> </div> <div style="color:var(--muted);font-size:13px">Drafting patent claims...</div> </div>
<div id="claimOutputWrap" style="display:none"> <div class="claim-output"> <div class="claim-toolbar"> <div class="claim-toolbar-left">Patent Claims Draft</div> <div style="display:flex;gap:8px;align-items:center"> <span class="status-badge done" id="claimStatus">✓ Draft Ready</span> <button class="btn btn-ghost" onclick="copyClaim()">Copy</button> </div> </div> <div class="claim-content" id="claimContent" contenteditable="true"></div> </div>
<div class="btn-row" style="margin-top:20px"> <button class="btn btn-primary" onclick="copyClaim()">Copy to Clipboard</button> <button class="btn btn-secondary" onclick="regenerateClaim()">Regenerate</button> <button class="btn btn-ghost" onclick="goToStep(2)">← Back to Prior Art</button> </div> </div> </div> </main></div>
<script>// ─── STATE ───────���───────────────────────────────────────────────────────────const state = { ideaText: '', keywords: [], selectedKeywords: [], kindCodes: [], selectedKindCodes: [], priorArt: [], approvedArt: [], claimDraft: ''};
// ─── NAVIGATION ──────────────────────────────────────────────────────────────function goToStep(n) { [1,2,3].forEach(i => { document.getElementById(`step${i}`).style.display = 'none'; document.getElementById(`nav${i}`).className = 'step-btn'; }); document.getElementById(`step${n}`).style.display = 'block'; document.getElementById(`nav${n}`).className = 'step-btn active'; // mark previous as done for(let i = 1; i < n; i++) document.getElementById(`nav${i}`).className = 'step-btn done'; window.scrollTo({ top: 0, behavior: 'smooth' }); if (n === 2) populateSearchPanel(); if (n === 3) generateClaim();}
// ─── STEP 1: FILE HANDLING ───────────────────────────────────────────────────const uploadZone = document.getElementById('uploadZone');uploadZone.addEventListener('dragover', e => { e.preventDefault(); uploadZone.classList.add('dragover'); });uploadZone.addEventListener('dragleave', () => uploadZone.classList.remove('dragover'));uploadZone.addEventListener('drop', e => { e.preventDefault(); uploadZone.classList.remove('dragover'); const file = e.dataTransfer.files[0]; if (file) processFile(file);});
function handleFile(e) { processFile(e.target.files[0]); }
function processFile(file) { const div = document.getElementById('fileAttached'); div.style.display = 'flex'; div.innerHTML = `<span>📎</span><span>${file.name}</span>`; if (file.type === 'text/plain' || file.name.endsWith('.txt')) { const reader = new FileReader(); reader.onload = e => { document.getElementById('ideaText').value = e.target.result.slice(0, 3000); }; reader.readAsText(file); } else { document.getElementById('ideaText').value = `[Uploaded: ${file.name} — text extraction simulated for demo]`; }}
// ─── STEP 1: ANALYZE ─────────────────────────────────────────────────────────async function analyzeIdea() { const text = document.getElementById('ideaText').value.trim(); if (!text) { document.getElementById('ideaText').focus(); return; } state.ideaText = text;
const btn = document.getElementById('analyzeBtn'); btn.disabled = true; btn.innerHTML = '<div class="spinner"></div> Analyzing...';
try { const response = await fetch("https://api.anthropic.com/v1/messages", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ model: "claude-sonnet-4-20250514", max_tokens: 1000, system: `You are a USPTO patent expert. Given an invention description, extract:1. 8-12 specific technical keywords/phrases for prior art search (precise, domain-specific)2. 4-6 relevant USPTO Kind Codes with a one-line reason each
Respond ONLY with valid JSON in this exact format, no markdown:{ "keywords": ["keyword1", "keyword2", ...], "kindCodes": [ {"code": "A1", "label": "Published Application", "reason": "relevant because..."}, ... ]}`, messages: [{ role: "user", content: `Invention: ${text}` }] }) }); const data = await response.json(); const raw = data.content.map(c => c.text || '').join(''); const clean = raw.replace(/```json|```/g, '').trim(); const parsed = JSON.parse(clean);
state.keywords = parsed.keywords || []; state.kindCodes = parsed.kindCodes || []; state.selectedKeywords = [...state.keywords]; state.selectedKindCodes = state.kindCodes.map(k => k.code);
renderKeywords(); renderKindCodes(); document.getElementById('extractedSection').style.display = 'block'; document.getElementById('extractedSection').scrollIntoView({ behavior: 'smooth', block: 'start' }); } catch (err) { // Fallback demo data state.keywords = ['machine learning classification', 'patent routing', 'examiner assignment', 'NLP text analysis', 'USPTO workflow', 'automated categorization', 'claim parsing', 'IPC code mapping']; state.kindCodes = [ { code: 'A1', label: 'Published App', reason: 'Primary search target for published applications' }, { code: 'B1', label: 'Granted Patent', reason: 'Granted patents in AI/ML automation space' }, { code: 'B2', label: 'Grant (amended)', reason: 'Amended grants in document classification' }, { code: 'A2', label: 'Republication', reason: 'Republished applications worth reviewing' }, ]; state.selectedKeywords = [...state.keywords]; state.selectedKindCodes = state.kindCodes.map(k => k.code); renderKeywords(); renderKindCodes(); document.getElementById('extractedSection').style.display = 'block'; document.getElementById('extractedSection').scrollIntoView({ behavior: 'smooth', block: 'start' }); }
btn.disabled = false; btn.innerHTML = '✦ Re-analyze';}
function renderKeywords() { const container = document.getElementById('keywordTags'); container.innerHTML = ''; state.keywords.forEach((kw, i) => { const tag = document.createElement('div'); tag.className = 'tag' + (state.selectedKeywords.includes(kw) ? ' selected' : ''); tag.innerHTML = `${kw}<span class="tag-remove" onclick="removeTag(event,'keyword',${i})">×</span>`; tag.onclick = (e) => { if (!e.target.classList.contains('tag-remove')) toggleKeyword(kw, tag); }; container.appendChild(tag); });}
function renderKindCodes() { const container = document.getElementById('kindCodeTags'); container.innerHTML = ''; state.kindCodes.forEach((kc, i) => { const tag = document.createElement('div'); const selected = state.selectedKindCodes.includes(kc.code); tag.className = 'tag kind-code' + (selected ? ' selected' : ''); tag.title = kc.reason || ''; tag.innerHTML = `<strong>${kc.code}</strong> — ${kc.label}<span class="tag-remove" onclick="removeKindCode(event,${i})">×</span>`; tag.onclick = (e) => { if (!e.target.classList.contains('tag-remove')) toggleKindCode(kc.code, tag); }; container.appendChild(tag); });}
function toggleKeyword(kw, el) { const idx = state.selectedKeywords.indexOf(kw); if (idx > -1) { state.selectedKeywords.splice(idx, 1); el.classList.remove('selected'); } else { state.selectedKeywords.push(kw); el.classList.add('selected'); }}function toggleKindCode(code, el) { const idx = state.selectedKindCodes.indexOf(code); if (idx > -1) { state.selectedKindCodes.splice(idx, 1); el.classList.remove('selected'); } else { state.selectedKindCodes.push(code); el.classList.add('selected'); }}function removeTag(e, type, i) { e.stopPropagation(); state.keywords.splice(i, 1); state.selectedKeywords = state.selectedKeywords.filter(k => state.keywords.includes(k)); renderKeywords();}function removeKindCode(e, i) { e.stopPropagation(); const code = state.kindCodes[i].code; state.kindCodes.splice(i, 1); state.selectedKindCodes = state.selectedKindCodes.filter(c => c !== code); renderKindCodes();}function addTagOnEnter(e, type) { if (e.key === 'Enter') addTag(type); }function addTag(type) { if (type === 'keyword') { const val = document.getElementById('kwInput').value.trim(); if (val && !state.keywords.includes(val)) { state.keywords.push(val); state.selectedKeywords.push(val); renderKeywords(); } document.getElementById('kwInput').value = ''; } else { const val = document.getElementById('kcInput').value.trim().toUpperCase(); if (val && !state.kindCodes.find(k => k.code === val)) { state.kindCodes.push({ code: val, label: val, reason: '' }); state.selectedKindCodes.push(val); renderKindCodes(); } document.getElementById('kcInput').value = ''; }}
// ─── STEP 2: POPULATE SEARCH PANEL ───────────────────────────────────────────function populateSearchPanel() { const kwContainer = document.getElementById('searchKeywords'); kwContainer.innerHTML = ''; state.selectedKeywords.forEach((kw, i) => { const tag = document.createElement('div'); tag.className = 'tag selected'; tag.dataset.kw = kw; tag.innerHTML = `${kw}<span class="tag-remove" onclick="removeSearchKw(event,'${kw}')">×</span>`; kwContainer.appendChild(tag); });
const kcContainer = document.getElementById('searchKindCodes'); kcContainer.innerHTML = ''; state.selectedKindCodes.forEach(code => { const tag = document.createElement('div'); const kc = state.kindCodes.find(k => k.code === code); tag.className = 'tag kind-code selected'; tag.innerHTML = `<strong>${code}</strong>${kc ? ' — ' + kc.label : ''}`; kcContainer.appendChild(tag); });}
function removeSearchKw(e, kw) { e.stopPropagation(); e.target.closest('.tag').remove();}function addSearchTagOnEnter(e, type) { if (e.key === 'Enter') addSearchTag(type); }function addSearchTag(type) { const val = document.getElementById('skInput').value.trim(); if (!val) return; const kwContainer = document.getElementById('searchKeywords'); const tag = document.createElement('div'); tag.className = 'tag selected'; tag.innerHTML = `${val}<span class="tag-remove" onclick="this.closest('.tag').remove()">×</span>`; kwContainer.appendChild(tag); document.getElementById('skInput').value = '';}
function getSearchKeywords() { return [...document.querySelectorAll('#searchKeywords .tag')].map(t => t.dataset.kw || t.textContent.replace('×','').trim());}
// ─── STEP 2: SEARCH ───────────────────────────────────────────────────────────async function runPriorArtSearch() { const btn = document.getElementById('searchBtn'); btn.disabled = true; btn.innerHTML = '<div class="spinner"></div> Searching...'; document.getElementById('priorArtResults').style.display = 'none';
const keywords = getSearchKeywords(); const codes = state.selectedKindCodes;
try { const response = await fetch("https://api.anthropic.com/v1/messages", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ model: "claude-sonnet-4-20250514", max_tokens: 1000, system: `You are a USPTO patent database expert. Simulate a prior art search and return 5 realistic patent results.Respond ONLY with valid JSON array, no markdown:[ { "patentNumber": "US10,XXX,XXX B1", "title": "...", "assignee": "Company Name", "year": 2020, "kindCode": "B1", "abstract": "2-3 sentence abstract describing the patent..." }, ...]`, messages: [{ role: "user", content: `Search for prior art with keywords: ${keywords.join(', ')}. Kind codes: ${codes.join(', ')}. Invention context: ${state.ideaText.slice(0,400)}` }] }) }); const data = await response.json(); const raw = data.content.map(c => c.text || '').join(''); const clean = raw.replace(/```json|```/g, '').trim(); state.priorArt = JSON.parse(clean); } catch(err) { state.priorArt = [ { patentNumber: 'US10,846,621 B1', title: 'Automated Patent Classification Using Deep Neural Networks', assignee: 'IBM Corporation', year: 2020, kindCode: 'B1', abstract: 'A system and method for automatically classifying patent applications using convolutional neural networks trained on historical USPTO filing data. The system extracts feature vectors from claim language and maps them to CPC classification codes.' }, { patentNumber: 'US11,023,533 B2', title: 'Natural Language Processing for Legal Document Routing', assignee: 'Microsoft Corporation', year: 2021, kindCode: 'B2', abstract: 'Disclosed is a document routing system employing transformer-based language models to analyze legal text and determine appropriate reviewers. The system integrates with existing workflow management platforms.' }, { patentNumber: 'US2022/0147798 A1', title: 'Machine Learning-Based Examiner Assignment in Patent Office Workflows', assignee: 'LexisNexis Group', year: 2022, kindCode: 'A1', abstract: 'A method for optimizing patent examiner workload using reinforcement learning to match application complexity with examiner specialization. Performance metrics are fed back to continuously improve assignment accuracy.' }, { patentNumber: 'US10,235,447 B1', title: 'Automated Prior Art Search Using Semantic Embedding', assignee: 'Google LLC', year: 2019, kindCode: 'B1', abstract: 'Systems and methods for conducting prior art searches by encoding patent claims into dense vector representations and performing approximate nearest neighbor search across a corpus of existing patents.' }, { patentNumber: 'US11,501,102 A1', title: 'End-to-End Patent Prosecution Automation System', assignee: 'Clarivate Analytics', year: 2022, kindCode: 'A1', abstract: 'A comprehensive platform that automates patent prosecution activities from filing through examination, including automated response generation, docketing, and deadline tracking using AI-assisted workflows.' }, ]; }
state.approvedArt = []; renderPriorArt(); document.getElementById('priorArtResults').style.display = 'block'; document.getElementById('priorArtResults').scrollIntoView({ behavior: 'smooth' }); btn.disabled = false; btn.innerHTML = '⌕ Re-Search';}
function renderPriorArt() { const list = document.getElementById('paList'); list.innerHTML = ''; state.priorArt.forEach((pa, i) => { const div = document.createElement('div'); div.className = 'prior-art-item'; div.id = `pa-${i}`; div.innerHTML = ` <div class="pa-header"> <div class="pa-title">${pa.title}</div> <div class="pa-num">${pa.patentNumber}</div> </div> <div class="pa-meta">${pa.assignee} · ${pa.year} · Kind Code: <strong>${pa.kindCode}</strong></div> <div class="pa-abstract">${pa.abstract}</div> <div class="pa-actions"> <button class="approve-btn" id="approve-${i}" onclick="approvePA(${i})">✓ Approve</button> <button class="reject-btn" id="reject-${i}" onclick="rejectPA(${i})">✕ Reject</button> </div> `; list.appendChild(div); }); updateApprovedCount();}
function approvePA(i) { const item = document.getElementById(`pa-${i}`); const approveBtn = document.getElementById(`approve-${i}`); const rejectBtn = document.getElementById(`reject-${i}`); item.classList.remove('rejected'); item.classList.toggle('approved'); approveBtn.classList.toggle('active'); rejectBtn.classList.remove('active');
if (state.approvedArt.includes(i)) { state.approvedArt = state.approvedArt.filter(x => x !== i); } else { state.approvedArt.push(i); state.approvedArt = state.approvedArt.filter(x => !rejectState.includes(x)); } updateApprovedCount();}
// simple reject stateconst rejectState = [];function rejectPA(i) { const item = document.getElementById(`pa-${i}`); const approveBtn = document.getElementById(`approve-${i}`); const rejectBtn = document.getElementById(`reject-${i}`); item.classList.remove('approved'); item.classList.toggle('rejected'); rejectBtn.classList.toggle('active'); approveBtn.classList.remove('active'); state.approvedArt = state.approvedArt.filter(x => x !== i); updateApprovedCount();}
function updateApprovedCount() { const n = state.approvedArt.length; document.getElementById('approvedCount').innerHTML = n > 0 ? `<strong>${n}</strong> approved for claim drafting` : 'Approve at least 1 result to proceed'; document.getElementById('proceedBtn').disabled = n === 0; document.getElementById('proceedBtn').style.opacity = n === 0 ? '0.4' : '1';}
// ─── STEP 3: CLAIM GENERATION ─────────────────────────────────────────────────async function generateClaim() { document.getElementById('claimLoading').style.display = 'block'; document.getElementById('claimOutputWrap').style.display = 'none';
const approvedPatents = state.approvedArt.map(i => state.priorArt[i]); const priorArtSummary = approvedPatents.map(p => `- ${p.patentNumber}: "${p.title}" (${p.assignee}, ${p.year}): ${p.abstract}` ).join('\n');
try { const response = await fetch("https://api.anthropic.com/v1/messages", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ model: "claude-sonnet-4-20250514", max_tokens: 1000, system: `You are a senior USPTO patent attorney. Write a professional first-draft patent claim set. Format: 1 independent claim + 3 dependent claims. Use proper patent claim language (wherein, comprising, wherein said...).Number each claim. Be precise and technically accurate. Distinguish from the provided prior art.`, messages: [{ role: "user", content: `Invention: ${state.ideaText}\n\nPrior Art to distinguish from:\n${priorArtSummary}\n\nDraft the claim set.` }] }) }); const data = await response.json(); state.claimDraft = data.content.map(c => c.text || '').join('').trim(); } catch(err) { state.claimDraft = `1. A computer-implemented system for automated patent application processing, the system comprising: a natural language processing module configured to receive and parse a patent application document; a classification engine operatively coupled to the natural language processing module, wherein the classification engine is trained on a corpus of historical patent applications to assign Cooperative Patent Classification (CPC) codes; a routing module configured to assign a qualified patent examiner based on the assigned CPC codes and examiner specialization profiles; and a workflow management interface configured to track prosecution status and generate automated deadline notifications; wherein the system is further configured to continuously update the classification engine based on examination outcomes.
2. The system of claim 1, wherein the classification engine comprises a transformer-based neural network architecture fine-tuned on USPTO patent application data.
3. The system of claim 1, wherein the routing module applies a reinforcement learning algorithm to optimize examiner assignment based on historical performance metrics.
4. The system of claim 1, further comprising an anomaly detection module configured to flag applications with unusual claim structures or non-standard terminology for human review prior to routing.`; }
document.getElementById('claimContent').innerText = state.claimDraft; document.getElementById('claimLoading').style.display = 'none'; document.getElementById('claimOutputWrap').style.display = 'block';}
async function regenerateClaim() { document.getElementById('claimOutputWrap').style.display = 'none'; await generateClaim();}
function copyClaim() { const text = document.getElementById('claimContent').innerText; navigator.clipboard.writeText(text).then(() => { const btn = event.target; const orig = btn.textContent; btn.textContent = '✓ Copied!'; btn.classList.add('copied'); setTimeout(() => { btn.textContent = orig; btn.classList.remove('copied'); }, 2000); });}</script></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Eddison Intelligence – Problem & Solution</title><link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet"><style> *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { --bg: #060810; --accent: #C8F135; --accent2: #3B82F6; --text: #F0F2FF; --muted: #6B7280; --card-bg: rgba(255,255,255,0.04); --border: rgba(255,255,255,0.08); }
body { background: var(--bg); font-family: 'DM Sans', sans-serif; color: var(--text); display: flex; align-items: center; justify-content: center; min-height: 100vh; overflow: hidden; }
.slide { width: 960px; height: 540px; position: relative; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; padding: 52px 60px 48px; box-shadow: 0 0 120px rgba(200,241,53,0.06), 0 40px 100px rgba(0,0,0,0.7); }
/* Background grid */ .slide::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px); background-size: 60px 60px; pointer-events: none; }
/* Accent glow blobs */ .blob1 { position: absolute; width: 320px; height: 320px; background: radial-gradient(circle, rgba(200,241,53,0.12) 0%, transparent 70%); top: -80px; left: -60px; pointer-events: none; } .blob2 { position: absolute; width: 280px; height: 280px; background: radial-gradient(circle, rgba(59,130,246,0.10) 0%, transparent 70%); bottom: -60px; right: 100px; pointer-events: none; }
/* Top tag */ .tag { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 28px; } .tag-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; } @keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.4); } }
/* Main headline */ .headline { font-family: 'Bebas Neue', sans-serif; font-size: 72px; line-height: 0.92; letter-spacing: 0.01em; color: var(--text); margin-bottom: 40px; position: relative; z-index: 1; } .headline em { font-style: normal; color: var(--accent); }
/* Two-column cards */ .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; flex: 1; position: relative; z-index: 1; }
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 24px 26px; position: relative; overflow: hidden; animation: fadeUp 0.6s ease both; } .card.problem { animation-delay: 0.1s; } .card.solution { animation-delay: 0.25s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; } .card.problem::before { background: #EF4444; } .card.solution::before { background: var(--accent); }
.card-label { font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 12px; } .card.problem .card-label { color: #EF4444; } .card.solution .card-label { color: var(--accent); }
.card-title { font-family: 'Bebas Neue', sans-serif; font-size: 28px; letter-spacing: 0.04em; color: var(--text); margin-bottom: 14px; line-height: 1; }
.points { list-style: none; display: flex; flex-direction: column; gap: 8px; } .points li { font-size: 13px; font-weight: 300; color: rgba(240,242,255,0.72); display: flex; align-items: flex-start; gap: 9px; line-height: 1.4; } .points li::before { content: ''; display: block; width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; margin-top: 1px; } .card.problem .points li::before { background: rgba(239,68,68,0.25); border: 1px solid #EF4444; } .card.solution .points li::before { background: rgba(200,241,53,0.2); border: 1px solid var(--accent); }
/* Arrow between cards */ .arrow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; background: var(--bg); border: 1px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 10; animation: fadeUp 0.5s 0.4s ease both; } .arrow svg { width: 14px; height: 14px; }
/* Logo / footer */ .footer { position: absolute; bottom: 24px; right: 60px; font-family: 'Bebas Neue', sans-serif; font-size: 15px; letter-spacing: 0.2em; color: rgba(240,242,255,0.25); z-index: 2; } .footer span { color: var(--accent); }</style></head><body><div class="slide"> <div class="blob1"></div> <div class="blob2"></div>
<div class="tag"><span class="tag-dot"></span> Eddison Intelligence</div>
<div class="headline">Patent Filing<br>is <em>Broken.</em><br>We Fixed It.</div>
<div class="cards"> <div class="card problem"> <div class="card-label">The Problem</div> <div class="card-title">Hours of Manual Work Per Filing</div> <ul class="points"> <li>Lawyers spend 10–20 hrs drafting & formatting each patent application</li> <li>High error rates lead to costly rejections and refilings</li> <li>USPTO compliance rules change frequently, creating constant rework</li> </ul> </div>
<div class="arrow"> <svg viewBox="0 0 24 24" fill="none" stroke="#C8F135" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M5 12h14M13 6l6 6-6 6"/> </svg> </div>
<div class="card solution"> <div class="card-label">Our Solution</div> <div class="card-title">Auto-File in Minutes, Not Days</div> <ul class="points"> <li>AI drafts, formats, and validates patent applications end-to-end</li> <li>Real-time USPTO compliance checks eliminate rejection risk</li> <li>One-click filing — lawyers review, not rewrite</li> </ul> </div> </div>
<div class="footer"><span>EDDISON</span> INTELLIGENCE</div></div></body></html>.gitignoreAdded+6
README.mdAdded+31
eddison-app.htmlAdded+1051
eddison-slide.htmlAdded+266