pocket-phd / index.html
PabloRod11's picture
Improve research controls, private checkpoints and evidence selection
e40787d verified
Raw History Blame Contribute Delete
7.62 kB
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Pocket PhD · Research workbench</title><link rel="stylesheet" href="./style.css"><script src="./research.js" defer></script><script src="./app.js" defer></script></head>
<body><a class="skip" href="#question">Skip to research question</a><header><a class="brand" href="./" aria-label="Pocket PhD home"><span class="brand-mark" aria-hidden="true">PhD</span><span>Pocket PhD<small>Research notebook</small></span></a><span class="local-tag">Local AI workspace</span></header>
<main><section class="intro"><div class="eyebrow">New investigation</div><h1>What would you like to find out?</h1><p>Work from published evidence to candidate hypotheses and a testable plan.</p></section>
<div class="workspace"><section class="composer panel" aria-labelledby="compose-title"><div class="section-top"><div><h2 id="compose-title">Research question</h2></div><button type="button" id="example" class="text-button">Use example</button></div><form id="research-form"><label class="sr-only" for="question">Research question</label><textarea id="question" required minlength="10" maxlength="2000" rows="4" placeholder="Ask a specific question about a phenomenon, population, or mechanism."></textarea><details class="evidence-input"><summary>Add your own evidence <span>optional</span></summary><label for="evidence-title">Source title</label><input id="evidence-title" maxlength="1000"><label for="evidence-url">Source URL</label><input id="evidence-url" type="url" maxlength="2000"><label for="evidence-excerpt">Relevant excerpt</label><textarea id="evidence-excerpt" maxlength="20000" rows="3"></textarea><button id="add-evidence" type="button">Add evidence</button><label for="evidence-file">Import evidence JSON</label><input id="evidence-file" type="file" accept=".json,application/json" aria-describedby="import-help"><p id="import-help" class="hint">Import a source array from the local companion. Files stay on this device. Maximum 20 records and 500,000 bytes; pasted JSON is limited to 250,000 characters.</p><label for="sources">Paste sources as a JSON array</label><p class="hint">Each source needs a title. Optional: URL, abstract or excerpt, year, and authors. Your text becomes evidence; the tool does not verify pasted claims. Titles may contain up to 1,000 characters, URLs 2,000, and excerpts 20,000.</p><textarea id="sources" maxlength="250000" aria-describedby="import-help" rows="6" placeholder='[{"title":"Paper title","url":"https://…","abstract":"Relevant findings…","year":2025}]'></textarea><details class="model-context"><summary>Preview Local AI evidence context</summary><p class="hint">Choose up to six pasted records. Without a selection, Local AI uses the first six records, title text up to 200 characters, and the first 800 characters of each excerpt. Full records remain in your notebook. Crossref results are appended after pasted records and fill the default first-six selection only. To choose retrieved records individually, import their JSON before starting; the method demo does not interpret evidence.</p><div id="context-preview"></div></details></details><fieldset><legend>Research mode</legend><div class="modes"><label><input type="radio" name="mode" value="demo" checked><span><strong>Method demo</strong><small>Deterministic, illustrative reasoning</small></span></label><label id="live-label" class="unavailable"><input type="radio" name="mode" value="live" disabled><span><strong>Local AI · experimental</strong><small id="live-note">Checking browser support…</small></span></label></div></fieldset><div class="local-ai"><button id="cancel-model" type="button" hidden>Cancel model loading</button><button id="load-model" type="button">Load free local AI</button><p id="model-status" class="hint" role="status">Downloads a model to your browser (about 1 GB). Requires WebGPU and sufficient device memory. No API key or paid service.</p></div><label class="retrieve"><input type="checkbox" id="retrieve"> Retrieve scholarly records from Crossref</label><label class="search-label" for="search-query">Literature search terms <span class="hint">optional</span></label><input class="search-query" id="search-query" maxlength="500" placeholder="e.g. retrieval practice sleep memory"><p class="hint">When retrieval is enabled, search terms—or your research question if terms are blank—are sent to Crossref. Records may lack abstracts; this is not a full-text review. Notes and AI reasoning stay on your device.</p><label><input id="private-session" type="checkbox"> Private session — do not save or change notebook data</label><div class="form-bottom"><p class="hint">Hypotheses are proposals, not discoveries.<br>Novelty requires expert review and a broader literature search.</p><button type="button" id="stop-run" hidden>Stop investigation</button><button type="submit" id="run-button" class="primary">Start method demo</button></div></form><div id="status" role="status" aria-live="polite" hidden></div></section><aside class="sidebar"><section class="panel team"><h2>Research method</h2><ol><li><span>01</span><div>Question Framer<small>Define scope & assumptions</small></div></li><li><span>02</span><div>Literature Scout<small>Assemble the evidence</small></div></li><li><span>03</span><div>Gap Analyst<small>Find unanswered questions</small></div></li><li><span>04</span><div>Hypothesis Architect<small>Propose causal explanations</small></div></li><li><span>05</span><div>Skeptic<small>Challenge novelty & inference</small></div></li><li><span>06</span><div>Experiment Designer<small>Make predictions testable</small></div></li></ol></section><section class="history"><div class="section-top"><h3>Research notebook</h3><button id="refresh-history" class="text-button" aria-label="Refresh research history">↻</button></div><button id="clear-notebook" type="button">Clear notebook…</button><div id="history-list"><p class="hint">Loading previous investigations…</p></div></section></aside></div>
<section id="results" hidden aria-labelledby="results-title"><div class="results-header"><div><div class="eyebrow" id="run-mode">INVESTIGATION</div><h2 id="results-title" tabindex="-1"></h2></div><div class="exports"><button id="export-md">Export notes ↓</button><button id="export-json">JSON ↓</button><button id="delete-run">Delete</button></div></div><div id="result-notice" class="notice"></div><nav role="tablist" class="tabs" aria-label="Research results"><button role="tab" id="tab-findings" aria-controls="findings" aria-selected="true" tabindex="0" data-tab="findings">Findings</button><button role="tab" id="tab-evidence" aria-controls="evidence" aria-selected="false" tabindex="-1" data-tab="evidence">Evidence library</button><button role="tab" id="tab-agents" aria-controls="agents" aria-selected="false" tabindex="-1" data-tab="agents">Agent notebook</button></nav><div id="findings" role="tabpanel" aria-labelledby="tab-findings" class="tab-panel"><div class="findings-grid"><section><h3>Knowledge gaps</h3><div id="gaps"></div></section><section><h3>Candidate hypotheses</h3><div id="hypotheses"></div></section></div><section class="limits"><h3>Limits of this investigation</h3><div id="limitations"></div></section></div><div id="evidence" role="tabpanel" aria-labelledby="tab-evidence" class="tab-panel" hidden></div><div id="agents" role="tabpanel" aria-labelledby="tab-agents" class="tab-panel" hidden></div></section>
<footer><span>Pocket PhD</span><p>Research notebook</p></footer></main></body></html>