Medium Pool · every medium your app could speak
$npx skills add funclosure/medium-pool

Ask-driven graph

TextVisualization
The answer lights up the map
messageAsking draws the map.
instance Global Workspace askThree questions, growing emphasis

Reading is one way into a graph. Asking is the other. A person types a question, an answer streams back, and every concept the answer cites lights up on the map as it is mentioned. By the end of the answer the reader has both a paragraph and a subgraph, and they agree.

This is the pattern behind mindgraph’s Ask pane, where a live agent answers over the digested graph and the canvas follows.

The binding

  • Signal: the answer text as it streams, token by token
  • Contract: concepts are matched by label (or, in the real thing, by ids the model is asked to cite)
  • Effect: the emphasis set grows as concepts are mentioned; it never shrinks mid-answer
direction
both ways
substrate
Text + Visualization · the answer stream as the binding

Built from

  • Text: Words people read, quote, and search
  • Visualization: A picture computed from data

Where it bites

  • Ask the model to cite concept ids explicitly rather than matching labels in prose. Label matching is fine for a demo and wrong for synonyms, plurals, and languages.
  • Grow the emphasis set during a stream; only reset it when a new question starts. Flicker on every token is unreadable.
  • Throttle graph updates to the render frame, not to every token.
  • Show the answer even if the graph is empty. Text must stand alone.
  • A Stop control stops both the stream and the growth of the set.

Instances of this composition

Each is one way to build it. None of them is the composition.

Global Workspace askin the pool

Three questions, growing emphasis. reference/AskGraph.ts

mindgraphside project

The Ask pane: a live agent answers over the digested graph and the canvas follows.

$npx skills add funclosure/medium-pool --skill compose-ask-graph
skills/compose-ask-graph/SKILL.md
---
name: compose-ask-graph
description: "Bind a streamed answer to a concept graph so cited concepts light up as they are mentioned. Use when building question-answer surfaces over a digested graph, knowledge map, or concept timeline. Composes medium-text and medium-visualization."
---

# Ask-driven graph

## What this composition does to the person
Bound by the answer stream, a question becomes a way of drawing the map. Each answer leaves a lit subgraph behind, so curiosity has a visible trail.

## What this composition is
A question box, a streamed answer, and a concept graph. As the answer arrives, each concept it cites joins the graph's emphasis set. The pattern behind mindgraph's Ask pane.

## Parts (install these first)
- `medium-text` for the input and the incrementally rendered answer
- `medium-visualization` for the graph and `setEmphasis(ids)`

## The binding contract
- The answer producer cites concepts by id (in a demo, by label match).
- On each render frame, the emphasis set is the union of everything cited so far in this answer.
- A new question resets the set. Stop freezes it.

## UX rules that always apply
- The set grows, never flickers. Update on frames, not on tokens.
- The answer is readable without the graph; the graph is explorable without the answer.
- Keep the last answer's emphasis until the next question starts.

## Reference instances
Each is one way to speak this composition, cited as evidence. None of them is the composition.

`reference/AskGraph.ts` — question chips, streamed markdown answer, label-to-id resolver, frame-throttled emphasis growth on a ForceGraph from the visualization skill. It imports the graph engine from the sibling `medium-visualization` skill folder, so install both or the import fails. It uses a few layout class names from the pool's stylesheet (`row`, `btn`, `status`, `frame`); without that stylesheet the logic still runs and the controls are unstyled.

## Gotchas
- Ids over labels in production.
- Union, not replace, during a stream.
- Text stands alone.