M META-MIND

Meta-Mind Master Reference

Welcome to the definitive documentation for Meta-Mind v14.9. This wiki serves both daily users navigating the spatial interface and developers building federated companion applications.

Part I

User Guide

1. Getting Started

Meta-Mind is a spatial mapping ecosystem. Instead of folders and files, you organize information into "Constellations" of interconnected nodes. Every map begins with a Universe Root. From there, you can spawn Hubs, Notes, Portals, and structured Web elements.

3. Two-Step Targeted Linking

While "Add Child" creates strict hierarchical structures (solid lines), you can draw conceptual relationships between any two nodes using the Two-Step Linking workflow (dotted lines).

  1. Select your source node and click the Link (๐Ÿ”—) button on its Radial Menu.
  2. The system enters Linking Mode. A pulsing gold banner appears at the top of the screen.
  3. You are free to pan the map, open other nodes, and explore. Your clicks are not hijacked.
  4. When you find your target node, select it. Its Radial Menu will appear.
  5. Click the pulsing Green Confirm Link button to finalize the connection. (Or click the Red Cancel button on the original node to abort).

4. Phase Engines (Views)

Meta-Mind separates your raw data from how it is displayed. "Phases" are different lenses through which you can view the exact same Mapstate JSON.

  • ๐Ÿ—บ๏ธ
    Celestial Map

    The default spatial graph. Free-form dragging, physics engine enabled.

  • ๐Ÿ”ฎ
    Orbital Focus (Magic Circle)

    A strict hierarchical view. Displays only the selected "Sun" node, its immediate "Planets" (children), and its "Halo" (parent). Clicking planets navigates deep into the tree without visual clutter.

  • ๐ŸŒ
    ๐ŸŒ
    Web Architect & Spatial Browser

    A live HTML compiler. If your map uses web-* nodes, this engine dynamically compiles them into live, rendered HTML/Tailwind inside an iframe.

    Advanced Iframe Integration: If you input a valid URL (e.g. google.com or https://wikipedia.org) into the payload of a web-root node, the engine will automatically mount the live website into the background iframe. Any children attached to that node will physically render beneath the live website. If a site employs X-Frame blocking, an "Open in New Tab" escape hatch appears.

5. The Data Manager

Accessible via the "Phases" tab, the Data Manager is your bidirectional command center for importing, exporting, and managing the local library.

๐ŸŒ Cloud Templates

Provides read-only master templates (like pre-built website architecture). You can import these directly into your active workspace as recursive portals. Click "Upload" to upload external JSON templates to your local library.

๐Ÿ“š Saved Constellations

Your personal repository. You can Save your active session, Load previous sessions, or click "Export" to download your entire constellation library as a single JSON array for backup. You can also export/download individual maps.

โšก Intelligent Conflict Resolution

When uploading a single JSON mapstate or an Array of mapstates into the library, the engine automatically checks for ID collisions. If an exact duplicate exists, it skips it. If a modified version exists, it prompts you with a comparison of node/connection counts before overwriting.

Part II

Developer Documentation

6. Core Architecture

The platform relies on a Decoupled State Machine pattern. The DOM never dictates truth.

The Kernel (meta-mind-core.js)

Holds the MapState object. Performs all array mutations, handles UUID generation, runs the resolveOverlaps() physics loop, and manages the Breadth-First Search (BFS) algorithm for cascading downstream node deletions. Emits this.notify() on state change.

The Sandbox (meta-mind-sandbox.js)

The View Controller. Subscribes to the Kernel. Utilizes pure mathematical DOM-Diffing (checking dataset.stateHash) to apply targeted innerHTML updates without destroying active mobile keyboards or CSS animation frames.

7. Node & Connection Ontology

Defined in meta-mind-rules.js, this schema dictates what types of nodes can exist and how they are allowed to connect. Rule Exception: Any node is allowed to have a child of type 'note'.

Connection Types

  • Structural (Solid): Strict Parent/Child hierarchy. Acts as a spring in the physics engine. Triggers cascading deletions.
  • Association (Dashed): Loose conceptual relation. Ignored by physics springs and orbital views. Created via 2-Step linking.
  • Flow (Dotted): Directional sequence logic (reserved for Logic Gates / execution loops).

Web Architect Nodes

Node Type HTML Element Allowed Children (Strict) Behavior
web-root <body> / <iframe> nav, hero, section, footer Mounts embedded URLs or basic HTML roots.
web-nav <nav> link, button Sticks to top of compiled page.
web-section <section> text, image, button, link Standard flex container.
web-text <p> / <h3> None Renders text block w/ line breaks.
web-link <a> None Content payload acts as href target.

8. JSON Schema & Arrays

The JSON standard for importing/exporting mapstates. The v14.9 system can parse a single object OR an array `[{...}, {...}]` of mapstates during upload.

{
  "map_id": "u7b9v2z1x",
  "meta": {
    "title": "Project Master Plan",
    "created": "2026-02-24T12:00:00Z",
    "notes": "System schema reference",
    "shared": false
  },
  "nodes": [
    {
      "id": "abc123xyz",
      "type": "hub",
      "title": "Central Architecture",
      "content": "Description payload here...",
      "data": {
        "x": 145.2,
        "y": -22.4,
        "isCore": true,
        "collapsed": false
      },
      "submaps": [] 
    }
  ],
  "connections": [
    {
      "id": "edge_999",
      "from": "abc123xyz",
      "to": "def456lmn",
      "type": "structural"
    }
  ],
  "submaps": [] // Caches templates or local portal configurations
}

9. Force-Directed Physics

The layout is driven by a custom iterative algorithm found in Kernel.resolveOverlaps(). It applies two simultaneous forces to form organic trees dynamically.

1. Universal Repulsion

An O(Nยฒ) calculation where every node pushes away from every other node if distance < 240px. (kRepel = 0.08).

2. Hooke's Law Springs

Only applies to structural connections. Pulls connected nodes toward an ideal resting distance of 160px. (kSpring = 0.05).

Upon node creation, a fast 40-iteration burst runs to clear space. Clicking the "Arrange" UI button triggers a deep 150-iteration simulation to organically untangle complex webs.

10. Serverless Library Engine

In v14.7, we deprecated fetch() calls to external JSON files to bypass local file:// CORS restrictions. The engine now uses a globally mounted MetaMindLibrary object loaded via meta-mind-library.js.

How AI Integration Works

To add new templates generated by an LLM, you have two options:

  1. Manual Source: Paste the generated JSON directly into the defaults: [...] array inside meta-mind-library.js.
  2. Runtime Upload: Save the AI output as a .json file, open the Data Manager Phase in the app, and click the Upload Template button to write it permanently to your LocalStorage.