Skip to content

feat: psi literature knowledge graph with AI-driven scanning - #2

Merged
simonperegrinvs merged 9 commits into
mainfrom
feat/psi-literature-map
Feb 18, 2026
Merged

simonperegrinvs merged 9 commits into
mainfrom
feat/psi-literature-map

Conversation

@simonperegrinvs

Copy link
Copy Markdown
Owner

Summary

  • Phase A — Type & CLI extensions: Extended Reference with description, DOI, abstract, external IDs. Added provenance tracking, review status workflow (draft → pending-review → approved/rejected), and governance checks. New CLI commands: review, ref update, ref show, ref search. UI: description fields in reference dialog.
  • Phase B — Initial graph: 88-node DAG covering psi phenomena (ESP, PK, precognition, remote viewing), methodological factors (publication bias, experimenter effects, sensory leakage), physics/neuro models (quantum consciousness, TSVF, microtubules), and replication outcomes. 40 references linked to nodes. Trust propagation across 102 edges. Fixed DFS stack overflow on DAGs with cross-links.
  • Phase C — Agent infrastructure: Literature search via Semantic Scholar, OpenAlex, and CrossRef APIs (all free, no keys). Batch import with deduplication (DOI/S2 ID/fuzzy title+year), provenance, JSONL audit trail, and daily snapshots. Agent CLI for gap analysis and state management.
  • Phase D — Obsidian vault sync: Bidirectional sync generating markdown notes with YAML frontmatter and [[wikilinks]]. Preserves human ## Notes sections across syncs. 88 node notes + 40 reference notes in the vault.
  • Agent runner: run-agent.sh — cron-ready script for daily literature scanning via Claude Code CLI
  • Documentation: README rewritten with full 50+ command reference table. CLI.md extended with all new command groups.

Test plan

  • npm test passes
  • npm run build succeeds (typecheck + vite)
  • npm run mpsi -- -f ~/data/modularpsi/psi-literature.json node list shows 88 nodes
  • npm run mpsi -- -f ~/data/modularpsi/psi-literature.json trust show propagates without errors
  • npm run mpsi -- literature search --query "ganzfeld psi" --limit 5 returns results from Semantic Scholar
  • npm run mpsi -- -f ~/data/modularpsi/psi-literature.json agent gaps identifies evidence gaps
  • npm run mpsi -- -f ~/data/modularpsi/psi-literature.json vault sync --path ~/data/modularpsi/vault generates notes with frontmatter + wikilinks
  • npm run mpsi -- -f ~/data/modularpsi/psi-literature.json review pending shows draft items

🤖 Generated with Claude Code

simonperegrinvs and others added 9 commits February 18, 2026 18:12
…hase A)

- Add description, doi, url, semanticScholarId, openAlexId, abstract to Reference type
- Add Provenance, ReviewStatus, NodeStatus types for agent governance
- Add optional provenance/reviewStatus fields to GraphNode, GraphEdge, Reference
- Add metadata field to GraphData for agent run tracking
- Extend ref CLI: add --description/--doi/--url/--abstract/--journal/--citation options
- Add ref update, ref show, ref search subcommands
- Extend node add: --description, --keywords options
- Add --review-status filter to node list and ref list
- Add review CLI: list, pending, approve, reject commands
- Backfill new Reference fields in json-io.ts loader
- Map rabstract to description in legacy import
- Add description field to ReferenceDialog and ReferenceList UI
- Update CLI.md with all new commands and data model docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase B Step 4: Build the full knowledge graph node hierarchy with
descriptions, keywords, and categories covering psi phenomenology,
physical mechanisms, biology, psychology, theory, skeptical arguments,
and neuroscience. Graph at ~/data/modularpsi/psi-literature.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase B Steps 5-6: Added 40 scientific references spanning foundational
physics, ganzfeld/ESP, precognition, PK, consciousness/NDE, quantum
biology, psychology, skeptical perspectives, and cultural studies.
All references linked to relevant nodes. Trust values assigned to all
87 edges based on evidence quality assessment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase B Step 7: Added 15 cross-links connecting related concepts
across branches (e.g., TSVF -> Precognition, Publication Bias ->
Ganzfeld, Microtubules -> Non-Local Correlation). Fixed trust
propagation DFS to only recurse when trust improves, preventing
stack overflow on DAGs with cross-links. Graph: 88 nodes, 102 edges,
40 references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…gent CLI

Steps 11-13: Implemented batch import with deduplication, JSONL audit
trail, and daily snapshots. Added literature search integration with
Semantic Scholar, OpenAlex, and CrossRef APIs (all free, no keys).
Created agent CLI (status, gaps, state, config) for the AI-driven
discovery loop. Updated CLI.md documentation.

New files:
- src/agent/search/{semantic-scholar,openalex,crossref,dedup,types,index}.ts
- src/agent/{audit,state,config}.ts
- src/cli/commands/{batch,literature,agent}.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase D Step 14: Vault sync generates markdown notes for all nodes
(organized by category) and references (organized by year) with YAML
frontmatter, [[wikilinks]], and preserved human notes sections.
Supports bidirectional sync (graph-to-vault and vault-to-graph).
Also cleaned up 52 stale reference links from the graph.

New files:
- src/vault/{sync,templates,frontmatter}.ts
- src/cli/commands/vault.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…er script

README rewritten with full command reference table covering all 50+ CLI commands,
agent loop documentation, data model section, and tech stack updates.
CLI.md: add options table for literature citations, clarify trust show vs propagate.
run-agent.sh: executable cron-ready script for daily literature scanning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move src/agent and src/vault to CLI build target, add explicit type
annotations to satisfy strict type checking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simonperegrinvs
simonperegrinvs merged commit 32b3fab into main Feb 18, 2026
1 check passed
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