Interactive Documents

A Rho MD document is still plain Markdown — but fenced code blocks tagged with AINP names (chart, interact, quiz, …) come alive when rendered. This page is itself interactive: everything below is running right now.

A chart from one equation

y = sin(t)
range = [0, 6.28]
title = a sine wave

That's the entire source:

```chart line
y = sin(t)
range = [0, 6.28]
title = a sine wave
```

You declare what is true — "y equals sin of t" — and the reader decides how to draw it. Chart types include line, bar, scatter, area, pie, heatmap, and treemap, and an animate= modifier turns any of them into a time-driven animation.

A scene you can touch

slider r range=10..80 step=5 default=40 label="radius"
template svg: <svg width="220" height="130"><circle cx="110" cy="65" r="{r}" fill="#7E73F7"/></svg>

Drag the slider — the circle follows. The source is three lines: a slider declares a variable, the template references it with {r}.

Controls compose: sliders, timers (auto-play), text inputs, chips, dropdowns, toggles, and computed expressions all share one namespace that feeds the template every frame.

Live source generators

Templates don't have to be graphics. A text template renders as a highlighted code block that rewrites itself as you play with the controls:

slider conf range=0..1 step=0.05 default=0.95 label="Confidence"
chip rule options=causal,logical,empirical default=causal label="Rule"
input src default="A" label="Source"
template stl: [{src}] → [B] ::mod(rule="{rule}", confidence={conf})

Why this matters

  • Plain files. Everything is a .md file. Version it, grep it, email it.
  • Graceful fallback. In any other Markdown reader these blocks degrade to visible code fences — nothing is lost, it just stops moving.
  • AI-native. The AINP protocol is designed so an AI can write these blocks reliably. Ask the built-in Rho AI to "make this data a chart" and it speaks AINP fluently.

Learn the full protocol

Charts and scenes are the surface. AINP also covers quizzes, branching stories, drag interactions, tabs and steppers, and animated data stories. The complete protocol ships with Rho MD — the Rho AI plugin knows it end to end, so the fastest way to learn is to ask it to build something and read what it writes.

Ready to go deeper?

Open in Rho MD →