---
title: Curriculum Inference Service
description: "Before this service runs, an earlier step has already produced an experience contract for one skill — the \"envelope\": a precise statement of the situations a learner must be placed in, the practice they must do, the…"
created: 2026-11-27
updated: 2026-11-27
authors: ThinkingCap
topics: [Research And Development]
status: published
canonical: https://console.thinkingcap.com/guest/Research-and-Development/Skills/Inference/04-curriculum-inference
service: case_curriculum_inferral
queuetype: case_curriculum_inferral
repo: tc-case-inferral
commit: 386c0a6bdface08e87298503edcd70254fc11e9d
source_revision: 386c0a6bdface08e87298503edcd70254fc11e9d
order: 2
---

# Curriculum Inference — what it decides and how

## The question it answers

Before this service runs, an earlier step has already produced an **experience contract** for one
skill — the "envelope": a precise statement of the situations a learner must be placed in, the
practice they must do, the evidence an assessor could inspect, the signals that show mastery, and
the **satisfaction tests** — the checkable statements ("THE DOOR") that any learning program must
pass before the organization accepts the skill as in place.

This service answers the next question: **what is the smallest coherent curriculum that could
satisfy that envelope?** It designs a set of curriculum elements — each with a purpose, an intended
outcome, and a place in the sequence — that together cover everything the envelope demands.

Just as important is what it deliberately refuses to decide: **how anything is taught**. It never
specifies formats, tools, durations, or activities. An element's intended outcome says what is true
when the learner completes it — "the learner can adapt their approach when a partner changes
direction unexpectedly" — never "build a 15-minute branching H5P simulation". Those delivery choices
belong to the next layer, Instructional Design, which consumes the curriculum this service produces.

## The design stance

The rules baked into the service's instructions to the model are pedagogical, not mechanical:

- **The envelope, not the skill model, decides granularity.** A skill is stored as a single Rich
  Skill Descriptor, but the service is explicitly forbidden from assuming one skill = one element =
  one learning activity. If the envelope's requirements honestly need several learning moments —
  instruction, then practice rounds, then assessment — the curriculum says so. If one element can
  naturally satisfy several requirements, they are combined. No element per bullet point.
- **Smallest coherent, enforced.** Splitting is only justified when requirements genuinely differ in
  purpose, context, stage of learning, practice conditions, evidence conditions, assessment moment,
  or timing. A hard ceiling (12 elements by default) makes "smallest coherent" a contract, not a
  suggestion — an over-split answer is rejected outright.
- **Prerequisites are not automatically taught.** If the envelope names an entry capability the
  organization may accept as given — a licence, prior employment, self-attestation — it is recorded
  as an *assumed prerequisite* (assumed / proven by entrance evidence / out of scope) instead of
  generating lessons. The spec's own example: an ice-road-driving program may accept a driver's
  licence; the curriculum must not teach steering and braking.
- **Boundaries are respected.** The envelope names ground that belongs to child envelopes or is out
  of scope; the curriculum never builds elements for that ground.
- **Nothing is taught twice.** The service is shown the names of the skill's sibling nodes — ground
  covered elsewhere in the organization's framework — so the curriculum does not re-teach what a
  sibling already owns.

## How elements are structured and sequenced

Each element is a node in a small graph the model describes by short keys:

- **Hierarchy** — an element may name a parent key, so a curriculum can nest (a practice block with
  sub-elements inside it).
- **Role** — a one-word label such as instruction, practice, assessment, debrief, project, or
  coaching. The label is deliberately thin; the element's purpose lives in its full statement.
- **Relations between elements** — `before`, `after`, and `prerequisite` impose order;
  `parallel`, `repeated`, and `culminating` express structure without order (an element repeated
  over time, strands running in parallel, a capstone that culminates the set).
- **Presented sequence** — the model's array order becomes the curriculum's display order; the
  relations carry the finer semantics.

Two kinds of cycles are impossible by construction: the parent/child hierarchy must be acyclic, and
the ordering relations must form a DAG. The service re-checks both mathematically (Kahn's
algorithm) after the model answers — a model that emits a loop has its entire answer discarded.

## How full coverage is guaranteed — no gaps, no duplication

Every element must cite **which envelope requirements it serves**, by index into the envelope's own
lists. The service then re-validates the answer deterministically before anything is saved:

1. **Completeness** — across all elements, every satisfaction test, every practice requirement,
   every evidence requirement, and every mastery signal must be covered by at least one element.
   The door has no unexplained gaps. (Context requirements are recorded as coverage too, but a
   context gap is advisory, never fatal — context is often envelope-wide rather than per-element.)
2. **Validity** — cited indices must point at requirements that actually exist; the response schema
   constrains the model to the presented ranges, and the checker re-verifies membership.
3. **Soundness** — unique keys, resolvable parents and relation targets, no self-reference, both
   graphs acyclic, element count within the ceiling, honest per-element confidence and a short
   provenance note (which envelope portions caused the element to exist, and why those requirements
   justify a separate element — auditable reasoning, never chain-of-thought).

Any single break — one uncovered satisfaction test, one dangling reference, one cycle, one element
too many — and the **entire answer is rejected and nothing is written**. The run is marked failed
and a human re-triggers it deliberately; the service never saves a partial or under-covering
curriculum. Duplication is policed one level up: the smallest-coherent rule plus the sibling signal
push the model away from re-teaching, and the coverage check means everything claimed must be
accounted for.

## What the organization receives

A successful run writes a curriculum header (summary, assumed prerequisites, which model produced
it, which contract it satisfies) plus its elements — born **provisional** (`review_status:
pending`) for a human to approve, element by element if needed. Approving a curriculum is what arms
the next layer, Instructional Design. A new curriculum for the same skill **supersedes** the old one
rather than deleting it, so the reasoning trail is never lost.

## A worked example (sanitized)

Skill: *Respond to a suspected medication error*. The envelope says, in part:

- **Satisfaction tests (the door):** [0] in a simulated discrepancy, the learner takes the correct
  immediate safety actions in time; [1] the learner completes a compliant incident report with the
  right escalation contacts.
- **Practice:** [0] recognize error indicators across varied scenarios; [1] draft an incident report
  from a case narrative. **Evidence:** [0] an assessor-reviewed simulated incident report.
  **Mastery:** [0] no missed safety steps across two consecutive simulations.
  **Context:** [0] unit setting under interruption pressure. **Prerequisite:** current clinical
  registration. **Boundary:** drug-class pharmacology belongs to a child envelope.

The curriculum produced:

| Key | Element | Role | Covers | Order |
|---|---|---|---|---|
| e1 | Recognizing a possible medication error | instruction | practice[0], context[0] | first |
| e2 | Guided response drills | practice | tests[0], practice[0], mastery[0] | after e1 |
| e3 | Documenting the incident | practice | practice[1], evidence[0] | after e1, parallel with e2 |
| e4 | Assessed full simulation | assessment | tests[0], tests[1], evidence[0], mastery[0] | after e2 + e3 (culminating) |

And one assumed prerequisite: *current clinical registration — entrance evidence*.

Notice what this demonstrates. Four elements, not eight — recognition and safety drills combine the
practice and mastery requirements that share a stage of learning, while documentation gets its own
element because its evidence condition genuinely differs. The registration prerequisite generated no
lessons. No pharmacology elements exist — that ground belongs to a child envelope. Both satisfaction
tests, both practice requirements, the evidence requirement, and the mastery signal are each covered
at least once; had test [1] been left uncovered, or e4 pointed back at e1 in a cycle, the whole
answer would have been discarded and nothing saved.

## Evidence and source note

Written from the worker's source at commit `386c0a6bdface08e87298503edcd70254fc11e9d`: the design
stance is the system prompt and element contract in `src/curriculum/prompts.ts` and
`src/curriculum/types.ts`; the coverage/DAG/ceiling guarantees are the deterministic re-validator
`parseCurriculum` in the same file; the fail-soft and supersede behaviour is
`src/curriculum/inferCurriculum.ts` and `src/curriculum/store.ts`; table shapes are
`schema/009_curriculum.sql`. The worked example is illustrative, not a captured run.
