Composable Model Graph
← Curriculum map Lesson 01 / 08

Transform · Trace · Evaluation · Feedback / lesson 01

Run one small primitive end to end

The primitive is deliberately small enough to understand by inspection.

01 / Problem + boundary

Know what the primitive owns.

Problem

Without named state transitions, normalization, parsing, model calls, and checks collapse into one opaque function.

System boundary

A Transform owns one typed transition. A GraphRun owns the completed record. Evaluators judge output; feedback resolvers map that judgment to an action.

02 / Executable shape

State changes become visible.

Inspectable: The original input, final output, ordered TraceStep records, and optional evaluation and feedback.

03 / Deterministic lab

Edit the input and run the exact three-stage string pipeline.

Static specimen / JavaScript adds controls without changing the lesson.

04 / Specimens

Same idea, honest surfaces.

const trim = createTransform<string, string>({
  id: "trim",
  name: "Trim",
  run: (input) => input.trim(),
});

const graph = createModelGraph({
  id: "core-pipeline",
  name: "Core Pipeline",
  transforms: [trim, lowercase, splitWords],
});

const run = await graph.run("  Hello Model Graph  ");
05 / Interpretation boundary

What this does not imply.

The original document describes the first linear v1. The current runner still supports that default and also supports explicit acyclic DAG connections.

06 / Understanding check

Which object contains the complete record of one execution?