Skip to content

Script

Core Idea

A script is a stored representation of a familiar situation as a temporally and causally ordered sequence of events — with role-slots, props, preconditions, and default fillers — against which encounters are interpreted. Its diagnostic signature is script breach: the predictive failure when observation does not match the expected next step.

How would you explain it like I'm…

Restaurant Story

Think about going to a restaurant: you sit down, a waiter brings a menu, you order, you eat, you pay, you leave — always in that order. Your brain knows this story by heart, so you already know what comes next without being told. If the waiter suddenly handed you a bicycle instead of a menu, you'd be surprised, because that's not how the story goes.

Know-What's-Next Story

A script is a stored story your brain keeps for a familiar situation: the steps in order, who plays each part, and the things you'll need. Think of eating at a restaurant — sit, get a menu, order, eat, pay, leave — each step setting up the next. Once a script switches on, it does a lot of work for you: you can skip past obvious steps without confusion, fill in details nobody mentioned, and guess what happens next. It's different from just remembering a fact, because a script is a step-by-step procedure with empty slots that different people fill on different days. And when something doesn't match — like a waiter handing you a bicycle — that surprise (a 'breach') is the clue that you were running a script all along.

Ordered Situation Recipe

A script is a stored representation of a familiar situation as an ordered sequence of events, including the roles that fill each step, the props involved, the typical start and end conditions, and the standard variations. Where a schema is any generic structured knowledge — a slot-and-filler bundle that may or may not be time-ordered — a script is specifically the temporally and causally ordered schema: this, then this, then this, each step setting up the preconditions for the next, with each role fillable by different actors on different occasions. The commitment is that some recurring situations are stored not as facts but as procedures with slots, and new matching situations get interpreted by binding the current particulars to the script's roles and predicting the next step. Once active, a script lets you skip unmentioned-but-expected steps, fill in missing detail by default, predict what's coming, and flag deviations as anomalies. The diagnostic signature is script breach — the predictive failure when observation doesn't match the expected next step — which is what distinguishes running a script from merely recalling one.

 

A script is a stored representation of a familiar situation as an ordered sequence of events, including the roles that typically fill each step, the props or resources involved, the typical preconditions and termination conditions, and the standard variations. Where a schema is a generic structured knowledge representation — a slot-and-filler bundle that may or may not be temporally ordered — a script is specifically the temporally and causally ordered schema: this happens, then this, then this, with each step setting up the preconditions for the next, and each role available to be filled by different actors on different occasions. The structural commitment is that some recurring situations are stored not as facts about the world but as procedures with slots, and future encounters with a matching situation are interpreted by binding the current particulars to the script's roles and predicting the next step from the sequence. Once active, a script does powerful inferential work: it lets the agent skip unmentioned-but-expected steps without surprise, fill in missing detail by default, predict what is about to happen, and detect deviations as anomalies needing explanation. The same mechanism that makes routine situations effortless also makes deviations conspicuous: script breach — the predictive failure when observation does not match the expected next step — is the diagnostic signature, and what distinguishes script-based interpretation from mere recall. The structural skeleton recurs: a triggering situation that activates a stored script; an ordered sequence of predicted steps; roles filled by particular actors each performance; props the script presupposes; preconditions and termination conditions bracketing applicability; default fillers for unstated particulars; the breach that fires on deviation; and composition, by which larger procedures are built from nested and sequenced scripts. Four commitments mark the type — temporal ordering, role-binding, slot-filling with defaults, and breach-diagnosis — and travel together; their conjunction is what distinguishes a script from near-neighbors that each carry only some.

Broad Use

  • Cognitive science: the canonical restaurant script — enter, be seated, order, eat, pay, leave — driving default inference.
  • Service design: customer journey maps as step-ordered sequences with role-slots, preconditions, and error branches.
  • Software: shell scripts, CI/CD pipelines, and behavior trees as ordered operations on parameterized objects.
  • Law and procedure: legal proceedings, surgical protocols, and aviation checklists with required ordering and termination conditions.
  • Social interaction: greeting routines, weddings, funerals — cultural fluency as partly script fluency.
  • Pedagogy: lesson plans and lab protocols with role-slots, ordered steps, and termination conditions.

Clarity

Separates knowledge of what is true (schema), what to do (script), and how to do it (skill) — and reframes a breach not as a flaw but as the script's most informative output.

Manages Complexity

Compresses a situation's interpretive demands to a few operations — recognize, bind, locate, predict, compare — so routine moments cost nothing and attention is spent only where prediction fails; composition covers vast situations with a small library.

Abstract Reasoning

Supports inference about unstated steps (filled from the script), prediction of the next event, anomaly detection via breach, and decomposition of a novel procedure into familiar sub-scripts.

Knowledge Transfer

  • Cognition to software: literal scripts and behavior trees inherit the slot-binding, sequencing, and precondition/postcondition structure.
  • Procedural law to medicine: ordering-with-role-slots ports into surgical timeouts and checklists.
  • Robotics to embodied AI: hierarchical task networks carry the script's anomaly-handling and recovery-on-failure.

Example

Told only "Mary went to a restaurant and complained the steak was tough," a comprehender infers she was seated, ordered, and was served — the script supplies those steps by default, and a bill-before-food anomaly fires as a breach.

Relationships to Other Primes

One-hop neighborhood: parents above, mutual partners to the right, children below.Scriptsubsumption: SchemaSchema

Parents (1) — more general patterns this builds on

  • Script is a kind of Schema — The file: a script is 'the specifically temporally-and-causally ordered SCHEMA'; a schema is the generic slot-and-filler bundle that may or may not be ordered. Script inherits schema's slot machinery and adds ordered sequence + breach-on-next-step. Genus=schema (the 0.83 nearest, the correct parent).

Path to root: ScriptSchemaAbstraction

Not to Be Confused With

  • Script is not Schema because the former adds temporal-causal ordering and breach-on-next-step, whereas a schema is a slot-and-filler bundle that need not be ordered.
  • Script is not Sequencing because the former adds role-slots, defaults, and breach-diagnosis, whereas sequencing is the bare ordering of items.
  • Script is not an Algorithm because the former is a defeasible expectation informative through its breaches, whereas an algorithm is a deterministic procedure guaranteeing a result.