Skip to content

feat: integrate personal research memory and external scholar search - #2

Draft
icerain-cmd wants to merge 2 commits into
mainfrom
agent/external-scholar-integration
Draft

feat: integrate personal research memory and external scholar search#2
icerain-cmd wants to merge 2 commits into
mainfrom
agent/external-scholar-integration

Conversation

@icerain-cmd

Copy link
Copy Markdown
Owner

Summary

This draft PR combines two read-only research-memory integrations for HEGI:

  1. Research-to-Skill Personal Research Memory for the user's canonical published/research corpus.
  2. External Scholar Search using official OpenAlex metadata with Crossref fallback.

Memory Forest, Personal Research, External Scholar, and synthesis remain separate provenance classes. This PR does not merge, release, deploy, modify the Hermes host, or modify the deployed hegi-telegram checkout.

Research-to-Skill integration

  • Adds a stdlib-only ResearchToSkillAdapter with status, search, get_concept, get_claim, get_evidence, and get_context.
  • Reads canonical research.json through a bounded, stable, no-follow snapshot.
  • Preserves author, external, mixed, and uncertain claim origins without reclassification.
  • Keeps the existing Memory Forest backend unchanged and optional.
  • Exposes hegi research-memory status and HEGI_RESEARCH_MEMORY_PROJECT configuration override.
  • Treats invalid, corrupt, or unavailable projects as graceful Personal Research unavailability.
  • Keeps Personal Research in a compact, separately typed metadata channel so corpus content cannot be laundered into unprovenanced meeting minutes or Memory Forest draft material.

External Scholar Search

  • Adds an official-API ScholarAdapter with OpenAlex primary and Crossref fallback.
  • Normalizes title, authors, year, venue, DOI, abstract, citation count, provider, canonical URL, OA status, and provider work ID.
  • Adds DOI-first deduplication and conservative title/year/first-author fallback when DOI is absent.
  • Adds personal/external/hybrid query routing and a separately typed metadata-only cross_analysis result.
  • Supports hegi scholar search, relevance/recency/citation sorting, year bounds, and an in-memory TTL cache.
  • Does not scrape Google Scholar, bypass paywalls, download PDFs, or automatically ingest into Research-to-Skill.
  • Bounds response size and time, validates every redirect/final provider URL, sanitizes metadata, and falls back cleanly on malformed or unavailable providers.

Validation

  • pytest: 204 passed
  • ruff check .: PASS
  • Research-to-Skill validation: PASS
  • Canonical project counts: 4 sources, 15 concepts, 24 claims, 0 dirty sources
  • Canonical project integrity: 71/71 files SHA-256 unchanged before and after both integrations

Live provider smoke tests

  • Mechanocene artificial intelligence ecology: OpenAlex returned no works; Crossref fallback returned 3 metadata records.
  • algorithmic power digital ecology AI: OpenAlex returned 3 metadata records.
  • artificial nature media aesthetics: OpenAlex returned 3 metadata records.
  • Hybrid 최근 AI 생태비평 연구와 내 Mechanocene 이론을 비교해. returned separate personal_research, external_scholar, and synthesis objects with provider work IDs, titles, authors, years, and DOI fields traceable where supplied.

Provider relevance is intentionally not treated as theoretical relevance. Broad or weakly related metadata remains a candidate result and is not promoted into a claim, counterargument, ingest action, or Memory Forest record.

Out of scope

  • Main merge, release, or deployment
  • Deployment-checkout or Hermes-host changes
  • Google Scholar scraping
  • PDF download or paywall bypass
  • Automatic Research-to-Skill ingest or schema changes
  • GraphRAG, vector databases, or Neo4j

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant