Skip to content

Context-aware LLM prompt builder for node and edge panels #14

@paolino

Description

@paolino

Summary

Each node and edge detail panel gets a text input + "Copy prompt" button. The user writes what they want (free text), and the tool assembles a complete prompt with all the context an LLM needs to do it.

UX

─────────────────────────────────
🔧 Ask an LLM about this node
┌───────────────────────────────┐
│ Update to reflect v0.15 ...   │
└───────────────────────────────┘
[Copy prompt]
─────────────────────────────────

The user provides intent. The tool provides context and process.

What "Copy prompt" assembles

  1. User's text — verbatim, as the task
  2. Current node/edge JSON — the data being discussed, plus connected edges
  3. JSON schemas — links to the schema files so the LLM knows the exact format:
    • schema/graph.schema.json (nodes and edges)
    • schema/config.schema.json
    • schema/tutorial.schema.json and schema/tutorial-index.schema.json (if touching tutorials)
  4. Source repo URL — from config.sourceUrl, so the LLM knows where to file a PR
  5. File pathsdata/graph.json, data/config.json, data/tutorials/ structure
  6. PR instructions — how to fork, branch, edit the JSON, and submit

Key principle

The button is not "refresh this node." It's a context assembler — the user says what they want, the tool wraps it with everything needed for an LLM to execute and propose changes via PR.

Schema references

The schemas already exist in the repo:

  • schema/graph.schema.json
  • schema/config.schema.json
  • schema/tutorial.schema.json
  • schema/tutorial-index.schema.json
  • schema/manifest.schema.json

The generated prompt should link to these via the raw GitHub URL derived from config.sourceUrl (e.g. https://raw.githubusercontent.com/{owner}/{repo}/main/schema/graph.schema.json). If sourceUrl points to a graph-browser consumer repo (not graph-browser itself), the schema URLs should point to graph-browser's repo instead.

Works for any dataset

Nothing is hardcoded to a specific graph. The prompt is built from config.sourceUrl + the selected node/edge data + the schema URLs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions