@mmon-co/ncept-default-theory 3.0.20 → 3.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -58,7 +58,7 @@ Record payload types are exported from `@mmon-co/ncept-default-theory/state` and
58
58
  | `demonstration` | `Demonstration` | A Node's success/failure/don't-know, whether unaided, grader, task and response; optional evaluation records criterion probabilities and overrides. `recording: "retrieval-opener"` marks lesson-opening retrieval. |
59
59
  | `lapse` | `Lapse` | Diagnosed regression for a Node, optionally linked to the same lesson's prior slip; affects retention, not acquisition |
60
60
  | `grade` | `Grade` | A Node's whole-day retention judgment (`Again`, `Hard`, `Good`, `Easy`) and the exact learner-day interval |
61
- | `review-pass` | `ReviewPass` | A passed Review for a Node, clearing the path until its covering grade sets retention |
61
+ | `review-pass` | `ReviewPass` | Historical evidence of a passed Review for a Node, suppressing its due and fading tags until a covering grade sets retention |
62
62
  | `feature-use` | `FeatureUse` | An accepted operation name, not proof of every criterion clause |
63
63
  | `teaching` | `Teaching` | An explicit explanation taught for a Node, separate from competence evidence |
64
64
  | `claim` | `Claim` | A statement, optional eliciting prompt and learner stance (`knows`, `forgotten`, `unfamiliar`) |
package/dist/chat.d.ts CHANGED
@@ -122,7 +122,7 @@ export declare const modes: {
122
122
  additionalProperties: false;
123
123
  };
124
124
  };
125
- required: ("review" | "id" | "label" | "milestone" | "priority" | "criterion" | "elaborate")[];
125
+ required: ("id" | "label" | "milestone" | "priority" | "review" | "criterion" | "elaborate")[];
126
126
  additionalProperties: false;
127
127
  };
128
128
  };
@@ -274,7 +274,7 @@ export declare const modes: {
274
274
  additionalProperties: false;
275
275
  };
276
276
  };
277
- required: ("review" | "id" | "label" | "milestone" | "priority" | "criterion" | "elaborate")[];
277
+ required: ("id" | "label" | "milestone" | "priority" | "review" | "criterion" | "elaborate")[];
278
278
  additionalProperties: false;
279
279
  };
280
280
  };
@@ -373,7 +373,7 @@ export declare const modes: {
373
373
  frontTab: string;
374
374
  entry: {
375
375
  required: true;
376
- kinds: ("review" | "target" | "mission")[];
376
+ kinds: ("target" | "mission")[];
377
377
  };
378
378
  capabilities: readonly HostCapability[];
379
379
  graphDraftBatch: {
@@ -420,7 +420,7 @@ export declare const modes: {
420
420
  additionalProperties: false;
421
421
  };
422
422
  };
423
- required: ("review" | "id" | "label" | "milestone" | "priority" | "criterion" | "elaborate")[];
423
+ required: ("id" | "label" | "milestone" | "priority" | "review" | "criterion" | "elaborate")[];
424
424
  additionalProperties: false;
425
425
  };
426
426
  };
package/dist/chat.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { renderSpeech } from "@mmon-co/ncept-core/theory/speaker";
2
2
  /* eslint-disable require-yield -- Chat setup is a zero-effect synchronous Program. */
3
- import { provenanceOf, lastMetadataContribution, metadataSetsForEntity, NODE_CRITERION_PROPERTY, NODE_LABEL_PROPERTY, PEDAGOGY_OPENING_PROPERTY, PEDAGOGY_FIRST_MESSAGE_PROPERTY, nodeCascadedProperty, } from "@mmon-co/ncept-core/patch";
3
+ import { provenanceOf, lastMetadataContribution, metadataSetsForEntity, NODE_CRITERION_PROPERTY, NODE_LABEL_PROPERTY, PEDAGOGY_OPENING_PROPERTY, PEDAGOGY_FIRST_MESSAGE_PROPERTY, nodeCascadedProperty, route, } from "@mmon-co/ncept-core/patch";
4
4
  import { CATALOG_MODE_TOOLS, CATALOG_MODE_TITLES, CATALOG_MODE_METADATA_KEYS } from "./catalog-contract.js";
5
5
  import { isDefaultObservation, isMemory, memoryDefault } from "./state.js";
6
6
  import { skillBody, skillResources, skillsForMode, tutorSystemPrompt } from "./skills.js";
@@ -8,6 +8,7 @@ import { catalogToolsForMode } from "./catalog.js";
8
8
  import { evaluationContext, evaluateWatchedReply } from "./evaluation.js";
9
9
  import { lessonOpening, openingLanguage } from "./opening.js";
10
10
  import { nodeReviewSchedule } from "./path.js";
11
+ import { defaultQueryTokens } from "./tags.js";
11
12
  import { graphDraftBatch } from "./graph-draft-batch.js";
12
13
  const COMMON_CONCEPT_PATCH_PROPERTY = "app:common-concept";
13
14
  const RAISE_WHEN_PROPERTY = "pedagogy:raise-when";
@@ -154,6 +155,40 @@ function tutorOpening(ctx) {
154
155
  .filter(Boolean)
155
156
  .join("\n");
156
157
  }
158
+ function dueNodes(ctx) {
159
+ const { graph, state, entry } = ctx;
160
+ const due = defaultQueryTokens["review:due"](state, graph);
161
+ const fading = defaultQueryTokens["review:fading"](state, graph);
162
+ if (due.size === 0 && fading.size === 0)
163
+ return [];
164
+ const here = ctx.lesson?.here;
165
+ const focus = new Set(here?.nodes);
166
+ const prerequisites = new Set();
167
+ for (const node of focus) {
168
+ const result = route(graph, node);
169
+ if (result.kind === "found")
170
+ for (const { id } of result.nodes)
171
+ if (!focus.has(id))
172
+ prerequisites.add(id);
173
+ }
174
+ const missionId = here?.mission.id ?? (entry?.kind === "mission" ? entry.id : undefined);
175
+ const mission = ctx.missions?.find(({ id }) => id === missionId);
176
+ const scope = new Set([...ctx.about, ...(mission?.nodes ?? []), ...prerequisites]);
177
+ const retrievability = (node) => state.nodes[node]?.schedule?.retrievability ?? 1;
178
+ return [...scope]
179
+ .filter((node) => due.has(node) || fading.has(node))
180
+ .sort((a, b) => retrievability(a) - retrievability(b) || a.localeCompare(b))
181
+ .map((node) => {
182
+ const label = nodeCascadedProperty(graph, node, NODE_LABEL_PROPERTY);
183
+ return {
184
+ node,
185
+ label: typeof label === "string" ? label : node,
186
+ status: fading.has(node) ? "fading" : "due",
187
+ ...(fading.has(node) && prerequisites.has(node) ? { fadingPrerequisiteOfHere: true } : {}),
188
+ ...(nodeReviewSchedule(graph, node).kind === "interval" ? { interval: true } : {}),
189
+ };
190
+ });
191
+ }
157
192
  function* setup(ctx, mode) {
158
193
  for (const node of ctx.about)
159
194
  if (!ctx.graph.nodes.some(({ id }) => id === node))
@@ -162,10 +197,7 @@ function* setup(ctx, mode) {
162
197
  const prompt = tutorSystemPrompt(mode);
163
198
  const { documents, candidates } = documentListing(ctx);
164
199
  const offered = linkedDocuments(ctx, documents, ctx.tutorMessages ?? []);
165
- const entry = ctx.entry;
166
- const intervalNodes = entry?.kind === "review"
167
- ? entry.nodes.filter((node) => nodeReviewSchedule(ctx.graph, node).kind === "interval")
168
- : [];
200
+ const retention = dueNodes(ctx);
169
201
  return {
170
202
  prompt,
171
203
  context: [
@@ -182,14 +214,7 @@ function* setup(ctx, mode) {
182
214
  : "This Session is attached to no Nodes; name Nodes explicitly where a tool needs them.",
183
215
  ...(ctx.entry === undefined ? [] : [`Session opening (host-resolved facts):\n${JSON.stringify(ctx.entry)}`]),
184
216
  ...(ctx.missions?.length ? [`Current Missions (context data):\n${JSON.stringify(ctx.missions)}`] : []),
185
- ...(entry?.kind === "review"
186
- ? [
187
- `Current Review (frozen batch; check retention, not teach):\n${JSON.stringify({
188
- ...entry,
189
- ...(intervalNodes.length > 0 ? { intervalNodes } : {}),
190
- })}`,
191
- ]
192
- : []),
217
+ retention.length ? `Due and fading Nodes (most overdue first):\n${JSON.stringify(retention)}` : undefined,
193
218
  ...(here === undefined
194
219
  ? []
195
220
  : [
@@ -267,7 +292,7 @@ export const modes = {
267
292
  lesson: {
268
293
  title: CATALOG_MODE_TITLES.lesson,
269
294
  frontTab: "document",
270
- entry: { required: true, kinds: ["mission", "target", "review"] },
295
+ entry: { required: true, kinds: ["mission", "target"] },
271
296
  capabilities: catalogCapabilities("lesson"),
272
297
  graphDraftBatch,
273
298
  metadataKeys: CATALOG_MODE_METADATA_KEYS.lesson,
@@ -68,7 +68,7 @@ export declare const graphDraftBatch: {
68
68
  additionalProperties: false;
69
69
  };
70
70
  };
71
- required: ("review" | "id" | "label" | "milestone" | "priority" | "criterion" | "elaborate")[];
71
+ required: ("id" | "label" | "milestone" | "priority" | "review" | "criterion" | "elaborate")[];
72
72
  additionalProperties: false;
73
73
  };
74
74
  };
@@ -125,7 +125,7 @@ export declare const implementation: {
125
125
  additionalProperties: false;
126
126
  };
127
127
  };
128
- required: ("review" | "id" | "label" | "milestone" | "priority" | "criterion" | "elaborate")[];
128
+ required: ("id" | "label" | "milestone" | "priority" | "review" | "criterion" | "elaborate")[];
129
129
  additionalProperties: false;
130
130
  };
131
131
  };
@@ -277,7 +277,7 @@ export declare const implementation: {
277
277
  additionalProperties: false;
278
278
  };
279
279
  };
280
- required: ("review" | "id" | "label" | "milestone" | "priority" | "criterion" | "elaborate")[];
280
+ required: ("id" | "label" | "milestone" | "priority" | "review" | "criterion" | "elaborate")[];
281
281
  additionalProperties: false;
282
282
  };
283
283
  };
@@ -376,7 +376,7 @@ export declare const implementation: {
376
376
  frontTab: string;
377
377
  entry: {
378
378
  required: true;
379
- kinds: ("review" | "target" | "mission")[];
379
+ kinds: ("target" | "mission")[];
380
380
  };
381
381
  capabilities: readonly import("@mmon-co/ncept-core/theory").HostCapability[];
382
382
  graphDraftBatch: {
@@ -423,7 +423,7 @@ export declare const implementation: {
423
423
  additionalProperties: false;
424
424
  };
425
425
  };
426
- required: ("review" | "id" | "label" | "milestone" | "priority" | "criterion" | "elaborate")[];
426
+ required: ("id" | "label" | "milestone" | "priority" | "review" | "criterion" | "elaborate")[];
427
427
  additionalProperties: false;
428
428
  };
429
429
  };
package/dist/index.d.ts CHANGED
@@ -118,7 +118,7 @@ export declare const defaultTheory: {
118
118
  additionalProperties: false;
119
119
  };
120
120
  };
121
- required: ("review" | "id" | "label" | "milestone" | "priority" | "criterion" | "elaborate")[];
121
+ required: ("id" | "label" | "milestone" | "priority" | "review" | "criterion" | "elaborate")[];
122
122
  additionalProperties: false;
123
123
  };
124
124
  };
@@ -270,7 +270,7 @@ export declare const defaultTheory: {
270
270
  additionalProperties: false;
271
271
  };
272
272
  };
273
- required: ("review" | "id" | "label" | "milestone" | "priority" | "criterion" | "elaborate")[];
273
+ required: ("id" | "label" | "milestone" | "priority" | "review" | "criterion" | "elaborate")[];
274
274
  additionalProperties: false;
275
275
  };
276
276
  };
@@ -369,7 +369,7 @@ export declare const defaultTheory: {
369
369
  frontTab: string;
370
370
  entry: {
371
371
  required: true;
372
- kinds: ("review" | "target" | "mission")[];
372
+ kinds: ("target" | "mission")[];
373
373
  };
374
374
  capabilities: readonly import("@mmon-co/ncept-core").HostCapability[];
375
375
  graphDraftBatch: {
@@ -416,7 +416,7 @@ export declare const defaultTheory: {
416
416
  additionalProperties: false;
417
417
  };
418
418
  };
419
- required: ("review" | "id" | "label" | "milestone" | "priority" | "criterion" | "elaborate")[];
419
+ required: ("id" | "label" | "milestone" | "priority" | "review" | "criterion" | "elaborate")[];
420
420
  additionalProperties: false;
421
421
  };
422
422
  };
package/dist/opening.js CHANGED
@@ -8,7 +8,7 @@ export function lessonOpening(graph, nodes, mission) {
8
8
  .filter(({ from, to }) => nodes.includes(from) && !nodes.includes(to) && mission?.nodes.includes(to))
9
9
  .map(({ to }) => to));
10
10
  return {
11
- instruction: "Make and open the Lesson’s Materials first per the focus Nodes’ guidance (ask first only if that guidance leaves the work undecided). Then introduce the Lesson—what its focus Nodes cover, its Materials in order, what completes it, and what follows. If the focus Nodes have prior prerequisites with Records and no authored first action or conjectured-measure opener supersedes it, open with a quick retrieval prompt on prior work rather than a recap (recording the attempt with retrieval-opener); otherwise elicit the first action (using the first Node’s authored first action if supplied; later Nodes’ openings wait until those Nodes are reached).",
11
+ instruction: "Recheck prerequisites marked fadingPrerequisiteOfHere with fresh problems (material Skill, review.md) before building on them. Then make and open the Lesson’s Materials per the focus Nodes’ guidance (ask first only if that guidance leaves the work undecided). Introduce the Lesson—what its focus Nodes cover, its Materials in order, what completes it, and what follows. If there was no fading-prerequisite recheck and the focus Nodes have prior prerequisites with Records and no authored first action or conjectured-measure opener supersedes it, open with a quick retrieval prompt on prior work rather than a recap (recording the attempt with retrieval-opener); otherwise elicit the first action (using the first Node’s authored first action if supplied; later Nodes’ openings wait until those Nodes are reached).",
12
12
  facts: {
13
13
  focus: nodes.map((node) => ({
14
14
  ...label(node),
package/dist/path.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type NodeId, type ResolvedGraph } from "@mmon-co/ncept-core/patch";
2
2
  import { type MissionPath, type MissionFuture, type PathContext, type PathInputs, type PathSelection } from "@mmon-co/ncept-core/theory";
3
- import { type DefaultState } from "./state.js";
3
+ import type { DefaultState } from "./state.js";
4
4
  import { type ReviewSchedule } from "./schedules.js";
5
5
  export { REVIEW_PROPERTY, validateReviewSchedule, type ReviewSchedule } from "./schedules.js";
6
6
  /** Default-theory authoring metadata, not Core graph vocabulary. */
@@ -15,6 +15,6 @@ export declare function nodePriority(graph: ResolvedGraph, node: NodeId): number
15
15
  * not by lesson, so a Node may be taught in more than one group.
16
16
  */
17
17
  export declare function teachingPath(graph: ResolvedGraph, targets: readonly NodeId[]): MissionPath;
18
+ /** The syllabus stays addressable as progress changes; only the future is upcoming. */
18
19
  export declare function pathDefault(context: PathContext): MissionFuture;
19
- /** The graph and historical timing are independent of the Mission's targets and run. */
20
- export declare function preparePathDefault(inputs: PathInputs, state?: DefaultState): (selection: PathSelection) => MissionFuture;
20
+ export declare function preparePathDefault(inputs: PathInputs, _state?: DefaultState): (selection: PathSelection) => MissionFuture;
package/dist/path.js CHANGED
@@ -1,9 +1,8 @@
1
1
  import { provenanceOf, lastMetadataContribution, metadataSetsForEntity, NODE_ELABORATE_PROPERTY, nodeCascadedProperty, route, unscopedCopyTagName, } from "@mmon-co/ncept-core/patch";
2
2
  import { dependentCones } from "./dependent-cone.js";
3
- import { LESSON_TAG_PREFIX, tagIndex, } from "@mmon-co/ncept-core/theory";
4
- import { prepareEstimateDefault, progressDefault } from "./reading.js";
5
- import { DEFAULT_PARAMETERS, stateDefault } from "./state.js";
6
- import { REVIEW_PROPERTY, retrievabilityAt, sameReviewCurve } from "./schedules.js";
3
+ import { LESSON_TAG_PREFIX, } from "@mmon-co/ncept-core/theory";
4
+ import { progressDefault } from "./reading.js";
5
+ import { REVIEW_PROPERTY } from "./schedules.js";
7
6
  export { REVIEW_PROPERTY, validateReviewSchedule } from "./schedules.js";
8
7
  /** Default-theory authoring metadata, not Core graph vocabulary. */
9
8
  export function pathProperty(graph, node, key) {
@@ -180,125 +179,22 @@ export function teachingPath(graph, targets) {
180
179
  first.lessons.unshift({ kind: "checkpoint", numbered: false, nodes: [], checkpoint: { required: true } });
181
180
  return { sections, warnings: [...warnings.values()] };
182
181
  }
183
- /** Most overdue first, with deterministic ties independent of projection assembly order. */
184
- function ranked(nodes, context) {
185
- const rank = (id) => context.projection.nodes[id]?.find((tag) => tag.tag === "review:due")?.rank ?? 0;
186
- return [...nodes].sort((a, b) => rank(b) - rank(a) || a.localeCompare(b));
187
- }
188
- /** Nodes are indivisible: an over-budget first Node must still make progress. */
189
- function packed(candidates, context, estimate) {
190
- const nodes = [];
191
- for (const node of ranked(candidates, context)) {
192
- if (nodes.length &&
193
- estimate([{ kind: "review", numbered: false, nodes: [...nodes, node] }]).minutes > context.minutes)
194
- break;
195
- nodes.push(node);
196
- }
197
- return nodes;
198
- }
199
- /** Invalidate at the next membership threshold or candidate rank change. FSRS rounds
200
- * retrievability, so an unrounded analytic crossing would miss the first effective tick.
201
- * Rank changes are conservative: the order may survive one, but cannot change before it.
202
- */
203
- function pathValidity(context, scope, state) {
204
- const now = Date.parse(context.now);
205
- const boundaries = context.projection.validUntil === undefined ? [] : [Date.parse(context.projection.validUntil)];
206
- const candidates = context.graph.nodes.flatMap(({ id }) => {
207
- const schedule = state.nodes[id]?.schedule;
208
- const rank = context.projection.nodes[id]?.find(({ tag }) => tag === "review:due")?.rank;
209
- return scope.has(id) && schedule && rank !== undefined
210
- ? [{ id, schedule, priority: Math.round(rank - 1 + schedule.retrievability) }]
211
- : [];
212
- });
213
- // Integer priority dominates decay. Identical curves keep even their stable ties forever.
214
- const competing = new Set(candidates
215
- .filter((a) => candidates.some((b) => a.priority === b.priority && !sameReviewCurve(a.schedule, b.schedule)))
216
- .map(({ id }) => id));
217
- for (const { id } of context.graph.nodes) {
218
- const node = state.nodes[id];
219
- const schedule = node?.schedule;
220
- if (!scope.has(id) || !schedule || node.reviewCleared)
221
- continue;
222
- const at = (time) => retrievabilityAt(schedule, time);
223
- const nextBelow = (threshold) => {
224
- if (threshold <= 0 || at(now) < threshold)
225
- return;
226
- let low = now, high = now + 86_400_000;
227
- while (at(high) >= threshold && high < 8_640_000_000_000_000)
228
- high = Math.min(8_640_000_000_000_000, now + (high - now) * 2);
229
- if (at(high) >= threshold)
230
- return;
231
- while (high - low > 1) {
232
- const mid = Math.floor(low + (high - low) / 2);
233
- if (at(mid) < threshold)
234
- high = mid;
235
- else
236
- low = mid;
237
- }
238
- boundaries.push(high);
239
- };
240
- if (!schedule.lapsed) {
241
- nextBelow(DEFAULT_PARAMETERS.retention.due);
242
- nextBelow(DEFAULT_PARAMETERS.retention.fading);
243
- }
244
- if (competing.has(id))
245
- nextBelow(schedule.retrievability);
246
- }
247
- const expiry = Math.min(...boundaries);
248
- return Number.isFinite(expiry) ? { validUntil: new Date(expiry).toISOString() } : {};
249
- }
182
+ /** The syllabus stays addressable as progress changes; only the future is upcoming. */
250
183
  export function pathDefault(context) {
251
- return preparePathDefault(context)(context);
252
- }
253
- /** The graph and historical timing are independent of the Mission's targets and run. */
254
- export function preparePathDefault(inputs, state) {
255
- let estimate;
256
- let tags;
257
- const readState = () => (state ??= stateDefault(inputs.graph, inputs.observations, inputs.now));
258
- return (selection) => readPath({ ...inputs, ...selection }, (tags ??= tagIndex(inputs.projection)), (estimate ??= prepareEstimateDefault(inputs)), readState);
259
- }
260
- /** The syllabus stays addressable as progress changes; only the future is upcoming.
261
- * A trailing unnumbered review is maintenance; a review with numberOffset 1 blocks the
262
- * following teaching stop. A graph-wide reading has only maintenance, and no Mission.
263
- */
264
- function readPath(context, tags, estimate, readState) {
265
- if (context.retired?.outcome === "abandoned")
266
- return { sections: [], warnings: [], future: [] };
267
- const { graph, targets, projection } = context;
268
- const path = teachingPath(graph, targets ?? []);
269
- const scope = targets === undefined
270
- ? new Set(graph.nodes.map(({ id }) => id))
271
- : new Set(path.sections.flatMap(({ lessons }) => lessons.flatMap(({ nodes }) => nodes)));
272
- const due = packed(graph.nodes.map(({ id }) => id).filter((id) => scope.has(id) && tags("review:due").has(id)), context, estimate);
273
- const maintenance = due.length ? [{ kind: "review", numbered: false, nodes: due }] : [];
274
- if (context.retired?.outcome === "achieved" || targets === undefined)
275
- return { ...path, ...pathValidity(context, scope, readState()), future: maintenance };
276
- const progress = progressDefault(graph, projection, [...scope]);
277
- const next = path.sections
278
- .flatMap(({ lessons }) => lessons)
279
- .find((lesson) => lesson.numbered && lesson.nodes.some((id) => progress[id]?.status === "open"));
280
- const cone = new Set(next?.nodes.flatMap((id) => {
281
- const result = route(graph, id);
282
- return result.kind === "found" ? result.nodes.map(({ id }) => id) : [];
283
- }) ?? []);
284
- const fading = packed(graph.nodes
285
- .map(({ id }) => id)
286
- .filter((id) => cone.has(id) && !next?.nodes.includes(id) && tags("review:fading").has(id)), context, estimate);
287
- const sections = path.sections.map((section) => ({
288
- ...section,
289
- lessons: section.lessons.flatMap((lesson) => lesson === next && fading.length
290
- ? [{ kind: "review", numbered: false, numberOffset: 1, nodes: fading }, lesson]
291
- : [lesson]),
292
- }));
184
+ const { graph, targets, projection, retired } = context;
185
+ const validity = projection.validUntil === undefined ? {} : { validUntil: projection.validUntil };
186
+ const path = teachingPath(graph, retired?.outcome === "abandoned" ? [] : (targets ?? []));
187
+ if (retired || targets === undefined)
188
+ return { ...path, ...validity, future: [] };
189
+ const lessons = path.sections.flatMap((section) => section.lessons);
190
+ const scope = [...new Set(lessons.flatMap((lesson) => lesson.nodes))];
191
+ const progress = progressDefault(graph, projection, scope);
293
192
  return {
294
193
  ...path,
295
- ...pathValidity(context, scope, readState()),
296
- sections,
297
- future: [
298
- ...sections
299
- .flatMap(({ lessons }) => lessons)
300
- .filter((lesson) => !lesson.numbered || lesson.nodes.some((id) => progress[id]?.status === "open")),
301
- ...maintenance,
302
- ],
194
+ ...validity,
195
+ future: lessons.filter((lesson) => !lesson.numbered || lesson.nodes.some((id) => progress[id]?.status === "open")),
303
196
  };
304
197
  }
198
+ export function preparePathDefault(inputs, _state) {
199
+ return (selection) => pathDefault({ ...inputs, ...selection });
200
+ }
package/dist/reading.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { isNumberedStop } from "@mmon-co/ncept-core/theory/path";
2
2
  import { defaultTheoryMessages } from "./messages.js";
3
- import { prepareLessonTiming, measuredReviewTiming } from "./timing.js";
3
+ import { prepareLessonTiming } from "./timing.js";
4
4
  /** Read a frozen default assessment through the same boundary as a live projection. */
5
5
  export function defaultTagProgress(tags) {
6
6
  const display = tags.find(({ tag }) => tag === "demonstrated" || tag === "probably-known" || tag === "unknown");
@@ -56,20 +56,16 @@ export function estimateDefault(context, lessons) {
56
56
  export function prepareEstimateDefault(context) {
57
57
  let teachingTiming;
58
58
  let timing;
59
- let reviewTiming;
60
59
  return (lessons) => {
61
60
  const teaching = new Set(lessons.filter(isNumberedStop).flatMap(({ nodes }) => nodes));
62
61
  const progress = progressDefault(context.graph, context.projection, [...teaching]);
63
62
  const open = [...teaching].filter((id) => progress[id]?.status === "open").length;
64
- const reviews = lessons.filter(({ kind }) => kind === "review").reduce((sum, { nodes }) => sum + nodes.length, 0);
65
63
  teachingTiming ??= prepareLessonTiming(context.graph, context.observations, context.activities);
66
64
  if (open > 0)
67
65
  timing ??= teachingTiming.measure();
68
- if (reviews > 0)
69
- reviewTiming ??= measuredReviewTiming(context.graph, context.observations, context.activities);
70
66
  return {
71
- minutes: open * (timing?.minutesPerNode ?? 0) + reviews * (reviewTiming?.minutesPerNode ?? 0),
72
- rough: (timing?.rough ?? teachingTiming.rough()) || (reviews > 0 && (reviewTiming?.rough ?? false)),
67
+ minutes: open * (timing?.minutesPerNode ?? 0),
68
+ rough: timing?.rough ?? teachingTiming.rough(),
73
69
  };
74
70
  };
75
71
  }
package/dist/release.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const theoryContent = "20599f14c6915bddb2f5427addd4b0fd65228195397d6f6895bd7d5c669ae8dc";
1
+ export declare const theoryContent = "6b8491bb1acf87fe29b0a6750ff10687b8f310bb2c65fd954eb8841b4b34a95d";
package/dist/release.js CHANGED
@@ -1 +1 @@
1
- export const theoryContent = "20599f14c6915bddb2f5427addd4b0fd65228195397d6f6895bd7d5c669ae8dc";
1
+ export const theoryContent = "6b8491bb1acf87fe29b0a6750ff10687b8f310bb2c65fd954eb8841b4b34a95d";
@@ -46,6 +46,5 @@ type RetentionEvidence = {
46
46
  type Replay = (evidence: RetentionEvidence) => ReplayedSchedule | undefined;
47
47
  export declare function validateReviewSchedule(value: unknown): asserts value is ReviewSchedule | undefined;
48
48
  export declare function prepareReviewReplay(schedule: ReviewSchedule): Replay;
49
- export declare function sameReviewCurve(a: NodeSchedule, b: NodeSchedule): boolean;
50
49
  export declare function retrievabilityAt(schedule: ReplayedSchedule, time: number): number;
51
50
  export {};
package/dist/schedules.js CHANGED
@@ -150,16 +150,6 @@ export function prepareReviewReplay(schedule) {
150
150
  return schedulers.never.replay;
151
151
  }
152
152
  }
153
- export function sameReviewCurve(a, b) {
154
- if (a.lastReview !== b.lastReview)
155
- return false;
156
- return a.kind === "fsrs"
157
- ? b.kind === "fsrs" &&
158
- a.stability === b.stability &&
159
- a.stabilityFast === b.stabilityFast &&
160
- a.difficulty === b.difficulty
161
- : b.kind === "interval" && a.days === b.days;
162
- }
163
153
  export function retrievabilityAt(schedule, time) {
164
154
  const elapsed = (time - Date.parse(schedule.lastReview)) / DAY_MS;
165
155
  if (schedule.kind === "fsrs")
@@ -1,12 +1,12 @@
1
1
  export declare const sources: {
2
- readonly "base.md": "# Tutor base\n\nHelp the learner accomplish what they want and expand what they can do. Think first about their goal, what they can already do, which way of learning fits, and what moves them furthest next.\n\nTalk with the learner in their terms. Tool names, identifiers, labels, Skills, and bookkeeping are yours; to the learner, refer to content by its display label and quote what they said.\n\n## Terms\n\n- **Node**: one observable capability or step, defined by what demonstrates it—a knowledge component, not a topic, lesson, or learner fact.\n- **Edge**: a prerequisite by necessity: demonstrating the dependent demonstrates the prerequisite. Never teaching order or relatedness.\n- **Tag**: a named set of Nodes whose guidance cascades to its members (`lesson:<name>` groups a Lesson).\n- **Guidance**: teaching or assessment instructions on a Node, tag, or Mission, cascading to the Nodes it reaches.\n- **Patch**: a versioned unit of graph content—the learner's Personal Patch or one adopted from the Hub.\n- **Mission**: a learner's goal, its target Nodes (once charted), the View of their prerequisites, and the numbered path through them.\n- **View**: a saved selection of Nodes; a Mission's View is its targets and their prerequisites.\n- **Milestone**: a Node checked by a whole performance closing a section of a path.\n- **Lesson**: one numbered objective on a path: a few Nodes and what completes them. A Review rechecks due Nodes.\n- **Material**: a reading, exercise, drill, artifact, or interactive environment the learner works in (each host defines its own Material kinds).\n- **Record**: an observation of what the learner did or claimed on a Node. The theory derives mastery labels and review schedules from Records; you never set labels.\n\n## Teaching\n\n- Converse in the learner's language unless there is a pedagogical reason not to. Target-language practice is practice, not a request to switch the conversation language.\n- Fit the method to the goal as stated, skipping what the learner already knows. On a self-charted Mission (purposeful practice), treat the map and drills as a conjecture under test and adjust when they don't move the needle.\n- Follow saved preferences and cascaded guidance before choosing or making Material. Pace work to the learner's Session length and suggest wrapping up as active minutes approach it.\n- Prefer real-world, best-in-class tools when the real performance lives there (their editor, sketchbook, DAW, repo, real conversation) and judge the artifact they bring back. Use Materials for worked examples, structured practice, and interactive drills where no external tool fits; keep conversation for goals, reports, questions, and confusion.\n- Root explanations in the discourse, Rimé style: surface thinkers, traditions, and primary sources so the learner can read the originals and branch into \"what does X think about Y?\" rather than \"what do you think?\" Pick one named convention for a novice's first worked example, then open the wider lineages; attribute only real positions you know or have read.\n- Present knowledge easily (Sweller); make practice effortful—retrieval, spacing, interleaving (Bjork).\n- Start novices with worked examples and step-level feedback (Sweller, VanLehn), fading scaffolds toward unaided checks near ~80% success (expertise reversal, Rosenshine). Interleave confusable skills once learned, not on first exposure.\n- Skip seductive details, \"learning styles\", passive rereading/highlighting, and unassisted discovery for novices.\n- Read prefetched Node memory and the Node's `trail` for the current scope, noticing what other Sessions added. Memory is context, never evidence.\n- Tailor from an explicit preference or a Record, never a presumed learner trait.\n\n## Evidence\n\n- Describe what happened; the theory interprets it. Record an actual attempt at a posed, transfer-appropriate, failable check (including a real-world step the learner reports). Reading, explanation, or a passing remark shows nothing.\n- Never record, withhold, or re-home a Record to steer a label. Retain what the learner actually did, and name a misconception only when the response supports it.\n- Ground factual claims about the learner or content in a Record or Patch provenance (citing IDs in tool calls and drafts, and quoting or display-labeling them to the learner). Summaries are never evidence.\n";
2
+ readonly "base.md": "# Tutor base\n\nHelp the learner accomplish what they want and expand what they can do. Think first about their goal, what they can already do, which way of learning fits, and what moves them furthest next.\n\nTalk with the learner in their terms. Tool names, identifiers, labels, Skills, and bookkeeping are yours; to the learner, refer to content by its display label and quote what they said.\n\n## Terms\n\n- **Node**: one observable capability or step, defined by what demonstrates it—a knowledge component, not a topic, lesson, or learner fact.\n- **Edge**: a prerequisite by necessity: demonstrating the dependent demonstrates the prerequisite. Never teaching order or relatedness.\n- **Tag**: a named set of Nodes whose guidance cascades to its members (`lesson:<name>` groups a Lesson).\n- **Guidance**: teaching or assessment instructions on a Node, tag, or Mission, cascading to the Nodes it reaches.\n- **Patch**: a versioned unit of graph content—the learner's Personal Patch or one adopted from the Hub.\n- **Mission**: a learner's goal, its target Nodes (once charted), the View of their prerequisites, and the numbered path through them.\n- **View**: a saved selection of Nodes; a Mission's View is its targets and their prerequisites.\n- **Milestone**: a Node checked by a whole performance closing a section of a path.\n- **Lesson**: one numbered objective on a path: a few Nodes and what completes them.\n- **Material**: a reading, exercise, drill, artifact, or interactive environment the learner works in (each host defines its own Material kinds).\n- **Record**: an observation of what the learner did or claimed on a Node. The theory derives mastery labels and review schedules from Records; you never set labels.\n\n## Teaching\n\n- Converse in the learner's language unless there is a pedagogical reason not to. Target-language practice is practice, not a request to switch the conversation language.\n- Fit the method to the goal as stated, skipping what the learner already knows. On a self-charted Mission (purposeful practice), treat the map and drills as a conjecture under test and adjust when they don't move the needle.\n- Follow saved preferences and cascaded guidance before choosing or making Material. Pace work to the learner's Session length and suggest wrapping up as active minutes approach it.\n- Prefer real-world, best-in-class tools when the real performance lives there (their editor, sketchbook, DAW, repo, real conversation) and judge the artifact they bring back. Use Materials for worked examples, structured practice, and interactive drills where no external tool fits; keep conversation for goals, reports, questions, and confusion.\n- Root explanations in the discourse, Rimé style: surface thinkers, traditions, and primary sources so the learner can read the originals and branch into \"what does X think about Y?\" rather than \"what do you think?\" Pick one named convention for a novice's first worked example, then open the wider lineages; attribute only real positions you know or have read.\n- Present knowledge easily (Sweller); make practice effortful—retrieval, spacing, interleaving (Bjork). Recheck due Nodes with fresh problems in chat when it serves the work.\n- Start novices with worked examples and step-level feedback (Sweller, VanLehn), fading scaffolds toward unaided checks near ~80% success (expertise reversal, Rosenshine). Interleave confusable skills once learned, not on first exposure.\n- Skip seductive details, \"learning styles\", passive rereading/highlighting, and unassisted discovery for novices.\n- Read prefetched Node memory and the Node's `trail` for the current scope, noticing what other Sessions added. Memory is context, never evidence.\n- Tailor from an explicit preference or a Record, never a presumed learner trait.\n\n## Evidence\n\n- Describe what happened; the theory interprets it. Record an actual attempt at a posed, transfer-appropriate, failable check (including a real-world step the learner reports). Reading, explanation, or a passing remark shows nothing.\n- Never record, withhold, or re-home a Record to steer a label. Retain what the learner actually did, and name a misconception only when the response supports it.\n- Ground factual claims about the learner or content in a Record or Patch provenance (citing IDs in tool calls and drafts, and quoting or display-labeling them to the learner). Summaries are never evidence.\n";
3
3
  readonly "chart/SKILL.md": "---\nname: chart\ndescription: A Mission, or the next section of one, needs graph content; or content is being designed for others to adopt.\n---\n\nCharting is dependency resolution from a settled Mission. When authoring a Patch for others, chart for a typical adopter's Mission.\n\n## Method\n\n1. **Survey how people get there.** Within the Mission's settled approach, check how courses, textbooks, syllabi, or practitioner playbooks and postmortems sequence this ground. Read structures, not full contents—Lessons pull in materials later. Use this to counter expert blind spot and recall bias.\n\n2. **Find the macro organization.** Decide how the Mission's prerequisites naturally hang together: a sequence of real steps and the capabilities they need, several independently valuable skills, separately practiced strands (like vocab vs grammar), or a fractal \"smaller circles\" progression. Separately practiced paths are strand tags; the practice serving a strand goes in guidance on its tag, not as a Node.\n\n3. **Choose milestones.** Pick a few milestones marking sections toward the targets:\n - Each milestone is a smaller Mission—a whole, realistic performance worth having on its own. Put whichever gets the learner doing the real thing soonest (even crudely) first.\n - Mark each section's closing Node `milestone: true` and give its criterion a ladder of simpler conditions down to the lowest viable whole task.\n - World-dependent outcomes (such as a stranger paying) suit milestones; a miss leads to re-charting at its check-in.\n - For a conjectured approach (purposeful practice), the next milestone is its measure: name in Mission assessment guidance the short task from it that a Lesson can open on, with its metric (time, rate, count) where it has one.\n - Milestone 0 holds what the learner says they already know or did, quoting their words as claims.\n\n4. **Elaborate the first section.** Work back from its milestone Node into smaller prerequisites until each can be checked. Leave later sections coarse with `elaborate: true` for the check-in before them.\n\n5. **Draft** with `edit_graph_draft`: use `nodes`, `edges`, `tags` and `targets`. For a large graph, write several batches against the same draft, with prerequisites before references in later calls. Use `operations` for advanced edits after the batch. In the ordered form, `put` adds or replaces keyed content, `retract` removes an own accepted Edge or metadata set, `mask-contribution` suppresses a base contribution, `delete` removes a draft key (`claim:node-id` for a claim), `claim` attaches verbatim learner wording, and `discard` clears the draft alone.\n\n6. **Propose** the valid draft as a Mission or revision when setting Mission targets, or a graph diff when they don't change (content for others carries no claims). Don't write a syllabus; the theory derives the path.\n\n## The graph\n\n- **Nodes** are single observable capabilities or steps, defined by what shows them. Include only what the learner can and will do themselves—leave out work an agent can simply do or coordinating other people. Different presentations of one task are one Node.\n- **Edges** express definitional necessity—the dependent cannot be demonstrated without the prerequisite—with the reason in `because`. Preferred teaching order is `priority`, never an Edge.\n- **Splitting:** a part too large for one Lesson lacks a prerequisite step or capability (child Node), volume (tiers: top 50 words, then 100), or consolidation (thresholds: 60, then 90 wpm).\n- **Review schedules:** set `review` to `{\"kind\":\"fsrs\"}` for what must be remembered, `{\"kind\":\"never\"}` for one-off steps, or `{\"kind\":\"interval\",\"days\":30}` (choosing the period) for maintained states or capabilities that detrain. Defaults when unset: `never` for milestones, `fsrs` otherwise.\n- **Reuse and grouping:** reuse an existing Node only unchanged (its metadata is shared across Missions). Group small Nodes checked together with a `lesson:<name>` tag within one section. Override adopted guidance in the Mission's own guidance, scoped to its Node.\n";
4
- readonly "checkpoint/SKILL.md": "---\nname: checkpoint\ndescription: The Session opened on a check-in, or the learner says the course, or some of its content, isn't working.\n---\n\nA checkpoint adjusts a Mission in progress to what its Lessons have shown.\n\n## Method\n\n1. **Reflect.** After a milestone, start from its outcome and closing note in the Session opening: recount what the learner showed, what came easy, and what was hard, and ask whether their goal has shifted. After a complaint, ask what isn't working and read the cited Records. With no milestone behind this check-in, skip to step 3.\n\n2. **Diagnose.** Warnings and outcomes point at a cause without proving it; read the cited task and response first.\n - **Goal moved:** revise the Mission (see `mission`).\n - **Milestone failed:** re-chart a plan that didn't work in the world; for a capability miss, add a follow-up Lesson stepped down the criterion's ladder, propose a blocking Review for regressed components, or chart missing Nodes. Fix the map, not the learner.\n - **Map is wrong** (grain, Edges, order, method): edit it (see `chart`). Editing a Node keeps its Records, so change its criterion only while it still asserts the same capability; otherwise replace it.\n - **Record is wrong:** that's a recording error corrected in a Lesson, not a map problem.\n\n3. **Elaborate the next section** as charting does, folding in what Lessons deferred here. Move the Mission's measure to the next milestone and set `pedagogy:elaborate: false` on refined Nodes.\n\n4. **Propose** the changes as a graph diff for the Mission. At the final check-in, give the Mission retrospective—what they can do now—then retire the Mission (with an extension or next Mission if they want one).\n";
5
- readonly "material/SKILL.md": "---\nname: material\ndescription: A Lesson or Review is starting or its Materials have run, or a Material needs making or changing.\n---\n\nMaterials carry the learner into the work: worked examples, drills, structured checks, or briefs for real-world steps. Reuse existing Materials on a Node (`items`) before making new ones.\n\nPrefer real-world, best-in-class tools when the real performance lives there (their editor, sketchbook, repo, DAW, real conversation) and judge the artifact rather than building a worse substitute. No seductive details.\n\nA Material can teach, assess, or both, escalating difficulty and letting the learner retry until they clear the bar. Assess with unaided checks at the Nodes' criteria under Mission assessment guidance—enough independent checks to demonstrate each Node, graded mechanically wherever answers are mechanical. Once confusable skills are learned, interleave them in practice (not on first exposure).\n\nLoad the guide for the Session with `skill {name:'material', resource}`:\n\n- Lesson: [lesson.md](lesson.md) (and for a milestone, [milestone.md](milestone.md))\n- Review: [review.md](review.md)\n\nChoose from the Material kinds your host provides (load your host's Material skill for available kinds and formats).\n\n## Assessing\n\n- **Transfer-appropriate checks:** test production with production, not recognition; give competing options similar length and form, mapping distractors to real misconceptions.\n- **Granularity & feedback:** pose separate questions as separate short tasks. Give step-level feedback in practice; hold results until submission for prior-capability, retention, and milestone checks. Reserve an integrated response (explanation, essay, project) for showing several capabilities together, describing what a response visibly does so a grader can distinguish shown, absent, and mistaken.\n- **Help & evidence:** in a Lesson, offer a hint after a mistake and add the correction if it persists; prior-capability, retention, and milestone checks only measure. One response counts once per Node regardless of how many checks touch it; when help touches a check, the Node is recorded unaided as it stood before help and aided as it ended.\n";
6
- readonly "material/lesson.md": "# lesson\n\nWhen a short Lesson clears and there is time and attention left, carry on into the next Lesson. When it makes sense to stop, recount what the learner did and end the Session even if its Lesson is unfinished.\n\n1. **Read the Lesson:** the current Lesson in context, its focus Nodes, their criteria, guidance, memory, trail, and existing Materials (`items`). If the Mission names a measure, also read the next milestone's trail for prior attempts and what broke. If an adopted Patch's Materials are already open, wait for the learner.\n\n2. **When starting a Lesson, open the work the focus Nodes' guidance names, set completion, and bridge from prior work:**\n - **Retrieval opener:** when the focus Nodes have prior prerequisites with Records (and no authored first action or conjectured-measure opener supersedes it), open with a quick retrieval prompt on a prerequisite or recent Node instead of a recap, recording the learner's attempt via `retrieval-opener`.\n - **Memory work:** add the cards in one step, open them, and set each Node's `pedagogy:completion` query to its card recalls.\n - **Real-world step:** open a brief Material covering what to do, what it serves (its dependents), what done looks like, and any useful prep (drafting, rehearsing a conversation). Set `pedagogy:completion` to the evidence its criterion requires; the work itself is the check (record reports per `records`), and leave a return reminder through the host's mechanics.\n - **Exercise-based work:** add teaching Material and one assessment set of short, single-question tasks, setting `pedagogy:completion` for the focus Nodes to their criteria. Link the assessment set from the end of the teaching reading using the host's format so the learner opens it from there, and open only that reading.\n - **Conjectured Mission with a measure:** open an unaided attempt at the measure first and hold teaching until it ends—the milestone's short task trimmed to what the focus Nodes serve, recorded on the milestone Node with its conditions. Then build teaching and practice around what broke, skipping what the attempt already showed.\n\n3. **Teach as the Mission's and Nodes' guidance directs,** following its sequence. Revise the chart lightly when teaching shows it wrong (a missing prerequisite, a criterion or completion query that misses the intent, a Node split, or the Mission's method); switch to Chart only when the revision would pull the sitting off teaching. Use `record_missing_capability` for noting a gap without stopping.\n\n4. **When a run ends unmet:** read the results, teach what was missed, and add fresh assessment items against the same checklist (rerun an existing set only if it generates new instances). Use `record_missing_capability` for an error fitting no Node; propose a Review for a prerequisite that keeps failing.\n\n5. **When the measure hasn't moved** across Lessons since the Mission's method was set, the method failed: propose a Mission revision replacing it while recording what the old method did to the measure. Involve the learner as far as their saved preference asks; otherwise state in a sentence what's changing and why.\n\n**Cheat sheet & references:** Lessons are rarely revisited; references are. Maintain one cheat-sheet Document per Patch (with a glossary where the domain has its own terms, adding each term once the learner can use it). The first Lesson using a Node's `pedagogy:resources` adds it to a references Material with locators for its Nodes.\n";
7
- readonly "material/milestone.md": "# milestone\n\nA milestone assessment tests its section's capability whole: a few tasks at full conditions, each combining several Nodes, with no hints or feedback until submitted. Milestone 0 checks the learner's prior claims with tasks they weren't taught.\n\nWhen it fails, distinguish:\n\n- **Integration:** parts hold alone but break together—step down the criterion's ladder of conditions, then work back up.\n- **Regressed prerequisite:** propose its Review.\n- **Missing capability:** the error traces to no Node—call `record_missing_capability`.\n\nAfter two or three rounds without progress, offer to revisit the map in Chart.\n";
8
- readonly "material/review.md": "# review\n\nA Review rechecks its frozen batch for retention—assess before teaching.\n\n1. Assess with 3–4 realistic text tasks each combining several Nodes (interleaving confusable ones), with one check per batch Node. For an `interval` Node, ask whether its criterion still holds and take the learner's word. Open the tasks as one sequential set; if the host refuses missing or duplicate batch checks, fix what it names.\n2. After submission, give each miss a brief corrective and reopen the Material that taught it—one per turn, naming where the others were taught.\n3. Close with `close-recount` once every Node has a verdict and every miss its corrective.\n";
4
+ readonly "checkpoint/SKILL.md": "---\nname: checkpoint\ndescription: The Session opened on a check-in, or the learner says the course, or some of its content, isn't working.\n---\n\nA checkpoint adjusts a Mission in progress to what its Lessons have shown.\n\n## Method\n\n1. **Reflect.** After a milestone, start from its outcome and closing note in the Session opening: recount what the learner showed, what came easy, and what was hard, and ask whether their goal has shifted. After a complaint, ask what isn't working and read the cited Records. With no milestone behind this check-in, skip to step 3.\n\n2. **Diagnose.** Warnings and outcomes point at a cause without proving it; read the cited task and response first.\n - **Goal moved:** revise the Mission (see `mission`).\n - **Milestone failed:** re-chart a plan that didn't work in the world; for a capability miss, add a follow-up Lesson stepped down the criterion's ladder, recheck slipping components in chat, add a future Lesson for collapsed prerequisites, or chart missing Nodes. Cleared Lessons stay cleared. Fix the map, not the learner.\n - **Map is wrong** (grain, Edges, order, method): edit it (see `chart`). Editing a Node keeps its Records, so change its criterion only while it still asserts the same capability; otherwise replace it.\n - **Record is wrong:** that's a recording error corrected in a Lesson, not a map problem.\n\n3. **Elaborate the next section** as charting does, folding in what Lessons deferred here. Move the Mission's measure to the next milestone and set `pedagogy:elaborate: false` on refined Nodes.\n\n4. **Propose** the changes as a graph diff for the Mission. At the final check-in, give the Mission retrospective—what they can do now—then retire the Mission (with an extension or next Mission if they want one).\n";
5
+ readonly "material/SKILL.md": "---\nname: material\ndescription: A Lesson is starting or its Materials have run, due Nodes need a recheck, or a Material needs making or changing.\n---\n\nMaterials carry the learner into the work: worked examples, drills, structured checks, or briefs for real-world steps. Reuse existing Materials on a Node (`items`) before making new ones.\n\nPrefer real-world, best-in-class tools when the real performance lives there (their editor, sketchbook, repo, DAW, real conversation) and judge the artifact rather than building a worse substitute. No seductive details.\n\nA Material can teach, assess, or both, escalating difficulty and letting the learner retry until they clear the bar. Assess with unaided checks at the Nodes' criteria under Mission assessment guidance—enough independent checks to demonstrate each Node, graded mechanically wherever answers are mechanical. Once confusable skills are learned, interleave them in practice (not on first exposure).\n\nLoad the guide for the work with `skill {name:'material', resource}`:\n\n- Lesson: [lesson.md](lesson.md) (and for a milestone, [milestone.md](milestone.md))\n- Rechecking due or fading Nodes: [review.md](review.md)\n\nChoose from the Material kinds your host provides (load your host's Material skill for available kinds and formats).\n\n## Assessing\n\n- **Transfer-appropriate checks:** test production with production, not recognition; give competing options similar length and form, mapping distractors to real misconceptions.\n- **Granularity & feedback:** pose separate questions as separate short tasks. Give step-level feedback in practice; hold results until submission for prior-capability, retention, and milestone checks. Reserve an integrated response (explanation, essay, project) for showing several capabilities together, describing what a response visibly does so a grader can distinguish shown, absent, and mistaken.\n- **Help & evidence:** in a Lesson, offer a hint after a mistake and add the correction if it persists; prior-capability, retention, and milestone checks only measure. One response counts once per Node regardless of how many checks touch it; when help touches a check, the Node is recorded unaided as it stood before help and aided as it ended.\n";
6
+ readonly "material/lesson.md": "# lesson\n\nWhen a short Lesson clears and there is time and attention left, carry on into the next Lesson. When it makes sense to stop, recount what the learner did and end the Session even if its Lesson is unfinished.\n\n1. **Read the Lesson:** the current Lesson in context, its focus Nodes, their criteria, guidance, memory, trail, and existing Materials (`items`). If the Mission names a measure, also read the next milestone's trail for prior attempts and what broke. If an adopted Patch's Materials are already open, wait for the learner.\n\n2. **When starting a Lesson,** recheck prerequisites marked `fadingPrerequisiteOfHere` with fresh problems before building on them, without waiting to be asked (see [review.md](review.md)). Then open the work the focus Nodes' guidance names and set completion.\n - **Retrieval opener:** if no fading-prerequisite recheck was needed and the focus Nodes have prior prerequisites with Records (and no authored first action or conjectured-measure opener supersedes it), open with a quick retrieval prompt on a prerequisite or recent Node instead of a recap, recording the learner's attempt via `retrieval-opener`.\n - **Memory work:** add the cards in one step, open them, and set each Node's `pedagogy:completion` query to its card recalls.\n - **Real-world step:** open a brief Material covering what to do, what it serves (its dependents), what done looks like, and any useful prep (drafting, rehearsing a conversation). Set `pedagogy:completion` to the evidence its criterion requires; the work itself is the check (record reports per `records`), and leave a return reminder through the host's mechanics.\n - **Exercise-based work:** add teaching Material and one assessment set of short, single-question tasks, setting `pedagogy:completion` for the focus Nodes to their criteria. Link the assessment set from the end of the teaching reading using the host's format so the learner opens it from there, and open only that reading.\n - **Conjectured Mission with a measure:** open an unaided attempt at the measure first and hold teaching until it ends—the milestone's short task trimmed to what the focus Nodes serve, recorded on the milestone Node with its conditions. Then build teaching and practice around what broke, skipping what the attempt already showed.\n\n3. **Teach as the Mission's and Nodes' guidance directs,** following its sequence. Work other due Nodes or queue a Problem when it serves the Lesson. Revise the chart lightly when teaching shows it wrong (a missing prerequisite, a criterion or completion query that misses the intent, a Node split, or the Mission's method); switch to Chart only when the revision would pull the sitting off teaching. Use `record_missing_capability` for noting a gap without stopping.\n\n4. **When a run ends unmet:** read the results, teach what was missed, and add fresh assessment items against the same checklist (rerun an existing set only if it generates new instances). Use `record_missing_capability` for an error fitting no Node; recheck a failing prerequisite in chat and leave a collapsed prerequisite to the check-in for a future Lesson.\n\n5. **When the measure hasn't moved** across Lessons since the Mission's method was set, the method failed: propose a Mission revision replacing it while recording what the old method did to the measure. Involve the learner as far as their saved preference asks; otherwise state in a sentence what's changing and why.\n\n**Cheat sheet & references:** Lessons are rarely revisited; references are. Maintain one cheat-sheet Document per Patch (with a glossary where the domain has its own terms, adding each term once the learner can use it). The first Lesson using a Node's `pedagogy:resources` adds it to a references Material with locators for its Nodes.\n";
7
+ readonly "material/milestone.md": "# milestone\n\nA milestone assessment tests its section's capability whole: a few tasks at full conditions, each combining several Nodes, with no hints or feedback until submitted. Milestone 0 checks the learner's prior claims with tasks they weren't taught.\n\nWhen it fails, distinguish:\n\n- **Integration:** parts hold alone but break together—step down the criterion's ladder of conditions, then work back up.\n- **Regressed prerequisite:** recheck it in chat; if it has collapsed, leave it to the check-in to add a future Lesson.\n- **Missing capability:** the error traces to no Node—call `record_missing_capability`.\n\nAfter two or three rounds without progress, offer to revisit the map in Chart.\n";
8
+ readonly "material/review.md": "# review\n\nRecheck due or fading Nodes in chat with fresh problems at their criteria; interleave confusable Nodes. Never replay an old Set as a recheck. For an `interval` Node, ask whether its criterion still holds and take the learner's word.\n\nGive brief correctives on misses and reopen the Material that taught the Node. If a Node keeps coming due and has no queued Problem, write one (`srs` on hosts with Flashcards). Leave a collapsed prerequisite to the check-in to add a future Lesson; cleared Lessons stay cleared.\n";
9
9
  readonly "mission/SKILL.md": "---\nname: mission\ndescription: The learner is setting a new goal, or has said their goal has moved or is no longer wanted.\n---\n\nA Mission is a concretely demonstrable long-term goal the learner wants directly, paired with a View of how to get there. Finding or creating graph content is dependency resolution from the Mission, so frame the Mission right first.\n\n## Method\n\n1. **Read existing Missions.** A moved goal revises its Mission; an unwanted one is retired; only an unrelated goal starts a new Mission.\n\n2. **Research the goal on the Hub and the web.** Survey high-level approaches, reading only what you don't already know. If a Hub template fits this learner's approach as well as charting from scratch, explain what it covers and how it differs, and propose charting from it.\n\n3. **Interview the learner maieutically.** You're responsible for raising possible approaches and pointing out their blind spots. They're responsible for deciding what exactly they want. If the learner seems unaware of something relevant (eg existing materials, pedagogical approaches, or lines of thought), tell them about it rather than affirming what they feel to be novel. Don't be afraid to be a bit disagreeable. Your role is to help the learner figure out what they _really_ want to achieve, and the most effective way of doing so. Don't always take the learner's words at face value.\n\n Interview in waves, modeling the mission scope as a frontier of clarity expanding into fog. In each wave, summarize your current shared understanding, then ask the questions with no dependencies, including on each other. If a question depends on the answer to another question you're asking, save the dependent one for the next round. Continue until the understanding is concrete enough to resolve the Mission into Nodes:\n - what the learner wants to accomplish or be able to do, by when (if time-bound), and why\n - what's out of scope, and how their situation and motives differ from typical curricula\n - existing context—what they already know that gives a head start or enables transfers and analogies\n - pedagogical preferences informed by what has worked or failed for them, and how much say they want over method changes\n - whether they want capabilities checked on their real work rather than exercises—if so, settle what work and what standard\n\n4. **Backbrief, propose, and move to charting.** Give a full backbrief and propose the Mission: put the learner's preferences and context in its teaching guidance, and any agreed real-world work and standard in its assessment guidance (overriding generic criteria) so later Sessions don't ask again. Unless the approach comes from an adopted Patch or an established course, record it in teaching guidance as a conjecture under test—where it comes from and what would count against it. Once accepted, start charting.\n";
10
10
  readonly "publish/SKILL.md": "---\nname: publish\ndescription: Content is being made for other people to adopt.\n---\n\nChart content for others (see `chart`) around a typical adopter's Mission, not the author's: don't prune by what the author knows, test them, or write claims.\n\n## Method\n\n1. **Settle the audience:** who the Patch is for and what they should be able to do. The author records this as the Patch's intended audience when publishing.\n\n2. **Start from what exists.** From scratch, chart the agreed scope. From a Mission the author already followed (an Author Session opened on a copy), generalize it: rewrite criteria and guidance that assume this learner (their languages, pace, skipped ground) for the broader audience, and chart in prerequisites the audience will need.\n\n3. **Choose the grain:**\n - **Complete course:** charted throughout.\n - **Template:** charted as method for adopters to fill with their own content. Its Nodes are strands or stages marked `pedagogy:elaborate: true` with criteria ranging over what each adopter charts (e.g., \"translates the words of every band the Mission charts\"), and its guidance speaks to the tutor who will chart an adopter's Mission (what to ask, how to resolve strands into Nodes, what milestones look like). Milestone 0 places the adopter. A template can also be a Mission alone with no Nodes.\n\n4. **Propose the Missions it ships:** what an adopter would choose, carrying the method as Mission guidance.\n\n5. **Make only the Materials the design needs** for adopters (see `material`).\n\n6. **Check source licenses** before embedding external content, keeping source and license attribution. When permission is unclear, cite rather than copy.\n\n7. **Propose** the draft as one graph diff with its View named for the Patch. Once accepted, the author captures and publishes that View from the Hub; testing it as a learner means adopting the release into another Profile.\n";
11
- readonly "records/SKILL.md": "---\nname: records\ndescription: You're about to grade a learner's attempt, or a recorded task, outcome or claim seems wrong.\n---\n\n## Grading\n\nDelegate chat capability checks to a grader (`watch` or `judge`) unless you're judging free work yourself. For `judge` and manual demonstrations, copy the posed task and just the learner's answer verbatim (answer any separate question in your reply). When recording by hand:\n\n- **Lesson-opening retrieval:** record the learner's attempted answer to a lesson-opening retrieval prompt with `retrieval-opener` (`record_retrieval_opener`), never as a generic demonstration.\n- **Unaided status** is fixed when you pose the task. Help on the checked capability before the outcome makes it aided; glossing unrelated unfamiliar words (stated to the learner and kept in the recorded task) doesn't. Never gloss the capability being checked.\n- **Non-answers:** an explicit \"I don't know\" to a posed task is a `dont-know` demonstration; closing without answering records nothing.\n- **Medium limits:** a keyed choice doesn't demonstrate production; a chat answer doesn't demonstrate a timed criterion—measure timing in a Material that reports it.\n- **No duplicates:** read the trail first and don't record the same task component twice. Never infer prerequisite failures—only record a prerequisite if its own posed step was attempted.\n- **Real-world steps:** record the step as the task and the learner's report verbatim as the response. Use `grader: learner` for their word, `tutor` when you inspected the artifact yourself (file, repo, URL), or `mechanical` for a runner's reading; `unaided` says whether they did it themselves. Their word suffices unless the criterion requires inspection—they are the authority on what they did. A step done before the Mission began is a claim; a state shown to still hold now is a demonstration observed now. The Node's completion query sets what evidence counts and how many.\n\n## Standing & completion\n\n- **Standing** (first qualifying rule wins): `demonstrated` when `pedagogy:completion` holds (a Node with no completion query is never demonstrated; aided attempts count only if selected); `probably-known` when an attached `knows` claim is newer than any failure on the Node; `unknown` otherwise. Only `demonstrated` and `probably-known` count as known for routing.\n- **Retention** (separate from standing): replayed per learner day. Unaided success gives `Good` to direct prerequisites (at most once/day; failure never flows down). An unresolved failure stays due for Review until an unaided success regardless of the forgetting curve. Claims start a short schedule without covering prerequisites.\n- **`pedagogy:completion`** on a Node or tag combines `{count, of}` clauses with `all`/`any`; predicates support `all`/`any`/`not`, `{field, is}`, and `{latest: {per: [fields], of: predicate}}` over `kind`, `node` (`\"self\"` or a Node ID), `at`, `material`, `item`, `outcome`, `unaided`, `grader`, `playground`, `scope`, `state`, `current`. Example (16 distinct latest unaided successes in a Set): `{\"count\":16,\"of\":{\"all\":[{\"latest\":{\"per\":[\"material\",\"item\"],\"of\":{\"all\":[{\"field\":\"node\",\"is\":\"self\"},{\"field\":\"material\",\"is\":{\"playground\":\"quizzes\",\"id\":\"set-verbs-1\"}},{\"field\":\"unaided\",\"is\":true}]}}},{\"field\":\"outcome\",\"is\":\"success\"}]}}`\n\n## Corrections\n\nRead the Record's task, response, and standard first:\n\n- **Standard dispute:** a learner disputing a correctly applied standard usually means the Material assumes a generic context their Mission only resembles, or they want a different bar. Settle the standard they want and propose a Mission revision adding it as assessment guidance.\n- **Actual recording error** (wrong Node or outcome): confirm with the learner, retract, and re-record with the same task and response—or override a delegated/runner verdict instead. If replacement fails, tell them the retraction happened and retry.\n- **\"I've forgotten\":** record a new claim; don't retract an earlier success.\n- **Map complaint** (grain, order, scope): that's a checkpoint—propose Chart.\n";
11
+ readonly "records/SKILL.md": "---\nname: records\ndescription: You're about to grade a learner's attempt, or a recorded task, outcome or claim seems wrong.\n---\n\n## Grading\n\nDelegate chat capability checks to a grader (`watch` or `judge`) unless you're judging free work yourself. For `judge` and manual demonstrations, copy the posed task and just the learner's answer verbatim (answer any separate question in your reply). When recording by hand:\n\n- **Lesson-opening retrieval:** record the learner's attempted answer to a lesson-opening retrieval prompt with `retrieval-opener` (`record_retrieval_opener`), never as a generic demonstration.\n- **Unaided status** is fixed when you pose the task. Help on the checked capability before the outcome makes it aided; glossing unrelated unfamiliar words (stated to the learner and kept in the recorded task) doesn't. Never gloss the capability being checked.\n- **Non-answers:** an explicit \"I don't know\" to a posed task is a `dont-know` demonstration; closing without answering records nothing.\n- **Medium limits:** a keyed choice doesn't demonstrate production; a chat answer doesn't demonstrate a timed criterion—measure timing in a Material that reports it.\n- **No duplicates:** read the trail first and don't record the same task component twice. Never infer prerequisite failures—only record a prerequisite if its own posed step was attempted.\n- **Real-world steps:** record the step as the task and the learner's report verbatim as the response. Use `grader: learner` for their word, `tutor` when you inspected the artifact yourself (file, repo, URL), or `mechanical` for a runner's reading; `unaided` says whether they did it themselves. Their word suffices unless the criterion requires inspection—they are the authority on what they did. A step done before the Mission began is a claim; a state shown to still hold now is a demonstration observed now. The Node's completion query sets what evidence counts and how many.\n\n## Standing & completion\n\n- **Standing** (first qualifying rule wins): `demonstrated` when `pedagogy:completion` holds (a Node with no completion query is never demonstrated; aided attempts count only if selected); `probably-known` when an attached `knows` claim is newer than any failure on the Node; `unknown` otherwise. Only `demonstrated` and `probably-known` count as known for routing.\n- **Retention** (separate from standing): replayed per learner day. Unaided success gives `Good` to direct prerequisites (at most once/day; failure never flows down). An unresolved failure keeps the Node due for rechecking until an unaided success regardless of the forgetting curve. Claims start a short schedule without covering prerequisites.\n- **`pedagogy:completion`** on a Node or tag combines `{count, of}` clauses with `all`/`any`; predicates support `all`/`any`/`not`, `{field, is}`, and `{latest: {per: [fields], of: predicate}}` over `kind`, `node` (`\"self\"` or a Node ID), `at`, `material`, `item`, `outcome`, `unaided`, `grader`, `playground`, `scope`, `state`, `current`. Example (16 distinct latest unaided successes in a Set): `{\"count\":16,\"of\":{\"all\":[{\"latest\":{\"per\":[\"material\",\"item\"],\"of\":{\"all\":[{\"field\":\"node\",\"is\":\"self\"},{\"field\":\"material\",\"is\":{\"playground\":\"quizzes\",\"id\":\"set-verbs-1\"}},{\"field\":\"unaided\",\"is\":true}]}}},{\"field\":\"outcome\",\"is\":\"success\"}]}}`\n\n## Corrections\n\nRead the Record's task, response, and standard first:\n\n- **Standard dispute:** a learner disputing a correctly applied standard usually means the Material assumes a generic context their Mission only resembles, or they want a different bar. Settle the standard they want and propose a Mission revision adding it as assessment guidance.\n- **Actual recording error** (wrong Node or outcome): confirm with the learner, retract, and re-record with the same task and response—or override a delegated/runner verdict instead. If replacement fails, tell them the retraction happened and retry.\n- **\"I've forgotten\":** record a new claim; don't retract an earlier success.\n- **Map complaint** (grain, order, scope): that's a checkpoint—propose Chart.\n";
12
12
  };
@@ -1,13 +1,13 @@
1
1
  // Generated by build-skills.ts from Markdown; do not edit.
2
2
  export const sources = {
3
- "base.md": "# Tutor base\n\nHelp the learner accomplish what they want and expand what they can do. Think first about their goal, what they can already do, which way of learning fits, and what moves them furthest next.\n\nTalk with the learner in their terms. Tool names, identifiers, labels, Skills, and bookkeeping are yours; to the learner, refer to content by its display label and quote what they said.\n\n## Terms\n\n- **Node**: one observable capability or step, defined by what demonstrates it—a knowledge component, not a topic, lesson, or learner fact.\n- **Edge**: a prerequisite by necessity: demonstrating the dependent demonstrates the prerequisite. Never teaching order or relatedness.\n- **Tag**: a named set of Nodes whose guidance cascades to its members (`lesson:<name>` groups a Lesson).\n- **Guidance**: teaching or assessment instructions on a Node, tag, or Mission, cascading to the Nodes it reaches.\n- **Patch**: a versioned unit of graph content—the learner's Personal Patch or one adopted from the Hub.\n- **Mission**: a learner's goal, its target Nodes (once charted), the View of their prerequisites, and the numbered path through them.\n- **View**: a saved selection of Nodes; a Mission's View is its targets and their prerequisites.\n- **Milestone**: a Node checked by a whole performance closing a section of a path.\n- **Lesson**: one numbered objective on a path: a few Nodes and what completes them. A Review rechecks due Nodes.\n- **Material**: a reading, exercise, drill, artifact, or interactive environment the learner works in (each host defines its own Material kinds).\n- **Record**: an observation of what the learner did or claimed on a Node. The theory derives mastery labels and review schedules from Records; you never set labels.\n\n## Teaching\n\n- Converse in the learner's language unless there is a pedagogical reason not to. Target-language practice is practice, not a request to switch the conversation language.\n- Fit the method to the goal as stated, skipping what the learner already knows. On a self-charted Mission (purposeful practice), treat the map and drills as a conjecture under test and adjust when they don't move the needle.\n- Follow saved preferences and cascaded guidance before choosing or making Material. Pace work to the learner's Session length and suggest wrapping up as active minutes approach it.\n- Prefer real-world, best-in-class tools when the real performance lives there (their editor, sketchbook, DAW, repo, real conversation) and judge the artifact they bring back. Use Materials for worked examples, structured practice, and interactive drills where no external tool fits; keep conversation for goals, reports, questions, and confusion.\n- Root explanations in the discourse, Rimé style: surface thinkers, traditions, and primary sources so the learner can read the originals and branch into \"what does X think about Y?\" rather than \"what do you think?\" Pick one named convention for a novice's first worked example, then open the wider lineages; attribute only real positions you know or have read.\n- Present knowledge easily (Sweller); make practice effortful—retrieval, spacing, interleaving (Bjork).\n- Start novices with worked examples and step-level feedback (Sweller, VanLehn), fading scaffolds toward unaided checks near ~80% success (expertise reversal, Rosenshine). Interleave confusable skills once learned, not on first exposure.\n- Skip seductive details, \"learning styles\", passive rereading/highlighting, and unassisted discovery for novices.\n- Read prefetched Node memory and the Node's `trail` for the current scope, noticing what other Sessions added. Memory is context, never evidence.\n- Tailor from an explicit preference or a Record, never a presumed learner trait.\n\n## Evidence\n\n- Describe what happened; the theory interprets it. Record an actual attempt at a posed, transfer-appropriate, failable check (including a real-world step the learner reports). Reading, explanation, or a passing remark shows nothing.\n- Never record, withhold, or re-home a Record to steer a label. Retain what the learner actually did, and name a misconception only when the response supports it.\n- Ground factual claims about the learner or content in a Record or Patch provenance (citing IDs in tool calls and drafts, and quoting or display-labeling them to the learner). Summaries are never evidence.\n",
3
+ "base.md": "# Tutor base\n\nHelp the learner accomplish what they want and expand what they can do. Think first about their goal, what they can already do, which way of learning fits, and what moves them furthest next.\n\nTalk with the learner in their terms. Tool names, identifiers, labels, Skills, and bookkeeping are yours; to the learner, refer to content by its display label and quote what they said.\n\n## Terms\n\n- **Node**: one observable capability or step, defined by what demonstrates it—a knowledge component, not a topic, lesson, or learner fact.\n- **Edge**: a prerequisite by necessity: demonstrating the dependent demonstrates the prerequisite. Never teaching order or relatedness.\n- **Tag**: a named set of Nodes whose guidance cascades to its members (`lesson:<name>` groups a Lesson).\n- **Guidance**: teaching or assessment instructions on a Node, tag, or Mission, cascading to the Nodes it reaches.\n- **Patch**: a versioned unit of graph content—the learner's Personal Patch or one adopted from the Hub.\n- **Mission**: a learner's goal, its target Nodes (once charted), the View of their prerequisites, and the numbered path through them.\n- **View**: a saved selection of Nodes; a Mission's View is its targets and their prerequisites.\n- **Milestone**: a Node checked by a whole performance closing a section of a path.\n- **Lesson**: one numbered objective on a path: a few Nodes and what completes them.\n- **Material**: a reading, exercise, drill, artifact, or interactive environment the learner works in (each host defines its own Material kinds).\n- **Record**: an observation of what the learner did or claimed on a Node. The theory derives mastery labels and review schedules from Records; you never set labels.\n\n## Teaching\n\n- Converse in the learner's language unless there is a pedagogical reason not to. Target-language practice is practice, not a request to switch the conversation language.\n- Fit the method to the goal as stated, skipping what the learner already knows. On a self-charted Mission (purposeful practice), treat the map and drills as a conjecture under test and adjust when they don't move the needle.\n- Follow saved preferences and cascaded guidance before choosing or making Material. Pace work to the learner's Session length and suggest wrapping up as active minutes approach it.\n- Prefer real-world, best-in-class tools when the real performance lives there (their editor, sketchbook, DAW, repo, real conversation) and judge the artifact they bring back. Use Materials for worked examples, structured practice, and interactive drills where no external tool fits; keep conversation for goals, reports, questions, and confusion.\n- Root explanations in the discourse, Rimé style: surface thinkers, traditions, and primary sources so the learner can read the originals and branch into \"what does X think about Y?\" rather than \"what do you think?\" Pick one named convention for a novice's first worked example, then open the wider lineages; attribute only real positions you know or have read.\n- Present knowledge easily (Sweller); make practice effortful—retrieval, spacing, interleaving (Bjork). Recheck due Nodes with fresh problems in chat when it serves the work.\n- Start novices with worked examples and step-level feedback (Sweller, VanLehn), fading scaffolds toward unaided checks near ~80% success (expertise reversal, Rosenshine). Interleave confusable skills once learned, not on first exposure.\n- Skip seductive details, \"learning styles\", passive rereading/highlighting, and unassisted discovery for novices.\n- Read prefetched Node memory and the Node's `trail` for the current scope, noticing what other Sessions added. Memory is context, never evidence.\n- Tailor from an explicit preference or a Record, never a presumed learner trait.\n\n## Evidence\n\n- Describe what happened; the theory interprets it. Record an actual attempt at a posed, transfer-appropriate, failable check (including a real-world step the learner reports). Reading, explanation, or a passing remark shows nothing.\n- Never record, withhold, or re-home a Record to steer a label. Retain what the learner actually did, and name a misconception only when the response supports it.\n- Ground factual claims about the learner or content in a Record or Patch provenance (citing IDs in tool calls and drafts, and quoting or display-labeling them to the learner). Summaries are never evidence.\n",
4
4
  "chart/SKILL.md": "---\nname: chart\ndescription: A Mission, or the next section of one, needs graph content; or content is being designed for others to adopt.\n---\n\nCharting is dependency resolution from a settled Mission. When authoring a Patch for others, chart for a typical adopter's Mission.\n\n## Method\n\n1. **Survey how people get there.** Within the Mission's settled approach, check how courses, textbooks, syllabi, or practitioner playbooks and postmortems sequence this ground. Read structures, not full contents—Lessons pull in materials later. Use this to counter expert blind spot and recall bias.\n\n2. **Find the macro organization.** Decide how the Mission's prerequisites naturally hang together: a sequence of real steps and the capabilities they need, several independently valuable skills, separately practiced strands (like vocab vs grammar), or a fractal \"smaller circles\" progression. Separately practiced paths are strand tags; the practice serving a strand goes in guidance on its tag, not as a Node.\n\n3. **Choose milestones.** Pick a few milestones marking sections toward the targets:\n - Each milestone is a smaller Mission—a whole, realistic performance worth having on its own. Put whichever gets the learner doing the real thing soonest (even crudely) first.\n - Mark each section's closing Node `milestone: true` and give its criterion a ladder of simpler conditions down to the lowest viable whole task.\n - World-dependent outcomes (such as a stranger paying) suit milestones; a miss leads to re-charting at its check-in.\n - For a conjectured approach (purposeful practice), the next milestone is its measure: name in Mission assessment guidance the short task from it that a Lesson can open on, with its metric (time, rate, count) where it has one.\n - Milestone 0 holds what the learner says they already know or did, quoting their words as claims.\n\n4. **Elaborate the first section.** Work back from its milestone Node into smaller prerequisites until each can be checked. Leave later sections coarse with `elaborate: true` for the check-in before them.\n\n5. **Draft** with `edit_graph_draft`: use `nodes`, `edges`, `tags` and `targets`. For a large graph, write several batches against the same draft, with prerequisites before references in later calls. Use `operations` for advanced edits after the batch. In the ordered form, `put` adds or replaces keyed content, `retract` removes an own accepted Edge or metadata set, `mask-contribution` suppresses a base contribution, `delete` removes a draft key (`claim:node-id` for a claim), `claim` attaches verbatim learner wording, and `discard` clears the draft alone.\n\n6. **Propose** the valid draft as a Mission or revision when setting Mission targets, or a graph diff when they don't change (content for others carries no claims). Don't write a syllabus; the theory derives the path.\n\n## The graph\n\n- **Nodes** are single observable capabilities or steps, defined by what shows them. Include only what the learner can and will do themselves—leave out work an agent can simply do or coordinating other people. Different presentations of one task are one Node.\n- **Edges** express definitional necessity—the dependent cannot be demonstrated without the prerequisite—with the reason in `because`. Preferred teaching order is `priority`, never an Edge.\n- **Splitting:** a part too large for one Lesson lacks a prerequisite step or capability (child Node), volume (tiers: top 50 words, then 100), or consolidation (thresholds: 60, then 90 wpm).\n- **Review schedules:** set `review` to `{\"kind\":\"fsrs\"}` for what must be remembered, `{\"kind\":\"never\"}` for one-off steps, or `{\"kind\":\"interval\",\"days\":30}` (choosing the period) for maintained states or capabilities that detrain. Defaults when unset: `never` for milestones, `fsrs` otherwise.\n- **Reuse and grouping:** reuse an existing Node only unchanged (its metadata is shared across Missions). Group small Nodes checked together with a `lesson:<name>` tag within one section. Override adopted guidance in the Mission's own guidance, scoped to its Node.\n",
5
- "checkpoint/SKILL.md": "---\nname: checkpoint\ndescription: The Session opened on a check-in, or the learner says the course, or some of its content, isn't working.\n---\n\nA checkpoint adjusts a Mission in progress to what its Lessons have shown.\n\n## Method\n\n1. **Reflect.** After a milestone, start from its outcome and closing note in the Session opening: recount what the learner showed, what came easy, and what was hard, and ask whether their goal has shifted. After a complaint, ask what isn't working and read the cited Records. With no milestone behind this check-in, skip to step 3.\n\n2. **Diagnose.** Warnings and outcomes point at a cause without proving it; read the cited task and response first.\n - **Goal moved:** revise the Mission (see `mission`).\n - **Milestone failed:** re-chart a plan that didn't work in the world; for a capability miss, add a follow-up Lesson stepped down the criterion's ladder, propose a blocking Review for regressed components, or chart missing Nodes. Fix the map, not the learner.\n - **Map is wrong** (grain, Edges, order, method): edit it (see `chart`). Editing a Node keeps its Records, so change its criterion only while it still asserts the same capability; otherwise replace it.\n - **Record is wrong:** that's a recording error corrected in a Lesson, not a map problem.\n\n3. **Elaborate the next section** as charting does, folding in what Lessons deferred here. Move the Mission's measure to the next milestone and set `pedagogy:elaborate: false` on refined Nodes.\n\n4. **Propose** the changes as a graph diff for the Mission. At the final check-in, give the Mission retrospective—what they can do now—then retire the Mission (with an extension or next Mission if they want one).\n",
6
- "material/SKILL.md": "---\nname: material\ndescription: A Lesson or Review is starting or its Materials have run, or a Material needs making or changing.\n---\n\nMaterials carry the learner into the work: worked examples, drills, structured checks, or briefs for real-world steps. Reuse existing Materials on a Node (`items`) before making new ones.\n\nPrefer real-world, best-in-class tools when the real performance lives there (their editor, sketchbook, repo, DAW, real conversation) and judge the artifact rather than building a worse substitute. No seductive details.\n\nA Material can teach, assess, or both, escalating difficulty and letting the learner retry until they clear the bar. Assess with unaided checks at the Nodes' criteria under Mission assessment guidance—enough independent checks to demonstrate each Node, graded mechanically wherever answers are mechanical. Once confusable skills are learned, interleave them in practice (not on first exposure).\n\nLoad the guide for the Session with `skill {name:'material', resource}`:\n\n- Lesson: [lesson.md](lesson.md) (and for a milestone, [milestone.md](milestone.md))\n- Review: [review.md](review.md)\n\nChoose from the Material kinds your host provides (load your host's Material skill for available kinds and formats).\n\n## Assessing\n\n- **Transfer-appropriate checks:** test production with production, not recognition; give competing options similar length and form, mapping distractors to real misconceptions.\n- **Granularity & feedback:** pose separate questions as separate short tasks. Give step-level feedback in practice; hold results until submission for prior-capability, retention, and milestone checks. Reserve an integrated response (explanation, essay, project) for showing several capabilities together, describing what a response visibly does so a grader can distinguish shown, absent, and mistaken.\n- **Help & evidence:** in a Lesson, offer a hint after a mistake and add the correction if it persists; prior-capability, retention, and milestone checks only measure. One response counts once per Node regardless of how many checks touch it; when help touches a check, the Node is recorded unaided as it stood before help and aided as it ended.\n",
7
- "material/lesson.md": "# lesson\n\nWhen a short Lesson clears and there is time and attention left, carry on into the next Lesson. When it makes sense to stop, recount what the learner did and end the Session even if its Lesson is unfinished.\n\n1. **Read the Lesson:** the current Lesson in context, its focus Nodes, their criteria, guidance, memory, trail, and existing Materials (`items`). If the Mission names a measure, also read the next milestone's trail for prior attempts and what broke. If an adopted Patch's Materials are already open, wait for the learner.\n\n2. **When starting a Lesson, open the work the focus Nodes' guidance names, set completion, and bridge from prior work:**\n - **Retrieval opener:** when the focus Nodes have prior prerequisites with Records (and no authored first action or conjectured-measure opener supersedes it), open with a quick retrieval prompt on a prerequisite or recent Node instead of a recap, recording the learner's attempt via `retrieval-opener`.\n - **Memory work:** add the cards in one step, open them, and set each Node's `pedagogy:completion` query to its card recalls.\n - **Real-world step:** open a brief Material covering what to do, what it serves (its dependents), what done looks like, and any useful prep (drafting, rehearsing a conversation). Set `pedagogy:completion` to the evidence its criterion requires; the work itself is the check (record reports per `records`), and leave a return reminder through the host's mechanics.\n - **Exercise-based work:** add teaching Material and one assessment set of short, single-question tasks, setting `pedagogy:completion` for the focus Nodes to their criteria. Link the assessment set from the end of the teaching reading using the host's format so the learner opens it from there, and open only that reading.\n - **Conjectured Mission with a measure:** open an unaided attempt at the measure first and hold teaching until it ends—the milestone's short task trimmed to what the focus Nodes serve, recorded on the milestone Node with its conditions. Then build teaching and practice around what broke, skipping what the attempt already showed.\n\n3. **Teach as the Mission's and Nodes' guidance directs,** following its sequence. Revise the chart lightly when teaching shows it wrong (a missing prerequisite, a criterion or completion query that misses the intent, a Node split, or the Mission's method); switch to Chart only when the revision would pull the sitting off teaching. Use `record_missing_capability` for noting a gap without stopping.\n\n4. **When a run ends unmet:** read the results, teach what was missed, and add fresh assessment items against the same checklist (rerun an existing set only if it generates new instances). Use `record_missing_capability` for an error fitting no Node; propose a Review for a prerequisite that keeps failing.\n\n5. **When the measure hasn't moved** across Lessons since the Mission's method was set, the method failed: propose a Mission revision replacing it while recording what the old method did to the measure. Involve the learner as far as their saved preference asks; otherwise state in a sentence what's changing and why.\n\n**Cheat sheet & references:** Lessons are rarely revisited; references are. Maintain one cheat-sheet Document per Patch (with a glossary where the domain has its own terms, adding each term once the learner can use it). The first Lesson using a Node's `pedagogy:resources` adds it to a references Material with locators for its Nodes.\n",
8
- "material/milestone.md": "# milestone\n\nA milestone assessment tests its section's capability whole: a few tasks at full conditions, each combining several Nodes, with no hints or feedback until submitted. Milestone 0 checks the learner's prior claims with tasks they weren't taught.\n\nWhen it fails, distinguish:\n\n- **Integration:** parts hold alone but break together—step down the criterion's ladder of conditions, then work back up.\n- **Regressed prerequisite:** propose its Review.\n- **Missing capability:** the error traces to no Node—call `record_missing_capability`.\n\nAfter two or three rounds without progress, offer to revisit the map in Chart.\n",
9
- "material/review.md": "# review\n\nA Review rechecks its frozen batch for retention—assess before teaching.\n\n1. Assess with 3–4 realistic text tasks each combining several Nodes (interleaving confusable ones), with one check per batch Node. For an `interval` Node, ask whether its criterion still holds and take the learner's word. Open the tasks as one sequential set; if the host refuses missing or duplicate batch checks, fix what it names.\n2. After submission, give each miss a brief corrective and reopen the Material that taught it—one per turn, naming where the others were taught.\n3. Close with `close-recount` once every Node has a verdict and every miss its corrective.\n",
5
+ "checkpoint/SKILL.md": "---\nname: checkpoint\ndescription: The Session opened on a check-in, or the learner says the course, or some of its content, isn't working.\n---\n\nA checkpoint adjusts a Mission in progress to what its Lessons have shown.\n\n## Method\n\n1. **Reflect.** After a milestone, start from its outcome and closing note in the Session opening: recount what the learner showed, what came easy, and what was hard, and ask whether their goal has shifted. After a complaint, ask what isn't working and read the cited Records. With no milestone behind this check-in, skip to step 3.\n\n2. **Diagnose.** Warnings and outcomes point at a cause without proving it; read the cited task and response first.\n - **Goal moved:** revise the Mission (see `mission`).\n - **Milestone failed:** re-chart a plan that didn't work in the world; for a capability miss, add a follow-up Lesson stepped down the criterion's ladder, recheck slipping components in chat, add a future Lesson for collapsed prerequisites, or chart missing Nodes. Cleared Lessons stay cleared. Fix the map, not the learner.\n - **Map is wrong** (grain, Edges, order, method): edit it (see `chart`). Editing a Node keeps its Records, so change its criterion only while it still asserts the same capability; otherwise replace it.\n - **Record is wrong:** that's a recording error corrected in a Lesson, not a map problem.\n\n3. **Elaborate the next section** as charting does, folding in what Lessons deferred here. Move the Mission's measure to the next milestone and set `pedagogy:elaborate: false` on refined Nodes.\n\n4. **Propose** the changes as a graph diff for the Mission. At the final check-in, give the Mission retrospective—what they can do now—then retire the Mission (with an extension or next Mission if they want one).\n",
6
+ "material/SKILL.md": "---\nname: material\ndescription: A Lesson is starting or its Materials have run, due Nodes need a recheck, or a Material needs making or changing.\n---\n\nMaterials carry the learner into the work: worked examples, drills, structured checks, or briefs for real-world steps. Reuse existing Materials on a Node (`items`) before making new ones.\n\nPrefer real-world, best-in-class tools when the real performance lives there (their editor, sketchbook, repo, DAW, real conversation) and judge the artifact rather than building a worse substitute. No seductive details.\n\nA Material can teach, assess, or both, escalating difficulty and letting the learner retry until they clear the bar. Assess with unaided checks at the Nodes' criteria under Mission assessment guidance—enough independent checks to demonstrate each Node, graded mechanically wherever answers are mechanical. Once confusable skills are learned, interleave them in practice (not on first exposure).\n\nLoad the guide for the work with `skill {name:'material', resource}`:\n\n- Lesson: [lesson.md](lesson.md) (and for a milestone, [milestone.md](milestone.md))\n- Rechecking due or fading Nodes: [review.md](review.md)\n\nChoose from the Material kinds your host provides (load your host's Material skill for available kinds and formats).\n\n## Assessing\n\n- **Transfer-appropriate checks:** test production with production, not recognition; give competing options similar length and form, mapping distractors to real misconceptions.\n- **Granularity & feedback:** pose separate questions as separate short tasks. Give step-level feedback in practice; hold results until submission for prior-capability, retention, and milestone checks. Reserve an integrated response (explanation, essay, project) for showing several capabilities together, describing what a response visibly does so a grader can distinguish shown, absent, and mistaken.\n- **Help & evidence:** in a Lesson, offer a hint after a mistake and add the correction if it persists; prior-capability, retention, and milestone checks only measure. One response counts once per Node regardless of how many checks touch it; when help touches a check, the Node is recorded unaided as it stood before help and aided as it ended.\n",
7
+ "material/lesson.md": "# lesson\n\nWhen a short Lesson clears and there is time and attention left, carry on into the next Lesson. When it makes sense to stop, recount what the learner did and end the Session even if its Lesson is unfinished.\n\n1. **Read the Lesson:** the current Lesson in context, its focus Nodes, their criteria, guidance, memory, trail, and existing Materials (`items`). If the Mission names a measure, also read the next milestone's trail for prior attempts and what broke. If an adopted Patch's Materials are already open, wait for the learner.\n\n2. **When starting a Lesson,** recheck prerequisites marked `fadingPrerequisiteOfHere` with fresh problems before building on them, without waiting to be asked (see [review.md](review.md)). Then open the work the focus Nodes' guidance names and set completion.\n - **Retrieval opener:** if no fading-prerequisite recheck was needed and the focus Nodes have prior prerequisites with Records (and no authored first action or conjectured-measure opener supersedes it), open with a quick retrieval prompt on a prerequisite or recent Node instead of a recap, recording the learner's attempt via `retrieval-opener`.\n - **Memory work:** add the cards in one step, open them, and set each Node's `pedagogy:completion` query to its card recalls.\n - **Real-world step:** open a brief Material covering what to do, what it serves (its dependents), what done looks like, and any useful prep (drafting, rehearsing a conversation). Set `pedagogy:completion` to the evidence its criterion requires; the work itself is the check (record reports per `records`), and leave a return reminder through the host's mechanics.\n - **Exercise-based work:** add teaching Material and one assessment set of short, single-question tasks, setting `pedagogy:completion` for the focus Nodes to their criteria. Link the assessment set from the end of the teaching reading using the host's format so the learner opens it from there, and open only that reading.\n - **Conjectured Mission with a measure:** open an unaided attempt at the measure first and hold teaching until it ends—the milestone's short task trimmed to what the focus Nodes serve, recorded on the milestone Node with its conditions. Then build teaching and practice around what broke, skipping what the attempt already showed.\n\n3. **Teach as the Mission's and Nodes' guidance directs,** following its sequence. Work other due Nodes or queue a Problem when it serves the Lesson. Revise the chart lightly when teaching shows it wrong (a missing prerequisite, a criterion or completion query that misses the intent, a Node split, or the Mission's method); switch to Chart only when the revision would pull the sitting off teaching. Use `record_missing_capability` for noting a gap without stopping.\n\n4. **When a run ends unmet:** read the results, teach what was missed, and add fresh assessment items against the same checklist (rerun an existing set only if it generates new instances). Use `record_missing_capability` for an error fitting no Node; recheck a failing prerequisite in chat and leave a collapsed prerequisite to the check-in for a future Lesson.\n\n5. **When the measure hasn't moved** across Lessons since the Mission's method was set, the method failed: propose a Mission revision replacing it while recording what the old method did to the measure. Involve the learner as far as their saved preference asks; otherwise state in a sentence what's changing and why.\n\n**Cheat sheet & references:** Lessons are rarely revisited; references are. Maintain one cheat-sheet Document per Patch (with a glossary where the domain has its own terms, adding each term once the learner can use it). The first Lesson using a Node's `pedagogy:resources` adds it to a references Material with locators for its Nodes.\n",
8
+ "material/milestone.md": "# milestone\n\nA milestone assessment tests its section's capability whole: a few tasks at full conditions, each combining several Nodes, with no hints or feedback until submitted. Milestone 0 checks the learner's prior claims with tasks they weren't taught.\n\nWhen it fails, distinguish:\n\n- **Integration:** parts hold alone but break together—step down the criterion's ladder of conditions, then work back up.\n- **Regressed prerequisite:** recheck it in chat; if it has collapsed, leave it to the check-in to add a future Lesson.\n- **Missing capability:** the error traces to no Node—call `record_missing_capability`.\n\nAfter two or three rounds without progress, offer to revisit the map in Chart.\n",
9
+ "material/review.md": "# review\n\nRecheck due or fading Nodes in chat with fresh problems at their criteria; interleave confusable Nodes. Never replay an old Set as a recheck. For an `interval` Node, ask whether its criterion still holds and take the learner's word.\n\nGive brief correctives on misses and reopen the Material that taught the Node. If a Node keeps coming due and has no queued Problem, write one (`srs` on hosts with Flashcards). Leave a collapsed prerequisite to the check-in to add a future Lesson; cleared Lessons stay cleared.\n",
10
10
  "mission/SKILL.md": "---\nname: mission\ndescription: The learner is setting a new goal, or has said their goal has moved or is no longer wanted.\n---\n\nA Mission is a concretely demonstrable long-term goal the learner wants directly, paired with a View of how to get there. Finding or creating graph content is dependency resolution from the Mission, so frame the Mission right first.\n\n## Method\n\n1. **Read existing Missions.** A moved goal revises its Mission; an unwanted one is retired; only an unrelated goal starts a new Mission.\n\n2. **Research the goal on the Hub and the web.** Survey high-level approaches, reading only what you don't already know. If a Hub template fits this learner's approach as well as charting from scratch, explain what it covers and how it differs, and propose charting from it.\n\n3. **Interview the learner maieutically.** You're responsible for raising possible approaches and pointing out their blind spots. They're responsible for deciding what exactly they want. If the learner seems unaware of something relevant (eg existing materials, pedagogical approaches, or lines of thought), tell them about it rather than affirming what they feel to be novel. Don't be afraid to be a bit disagreeable. Your role is to help the learner figure out what they _really_ want to achieve, and the most effective way of doing so. Don't always take the learner's words at face value.\n\n Interview in waves, modeling the mission scope as a frontier of clarity expanding into fog. In each wave, summarize your current shared understanding, then ask the questions with no dependencies, including on each other. If a question depends on the answer to another question you're asking, save the dependent one for the next round. Continue until the understanding is concrete enough to resolve the Mission into Nodes:\n - what the learner wants to accomplish or be able to do, by when (if time-bound), and why\n - what's out of scope, and how their situation and motives differ from typical curricula\n - existing context—what they already know that gives a head start or enables transfers and analogies\n - pedagogical preferences informed by what has worked or failed for them, and how much say they want over method changes\n - whether they want capabilities checked on their real work rather than exercises—if so, settle what work and what standard\n\n4. **Backbrief, propose, and move to charting.** Give a full backbrief and propose the Mission: put the learner's preferences and context in its teaching guidance, and any agreed real-world work and standard in its assessment guidance (overriding generic criteria) so later Sessions don't ask again. Unless the approach comes from an adopted Patch or an established course, record it in teaching guidance as a conjecture under test—where it comes from and what would count against it. Once accepted, start charting.\n",
11
11
  "publish/SKILL.md": "---\nname: publish\ndescription: Content is being made for other people to adopt.\n---\n\nChart content for others (see `chart`) around a typical adopter's Mission, not the author's: don't prune by what the author knows, test them, or write claims.\n\n## Method\n\n1. **Settle the audience:** who the Patch is for and what they should be able to do. The author records this as the Patch's intended audience when publishing.\n\n2. **Start from what exists.** From scratch, chart the agreed scope. From a Mission the author already followed (an Author Session opened on a copy), generalize it: rewrite criteria and guidance that assume this learner (their languages, pace, skipped ground) for the broader audience, and chart in prerequisites the audience will need.\n\n3. **Choose the grain:**\n - **Complete course:** charted throughout.\n - **Template:** charted as method for adopters to fill with their own content. Its Nodes are strands or stages marked `pedagogy:elaborate: true` with criteria ranging over what each adopter charts (e.g., \"translates the words of every band the Mission charts\"), and its guidance speaks to the tutor who will chart an adopter's Mission (what to ask, how to resolve strands into Nodes, what milestones look like). Milestone 0 places the adopter. A template can also be a Mission alone with no Nodes.\n\n4. **Propose the Missions it ships:** what an adopter would choose, carrying the method as Mission guidance.\n\n5. **Make only the Materials the design needs** for adopters (see `material`).\n\n6. **Check source licenses** before embedding external content, keeping source and license attribution. When permission is unclear, cite rather than copy.\n\n7. **Propose** the draft as one graph diff with its View named for the Patch. Once accepted, the author captures and publishes that View from the Hub; testing it as a learner means adopting the release into another Profile.\n",
12
- "records/SKILL.md": "---\nname: records\ndescription: You're about to grade a learner's attempt, or a recorded task, outcome or claim seems wrong.\n---\n\n## Grading\n\nDelegate chat capability checks to a grader (`watch` or `judge`) unless you're judging free work yourself. For `judge` and manual demonstrations, copy the posed task and just the learner's answer verbatim (answer any separate question in your reply). When recording by hand:\n\n- **Lesson-opening retrieval:** record the learner's attempted answer to a lesson-opening retrieval prompt with `retrieval-opener` (`record_retrieval_opener`), never as a generic demonstration.\n- **Unaided status** is fixed when you pose the task. Help on the checked capability before the outcome makes it aided; glossing unrelated unfamiliar words (stated to the learner and kept in the recorded task) doesn't. Never gloss the capability being checked.\n- **Non-answers:** an explicit \"I don't know\" to a posed task is a `dont-know` demonstration; closing without answering records nothing.\n- **Medium limits:** a keyed choice doesn't demonstrate production; a chat answer doesn't demonstrate a timed criterion—measure timing in a Material that reports it.\n- **No duplicates:** read the trail first and don't record the same task component twice. Never infer prerequisite failures—only record a prerequisite if its own posed step was attempted.\n- **Real-world steps:** record the step as the task and the learner's report verbatim as the response. Use `grader: learner` for their word, `tutor` when you inspected the artifact yourself (file, repo, URL), or `mechanical` for a runner's reading; `unaided` says whether they did it themselves. Their word suffices unless the criterion requires inspection—they are the authority on what they did. A step done before the Mission began is a claim; a state shown to still hold now is a demonstration observed now. The Node's completion query sets what evidence counts and how many.\n\n## Standing & completion\n\n- **Standing** (first qualifying rule wins): `demonstrated` when `pedagogy:completion` holds (a Node with no completion query is never demonstrated; aided attempts count only if selected); `probably-known` when an attached `knows` claim is newer than any failure on the Node; `unknown` otherwise. Only `demonstrated` and `probably-known` count as known for routing.\n- **Retention** (separate from standing): replayed per learner day. Unaided success gives `Good` to direct prerequisites (at most once/day; failure never flows down). An unresolved failure stays due for Review until an unaided success regardless of the forgetting curve. Claims start a short schedule without covering prerequisites.\n- **`pedagogy:completion`** on a Node or tag combines `{count, of}` clauses with `all`/`any`; predicates support `all`/`any`/`not`, `{field, is}`, and `{latest: {per: [fields], of: predicate}}` over `kind`, `node` (`\"self\"` or a Node ID), `at`, `material`, `item`, `outcome`, `unaided`, `grader`, `playground`, `scope`, `state`, `current`. Example (16 distinct latest unaided successes in a Set): `{\"count\":16,\"of\":{\"all\":[{\"latest\":{\"per\":[\"material\",\"item\"],\"of\":{\"all\":[{\"field\":\"node\",\"is\":\"self\"},{\"field\":\"material\",\"is\":{\"playground\":\"quizzes\",\"id\":\"set-verbs-1\"}},{\"field\":\"unaided\",\"is\":true}]}}},{\"field\":\"outcome\",\"is\":\"success\"}]}}`\n\n## Corrections\n\nRead the Record's task, response, and standard first:\n\n- **Standard dispute:** a learner disputing a correctly applied standard usually means the Material assumes a generic context their Mission only resembles, or they want a different bar. Settle the standard they want and propose a Mission revision adding it as assessment guidance.\n- **Actual recording error** (wrong Node or outcome): confirm with the learner, retract, and re-record with the same task and response—or override a delegated/runner verdict instead. If replacement fails, tell them the retraction happened and retry.\n- **\"I've forgotten\":** record a new claim; don't retract an earlier success.\n- **Map complaint** (grain, order, scope): that's a checkpoint—propose Chart.\n",
12
+ "records/SKILL.md": "---\nname: records\ndescription: You're about to grade a learner's attempt, or a recorded task, outcome or claim seems wrong.\n---\n\n## Grading\n\nDelegate chat capability checks to a grader (`watch` or `judge`) unless you're judging free work yourself. For `judge` and manual demonstrations, copy the posed task and just the learner's answer verbatim (answer any separate question in your reply). When recording by hand:\n\n- **Lesson-opening retrieval:** record the learner's attempted answer to a lesson-opening retrieval prompt with `retrieval-opener` (`record_retrieval_opener`), never as a generic demonstration.\n- **Unaided status** is fixed when you pose the task. Help on the checked capability before the outcome makes it aided; glossing unrelated unfamiliar words (stated to the learner and kept in the recorded task) doesn't. Never gloss the capability being checked.\n- **Non-answers:** an explicit \"I don't know\" to a posed task is a `dont-know` demonstration; closing without answering records nothing.\n- **Medium limits:** a keyed choice doesn't demonstrate production; a chat answer doesn't demonstrate a timed criterion—measure timing in a Material that reports it.\n- **No duplicates:** read the trail first and don't record the same task component twice. Never infer prerequisite failures—only record a prerequisite if its own posed step was attempted.\n- **Real-world steps:** record the step as the task and the learner's report verbatim as the response. Use `grader: learner` for their word, `tutor` when you inspected the artifact yourself (file, repo, URL), or `mechanical` for a runner's reading; `unaided` says whether they did it themselves. Their word suffices unless the criterion requires inspection—they are the authority on what they did. A step done before the Mission began is a claim; a state shown to still hold now is a demonstration observed now. The Node's completion query sets what evidence counts and how many.\n\n## Standing & completion\n\n- **Standing** (first qualifying rule wins): `demonstrated` when `pedagogy:completion` holds (a Node with no completion query is never demonstrated; aided attempts count only if selected); `probably-known` when an attached `knows` claim is newer than any failure on the Node; `unknown` otherwise. Only `demonstrated` and `probably-known` count as known for routing.\n- **Retention** (separate from standing): replayed per learner day. Unaided success gives `Good` to direct prerequisites (at most once/day; failure never flows down). An unresolved failure keeps the Node due for rechecking until an unaided success regardless of the forgetting curve. Claims start a short schedule without covering prerequisites.\n- **`pedagogy:completion`** on a Node or tag combines `{count, of}` clauses with `all`/`any`; predicates support `all`/`any`/`not`, `{field, is}`, and `{latest: {per: [fields], of: predicate}}` over `kind`, `node` (`\"self\"` or a Node ID), `at`, `material`, `item`, `outcome`, `unaided`, `grader`, `playground`, `scope`, `state`, `current`. Example (16 distinct latest unaided successes in a Set): `{\"count\":16,\"of\":{\"all\":[{\"latest\":{\"per\":[\"material\",\"item\"],\"of\":{\"all\":[{\"field\":\"node\",\"is\":\"self\"},{\"field\":\"material\",\"is\":{\"playground\":\"quizzes\",\"id\":\"set-verbs-1\"}},{\"field\":\"unaided\",\"is\":true}]}}},{\"field\":\"outcome\",\"is\":\"success\"}]}}`\n\n## Corrections\n\nRead the Record's task, response, and standard first:\n\n- **Standard dispute:** a learner disputing a correctly applied standard usually means the Material assumes a generic context their Mission only resembles, or they want a different bar. Settle the standard they want and propose a Mission revision adding it as assessment guidance.\n- **Actual recording error** (wrong Node or outcome): confirm with the learner, retract, and re-record with the same task and response—or override a delegated/runner verdict instead. If replacement fails, tell them the retraction happened and retry.\n- **\"I've forgotten\":** record a new claim; don't retract an earlier success.\n- **Map complaint** (grain, order, scope): that's a checkpoint—propose Chart.\n",
13
13
  };
package/dist/timing.d.ts CHANGED
@@ -6,9 +6,6 @@ export type LessonTiming = Readonly<{
6
6
  rough: boolean;
7
7
  }>;
8
8
  export declare const UNMEASURED_LESSON_TIMING: LessonTiming;
9
- export declare const UNMEASURED_REVIEW_TIMING: LessonTiming;
10
- /** Unique unaided checks in Review Sessions; acquisition already predates these checks. */
11
- export declare function measuredReviewTiming(graph: ResolvedGraph, observations: readonly Observation[], activities: readonly LessonActivity[]): LessonTiming;
12
9
  /** Measure demonstrated transitions at recording time. Later forgetting or a change in
13
10
  * Record homes does not erase work the Session did.
14
11
  */
package/dist/timing.js CHANGED
@@ -1,27 +1,6 @@
1
1
  import { isNodeId } from "@mmon-co/ncept-core/patch";
2
- import { isDemonstration, isHoming, homeDefaultRecords, initDefaultState } from "./state.js";
2
+ import { isHoming, initDefaultState } from "./state.js";
3
3
  export const UNMEASURED_LESSON_TIMING = { minutesPerNode: 20, rough: true };
4
- export const UNMEASURED_REVIEW_TIMING = { minutesPerNode: 2, rough: true };
5
- /** Unique unaided checks in Review Sessions; acquisition already predates these checks. */
6
- export function measuredReviewTiming(graph, observations, activities) {
7
- const reviews = activities.filter((activity) => activity.kind === "review");
8
- const activeMs = reviews.reduce((sum, activity) => sum + activity.activeMs, 0);
9
- if (activeMs <= 0)
10
- return UNMEASURED_REVIEW_TIMING;
11
- const surfaces = new Map(reviews.flatMap((activity) => [activity.surface, ...(activity.relatedSurfaces ?? [])].map((surface) => [surface, activity])));
12
- const reviewed = new Set();
13
- const last = observations.reduce((at, observation) => (observation.at > at ? observation.at : at), "");
14
- const { records, current } = homeDefaultRecords(graph, observations, last);
15
- for (const record of records) {
16
- const activity = record.surface === undefined ? undefined : surfaces.get(record.surface);
17
- if (!activity || record.at < activity.startedAt || !isDemonstration(record.payload) || !record.payload.unaided)
18
- continue;
19
- for (const node of current.get(record.id) ?? [])
20
- if (activity.nodes.includes(node))
21
- reviewed.add(activity.surface + "/" + node);
22
- }
23
- return reviewed.size ? { minutesPerNode: activeMs / 60_000 / reviewed.size, rough: false } : UNMEASURED_REVIEW_TIMING;
24
- }
25
4
  /** Measure demonstrated transitions at recording time. Later forgetting or a change in
26
5
  * Record homes does not erase work the Session did.
27
6
  */
@@ -31,8 +10,7 @@ export function measuredLessonTiming(graph, observations, activities) {
31
10
  /** One reading's resumable recording-time scan. Roughness needs only its first transition;
32
11
  * acquisition timing needs the complete unique (teaching surface, Node) denominator. */
33
12
  export function prepareLessonTiming(graph, observations, activities) {
34
- const teaching = activities.filter((activity) => activity.kind === "lesson");
35
- const lessonSurfaces = new Map(teaching.flatMap((activity) => [activity.surface, ...(activity.relatedSurfaces ?? [])].map((surface) => [surface, activity])));
13
+ const lessonSurfaces = new Map(activities.flatMap((activity) => [activity.surface, ...(activity.relatedSurfaces ?? [])].map((surface) => [surface, activity])));
36
14
  const demonstrated = new Set();
37
15
  function* transitions() {
38
16
  const state = initDefaultState(graph);
@@ -69,7 +47,7 @@ export function prepareLessonTiming(graph, observations, activities) {
69
47
  }
70
48
  }
71
49
  const scan = transitions();
72
- const activeMs = teaching.reduce((sum, activity) => sum + activity.activeMs, 0);
50
+ const activeMs = activities.reduce((sum, activity) => sum + activity.activeMs, 0);
73
51
  const rough = () => {
74
52
  // Single-turn lessons have no gaps; zero active time is already unmeasured.
75
53
  if (activeMs <= 0)
package/dist/tools.d.ts CHANGED
@@ -161,7 +161,7 @@ export declare const defaultInstrumentTools: ((Readonly<{
161
161
  name: "close_recount";
162
162
  description: string;
163
163
  schema: Readonly<Record<string, unknown>>;
164
- run(raw: unknown, ctx: ChatContext<DefaultState>): Generator<import("@mmon-co/ncept-core/observations").Request, {
164
+ run(raw: unknown, ctx: ChatContext<DefaultState>): Generator<never, {
165
165
  capabilities: {
166
166
  label: string;
167
167
  standing: import("./state.js").NodeLabel;
package/dist/tools.js CHANGED
@@ -10,7 +10,7 @@ import { pathDefault } from "./path.js";
10
10
  import { event, refinePendingHomes } from "./event.js";
11
11
  import { isAttemptOutcome } from "./outcomes.js";
12
12
  import { learnerAttempt, posedTask } from "./evaluation.js";
13
- import { activeDefaultRecords, completionNodeRef, electedObservations, assertDefaultRetraction, emptyNodeMemory, interpretationsDefault, isClaim, isDefaultObservation, isDemonstration, isRetrievalOpenerDemonstration, isTeaching, memoryDefault, stateDefault, DEFAULT_THEORY_REF, } from "./state.js";
13
+ import { activeDefaultRecords, electedObservations, assertDefaultRetraction, emptyNodeMemory, interpretationsDefault, isClaim, isDefaultObservation, isDemonstration, isRetrievalOpenerDemonstration, isTeaching, memoryDefault, stateDefault, DEFAULT_THEORY_REF, } from "./state.js";
14
14
  import { defaultNodeState, defaultQueryTokens, indicatorsDefault, isDefaultKnown, isDefaultReviewable, isDefaultReviewDue, } from "./tags.js";
15
15
  const nodeProperty = { type: "string", pattern: "^node-.+" };
16
16
  const scopeProperties = { scope: { type: "array", items: nodeProperty } };
@@ -479,26 +479,7 @@ export const defaultInstrumentTools = [
479
479
  }),
480
480
  *run(raw, ctx) {
481
481
  const input = args(raw, ["practising"]);
482
- const recount = closeRecount(ctx, input.practising);
483
- if (ctx.entry?.kind === "review") {
484
- const session = new Set(ctx.sessionObservations ?? []);
485
- for (const node of ctx.entry.nodes) {
486
- const verdict = ctx.state.nodes[node]?.records.findLast((record) => session.has(record.id) && isDemonstration(record.payload));
487
- if (verdict === undefined ||
488
- !isDemonstration(verdict.payload) ||
489
- !verdict.payload.unaided ||
490
- verdict.payload.outcome !== "success")
491
- continue;
492
- yield* write({
493
- at: ctx.now,
494
- surface: ctx.surface,
495
- nodes: [node],
496
- cites: [verdict.id],
497
- payload: { kind: "review-pass", node: completionNodeRef(ctx.graph, node) },
498
- });
499
- }
500
- }
501
- return recount;
482
+ return closeRecount(ctx, input.practising);
502
483
  },
503
484
  },
504
485
  ];
@@ -626,7 +607,7 @@ export const defaultRecordingTools = [
626
607
  },
627
608
  {
628
609
  name: "record_retrieval_opener",
629
- description: "Record the learner's actual attempted answer to a posed conversational retrieval prompt at the opening of a lesson. Use only for that explicit lesson-opening check, never for a Quiz, Review, Material outcome, or generic demonstration.",
610
+ description: "Record the learner's actual attempted answer to a posed conversational retrieval prompt at the opening of a lesson. Use only for that explicit lesson-opening check, never for a Material outcome or generic demonstration.",
630
611
  schema: schema({
631
612
  node: nodeProperty,
632
613
  outcome: { enum: ["success", "failure", "dont-know"] },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmon-co/ncept-default-theory",
3
- "version": "3.0.20",
3
+ "version": "3.0.21",
4
4
  "license": "FSL-1.1-ALv2",
5
5
  "repository": {
6
6
  "type": "git",