Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mental Graph Builder

Turn the conversation history available to your most-used AI assistant into an interactive 3D graph—without creating an account or uploading the result to a new service.

Mental Graph Builder

Three-step flow

  1. Open the builder and select Create yours.
  2. Copy the universal prompt into ChatGPT, Claude, Gemini, Grok, Copilot, or another assistant that has useful conversation context.
  3. Copy the assistant's complete reply back into the builder. It extracts, validates, previews, and renders the graph locally.

Guided import

Try it locally

git clone https://github.com/Shashank4203/mental-graph-builder.git
cd mental-graph-builder
python3 -m http.server 8080

Open http://localhost:8080/?create=1.

index.html also works when opened directly in most modern browsers.

What the builder accepts

The assistant may return ordinary prose plus a fenced JSON block. The builder finds the object containing nodes[] and links[]; users do not need to trim away the readable report manually.

{
  "clusters": {
    "identity": { "n": "Identity", "c": "#7c3aed" }
  },
  "nodes": [
    {
      "id": "systems_thinking",
      "label": "Systems thinking",
      "cl": "identity",
      "note": "[OBSERVED] I repeatedly look for relationships between parts."
    }
  ],
  "links": []
}

See schema.json and examples/minimal-import.json.

Evidence model

  • [OBSERVED] means explicitly present in the source conversation.
  • [INFERRED] means a bounded interpretation.
  • Untagged claims remain visibly unverified.
  • UNKNOWN is preferable to a plausible invention.

The supplied prompt asks the assistant to be balanced, avoid diagnosis, include counterexamples, and exclude secrets and government/account identifiers.

Privacy

  • Parsing and graph creation happen in the browser.
  • There is no backend, analytics, account system, email connector, or embedded personal dataset.
  • The graph is stored in browser localStorage.
  • Exported JSON can still be highly sensitive. Review it before sharing.
  • Do not commit a raw conversation archive or personal graph export.

A UI filter only hides information visually; it does not remove information from an exported file.

Features

  • 3D force-directed sphere and readable Flat mode
  • Orbit, zoom, pan, fullscreen and node pinning
  • Whole, Focus and shortest-Path views
  • Search and cluster, evidence, and degree filters
  • Observed/inferred/untagged evidence breakdown
  • Degree and Brandes betweenness insights
  • Add, rename, annotate, connect and delete nodes
  • Merge updates by stable node ID
  • JSON export and import
  • No dependencies or build step

Validate a graph

python3 scripts/validate_graph.py examples/minimal-import.json

The validator checks IDs, missing link targets, self-links, duplicates and basic evidence counts.

Accuracy limits

An assistant's memory is not the same as a full conversation archive. It may be partial, recent, or unavailable. For better fidelity, users can export their own history and ask an assistant to use that archive as the source—but the archive should remain local and must not be committed.

Graph metrics describe the links supplied to the viewer. They do not diagnose personality, intelligence, mental health or neurodivergence, and they do not prove causation.

Project structure

index.html                         Browser application and neutral example seed
prompts/universal-extraction.md    Model-agnostic extraction prompt
schema.json                        Portable import contract
examples/minimal-import.json       Small valid example
scripts/validate_graph.py          Dependency-free validator
docs/assets/                       Privacy-safe screenshots

License

MIT. See LICENSE.

About

Create an interactive 3D mental graph from the AI chat you already use — local, portable, and privacy-first

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages