graph

A command that builds a map of prerequisite concepts from converted course materials. The map shows which concepts and relationships appear in the material.

In plain words
What is it for?
Use it to create or refresh a concept graph for a course, including source sections, relationships, confidence, and priority markers.
Why use it?
It helps reveal what a student needs to understand first and how course topics connect. It requires course material to have been converted before it can work.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/optimeta/paideia/graph
Clone the repo
git clone --depth 1 https://github.com/OPTIMETA/PAIDEIA
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,184 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.03184
Opus 5 $0.00009 $0.01592
Sonnet 5 $0.00004 $0.00637
Haiku 4.5 $0.00002 $0.00318

Measured 2d ago against content hash 6962e998228d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

graph scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/paideia/commands/graph.md · 183 lines

How it starts

The opening of the file, as written. The whole thing — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Output language

Read INTERFACE_LANG from .course-meta (default en). All user-facing prose must be in that language.

Keep verbatim regardless of INTERFACE_LANG: file paths, slash command names, concept IDs (C1..Cn), pattern IDs (P1..Pk), tier markers (🔥🔥/🔥/🟡/⚪) and ⚠weak, § / Ch section anchors, column headers (Concept, id, §, Patterns, Tier, Type, Source, From, To, Confidence, Rationale, A, B, Relation).

Load skills/course-builder/SKILL.md. Load skills/course-builder/concept-graph.md.

Arguments: $ARGUMENTS

Prerequisite check

Verify that converted/ exists and contains at least one .md file. If empty, tell the user to run /ingest first and stop.

If course-index/concept-graph.md exists and --force is not passed, show the focus question and node count, then ask whether to overwrite. (Idempotent: re-running with --force overwrites without prompting.)

Extraction pipeline

Follow PHASE A → B → C → D → E in order. Do not skip phases. Do not add optimization logic (no BKT, CP-SAT, Bandit, BLIM — PLOM exclusion, doc 04 §0.4).

PHASE A — Candidate concept mining (sLLM tier, bulk repetition)

For each file in converted/ (lectures, textbook, notes in document order):

  1. Read the file text.

  2. Emit candidate concepts with a minimal prompt (no explanation, comma-separated prerequisites only):

    You are an education expert. List the key concepts DEFINED in this text as a JSON array:
    [{"concept": "<name>", "defined_here": true|false, "section": "<§ or Ch>", "first_line": <int>, "refs": ["<concept>"]}, ...]
    Emit JSON only. No prose.
    
  3. Collect all candidates across files. Track def(X) = the file/line of first full definition, and ref(B→A) = count of times file B mentions concept A.

PHASE B — Normalisation and ID assignment

  1. String-normalise candidates (lowercase, strip articles, collapse whitespace). Merge near-duplicates by edit distance ≤ 2 or exact synonym (e.g. "eigenvalue" = "eigen value").
  2. Assign sequential IDs: C1, C2, … in order of first-definition appearance across files.
  3. For each node, join:
    • §: the section anchor from the source file (use source_path header <!-- SOURCE: ... §X.Y --> if present)
    • Patterns: cross-reference course-index/patterns.md — list Pk IDs whose Appears in overlaps with this concept's §
    • Source: the relative path of the file where the concept is first defined
    • Type: procedural if the concept maps to ≥ 1 Pk that is a solution technique; otherwise conceptual

Read the full file on GitHub · 183 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 183 lines · 18 tokens per session scan A 6962e998228d

Subscribe to this mod's changes

graph is a command published in the GitHub repository OPTIMETA/PAIDEIA (91 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 3,184 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.