{
 "paper": "prefrontal-orchestration",
 "a": "4.4",
 "b": "4.5",
 "summary": "From v4.4 (2 Jun) to v4.5 (2 Jun): 9,029 words to 8,985 words, 117 words in new or rewritten paragraphs and 161 taken out, 11 paragraphs changed.",
 "note": {
  "title": "Two figures added; the diagram-plan section removed",
  "kind": "revision",
  "body": "## Summary\n\nAdds figures for recipe composition (4.2) and for the panel (8.3), and removes the section that listed diagrams still to be drawn.",
  "source": "change note"
 },
 "paragraphs_changed": 11,
 "changes": [
  {
   "section": "1.3 The gap this paper closes",
   "old": "The rest of the paper specifies each in turn (Sections 3–8), after establishing the architecture and the economics that make it affordable (Section 2). Section 9 integrates the substrate with the surrounding cognitive systems; Section 10 gives evaluation design; Section 11 reports what has shipped beyond the six core capabilities and the one extension that remains open; Section 12 lists suggested diagrams; Section 13 concludes; Section 14 states the surrounding cognitive stack the substrate depends on.",
   "new": "The rest of the paper specifies each in turn (Sections 3–8), after establishing the architecture and the economics that make it affordable (Section 2). Section 9 integrates the substrate with the surrounding cognitive systems; Section 10 gives evaluation design; Section 11 reports what has shipped beyond the six core capabilities and the one extension that remains open; Section 12 concludes; Section 13 states the surrounding cognitive stack the substrate depends on.",
   "marked": "The rest of the paper specifies each in turn (Sections 3–8), after establishing the architecture and the economics that make it affordable (Section 2). Section 9 integrates the substrate with the surrounding cognitive systems; Section 10 gives evaluation design; Section 11 reports what has shipped beyond the six core capabilities and the one extension that remains open; Section 12 [-lists suggested diagrams;-] {+concludes;+} Section 13 [-concludes; Section 14-] states the surrounding cognitive stack the substrate depends on."
  },
  {
   "section": "4.2 Dynamic composition — runtime sub-recipe calls (`uses:`)",
   "old": null,
   "new": "![Composition algebra: `composes:` flattens sub-recipe steps into one plan at build time (de-duplicated, depth- and cycle-guarded); `uses:` transfers control at run time into a nested plan on a child session and folds its terminal note back as the step's outcome. Both are bounded by a depth cap and a cycle guard.](images/fig-composition.pdf)",
   "marked": "{+![Composition algebra: `composes:` flattens sub-recipe steps into one plan at build time (de-duplicated, depth- and cycle-guarded); `uses:` transfers control at run time into a nested plan on a child session and folds its terminal note back as the step's outcome. Both are bounded by a depth cap and a cycle guard.](images/fig-composition.pdf)+}"
  },
  {
   "section": "8.3 What the panel renders",
   "old": null,
   "new": "![The RECIPES panel sits beside the chat, divided by the split-of-concerns boundary: the chat carries the substantive answer, the panel carries orchestration mechanics. The panel stacks Discovery (catalog size, scored candidates, threshold, NO-MATCH), Composition (source badges, de-dup count), the Plan with per-step status, per-step Fan-out (one subagent-vitals row per dispatch), and the compact, expandable decision trail.](images/fig-panel.pdf)",
   "marked": "{+![The RECIPES panel sits beside the chat, divided by the split-of-concerns boundary: the chat carries the substantive answer, the panel carries orchestration mechanics. The panel stacks Discovery (catalog size, scored candidates, threshold, NO-MATCH), Composition (source badges, de-dup count), the Plan with per-step status, per-step Fan-out (one subagent-vitals row per dispatch), and the compact, expandable decision trail.](images/fig-panel.pdf)+}"
  },
  {
   "section": "11.2 The self-improving library — shipped",
   "old": "Section 5 makes the library self-*expanding* (it authors when nothing matches) and Section 9.5 makes it self-*updating* (a reflection pass can recommend a change). The missing piece was self-*improvement*: feeding real execution outcomes back into the matcher so its scoring weights stop being purely hand-tuned. That loop is now closed, with a deliberate division of labour between subsystems. A background consolidation layer — the offline process that runs between turns to compact and learn from accumulated experience — owns the *offline* measurement: it distils a per-recipe **fitness** from accumulated execution episodes — success rate, latency, token cost — attributing each episode to a recipe only via an explicit `recipe:<owner/slug>` tag the runner sets at dispatch, so an untagged episode is never counted against any recipe (no false attribution).",
   "new": "Section 5 makes the library self-*expanding* (it authors when nothing matches) and Section 9.5 makes it self-*updating* (a reflection pass can recommend a change). The missing piece was self-*improvement*: feeding real execution outcomes back into the matcher so its scoring weights stop being purely hand-tuned. That loop is now closed, with a deliberate division of labour between subsystems. A background consolidation layer — the offline process that runs between turns to compact and learn from accumulated experience — owns the *offline* measurement: it distils a per-recipe **fitness** from accumulated execution episodes — success rate, latency, token cost. Each episode attributes to a recipe only via an explicit `recipe:<owner/slug>` tag the runner sets at dispatch, so an untagged episode is never counted against any recipe (no false attribution).",
   "marked": "Section 5 makes the library self-*expanding* (it authors when nothing matches) and Section 9.5 makes it self-*updating* (a reflection pass can recommend a change). The missing piece was self-*improvement*: feeding real execution outcomes back into the matcher so its scoring weights stop being purely hand-tuned. That loop is now closed, with a deliberate division of labour between subsystems. A background consolidation layer — the offline process that runs between turns to compact and learn from accumulated experience — owns the *offline* measurement: it distils a per-recipe **fitness** from accumulated execution episodes — success rate, latency, token [-cost — attributing each-] {+cost. Each+} episode {+attributes+} to a recipe only via an explicit `recipe:<owner/slug>` tag the runner sets at dispatch, so an untagged episode is never counted against any recipe (no false attribution)."
  },
  {
   "section": "12. Suggested Diagrams (D2)",
   "old": "## 12. Suggested Diagrams (D2)",
   "new": null,
   "marked": "[-## 12. Suggested Diagrams (D2)-]"
  },
  {
   "section": "12. Suggested Diagrams (D2)",
   "old": "These are descriptions for a designer; the diagrams themselves are not drawn here. D2 is suggested for its clean layered layout and first-class containers. Figures 1 and 2 are already rendered (the executive cycle and the life-cycle state machine, §2.1 and §8.4); the two below would complete the set.",
   "new": null,
   "marked": "[-These are descriptions for a designer; the diagrams themselves are not drawn here. D2 is suggested for its clean layered layout and first-class containers. Figures 1 and 2 are already rendered (the executive cycle and the life-cycle state machine, §2.1 and §8.4); the two below would complete the set.-]"
  },
  {
   "section": "12. Suggested Diagrams (D2)",
   "old": "1. **Composition algebra — inline vs. call.** A side-by-side D2 figure contrasting `composes:` (static step-merge: sub-recipe steps flattened into one plan, with de-dup) against `uses:` (dynamic call: a step transferring control to a nested plan on a child session and returning), with the depth cap and cycle guard drawn explicitly as the recursion's safety rails.",
   "new": null,
   "marked": "[-1. **Composition algebra — inline vs. call.** A side-by-side D2 figure contrasting `composes:` (static step-merge: sub-recipe steps flattened into one plan, with de-dup) against `uses:` (dynamic call: a step transferring control to a nested plan on a child session and returning), with the depth cap and cycle guard drawn explicitly as the recursion's safety rails.-]"
  },
  {
   "section": "12. Suggested Diagrams (D2)",
   "old": "2. **The RECIPES panel anatomy.** A D2 container diagram of the panel's stacked sections — Discovery, Composition, Plan-with-badges, per-step Fan-out (subagent vitals), and the compact/expandable Trail — placed beside the chat surface, with a bold boundary marking the split-of-concerns invariant (substance left, mechanics right).",
   "new": null,
   "marked": "[-2. **The RECIPES panel anatomy.** A D2 container diagram of the panel's stacked sections — Discovery, Composition, Plan-with-badges, per-step Fan-out (subagent vitals), and the compact/expandable Trail — placed beside the chat surface, with a bold boundary marking the split-of-concerns invariant (substance left, mechanics right).-]"
  },
  {
   "section": "13. Conclusion",
   "old": "## 13. Conclusion",
   "new": null,
   "marked": "[-## 13. Conclusion-]"
  },
  {
   "section": "12. Conclusion",
   "old": null,
   "new": "## 12. Conclusion",
   "marked": "{+## 12. Conclusion+}"
  },
  {
   "section": "13. The Surrounding Cognitive Stack",
   "old": "## 14. The Surrounding Cognitive Stack",
   "new": "## 13. The Surrounding Cognitive Stack",
   "marked": "## [-14.-] {+13.+} The Surrounding Cognitive Stack"
  }
 ]
}
