feat: psi literature knowledge graph with AI-driven scanning - #2
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Referencewith 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.[[wikilinks]]. Preserves human## Notessections across syncs. 88 node notes + 40 reference notes in the vault.run-agent.sh— cron-ready script for daily literature scanning via Claude Code CLITest plan
npm testpassesnpm run buildsucceeds (typecheck + vite)npm run mpsi -- -f ~/data/modularpsi/psi-literature.json node listshows 88 nodesnpm run mpsi -- -f ~/data/modularpsi/psi-literature.json trust showpropagates without errorsnpm run mpsi -- literature search --query "ganzfeld psi" --limit 5returns results from Semantic Scholarnpm run mpsi -- -f ~/data/modularpsi/psi-literature.json agent gapsidentifies evidence gapsnpm run mpsi -- -f ~/data/modularpsi/psi-literature.json vault sync --path ~/data/modularpsi/vaultgenerates notes with frontmatter + wikilinksnpm run mpsi -- -f ~/data/modularpsi/psi-literature.json review pendingshows draft items🤖 Generated with Claude Code