caelum0x 9b91a4a968 feat: connect PaperTrail to Claude Science (MCP connectors, skills) + Google auth
Make PaperTrail plug into Anthropic's Claude Science workbench four ways:
- Remote URL connector: hosted Streamable-HTTP MCP at /api/mcp (45 public tools)
- Local command connector: standalone stdio MCP package under mcp/ (47 tools,
  incl. 2 API-key tools) — @modelcontextprotocol/sdk, calls the live API
- Skills: 8 Claude Science Agent Skills under skills/ (import from GitHub / upload)
- Network: docs to allow-list the API domain for the curl path
- Public /connect page showcasing all four methods (judges can see it, no login)

Also:
- Google OAuth sign-in ("Continue with Google") on login + register, wired to
  GOOGLE_CLIENT_ID/SECRET; users.password_hash now nullable + auth_provider/
  google_sub (migration 0061); password login guards Google-only accounts
- Landing design: center + enlarge the claim input; bigger textarea

tsc clean; app build compiles 362 pages; local MCP smoke-tested end-to-end.
2026-07-10 17:06:04 +03:00

61 lines
2.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: papertrail-research-gaps
description: Surface grounded research gaps and generate testable hypotheses for a topic, each anchored to the literature. Use when a scientist asks "what's unknown / understudied here?" or "what should we test next?" and wants gap analysis and hypotheses backed by citations rather than speculation.
---
# PaperTrail: Research Gaps and Hypotheses
For a given topic, mine the literature for what is under-studied or unresolved
and propose testable hypotheses — each anchored to the evidence that motivates
it.
## Hard guarantees (state these to the user)
- **Exact-span grounding** — each identified gap and each hypothesis is tied to
the source spans that motivate it. Gaps are derived from what the retrieved
literature does and does not establish, not from the model's imagination.
- **Deterministic-leaning recompute** — retrieval runs over the cached corpus,
so the same topic surfaces the same evidence base.
- **Honest limits** — if the topic returns little grounded evidence, the tool
says so rather than inventing gaps or hypotheses from nothing.
## Step 1 — Call the tool
Preferred: the **`research_gaps_hypotheses`** MCP tool.
Inputs:
- `topic` (string, required) — the research area, e.g.
`"GLP-1 receptor agonists in neurodegeneration"`.
- `query` (string, optional, 1–2000 chars) — a narrower probe within the topic.
- `limit` (number, optional, 1–20) — how many sources to draw from.
## Step 2 — Read the result
Report the **research gaps** (each with the grounding source spans that reveal
the gap) and the **testable hypotheses** (each with its motivating evidence).
Present hypotheses as testable and falsifiable — flag any that the retrieved
literature cannot yet support.
## curl fallback (no MCP connector installed)
Base URL: `https://papertrail-topaz-phi.vercel.app`. No API key required.
```bash
curl -sS -X POST https://papertrail-topaz-phi.vercel.app/api/hypotheses \
-H 'Content-Type: application/json' \
-d '{
"topic": "GLP-1 receptor agonists in neurodegeneration",
"query": "microglial inflammation",
"limit": 8
}'
```
Returns the standard `{ success, data, error }` envelope with gaps and
hypotheses under `data`.
## Notes
- A sharper `topic`/`query` yields sharper, better-grounded gaps.
- Keep hypotheses tied to their motivating evidence; do not present an
ungrounded idea as a literature-derived gap.