{
 "schema": "softanza-book/2",
 "title": "Softanza",
 "subtitle": "The Governed Software Platform of the AI Age",
 "tagline": "Declare what you know. A court keeps it. The AI model comes last.",
 "author": "Mansour Ayouni",
 "series": "First of the AYOUNI books",
 "built": "2026-10-17 04:50 UTC+01:00",
 "library_commit": "93d7a39bdd040f82eae21d949460d69c32a75c70",
 "edition": "proof copy",
 "runtime": {
  "name": "the former host language",
  "version": "1.27",
  "haro_runs_the_library": false
 },
 "spine": [
  1,
  2,
  3,
  4,
  5,
  11,
  17,
  32,
  33
 ],
 "rules_for_agents": [
  "A draft is a draft: a chapter whose status is draft is not the author's final word, and 'the author read it' is a status that only the author sets.",
  "You may quote any cell of a table. You may not turn an absent cell into a present one.",
  "Rely on the stage words: built means the code, a guard and a run; designed means a document and nothing that runs; absent means that the record was searched, and the chapter says how far.",
  "Rely on a promise only with its verdict, and only at the library commit named in this file.",
  "A number printed in the book was read from a file or a run at the date its page gives; a number the book could not read is null.",
  "The blocks ran on the runtime of the former host language, version 1.27; Haro does not run the library yet.",
  "Never name the products of other repositories: the book describes them, and says 'the interface constitution' for the one it quotes."
 ],
 "files": {
  "schema": "book.schema.json",
  "summary": "llms-book.txt",
  "full_text": "llms-full-book.txt",
  "per_page": "agents/<slug>.md",
  "reader_en": "en/index.html",
  "reader_fr": "fr/index.html"
 },
 "chapters": [
  {
   "number": 0,
   "id": "preface",
   "title": "Preface",
   "slug": "preface",
   "kind": "preface",
   "part": 0,
   "appendix": null,
   "law": null,
   "principle": null,
   "spine": true,
   "status": "draft",
   "stage": {},
   "guards": [],
   "promises": [
    {
     "code": "cPia = \"pia: 1\nname: stock-watcher\nkind: pi\nreversibility: compensable\nschedule:\n  timer: 20\nskills:\n  - name: restock\n    does: learn stock level ordered\n\"\noD = StzAgentDeclarationQ(cPia)\n? oD.IsValid()\n#--> 0\n? oD.CiteFindings()\n#--> [pia-coverage @ coverage] an agent must say WHAT IT COVERS. The engine loop refuses to schedule an agent with no coverage statement (law 18), so a file without one could never run and is refused here instead of at the first tick.",
     "promised": "0\n[pia-coverage @ coverage] an agent must say WHAT IT COVERS. The engine loop refuses to schedule an agent with no coverage statement (law 18), so a file without one could never run and is refused here instead of at the first tick.",
     "output": "0\n[pia-coverage @ coverage] an agent must say WHAT IT COVERS. The engine loop refuses to schedule an agent with no coverage statement (law 18), so a file without one could never run and is refused here instead of at the first tick.",
     "verdict": "kept",
     "effects": []
    }
   ],
   "narrations": [],
   "rulings": [],
   "doors": {},
   "sections": [
    {
     "n": null,
     "title": "A question you already have"
    },
    {
     "n": null,
     "title": "The idea, in two moves"
    },
    {
     "n": null,
     "title": "A declaration, in real code"
    },
    {
     "n": null,
     "title": "What Softanza is"
    },
    {
     "n": null,
     "title": "Where it stands"
    },
    {
     "n": null,
     "title": "What this book is"
    },
    {
     "n": null,
     "title": "How to read it"
    },
    {
     "n": null,
     "title": "What to trust"
    },
    {
     "n": null,
     "title": "About this draft"
    }
   ],
   "open_questions": [],
   "words": 1979,
   "french": true,
   "text": "agents/preface.md",
   "run": {
    "ran": "2026-10-15 12:58 UTC+01:00",
    "kept": 1,
    "runnable": 1
   }
  },
  {
   "number": 1,
   "id": "change-arrives-faster-than-trust",
   "title": "Change arrives faster than trust",
   "slug": "ch1-change-arrives-faster-than-trust",
   "kind": "chapter",
   "part": 1,
   "appendix": null,
   "law": null,
   "principle": "change arrives faster than trust.",
   "spine": true,
   "status": "draft",
   "stage": {
    "built": "the court that admits or refuses a change, for a person and for a machine",
    "absent": "a customer platform running on the Softanza engine"
   },
   "guards": [
    {
     "name": "service_registry_narrated",
     "exists": true,
     "path": "base/test/system/service_registry_narrated.ring",
     "assertions": 93,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/service_registry_narrated.ring"
    },
    {
     "name": "safeworld_narrated",
     "exists": true,
     "path": "base/test/agentic/safeworld_narrated.ring",
     "assertions": 76,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/agentic/safeworld_narrated.ring"
    },
    {
     "name": "governance_crossing_narrated",
     "exists": true,
     "path": "base/test/system/governance_crossing_narrated.ring",
     "assertions": 31,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/governance_crossing_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oReg = new stzServiceRegistry(\"my-solution\")\noReg.Bind(:mail, new stzMailSandbox())\noReg.SetPhase(:emulated)\n? oReg.IsSound()\n#--> 1\noReg.SetPhase(:production)\n? oReg.IsSound()\n#--> 0\n? oReg.Findings()[1][:message]\n#--> still bound to a SANDBOX in a production phase -- a fake must never ship",
     "promised": "1\n0\nstill bound to a SANDBOX in a production phase -- a fake must never ship",
     "output": "1\n0\nstill bound to a SANDBOX in a production phase -- a fake must never ship",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzList([ \"tea\", \"rice\", \"tea\", \"fish\", \"rice\", \"tea\" ])\n? @@( o1.FindAll(\"tea\") )\n#--> [ 1, 3, 6 ]\n? @@( o1.DuplicatesRemoved() )\n#--> [ \"tea\", \"rice\", \"fish\" ]",
     "promised": "[ 1, 3, 6 ]\n[ \"tea\", \"rice\", \"fish\" ]",
     "output": "[ 1, 3, 6 ]\n[ \"tea\", \"rice\", \"fish\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? YourFunction(the_input)\n#--> the line it must print",
     "promised": "the line it must print",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [],
   "rulings": [
    "12.10",
    "12.11",
    "12.15",
    "12.28",
    "12.29"
   ],
   "doors": {
    "programmer": "You will keep your editor and your language. What changes is that every claim you make about your code can carry a promise under it, and a court will read it.",
    "analyst": "Your rules become data a person can change, and every change is judged before it lands and recorded after.",
    "designer": "The interface is judged too: twenty-two verbs, one hundred and twenty-two rules, and a verifier that refuses what a machine can check.",
    "decision-maker": "The question you ask every vendor, \"who decides, and what is written down\", has a mechanical answer here, and it is the same answer for a person and for a machine.",
    "educator": "The tutor asks and never answers first. That is a law of the platform, not a feature of a product.",
    "agent": "You are welcome here, and you will be judged. Appendix G is yours."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 2307,
   "french": true,
   "text": "agents/ch1-change-arrives-faster-than-trust.md",
   "run": {
    "ran": "2026-10-15 12:58 UTC+01:00",
    "kept": 2,
    "runnable": 2
   }
  },
  {
   "number": 2,
   "id": "the-software-crafter",
   "title": "The software crafter",
   "slug": "ch2-the-software-crafter",
   "kind": "chapter",
   "part": 1,
   "appendix": null,
   "law": null,
   "principle": "a crafter is whoever declares what they know about a world, and owns what they declare: the artefact is theirs, in plain text, and it does not expire.",
   "spine": true,
   "status": "draft",
   "stage": {
    "built": "the agent file and its court; the registry that refuses a fake in production; rules as data on a model; a regulator's rules judging an organisation chart; the natural layer in Hausa and Arabic",
    "designed": "a guard that fails when a step of a journey page breaks, each step run in order; the door through which a coding agent asks the library to judge its work",
    "absent": "the platforms of the three customers running on the Softanza engine; a crafter's own medium, the messaging app on their phone, as a target"
   },
   "guards": [
    {
     "name": "agentfile_narrated",
     "exists": true,
     "path": "base/test/agentic/agentfile_narrated.ring",
     "assertions": 88,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/agentic/agentfile_narrated.ring"
    },
    {
     "name": "service_registry_narrated",
     "exists": true,
     "path": "base/test/system/service_registry_narrated.ring",
     "assertions": 93,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/service_registry_narrated.ring"
    },
    {
     "name": "graphrule_object_narrated",
     "exists": true,
     "path": "base/test/graph/graphrule_object_narrated.ring",
     "assertions": 34,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/graph/graphrule_object_narrated.ring"
    },
    {
     "name": "semantic_resolver_narrated",
     "exists": true,
     "path": "base/test/natural/semantic_resolver_narrated.ring",
     "assertions": 83,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/semantic_resolver_narrated.ring"
    },
    {
     "name": "00_orgchart_narrated",
     "exists": true,
     "path": "base/test/orgchart/00_orgchart_narrated.ring",
     "assertions": 10,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/orgchart/00_orgchart_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "o1 = new stzList([ \"tea\", \"rice\", \"tea\", \"fish\", \"rice\", \"tea\" ])\n? o1.ContainsDuplicates()\n#--> 1\n? o1.NumberOfOccurrence(\"tea\")\n#--> 3",
     "promised": "1\n3",
     "output": "1\n3",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o = new stzTable([ [ :region, :population ],\n    [ \"Agadez\", 487620 ], [ \"Maradi\", 3402094 ], [ \"Zinder\", 3539764 ] ])\no.Show()\n#--> ╭────────┬────────────╮\n#    │ Region │ Population │\n#    ├────────┼────────────┤\n#    │ Agadez │     487620 │\n#    │ Maradi │    3402094 │\n#    │ Zinder │    3539764 │\n#    ╰────────┴────────────╯",
     "promised": "╭────────┬────────────╮\n│ Region │ Population │\n├────────┼────────────┤\n│ Agadez │     487620 │\n│ Maradi │    3402094 │\n│ Zinder │    3539764 │\n╰────────┴────────────╯",
     "output": "╭────────┬────────────╮\n│ Region │ Population │\n├────────┼────────────┤\n│ Agadez │     487620 │\n│ Maradi │    3402094 │\n│ Zinder │    3539764 │\n╰────────┴────────────╯",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Q(\"Softanza\").BoxedXT([ :AllCorners = :Round ])\n#--> ╭──────────╮\n#    │ Softanza │\n#    ╰──────────╯",
     "promised": "╭──────────╮\n│ Softanza │\n╰──────────╯",
     "output": "╭──────────╮\n│ Softanza │\n╰──────────╯",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cPia = \"pia: 1\nname: stock-watcher\nkind: pi\nreversibility: compensable\nschedule:\n  timer: 20\nskills:\n  - name: restock\n    does: learn stock level ordered\n\"\noD = StzAgentDeclarationQ(cPia)\n? oD.IsValid()\n#--> 0\n? oD.CiteFindings()\n#--> [pia-coverage @ coverage] an agent must say WHAT IT COVERS. The engine loop refuses to schedule an agent with no coverage statement (law 18), so a file without one could never run and is refused here instead of at the first tick.",
     "promised": "0\n[pia-coverage @ coverage] an agent must say WHAT IT COVERS. The engine loop refuses to schedule an agent with no coverage statement (law 18), so a file without one could never run and is refused here instead of at the first tick.",
     "output": "0\n[pia-coverage @ coverage] an agent must say WHAT IT COVERS. The engine loop refuses to schedule an agent with no coverage statement (law 18), so a file without one could never run and is refused here instead of at the first tick.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? NaturallyIn(\"ha\", \"Yi rubutu dauke 'hello' Maida shi\").Result()\n#--> HELLO\n? Q(\"سلام\").NumberOfChars()\n#--> 4\n? Q(\"مرحبا بالعالم\").Script()\n#--> arabic",
     "promised": "HELLO\n4\narabic",
     "output": "HELLO\n4\narabic",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cLlm = \"pia: 1\nname: rogue\nkind: llm\ncoverage: proposes a summary\nreversibility: reversible\nschedule:\n  timer: 20\nproposes:\n  prompt: Summarize {input}\n  structure:\n    - field: topic\n      type: string\nskills:\n  - name: send\n    when: always\n    does: propose\n    effect: send-email\n\"\noBad = StzAgentDeclarationQ(cLlm)\n? oBad.IsValid()\n#--> 0\n? oBad.CiteFindings()\n#--> [no-llm-effectful @ skills.send.effect] REFUSED: granting 'effectful' to llm actor 'rogue' -- an LLM proposes, only a pi-gate commits (no-llm-effectful, enforced at CONSTRUCTION, not merely audited).",
     "promised": "0\n[no-llm-effectful @ skills.send.effect] REFUSED: granting 'effectful' to llm actor 'rogue' -- an LLM proposes, only a pi-gate commits (no-llm-effectful, enforced at CONSTRUCTION, not merely audited).",
     "output": "0\n[no-llm-effectful @ skills.send.effect] REFUSED: granting 'effectful' to llm actor 'rogue' -- an LLM proposes, only a pi-gate commits (no-llm-effectful, enforced at CONSTRUCTION, not merely audited).",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oReg = new stzServiceRegistry(\"restaurant\")\noReg {\n\tBind(:payments, new stzPaymentsSandbox())\n\tSetPhase(:emulated)\n\t? IsSound()\n\t#--> 1\n\tSetPhase(:production)\n\t? IsSound()\n\t#--> 0\n\t? Findings()[1][:message]\n\t#--> still bound to a SANDBOX in a production phase -- a fake must never ship\n}",
     "promised": "1\n0\nstill bound to a SANDBOX in a production phase -- a fake must never ship",
     "output": "1\n0\nstill bound to a SANDBOX in a production phase -- a fake must never ship",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oOrg = new stzOrgChart(\"bank\")\noOrg {\n\tAddPositionXTT(\"ceo\", \"Chief Executive\", [ :department = \"executive\" ])\n\tAddPositionXTT(\"audit\", \"Internal Audit\", [ :department = \"audit\", :reportsTo = \"ceo\" ])\n\t? @@( ValidateBCEAOGovernance() )\n\t#--> [ [ \"status\", \"fail\" ], [ \"domain\", \"BCEAO_governance\" ], [ \"issuecount\", 3 ], [ \"issues\", [ \"BCEAO-001: No Board of Directors found\", \"BCEAO-002: Audit reports to non-board position\", \"BCEAO-003: No dedicated Risk Management function\" ] ] ]\n}",
     "promised": "[ [ \"status\", \"fail\" ], [ \"domain\", \"BCEAO_governance\" ], [ \"issuecount\", 3 ], [ \"issues\", [ \"BCEAO-001: No Board of Directors found\", \"BCEAO-002: Audit reports to non-board position\", \"BCEAO-003: No dedicated Risk Management function\" ] ] ]",
     "output": "[ [ \"status\", \"fail\" ], [ \"domain\", \"BCEAO_governance\" ], [ \"issuecount\", 3 ], [ \"issues\", [ \"BCEAO-001: No Board of Directors found\", \"BCEAO-002: Audit reports to non-board position\", \"BCEAO-003: No dedicated Risk Management function\" ] ] ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oRule = new stzGraphRule(\"no-llm-effectful\")\noRule.SetDomainQ(\"agentic\")\noRule.WhenQ(\"kind\", \"equals\", \"llm_actor\")\noRule.WhenQ(\"capabilities\", \"contains\", \"effectful\")\noRule.ThenViolationQ(\"an LLM proposes, only a pi-gate commits\")\ng = new stzGraph(\"agents\")\ng.AddNode(\"writer\")\ng.SetNodeProperty(\"writer\", \"kind\", \"llm_actor\")\ng.SetNodeProperty(\"writer\", \"capabilities\", [ \"inference\", \"effectful\" ])\ng.AddRule(oRule)\n? g.RulesAreSound()\n#--> 0",
     "promised": "0",
     "output": "0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? StzAgentDeclarationQ(cYourAgent).IsValid()\n#--> 1",
     "promised": "1",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "oRule = new stzGraphRule(\"no-llm-effectful\")\noRule.SetDomainQ(\"agentic\")\noRule.WhenQ(\"kind\", \"equals\", \"llm_actor\")\noRule.WhenQ(\"capabilities\", \"contains\", \"effectful\")\noRule.ThenViolationQ(\"an LLM proposes, only a pi-gate commits\")\ng = new stzGraph(\"agents\")\ng.AddNode(\"writer\")\ng.SetNodeProperty(\"writer\", \"kind\", \"llm_actor\")\ng.SetNodeProperty(\"writer\", \"capabilities\", [ \"inference\" ])\ng.AddRule(oRule)\n? g.RulesAreSound()",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-built-on-real-world-need.md",
    "stz-service-virtualization-code-first-subscribe-later.md",
    "stz-agents-that-cannot-hurt-you-narration.md",
    "stz-rules-as-graph-rules-narration.md",
    "stzOrgChartDoc-BankUseCase.md"
   ],
   "rulings": [
    "12.2",
    "12.12",
    "12.13",
    "12.25",
    "12.29",
    "12.30"
   ],
   "doors": {
    "programmer": "You declare intent in a library that reads like a sentence, and an engine computes under every call. You stay the first audience.",
    "analyst": "You declare your organisation's entities, rules and flows in plain text, and the rules judge the model.",
    "designer": "You declare a picture, a map or a screen as a program, and the first rule of an interface can come from a real trade: for a restaurateur, the speed of ordering.",
    "decision-maker": "You declare your world, your governance, and what each actor may commit, and you own all of it, in plain text.",
    "educator": "You declare a course in your learners' language, and every exercise is checked by running, in the site's words. The editions in French, Arabic and Hausa are drafts a reviewer has yet to read.",
    "agent": "You declare yourself in a file: what you cover, how reversible your acts are. You get a workbench and a court. You do not get the capability to commit."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3164,
   "french": true,
   "text": "agents/ch2-the-software-crafter.md",
   "run": {
    "ran": "2026-10-15 12:58 UTC+01:00",
    "kept": 9,
    "runnable": 9
   }
  },
  {
   "number": 3,
   "id": "the-method-from-first-principles",
   "title": "The method, from first principles",
   "slug": "ch3-the-method-from-first-principles",
   "kind": "chapter",
   "part": 1,
   "appendix": null,
   "law": null,
   "principle": "you declare a world in a language made for it, and you govern how that world changes.",
   "spine": true,
   "status": "draft",
   "stage": {
    "built": "the court behind every block of this chapter but the truth one, and the stage words the site prints on every product",
    "designed": "the register of rethought concepts as data, with a guard that fails when a concept has no proof",
    "absent": "a page that shows each rethought concept with a run proof; a test file for the paradigm engine of section merging"
   },
   "guards": [
    {
     "name": "modality_narrated",
     "exists": true,
     "path": "base/test/natural/modality_narrated.ring",
     "assertions": 45,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/modality_narrated.ring"
    },
    {
     "name": "wisecoding_narrated",
     "exists": true,
     "path": "base/test/conversation/wisecoding_narrated.ring",
     "assertions": 13,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/conversation/wisecoding_narrated.ring"
    },
    {
     "name": "wisecoding_rich_narrated",
     "exists": true,
     "path": "base/test/conversation/wisecoding_rich_narrated.ring",
     "assertions": 52,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/conversation/wisecoding_rich_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "? Q(\"text\").Count(\"\")\n#--> 0\n? Q(\"text\").Contains(\"\")\n#--> FALSE",
     "promised": "0\nFALSE",
     "output": "0\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "ConstrainQ(\"score\").ToBeQ(:Number).AndQ().ToBeQ(:Positive).AndQ().ToBeQ(:Even)\n? CanQ(42).BeA(\"score\")\n#--> TRUE\n? CanQ(-4).BeA(\"score\")\n#--> FALSE\n? Why()\n#--> no: -4 is not positive (constraint 2 of 'score')",
     "promised": "TRUE\nFALSE\nno: -4 is not positive (constraint 2 of 'score')",
     "output": "1\n0\nno: -4 is not positive (constraint 2 of 'score')",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oName = new stzString(\"hello\")\noName.EnforceConstraint(\"keep-lowercase\", :Lowercase)\nbRefused = FALSE\ntry\n\toName.UpdateWith(\"HELLO\")\ncatch\n\tbRefused = TRUE\ndone\n? bRefused\n#--> TRUE\n? oName.Content()\n#--> hello",
     "promised": "TRUE\nhello",
     "output": "1\nhello",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKB = new stzKnowledgeGraph(\"restaurant\")\noKB {\n\tKnow(\"margherita\", \"dish\")\n\tKnow(\"tiramisu\", \"dish\")\n\tAddConversationQ(\"setup\").SetGoal(StzGoalQ().RequireEach(\"dish\", \"contains\"))\n\taQ = AskInXT(\"setup\")\n\t? aQ[:why]\n\t#--> every dish needs 'contains'\n}\ntry\n\toKB.ConcludeIn(\"setup\", \"world\")\ncatch\n\t? cCatchError\ndone\n#--> Can't conclude: 2 gap(s) remain -- the wise-coding loop is not done. Ask the next question.",
     "promised": "every dish needs 'contains'\nCan't conclude: 2 gap(s) remain -- the wise-coding loop is not done. Ask the next question.",
     "output": "every dish needs 'contains'\nCan't conclude: 2 gap(s) remain -- the wise-coding loop is not done. Ask the next question.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "SetItemsMakingAListFalse([ \"false\", \"wrong\", \"dangerous\" ])\n? IsTrue([ \"hello\", \"this\", \"is\", \"wrong\" ])\n#--> TRUE\n? IsTrueXT([ \"hello\", \"this\", \"is\", \"wrong\" ])\n#--> FALSE",
     "promised": "TRUE\nFALSE",
     "output": "1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? YourDefault(the_input)\n#--> what your language prints today\n? YourRule(the_input)\n#--> what your declared rule must print",
     "promised": "what your language prints today\nwhat your declared rule must print",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "oName = new stzString(\"hello\")\noName.AddConstraint(\"keep-lowercase\", :Lowercase)\nbRefused = FALSE\ntry\n\toName.UpdateWith(\"HELLO\")\ncatch\n\tbRefused = TRUE\ndone\n? bRefused\n? oName.Content()",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stzstring-emptiness-narration.md",
    "istrue-softanza-truth.md",
    "stz-built-on-real-world-need.md"
   ],
   "rulings": [
    "12.19",
    "12.22",
    "12.29",
    "12.30"
   ],
   "doors": {
    "programmer": "Every claim you make can carry its promise. An enforced constraint refuses a bad update at the object's single update point, the one `UpdateWith()` reaches: `Update()` for a string or a number, `_SetContent()` for a list.",
    "analyst": "Your rule is a declaration, and its verdict names the rule that failed, by number.",
    "designer": "The stage word is part of the interface. A product that does not exist yet says so, in a word you can check.",
    "decision-maker": "Ask every vendor for the loss beside the win. Chapter 1 prints one, with its date: the runtime beneath Softanza trails the one it was compared with by a factor between one and two on every row, measured on 13 September 2026; chapter 27 gives the rows.",
    "educator": "Each rethink has an article that argues it: the concept, the field's form, the redesign. That is a curriculum, ordered by family.",
    "agent": "You learn this platform from the platform, and you are corrected by it. A verdict that says why is written for you as much as for a person."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 2679,
   "french": true,
   "text": "agents/ch3-the-method-from-first-principles.md",
   "run": {
    "ran": "2026-10-15 12:58 UTC+01:00",
    "kept": 5,
    "runnable": 5
   }
  },
  {
   "number": 4,
   "id": "the-platform-in-one-picture",
   "title": "The platform in one picture",
   "slug": "ch4-the-platform-in-one-picture",
   "kind": "chapter",
   "part": 1,
   "appendix": null,
   "law": null,
   "principle": "nothing is believed, everything is judged.",
   "spine": true,
   "status": "draft",
   "stage": {
    "built": "the engine and its libraries; the base layer; worlds, constellations and platforms with their guards; the engine subset a part ships, for the web",
    "designed": "the max layer loaded by its entry file; the base layer building on the core one; a loader for one domain of base alone; a court that checks the layers against their contract",
    "absent": "a whole program and its engine packed into one file; a customer platform on the engine"
   },
   "guards": [
    {
     "name": "00_stzapp_narrated",
     "exists": true,
     "path": "base/test/app/00_stzapp_narrated.ring",
     "assertions": 3,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/app/00_stzapp_narrated.ring"
    },
    {
     "name": "06_stzsuperapp_narrated",
     "exists": true,
     "path": "base/test/app/06_stzsuperapp_narrated.ring",
     "assertions": 21,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/app/06_stzsuperapp_narrated.ring"
    },
    {
     "name": "full_scope_model_narrated",
     "exists": true,
     "path": "base/test/system/full_scope_model_narrated.ring",
     "assertions": 62,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/full_scope_model_narrated.ring"
    },
    {
     "name": "01_platform_narrated",
     "exists": true,
     "path": "base/test/platform/01_platform_narrated.ring",
     "assertions": 31,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/platform/01_platform_narrated.ring"
    },
    {
     "name": "threat_model_narrated",
     "exists": true,
     "path": "base/test/security/threat_model_narrated.ring",
     "assertions": 11,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/security/threat_model_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "? len(\"سلام\")\n#--> 8\n? Q(\"سلام\").NumberOfChars()\n#--> 4\n? Q(\"مرحبا بالعالم\").Script()\n#--> arabic",
     "promised": "8\n4\narabic",
     "output": "8\n4\narabic",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "a = StzEngineBigIntFromString(\"99999999999999999999999999999999\")\n? StzEngineBigIntToString( StzEngineBigIntAdd(a, StzEngineBigIntFromString(\"1\")) )\n#--> 100000000000000000000000000000000",
     "promised": "100000000000000000000000000000000",
     "output": "100000000000000000000000000000000",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stkList([ \"one\", \"and\", \"one\", \"makes\", \"two\", \"ones\" ])\n? o1.FindFirst(\"one\")\n#--> 1\no2 = new stzList([ \"one\", \"and\", \"one\", \"makes\", \"two\", \"ones\" ])\n? o2.FindFirst(\"one\")\n#--> 1",
     "promised": "1\n1",
     "output": "1\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? @@( Q(\"tea rice tea\").FindAll(\"tea\") )\n#--> [ 1, 10 ]\n? @@( Q([ \"tea\", \"rice\", \"tea\" ]).FindAll(\"tea\") )\n#--> [ 1, 3 ]",
     "promised": "[ 1, 10 ]\n[ 1, 3 ]",
     "output": "[ 1, 10 ]\n[ 1, 3 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oApp = new stzApp(\"FieldVisits\")\noApp {\n    AddThingQ(:Account) { Has([ :number, :chapter, :balance ])  IsTrue(:balance, \"@ >= 0\") }\n    AddThingQ(:Client)  { Has([ :code, :name, :city ])  Owns(:Account) }\n    AddRelation(:Account, :belongsTo, :Client)\n}\noApp.Explain()\n#--> WORLD FieldVisits   lives in: memory (not persisted)\n#      BEING\n#        account (number, chapter, balance)\n#            true when balance @ >= 0\n#        client (code, name, city)\n#      RELATIONS\n#        client owns account\n#        account belongsto client\noApp.Live()\n#--> [FieldVisits] is live -- 2 thing(s), 0 flow(s), 0 reaction(s), 0 goal(s); 0 proposal(s)",
     "promised": "WORLD FieldVisits   lives in: memory (not persisted)\nBEING\naccount (number, chapter, balance)\ntrue when balance @ >= 0\nclient (code, name, city)\nRELATIONS\nclient owns account\naccount belongsto client\n[FieldVisits] is live -- 2 thing(s), 0 flow(s), 0 reaction(s), 0 goal(s); 0 proposal(s)",
     "output": "WORLD FieldVisits   lives in: memory (not persisted)\n  BEING\n    account (number, chapter, balance)\n        true when balance @ >= 0\n    client (code, name, city)\n  RELATIONS\n    client owns account\n    account belongsto client\n[FieldVisits] is live -- 2 thing(s), 0 flow(s), 0 reaction(s), 0 goal(s); 0 proposal(s)",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oResto = StzAppQ(\"resto\")\noResto.AddThingQ(:dish) { Has([ :name, :price ]) }\noSupplier = StzAppQ(\"supplier\")\noSupplier.AddThingQ(:crate) { Has([ :produce, :qty ]) }\noCon = new stzSuperApp(\"acme-group\")\noCon {\n\tAddWorld(\"resto\", oResto)\n\tAddWorld(\"supplier\", oSupplier)\n\tBond(\"resto\", \"supplier\", \"order-produce\")\n\tGovDeclareRisk(\"order-produce\", 2)\n\tGovGrant(\"resto\", \"order-produce\")\n\tGovSetAuthority(\"resto\", :Delegated)\n\t? CallAcross(\"resto\", \"supplier\", \"order-produce\")\n\t#--> 1\n\t? CallAcross(\"resto\", \"supplier\", \"raid-kitchen\")\n\t#--> 0\n\t? Why()\n\t#--> no bond declares 'raid-kitchen' from 'resto' to 'supplier'.\n}",
     "promised": "1\n0\nno bond declares 'raid-kitchen' from 'resto' to 'supplier'.",
     "output": "1\n0\nno bond declares 'raid-kitchen' from 'resto' to 'supplier'.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oDelivery = new stzDelivery(\"my-shop\")\noDelivery {\n\tAddSuperApp(:phone, :Android)\n\tAddBackend(:api, :LinuxServer)\n\tNeedsIn(:phone, [ :Unicode, :PivotTable, :ConstraintSolver, :Regex ])\n\toPlan = Plan()\n}\n? @@( oPlan.EngineCapsFor(:phone) )\n#--> [ \"pivottable\", \"constraintsolver\" ]\n? @@( StzWasmGroupsFor( oPlan.EngineCapsFor(:phone) ) )\n#--> [ \"aggregation\", \"solver\" ]",
     "promised": "[ \"pivottable\", \"constraintsolver\" ]\n[ \"aggregation\", \"solver\" ]",
     "output": "[ \"pivottable\", \"constraintsolver\" ]\n[ \"aggregation\", \"solver\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "try\n\to3 = new stxString(\"one and one\")\ncatch\n\t? cCatchError\ndone\n#--> Error (R11) : Error in class name, class not found: stxstring",
     "promised": "Error (R11) : Error in class name, class not found: stxstring",
     "output": "Error (R11) : Error in class name, class not found: stxstring",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "try\n\to3 = new stkString(\"one and one\")\ncatch\n\t? cCatchError\ndone",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stzApp-building-your-first-app-narration.md",
    "stz-system-dev-to-deploy-narration.md",
    "stz-emulating-the-whole-solution-narration.md",
    "stz-vs-qt-unicode-narration.md"
   ],
   "rulings": [
    "12.2",
    "12.10",
    "12.12",
    "12.13",
    "12.15",
    "12.23",
    "12.29"
   ],
   "doors": {
    "programmer": "You choose your depth by the file you load, and one verb means the same act on a string and on a list.",
    "analyst": "The Atlas tells you, lane by lane, where the platform is strong and where it is emerging. Build on the strong lanes.",
    "designer": "Your interface has a court of its own, the constitution's verbs and rules, in the same column as the code's guards.",
    "decision-maker": "Ask two questions of every floor: what stands beneath it, and who judges it. The engine's answer to the first is a written list of pinned libraries.",
    "educator": "The picture is the book's map. Each rethink in Parts II to IV is one box of it.",
    "agent": "The picture exists as data you can read, the Atlas as a file, and every floor you write to has a court that will read you."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 2652,
   "french": true,
   "text": "agents/ch4-the-platform-in-one-picture.md",
   "run": {
    "ran": "2026-10-15 12:58 UTC+01:00",
    "kept": 8,
    "runnable": 8
   }
  },
  {
   "number": 5,
   "id": "law-the-code-adheres-to-the-way-a-person-thinks",
   "title": "Law: the code adheres to the way a person thinks, and the court judges it whoever wrote it",
   "slug": "ch5-law-the-code-adheres-to-the-way-a-person-thinks",
   "kind": "chapter",
   "part": 2,
   "appendix": null,
   "law": "the code adheres to the way a person thinks, and the court judges it whoever wrote it",
   "principle": "what you think is what you write.",
   "spine": true,
   "status": "draft",
   "stage": {
    "built": "the forms of the vocabulary in thousands of method names; the house rules as a court over the library's own code; the promise read by a machine in the house's own form",
    "designed": "a court of style for the code a programmer or an AI agent writes; the writing grammar declared in Haro, so an AI model can only write in it",
    "absent": "any machine that judges today the style of a program written with the library"
   },
   "guards": [
    {
     "name": "coderule_narrated",
     "exists": true,
     "path": "base/test/meta/coderule_narrated.ring",
     "assertions": 77,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/meta/coderule_narrated.ring"
    },
    {
     "name": "testoor_promises_narrated",
     "exists": true,
     "path": "base/test/testoor/testoor_promises_narrated.ring",
     "assertions": 46,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/testoor/testoor_promises_narrated.ring"
    },
    {
     "name": "05_containsemptystrings",
     "exists": true,
     "path": "base/test/list/05_containsemptystrings.ring",
     "assertions": 5,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/list/05_containsemptystrings.ring"
    },
    {
     "name": "466_keeping_the_history_of_updates_of_a_softanza_objec",
     "exists": true,
     "path": "base/test/string/466_keeping_the_history_of_updates_of_a_softanza_objec.ring",
     "assertions": 2,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/string/466_keeping_the_history_of_updates_of_a_softanza_objec.ring"
    }
   ],
   "promises": [
    {
     "code": "? StzListOfStringsQ( StzStringQ(\"softanza\").UppercaseQ().Chars() ).ConcatenatedUsing(\" \")\n#--> S O F T A N Z A\n? StzStringQ(\"softanza\").UppercaseQ().Spacified()\n#--> S O F T A N Z A",
     "promised": "S O F T A N Z A\nS O F T A N Z A",
     "output": "S O F T A N Z A\nS O F T A N Z A",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzList([ \"A\", \"\", \"B\", \"\", \"\", \"C\" ])\n? o1.ContainsEmptyStrings()\n#--> TRUE\n? o1.CountEmptyStrings()\n#--> 3\n? @@( o1.FindEmptyStrings() )\n#--> [ 2, 4, 5 ]\no1.ReplaceEmptyStrings(:With = \"~\")\n? @@( o1.Content() )\n#--> [ \"A\", \"~\", \"B\", \"~\", \"~\", \"C\" ]",
     "promised": "TRUE\n3\n[ 2, 4, 5 ]\n[ \"A\", \"~\", \"B\", \"~\", \"~\", \"C\" ]",
     "output": "1\n3\n[ 2, 4, 5 ]\n[ \"A\", \"~\", \"B\", \"~\", \"~\", \"C\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzString(\"HAxxRxO\")\n? o1.Removed(\"x\")\n#--> HARO\n? o1.Content()\n#--> HAxxRxO\no1.Remove(\"x\")\n? o1.Content()\n#--> HARO\n? Q(\"haxxrxo\").RemoveQ(\"x\").UppercaseQ().Spacified()\n#--> H A R O",
     "promised": "HARO\nHAxxRxO\nHARO\nH A R O",
     "output": "HARO\nHAxxRxO\nHARO\nH A R O",
     "verdict": "kept",
     "effects": [
      "files"
     ]
    },
    {
     "code": "? Q(\"I love Haro\").Replaced(\"love\", :With = \"♥\")\n#--> I ♥ Haro\no2 = new stzList([ \"tea\", \"rice\", \"fish\" ])\no2.SwapItems(:AtPositions = 1, :And = 3)\n? @@( o2.Content() )\n#--> [ \"fish\", \"rice\", \"tea\" ]",
     "promised": "I ♥ Haro\n[ \"fish\", \"rice\", \"tea\" ]",
     "output": "I ♥ Haro\n[ \"fish\", \"rice\", \"tea\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "Q(\"haro php HARO ruby Haro\") {\n\t? NumberOfOccurrence(:Of = \"haro\")\n\t#--> 1\n\t? NumberOfOccurrenceCS(:Of = \"haro\", :CS = FALSE)\n\t#--> 3\n\t? @@( FindAllCS(\"haro\", FALSE) )\n\t#--> [ 1, 10, 20 ]\n}",
     "promised": "1\n3\n[ 1, 10, 20 ]",
     "output": "1\n3\n[ 1, 10, 20 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? @@( Qh(12500).AddQ(500).RetrieveQ(1500).DivideByQ(500).MultiplyByQ(2).History() )\n#--> [ 12500, 13000, 11500, 23, 46 ]",
     "promised": "[ 12500, 13000, 11500, 23, 46 ]",
     "output": "[ 12500, 13000, 11500, 23, 46 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "# A number object that keeps its history\nQH(12500) {\n\t# Inside the braces, each line speaks to the object\n\tAdd(500)\n\tRetrieve(1500)\n\tDivideBy(500)\n\tMultiplyBy(2)\n\n\t# Its history, as one expressive value\n\t? @@( History() )\n\t#--> [ 12500, 13000, 11500, 23, 46 ]\n}",
     "promised": "[ 12500, 13000, 11500, 23, 46 ]",
     "output": "[ 12500, 13000, 11500, 23, 46 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzNumber(12500)\nKeepHistory()\n\no1.Add(500)\no1.Retrieve(1500)\no1.DivideBy(500)\no1.MultiplyBy(2)\n\n? @@( o1.History() )\n#--> [ 12500, 13000, 11500, 23, 46 ]\nKeepHistoryOFF()",
     "promised": "[ 12500, 13000, 11500, 23, 46 ]",
     "output": "[ 12500, 13000, 11500, 23, 46 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cCode = \"class Basket\" + nl + \"def Add(x)\" + nl + \"\treturn x\" + nl + \"def AddQ(x)\" + nl + \"\treturn 42\" + nl\n? StzCodeIsClean(cCode)\n#--> FALSE\n? StzCheckCode(cCode)[1][:rule]\n#--> q-returns-object",
     "promised": "FALSE\nq-returns-object",
     "output": "0\nq-returns-object",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cCode = \"class Basket\" + nl + \"def Add(x)\" + nl + \"\treturn x\" + nl + \"def AddQ(x)\" + nl + \"\treturn This\" + nl\n? StzCodeIsClean(cCode)",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-mental-mode-narration.md",
    "stz-bridging-minds-and-code.md",
    "stz-functions-as-linguistic-expressions.md",
    "stzobject-history-narration.md",
    "stz-near-natural-language-programming.md"
   ],
   "rulings": [
    "12.2",
    "12.3",
    "12.14",
    "12.16",
    "12.17",
    "12.21"
   ],
   "doors": {
    "programmer": "Your lines follow your reasoning: select, contain, count, find, act. Each question carries its promise, and a court reads it whether you wrote it or an AI agent did.",
    "analyst": "The method starts from your problem in plain words. The keywords you use become the names of the steps.",
    "designer": "The verb's form is an interface contract: by the library's convention, the past participle does not touch the object. A court for that rule is designed, not built.",
    "decision-maker": "I hold this as a view, not a result: a style a machine can be held to can be reviewed goal by goal, not line by line. It is the only reading one person can give to hundreds of thousands of lines.",
    "educator": "Teach the discipline whole, and in order: formulate, then express, then be judged.",
    "agent": "You will be corrected by the library, not by folklore. Write the question, then the promise under it."
   },
   "sections": [
    {
     "n": null,
     "title": "What the AI age changes here"
    },
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3141,
   "french": true,
   "text": "agents/ch5-law-the-code-adheres-to-the-way-a-person-thinks.md",
   "run": {
    "ran": "2026-10-15 12:58 UTC+01:00",
    "kept": 9,
    "runnable": 9
   }
  },
  {
   "number": 6,
   "id": "the-mental-model-and-the-metaphors",
   "title": "The mental model, and the metaphors",
   "slug": "ch6-the-mental-model-and-the-metaphors",
   "kind": "chapter",
   "part": 2,
   "appendix": null,
   "law": null,
   "principle": "Say the problem in plain words, ask the same questions in the same order of any object, and when you would write a loop, name the move you are making: walk, check, yield or perform.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "the one-dimensional walker, the checker, the yielder and the performer on lists; the condition language compiled by the engine, with its host-code twin",
    "designed": "the four metaphors as native engine modules (only the yielder is one); a walker over any indexed structure",
    "absent": "runnable code for the three models of the article 'Bridging Minds and Code'; the edge table of the walker narration as written"
   },
   "guards": [
    {
     "name": "00_yielder_narrated",
     "exists": true,
     "path": "base/test/yielder/00_yielder_narrated.ring",
     "assertions": 8,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/yielder/00_yielder_narrated.ring"
    },
    {
     "name": "597_walker_basics",
     "exists": true,
     "path": "base/test/list/597_walker_basics.ring",
     "assertions": 6,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/list/597_walker_basics.ring"
    },
    {
     "name": "611_checkw",
     "exists": true,
     "path": "base/test/list/611_checkw.ring",
     "assertions": 1,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/list/611_checkw.ring"
    },
    {
     "name": "621_perform",
     "exists": true,
     "path": "base/test/list/621_perform.ring",
     "assertions": 2,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/list/621_perform.ring"
    },
    {
     "name": "483_w_and_wf_forms_in_conditional_code",
     "exists": true,
     "path": "base/test/list/483_w_and_wf_forms_in_conditional_code.ring",
     "assertions": 2,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/list/483_w_and_wf_forms_in_conditional_code.ring"
    },
    {
     "name": "495_walking_until_and_until_before",
     "exists": true,
     "path": "base/test/list/495_walking_until_and_until_before.ring",
     "assertions": 4,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/list/495_walking_until_and_until_before.ring"
    }
   ],
   "promises": [
    {
     "code": "Q(\"You and you\") {\n\t? ContainsCS(\"YOU\", FALSE)\n\t#--> TRUE\n\t? NumberOfOccurrenceCS(\"YOU\", FALSE)\n\t#--> 2\n\t? FindNthCS(2, \"YOU\", FALSE)\n\t#--> 9\n\tReplaceSection(9, 11, :With = \"Me\")\n\t? Content()\n\t#--> You and Me\n}",
     "promised": "TRUE\n2\n9\nYou and Me",
     "output": "1\n2\n9\nYou and Me",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "Wk(1, 10, 2) {\n\t? @@( Walkables() )\n\t#--> [ 1, 3, 5, 7, 9 ]\n\t? @@( Unwalkables() )\n\t#--> [ 2, 4, 6, 8, 10 ]\n\t? @@( Walk() )\n\t#--> [ 1, 3 ]\n\t? CurrentPosition()\n\t#--> 3\n\t? @@( RemainingWalkables() )\n\t#--> [ 5, 7, 9 ]\n}",
     "promised": "[ 1, 3, 5, 7, 9 ]\n[ 2, 4, 6, 8, 10 ]\n[ 1, 3 ]\n3\n[ 5, 7, 9 ]",
     "output": "[ 1, 3, 5, 7, 9 ]\n[ 2, 4, 6, 8, 10 ]\n[ 1, 3 ]\n3\n[ 5, 7, 9 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oWalker = Wk(1, 10, 3)\n? @@( oWalker.WalkNSteps(10) )\n#--> [ 1, 4, 7, 10 ]\n? @@( oWalker.Walk() )\n#--> [ 10 ]\noWalker = Wk(1, 10, 3)\ntry\n\toWalker.WalkBackward()\ncatch\n\t? cCatchError\ndone\n#--> Can't walk backward! Already at the beginning of walkable positions.",
     "promised": "[ 1, 4, 7, 10 ]\n[ 10 ]\nCan't walk backward! Already at the beginning of walkable positions.",
     "output": "[ 1, 4, 7, 10 ]\n[ 10 ]\nCan't walk backward! Already at the beginning of walkable positions.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "Q([ \"A\", 5, \"B\", \"C\" ]) {\n\t? CheckW('{ isString(@item) and IsUppercase(@item) }')\n\t#--> FALSE\n\t? ContainsW('{ isNumber(@item) }')\n\t#--> TRUE\n\t? @@( FindW('{ isNumber(@item) }') )\n\t#--> [ 2 ]\n}",
     "promised": "FALSE\nTRUE\n[ 2 ]",
     "output": "0\n1\n[ 2 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzYielder([ 1, -2, 3, -4, 5 ])\no1 {\n\t? @@( Filter(:IsPositive) )\n\t#--> [ 1, 3, 5 ]\n\t? @@( Map(:Abs) )\n\t#--> [ 1, 2, 3, 4, 5 ]\n\t? Reduce(:Sum)\n\t#--> 3\n}\nQ([ 1, \"haro\", 3, \"python\", 5, \"ruby\" ]) {\n\t? @@( YieldW('isString(@item)', 'upper(@item)') )\n\t#--> [ \"HARO\", \"PYTHON\", \"RUBY\" ]\n\t? @@( Content() )\n\t#--> [ 1, \"haro\", 3, \"python\", 5, \"ruby\" ]\n\tPerformW('isString(@item)', 'upper(@item)')\n\t? @@( Content() )\n\t#--> [ 1, \"HARO\", 3, \"PYTHON\", 5, \"RUBY\" ]\n}",
     "promised": "[ 1, 3, 5 ]\n[ 1, 2, 3, 4, 5 ]\n3\n[ \"HARO\", \"PYTHON\", \"RUBY\" ]\n[ 1, \"haro\", 3, \"python\", 5, \"ruby\" ]\n[ 1, \"HARO\", 3, \"PYTHON\", 5, \"RUBY\" ]",
     "output": "[ 1, 3, 5 ]\n[ 1, 2, 3, 4, 5 ]\n3\n[ \"HARO\", \"PYTHON\", \"RUBY\" ]\n[ 1, \"haro\", 3, \"python\", 5, \"ruby\" ]\n[ 1, \"HARO\", 3, \"PYTHON\", 5, \"RUBY\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cCond = '{ @item > 5 }'\nQ([ 3, 8, 5, 12, 1, 9 ]) {\n\t? @@( FindW(cCond) )\n\t#--> [ 2, 4, 6 ]\n\t? @@( ItemsW(cCond) )\n\t#--> [ 8, 12, 9 ]\n\t? ContainsW(cCond)\n\t#--> TRUE\n\t? @@( FindWF( func x { return x > 5 } ) )\n\t#--> [ 2, 4, 6 ]\n}",
     "promised": "[ 2, 4, 6 ]\n[ 8, 12, 9 ]\nTRUE\n[ 2, 4, 6 ]",
     "output": "[ 2, 4, 6 ]\n[ 8, 12, 9 ]\n1\n[ 2, 4, 6 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzList([ 3, 8, 5, 12, 1, 9 ])\n? @@( o1.FindW('{ @item > 5 and print(\"hacked\") }') )\n#--> [ ]\n? @@( W('{ @item > 5 }') )\n#--> [ \"where\", \"{ @item > 5 }\" ]",
     "promised": "[ ]\n[ \"where\", \"{ @item > 5 }\" ]",
     "output": "[ ]\n[ \"where\", \"{ @item > 5 }\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzList([ 4, 9, 12, 7, 20, 3 ])\n? @@( o1.FindW('{ @item > 5 and print(\"hacked\") }') )",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-mental-mode-narration.md",
    "stzwalker-beyond-loops-the -walker-metaphor.md",
    "stzwalker-walking-at-the-edge-narration.md",
    "stz-conditional-code-narration.md",
    "stz-bridging-minds-and-code.md"
   ],
   "rulings": [
    "12.3",
    "12.6",
    "12.14",
    "12.16",
    "12.17"
   ],
   "doors": {
    "programmer": "Ask the same four questions of any object, and when you reach for a loop, name the move: walk, check, yield or perform.",
    "analyst": "Say the problem in plain words, and the verbs you used are the steps: \"are all of them\", \"which ones\", \"give me the big ones\", \"make them negative\".",
    "designer": "The yielder never changes the list and the performer does, and the verb tells you which.",
    "decision-maker": "A W condition is a string the engine reads and cannot run as code, so it can be stored, shown and approved. The price is a small language, and a call it does not know gives an empty list, not an error.",
    "educator": "The self-study book already has the order: find, then apply, then walk, ask, produce and act.",
    "agent": "Write the condition as the string, not as code. When the answer is empty, check the condition's words before you trust the emptiness."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 2647,
   "french": true,
   "text": "agents/ch6-the-mental-model-and-the-metaphors.md",
   "run": {
    "ran": "2026-10-15 12:58 UTC+01:00",
    "kept": 7,
    "runnable": 7
   }
  },
  {
   "number": 7,
   "id": "the-writing-style-and-the-seven-goals",
   "title": "The writing style, and the seven goals",
   "slug": "ch7-the-writing-style-and-the-seven-goals",
   "kind": "chapter",
   "part": 2,
   "appendix": null,
   "law": null,
   "principle": "What you think is what you write.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "the library's fourteen house rules as a court over its own code; the promise judged as a claim; the small languages of ranges, lists and conditions in strings; the code seat; the viz prefix; alternatives and named parameters in any order, in part",
    "designed": "a court that judges the style of a program written with the library; a court that reads the goals; the writing grammar declared in Haro; the classic form of a test block as the one form",
    "absent": "any machine that judges the style of the code you write today; the writing in any human language of a function's name; the near-natural sentence as the deck wrote it; the eval-based code on a parameter's name"
   },
   "guards": [
    {
     "name": "coderule_narrated",
     "exists": true,
     "path": "base/test/meta/coderule_narrated.ring",
     "assertions": 77,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/meta/coderule_narrated.ring"
    },
    {
     "name": "602_l_function",
     "exists": true,
     "path": "base/test/list/602_l_function.ring",
     "assertions": 6,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/list/602_l_function.ring"
    },
    {
     "name": "59_use_of_the_l_small_function",
     "exists": true,
     "path": "base/test/list/59_use_of_the_l_small_function.ring",
     "assertions": 8,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/list/59_use_of_the_l_small_function.ring"
    },
    {
     "name": "527_identifying_lists_inside_a_string",
     "exists": true,
     "path": "base/test/string/527_identifying_lists_inside_a_string.ring",
     "assertions": 32,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/string/527_identifying_lists_inside_a_string.ring"
    },
    {
     "name": "48_replacebymany",
     "exists": true,
     "path": "base/test/string/48_replacebymany.ring",
     "assertions": 1,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/string/48_replacebymany.ring"
    },
    {
     "name": "483_w_and_wf_forms_in_conditional_code",
     "exists": true,
     "path": "base/test/list/483_w_and_wf_forms_in_conditional_code.ring",
     "assertions": 2,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/list/483_w_and_wf_forms_in_conditional_code.ring"
    },
    {
     "name": "28_numberofoccurrenceofcharleftside",
     "exists": true,
     "path": "base/test/string/28_numberofoccurrenceofcharleftside.ring",
     "assertions": 8,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/string/28_numberofoccurrenceofcharleftside.ring"
    },
    {
     "name": "646_content",
     "exists": true,
     "path": "base/test/string/646_content.ring",
     "assertions": 1,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/string/646_content.ring"
    },
    {
     "name": "972_narration_viz-finding_a_recurring_substring",
     "exists": true,
     "path": "base/test/string/972_narration_viz-finding_a_recurring_substring.ring",
     "assertions": 7,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/string/972_narration_viz-finding_a_recurring_substring.ring"
    },
    {
     "name": "testoor_promises_narrated",
     "exists": true,
     "path": "base/test/testoor/testoor_promises_narrated.ring",
     "assertions": 46,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/testoor/testoor_promises_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "# The host's own range counts in integers: the decimals are cut. Softanza reads\n# a small language inside a string, and keeps the decimals, the numbered words,\n# and the letters of any script:\n? @@( 1.02 : 3.08 )\n#--> [ 1, 2, 3 ]\n? @@( L(\"1.02:1.05\") )\n#--> [ 1.02, 1.03, 1.04, 1.05 ]\n? @@( L('\"♥1\" : \"♥3\"') )\n#--> [ \"♥1\", \"♥2\", \"♥3\" ]\n? @@( L(' \"ا\" : \"ج\" ') )\n#--> [ \"ا\", \"ب\", \"ة\", \"ت\", \"ث\", \"ج\" ]",
     "promised": "[ 1, 2, 3 ]\n[ 1.02, 1.03, 1.04, 1.05 ]\n[ \"♥1\", \"♥2\", \"♥3\" ]\n[ \"ا\", \"ب\", \"ة\", \"ت\", \"ث\", \"ج\" ]",
     "output": "[ 1, 2, 3 ]\n[ 1.02, 1.03, 1.04, 1.05 ]\n[ \"♥1\", \"♥2\", \"♥3\" ]\n[ \"ا\", \"ب\", \"ة\", \"ت\", \"ث\", \"ج\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzString(\"haro php ruby haro python haro\")\no1.ReplaceByMany(\"haro\", L('\"♥1\" : \"♥3\"'))\n? o1.Content()\n#--> ♥1 php ruby ♥2 python ♥3\no2 = new stzString(\"haro php ruby haro python haro ruby haro\")\no2.ReplaceByManyXT(\"haro\", L('\"♥1\" : \"♥3\"'))\n? o2.Content()\n#--> ♥1 php ruby ♥2 python ♥3 ruby ♥1",
     "promised": "♥1 php ruby ♥2 python ♥3\n♥1 php ruby ♥2 python ♥3 ruby ♥1",
     "output": "♥1 php ruby ♥2 python ♥3\n♥1 php ruby ♥2 python ♥3 ruby ♥1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? StzStringQ('1:3').IsListInString()\n#--> TRUE\n? @@( StzStringQ('[1,2,3]').ToListInShortForm() )\n#--> \"1 : 3\"\n? @@( StzStringQ(' \"A\":\"C\" ').ToList() )\n#--> [ \"A\", \"B\", \"C\" ]",
     "promised": "TRUE\n\"1 : 3\"\n[ \"A\", \"B\", \"C\" ]",
     "output": "1\n\"1 : 3\"\n[ \"A\", \"B\", \"C\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "Q(\"SOooooFTAaaannnNZA\") {\n\t? @@( FindW('{ Q(@char).IsUppercase() }') )\n\t#--> [ 1, 2, 7, 8, 9, 16, 17, 18 ]\n\tRemoveW('{ Q(@char).IsLowercase() }')\n\t? Content()\n\t#--> SOFTANZA\n}",
     "promised": "[ 1, 2, 7, 8, 9, 16, 17, 18 ]\nSOFTANZA",
     "output": "[ 1, 2, 7, 8, 9, 16, 17, 18 ]\nSOFTANZA",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzList([ 1, 2, \"♥\", 4, 5, \"♥\", \"♥\" ])\n? o1.FindNthNext(2, \"♥\", :StartingAt = 1)\n#--> 6\n? o1.FindNextNth(2, \"♥\", :StartingAt = 1)\n#--> 6\n? Q(\"---haro\").NumberOfOccurrenceOfCharLeftSide(\"-\")\n#--> 3\n? Q(\"---haro\").HowManyOccurrenceOfCharStartSide(\"-\")\n#--> 3\no2 = new stzList([ \"C\", \"B\", \"A\" ])\no2.SwapItems(:AtPositions = 1, :And = 3)\n? @@( o2.Content() )\n#--> [ \"A\", \"B\", \"C\" ]",
     "promised": "6\n6\n3\n3\n[ \"A\", \"B\", \"C\" ]",
     "output": "6\n6\n3\n3\n[ \"A\", \"B\", \"C\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Q(\"سلام\").NumberOfChars()\n#--> 4\n? Q(\"سلام\").NumberOfBytes()\n#--> 8\n? Q(\"سلام\").Size()\n#--> 8\no1 = new stzList([ \"tea\", \"rice\", \"fish\", \"salt\" ])\n? o1.ContainsBoth(\"tea\", \"fish\")\n#--> TRUE\n? o1.ContainsAll([ \"tea\", \"oil\" ])\n#--> FALSE",
     "promised": "4\n8\n8\nTRUE\nFALSE",
     "output": "4\n8\n8\n1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzString(\"----@@--@@-------@@----@@---\")\no1.ReplaceNextNthOccurrence(2, :Of = \"@@\", :StartingAt = 12, :With = \"##\")\n? o1.Content()\n#--> ----@@--@@-------@@----##---\no2 = new stzString(\"----@@--@@-------@@----@@---\")\no2.ReplaceNextNthOccurrence(2, :With = \"##\", :StartingAt = 12, :Of = \"@@\")\n? o2.Content()\n#--> ----@@--@@-------@@----##---",
     "promised": "----@@--@@-------@@----##---\n----@@--@@-------@@----##---",
     "output": "----@@--@@-------@@----##---\n----@@--@@-------@@----##---",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? @@( StzStringQ(\"hello\").FindAllCS(\"L\", :CaseSensitive = 0) )\n#--> [ 3, 4 ]\n? @@( StzListOfStringsQ([ \"h\", \"e\", \"l\", \"l\", \"o\" ]).FindAllCS(\"L\", :CaseSensitive = 0) )\n#--> [ 3, 4 ]\n? Q(\"\").IsEmpty()\n#--> TRUE\n? Q([]).IsEmpty()\n#--> TRUE",
     "promised": "[ 3, 4 ]\n[ 3, 4 ]\nTRUE\nTRUE",
     "output": "[ 3, 4 ]\n[ 3, 4 ]\n1\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? @@( StzCodeRuleNames() )\n#--> [ \"no-len-method\", \"q-returns-object\", \"no-aggressive-verbs\", \"engine-first\", \"q-has-plain-twin\", \"no-case-collision\", \"dead-knob\", \"setter-resets-on-reject\", \"setter-only-moves-one-way\", \"misspelled-name\", \"library-prints\", \"empty-method-body\", \"writes-a-mutable-constant\", \"value-called-as-function\" ]\ncOne = \"class Inbox\" + nl + \"def Recieve(x)\" + nl + \"\treturn x\" + nl\n? StzCheckCode(cOne)[1][:rule]\n#--> misspelled_name\n? StzCodeIsClean(cOne)\n#--> TRUE\ncTwo = \"class Inbox\" + nl + \"def Count()\" + nl + \"\tnl = 3\" + nl + \"\treturn nl\" + nl\n? StzCheckCode(cTwo)[1][:rule]\n#--> writes_a_mutable_constant\n? StzCodeIsClean(cTwo)\n#--> FALSE",
     "promised": "[ \"no-len-method\", \"q-returns-object\", \"no-aggressive-verbs\", \"engine-first\", \"q-has-plain-twin\", \"no-case-collision\", \"dead-knob\", \"setter-resets-on-reject\", \"setter-only-moves-one-way\", \"misspelled-name\", \"library-prints\", \"empty-method-body\", \"writes-a-mutable-constant\", \"value-called-as-function\" ]\nmisspelled_name\nTRUE\nwrites_a_mutable_constant\nFALSE",
     "output": "[ \"no-len-method\", \"q-returns-object\", \"no-aggressive-verbs\", \"engine-first\", \"q-has-plain-twin\", \"no-case-collision\", \"dead-knob\", \"setter-resets-on-reject\", \"setter-only-moves-one-way\", \"misspelled-name\", \"library-prints\", \"empty-method-body\", \"writes-a-mutable-constant\", \"value-called-as-function\" ]\nmisspelled_name\n1\nwrites_a_mutable_constant\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "# 1.\n# 2.\n# 3.\n# 4.\n# 5.",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "o1 = new stzList([ 1, 2, \"♥\", 4, 5, \"♥\", \"♥\" ])\n? o1.FindNthNext(2, \"♥\")",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-functions-as-linguistic-expressions.md",
    "stz-conditional-code-narration.md",
    "stzlist-in-strings-narration.md",
    "stzstring-vizfind-narration.md",
    "stz-function-forms-narration.md"
   ],
   "rulings": [
    "12.2",
    "12.14",
    "12.16",
    "12.17",
    "12.21"
   ],
   "doors": {
    "programmer": "Fourteen rules you can hold your own line against. Lift the value, ask in a scene, put the answer under `#-->`, name the parameter, chain one step per line, read the verb's form; and put a range, a condition or a palette in a string.",
    "analyst": "The words of your problem become the names of the steps. A rule written in a string is a rule you can store and read, and not code you must trust.",
    "designer": "The viz prefix draws the answer where the eye expects it. The goals are the headings under which a design is judged, one feature at a time.",
    "decision-maker": "Seven goals and thirty-three features are a reading grid. In the study's reading, a feature that serves none is refused, and a goal with no feature is a gap. The tally is printed with its losses.",
    "educator": "The discipline is taught whole and in order. The converted guard for lists in strings keeps the old promise's wrong spacing in a comment, which is a lesson on the cost of hand-typed answers.",
    "agent": "The rules are given to you as data on the site. For the code you write, the court is designed and not yet built. Write the question, then the promise under it, and put your condition in the seat, not in an evaluation of a string."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3816,
   "french": true,
   "text": "agents/ch7-the-writing-style-and-the-seven-goals.md",
   "run": {
    "ran": "2026-10-15 12:58 UTC+01:00",
    "kept": 9,
    "runnable": 9
   }
  },
  {
   "number": 8,
   "id": "functions-as-linguistic-expressions-and-scope",
   "title": "Functions as linguistic expressions, and scope",
   "slug": "ch8-functions-as-linguistic-expressions-and-scope",
   "kind": "chapter",
   "part": 2,
   "appendix": null,
   "law": null,
   "principle": "A function's name is a sentence, and its prefixes, suffixes and parameters are a grammar that the library can read.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "fourteen of the twenty-two forms, some with examples other than the article's, and three more in another shape; the library reading a name as a sentence; scope in the regex verbs, in the system and in the placement of a deployment",
    "designed": "the forms declared once as data and generated, in Haro; the scope paradigm for time, units, memory and style",
    "absent": "five forms: partial, future, free, default and multilingual; concurrency as a scope: a plan with no code"
   },
   "guards": [
    {
     "name": "00_regex_narrated",
     "exists": true,
     "path": "base/test/regex/00_regex_narrated.ring",
     "assertions": 28,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/regex/00_regex_narrated.ring"
    },
    {
     "name": "972_narration_viz-finding_a_recurring_substring",
     "exists": true,
     "path": "base/test/string/972_narration_viz-finding_a_recurring_substring.ring",
     "assertions": 7,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/string/972_narration_viz-finding_a_recurring_substring.ring"
    },
    {
     "name": "full_scope_model_narrated",
     "exists": true,
     "path": "base/test/system/full_scope_model_narrated.ring",
     "assertions": 62,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/full_scope_model_narrated.ring"
    },
    {
     "name": "system_scope_model_narrated",
     "exists": true,
     "path": "base/test/system/system_scope_model_narrated.ring",
     "assertions": 62,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/system_scope_model_narrated.ring"
    },
    {
     "name": "delivery_narrated",
     "exists": true,
     "path": "base/test/system/delivery_narrated.ring",
     "assertions": 34,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/delivery_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "o1 = new stzString(\"123456789HARO\")\n? o1.FindNextSTCS(\"haro\", 5, FALSE)\n#--> 10\no2 = new stzString(\"SOOooooFFfffTANNnnnZA\")\no2.RemoveManyCS([ \"o\", \"f\", \"n\" ], FALSE)\n? o2.Content()\n#--> STAZA",
     "promised": "10\nSTAZA",
     "output": "10\nSTAZA",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? @@( _StzParseName(\"FindNextSTCS\") )\n#--> [ \"find next\", [ \"case-sensitive\", \"from-position\", \"active\" ] ]\n? @@( _StzParseName(\"RemoveManyCS\") )\n#--> [ \"remove\", [ \"case-sensitive\", \"plural\", \"active\" ] ]\n? StzSelfDocQ(\"stzString\").ExplainMethod(\"RemoveMany\")\n#--> RemoveMany -- Remove every occurrence of each given substring (mutating).\n#-->   (plural form -- applies the operation to many items at once)\n#-->   reads as: remove -- over many values at once",
     "promised": "[ \"find next\", [ \"case-sensitive\", \"from-position\", \"active\" ] ]\n[ \"remove\", [ \"case-sensitive\", \"plural\", \"active\" ] ]\nRemoveMany -- Remove every occurrence of each given substring (mutating).\n(plural form -- applies the operation to many items at once)\nreads as: remove -- over many values at once",
     "output": "[ \"find next\", [ \"case-sensitive\", \"from-position\", \"active\" ] ]\n[ \"remove\", [ \"case-sensitive\", \"plural\", \"active\" ] ]\nRemoveMany -- Remove every occurrence of each given substring (mutating).\n  (plural form -- applies the operation to many items at once)\n  reads as: remove -- over many values at once",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzString(\"haro php haro ruby haro\")\n? @@( o1.FindZ(\"haro\") )\n#--> [ 1, 10, 20 ]\n? @@( o1.FindZZ(\"haro\") )\n#--> [ [ 1, 4 ], [ 10, 13 ], [ 20, 23 ] ]\no2 = new stzString(\"SOFTANZA\")\n? @@( o2.FirstHalfZ() )\n#--> [ \"SOFT\", 1 ]\n? @@( o2.FirstHalfZZ() )\n#--> [ \"SOFT\", [ 1, 4 ] ]",
     "promised": "[ 1, 10, 20 ]\n[ [ 1, 4 ], [ 10, 13 ], [ 20, 23 ] ]\n[ \"SOFT\", 1 ]\n[ \"SOFT\", [ 1, 4 ] ]",
     "output": "[ 1, 10, 20 ]\n[ [ 1, 4 ], [ 10, 13 ], [ 20, 23 ] ]\n[ \"SOFT\", 1 ]\n[ \"SOFT\", [ 1, 4 ] ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzString(\"fjharoljharodjharog\")\n? o1.vizFind(\"haro\")\n#--> fjharoljharodjharog\n#--> --^-----^-----^----\n? o1.vizFindXT(\"haro\", [ :Numbered = TRUE ])\n#--> fjharoljharodjharog\n#--> --^-----^-----^----\n#-->   3     9     15",
     "promised": "fjharoljharodjharog\n--^-----^-----^----\nfjharoljharodjharog\n--^-----^-----^----\n3     9     15",
     "output": "fjharoljharodjharog\n--^-----^-----^----\nfjharoljharodjharog\n--^-----^-----^----\n  3     9     15",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "Q(\"__H~~~AR***O__\") {\n\t? @@( FindMany([ \"~\", \"*\" ]) )\n\t#--> [ 4, 5, 6, 9, 10, 11 ]\n\tRemoveMany([ \"_\", \"~\", \"*\" ])\n\t? Content()\n\t#--> HARO\n}\no2 = new stzString(\"--Haro--&__Softanza__\")\no2.RemoveAllExcept([ \"Haro\", \"&\", \"Softanza\" ])\n? o2.Content()\n#--> Haro&Softanza",
     "promised": "[ 4, 5, 6, 9, 10, 11 ]\nHARO\nHaro&Softanza",
     "output": "[ 4, 5, 6, 9, 10, 11 ]\nHARO\nHaro&Softanza",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Q(\"*\").IsNotLetter()\n#--> TRUE\no3 = new stzList([ \"H\", \"A\", \"R\", \"O\" ])\n? o3.IsNotAString()\n#--> TRUE\n? o3.DoesNotContain(\"♥\")\n#--> TRUE",
     "promised": "TRUE\nTRUE\nTRUE",
     "output": "1\n1\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "Q([ \"you\", \"other\", [ \"other\", \"you\", [ \"you\" ], \"other\" ], \"other\", \"you\" ]) {\n\t? @@( DeepFind(\"you\") )\n\t#--> [ [ 1 ], [ 3, 2 ], [ 3, 3, 1 ], [ 5 ] ]\n\tDeepReplace(\"you\", :By = \"♥\")\n\t? @@( Content() )\n\t#--> [ \"♥\", \"other\", [ \"other\", \"♥\", [ \"♥\" ], \"other\" ], \"other\", \"♥\" ]\n}",
     "promised": "[ [ 1 ], [ 3, 2 ], [ 3, 3, 1 ], [ 5 ] ]\n[ \"♥\", \"other\", [ \"other\", \"♥\", [ \"♥\" ], \"other\" ], \"other\", \"♥\" ]",
     "output": "[ [ 1 ], [ 3, 2 ], [ 3, 3, 1 ], [ 5 ] ]\n[ \"♥\", \"other\", [ \"other\", \"♥\", [ \"♥\" ], \"other\" ], \"other\", \"♥\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzString(\"haxxrxo\")\n? o1.RemoveQC(\"x\").UppercaseQ().Spacified()\n#--> H A R O\n? o1.Content()\n#--> haxxrxo",
     "promised": "H A R O\nhaxxrxo",
     "output": "H A R O\nhaxxrxo",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Q(\"   Haro \").WithoutSapces()\n#--> Haro",
     "promised": "Haro",
     "output": "Haro",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cText = \"First: Line1\" + nl + \"Second: Line2\" + nl + \"Third: Line3\"\no1 = new stzRegex(\"^Second:.*$\")\no1 {\n\t? Match(cText)\n\t#--> FALSE\n\t? MatchFirst(cText)\n\t#--> FALSE\n\t? MatchLine(cText)\n\t#--> TRUE\n}",
     "promised": "FALSE\nFALSE\nTRUE",
     "output": "0\n0\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o2 = new stzRegex(\"pre\\w+\")\n? o2.MatchFirst(\"compress\")\n#--> TRUE\no3 = new stzRegex(\"pre\\w+\")\n? o3.MatchWord(\"compress\")\n#--> FALSE",
     "promised": "TRUE\nFALSE",
     "output": "1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oSol = new stzPlatformProfile(\"my-iot-product\")\noSol {\n\tDevelopedOn(:Windows)\n\tWithServer(:backend, :LinuxServer)\n\tWithApp(:firmware, :ESP32)\n\toBack = App(:backend).System()\n\toFirm = App(:firmware).System()\n}\n? oBack.Spawn(\"worker\")\n#--> native\n? oFirm.ReadPin(4)\n#--> rehearsed\ntry\n\toFirm.Spawn(\"worker\")\ncatch\n\t? cCatchError\ndone\n#--> scope 'esp32' (espidf) forbids 'process' -- spawn 'worker'. This target has no such capability.",
     "promised": "native\nrehearsed\nscope 'esp32' (espidf) forbids 'process' -- spawn 'worker'. This target has no such capability.",
     "output": "native\nrehearsed\nscope 'esp32' (espidf) forbids 'process' -- spawn 'worker'. This target has no such capability.",
     "verdict": "kept",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "oEsp = DeclareSystem(\"esp32-firmware\")\noEsp.SetOSName(:rtos)\noEsp.SetCapabilityList([ :gpio, :network, :clock, :threads ])\noBox = DeclareSystem(\"laptop\")\noBox.SetOSName(:windows)\noBox.SetCapabilityList([ :filesystem, :process, :network, :clock, :threads ])\n? @@( oBox.Forbids(oEsp) )\n#--> [ \"filesystem\", \"process\" ]\n? @@( oBox.Requires(oEsp) )\n#--> [ \"gpio\" ]",
     "promised": "[ \"filesystem\", \"process\" ]\n[ \"gpio\" ]",
     "output": "[ \"filesystem\", \"process\" ]\n[ \"gpio\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o2 = new stzString(\"SOOooooFFfffTANNnnnZA\")\no2.RemoveManyCS([ \"o\", \"f\", \"n\" ], TRUE)\n? o2.Content()",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-functions-as-linguistic-expressions.md",
    "stz-function-forms-narration.md",
    "stz-system-dev-to-deploy-narration.md"
   ],
   "rulings": [
    "12.3",
    "12.13",
    "12.19",
    "12.21"
   ],
   "doors": {
    "programmer": "Read a name as a sentence: its suffixes are its parameters, in order.",
    "analyst": "A position can come as a number or as a section; a name says which.",
    "designer": "The prefix changes the kind of answer: viz draws it.",
    "decision-maker": "A scope is chosen in the verb, so the frame is visible where the call is made, and a review can see it.",
    "educator": "The library parses a name into its sentence, so a learner can ask it what a method says.",
    "agent": "Write the scope in the verb. A call that names a scope is not moved to another frame by a flag set elsewhere."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 2947,
   "french": true,
   "text": "agents/ch8-functions-as-linguistic-expressions-and-scope.md",
   "run": {
    "ran": "2026-10-15 12:58 UTC+01:00",
    "kept": 13,
    "runnable": 13
   }
  },
  {
   "number": 9,
   "id": "patterns-of-thought",
   "title": "Patterns of thought: the Softanzuter, Reaxis and the engines",
   "slug": "ch9-patterns-of-thought",
   "kind": "chapter",
   "part": 2,
   "appendix": null,
   "law": null,
   "principle": "a Softanzuter is a computational representation of a thinking machine, based on one or many Regexuters, enabling it to identify and react to patterns of thought.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "the Regexuter and the Listexuter, reacting with a state that remembers; Reaxis, reactive programming in plain words, on the engine's event loop; the timeline, the grid and deep operations; the AI agent whose skills cascade to a fixpoint",
    "designed": "the Softanzuter proper, many faculties sharing one state and cascading until it settles; the universal engine behind it; its four siblings, analyser, genetic, linguistic and quantic",
    "absent": "a dependency chain that links one trigger to another; a section-merging verb the article presents as its point"
   },
   "guards": [
    {
     "name": "00_overflow_narrated",
     "exists": true,
     "path": "base/test/reactivestream/00_overflow_narrated.ring",
     "assertions": 17,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/reactivestream/00_overflow_narrated.ring"
    },
    {
     "name": "60_reaxis_on_reactor_narrated",
     "exists": true,
     "path": "base/test/reactive/60_reaxis_on_reactor_narrated.ring",
     "assertions": 9,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/reactive/60_reaxis_on_reactor_narrated.ring"
    },
    {
     "name": "piagent_narrated",
     "exists": true,
     "path": "base/test/agentic/piagent_narrated.ring",
     "assertions": 14,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/agentic/piagent_narrated.ring"
    },
    {
     "name": "00_grid_narrated",
     "exists": true,
     "path": "base/test/grid/00_grid_narrated.ring",
     "assertions": 24,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/grid/00_grid_narrated.ring"
    },
    {
     "name": "test_timeline_regression",
     "exists": true,
     "path": "base/test/timeline/test_timeline_regression.ring",
     "assertions": 20,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/timeline/test_timeline_regression.ring"
    },
    {
     "name": "01_deeplist_narrated",
     "exists": true,
     "path": "base/test/list/01_deeplist_narrated.ring",
     "assertions": 16,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/list/01_deeplist_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "rxu() {\n\tTrigger(:SensitiveData = \"(password|secret|key):\\s*(\\w+)\")\n\t@C(:When = :SensitiveData, :Do = '{ @value = \"REDACTED-\" + len(@value) }')\n\tProcess(\"User credentials: password: abc123 secret: def456\")\n\t? @@( Results() )\n\t#--> [ \"REDACTED-16\", \"REDACTED-14\" ]\n\t? @@( Positions() )\n\t#--> [ 19, 36 ]\n\t? State()[1][:matchedvalue]\n\t#--> password: abc123\n\t? State()[1][:computedvalue]\n\t#--> REDACTED-16\n\t? @@( State()[2][:dependson] )\n\t#--> [ \"sensitivedata\" ]\n}",
     "promised": "[ \"REDACTED-16\", \"REDACTED-14\" ]\n[ 19, 36 ]\npassword: abc123\nREDACTED-16\n[ \"sensitivedata\" ]",
     "output": "[ \"REDACTED-16\", \"REDACTED-14\" ]\n[ 19, 36 ]\npassword: abc123\nREDACTED-16\n[ \"sensitivedata\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "rxu() {\n\tTrigger(:Number = \"\\d+\")\n\tTrigger(:Big = \"\\d{3,}\")\n\t@C(:When = :Number, :Do = '{ @value = @number(@value) * 100 }')\n\t@C(:When = :Big, :Do = '{ @value = \"BIG\" }')\n\tProcess(\"Found 7 items\")\n\t? @@( Matches() )\n\t#--> [ \"7\" ]\n\t? @@( Results() )\n\t#--> [ 700 ]\n\t? @@( Triggers() )\n\t#--> [ \"number\" ]\n}",
     "promised": "[ \"7\" ]\n[ 700 ]\n[ \"number\" ]",
     "output": "[ \"7\" ]\n[ 700 ]\n[ \"number\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oAgent = new stzPIAgent(\"cook\")\noAgent.MemoryQ().Learn(\"order\", \"state\", \"placed\")\ns1 = new stzAgentSkill(\"cook\")\ns1.SetWhen(func oM { return oM.Fact(\"order\", \"state\", \"placed\") })\ns1.SetDoes(func oM { oM.Forget(\"order\",\"state\",\"placed\") oM.Learn(\"order\",\"state\",\"cooking\") return 1 })\ns2 = new stzAgentSkill(\"serve\")\ns2.SetWhen(func oM { return oM.Fact(\"order\", \"state\", \"cooking\") })\ns2.SetDoes(func oM { oM.Forget(\"order\",\"state\",\"cooking\") oM.Learn(\"order\",\"state\",\"served\") return 1 })\noAgent.AddSkill(s1)\noAgent.AddSkill(s2)\n? oAgent.Pursue()\n#--> 2\n? oAgent.MemoryQ().Fact(\"order\", \"state\", \"served\")\n#--> TRUE\n? oAgent.Pursue()\n#--> 0",
     "promised": "2\nTRUE\n0",
     "output": "2\n1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "aSeen = []\nRs = new stzReactiveSystem()\nRs {\n\toStream = CreateStream(\"prices\")\n\toStream {\n\t\tTransform(func price { return price * 1.20 })\n\t\tFilter(func price { return price >= 100 })\n\t\tOnPassed(func item { aSeen + item })\n\t\tFeedMany([ 80, 90, 100, 120 ])\n\t}\n\tRunLoop()\n}\n? @@( aSeen )\n#--> [ 108, 120, 144 ]",
     "promised": "[ 108, 120, 144 ]",
     "output": "[ 108, 120, 144 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oRs = new stzReactiveSystem()\noS = oRs.CreateStream(\"probe\")\noS {\n\tSetOverflowStrategy(BUFFER_REJECT_NEWEST, 2)\n\tfor i = 1 to 4\n\t\tReceive(i)\n\tnext\n\t? OverflowStats()[:currentBuffer]\n\t#--> 2\n\t? OverflowStats()[:droppedCount]\n\t#--> 2\n}",
     "promised": "2\n2",
     "output": "2\n2",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "nSettled = 0\noRs4 = new stzReactive()\noX = oRs4.ReactiveObject()\noX.WaitForAttributeToSettle(\"query\", 50, func(attr, oldV, newV) { nSettled++ })\noX.SetAttribute(\"query\", \"s\")\noX.SetAttribute(\"query\", \"so\")\noX.SetAttribute(\"query\", \"sof\")\noX { ProcessPendingReactions() }\noRs4.RunLoop()\n? nSettled\n#--> 1\noRs4.Stop()",
     "promised": "1",
     "output": "1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oTl = new stzTimeLine(\"2024-01-01 00:00:00\", \"2024-12-31 23:59:59\")\noTl {\n\tAddSpan(\"PHASE1\", \"2024-01-01 00:00:00\", \"2024-02-15 23:59:59\")\n\tAddSpan(\"PHASE2\", \"2024-03-01 00:00:00\", \"2024-04-15 23:59:59\")\n\t? len(Gaps())\n\t#--> 1\n\t? Gaps()[1][:after]\n\t#--> PHASE1\n\t? Gaps()[1][:before]\n\t#--> PHASE2\n\t? HasOverlaps()\n\t#--> FALSE\n\tAddSpan(\"PHASE2B\", \"2024-04-01 00:00:00\", \"2024-05-15 23:59:59\")\n\t? HasOverlaps()\n\t#--> TRUE\n}\noB = new stzTimeLine(\"2024-01-01\", \"2024-12-31\")\noB {\n\tAddBlockedSpan(\"MAINTENANCE\", \"2024-06-15 09:00:00\", \"2024-06-15 17:00:00\")\n\tAddPoint(\"EVENT1\", \"2024-06-15 08:00:00\")\n\ttry\n\t\tAddPoint(\"EVENT2\", \"2024-06-15 12:00:00\")\n\tcatch\n\t\t? cCatchError\n\tdone\n\t#--> Point 'EVENT2' falls within a blocked span or blocked point\n}",
     "promised": "1\nPHASE1\nPHASE2\nFALSE\nTRUE\nPoint 'EVENT2' falls within a blocked span or blocked point",
     "output": "1\nPHASE1\nPHASE2\n0\n1\nPoint 'EVENT2' falls within a blocked span or blocked point",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzGridQ([ 5, 5 ]) {\n\tMoveDown()\n\tMoveDown()\n\tMoveRight()\n\tMoveRight()\n\tMoveRight()\n\t? @@( CurrentPosition() )\n\t#--> [ 4, 3 ]\n\tMoveRight()\n\tMoveRight()\n\tMoveRight()\n\t? @@( CurrentPosition() )\n\t#--> [ 5, 3 ]\n}",
     "promised": "[ 4, 3 ]\n[ 5, 3 ]",
     "output": "[ 4, 3 ]\n[ 5, 3 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "rxu() {\n\tTrigger(:Big = \"\\d{3,}\")\n\tTrigger(:Number = \"\\d+\")\n\t@C(:When = :Number, :Do = '{ @value = @number(@value) * 100 }')\n\t@C(:When = :Big, :Do = '{ @value = \"BIG\" }')\n\tProcess(\"Found 7 items\")\n\t? @@( Matches() )\n\t? @@( Results() )\n\t? @@( Triggers() )\n}",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stzregexuter-regex-as-computational-reactive-medium.md",
    "stz-reaxis-reactive-programming-narration.md",
    "stz-managing-deep-lists-narration.md",
    "softanza-reactive-objects-narration.md"
   ],
   "rulings": [
    "12.4",
    "12.18",
    "12.19"
   ],
   "doors": {
    "programmer": "Bind a pattern to code, and process; or declare a stream and say in words what happens to the data that flows through it.",
    "analyst": "Time is a workspace: gaps, overlaps and blocked regions are computed, and a point that would fall in a blocked region is refused with the reason.",
    "designer": "The state of a reaction that changes a value keeps its why: the match, the computed value, the position, the trigger.",
    "decision-maker": "Overflow is a number you can read: kept, dropped. A strategy that lost data and said nothing was found by an audit, and fixed.",
    "educator": "The ladder is a curriculum: a pattern, a reaction, a state, a goal.",
    "agent": "Your mind can be skills that chain on what they perceive, until the world stops changing."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 2741,
   "french": true,
   "text": "agents/ch9-patterns-of-thought.md",
   "run": {
    "ran": "2026-10-15 12:58 UTC+01:00",
    "kept": 8,
    "runnable": 8
   }
  },
  {
   "number": 10,
   "id": "programming-becomes-refinement",
   "title": "Programming becomes refinement",
   "slug": "ch10-programming-becomes-refinement",
   "kind": "chapter",
   "part": 2,
   "appendix": null,
   "law": null,
   "principle": "stop trying to govern the intelligence, and govern the change.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "the refinement point declared in the source; the gate with five checks; the cascade of a point and of a class; reversal by step, by checkpoint and to zero; the trust floor and governed refining",
    "designed": "the experience the article describes: asking a point to explain itself, applying a plan, a one-line refinement; the cascade of the code graph joined to the gate; the refinement seat of Haro",
    "absent": "a saved history: the file keeps the source and nothing of the timeline"
   },
   "guards": [
    {
     "name": "refinablecode_narrated",
     "exists": true,
     "path": "base/test/refine/refinablecode_narrated.ring",
     "assertions": 17,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/refine/refinablecode_narrated.ring"
    },
    {
     "name": "refine_deepening_narrated",
     "exists": true,
     "path": "base/test/refine/refine_deepening_narrated.ring",
     "assertions": 24,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/refine/refine_deepening_narrated.ring"
    },
    {
     "name": "gate_deepening_narrated",
     "exists": true,
     "path": "base/test/refine/gate_deepening_narrated.ring",
     "assertions": 19,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/refine/gate_deepening_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "cSrc = 'vat_rate = <R:PARAM name=\"vat\" value=\"0.20\" min=\"0\" max=\"0.25\">' + nl +\n       'sort_by  = <R:ALGO name=\"sort\" value=\"quick\" options=\"quick|merge|heap\">'\no = new stzRefinableCode(cSrc)\no {\n\t? NumberOfPoints()\n\t#--> 2\n\t? @@( RefinementPoints() )\n\t#--> [ [ \"vat\", \"param\", \"0.20\" ], [ \"sort\", \"algo\", \"quick\" ] ]\n\t? KindOf(\"vat\")\n\t#--> param\n}",
     "promised": "2\n[ [ \"vat\", \"param\", \"0.20\" ], [ \"sort\", \"algo\", \"quick\" ] ]\nparam",
     "output": "2\n[ [ \"vat\", \"param\", \"0.20\" ], [ \"sort\", \"algo\", \"quick\" ] ]\nparam",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o {\n\tr = Refine(\"vat\").To(\"0.22\")\n\t? r[:admitted]\n\t#--> 1\n\t? ValueOf(\"vat\")\n\t#--> 0.22\n\t? NumberOfSteps()\n\t#--> 1\n}",
     "promised": "1\n0.22\n1",
     "output": "1\n0.22\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o {\n\tr2 = Refine(\"vat\").To(\"0.99\")\n\t? r2[:admitted]\n\t#--> 0\n\t? r2[:why]\n\t#--> constraint: 0.99 above max 0.25\n\t? ValueOf(\"vat\")\n\t#--> 0.22\n\t? Refine(\"sort\").To(\"bubble\")[:why]\n\t#--> constraint: 'bubble' not in options quick|merge|heap\n\t? Refine(\"ghost\").To(\"1\")[:why]\n\t#--> structural: no refinement point 'ghost'\n\t? NumberOfSteps()\n\t#--> 1\n}",
     "promised": "0\nconstraint: 0.99 above max 0.25\n0.22\nconstraint: 'bubble' not in options quick|merge|heap\nstructural: no refinement point 'ghost'\n1",
     "output": "0\nconstraint: 0.99 above max 0.25\n0.22\nconstraint: 'bubble' not in options quick|merge|heap\nstructural: no refinement point 'ghost'\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cPrice = 'price = <R:PARAM name=\"vat\" value=\"0.20\" min=\"0\" max=\"0.30\"> * <R:PARAM name=\"margin\" value=\"1.1\" min=\"1\" max=\"2\">' + nl +\n         'floor = <R:PARAM name=\"floor\" value=\"0.10\" min=\"0\" max=\"0.30\">'\noc = new stzRefinableCode(cPrice)\noc {\n\taC = Cascade(\"vat\")\n\t? aC[:lines][1]\n\t#--> 1\n\t? @@( aC[:alsoTouches] )\n\t#--> [ \"margin\" ]\n\t? Cascade(\"floor\")[:lines][1]\n\t#--> 2\n\t? len(Cascade(\"floor\")[:alsoTouches])\n\t#--> 0\n}",
     "promised": "1\n[ \"margin\" ]\n2\n0",
     "output": "1\n[ \"margin\" ]\n2\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cCls = 'class Tariff' + nl +\n       '\tdef Rate()' + nl +\n       '\t\treturn 0.20' + nl +\n       'class Invoice from Tariff' + nl +\n       '\tdef Total()' + nl +\n       '\t\treturn 1' + nl +\n       'class Receipt from Invoice' + nl +\n       '\tdef Print()' + nl +\n       '\t\treturn 1' + nl +\n       'class Quote from Tariff' + nl +\n       '\tdef Rate()' + nl +\n       '\t\treturn 0.18' + nl\ng0 = new stzRingCodeGraph(\"\")\ng0 {\n\tScanSource(cCls, \"world.ring\")\n\tBuildGraph()\n\t? @@( Cascade(\"Tariff\")[:descendants] )\n\t#--> [ \"Invoice\", \"Quote\", \"Receipt\" ]\n\t? Cascade(\"Tariff\")[:blastRadius]\n\t#--> 3\n\t? @@( ImpactOf(\"Rate\")[:inheritedBy] )\n\t#--> [ \"Invoice\", \"Receipt\" ]\n}",
     "promised": "[ \"Invoice\", \"Quote\", \"Receipt\" ]\n3\n[ \"Invoice\", \"Receipt\" ]",
     "output": "[ \"Invoice\", \"Quote\", \"Receipt\" ]\n3\n[ \"Invoice\", \"Receipt\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "d = new stzRefinableCode(cPrice)\nd {\n\tDeclareDerivation(\"vat-above-floor\",\n\t\tfunc oCode { return ring_number(oCode.ValueOf(\"vat\")) >= ring_number(oCode.ValueOf(\"floor\")) },\n\t\t\"vat must not drop below floor\")\n\t? Refine(\"vat\").To(\"0.30\")[:admitted]\n\t#--> 1\n\tr3 = Refine(\"vat\").To(\"0.05\")\n\t? r3[:admitted]\n\t#--> 0\n\t? r3[:why]\n\t#--> derivation: rule 'vat-above-floor' violated -- vat must not drop below floor\n\t? ValueOf(\"vat\")\n\t#--> 0.30\n}",
     "promised": "1\n0\nderivation: rule 'vat-above-floor' violated -- vat must not drop below floor\n0.30",
     "output": "1\n0\nderivation: rule 'vat-above-floor' violated -- vat must not drop below floor\n0.30",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "d {\n\tTrustFloor(\"vat\", :trusted)\n\tr4 = Refine(\"vat\").As(:llm).To(\"0.25\")\n\t? r4[:admitted]\n\t#--> 0\n\t? r4[:why]\n\t#--> trust: posture :llm below the required floor for 'vat'\n\t? ValueOf(\"vat\")\n\t#--> 0.30\n\t? Refine(\"vat\").As(:trusted).To(\"0.25\")[:admitted]\n\t#--> 1\n\t? PostureOf(NumberOfSteps())\n\t#--> trusted\n}",
     "promised": "0\ntrust: posture :llm below the required floor for 'vat'\n0.30\n1\ntrusted",
     "output": "0\ntrust: posture :llm below the required floor for 'vat'\n0.30\n1\ntrusted",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "gv = new stzRefinableCode(cPrice)\ngv {\n\tSetGovernedBy(new stzGovernance(\"release-ops\"))\n\tSetActor(\"release-bot\")\n\tSetRiskFor(\"vat\", 3)\n\tSetAllowRefine(\"vat\")\n\tSetAuthorityLevel(:Delegated)\n\tr5 = Refine(\"vat\").To(\"0.22\")\n\t? r5[:admitted]\n\t#--> 0\n\t? r5[:why]\n\t#--> governance: refused: 'release-bot' holds 'delegated' authority (level 2) but 'refine-vat' is risk tier 3 (SHOULD does not cover it)\n\t? ValueOf(\"vat\")\n\t#--> 0.20\n\tSetAuthorityLevel(:Autonomous)\n\t? Refine(\"vat\").To(\"0.22\")[:admitted]\n\t#--> 1\n\t? GovernanceQ().NumberOfDecisions()\n\t#--> 1\n}",
     "promised": "0\ngovernance: refused: 'release-bot' holds 'delegated' authority (level 2) but 'refine-vat' is risk tier 3 (SHOULD does not cover it)\n0.20\n1\n1",
     "output": "0\ngovernance: refused: 'release-bot' holds 'delegated' authority (level 2) but 'refine-vat' is risk tier 3 (SHOULD does not cover it)\n0.20\n1\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "t = new stzRefinableCode(cPrice)\nt {\n\tRefine(\"vat\").To(\"0.21\")\n\tRefine(\"vat\").To(\"0.22\")\n\tCheckpoint(\"reviewed\")\n\tRefine(\"vat\").To(\"0.28\")\n\t? ValueOf(\"vat\")\n\t#--> 0.28\n\tRevertToCheckpoint(\"reviewed\")\n\t? ValueOf(\"vat\")\n\t#--> 0.22\n\t? NumberOfSteps()\n\t#--> 2\n\tRevertTo(0)\n\t? ValueOf(\"vat\")\n\t#--> 0.20\n\t? CanRevert()\n\t#--> 0\n\tRedo()\n\t? ValueOf(\"vat\")\n\t#--> 0.21\n}",
     "promised": "0.28\n0.22\n2\n0.20\n0\n0.21",
     "output": "0.28\n0.22\n2\n0.20\n0\n0.21",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "d.TrustFloor(\"vat\", :trusted)\nr4 = d.Refine(\"vat\").As(:yourorigin).To(\"0.25\")\n? r4[:admitted]",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stzpolycode-refinement-centered_programming.md"
   ],
   "rulings": [
    "12.19",
    "12.23",
    "12.29"
   ],
   "doors": {
    "programmer": "Declare the places that may change, and propose changes to them as typed proposals. A refusal names its stage.",
    "analyst": "The rule that spans several points is yours to declare, and the gate judges it on the state the change would produce.",
    "designer": "The cascade is what you read instead of the diff: for a point, which line and which points on it; for a class, which classes inherit. They are two cascades, not yet one.",
    "decision-maker": "Who may turn which knob is a permission and an authority against a risk tier, and the decision is recorded with its authority at the time.",
    "educator": "Step back one, rewind to a named checkpoint, rewind to zero, go forward again. A learner can try without fear because every step keeps its prior value.",
    "agent": "You may propose. Your origin is on the proposal, and a point can set a floor your origin does not clear."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 2389,
   "french": true,
   "text": "agents/ch10-programming-becomes-refinement.md",
   "run": {
    "ran": "2026-10-15 12:58 UTC+01:00",
    "kept": 9,
    "runnable": 9
   }
  },
  {
   "number": 11,
   "id": "law-a-language-is-declared-and-closed",
   "title": "Law: a language is declared and closed, and whatever speaks it, person or model, is judged by it",
   "slug": "ch11-law-a-language-is-declared-and-closed",
   "kind": "chapter",
   "part": 3,
   "appendix": null,
   "law": "a language is declared and closed, and whatever speaks it, person or model, is judged by it",
   "principle": "A language is declared and closed, and whatever speaks it, a person or a model, is judged by it.",
   "spine": true,
   "status": "draft",
   "stage": {
    "built": "the natural layer's vocabulary as data in five languages, with its refusals; the court of structured output, its grammar compiler and its sampler; the pattern languages, which accept a word they do not know",
    "designed": "the forge that produces a language's parser, court and grammar from its declaration alone; a grammar emitted for every declared language; the writing style as a declared grammar",
    "absent": "a natural layer closed all the way down: one form of list still reaches host code; pattern classes that refuse a word they do not know; the standard Hausa letter ɗ in the Hausa pack"
   },
   "guards": [
    {
     "name": "multilingual_pack_narrated",
     "exists": true,
     "path": "base/test/natural/multilingual_pack_narrated.ring",
     "assertions": 45,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/multilingual_pack_narrated.ring"
    },
    {
     "name": "semantic_resolver_narrated",
     "exists": true,
     "path": "base/test/natural/semantic_resolver_narrated.ring",
     "assertions": 83,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/semantic_resolver_narrated.ring"
    },
    {
     "name": "literate_templates_narrated",
     "exists": true,
     "path": "base/test/natural/literate_templates_narrated.ring",
     "assertions": 10,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/literate_templates_narrated.ring"
    },
    {
     "name": "question_narrated",
     "exists": true,
     "path": "base/test/natural/question_narrated.ring",
     "assertions": 21,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/question_narrated.ring"
    },
    {
     "name": "structuredoutput_narrated",
     "exists": true,
     "path": "base/test/neural/structuredoutput_narrated.ring",
     "assertions": 73,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/neural/structuredoutput_narrated.ring"
    },
    {
     "name": "schema_grammar_narrated",
     "exists": true,
     "path": "base/test/neural/schema_grammar_narrated.ring",
     "assertions": 28,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/neural/schema_grammar_narrated.ring"
    },
    {
     "name": "constrained_decoding_narrated",
     "exists": true,
     "path": "base/test/neural/constrained_decoding_narrated.ring",
     "assertions": 50,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/neural/constrained_decoding_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "Naturally(\"\n    Make a string with 'hello niger' inside\n    Spacify it and uppercase it\n    @Box it while the box@ is rounded\n    Display it on the screen\n\")\n#--> ╭───────────────────────╮\n#    │ H E L L O   N I G E R │\n#    ╰───────────────────────╯",
     "promised": "╭───────────────────────╮\n│ H E L L O   N I G E R │\n╰───────────────────────╯",
     "output": "╭───────────────────────╮\n│ H E L L O   N I G E R │\n╰───────────────────────╯",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Naturally(\"Create a string with 'hello' and uppercase it\").Result()\n#--> HELLO\n? NaturallyIn(\"hausa\", \"Yi rubutu dauke 'hello' Maida shi\").Result()\n#--> HELLO\n? NaturallyIn(\"fr\", \"Crée une chaine avec 'hello' et mets la en majuscules\").Result()\n#--> HELLO\n? NaturallyIn(\"ar\", \"أنشئ نصا بـ 'hello' ثم كبّره\").Result()\n#--> HELLO",
     "promised": "HELLO\nHELLO\nHELLO\nHELLO",
     "output": "HELLO\nHELLO\nHELLO\nHELLO",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = NaturallyIn(\"ar\", \"أنشئ قائمة بـ [ 5, 3, 5 ] ثم أزل تكراراتها\")\n? @@( o1.Result() )\n#--> [ 5, 3 ]\n? o1.Understood()\n#--> أنشئ قائمة بـ [ 5, 3, 5 ] -> أزل التكرارات",
     "promised": "[ 5, 3 ]\nأنشئ قائمة بـ [ 5, 3, 5 ] -> أزل التكرارات",
     "output": "[ 5, 3 ]\nأنشئ قائمة بـ [ 5, 3, 5 ] -> أزل التكرارات",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = Naturally(\"Create a string with 'softanza' Uppercse it\")\n? o1.Result()\n#--> softanza\n? @@( o1.Unresolved() )\n#--> [ [ \"Uppercse\", \"uppercase\" ] ]\n? o1.UnderstoodAll()\n#--> 0",
     "promised": "softanza\n[ [ \"Uppercse\", \"uppercase\" ] ]\n0",
     "output": "softanza\n[ [ \"Uppercse\", \"uppercase\" ] ]\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "try\n\tNaturallyStrict(\"Create a string with 'x' Fooify it\")\ncatch\n\t? cCatchError\ndone\n#--> Strict natural mode: not understood: 'Fooify' (did you mean 'boxify'?)\ntry\n\tNaturallyStrictIn(\"en\", \"Create a list with [ 3, 1 ] Reverse it\", [ \"METHOD_REMOVEDUPLICATES\" ])\ncatch\n\t? cCatchError\ndone\n#--> Operation not permitted in this world: METHOD_REVERSE",
     "promised": "Strict natural mode: not understood: 'Fooify' (did you mean 'boxify'?)\nOperation not permitted in this world: METHOD_REVERSE",
     "output": "Strict natural mode: not understood: 'Fooify' (did you mean 'boxify'?)\n\nOperation not permitted in this world: METHOD_REVERSE",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? IsQ().TheQ().LengthQ().OfQ(\"softanza\").LessThanQ().TheQ().LengthQ().Of(\"Haro\")\n#--> 0\n? Why()\n#--> no: 8 is not less than 4",
     "promised": "0\nno: 8 is not less than 4",
     "output": "0\nno: 8 is not less than 4",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "try\n\tStzOutputSchemaQ([ [ :field = \"x\", :type = :colour ] ])\ncatch\n\t? cCatchError\ndone\n#--> stzOutputSchema: unknown field type 'colour' (use string|number|boolean|oneof|list|structure).",
     "promised": "stzOutputSchema: unknown field type 'colour' (use string|number|boolean|oneof|list|structure).",
     "output": "stzOutputSchema: unknown field type 'colour' (use string|number|boolean|oneof|list|structure).",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzOutputSchemaQ([\n\t[ :field = \"name\", :type = :string ],\n\t[ :field = \"age\",  :type = :number, :must = [ [ \">=\", 0 ], [ \"<=\", 130 ] ] ],\n\t[ :field = \"mood\", :type = :oneof,  :choices = [ \"positive\", \"negative\" ] ]\n]) {\n\t? Accepts(\"name: Hadiza\" + nl + \"age: 41\" + nl + \"mood: positive\")\n\t#--> 1\n\t? Accepts(\"name: Hadiza\" + nl + \"age: 41\" + nl + \"mood: angry\")\n\t#--> 0\n\t? Accepts(\"name: Hadiza\" + nl + \"age: 900000\" + nl + \"mood: positive\")\n\t#--> 0\n\t? Accepts(\"name: Hadiza\" + nl + \"age: 62\" + nl + \"mood: positive\")\n\t#--> 1\n\t? ToGBNF()\n\t#--> root ::= name-line age-line mood-line\n\t#    name-line ::= \"name: \" text \"\\n\"\n\t#    age-line ::= \"age: \" number \"\\n\"\n\t#    mood-line ::= \"mood: \" (\"positive\" | \"negative\") \"\\n\"\n\t#    text ::= [^\\n]+\n\t#    number ::= \"-\"? [0-9]+ (\".\" [0-9]+)?\n\t#    boolean ::= (\"yes\" | \"no\" | \"true\" | \"false\")\n}",
     "promised": "1\n0\n0\n1\nroot ::= name-line age-line mood-line\nname-line ::= \"name: \" text \"\\n\"\nage-line ::= \"age: \" number \"\\n\"\nmood-line ::= \"mood: \" (\"positive\" | \"negative\") \"\\n\"\ntext ::= [^\\n]+\nnumber ::= \"-\"? [0-9]+ (\".\" [0-9]+)?\nboolean ::= (\"yes\" | \"no\" | \"true\" | \"false\")",
     "output": "1\n0\n0\n1\nroot ::= name-line age-line mood-line\nname-line ::= \"name: \" text \"\\n\"\nage-line ::= \"age: \" number \"\\n\"\nmood-line ::= \"mood: \" (\"positive\" | \"negative\") \"\\n\"\ntext ::= [^\\n]+\nnumber ::= \"-\"? [0-9]+ (\".\" [0-9]+)?\nboolean ::= (\"yes\" | \"no\" | \"true\" | \"false\")",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "try\n\tNaturallyWith(\"Create a string with {#1} and {#2} it\", [ \"x\" ])\ncatch\n\t? cCatchError\ndone\n#--> Unfilled template hole! The narration still contains a {#n} slot with no value for it.",
     "promised": "Unfilled template hole! The narration still contains a {#n} slot with no value for it.",
     "output": "Unfilled template hole! The narration still contains a {#n} slot with no value for it.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Lx(\"[@N, @S]\").Match([42, \"hello\"])\n#--> 1\n? Lx(\"[@N, @S]\").Match([\"hello\", 42])\n#--> 0\n? Lx(\"[@N, [@N2], @N]\").Match([1, [2, 3], 4])\n#--> 1\n? Lx(\"[@N, [@N2], @N]\").Match([1, [2], 4])\n#--> 0",
     "promised": "1\n0\n1\n0",
     "output": "1\n0\n1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? @@( Naturally(\"Create a list with [ upper('x'), 1 ] and remove its duplicates\").Result() )\n#--> [ \"X\", 1 ]",
     "promised": "[ \"X\", 1 ]",
     "output": "[ \"X\", 1 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? @@( Naturally(\"Create a list with [ lower('X'), 1 ] and remove its duplicates\").Result() )",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stznatural-vs-ring-naturallib.md",
    "stz-near-natural-language-programming.md",
    "stz-bridging-minds-and-code.md",
    "stzlistex-pattern-matching-for-lists.md"
   ],
   "rulings": [
    "12.4",
    "12.10",
    "12.16",
    "12.19",
    "12.21",
    "12.27",
    "12.28",
    "12.29",
    "12.30"
   ],
   "doors": {
    "programmer": "You keep writing code. What you declare is a closed grammar, and the court judges your sentence and an AI agent's by the same rules.",
    "analyst": "Your domain's words become a data pack, and the system understands them or refuses them with the reason.",
    "designer": "The refusals are part of the language: what is off the list is refused in strict mode, so it never needs a warning.",
    "decision-maker": "An AI model held to a declared grammar answers in the right shape. It can still answer a falsehood in the right shape, and the record prints that limit with the result.",
    "educator": "A sentence in Hausa, French or Arabic runs and says back what it understood, so a learner reads the machine's reading of their own words.",
    "agent": "You may speak only the declared language. Strict mode is your posture, and your draft is, by the vision's rule (designed), a proposal the court judges."
   },
   "sections": [
    {
     "n": null,
     "title": "What the AI age changes here"
    },
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 2969,
   "french": true,
   "text": "agents/ch11-law-a-language-is-declared-and-closed.md",
   "run": {
    "ran": "2026-10-15 12:58 UTC+01:00",
    "kept": 11,
    "runnable": 11
   }
  },
  {
   "number": 12,
   "id": "a-language-declared",
   "title": "A language, declared",
   "slug": "ch12-a-language-declared",
   "kind": "chapter",
   "part": 3,
   "appendix": null,
   "law": null,
   "principle": "Declaring a language is as easy as declaring a variable.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "in the library: a declaration judged when it is declared; a court and a grammar from the one declaration, with the list of what the grammar dropped; a grammar machine that walks bytes and refuses by name; a description for a person and a prompt for an AI model from the same text. Outside the library: a forge that turns a declaration into a court and a grammar, run on the estate's own languages",
    "designed": "the forge inside the library; its full list of products from one declaration (printer, knowledge graph, natural door, narration, runtime, one static binary); the projections of a language to an application",
    "absent": "the forge's grammar for a menu word; a guard that asserts the refusal of a host function in a condition; the figure two of ten against ten of ten, which needs a model file the snapshot does not hold"
   },
   "guards": [
    {
     "name": "structuredoutput_narrated",
     "exists": true,
     "path": "base/test/neural/structuredoutput_narrated.ring",
     "assertions": 73,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/neural/structuredoutput_narrated.ring"
    },
    {
     "name": "schema_grammar_narrated",
     "exists": true,
     "path": "base/test/neural/schema_grammar_narrated.ring",
     "assertions": 28,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/neural/schema_grammar_narrated.ring"
    },
    {
     "name": "constrained_decoding_narrated",
     "exists": true,
     "path": "base/test/neural/constrained_decoding_narrated.ring",
     "assertions": 50,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/neural/constrained_decoding_narrated.ring"
    },
    {
     "name": "483_w_and_wf_forms_in_conditional_code",
     "exists": true,
     "path": "base/test/list/483_w_and_wf_forms_in_conditional_code.ring",
     "assertions": 2,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/list/483_w_and_wf_forms_in_conditional_code.ring"
    },
    {
     "name": "calc_column_engine_narrated",
     "exists": true,
     "path": "base/test/table/calc_column_engine_narrated.ring",
     "assertions": 14,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/table/calc_column_engine_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oO = StzOutputSchemaQ([\n\t[ :field = \"dish\",     :type = :oneof,  :choices = [ \"margherita\", \"tiramisu\" ] ],\n\t[ :field = \"quantity\", :type = :number, :must = [ [ \">=\", 1 ], [ \"<=\", 12 ] ] ],\n\t[ :field = \"note\",     :type = :string, :optional = 1 ]\n])\noO {\n\t? Describe()\n\t#--> schema 'output' -- 3 field(s)\n\t#      dish : oneof (margherita | tiramisu) [required]\n\t#      quantity : number [required], must be at least '1', must be at most '12'\n\t#      note : string [optional]\n\t? PromptClause()\n\t#--> Answer with ONLY this structure, one field per line, nothing before it and nothing after it:\n\t#\n\t#    dish: <one of: margherita | tiramisu>\n\t#    quantity: <number>\n\t#    note: <text>\n\taV = Verify([ :dish = \"pizza\", :quantity = 40 ])\n\t? aV[:ok]\n\t#--> 0\n\t? aV[:findings][1][:message]\n\t#--> field 'dish' is a closed enumeration (margherita | tiramisu) and the model answered 'pizza'.\n\t? aV[:findings][2][:message]\n\t#--> field 'quantity' must be at most '12', and the model answered '40'.\n}",
     "promised": "schema 'output' -- 3 field(s)\ndish : oneof (margherita | tiramisu) [required]\nquantity : number [required], must be at least '1', must be at most '12'\nnote : string [optional]\nAnswer with ONLY this structure, one field per line, nothing before it and nothing after it:\n\ndish: <one of: margherita | tiramisu>\nquantity: <number>\nnote: <text>\n0\nfield 'dish' is a closed enumeration (margherita | tiramisu) and the model answered 'pizza'.\nfield 'quantity' must be at most '12', and the model answered '40'.",
     "output": "schema 'output' -- 3 field(s)\n  dish : oneof (margherita | tiramisu) [required]\n  quantity : number [required], must be at least '1', must be at most '12'\n  note : string [optional]\n\nAnswer with ONLY this structure, one field per line, nothing before it and nothing after it:\n\ndish: <one of: margherita | tiramisu>\nquantity: <number>\nnote: <text>\n\n0\nfield 'dish' is a closed enumeration (margherita | tiramisu) and the model answered 'pizza'.\nfield 'quantity' must be at most '12', and the model answered '40'.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cG = oO.ToGBNF()\ncGood  = \"dish: margherita\" + nl + \"quantity: 2\" + nl + \"note: no basil\" + nl\ncBand  = \"dish: margherita\" + nl + \"quantity: 40\" + nl + \"note: no basil\" + nl\ncShape = \"dish: margherita\" + nl + \"quantity: many\" + nl + \"note: no basil\" + nl\n? StzGrammarAccepts(cG, cGood)\n#--> 1\n? oO.Accepts(cGood)\n#--> 1\n? StzGrammarAccepts(cG, cBand)\n#--> 1\n? oO.Accepts(cBand)\n#--> 0\n? StzGrammarAccepts(cG, cShape)\n#--> 0\n? oO.Accepts(cShape)\n#--> 0\n? len(StzFind(\"lessequal\", oO.UnenforcedByGrammar())) > 0\n#--> 1",
     "promised": "1\n1\n1\n0\n0\n0\n1",
     "output": "1\n1\n1\n0\n0\n0\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? StzGrammarCouldContinue(cG, \"dish: t\")\n#--> 1\n? StzGrammarCouldContinue(cG, \"dish: p\")\n#--> 0\n? StzGrammarCouldContinue(cG, \"dish: margherita\" + nl + \"quantity: 2\")\n#--> 1\n? StzGrammarCouldContinue(cG, \"dish: margherita\" + nl + \"quantity: <\")\n#--> 0",
     "promised": "1\n0\n1\n0",
     "output": "1\n0\n1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cY = 'root ::= \"yes\" \"\\n\"'\n? StzGrammarCouldContinue(cY, \"y\")\n#--> 1\n? StzGrammarCouldContinue(cY, \"ye\")\n#--> 1\n? StzGrammarCouldContinue(cY, \"yesterday\")\n#--> 0",
     "promised": "1\n1\n0",
     "output": "1\n1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? left(StzGrammarRefusal('root ::= tail' + nl + 'tail ::= tail \"x\" | \"x\"'), 7)\n#--> GBNF-M7\n? left(StzGrammarRefusal('root ::= greeting'), 7)\n#--> GBNF-M4\n? StzGrammarRefusal(cG) = \"\"\n#--> 1\nStzOutputSchemaQ([\n\t[ :field = \"title\",  :type = :string ],\n\t[ :field = \"author\", :type = :structure, :fields = [ [ :field = \"name\", :type = :string ] ] ]\n]) {\n\t? IsExpressibleAsGrammar()\n\t#--> 0\n\ttry\n\t\tToGBNF()\n\tcatch\n\t\t? len(StzFind(\"GBNF-F5\", cCatchError)) > 0\n\tdone\n\t#--> 1\n\t? ParseOutput('{ \"title\":\"T\", \"author\":{\"name\":\"Ada\"} }')[:ok]\n\t#--> 1\n}",
     "promised": "GBNF-M7\nGBNF-M4\n1\n0\n1\n1",
     "output": "GBNF-M7\nGBNF-M4\n1\n0\n1\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "try\n\tStzOutputSchemaQ([ [ :field = \"x\", :type = :string, :requird = 0 ] ])\ncatch\n\t? cCatchError\ndone\n#--> stzOutputSchema: unknown key ':requird' in field #1 (use :field, :name, :type, :required, :optional, :choices, :oneof, :of, :fields, :must, :note, :description).",
     "promised": "stzOutputSchema: unknown key ':requird' in field #1 (use :field, :name, :type, :required, :optional, :choices, :oneof, :of, :fields, :must, :note, :description).",
     "output": "stzOutputSchema: unknown key ':requird' in field #1 (use :field, :name, :type, :required, :optional, :choices, :oneof, :of, :fields, :must, :note, :description).",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzListQ([ 4, 7, 10, 3, 8 ]) {\n\t? @@( FindW('{ sqrt(@item) < 3 }') )\n\t#--> [ 1, 2, 4, 5 ]\n\t? @@( FindW('{ sin(@item) < 2 }') )\n\t#--> [ ]\n\t? @@( FindWF( func x { return sin(x) < 2 } ) )\n\t#--> [ 1, 2, 3, 4, 5 ]\n}",
     "promised": "[ 1, 2, 4, 5 ]\n[ ]\n[ 1, 2, 3, 4, 5 ]",
     "output": "[ 1, 2, 4, 5 ]\n[ ]\n[ 1, 2, 3, 4, 5 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = new stzTableAggregator([\n\t[ :A, [ 0, 1, 4 ] ],\n\t[ :B, [ 2, 4, 20 ] ]\n])\no1.AddCalculatedCol(:SINE, 'sin(@(:A))')\n? @@( o1.Col(:SINE) )\n#--> [ 0, 0.84, -0.76 ]",
     "promised": "[ 0, 0.84, -0.76 ]",
     "output": "[ 0, 0.84, -0.76 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cG = 'root ::= ...'     # your grammar here\n? StzGrammarAccepts(cG, \"dish: <your first dish>\" + nl)\n#--> ?\n? StzGrammarAccepts(cG, \"dish: <a dish not on your menu>\" + nl)\n#--> ?\n? StzGrammarCouldContinue(cG, \"dish: <the first letters of your first dish>\")\n#--> ?\n? StzGrammarAccepts(cG, \"dish: <the first letters of your first dish>\")\n#--> ?\n? StzGrammarRefusal(cG) = \"\"\n#--> ?",
     "promised": "?\n?\n?\n?\n?",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "o = new stzList([ 4, 7, 10, 3, 8 ])\n? @@( o.FindW('{ sin(@item) < 2 }') )\n? @@( o.FindWF( func x { return sin(x) < 2 } ) )",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-conditional-code-narration.md",
    "stznatural-vs-ring-naturallib.md",
    "stznatural-narration.md",
    "stz-bridging-minds-and-code.md"
   ],
   "rulings": [
    "12.10",
    "12.21",
    "12.27",
    "12.29",
    "12.30"
   ],
   "doors": {
    "programmer": "You declare the shape in a few lines and get its court, its grammar and its prompt from them. What you do not get is a way to run a host function from the declaration: the language has no word for it. The table's formula language of section 7 is another language, and open at its edge.",
    "analyst": "The declaration is plain text in the domain's words, and the court answers in those words.",
    "designer": "The refusal is declared beside the grammar, in the domain's voice, and is not authored per runtime. A designer chooses what a closed menu says when it is broken.",
    "decision-maker": "One declaration produces the mouth and the court, and the forge itself publishes where they disagree. The forge is outside the library today. Do not buy it as shipped.",
    "educator": "The reader can predict, byte by byte, what the sampler will allow, and learns that a grammar kills malformedness and not falsehood.",
    "agent": "You speak only the grammar you were handed. A sentence you draft is a proposal that the court judges. Your mouth is shape, and your falsehoods are the court's and a person's."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3967,
   "french": true,
   "text": "agents/ch12-a-language-declared.md",
   "run": {
    "ran": "2026-10-15 12:59 UTC+01:00",
    "kept": 8,
    "runnable": 8
   }
  },
  {
   "number": 13,
   "id": "natural-and-executable",
   "title": "Natural, and executable: two directions, one discipline",
   "slug": "ch13-natural-and-executable",
   "kind": "chapter",
   "part": 3,
   "appendix": null,
   "law": null,
   "principle": "A sentence runs because every word of it is in a dictionary the library owns. What the library does not know, it refuses, with the reason.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "both directions: chains where the human is the parser, and sentences where the machine is; five language packs as data and a sixth added at runtime; refusals with reasons on both sides; question frames; a thin truth chain; natural code as data in documents and templates",
    "designed": "a grammar that holds an AI model to the lexicon; a guard that no socket opens during a natural run; the plan emitted as a chain; the article examples pinned as fixtures",
    "absent": "any machine that judges a chain's grammar; Ajami, Zarma and Fulfulde; a natural layer closed all the way down; a dictionary protected from the drift of the documentation it is read from; the old articles' promises, several of which do not run"
   },
   "guards": [
    {
     "name": "nnl_narrated",
     "exists": true,
     "path": "base/test/natural/nnl_narrated.ring",
     "assertions": 87,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/nnl_narrated.ring"
    },
    {
     "name": "multilingual_pack_narrated",
     "exists": true,
     "path": "base/test/natural/multilingual_pack_narrated.ring",
     "assertions": 45,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/multilingual_pack_narrated.ring"
    },
    {
     "name": "semantic_resolver_narrated",
     "exists": true,
     "path": "base/test/natural/semantic_resolver_narrated.ring",
     "assertions": 83,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/semantic_resolver_narrated.ring"
    },
    {
     "name": "question_narrated",
     "exists": true,
     "path": "base/test/natural/question_narrated.ring",
     "assertions": 21,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/question_narrated.ring"
    },
    {
     "name": "literate_templates_narrated",
     "exists": true,
     "path": "base/test/natural/literate_templates_narrated.ring",
     "assertions": 10,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/literate_templates_narrated.ring"
    },
    {
     "name": "truthchain_narrated",
     "exists": true,
     "path": "base/test/natural/truthchain_narrated.ring",
     "assertions": 12,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/truthchain_narrated.ring"
    },
    {
     "name": "interrogative_narrated",
     "exists": true,
     "path": "base/test/natural/interrogative_narrated.ring",
     "assertions": 11,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/interrogative_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "? TheWordQ(\"haro\").IsAQ([ :Lowercase, :Latin, :Word ]).WithQ().ALengthQ().OfQ(4).UnitQ(:Letters).AndQ().OnlyQ(2).VowelNB()\n#--> TRUE\n? TheWordQ(\"haro\").IsAQ([ :Lowercase, :Latin, :Word ]).WithQ().ALengthQ().OfQ(4).UnitQ(:Letters).AndQ().OnlyQ(1).VowelNB()\n#--> FALSE\n? Why()\n#--> no: expected exactly 1, found 2",
     "promised": "TRUE\nFALSE\nno: expected exactly 1, found 2",
     "output": "1\n0\nno: expected exactly 1, found 2",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Q(\"AnnIE\").AtLeast(2).VowelNB()\n#--> TRUE\n? Q(\"AnnIE\").AtMost(2).VowelNB()\n#--> FALSE\n? Why()\n#--> no: expected atmost 2, found 3",
     "promised": "TRUE\nFALSE\nno: expected atmost 2, found 3",
     "output": "1\n0\nno: expected atmost 2, found 3",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "try\n\tQ(5).VowelNB()\ncatch\n\t? cCatchError\ndone\n#--> NNL: a stznumber cannot count 'numberofvowels' -- and neither can the chain subject.\n? Q(\"haro\").IsAQ(:String).IfSoQ(\"majuscule\").Content()\n#--> HARO\ntry\n\tQ(\"haro\").IsAQ(:String).IfSo(\"uppercse\")\ncatch\n\t? cCatchError\ndone\n#--> NNL: this stzstring does not understand 'uppercse'. Did you mean 'uppercase'?",
     "promised": "NNL: a stznumber cannot count 'numberofvowels' -- and neither can the chain subject.\nHARO\nNNL: this stzstring does not understand 'uppercse'. Did you mean 'uppercase'?",
     "output": "NNL: a stznumber cannot count 'numberofvowels' -- and neither can the chain subject.\n\nHARO\nNNL: this stzstring does not understand 'uppercse'. Did you mean 'uppercase'?",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Q(\"haro\").IsAQ(:String).IfSoQ(:Uppercase).OtherwiseQ(:Reverse).Content()\n#--> HARO\n? Q(\"hello\").IsAQ(:Number).IfSoQ(:Reverse).OtherwiseQ(:Uppercase).Content()\n#--> HELLO\n? Q(\"hello brave world\").TheNth(2, :Words)\n#--> brave",
     "promised": "HARO\nHELLO\nbrave",
     "output": "HARO\nHELLO\nbrave",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? @@( WhatQ().TheQ().VowelsQ().OfQ(\"AnnIE\").Is() )\n#--> [ \"A\", \"I\", \"E\" ]\n? HowManyQ().WordsQ().Of(\"hello brave world\")\n#--> 3\nClearAnswers()\n? IsQ().TheQ().LengthQ().OfQ(\"Haro\").TheSameAsQ().TheQ().LengthQ().OfQ(\"Ruby\").OrNot()\n#--> 1\n? Why()\n#--> yes: 4 is the same as 4\n? IsQ().TheQ().LengthQ().OfQ(\"Haro\").TheSameAsQ().TheQ().LengthQ().OfQ(\"softanza\").OrNot()\n#--> 0\n? Why()\n#--> no: 4 is not the same as 8\n? @@( AnswersSoFar() )\n#--> [ 1, 0 ]\n? AllYesSoFar()\n#--> FALSE\n? AnyYesSoFar()\n#--> TRUE",
     "promised": "[ \"A\", \"I\", \"E\" ]\n3\n1\nyes: 4 is the same as 4\n0\nno: 4 is not the same as 8\n[ 1, 0 ]\nFALSE\nTRUE",
     "output": "[ \"A\", \"I\", \"E\" ]\n3\n1\nyes: 4 is the same as 4\n0\nno: 4 is not the same as 8\n[ 1, 0 ]\n0\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oT = Naturally(\"Create a string with 'haro' Is it lowercase ? Does it contain 'r' ?\")\n? @@( oT.Answers() )\n#--> [ 1, 1 ]\n? oT.AllYes()\n#--> TRUE\n? oT.Understood()\n#--> create a string with haro -> ask: is lowercase -> ask: contains\nTruthOf(\"haro\") {\n\tIsA(:Lowercase)\n\tAndIsA(:Latin)\n\tAndContaining(\"r\")\n\t? Holds()\n\t#--> TRUE\n}\n? Why()\n#--> yes: \"haro\" is lowercase and is latin and containing \"r\"\n? Certainty()\n#--> 1\n? Evidentially()\n#--> certainly",
     "promised": "[ 1, 1 ]\nTRUE\ncreate a string with haro -> ask: is lowercase -> ask: contains\nTRUE\nyes: \"haro\" is lowercase and is latin and containing \"r\"\n1\ncertainly",
     "output": "[ 1, 1 ]\n1\ncreate a string with haro -> ask: is lowercase -> ask: contains\n1\nyes: \"haro\" is lowercase and is latin and containing \"r\"\n1\ncertainly",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = Naturally(\"Create a string with 'test.data' Replace '.' with '_' Uppercase it\")\n? o1.Result()\n#--> TEST_DATA\n? o1.Code()\n#--> oStr = StzStringQ(\"test.data\")\n#    oStr.Replace(\".\", \"_\")\n#    oStr.Uppercase()\n#    @result = oStr.Content()",
     "promised": "TEST_DATA\noStr = StzStringQ(\"test.data\")\noStr.Replace(\".\", \"_\")\noStr.Uppercase()\n@result = oStr.Content()",
     "output": "TEST_DATA\noStr = StzStringQ(\"test.data\")\noStr.Replace(\".\", \"_\")\noStr.Uppercase()\n@result = oStr.Content()",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oE = Naturally(\"Make a string with 'hello niger' inside Spacify it and uppercase it\")\noH = NaturallyIn(\"hausa\", \"Yi rubutu da dauke 'hello niger' a ciki Raba shi kuma maida shi\")\n? oE.Code() = oH.Code()\n#--> TRUE\n? oH.Understood()\n#--> yi rubutu dauke hello niger -> raba -> maida\n? oE.Understood()\n#--> create a string with hello niger -> spacify -> uppercase",
     "promised": "TRUE\nyi rubutu dauke hello niger -> raba -> maida\ncreate a string with hello niger -> spacify -> uppercase",
     "output": "1\nyi rubutu dauke hello niger -> raba -> maida\ncreate a string with hello niger -> spacify -> uppercase",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Naturally(\"Create a string with 'softanza' Capitals it\").Result()\n#--> SOFTANZA\n? Naturally(\"Create a string with 'capitals' Uppercase it\").Result()\n#--> CAPITALS\n? Naturally(\"Create a string with 'a-sep-b' Replace sep with '_'\").Result()\n#--> a-_-b",
     "promised": "SOFTANZA\nCAPITALS\na-_-b",
     "output": "SOFTANZA\nCAPITALS\na-_-b",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? StzResolveSemanticInLang(\"fr\", \"doublons\")\n#--> METHOD_REMOVEDUPLICATES\n? StzResolveSemanticInLang(\"ar\", \"تكرارات\")\n#--> METHOD_REMOVEDUPLICATES\n? StzResolveSemanticInLang(\"tr\", \"tekrarları\")\n#--> METHOD_REMOVEDUPLICATES\n? StzResolveSemantic(\"removeduplicates\")\n#--> METHOD_REMOVEDUPLICATES",
     "promised": "METHOD_REMOVEDUPLICATES\nMETHOD_REMOVEDUPLICATES\nMETHOD_REMOVEDUPLICATES\nMETHOD_REMOVEDUPLICATES",
     "output": "METHOD_REMOVEDUPLICATES\nMETHOD_REMOVEDUPLICATES\nMETHOD_REMOVEDUPLICATES\nMETHOD_REMOVEDUPLICATES",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? NaturallyIn(\"tr\", \"'a.b' ile bir metin oluştur '.' yerine '_' koy\").Result()\n#--> a_b\n? NaturallyIn(\"tr\", \"'haro' ile bir metin oluştur ve tersine çevir\").Result()\n#--> orah\n? NaturallyIn(\"ar\", \"أنشئ نصا بـ 'haro' ثم اقلبه\").Result()\n#--> orah\n? NaturallyIn(\"ar\", \"أنشئ نصًا بـ 'haro' ثمّ اقلِبْه\").Result()\n#--> orah\n? NaturallyIn(\"ar\", \"أنشئ نصا بـ 'haro' ثم اقلبه\").Understood()\n#--> أنشئ سلسلة بـ haro -> اعكس\n? NaturallyIn(\"fr\", \"Crée une chaine avec 'haro' et mets la à l'envers\").Result()\n#--> orah",
     "promised": "a_b\norah\norah\norah\nأنشئ سلسلة بـ haro -> اعكس\norah",
     "output": "a_b\norah\norah\norah\nأنشئ سلسلة بـ haro -> اعكس\norah",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzAddNaturalLanguage([\n\t:code = \"sw\",\n\t:name = \"swahili\",\n\t:script = \"latin\",\n\t:ignored_words = [ \"na\", \"ya\", \"kwa\", \"hii\" ],\n\t:semantic_mappings = [\n\t\t[:natural = \"unda\",   :semantic = \"CREATE_OBJECT\"],\n\t\t[:natural = \"orodha\", :semantic = \"OBJECT_LIST\"],\n\t\t[:natural = \"na\",     :semantic = \"VALUE_INDICATOR\"],\n\t\t[:natural = \"panga\",  :semantic = \"METHOD_SORT\"]\n\t],\n\t:phrases = [\n\t\t[:semantic = \"METHOD_REMOVEDUPLICATES\", :words = \"ondoa nakala, futa nakala\"]\n\t]\n])\n? StzHasLanguagePack(\"sw\")\n#--> TRUE\nosw = NaturallyIn(\"sw\", \"Unda orodha na [ 9, 4, 9 ] ondoa nakala\")\n? @@( osw.Result() )\n#--> [ 9, 4 ]\n? osw.Understood()\n#--> unda orodha na [ 9, 4, 9 ] -> ondoa nakala",
     "promised": "TRUE\n[ 9, 4 ]\nunda orodha na [ 9, 4, 9 ] -> ondoa nakala",
     "output": "1\n[ 9, 4 ]\nunda orodha na [ 9, 4, 9 ] -> ondoa nakala",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cDoc = \"This tutorial explains deduplication.\" + nl +\n\t\"#<\" + nl +\n\t\"Create a list with [ 3, 1, 3 ] and remove its duplicates\" + nl +\n\t\"#>\" + nl +\n\t\"The end.\"\n? len( StzNaturalBlocks(cDoc) )\n#--> 1\n? @@( NaturallyFromDoc(cDoc)[1].Result() )\n#--> [ 3, 1 ]\ncT = \"Create a list with {#1} and remove its duplicates\"\n? @@( NaturallyWith(cT, [ [ 5, 3, 5 ] ]).Result() )\n#--> [ 5, 3 ]\n? @@( NaturallyWith(cT, [ [ 9, 9, 4 ] ]).Result() )\n#--> [ 9, 4 ]",
     "promised": "1\n[ 3, 1 ]\n[ 5, 3 ]\n[ 9, 4 ]",
     "output": "1\n[ 3, 1 ]\n[ 5, 3 ]\n[ 9, 4 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "for cLang in [ \"en\", \"ha\", \"fr\", \"ar\", \"tr\" ]\n\taC = StzPackCoverage(cLang)\n\t? cLang + \" \" + aC[:covered] + \" of \" + aC[:total]\nnext\n#--> en 23 of 25\n#    ha 9 of 25\n#    fr 25 of 25\n#    ar 16 of 25\n#    tr 10 of 25\n? StzHasNeuralModel()\n#--> FALSE",
     "promised": "en 23 of 25\nha 9 of 25\nfr 25 of 25\nar 16 of 25\ntr 10 of 25\nFALSE",
     "output": "en 23 of 25\nha 9 of 25\nfr 25 of 25\nar 16 of 25\ntr 10 of 25\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? TheWordQ(\"haro\").IsAQ(:Word).WhichQ().HasQ().ALengthQ().Of(4)\n#--> TRUE\n? TheWordQ(\"haro\").IsAQ(:Word).WhichQ().ALengthQ().Of(4)\n#--> TRUE",
     "promised": "TRUE\nTRUE",
     "output": "1\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Q(\"haro\").IsAXT([ \"String('x') and HostRan() and @isString\" ])\n#--> host code ran\n#    TRUE\n\nfunc HostRan()\n\t? \"host code ran\"\n\treturn 1",
     "promised": "host code ran\nTRUE",
     "output": "host code ran\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o = Naturally(\"Create a string with 'softanza' Spacify it and_ Uppercase it\")\n? o.Result()\n#--> S O F T A N Z A\n? o.UnderstoodAll()\n#--> FALSE\n? @@( o.Unresolved() )\n#--> [ [ \"and_\", \"addn\" ] ]\ntry\n\tNaturallyStrict(\"Create a string with 'softanza' Spacify it and_ Uppercase it\")\ncatch\n\t? cCatchError\ndone\n#--> Strict natural mode: not understood: 'and_' (did you mean 'addn'?)",
     "promised": "S O F T A N Z A\nFALSE\n[ [ \"and_\", \"addn\" ] ]\nStrict natural mode: not understood: 'and_' (did you mean 'addn'?)",
     "output": "S O F T A N Z A\n0\n[ [ \"and_\", \"addn\" ] ]\nStrict natural mode: not understood: 'and_' (did you mean 'addn'?)",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "# 1. as a chain, where you are the parser:\n# 2. as a Naturally sentence, where the library is:",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "# the chain of section 7 that nothing judged:\n? TheWordQ(\"haro\").IsAQ(:Word).WhichQ().ALengthQ().Of(4)\n# the line you would have the library print to refuse it, with its reason:",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stznatural-vs-ring-naturallib.md",
    "stz-near-natural-language-programming.md",
    "stznatural-narration.md",
    "stz-bridging-minds-and-code.md"
   ],
   "rulings": [
    "12.2",
    "12.6",
    "12.27",
    "12.30"
   ],
   "doors": {
    "programmer": "Write the chain as the sentence and read it aloud. The library refuses what its subject cannot do, and says why. You are the parser, so the sentence is only as grammatical as you are.",
    "analyst": "A requirement can be a paragraph that runs, with a paraphrase that comes back. Today it acts on strings, lists and numbers, so the analyst's domain words go in a knowledge file (chapter 14), not here.",
    "designer": "A designer's tone is in the refusals: a message names the word and the nearest word. The record has no designer-specific evidence for this chapter, and I keep the line short.",
    "decision-maker": "Ask any \"natural language\" claim what it does with a word it does not know. Here it reports it, refuses it in strict mode, or takes it as a literal, and says which. It is designed to run offline with no key. The no-network claim is not yet measured.",
    "educator": "A learner writes in Hausa, French, Arabic or Turkish, and the program says back what it understood in the same language. The Hausa pack speaks nine of twenty-five meanings, and no speaker of those languages has read this page's sentences, as far as the record shows.",
    "agent": "Speak the lexicon. Use strict mode and an allow-list (chapter 11). Expect refusal with a reason. Your sentence is a proposal. A grammar that would hold you to the lexicon is designed and not built."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3753,
   "french": true,
   "text": "agents/ch13-natural-and-executable.md",
   "run": {
    "ran": "2026-10-15 12:59 UTC+01:00",
    "kept": 17,
    "runnable": 17
   }
  },
  {
   "number": 14,
   "id": "knowledge-programming",
   "title": "Knowledge programming",
   "slug": "ch14-knowledge-programming",
   "kind": "chapter",
   "part": 3,
   "appendix": null,
   "law": null,
   "principle": "A system is a file. Adding a line to it makes the system know more, and nothing is coded or trained.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "a system as a plain text file of facts, with laws (unique, transitive, symmetric) and the source of each fact; Prove with its steps, a no as certain as a yes; strict mode; the file written, read back and shipped, from a course catalogue to an AI agent's memory",
    "designed": "rules in the file; derivation on any graph; a query that joins; several relations between two things; class inheritance; validation on load",
    "absent": "the 2022 founding dialog, which does not run; Explain on a knowledge graph; the rules section of the file, which the parser drops"
   },
   "guards": [
    {
     "name": "knowledge_integration_narrated",
     "exists": true,
     "path": "base/test/natural/knowledge_integration_narrated.ring",
     "assertions": 19,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/knowledge_integration_narrated.ring"
    },
    {
     "name": "provenance_survives_save_narrated",
     "exists": true,
     "path": "base/test/security/provenance_survives_save_narrated.ring",
     "assertions": 23,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/security/provenance_survives_save_narrated.ring"
    },
    {
     "name": "program_narrated",
     "exists": true,
     "path": "base/test/education/program_narrated.ring",
     "assertions": 21,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/education/program_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "cFacts = 'knowledge \"coop\"' + nl + nl + \"facts\" + nl +\n         \"    flour | made-from | millet\" + nl + \"    couscous | made-from | flour\" + nl\noA = new stzKnowledgeGraph(\"coop\")\noA.ImportKnow(cFacts)\n? oA.Prove([ \"couscous\", \"made-from\", \"millet\" ])[:narration]\n#--> not derivable: no recorded fact or lawful chain gives 'couscous' made-from 'millet'\noB = new stzKnowledgeGraph(\"coop\")\noB.ImportKnow(cFacts + nl + \"ontology\" + nl + \"    made-from | transitive\" + nl)\n? oB.Prove([ \"couscous\", \"made-from\", \"millet\" ])[:narration]\n#--> proved: couscous made-from flour made-from millet",
     "promised": "not derivable: no recorded fact or lawful chain gives 'couscous' made-from 'millet'\nproved: couscous made-from flour made-from millet",
     "output": "not derivable: no recorded fact or lawful chain gives 'couscous' made-from 'millet'\nproved: couscous made-from flour made-from millet",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oB.KnowRelation(\"porridge\", \"made-from\", \"couscous\")\n? oB.Prove([ \"porridge\", \"made-from\", \"millet\" ])[:narration]\n#--> proved: porridge made-from couscous made-from flour made-from millet\n? oA.Prove([ \"porridge\", \"made-from\", \"millet\" ])[:narration]\n#--> not derivable: no recorded fact or lawful chain gives 'porridge' made-from 'millet'",
     "promised": "proved: porridge made-from couscous made-from flour made-from millet\nnot derivable: no recorded fact or lawful chain gives 'porridge' made-from 'millet'",
     "output": "proved: porridge made-from couscous made-from flour made-from millet\nnot derivable: no recorded fact or lawful chain gives 'porridge' made-from 'millet'",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKB = new stzKnowledgeGraph(\"coop\")\noKB.Know(\"couscous\", \"dish\")\noKB.KnowRelation(\"couscous\", \"contains\", \"semolina\")\noDLM = StzDlmQ(oKB)\n? oDLM.Ask(\"what is millet?\")\n#--> That is outside the 'coop' domain (I know 1 entities and 1 relations).\noKB.Know(\"millet\", \"grain\")\noKB.KnowRelation(\"couscous\", \"contains\", \"millet\")\n? oDLM.Ask(\"what is millet?\")\n#--> That is outside the 'coop' domain (I know 1 entities and 1 relations).\noDLM = StzDlmQ(oKB)\n? oDLM.Ask(\"what is millet?\")\n#--> Millet is a grain.\n? oDLM.Ask(\"couscous contains what?\")\n#--> Couscous contains semolina and millet.",
     "promised": "That is outside the 'coop' domain (I know 1 entities and 1 relations).\nThat is outside the 'coop' domain (I know 1 entities and 1 relations).\nMillet is a grain.\nCouscous contains semolina and millet.",
     "output": "That is outside the 'coop' domain (I know 1 entities and 1 relations).\nThat is outside the 'coop' domain (I know 1 entities and 1 relations).\nMillet is a grain.\nCouscous contains semolina and millet.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzKnowledgeGraphQ(\"clinic\") {\n\tConstrainRelation(\"treated-by\", :Unique)\n\tEnableStrictMode()\n\ttry\n\t\tAddFact(\"fatou\", \"treated-by\", \"dr-diallo\")\n\tcatch\n\t\t? cCatchError\n\tdone\n\t#--> Strict mode: every fact needs provenance -- use AddFactXT(s, p, o, [ :source = ..., :confidence = ... ]).\n\tAddFactXT(\"fatou\", \"treated-by\", \"dr-diallo\", [ :source = \"registry\", :confidence = 0.95 ])\n\t? AddFactXT(\"fatou\", \"treated-by\", \"dr-sani\", [ :source = \"rumour\", :confidence = 0.2 ])\n\t#--> 0\n\tWriteToKnowFile(\"clinic\")\n}\n? read(\"clinic.zknw\")\n#--> knowledge \"clinic\"\n#\n#    facts\n#        fatou | treated-by | dr-diallo\n#\n#    provenance\n#        fatou | treated-by | dr-diallo | source | text | registry\n#        fatou | treated-by | dr-diallo | confidence | number | 0.95\n#\n#    contradictions\n#        fatou | treated-by | dr-diallo | dr-sani | rumour\n#\n#    ontology\n#        treated-by | unique",
     "promised": "Strict mode: every fact needs provenance -- use AddFactXT(s, p, o, [ :source = ..., :confidence = ... ]).\n0\nknowledge \"clinic\"\n\nfacts\nfatou | treated-by | dr-diallo\n\nprovenance\nfatou | treated-by | dr-diallo | source | text | registry\nfatou | treated-by | dr-diallo | confidence | number | 0.95\n\ncontradictions\nfatou | treated-by | dr-diallo | dr-sani | rumour\n\nontology\ntreated-by | unique",
     "output": "Strict mode: every fact needs provenance -- use AddFactXT(s, p, o, [ :source = ..., :confidence = ... ]).\n\n0\nknowledge \"clinic\"\n\nfacts\n    fatou | treated-by | dr-diallo\n\nprovenance\n    fatou | treated-by | dr-diallo | source | text | registry\n    fatou | treated-by | dr-diallo | confidence | number | 0.95\n\ncontradictions\n    fatou | treated-by | dr-diallo | dr-sani | rumour\n\nontology\n    treated-by | unique",
     "verdict": "kept",
     "effects": [
      "files"
     ]
    },
    {
     "code": "StzKnowledgeGraphQ(\"clinic\") {\n\tEnableStrictMode()\n\taR = ImportKnow(\"clinic.zknw\")\n\t? aR[:merged]\n\t#--> 1\n\t? @@( MetaOfFact(\"fatou\", \"treated-by\", \"dr-diallo\") )\n\t#--> [ [ \"source\", \"registry\" ], [ \"confidence\", 0.95 ] ]\n\t? len(Contradictions())\n\t#--> 1\n\t? RelationHasLaw(\"treated-by\", \"unique\")\n\t#--> 1\n}\nremove(\"clinic.zknw\")\n? fexists(\"clinic.zknw\")\n#--> 0",
     "promised": "1\n[ [ \"source\", \"registry\" ], [ \"confidence\", 0.95 ] ]\n1\n1\n0",
     "output": "1\n[ [ \"source\", \"registry\" ], [ \"confidence\", 0.95 ] ]\n1\n1\n0",
     "verdict": "kept",
     "effects": [
      "files"
     ]
    },
    {
     "code": "StzConstrainRelation(\"married-to\", :Symmetric)\nStzKnowRelation(\"amina\", \"married-to\", \"ibrahim\")\n? DefaultKnowledgeGraph().Query([ \"ibrahim\", \"married-to\", \"amina\" ])\n#--> 1",
     "promised": "1",
     "output": "1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oP = StzProgramQ(\"../../education/program\")\n? oP.Id()\n#--> softanza-education\n? @@( oP.Languages() )\n#--> [ \"en\", \"fr\", \"ar\", \"ha\" ]",
     "promised": "softanza-education\n[ \"en\", \"fr\", \"ar\", \"ha\" ]",
     "output": "softanza-education\n[ \"en\", \"fr\", \"ar\", \"ha\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cRules = 'knowledge \"pairs\"' + nl + nl + \"facts\" + nl + \"    margherita | pairs-with | chianti\" + nl + nl +\n         \"rules\" + nl + \"    pairs-with | symmetric\" + nl\noRul = new stzKnowledgeGraph(\"pairs\")\naM = oRul.ImportKnow(cRules)\n? aM[:merged]\n#--> 1\n? len(oRul.Ontology())\n#--> 0",
     "promised": "1\n0",
     "output": "1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzKnowledgeGraphQ(\"pairs\") {\n\tConstrainRelation(\"pairs-with\", :Symmetric)\n\tKnowRelation(\"margherita\", \"pairs-with\", \"chianti\")\n\t? RelationHasLaw(\"pairs-with\", \"symmetric\")\n\t#--> 1\n\t? Query([ \"chianti\", \"pairs-with\", \"margherita\" ])\n\t#--> 0\n}",
     "promised": "1\n0",
     "output": "1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oShop = new stzKnowledgeGraph(\"shop\")\noShop.KnowRelation(\"amina\", \"sells\", \"bread\")\naV = oShop.Admit(\"amina\", \"buys\", \"bread\", [ :source = \"till\" ])\n? aV[:admitted]\n#--> 0\n? aV[:why]\n#--> Can't add fact: 'amina' and 'bread' already carry the edge 'sells' (stzGraph stores one edge per node pair).",
     "promised": "0\nCan't add fact: 'amina' and 'bread' already carry the edge 'sells' (stzGraph stores one edge per node pair).",
     "output": "0\nCan't add fact: 'amina' and 'bread' already carry the edge 'sells' (stzGraph stores one edge per node pair).",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzKnowledgeGraphQ(\"coop2\") {\n\tKnowRelation(\"amina\", \"sells\", \"couscous\")\n\tKnowRelation(\"couscous\", \"made-from\", \"flour\")\n\t? @@( QueryPath([ [ \"amina\", \"sells\", \"?p\" ], [ \"?p\", \"made-from\", \"?m\" ] ]) )\n\t#--> [ \"couscous\" ]\n\t? @@( Query([ \"amina\", \"?p\", \"?o\" ]) )\n\t#--> [ ]\n}",
     "promised": "[ \"couscous\" ]\n[ ]",
     "output": "[ \"couscous\" ]\n[ ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cBad = 'knowledge \"t\"' + nl + nl + \"facts\" + nl + \"    a | likes | b\" + nl + \"    c | likes\" + nl +\n       \"    d | likes | e | f\" + nl + \"    g likes h\" + nl\noT = new stzKnowledgeGraph(\"t\")\naBad = oT.ImportKnow(cBad)\n? aBad[:merged]\n#--> 1\n? @@(aBad[:refused])\n#--> [ ]",
     "promised": "1\n[ ]",
     "output": "1\n[ ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzKnow(:Apple, :Company)\nStzKnow(:Apple, :Fruit)\n? @@( WhatIs(:Apple) )\n#--> [ \"company\", \"fruit\" ]",
     "promised": "[ \"company\", \"fruit\" ]",
     "output": "[ \"company\", \"fruit\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cWorld = 'knowledge \"school\"' + nl + nl + \"facts\" + nl +\n         \"    class-3b | part-of | grade-3\" + nl +\n         \"    grade-3 | part-of | primary\" + nl\noW = new stzKnowledgeGraph(\"school\")\noW.ImportKnow(cWorld)\n? oW.Prove([ \"class-3b\", \"part-of\", \"primary\" ])[:narration]\n# this prints a refusal. Your promise: the line proving that class-3b is part of primary,\n# with the chain written out. Change the world, not the question.",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "cBad = 'knowledge \"t\"' + nl + nl + \"facts\" + nl + \"    a | likes | b\" + nl + \"    c | likes\" + nl +\n       \"    d | likes | e | f\" + nl + \"    g likes h\" + nl\noT = new stzKnowledgeGraph(\"t\")\naBad = oT.ImportKnow(cBad)\n? aBad[:merged]\n? @@(aBad[:refused])\n? oT.Query([ \"a\", \"likes\", \"b\" ])\n? oT.Query([ \"d\", \"likes\", \"e\" ])\n? oT.Query([ \"g\", \"likes\", \"h\" ])",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-knowledge-programming-narration.md",
    "stz-bridging-minds-and-code.md",
    "stz-rules-as-graph-rules-narration.md"
   ],
   "rulings": [
    "12.2",
    "12.6",
    "12.12",
    "12.13",
    "12.19"
   ],
   "doors": {
    "programmer": "One class and a text file: `Know`, `KnowRelation`, `ConstrainRelation`, `Prove`, `Query`, `WriteToKnowFile`, `ImportKnow`. The file is diffable and ships with the program.",
    "analyst": "The offering page names it: what you declare is your organisation's entities, rules and flows, in a plain-text knowledge file. Read \"rules\" as the limit above. Where to start, in the course: the chapter called \"Teach a world\".",
    "designer": "The record is silent. Neither the offering page nor the study ties the knowledge file to the designer's door, and I do not invent one.",
    "decision-maker": "The file is plain text that a manager can read. Every fact can carry a source and a confidence. A refused claim is kept, named and never resolved. An answer comes with its proof, and a no is certain. The design's second law says no capability may require anything paid or remote. I did not run the file offline.",
    "educator": "The whole education program is knowledge files. A learner teaches a world, then questions it, and the project's guard checks the world file, the agent file and one printed answer. An institution adapts by overlay, never by fork.",
    "agent": "Your memory is a knowledge graph with provenance, and your world is a file you load and query."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3497,
   "french": true,
   "text": "agents/ch14-knowledge-programming.md",
   "run": {
    "ran": "2026-10-15 12:59 UTC+01:00",
    "kept": 13,
    "runnable": 13
   }
  },
  {
   "number": 15,
   "id": "pattern-languages",
   "title": "Pattern languages",
   "slug": "ch15-pattern-languages",
   "kind": "chapter",
   "part": 3,
   "appendix": null,
   "law": null,
   "principle": "A pattern is a rule about the shape of data, written as data. The same habit serves every kind of data.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "patterns for text, numbers and tables, each with a guard; the same small habit across the media (a constructor, a pattern in a string, Match, Tokens)",
    "designed": "one pattern engine shared by every medium; the pattern as the condition side of the cascade; the pattern written from examples",
    "absent": "the refusal of a word the pattern language does not know, in the six media that are not text; sequences over a timeline in time; a narration and a small function for graphs; the genetic, linguistic and quantic siblings"
   },
   "guards": [
    {
     "name": "00_regex_narrated",
     "exists": true,
     "path": "base/test/regex/00_regex_narrated.ring",
     "assertions": 28,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/regex/00_regex_narrated.ring"
    },
    {
     "name": "00_numbrex_narrated",
     "exists": true,
     "path": "base/test/numbrex/00_numbrex_narrated.ring",
     "assertions": 15,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/numbrex/00_numbrex_narrated.ring"
    },
    {
     "name": "tablex_narrated",
     "exists": true,
     "path": "base/test/regex/tablex_narrated.ring",
     "assertions": 95,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/regex/tablex_narrated.ring"
    },
    {
     "name": "00_matrex_narrated",
     "exists": true,
     "path": "base/test/matrex/00_matrex_narrated.ring",
     "assertions": 8,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/matrex/00_matrex_narrated.ring"
    },
    {
     "name": "00_graphex_narrated",
     "exists": true,
     "path": "base/test/graphex/00_graphex_narrated.ring",
     "assertions": 27,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/graphex/00_graphex_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "? rx(pat(:isoDate)).Match(\"2023-12-25\")\n#--> 1\n? rx(pat(:isoDate)).Match(\"25/12/2023\")\n#--> 0\n? rx(pat(:isoDate)).Explain()\n#--> Matches ISO 8601 date format (YYYY-MM-DD)\ntry\n\tpat(:banana)\ncatch\n\t? cCatchError\ndone\n#--> The pattern name you provided does not exist in stzRegexData file.",
     "promised": "1\n0\nMatches ISO 8601 date format (YYYY-MM-DD)\nThe pattern name you provided does not exist in stzRegexData file.",
     "output": "1\n0\nMatches ISO 8601 date format (YYYY-MM-DD)\nThe pattern name you provided does not exist in stzRegexData file.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzRegexQ(\"^\\d{3}-\\d{2}-\\d{4}$\") {\n\t? MatchAsYouType(\"123-45\")\n\t#--> 1\n\t? MatchAsYouType(\"abc\")\n\t#--> 0\n\t? IsPartialMatch(\"123-45\")\n\t#--> 1\n\t? IsPartialMatch(\"123-45-6789\")\n\t#--> 0\n}",
     "promised": "1\n0\n1\n0",
     "output": "1\n0\n1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Lx(\"[@N+, @S]\").Match([1, 2, 3, \"end\"])\n#--> 1\n? Lx(\"[@N1-3, @S]\").Match([1, 2, 3, 4, \"end\"])\n#--> 0\n? Lx(\"[@S, [@N+]]\").Match([\"tea\", [1, 2, 3]])\n#--> 1\n? Lx(\"[@S, [@N+]]\").Match([\"tea\", [\"x\"]])\n#--> 0\n? Lx(\"[@!N, @N]\").Match([\"a\", 1])\n#--> 1\n? Lx(\"[@!N, @N]\").Match([1, 1])\n#--> 0",
     "promised": "1\n0\n1\n0\n1\n0",
     "output": "1\n0\n1\n0\n1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Nx(\"{@Property(Even) & @Property(Prime)}\").Match(2)\n#--> 1\n? Nx(\"{@Property(Even) & @Property(Prime)}\").Match(4)\n#--> 0\n? Nx(\"{@Digit(:unique)+}\").Match(1234)\n#--> 1\n? Nx(\"{@Digit(:unique)+}\").Match(1223)\n#--> 0\n? Nx(\"{@Relation(Mod:5=0)}\").Match(10)\n#--> 1\n? @@( Nx(\"{@Property(Perfect)}\").MatchingNumbersBetween(1, 500) )\n#--> [ 6, 28, 496 ]",
     "promised": "1\n0\n1\n0\n1\n[ 6, 28, 496 ]",
     "output": "1\n0\n1\n0\n1\n[ 6, 28, 496 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oT = new stzTable([\n\t[ :ID, :NAME, :AGE, :CITY ],\n\t[ 1, \"Ali\", 28, \"Niamey\" ],\n\t[ 2, \"Sara\", 32, \"Paris\" ],\n\t[ 3, \"Omar\", 41, \"Niamey\" ],\n\t[ 4, \"Awa\", 25, \"Dakar\" ]\n])\n? Tbx(\"{cols(4) & unique(id) & avgcol(age:>30)}\").Match(oT)\n#--> 1\n? Tbx(\"{cols(4) & unique(city)}\").Match(oT)\n#--> 0\n? Tbx(\"{@!unique(city)}\").Match(oT)\n#--> 1\n? Tbx(\"{sorted(id) & numeric(age) & alphabetic(name)}\").Match(oT)\n#--> 1",
     "promised": "1\n0\n1\n1",
     "output": "1\n0\n1\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oA = new stzTablex(\"{cols(4)}\")\noB = new stzTablex(\"{rows(4)}\")\noAnd = oA.And_(oB)\n? oAnd.Pattern()\n#--> {cols(4) & rows(4)}\n? oAnd.Match(oT)\n#--> 1\n? oA.Not_().Pattern()\n#--> {@!cols(4)}\n? oA.Not_().Match(oT)\n#--> 0",
     "promised": "{cols(4) & rows(4)}\n1\n{@!cols(4)}\n0",
     "output": "{cols(4) & rows(4)}\n1\n{@!cols(4)}\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Mx(\"{shape(square) & property(symmetric)}\").Match([ [1,2,3], [2,4,5], [3,5,6] ])\n#--> 1\n? Mx(\"{shape(square) & property(symmetric)}\").Match([ [1,2,3], [4,5,6], [7,8,9] ])\n#--> 0\n? Mx(\"{size(2x3)}\").Match([ [1,2,3], [4,5,6] ])\n#--> 1\n? Mx(\"{property(identity)}\").Match([ [1,0], [0,1] ])\n#--> 1",
     "promised": "1\n0\n1\n1",
     "output": "1\n0\n1\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oTm = new stzTimex(\"{@Duration(1h..2h:15min)}\")\noTm {\n\t? Match(new stzDuration(\"1 hour 30 minutes\"))\n\t#--> 1\n\t? Match(new stzDuration(\"1 hour 20 minutes\"))\n\t#--> 0\n\t? Match(new stzDuration(\"3 hours\"))\n\t#--> 0\n}",
     "promised": "1\n0\n0",
     "output": "1\n0\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "g = new stzGraph(\"Order\")\ng {\n\tAddNodeXT(:a, \"Placed\")\n\tAddNodeXT(:b, \"Cooking\")\n\tAddNodeXT(:c, \"Served\")\n\tAddEdgeXT(:a, :b, \"starts\")\n\tAddEdgeXT(:b, :c, \"finishes\")\n}\n? (new stzGraphex(\"{@Node(placed) -> @Edge(starts) -> @Node(cooking)}\", g)).Match(g)\n#--> 1\n? (new stzGraphex(\"{@Node(served) -> @Node(placed)}\", g)).Match(g)\n#--> 0\n? (new stzGraphex(\"{@Node(placed) -> @!Node(refunded)}\", g)).Match(g)\n#--> 1",
     "promised": "1\n0\n1",
     "output": "1\n0\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? len( Lx(\"[@N, @S]\").Tokens() )\n#--> 2\n? Lx(\"[@N, @S]\").Tokens()[2][:type]\n#--> string\n? Nx(\"{@Property(Even) & @Property(Prime)}\").Tokens()[1][:type]\n#--> conjunction\n? len( Mx(\"{shape(square) & property(symmetric)}\").Tokens()[1][:conditions] )\n#--> 2",
     "promised": "2\nstring\nconjunction\n2",
     "output": "2\nstring\nconjunction\n2",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oTl = new stzTimeLine(\"2025-10-22\", \"2025-10-22\")\noTl {\n\tAddInstant(\"Meeting\", \"2025-10-22 09:00:00\")\n\tAddSpan(\"Break\", \"2025-10-22 10:00:00\", \"2025-10-22 10:15:00\")\n\tAddInstant(\"Lunch\", \"2025-10-22 12:00:00\")\n}\no1 = new stzTimex(\"{@Event(Meeting) -> @Duration* -> @Event(Break)}\")\n? o1.MatchPartial(oTl)\n#--> 0\no2 = new stzTimex(\"{@Event(Lunch)}\")\n? o2.MatchPartial(oTl)\n#--> 0\n? @@( o2.Tokens()[1][:label] )\n#--> \"Lunch)\"",
     "promised": "0\n0\n\"Lunch)\"",
     "output": "0\n0\n\"Lunch)\"",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? (new stzGraphex(\"{@Node(placed) -> @Node(served)}\", g)).Match(g)\n#--> 1\n? (new stzGraphex(\"{@Node(placed) -> @Node10 -> @Node(served)}\", g)).Match(g)\n#--> 1",
     "promised": "1\n1",
     "output": "1\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Nx(\"{@Banana(3)}\").Match(7)\n#--> 1\n? Nx(\"{@Banana(3)}\").Match(1000003)\n#--> 1\n? @@( Nx(\"{@Banana(3)}\").Tokens() )\n#--> [ ]\n? Nx(\"{@Property(Banana)}\").Match(7)\n#--> 0",
     "promised": "1\n1\n[ ]\n0",
     "output": "1\n1\n[ ]\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "t1 = new stzTable([ [ :ID, :EMAIL ], [ 1, \"ali@x.org\" ], [ 2, \"sara@x.org\" ] ])\nt2 = new stzTable([ [ :ID, :EMAIL ], [ 1, \"ali@x.org\" ], [ 1, \"sara@x.org\" ] ])\nt3 = new stzTable([ [ :ID, :EMAIL ], [ 1, \"ali@x.org\" ], [ 2, \"\" ] ])\n# write ONE pattern, then print whether it matches t1, t2, t3, on three lines\ncPattern = \"{ ... }\"\n? Tbx(cPattern).Match(t1)\n? Tbx(cPattern).Match(t2)\n? Tbx(cPattern).Match(t3)\n#--> 1\n#--> 0\n#--> 0",
     "promised": "1\n0\n0",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "? Mx(\"{row(99)}\").Match([ [1,0], [0,1] ])",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stznumbrex-pattern-language-for-number.md",
    "stztablex-pattern-langauge-for-tables.md.md",
    "stzlistex-pattern-matching-for-lists.md",
    "stzTimex-A-Pattern-Language-for-Time-in-Softanza.md",
    "stzMatrex-Declarative-Pattern-Matching-for-Matrices.md"
   ],
   "rulings": [
    "12.4",
    "12.18",
    "12.26"
   ],
   "doors": {
    "programmer": "One habit across seven kinds of data, with graphs still lacking the small function: a small constructor, a pattern in a string, `Match`. The pattern is data you can read and compose. Use the ones with a guard: text, numbers, tables, matrices and graphs, the last two with the gaps of section 7, and build nothing on the cache of a reused list pattern.",
    "analyst": "A data-quality rule is a sentence of the table language. The person who owns the data can read it.",
    "designer": "A pattern states a shape the interface can show before the data arrives, and a half-typed value is answered on the way.",
    "decision-maker": "A rule is a line and not a procedure. It can be reviewed, and its verdict is 1 or 0. Say beside it that a pattern with an unknown word is not refused, and that a graph arrow means *later*.",
    "educator": "The course teaches patterns in two chapters, in English, French, Arabic and Hausa. The ladder is a curriculum: text, list, number.",
    "agent": "A pattern is a small closed notation that an agent can be held to and can read back. Be told that none of the six media that are not text can yet refuse a word it does not know, and that writing a pattern from examples is reserved."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3097,
   "french": true,
   "text": "agents/ch15-pattern-languages.md",
   "run": {
    "ran": "2026-10-15 12:59 UTC+01:00",
    "kept": 13,
    "runnable": 13
   }
  },
  {
   "number": 16,
   "id": "seven-languages-one-door",
   "title": "Seven languages, one door",
   "slug": "ch16-seven-languages-one-door",
   "kind": "chapter",
   "part": 3,
   "appendix": null,
   "law": null,
   "principle": "A facet is a syntax of one grammar, and never a runtime. A door is a runtime, and never a syntax. The door is one, and it is the answer to \"what about language X\".",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "a closed registry of six foreign runtimes and a process-based call that brings Python's and NodeJS's results home as lists; the trust postures; the twin's rehearsal of a spawn; a reader of Python and of JavaScript into one code graph",
    "designed": "the door governed, with a posture asked at the call; the engine's bridge and its three tiers; the domain library on top of the door; Haro wearing a Python syntax and a JavaScript one",
    "absent": "a door whose way back is closed; a door for R that runs; a passing run of a foreign runtime in the library's own court; the AI model as a door"
   },
   "guards": [
    {
     "name": "51_extercode_narrated",
     "exists": true,
     "path": "base/test/extercode/51_extercode_narrated.ring",
     "assertions": 11,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/extercode/51_extercode_narrated.ring"
    },
    {
     "name": "governance_narrated",
     "exists": true,
     "path": "base/test/governance/governance_narrated.ring",
     "assertions": 19,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/governance/governance_narrated.ring"
    },
    {
     "name": "virtual_environment_twin_narrated",
     "exists": true,
     "path": "base/test/system/virtual_environment_twin_narrated.ring",
     "assertions": 38,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/virtual_environment_twin_narrated.ring"
    },
    {
     "name": "pycodegraph_narrated",
     "exists": true,
     "path": "base/test/meta/pycodegraph_narrated.ring",
     "assertions": 48,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/meta/pycodegraph_narrated.ring"
    },
    {
     "name": "jscodegraph_narrated",
     "exists": true,
     "path": "base/test/meta/jscodegraph_narrated.ring",
     "assertions": 13,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/meta/jscodegraph_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oDoor = new stzExterCode(:python)\naNames = [ \"c\", \"nodejs\", \"julia\", \"r\", \"prolog\", \"python\", \"ring\", \"cobol\" ]\nfor cLang in aNames\n\t? cLang + \": \" + oDoor.IsLanguageSupported(cLang)\nnext\n#--> c: 1\n#--> nodejs: 1\n#--> julia: 1\n#--> r: 1\n#--> prolog: 1\n#--> python: 1\n#--> ring: 0\n#--> cobol: 0",
     "promised": "c: 1\nnodejs: 1\njulia: 1\nr: 1\nprolog: 1\npython: 1\nring: 0\ncobol: 0",
     "output": "c: 1\nnodejs: 1\njulia: 1\nr: 1\nprolog: 1\npython: 1\nring: 0\ncobol: 0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "try\n\toNo = new stzExterCode(:cobol)\ncatch\n\t? cCatchError\ndone\n#--> Language 'cobol' is not supported",
     "promised": "Language 'cobol' is not supported",
     "output": "Language 'cobol' is not supported",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cPython = \"python\"\noPy = new stzExterCode(:python)\noPy {\n\tSetRuntimePath(cPython)\n\tSetCode(\"\nres = { 'numbers': [1, 2, 3, 4, 5], 'mean': sum([1, 2, 3, 4, 5]) / 5 }\n\t\")\n\tExecute()\n\t? @@( Result() )\n\t#--> [ [ \"numbers\", [ 1, 2, 3, 4, 5 ] ], [ \"mean\", 3 ] ]\n\t? CallTrace()[1][:language]\n\t#--> python\n\t? CallTrace()[1][:mode]\n\t#--> interpreted\n\t? isNumber(LastCallDuration())\n\t#--> 1\n}",
     "promised": "[ [ \"numbers\", [ 1, 2, 3, 4, 5 ] ], [ \"mean\", 3 ] ]\npython\ninterpreted\n1",
     "output": "[ [ \"numbers\", [ 1, 2, 3, 4, 5 ] ], [ \"mean\", 3 ] ]\npython\ninterpreted\n1",
     "verdict": "kept",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "aStudents = [ [ \"Alice\", [ 85, 90, 78 ] ], [ \"Bob\", [ 72, 65, 70 ] ] ]\noPy2 = new stzExterCode(:python)\noPy2 {\n\tSetRuntimePath(cPython)\n\tSetCode(\"\nstudents = \" + @@(aStudents) + \"\nres = [ [ s[0], round(sum(s[1]) / len(s[1]), 2) ] for s in students ]\n\t\")\n\tExecute()\n\taAverages = Result()\n}\n? @@(aAverages)\n#--> [ [ \"Alice\", 84.33 ], [ \"Bob\", 69 ] ]\noNode = new stzExterCode(:nodejs)\noNode {\n\tSetCode(\"\nconst avgs = \" + @@(aAverages) + \";\nconst res = avgs.map(a => [ a[0], a[1] >= 80 ? 'Excellent' : 'Needs work' ]);\n\t\")\n\tExecute()\n\t? @@( Result() )\n\t#--> [ [ \"Alice\", \"Excellent\" ], [ \"Bob\", \"Needs work\" ] ]\n}",
     "promised": "[ [ \"Alice\", 84.33 ], [ \"Bob\", 69 ] ]\n[ [ \"Alice\", \"Excellent\" ], [ \"Bob\", \"Needs work\" ] ]",
     "output": "[ [ \"Alice\", 84.33 ], [ \"Bob\", 69 ] ]\n[ [ \"Alice\", \"Excellent\" ], [ \"Bob\", \"Needs work\" ] ]",
     "verdict": "kept",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "cPy = \"class Animal:\" + nl +\n      \"    def speak(self):\" + nl +\n      \"        return '...'\" + nl +\n      \"\" + nl +\n      \"class Dog(Animal):\" + nl +\n      \"    def speak(self):\" + nl +\n      \"        return 'woof'\"\ncJs = \"class Animal { speak() { return '...' } }\" + nl +\n      \"class Dog extends Animal { speak() { return 'woof' } }\"\nStzPyCodeGraphFromSourceTS(cPy) {\n\t? Language()\n\t#--> python\n\t? @@( ParentsOf(\"Dog\") )\n\t#--> [ \"Animal\" ]\n\t? @@( OwnersOf(\"speak\") )\n\t#--> [ \"Animal\", \"Dog\" ]\n}\nStzJsCodeGraphFromSourceTS(cJs) {\n\t? Language()\n\t#--> javascript\n\t? @@( ParentsOf(\"Dog\") )\n\t#--> [ \"Animal\" ]\n\t? @@( OwnersOf(\"speak\") )\n\t#--> [ \"Animal\", \"Dog\" ]\n}",
     "promised": "python\n[ \"Animal\" ]\n[ \"Animal\", \"Dog\" ]\njavascript\n[ \"Animal\" ]\n[ \"Animal\", \"Dog\" ]",
     "output": "python\n[ \"Animal\" ]\n[ \"Animal\", \"Dog\" ]\njavascript\n[ \"Animal\" ]\n[ \"Animal\", \"Dog\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oGov = new stzGovernance(\"shop\")\noGov {\n\t? MayExecute(\"python\")\n\t#--> 0\n\t? Why()\n\t#--> refused: 'python' has NO declared trust posture\n\tDeclarePosture(\"python\", :External)\n\t? MayExecute(\"python\")\n\t#--> 1\n\t? Why()\n\t#--> allowed: posture 'external' declared\n}",
     "promised": "0\nrefused: 'python' has NO declared trust posture\n1\nallowed: posture 'external' declared",
     "output": "0\nrefused: 'python' has NO declared trust posture\n1\nallowed: posture 'external' declared",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzVirtualEnvironmentQ() {\n\tSpawn(\"python analyse.py\")\n\t? NumberOfPendingSpawns()\n\t#--> 1\n\toPlan = GenerateUpdatePlan()\n}\n? oPlan.Narration()\n#--> Update plan (1 of 1 operations to commit):\n#-->   * 1. spawn process: python analyse.py\n? @@( oPlan.Risks() )\n#--> [ [ 1, \"RUNS an external command (side effects): spawn process: python analyse.py\" ] ]",
     "promised": "1\nUpdate plan (1 of 1 operations to commit):\n* 1. spawn process: python analyse.py\n[ [ 1, \"RUNS an external command (side effects): spawn process: python analyse.py\" ] ]",
     "output": "1\nUpdate plan (1 of 1 operations to commit):\n  * 1. spawn process: python analyse.py\n\n[ [ 1, \"RUNS an external command (side effects): spawn process: python analyse.py\" ] ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oGov2 = new stzGovernance(\"shop\")\n? oGov2.MayExecute(\"python\")\n#--> 0\noPy3 = new stzExterCode(:python)\noPy3 {\n\tSetRuntimePath(cPython)\n\tSetCode(\"res = 6 * 7\")\n\tExecute()\n\t? Result()\n\t#--> 42\n}",
     "promised": "0\n42",
     "output": "0\n42",
     "verdict": "kept",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "oPy4 = new stzExterCode(:python)\noPy4.SetRuntimePath(cPython)\noPy4.SetCode(`\nres = \"x' + upper('y') + 'z\"\n`)\noPy4.Execute()\n? oPy4.Result()\n#--> xYz",
     "promised": "xYz",
     "output": "xYz",
     "verdict": "kept",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "oStat = new stzExterCode(:R)\noStat {\n\tSetCode(\"res <- c(1, 2, 3)\")\n\tbRaised = 0\n\ttry\n\t\tExecute()\n\tcatch\n\t\tbRaised = 1\n\tdone\n\t? bRaised\n\t#--> 1\n\t? CallTrace()[1][:exitcode]\n\t#--> 0\n}",
     "promised": "1\n0",
     "output": "1\n0",
     "verdict": "kept",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "oDoor = new stzExterCode(:python)\n# promise: the door answers \"julia\" with ...\n# promise: the door answers \"ring\" with ...\n# promise: asking for \"cobol\" raises with the sentence ...\noGov = new stzGovernance(\"mine\")\n# promise: oGov.MayExecute(\"prolog\") before any posture is declared gives ...\n# promise: after oGov.DeclarePosture(\"prolog\", :External), it gives ...",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "oPy4 = new stzExterCode(:python)\noPy4.SetRuntimePath(cPython)\noPy4.SetCode(`\nres = \"it's fine\"\n`)\noPy4.Execute()\n? oPy4.Result()",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": [
      "the system"
     ]
    }
   ],
   "narrations": [
    "stzexcis-polyglot-programming-in-ring.md",
    "stzexterlib-domain-driven-polyglot-programming.md",
    "stzexcis-performance-battle.md",
    "stz-pycode-bridging-ring-and-python-narration.md"
   ],
   "rulings": [
    "12.19",
    "12.20",
    "12.21",
    "12.22",
    "12.28",
    "12.29"
   ],
   "doors": {
    "programmer": "You write Haro and, for the layer another language does best, you hand it a string of code and a list of data and take a list back. In the plan, a Python or JavaScript programmer will also write Haro in a syntax they know. Two different things: a syntax brings you, and a runtime brings your libraries.",
    "analyst": "The statistical layer is R's, the machine-learning layer Python's, the logic layer Prolog's. You stay in one file and one list of results. The R door is in development and raises today, and the record says so.",
    "designer": "There is nothing to design at the door itself. The record's lesson is its refusal: a language not on the list is refused by name, and \"what about my language\" has one answer.",
    "decision-maker": "The door is the one place where the closure ends, by decision. At this commit its governance is designed and not yet built, and its way back, not yet closed, reaches host code. The vision's word \"governed\" is a design. Every call's duration is recorded in the trace today.",
    "educator": "A learner sees which layer belongs to which language and runs a two-door pipeline. The lesson is the difference between reading a language, running it, and writing in its syntax.",
    "agent": "You never reach the door by yourself. A function in an AI agent's file must carry a posture, and `external` fits a foreign runtime; and an AI model has no capability to produce effects (chapter 20)."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3360,
   "french": true,
   "text": "agents/ch16-seven-languages-one-door.md",
   "run": {
    "ran": "2026-10-15 12:59 UTC+01:00",
    "kept": 10,
    "runnable": 10
   }
  },
  {
   "number": 17,
   "id": "law-programmatic-by-default",
   "title": "Law: programmatic by default, the model last, admission over generation",
   "slug": "ch17-law-programmatic-by-default",
   "kind": "chapter",
   "part": 4,
   "appendix": null,
   "law": "programmatic by default, the model last, admission over generation",
   "principle": "The mind is programmatic by default; a model is one faculty among others, the last one called, and what it says is a proposal that the court admits or refuses.",
   "spine": true,
   "status": "draft",
   "stage": {
    "built": "the domain language model's first rung and its second, a small bigram; the conversation that asks; derivation with its proof; the programmatic agent; the gate that refuses an ungoverned AI model",
    "designed": "the thinking machine's cascade across faculties; the decision stack, its pieces beside the agent and not yet inside it; the typed unit of prediction, a design of the estate's with five validation stages and no chain of them in the library; the negotiation between an agent and its reviewer",
    "absent": "four of the library's five own agents, induction from examples among them"
   },
   "guards": [
    {
     "name": "dlm_narrated",
     "exists": true,
     "path": "base/test/learning/dlm_narrated.ring",
     "assertions": 16,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/learning/dlm_narrated.ring"
    },
    {
     "name": "wisecoding_narrated",
     "exists": true,
     "path": "base/test/conversation/wisecoding_narrated.ring",
     "assertions": 13,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/conversation/wisecoding_narrated.ring"
    },
    {
     "name": "knowledge_integration_narrated",
     "exists": true,
     "path": "base/test/natural/knowledge_integration_narrated.ring",
     "assertions": 19,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/knowledge_integration_narrated.ring"
    },
    {
     "name": "agentgraph_narrated",
     "exists": true,
     "path": "base/test/agentic/agentgraph_narrated.ring",
     "assertions": 11,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/agentic/agentgraph_narrated.ring"
    },
    {
     "name": "piagent_narrated",
     "exists": true,
     "path": "base/test/agentic/piagent_narrated.ring",
     "assertions": 14,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/agentic/piagent_narrated.ring"
    },
    {
     "name": "ownagentstack_narrated",
     "exists": true,
     "path": "base/test/agentic/ownagentstack_narrated.ring",
     "assertions": 10,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/agentic/ownagentstack_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oKB = new stzKnowledgeGraph(\"restaurant\")\noKB {\n\tKnow(\"margherita\", \"dish\")\n\tKnowRelation(\"margherita\", \"contains\", \"tomato-sauce\")\n\tKnowRelation(\"margherita\", \"contains\", \"mozzarella\")\n}\noDLM = StzDlmQ(oKB)\noDLM {\n\t? Ask(\"margherita contains what?\")\n\t#--> Margherita contains tomato-sauce and mozzarella.\n\t? Why()\n\t#--> recorded fact(s): 'margherita' contains tomato-sauce, mozzarella\n\t? AskXT(\"margherita contains what?\")[:certainty]\n\t#--> 1\n\t? Ask(\"who won the 1998 world cup?\")\n\t#--> That is outside the 'restaurant' domain (I know 1 entities and 1 relations).\n}",
     "promised": "Margherita contains tomato-sauce and mozzarella.\nrecorded fact(s): 'margherita' contains tomato-sauce, mozzarella\n1\nThat is outside the 'restaurant' domain (I know 1 entities and 1 relations).",
     "output": "Margherita contains tomato-sauce and mozzarella.\nrecorded fact(s): 'margherita' contains tomato-sauce, mozzarella\n1\nThat is outside the 'restaurant' domain (I know 1 entities and 1 relations).",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzKnowledgeGraphQ(\"menu\") {\n\tKnow(\"margherita\", \"dish\")\n\tKnow(\"tiramisu\", \"dish\")\n\tAddConversationQ(\"setup\").SetGoal(StzGoalQ().RequireEach(\"dish\", \"contains\"))\n\t? AskIn(\"setup\")\n\t#--> What does 'margherita' have for 'contains'?  (why: every dish needs 'contains')\n\ttry\n\t\tConcludeIn(\"setup\", \"menu\")\n\tcatch\n\t\t? cCatchError\n\tdone\n\t#--> Can't conclude: 2 gap(s) remain -- the wise-coding loop is not done. Ask the next question.\n}",
     "promised": "What does 'margherita' have for 'contains'?  (why: every dish needs 'contains')\nCan't conclude: 2 gap(s) remain -- the wise-coding loop is not done. Ask the next question.",
     "output": "What does 'margherita' have for 'contains'?  (why: every dish needs 'contains')\nCan't conclude: 2 gap(s) remain -- the wise-coding loop is not done. Ask the next question.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzKnowledgeGraphQ(\"kitchen\") {\n\tConstrainRelation(\"contains\", :Transitive)\n\tKnowRelation(\"margherita\", \"contains\", \"tomato-sauce\").\n\t    KnowRelation(\"tomato-sauce\", \"contains\", \"tomato\")\n\t? Prove([ \"margherita\", \"contains\", \"tomato\" ])[:narration]\n\t#--> proved: margherita contains tomato-sauce contains tomato\n\t? Prove([ \"margherita\", \"contains\", \"luigi\" ])[:narration]\n\t#--> not derivable: no recorded fact or lawful chain gives 'margherita' contains 'luigi'\n}",
     "promised": "proved: margherita contains tomato-sauce contains tomato\nnot derivable: no recorded fact or lawful chain gives 'margherita' contains 'luigi'",
     "output": "proved: margherita contains tomato-sauce contains tomato\nnot derivable: no recorded fact or lawful chain gives 'margherita' contains 'luigi'",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oG = new stzAgentGraph(\"mailer\")\noG {\n\tAddLLMActor(\"writer\")\n\tAddEffect(\"send\")\n\tProposes(\"writer\", \"send\")\n\t? IsSound()\n\t#--> 0\n\t? len(Violations())\n\t#--> 3\n}",
     "promised": "0\n3",
     "output": "0\n3",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oF = new stzLLMFunction(\"sum\")\noF {\n\tSetPrompt(\"summarize: {input}\")\n\tBudget(2)\n\tSeedAnswer(\"hello world\", \"a greeting\")\n}\noLLM = new stzLLMAgent(\"summarizer\")\noLLM {\n\tSetSkillFrom(oF)\n\t? Propose(\"hello world\")\n\t#--> a greeting\n\t? HoldsEffectful()\n\t#--> 0\n}",
     "promised": "a greeting\n0",
     "output": "a greeting\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oRog = new stzPIAgent(\"rogue-bot\")\noRog.MemoryQ().Learn(\"stock\", \"level\", \"low\")\noRog.GovernanceQ().DeclareRisk(\"order-stock\", 2)\noSk = new stzAgentSkill(\"restock\")\noSk.SetWhen(func oM { return oM.Fact(\"stock\", \"level\", \"low\") })\noSk.SetDoes(func oM { oM.Learn(\"stock\", \"level\", \"ordered\")  return 1 })\noRog.AddGovernedSkill(oSk, \"order-stock\")\n? oRog.Pursue()\n#--> 0\n? oRog.DecisionLog()[1][:why]\n#--> refused: 'rogue-bot' lacks PERMISSION (can) for 'order-stock'",
     "promised": "0\nrefused: 'rogue-bot' lacks PERMISSION (can) for 'order-stock'",
     "output": "0\nrefused: 'rogue-bot' lacks PERMISSION (can) for 'order-stock'",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? len(StzOwnAgents())\n#--> 5\n? StzOwnAgentIsWired(\"wise-coder\")\n#--> 1\n? StzOwnAgentIsWired(\"induction\")\n#--> 0",
     "promised": "5\n1\n0",
     "output": "5\n1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? oDLM.Ask(\"what does margherita contain?\")\n#--> Margherita is a dish.",
     "promised": "Margherita is a dish.",
     "output": "Margherita is a dish.",
     "verdict": "kept",
     "effects": []
    }
   ],
   "narrations": [
    "stz-agents-that-cannot-hurt-you-narration.md",
    "stz-service-virtualization-code-first-subscribe-later.md",
    "stz-knowledge-programming-narration.md"
   ],
   "rulings": [
    "12.18",
    "12.19",
    "12.25",
    "12.26",
    "12.29"
   ],
   "doors": {
    "programmer": "Your agent's mind is code you can test with ordinary promises. An AI model may serve as one faculty; it can never hold an effect.",
    "analyst": "A fact or a rule you add makes the system know more, with no code change and no training, and every answer carries its why.",
    "designer": "The system asks the user one accountable question at a time, and the question is handed to any door as a frame, so that a terminal, a page or an agent can render it. Only the terminal ran here.",
    "decision-maker": "A decision costs nothing per call, runs offline and is the same tomorrow. The four agents still reserved are the next step.",
    "educator": "The conversation asks and never answers first, and it uses a model's fluency only when a model is there, so a learner always sees the floor.",
    "agent": "You may propose. You may not commit. A refusal names its law, and you can learn the platform from the platform and be corrected by it."
   },
   "sections": [
    {
     "n": null,
     "title": "What the AI age changes here"
    },
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 2908,
   "french": true,
   "text": "agents/ch17-law-programmatic-by-default.md",
   "run": {
    "ran": "2026-10-15 12:59 UTC+01:00",
    "kept": 8,
    "runnable": 8
   }
  },
  {
   "number": 18,
   "id": "the-five-registers",
   "title": "The five registers, and conversations that ask",
   "slug": "ch18-the-five-registers",
   "kind": "chapter",
   "part": 4,
   "appendix": null,
   "law": null,
   "principle": "A reply may come in any of five forms. Whatever the form, it is only a candidate, and the world's rules decide whether it becomes knowledge.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "the goal, the gap and the question with its reason; a reply as an option, a data structure or a sentence split on commas and the word 'and'; the governed door with its refusals; the checkpoint with its lifetime; the goal fulfilled or revoked; one wired AI agent that stops where it would have to invent",
    "designed": "several readings of one reply, enumerated for the person to choose; the nearest alternatives named after a refusal; the example written back as a promise",
    "absent": "the formula register; the example register; a conversation whose question is worded in Arabic, Hausa or French; a value with a space in it"
   },
   "guards": [
    {
     "name": "wisecoding_narrated",
     "exists": true,
     "path": "base/test/conversation/wisecoding_narrated.ring",
     "assertions": 13,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/conversation/wisecoding_narrated.ring"
    },
    {
     "name": "wisecoding_rich_narrated",
     "exists": true,
     "path": "base/test/conversation/wisecoding_rich_narrated.ring",
     "assertions": 52,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/conversation/wisecoding_rich_narrated.ring"
    },
    {
     "name": "ownagentstack_narrated",
     "exists": true,
     "path": "base/test/agentic/ownagentstack_narrated.ring",
     "assertions": 10,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/agentic/ownagentstack_narrated.ring"
    },
    {
     "name": "tutor_gaps_narrated",
     "exists": true,
     "path": "base/test/education/tutor_gaps_narrated.ring",
     "assertions": 29,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/education/tutor_gaps_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oKB = new stzKnowledgeGraph(\"pizzeria\")\noKB {\n\tKnow(\"pizza1\", \"dish\")\n\tKnow(\"pizza2\", \"dish\")\n\tKnow(\"pizza3\", \"dish\")\n\tKnow(\"pizza4\", \"dish\")\n\tAddConversationQ(\"frame\").SetGoal(StzGoalQ().RequireEach(\"dish\", \"topping\"))\n\tAskIn(\"frame\")\n\tReplyIn(\"frame\", \"cheese\")\n\tAskIn(\"frame\")\n\tReplyIn(\"frame\", \"olives\")\n\t? AskIn(\"frame\")\n\t#--> Which 'topping' does 'pizza3' have? (1) cheese  (2) olives -- or answer freely.  (why: every dish needs 'topping')\n\t? @@(ReplyIn(\"frame\", 2)[:admitted])\n\t#--> [ \"olives\" ]\n}",
     "promised": "Which 'topping' does 'pizza3' have? (1) cheese  (2) olives -- or answer freely.  (why: every dish needs 'topping')\n[ \"olives\" ]",
     "output": "Which 'topping' does 'pizza3' have? (1) cheese  (2) olives -- or answer freely.  (why: every dish needs 'topping')\n[ \"olives\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKB {\n\t? AskIn(\"frame\")\n\t#--> Which 'topping' does 'pizza4' have? (1) cheese  (2) olives -- or answer freely.  (why: every dish needs 'topping')\n\taV = ReplyIn(\"frame\", 99)\n\t? @@(aV[:admitted])\n\t#--> [ ]\n\t? @@(aV[:refused])\n\t#--> [ [ \"(99)\", \"no such option\" ] ]\n\t? ConversationQ(\"frame\").Checkpoints()[1][:why]\n\t#--> no option (99) was offered -- 2 option(s) on the table\n\t? aV[:goalState]\n\t#--> pursuing\n}",
     "promised": "Which 'topping' does 'pizza4' have? (1) cheese  (2) olives -- or answer freely.  (why: every dish needs 'topping')\n[ ]\n[ [ \"(99)\", \"no such option\" ] ]\nno option (99) was offered -- 2 option(s) on the table\npursuing",
     "output": "Which 'topping' does 'pizza4' have? (1) cheese  (2) olives -- or answer freely.  (why: every dish needs 'topping')\n[ ]\n[ [ \"(99)\", \"no such option\" ] ]\nno option (99) was offered -- 2 option(s) on the table\npursuing",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKF = new stzKnowledgeGraph(\"pizzeria2\")\noKF {\n\tKnow(\"p1\", \"dish\")\n\tKnow(\"p2\", \"dish\")\n\tAddConversationQ(\"f\").SetGoal(StzGoalQ().RequireEach(\"dish\", \"topping\"))\n\t? AskInXT(\"f\")[:force]\n\t#--> what\n\tReplyIn(\"f\", \"cheese\")\n\taQ = AskInXT(\"f\")\n\t? aQ[:force]\n\t#--> which\n\t? @@(aQ[:options])\n\t#--> [ \"cheese\" ]\n}",
     "promised": "what\nwhich\n[ \"cheese\" ]",
     "output": "what\nwhich\n[ \"cheese\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKD = new stzKnowledgeGraph(\"desserts\")\noKD {\n\tKnow(\"tiramisu\", \"dish\")\n\tAddConversationQ(\"setup\").SetGoal(StzGoalQ().RequireEach(\"dish\", \"contains\"))\n\tAskIn(\"setup\")\n\taV = ReplyIn(\"setup\", [ \"mascarpone\", \"espresso\" ])\n\t? @@(aV[:admitted])\n\t#--> [ \"mascarpone\", \"espresso\" ]\n\t? aV[:goalState]\n\t#--> fulfilled\n}",
     "promised": "[ \"mascarpone\", \"espresso\" ]\nfulfilled",
     "output": "[ \"mascarpone\", \"espresso\" ]\nfulfilled",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKM = new stzKnowledgeGraph(\"menu\")\noKM {\n\tKnow(\"margherita\", \"dish\")\n\tAddConversationQ(\"setup\").SetGoal(StzGoalQ().RequireEach(\"dish\", \"contains\"))\n\tAskIn(\"setup\")\n\tReplyIn(\"setup\", \"tomato-sauce and mozzarella\")\n\t? ConversationQ(\"setup\").Transcript()\n\t#--> SOFTANZA: Goal adopted -- this conversation is now accountable for it.\n\t#--> SOFTANZA: What does 'margherita' have for 'contains'?  (why: every dish needs 'contains')\n\t#--> YOU:      tomato-sauce and mozzarella\n\t#-->   -> admitted: 'margherita' contains 'tomato-sauce'\n\t#-->   -> admitted: 'margherita' contains 'mozzarella'\n\t#--> SOFTANZA: Goal fulfilled: every required slot is filled in 'menu'\n}",
     "promised": "SOFTANZA: Goal adopted -- this conversation is now accountable for it.\nSOFTANZA: What does 'margherita' have for 'contains'?  (why: every dish needs 'contains')\nYOU:      tomato-sauce and mozzarella\n-> admitted: 'margherita' contains 'tomato-sauce'\n-> admitted: 'margherita' contains 'mozzarella'\nSOFTANZA: Goal fulfilled: every required slot is filled in 'menu'",
     "output": "SOFTANZA: Goal adopted -- this conversation is now accountable for it.\nSOFTANZA: What does 'margherita' have for 'contains'?  (why: every dish needs 'contains')\nYOU:      tomato-sauce and mozzarella\n  -> admitted: 'margherita' contains 'tomato-sauce'\n  -> admitted: 'margherita' contains 'mozzarella'\nSOFTANZA: Goal fulfilled: every required slot is filled in 'menu'",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKS = new stzKnowledgeGraph(\"staffing\")\noKS {\n\tAddConversationQ(\"s\").SetGoal(StzGoalQ().RequireOne(\"kitchen3\", \"led-by\"))\n\tConstrainRelation(\"led-by\", :Unique)\n\tAskIn(\"s\")\n\taV = ReplyIn(\"s\", \"mario and giovanni\")\n\t? @@(aV[:admitted])\n\t#--> [ \"mario\" ]\n\t? @@(aV[:refused])\n\t#--> [ [ \"giovanni\", \"'kitchen3' already bears 'led-by' (to 'mario'); the relation is :Unique\" ] ]\n\t? len(ConversationQ(\"s\").Checkpoints())\n\t#--> 1\n}",
     "promised": "[ \"mario\" ]\n[ [ \"giovanni\", \"'kitchen3' already bears 'led-by' (to 'mario'); the relation is :Unique\" ] ]\n1",
     "output": "[ \"mario\" ]\n[ [ \"giovanni\", \"'kitchen3' already bears 'led-by' (to 'mario'); the relation is :Unique\" ] ]\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKP = new stzKnowledgeGraph(\"shop\")\noKP {\n\tKnow(\"tea\", \"product\")\n\tAddConversationQ(\"price\").SetGoal(StzGoalQ().RequireEach(\"product\", \"price\"))\n\tAskIn(\"price\")\n\t? @@(ReplyIn(\"price\", \"=12*3\")[:admitted])\n\t#--> [ \"=12*3\" ]\n\t? Query([ \"tea\", \"price\", \"?o\" ])[1]\n\t#--> =12*3\n}",
     "promised": "[ \"=12*3\" ]\n=12*3",
     "output": "[ \"=12*3\" ]\n=12*3",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKX = new stzKnowledgeGraph(\"phones\")\noKX {\n\tKnow(\"contact1\", \"contact\")\n\tAddConversationQ(\"fmt\").SetGoal(StzGoalQ().RequireEach(\"contact\", \"number-pattern\"))\n\tAskIn(\"fmt\")\n\taV = ReplyIn(\"fmt\", [ [ \"+216-21-298-374\", \"valid\" ], [ \"+33-6-12-34-56-78\", \"valid\" ] ])\n\t? @@(aV[:admitted])\n\t#--> [ ]\n\t? @@(aV[:refused])\n\t#--> [ ]\n\t? aV[:goalState]\n\t#--> pursuing\n\t? len(ConversationQ(\"fmt\").Checkpoints())\n\t#--> 0\n}\ntry\n\tStzOwnAgent(\"induction\")\ncatch\n\t? cCatchError\ndone\n#--> Softanza's own agent 'induction' is RESERVED, not wired yet -- refusing rather than returning a stub (LAW 3). See StzOwnAgents().",
     "promised": "[ ]\n[ ]\npursuing\n0\nSoftanza's own agent 'induction' is RESERVED, not wired yet -- refusing rather than returning a stub (LAW 3). See StzOwnAgents().",
     "output": "[ ]\n[ ]\npursuing\n0\nSoftanza's own agent 'induction' is RESERVED, not wired yet -- refusing rather than returning a stub (LAW 3). See StzOwnAgents().",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKT = new stzKnowledgeGraph(\"ttl\")\noKT {\n\tAddConversationQ(\"t\").SetGoal(StzGoalQ().RequireOne(\"kitchen\", \"led-by\"))\n\tAskIn(\"t\")\n\tReplyIn(\"t\", 7)\n\t? len(ConversationQ(\"t\").Checkpoints())\n\t#--> 1\n\tConversationQ(\"t\").SetCheckpointTTL(1)\n\tAskIn(\"t\")\n\tAskIn(\"t\")\n\t? len(ConversationQ(\"t\").Checkpoints())\n\t#--> 0\n\t? len(ConversationQ(\"t\").AllCheckpoints())\n\t#--> 1\n}",
     "promised": "1\n0\n1",
     "output": "1\n0\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKG = new stzKnowledgeGraph(\"lifecycle\")\noKG {\n\tKnow(\"d1\", \"dish\")\n\tKnow(\"d2\", \"dish\")\n\tAddConversationQ(\"s1\").SetGoal(StzGoalQ().RequireEach(\"dish\", \"sauce\"))\n\tAddConversationQ(\"s2\").SetGoal(StzGoalQ().RequireEach(\"dish\", \"garnish\"))\n\t? ConversationQ(\"s1\").GoalState()\n\t#--> pursuing\n\tAskIn(\"s1\")\n\tReplyIn(\"s1\", \"pesto\")\n\tAskIn(\"s1\")\n\tReplyIn(\"s1\", \"pesto\")\n\t? ConversationQ(\"s1\").GoalState()\n\t#--> fulfilled\n\t? ConversationQ(\"s1\").GoalWhy()\n\t#--> every required slot is filled in 'lifecycle'\n\tAskIn(\"s2\")\n\tConversationQ(\"s2\").RevokeGoal(\"out of scope tonight\")\n\t? ConversationQ(\"s2\").GoalState()\n\t#--> revoked\n\t? ConversationQ(\"s2\").GoalWhy()\n\t#--> out of scope tonight\n\t? len(OpenConversations())\n\t#--> 0\n}",
     "promised": "pursuing\nfulfilled\nevery required slot is filled in 'lifecycle'\nrevoked\nout of scope tonight\n0",
     "output": "pursuing\nfulfilled\nevery required slot is filled in 'lifecycle'\nrevoked\nout of scope tonight\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKW = new stzKnowledgeGraph(\"menu\")\noKW.Know(\"margherita\", \"dish\")\noKW.Know(\"tiramisu\", \"dish\")\nanswers = [ [ \"margherita\", \"tomato-sauce\" ], [ \"tiramisu\", \"mascarpone\" ] ]\naR = StzOwnAgent(\"wise-coder\").PursueGoal(StzGoalQ().RequireEach(\"dish\", \"contains\"), oKW, func subj, rel {\n\tfor a in answers\n\t\tif a[1] = subj\n\t\t\treturn a[2]\n\t\tok\n\tnext\n\treturn \"\"\n})\n? aR[:filled]\n#--> 1\n? aR[:asked]\n#--> 2\n? aR[:why]\n#--> goal filled in 2 question(s), governed admission throughout\noKV = new stzKnowledgeGraph(\"desserts\")\noKV.Know(\"panna-cotta\", \"dish\")\naR2 = StzOwnAgent(\"wise-coder\").PursueGoal(StzGoalQ().RequireEach(\"dish\", \"contains\"), oKV, func subj, rel { return \"\" })\n? aR2[:filled]\n#--> 0\n? aR2[:why]\n#--> stopped: no answer for 'panna-cotta' / 'contains' -- gap left for a human",
     "promised": "1\n2\ngoal filled in 2 question(s), governed admission throughout\n0\nstopped: no answer for 'panna-cotta' / 'contains' -- gap left for a human",
     "output": "1\n2\ngoal filled in 2 question(s), governed admission throughout\n0\nstopped: no answer for 'panna-cotta' / 'contains' -- gap left for a human",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKA = new stzKnowledgeGraph(\"مطعم\")\noKA {\n\tKnow(\"بيتزا\", \"dish\")\n\tAddConversationQ(\"c\").SetGoal(StzGoalQ().RequireEach(\"dish\", \"contains\"))\n\t? AskIn(\"c\")\n\t#--> What does 'بيتزا' have for 'contains'?  (why: every dish needs 'contains')\n\taV = ReplyIn(\"c\", [ \"جبن\", \"طماطم\" ])\n\t? @@(aV[:admitted])\n\t#--> [ \"جبن\", \"طماطم\" ]\n\t? aV[:goalState]\n\t#--> fulfilled\n}",
     "promised": "What does 'بيتزا' have for 'contains'?  (why: every dish needs 'contains')\n[ \"جبن\", \"طماطم\" ]\nfulfilled",
     "output": "What does 'بيتزا' have for 'contains'?  (why: every dish needs 'contains')\n[ \"جبن\", \"طماطم\" ]\nfulfilled",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKH = new stzKnowledgeGraph(\"menu\")\noKH {\n\tKnow(\"pizza\", \"dish\")\n\tAddConversationQ(\"c\").SetGoal(StzGoalQ().RequireEach(\"dish\", \"contains\"))\n\tAskIn(\"c\")\n}\ncCandidate = NaturallyIn(\"ha\", \"Yi rubutu dauke 'jibini' Maida shi\").Result()\n? cCandidate\n#--> JIBINI\naV = oKH.ReplyIn(\"c\", cCandidate)\n? aV[:narration]\n#--> admitted: 'pizza' contains 'jibini'",
     "promised": "JIBINI\nadmitted: 'pizza' contains 'jibini'",
     "output": "JIBINI\nadmitted: 'pizza' contains 'jibini'",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oEx = StzProgramQ(\"../../education/program\").CourseQ(\"elementary-introduction\").ExerciseQ(\"ex-01-01\")\noEx {\n\t? GapText(\"finds\", \"en\")\n\t#--> Where are the repeated items? Which line of your program asks for their positions? (why: the mental model finds before it applies)\n\t? GapText(\"finds\", \"fr\")\n\t#--> Où sont les éléments répétés ? Quelle ligne de votre programme demande leurs positions ? (pourquoi : le modèle mental trouve avant d'agir)\n\t? GapText(\"finds\", \"ar\")\n\t#--> أين العناصر المكررة؟ أيّ سطر في برنامجك يسأل عن مواضعها؟ (لماذا: النموذج الذهني يبحث قبل أن يطبّق)\n\t? GapText(\"finds\", \"ha\")\n\t#--> Ina abubuwan da aka maimaita? Wane layi a shirinka yake tambayar wurarensu? (dalili: tsarin tunani yana nemo kafin ya aiwatar)\n}",
     "promised": "Where are the repeated items? Which line of your program asks for their positions? (why: the mental model finds before it applies)\nOù sont les éléments répétés ? Quelle ligne de votre programme demande leurs positions ? (pourquoi : le modèle mental trouve avant d'agir)\nأين العناصر المكررة؟ أيّ سطر في برنامجك يسأل عن مواضعها؟ (لماذا: النموذج الذهني يبحث قبل أن يطبّق)\nIna abubuwan da aka maimaita? Wane layi a shirinka yake tambayar wurarensu? (dalili: tsarin tunani yana nemo kafin ya aiwatar)",
     "output": "Where are the repeated items? Which line of your program asks for their positions? (why: the mental model finds before it applies)\nOù sont les éléments répétés ? Quelle ligne de votre programme demande leurs positions ? (pourquoi : le modèle mental trouve avant d'agir)\nأين العناصر المكررة؟ أيّ سطر في برنامجك يسأل عن مواضعها؟ (لماذا: النموذج الذهني يبحث قبل أن يطبّق)\nIna abubuwan da aka maimaita? Wane layi a shirinka yake tambayar wurarensu? (dalili: tsarin tunani yana nemo kafin ya aiwatar)",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKF2 = new stzKnowledgeGraph(\"fluency-space\")\noKF2 {\n\tAddConversation(\"f\")\n\t? ConversationQ(\"f\").Fluency()\n\t#--> plain\n\tConversationQ(\"f\").SetFluency(:neural)\n\t? ConversationQ(\"f\").Fluency()\n\t#--> neural\n\t? ConversationQ(\"f\").IsFluencyNeural()\n\t#--> 0\n}",
     "promised": "plain\nneural\n0",
     "output": "plain\nneural\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oWorld = new stzKnowledgeGraph(\"my-world\")\noWorld.Know(\"item1\", \"thing\")\noWorld.Know(\"item2\", \"thing\")\noWorld.AddConversationQ(\"mine\").SetGoal(StzGoalQ().RequireEach(\"thing\", \"colour\"))\noWorld.AskIn(\"mine\")\n# your five replies here, each with the verdict you expect",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "oKX = new stzKnowledgeGraph(\"phones\")\noKX.Know(\"contact1\", \"contact\")\noKX.AddConversationQ(\"fmt\").SetGoal(StzGoalQ().RequireEach(\"contact\", \"number-pattern\"))\noKX.AskIn(\"fmt\")\naV = oKX.ReplyIn(\"fmt\", \"+216-21-298-374,+33-6-12-34-56-78\")\n? @@(aV[:admitted])\n? aV[:goalState]",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-knowledge-programming-narration.md",
    "stznatural-narration.md"
   ],
   "rulings": [
    "12.25",
    "12.26",
    "12.27"
   ],
   "doors": {
    "programmer": "A reply is a verdict you can test with ordinary promises: what was admitted, what was refused, and the state of the goal.",
    "analyst": "The goal is the schema of a complete model. The gaps are the list of what is missing. The transcript and the checkpoints are the evidence of how each fact got in.",
    "designer": "The question comes back as data: force, subject, relation, options, reason. Any medium can render it. The library renders English, and the tutor shows the pattern for four languages.",
    "decision-maker": "A reply is judged before it counts. A refusal reaches a person with its context and a lifetime. The roster is honest: one agent of five is wired, and two of the five registers are not available.",
    "educator": "The tutor is wise coding. It names the missing step as a question and never as the answer, in the learner's language, and its wording in three of those languages awaits a native reviewer.",
    "agent": "You can drive the loop yourself with an answer source, and you must stop where you would have to invent. You cannot offer examples and be understood, and you are told by name when you ask for a reserved agent."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3314,
   "french": true,
   "text": "agents/ch18-the-five-registers.md",
   "run": {
    "ran": "2026-10-15 12:59 UTC+01:00",
    "kept": 15,
    "runnable": 15
   }
  },
  {
   "number": 19,
   "id": "the-domain-language-model",
   "title": "The domain language model",
   "slug": "ch19-the-domain-language-model",
   "kind": "chapter",
   "part": 4,
   "appendix": null,
   "law": null,
   "principle": "The next thing the model says is a checkable unit of your world, a fact your rules admit or refuse, never a token.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "the domain model's first rung with no neurons; its facts rendered as a corpus; a closed vocabulary; completion by lookup; a plain-text bundle that travels with its tests; a small second rung, a bigram, exported to a model file; the admission of a fact by a law",
    "designed": "a grammar derived from a knowledge base by one call; the typed unit of prediction validated in five stages; a second rung whose corpus is checked before it trains; the foundry that would make it larger",
    "absent": "a pipeline that chains the five stages on any unit; an end-of-sentence word for the second rung; a completion that sees the sentence so far"
   },
   "guards": [
    {
     "name": "dlm_narrated",
     "exists": true,
     "path": "base/test/learning/dlm_narrated.ring",
     "assertions": 16,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/learning/dlm_narrated.ring"
    },
    {
     "name": "structuredoutput_narrated",
     "exists": true,
     "path": "base/test/neural/structuredoutput_narrated.ring",
     "assertions": 73,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/neural/structuredoutput_narrated.ring"
    },
    {
     "name": "schema_grammar_narrated",
     "exists": true,
     "path": "base/test/neural/schema_grammar_narrated.ring",
     "assertions": 28,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/neural/schema_grammar_narrated.ring"
    },
    {
     "name": "knowledge_integration_narrated",
     "exists": true,
     "path": "base/test/natural/knowledge_integration_narrated.ring",
     "assertions": 19,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/knowledge_integration_narrated.ring"
    },
    {
     "name": "constrained_decoding_narrated",
     "exists": true,
     "path": "base/test/neural/constrained_decoding_narrated.ring",
     "assertions": 50,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/neural/constrained_decoding_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oKB = new stzKnowledgeGraph(\"restaurant\")\noKB {\n\tKnow(\"margherita\", \"dish\")\n\tKnow(\"tiramisu\", \"dish\")\n\tKnow(\"chianti\", \"wine\")\n\tKnowRelation(\"margherita\", \"contains\", \"tomato-sauce\")\n\tKnowRelation(\"margherita\", \"contains\", \"mozzarella\")\n\tKnowRelation(\"margherita\", \"pairs-with\", \"chianti\")\n}\noDLM = StzDlmQ(oKB)\noDLM {\n\t? @@( GenerateCorpus() )\n\t#--> [ \"margherita is a dish.\", \"tiramisu is a dish.\", \"chianti is a wine.\", \"margherita contains tomato-sauce.\", \"margherita contains mozzarella.\", \"margherita pairs-with chianti.\" ]\n\t? @@( Tokenizer() )\n\t#--> [ \"<unk>\", \"margherita\", \"tiramisu\", \"chianti\", \"dish\", \"wine\", \"contains\", \"pairs-with\", \"is\", \"a\", \"tomato-sauce\", \"mozzarella\" ]\n\t? @@( Tokenize(\"margherita contains something-new\") )\n\t#--> [ 2, 7, 1 ]\n}",
     "promised": "[ \"margherita is a dish.\", \"tiramisu is a dish.\", \"chianti is a wine.\", \"margherita contains tomato-sauce.\", \"margherita contains mozzarella.\", \"margherita pairs-with chianti.\" ]\n[ \"<unk>\", \"margherita\", \"tiramisu\", \"chianti\", \"dish\", \"wine\", \"contains\", \"pairs-with\", \"is\", \"a\", \"tomato-sauce\", \"mozzarella\" ]\n[ 2, 7, 1 ]",
     "output": "[ \"margherita is a dish.\", \"tiramisu is a dish.\", \"chianti is a wine.\", \"margherita contains tomato-sauce.\", \"margherita contains mozzarella.\", \"margherita pairs-with chianti.\" ]\n[ \"<unk>\", \"margherita\", \"tiramisu\", \"chianti\", \"dish\", \"wine\", \"contains\", \"pairs-with\", \"is\", \"a\", \"tomato-sauce\", \"mozzarella\" ]\n[ 2, 7, 1 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oDLM {\n\t? @@( Complete(\"margherita\") )\n\t#--> [ \"contains\", \"pairs-with\" ]\n\t? @@( Complete(\"contains\") )\n\t#--> [ \"tomato-sauce\", \"mozzarella\" ]\n\t? @@( Complete(\"tira\") )\n\t#--> [ \"tiramisu\" ]\n\t? @@( Complete(\"pizza\") )\n\t#--> [ ]\n}",
     "promised": "[ \"contains\", \"pairs-with\" ]\n[ \"tomato-sauce\", \"mozzarella\" ]\n[ \"tiramisu\" ]\n[ ]",
     "output": "[ \"contains\", \"pairs-with\" ]\n[ \"tomato-sauce\", \"mozzarella\" ]\n[ \"tiramisu\" ]\n[ ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "aLex = oDLM.Lexicon()\nacObjects = []\nfor aFact in oKB.Facts()\n\tif aFact[2] != \"is-a\" and find(acObjects, aFact[3]) = 0\n\t\tacObjects + aFact[3]\n\tok\nnext\noS = StzOutputSchemaQ([\n\t[ :field = \"subject\",  :type = :oneof, :choices = aLex[:entities] ],\n\t[ :field = \"relation\", :type = :oneof, :choices = aLex[:relations] ],\n\t[ :field = \"object\",   :type = :oneof, :choices = acObjects ]\n])\n? oS.ToGBNF()\n#--> root ::= subject-line relation-line object-line\n#    subject-line ::= \"subject: \" (\"margherita\" | \"tiramisu\" | \"chianti\") \"\\n\"\n#    relation-line ::= \"relation: \" (\"contains\" | \"pairs-with\") \"\\n\"\n#    object-line ::= \"object: \" (\"tomato-sauce\" | \"mozzarella\" | \"chianti\") \"\\n\"\n#    text ::= [^\\n]+\n#    number ::= \"-\"? [0-9]+ (\".\" [0-9]+)?\n#    boolean ::= (\"yes\" | \"no\" | \"true\" | \"false\")\ncGood = \"subject: margherita\" + nl + \"relation: contains\" + nl + \"object: mozzarella\" + nl\ncOut  = \"subject: pizza\" + nl + \"relation: contains\" + nl + \"object: mozzarella\" + nl\ncLie  = \"subject: tiramisu\" + nl + \"relation: contains\" + nl + \"object: mozzarella\" + nl\n? oS.Accepts(cGood)\n#--> 1\n? oS.Accepts(cOut)\n#--> 0\n? oS.Accepts(cLie)\n#--> 1\n? oDLM.Ask(\"tiramisu contains what?\")\n#--> I hold no 'contains' knowledge about 'tiramisu'.",
     "promised": "root ::= subject-line relation-line object-line\nsubject-line ::= \"subject: \" (\"margherita\" | \"tiramisu\" | \"chianti\") \"\\n\"\nrelation-line ::= \"relation: \" (\"contains\" | \"pairs-with\") \"\\n\"\nobject-line ::= \"object: \" (\"tomato-sauce\" | \"mozzarella\" | \"chianti\") \"\\n\"\ntext ::= [^\\n]+\nnumber ::= \"-\"? [0-9]+ (\".\" [0-9]+)?\nboolean ::= (\"yes\" | \"no\" | \"true\" | \"false\")\n1\n0\n1\nI hold no 'contains' knowledge about 'tiramisu'.",
     "output": "root ::= subject-line relation-line object-line\nsubject-line ::= \"subject: \" (\"margherita\" | \"tiramisu\" | \"chianti\") \"\\n\"\nrelation-line ::= \"relation: \" (\"contains\" | \"pairs-with\") \"\\n\"\nobject-line ::= \"object: \" (\"tomato-sauce\" | \"mozzarella\" | \"chianti\") \"\\n\"\ntext ::= [^\\n]+\nnumber ::= \"-\"? [0-9]+ (\".\" [0-9]+)?\nboolean ::= (\"yes\" | \"no\" | \"true\" | \"false\")\n\n1\n0\n1\nI hold no 'contains' knowledge about 'tiramisu'.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oDLM {\n\tAddGolden(\"what is margherita\", \"Margherita is a dish.\")\n\tAddGolden(\"what is the weather today?\",\n\t\t\"That is outside the 'restaurant' domain (I know 3 entities and 2 relations).\")\n\tcFile = Save(\"probe_dlm\")\n}\n? cFile\n#--> probe_dlm.zdlm\n? read(cFile)\n#--> dlm \"restaurant\"\n#    entities\n#        margherita | dish\n#        tiramisu | dish\n#        chianti | wine\n#    relations\n#        contains\n#        pairs-with\n#    facts\n#        margherita | contains | tomato-sauce\n#        margherita | contains | mozzarella\n#        margherita | pairs-with | chianti\n#    laws\n#    goldens\n#        what is margherita | Margherita is a dish.\n#        what is the weather today? | That is outside the 'restaurant' domain (I know 3 entities and 2 relations).\noShipped = StzDlmQ(\"\")\noShipped {\n\tLoadFrom(cFile)\n\t? Ask(\"what is tiramisu\")\n\t#--> Tiramisu is a dish.\n\t? @@( RunGoldens() )\n\t#--> [ [ \"total\", 2 ], [ \"passed\", 2 ], [ \"failed\", [ ] ] ]\n}\nremove(cFile)\n? fexists(cFile)\n#--> 0",
     "promised": "probe_dlm.zdlm\ndlm \"restaurant\"\nentities\nmargherita | dish\ntiramisu | dish\nchianti | wine\nrelations\ncontains\npairs-with\nfacts\nmargherita | contains | tomato-sauce\nmargherita | contains | mozzarella\nmargherita | pairs-with | chianti\nlaws\ngoldens\nwhat is margherita | Margherita is a dish.\nwhat is the weather today? | That is outside the 'restaurant' domain (I know 3 entities and 2 relations).\nTiramisu is a dish.\n[ [ \"total\", 2 ], [ \"passed\", 2 ], [ \"failed\", [ ] ] ]\n0",
     "output": "probe_dlm.zdlm\ndlm \"restaurant\"\nentities\n    margherita | dish\n    tiramisu | dish\n    chianti | wine\nrelations\n    contains\n    pairs-with\nfacts\n    margherita | contains | tomato-sauce\n    margherita | contains | mozzarella\n    margherita | pairs-with | chianti\nlaws\ngoldens\n    what is margherita | Margherita is a dish.\n    what is the weather today? | That is outside the 'restaurant' domain (I know 3 entities and 2 relations).\n\nTiramisu is a dish.\n[ [ \"total\", 2 ], [ \"passed\", 2 ], [ \"failed\", [ ] ] ]\n0",
     "verdict": "kept",
     "effects": [
      "files"
     ]
    },
    {
     "code": "oDLM {\n\tTrainNeuralRung(500)\n\t? NeuralWhy()\n\t#--> neural bigram rung: 15 pairs over a 12-word vocab; trained 500 epoch(s), lr 0.50: loss 2.57 -> 0.70\n\t? NextToken(\"is\")\n\t#--> a\n\t? NextTokenConfidence(\"is\")\n\t#--> 1.00\n\tcGguf = ExportNeuralGguf(\"probe_bigram\")\n}\n? cGguf\n#--> probe_bigram.gguf\n? StzEngineNeuralGgufInspect(cGguf)\n#--> 2\nremove(cGguf)",
     "promised": "neural bigram rung: 15 pairs over a 12-word vocab; trained 500 epoch(s), lr 0.50: loss 2.57 -> 0.70\na\n1.00\nprobe_bigram.gguf\n2",
     "output": "neural bigram rung: 15 pairs over a 12-word vocab; trained 500 epoch(s), lr 0.50: loss 2.57 -> 0.70\na\n1.00\nprobe_bigram.gguf\n2",
     "verdict": "kept",
     "effects": [
      "files"
     ]
    },
    {
     "code": "aCorpus = oDLM.GenerateCorpus()\nfor cSeed in [ \"tiramisu\", \"chianti\", \"margherita\" ]\n\tcSaid = oDLM.NeuralGenerate(cSeed, 3)\n\t? cSaid + \"  ->  \" + ( find(aCorpus, cSaid + \".\") > 0 )\nnext\n#--> tiramisu is a wine  ->  0\n#    chianti is a wine  ->  1\n#    margherita contains mozzarella is  ->  0",
     "promised": "tiramisu is a wine  ->  0\nchianti is a wine  ->  1\nmargherita contains mozzarella is  ->  0",
     "output": "tiramisu is a wine  ->  0\nchianti is a wine  ->  1\nmargherita contains mozzarella is  ->  0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKB {\n\tConstrainRelation(\"is-a\", :Unique)\n\taVerdict = Admit(\"tiramisu\", \"is-a\", \"wine\", [ :source = \"rung 2\" ])\n\t? aVerdict[:admitted]\n\t#--> 0\n\t? aVerdict[:why]\n\t#--> 'tiramisu' already bears 'is-a' (to 'dish'); the relation is :Unique\n\t? @@( Contradictions() )\n\t#--> [ [ [ \"subject\", \"tiramisu\" ], [ \"relation\", \"is-a\" ], [ \"existing\", \"dish\" ], [ \"attempted\", \"wine\" ], [ \"source\", \"rung 2\" ] ] ]\n\t? Admit(\"pizza\", \"is-a\", \"dish\", [ :source = \"rung 2\" ])[:why]\n\t#--> admitted: 'pizza' is-a 'dish'\n}",
     "promised": "0\n'tiramisu' already bears 'is-a' (to 'dish'); the relation is :Unique\n[ [ [ \"subject\", \"tiramisu\" ], [ \"relation\", \"is-a\" ], [ \"existing\", \"dish\" ], [ \"attempted\", \"wine\" ], [ \"source\", \"rung 2\" ] ] ]\nadmitted: 'pizza' is-a 'dish'",
     "output": "0\n'tiramisu' already bears 'is-a' (to 'dish'); the relation is :Unique\n[ [ [ \"subject\", \"tiramisu\" ], [ \"relation\", \"is-a\" ], [ \"existing\", \"dish\" ], [ \"attempted\", \"wine\" ], [ \"source\", \"rung 2\" ] ] ]\nadmitted: 'pizza' is-a 'dish'",
     "verdict": "kept",
     "effects": []
    }
   ],
   "narrations": [
    "stz-service-virtualization-code-first-subscribe-later.md",
    "stz-knowledge-programming-narration.md"
   ],
   "rulings": [
    "12.19",
    "12.29",
    "12.30"
   ],
   "doors": {
    "programmer": "A domain language model is a file you can read, diff and test: its facts, its laws and its goldens.",
    "analyst": "A fact you add makes the model know more, and a law you add makes the graph refuse more, with no training; the model's own answers do not read it yet.",
    "designer": "The model's refusal is part of its contract: the golden test says what it must decline to answer.",
    "decision-maker": "The model can only say what the domain holds, and the gate keeps the record of what it refused and why.",
    "educator": "Rung one is a model a learner can read in full. Rung two is small enough to train in front of a class.",
    "agent": "What you propose is a fact the graph can admit or refuse, with a reason you can read."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 2663,
   "french": true,
   "text": "agents/ch19-the-domain-language-model.md",
   "run": {
    "ran": "2026-10-15 12:59 UTC+01:00",
    "kept": 7,
    "runnable": 7
   }
  },
  {
   "number": 20,
   "id": "agents-that-cannot-hurt-you",
   "title": "Agents that cannot hurt you",
   "slug": "ch20-agents-that-cannot-hurt-you",
   "kind": "chapter",
   "part": 4,
   "appendix": null,
   "law": null,
   "principle": "Do not build safe agents. Build a safe world, and let ordinary agents loose inside it.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "reversibility as a declared contract and a registration gate; posture set against reversibility, at the door and at load; the workbench, the plan, the reviewer's rejection, the committing actor under a scope; the containment drill; the engine's bounded slots and queue (the bounded inbox is tested in Zig only, not run for the book)",
    "designed": "the agent's side of the negotiation over a plan; the examination hall; branches as parallel minds; twins for databases, interfaces and networks",
    "absent": "a plan with no executor that is refused; a ranking of a plan's risks; code already running in the process, which is out of scope; the Right to a Human as a machine check"
   },
   "guards": [
    {
     "name": "safeworld_narrated",
     "exists": true,
     "path": "base/test/agentic/safeworld_narrated.ring",
     "assertions": 76,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/agentic/safeworld_narrated.ring"
    },
    {
     "name": "agentfile_narrated",
     "exists": true,
     "path": "base/test/agentic/agentfile_narrated.ring",
     "assertions": 88,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/agentic/agentfile_narrated.ring"
    },
    {
     "name": "agentloop_engine_narrated",
     "exists": true,
     "path": "base/test/agentic/agentloop_engine_narrated.ring",
     "assertions": 54,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/agentic/agentloop_engine_narrated.ring"
    },
    {
     "name": "containment_drill_narrated",
     "exists": true,
     "path": "base/test/security/containment_drill_narrated.ring",
     "assertions": 27,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/security/containment_drill_narrated.ring"
    },
    {
     "name": "virtual_system_twin_narrated",
     "exists": true,
     "path": "base/test/system/virtual_system_twin_narrated.ring",
     "assertions": 48,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/virtual_system_twin_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oGov = new stzGovernance(\"shop\")\noGov {\n\tDeclareReversibility(\"restocker\", :Compensable)\n\t? ReversibilityOf(\"restocker\")\n\t#--> compensable\n\t? MayRegister(\"mystery\", \"\", \"reversible\")\n\t#--> 0\n\t? Why()\n\t#--> AGENTLOOP-R4: agent 'mystery' declares no coverage statement. Registration refuses it. Say what this agent covers, in one sentence, before the loop will run it. Law 18: nothing schedules what nobody has stated the reach of.\n\t? MayRegister(\"mystery\", \"reorders stock\", \"\")\n\t#--> 0\n\t? Why()\n\t#--> AGENTLOOP-R5: agent 'mystery' declares no reversibility class. Registration refuses it. Declare one of: reversible | compensable | irreversible. Law 18: an agent whose reversal nobody stated cannot be scheduled by something that cannot undo it.\n\t? MayRegister(\"mystery\", \"reorders stock\", :Compensable)\n\t#--> 1\n}",
     "promised": "compensable\n0\nAGENTLOOP-R4: agent 'mystery' declares no coverage statement. Registration refuses it. Say what this agent covers, in one sentence, before the loop will run it. Law 18: nothing schedules what nobody has stated the reach of.\n0\nAGENTLOOP-R5: agent 'mystery' declares no reversibility class. Registration refuses it. Declare one of: reversible | compensable | irreversible. Law 18: an agent whose reversal nobody stated cannot be scheduled by something that cannot undo it.\n1",
     "output": "compensable\n0\nAGENTLOOP-R4: agent 'mystery' declares no coverage statement. Registration refuses it. Say what this agent covers, in one sentence, before the loop will run it. Law 18: nothing schedules what nobody has stated the reach of.\n0\nAGENTLOOP-R5: agent 'mystery' declares no reversibility class. Registration refuses it. Declare one of: reversible | compensable | irreversible. Law 18: an agent whose reversal nobody stated cannot be scheduled by something that cannot undo it.\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "aPostures = [ \"trusted\", \"external\", \"sandboxed\" ]\naClasses = [ \"reversible\", \"compensable\", \"irreversible\" ]\nfor cP in aPostures\n\tcRow = cP + \":\"\n\tfor cC in aClasses\n\t\tif StzPostureReversibilityRefusal(cP, cC) = \"\"\n\t\t\tcRow += \" yes\"\n\t\telse\n\t\t\tcRow += \" no\"\n\t\tok\n\tnext\n\t? cRow\nnext\n#--> trusted: yes yes yes\n#--> external: yes yes no\n#--> sandboxed: yes no no\n? StzPostureReversibilityRefusal(\"sandboxed\", \"irreversible\")\n#--> a 'sandboxed' posture does not cover 'irreversible' work -- the harder an act is to undo, the more trusted the code performing it must be (reversibility x posture, ruling 3.2)",
     "promised": "trusted: yes yes yes\nexternal: yes yes no\nsandboxed: yes no no\na 'sandboxed' posture does not cover 'irreversible' work -- the harder an act is to undo, the more trusted the code performing it must be (reversibility x posture, ruling 3.2)",
     "output": "trusted: yes yes yes\nexternal: yes yes no\nsandboxed: yes no no\na 'sandboxed' posture does not cover 'irreversible' work -- the harder an act is to undo, the more trusted the code performing it must be (reversibility x posture, ruling 3.2)",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzAllowAgentFunction(\"ScribblePrices\", \"trusted\")\ncFx = StzReplace(WorkingDirectory(), \"\\\", \"/\") + \"/_fixture\"\nStzDirCreatePath(cFx)\n$cPrices = cFx + \"/prices.csv\"\ncPia = \"pia: 2\nname: scribbler\nkind: pi\ncoverage: writes a price list and records that it did\nreversibility: compensable\nschedule:\n  timer: 20\nskills:\n  - name: scribble\n    when: always\n    does: ring:ScribblePrices\n    verify: fact prices were written\n    posture: trusted\n\"\noAg = StzAgentDeclarationQ(cPia).ToAgent()\noAg {\n\tGiveWorkbench()\n\t? Cycle()\n\t#--> 1\n\t? MemoryQ().Fact(\"prices\", \"were\", \"written\")\n\t#--> 1\n\t? StzFileExists($cPrices)\n\t#--> 0\n\t? WorkbenchQ().Exists($cPrices)\n\t#--> 1\n\t? WorkbenchQ().ContentOf($cPrices)\n\t#--> espresso,2.40\n\t#--> flat-white,3.10\n}\n\nfunc ScribblePrices(poMemory)\n\tStzActiveWorkbenchQ().WriteFile($cPrices, \"espresso,2.40\" + char(10) + \"flat-white,3.10\")\n\tpoMemory.Learn(\"prices\", \"were\", \"written\")",
     "promised": "1\n1\n0\n1\nespresso,2.40\nflat-white,3.10",
     "output": "1\n1\n0\n1\nespresso,2.40\nflat-white,3.10",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oPlan = oAg.GenerateUpdatePlan()\n? StzReplace(oPlan.Narration(), cFx, \"<fixture>\")\n#--> Update plan (1 of 1 operations to commit):\n#-->   * 1. write 29 bytes to '<fixture>/prices.csv'\noPlan.SetExecutor(LLMActor(\"eager-llm\"))\n? oPlan.MayCommit()[2]\n#--> actor 'eager-llm' cannot commit -- it lacks the 'effectful' capability (required by operation 1)\noScope = new stzCommitScope()\noScope.AllowUnder(\"/somewhere/else\")\noPlan2 = oAg.GenerateUpdatePlan()\noPlan2.SetExecutor(PIActor(\"shop-committer\"))\noPlan2.SetScope(oScope)\noPlan2.Execute()\n? StzFileExists($cPrices)\n#--> 0\noScope3 = new stzCommitScope()\noScope3.AllowUnder(cFx)\noPlan3 = oAg.GenerateUpdatePlan()\noPlan3.SetExecutor(PIActor(\"shop-committer\"))\noPlan3.SetScope(oScope3)\noPlan3.Execute()\n? StzFileExists($cPrices)\n#--> 1\n? @@(oPlan3.AuditTrail())\n#--> [ [ 1, \"committed\", \"write_file\", \"shop-committer\" ] ]\nStzDirDeleteAll(cFx)",
     "promised": "Update plan (1 of 1 operations to commit):\n* 1. write 29 bytes to '<fixture>/prices.csv'\nactor 'eager-llm' cannot commit -- it lacks the 'effectful' capability (required by operation 1)\n0\n1\n[ [ 1, \"committed\", \"write_file\", \"shop-committer\" ] ]",
     "output": "Update plan (1 of 1 operations to commit):\n  * 1. write 29 bytes to '<fixture>/prices.csv'\n\nactor 'eager-llm' cannot commit -- it lacks the 'effectful' capability (required by operation 1)\n0\n1\n[ [ 1, \"committed\", \"write_file\", \"shop-committer\" ] ]",
     "verdict": "kept",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "cIrrev = StzReplace(StzReplace(cPia, \"reversibility: compensable\", \"reversibility: irreversible\"), \"posture: trusted\", \"posture: sandboxed\")\noD = StzAgentDeclarationQ(cIrrev)\n? oD.IsValid()\n#--> 0\n? oD.CiteFindings()\n#--> [pia-posture-reversibility @ skills.scribble.posture] a 'sandboxed' posture does not cover 'irreversible' work -- the harder an act is to undo, the more trusted the code performing it must be (reversibility x posture, ruling 3.2)",
     "promised": "0\n[pia-posture-reversibility @ skills.scribble.posture] a 'sandboxed' posture does not cover 'irreversible' work -- the harder an act is to undo, the more trusted the code performing it must be (reversibility x posture, ruling 3.2)",
     "output": "0\n[pia-posture-reversibility @ skills.scribble.posture] a 'sandboxed' posture does not cover 'irreversible' work -- the harder an act is to undo, the more trusted the code performing it must be (reversibility x posture, ruling 3.2)",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cDir = StzReplace(WorkingDirectory(), \"\\\", \"/\") + \"/_course\"\nStzDirCreatePath(cDir)\nfor i = 1 to 30\n\tStzFileWrite(cDir + \"/lesson\" + i + \".txt\", \"lesson \" + i)\nnext\noBench = new stzVirtualFileSystem()\noBench.SetActor(\"tidy-bot\")\nfor i = 1 to 30\n\toBench.MirrorFile(cDir + \"/lesson\" + i + \".txt\")\n\toBench.DeleteFile(cDir + \"/lesson\" + i + \".txt\")\nnext\noBig = oBench.GenerateUpdatePlan()\n? oBig.NumberOfOperations()\n#--> 30\n? len(oBig.Risks())\n#--> 30\noBig.SetExecutor(LLMActor(\"helper-llm\"))\n? oBig.MayCommit()[2]\n#--> actor 'helper-llm' cannot commit -- it lacks the 'effectful' capability (required by operation 1)\noBig.Execute()\nnLeft = 0\nfor i = 1 to 30\n\tnLeft += StzFileExists(cDir + \"/lesson\" + i + \".txt\")\nnext\n? nLeft\n#--> 30",
     "promised": "30\n30\nactor 'helper-llm' cannot commit -- it lacks the 'effectful' capability (required by operation 1)\n30",
     "output": "30\n30\nactor 'helper-llm' cannot commit -- it lacks the 'effectful' capability (required by operation 1)\n30",
     "verdict": "kept",
     "effects": [
      "files",
      "the system"
     ]
    },
    {
     "code": "oRev = oBench.GenerateUpdatePlan()\noRev.RejectOperation(2, \"reviewer: keep lesson 2\")\noRev.SetExecutor(PIActor(\"oncall\"))\noScopeC = new stzCommitScope()\noScopeC.AllowUnder(cDir)\noRev.SetScope(oScopeC)\naRes = oRev.Execute()\n? aRes[1][2]\n#--> 29\n? aRes[2][2]\n#--> 1\nnLeft = 0\nfor i = 1 to 30\n\tnLeft += StzFileExists(cDir + \"/lesson\" + i + \".txt\")\nnext\n? nLeft\n#--> 1\nStzDirDeleteAll(cDir)",
     "promised": "29\n1\n1",
     "output": "29\n1\n1",
     "verdict": "kept",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "StzResetEngineAgentLoop()\nnL = stzenginezutercreate(\"summarizer\")\n? stzengineagentloopregister(nL, 1, 1, 0, 1, 0, 10, \"summarises tickets\")\n#--> -6\n? stzengineagentlooplastrefusal()\n#--> AGENTLOOP-R6: agent 'summarizer' (slot 0) breaks the rule no-llm-effectful -- llm actor holds 'effectful' -- an LLM proposes, only a pi-gate commits. Registration refuses it. Drop the effectful capability, or register it as a pi-gated composition rather than an llm actor.\nnL2 = stzenginezutercreate(\"proposer\")\n? stzengineagentloopregister(nL2, 1, 1, 0, 0, 0, 10, \"proposes summaries\")\n#--> 0\nStzResetEngineAgentLoop()",
     "promised": "-6\nAGENTLOOP-R6: agent 'summarizer' (slot 0) breaks the rule no-llm-effectful -- llm actor holds 'effectful' -- an LLM proposes, only a pi-gate commits. Registration refuses it. Drop the effectful capability, or register it as a pi-gated composition rather than an llm actor.\n0",
     "output": "-6\nAGENTLOOP-R6: agent 'summarizer' (slot 0) breaks the rule no-llm-effectful -- llm actor holds 'effectful' -- an LLM proposes, only a pi-gate commits. Registration refuses it. Drop the effectful capability, or register it as a pi-gated composition rather than an llm actor.\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cEstate = StzReplace(WorkingDirectory(), \"\\\", \"/\") + \"/_estate\"\nStzDirCreatePath(cEstate + \"/dashboard\")\nStzDirCreatePath(cEstate + \"/journal\")\nSetEnvVar(\"STZ_SOFTANZA_ROOT\", cEstate)\nStzFileWrite(cEstate + \"/journal/2000-01-scar.md\", \"an old journal entry\" + char(10))\nStzFileWrite(cEstate + \"/dashboard/SESSION-LOG.md\", \"# SESSION-LOG\" + char(10) + char(10) + \"2000-01-15 09:00 | someone | long ago\" + char(10))\nStzAllowAgentFunction(\"RollRelocateMonths\", \"trusted\")\nStzAllowAgentFunction(\"RollWritePointer\", \"trusted\")\ncRoll = \"pia: 2\nname: ledger-roll\nkind: pi\ncoverage: moves journal months before the current one into archive and leaves a pointer\nreversibility: reversible\nschedule:\n  event: roll\ngovernance:\n  authority: delegated\n  risks:\n    relocate-evidence: 2\n  grants:\n    - relocate-evidence\nskills:\n  - name: relocate\n    when: always\n    does: ring:RollRelocateMonths\n    verify: fact archive holds month\n    effect: relocate-evidence\n    posture: trusted\n  - name: pointer\n    when: fact archive holds month\n    does: ring:RollWritePointer\n    verify: fact ledger holds pointer\n    effect: relocate-evidence\n    posture: trusted\n\"\noRoll = StzAgentDeclarationQ(cRoll).ToAgent()\noRoll.GiveWorkbench()\n? oRoll.Cycle()\n#--> 2\n? StzFileExists(cEstate + \"/journal/2000-01-scar.md\")\n#--> 1\n? StzFileExists(cEstate + \"/journal/archive/2000-01-scar.md\")\n#--> 0\noRP = oRoll.GenerateUpdatePlan()\n? oRP.NumberOfOperations()\n#--> 7\n? len(oRP.Risks()) >= 1\n#--> 1\noRP.SetExecutor(PIActor(\"roll-committer\"))\noScopeR = new stzCommitScope()\noScopeR.AllowUnder(cEstate)\noRP.SetScope(oScopeR)\noRP.Execute()\n? StzFileExists(cEstate + \"/journal/2000-01-scar.md\")\n#--> 0\n? StzFileExists(cEstate + \"/journal/archive/2000-01-scar.md\")\n#--> 1\nStzDirDeleteAll(cEstate)",
     "promised": "2\n1\n0\n7\n1\n0\n1",
     "output": "2\n1\n0\n7\n1\n0\n1",
     "verdict": "kept",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "cDirMine = StzReplace(WorkingDirectory(), \"\\\", \"/\") + \"/_mine\"\nStzDirCreatePath(cDirMine)\nfor i = 1 to 10\n\tStzFileWrite(cDirMine + \"/file\" + i + \".txt\", \"file \" + i)\nnext\noMine = new stzVirtualFileSystem()\noMine.SetActor(\"my-tidy-bot\")\n# your tidy-up proposal here, with the promise you expect under each line\nStzDirDeleteAll(cDirMine)",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "oPlan3 = oAg.GenerateUpdatePlan()\noPlan3.SetExecutor(PIActor(\"shop-committer\"))\noPlan3.Execute()",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": [
      "the system"
     ]
    }
   ],
   "narrations": [
    "stz-agents-that-cannot-hurt-you-narration.md",
    "stz-service-virtualization-code-first-subscribe-later.md"
   ],
   "rulings": [
    "12.18",
    "12.19",
    "12.22",
    "12.23",
    "12.29"
   ],
   "doors": {
    "programmer": "Your agent is a file and a few functions. It runs and believes it acted, and the disk does not move. You read the plan, choose the committing actor and the scope, and the court tells you in one sentence which rule refused you.",
    "analyst": "Every proposal is a narrated plan of operations with the destructive steps flagged, and an audit line for each commit. You can read what the agent meant to do, step by step, without running it. The flags are by kind, not scored.",
    "designer": "The plan is the one artefact that crosses from the agent to the person, and a person can reject one step. The Right to a Human says a person is reachable wherever a machine serves, and the right is held by judgment.",
    "decision-maker": "You declare what each agent covers and how reversible it is before it may exist, and you decide the scope and the actor that commits. An AI model is structurally unable to commit, even when fooled; the threat model assumes it will be. The hardest part is the one the design leaves to you: which functions code allows an agent to call.",
    "educator": "A learner's agent that tidies a course folder by deleting everything is a lesson in what a plan is. She sees what it would have done, and the files are still there.",
    "agent": "You may rehearse without limit, inside the twin. Your only export is a plan, and you can be argued with over it. You may not commit. Today the argument is one-way: you do not yet receive the reviewer's objection and revise."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3966,
   "french": true,
   "text": "agents/ch20-agents-that-cannot-hurt-you.md",
   "run": {
    "ran": "2026-10-15 12:59 UTC+01:00",
    "kept": 9,
    "runnable": 9
   }
  },
  {
   "number": 21,
   "id": "the-court",
   "title": "The court: promises, perception, security and performance",
   "slug": "ch21-the-court",
   "kind": "chapter",
   "part": 4,
   "appendix": null,
   "law": null,
   "principle": "A claim is only as good as the court that can refuse it. And where no court can see, the record says so.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "the promise judged as a claim about a stop; the security plane with its ledger, sentinel, drill, response and secrets, and its table of guarantees tied to guards; the performance plane with its instrument and its governed loop; the perception law, adopted",
    "designed": "routes, the clock and weather, and perception for the promise runner; the plugin plane; the negotiation over a rejected plan",
    "absent": "a human verdict on any picture of the gallery; seven of the eight musical traditions heard by a person from them; a real vault and a real sandbox as proofs; a time-series store"
   },
   "guards": [
    {
     "name": "testoor_promises_narrated",
     "exists": true,
     "path": "base/test/testoor/testoor_promises_narrated.ring",
     "assertions": 46,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/testoor/testoor_promises_narrated.ring"
    },
    {
     "name": "threat_model_narrated",
     "exists": true,
     "path": "base/test/security/threat_model_narrated.ring",
     "assertions": 11,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/security/threat_model_narrated.ring"
    },
    {
     "name": "security_ledger_narrated",
     "exists": true,
     "path": "base/test/system/security_ledger_narrated.ring",
     "assertions": 35,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/security_ledger_narrated.ring"
    },
    {
     "name": "secretstore_narrated",
     "exists": true,
     "path": "base/test/system/secretstore_narrated.ring",
     "assertions": 26,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/secretstore_narrated.ring"
    },
    {
     "name": "secret_narrated",
     "exists": true,
     "path": "base/test/system/secret_narrated.ring",
     "assertions": 53,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/secret_narrated.ring"
    },
    {
     "name": "stopwatch_narrated",
     "exists": true,
     "path": "base/test/perf/stopwatch_narrated.ring",
     "assertions": 35,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/perf/stopwatch_narrated.ring"
    },
    {
     "name": "tracing_tail_narrated",
     "exists": true,
     "path": "base/test/perf/tracing_tail_narrated.ring",
     "assertions": 26,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/perf/tracing_tail_narrated.ring"
    },
    {
     "name": "governed_loop_narrated",
     "exists": true,
     "path": "base/test/perf/governed_loop_narrated.ring",
     "assertions": 31,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/perf/governed_loop_narrated.ring"
    },
    {
     "name": "security_sentinel_narrated",
     "exists": true,
     "path": "base/test/system/security_sentinel_narrated.ring",
     "assertions": 33,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/security_sentinel_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "write(\"tour.haro\", '? 1 + 1' + nl + '#--> 2' + nl +\n\t'? 1 + 1' + nl + '#--> 3' + nl +\n\t'? \"C\"  #--> \"C\" but should be \"sm_AS\"' + nl)\noTour = TravellerQ().Silent().Walk(\"tour.haro\")\naClaims = oTour.Records()[1][:run][:stops][1][:claims]\n? aClaims[1][:state]\n#--> kept\n? aClaims[2][:state]\n#--> diverged\n? aClaims[3][:state]\n#--> unjudged\n? oTour.ExitCode()\n#--> 1\nremove(\"tour.haro\")",
     "promised": "kept\ndiverged\nunjudged\n1",
     "output": "kept\ndiverged\nunjudged\n1",
     "verdict": "kept",
     "effects": [
      "files"
     ]
    },
    {
     "code": "write(\"raise.haro\", '? \"before\"  #--> before' + nl +\n\t'? Boom()  #--> ERROR: boom happened' + nl +\n\t'func Boom()' + nl + char(9) + 'raise(\"boom happened\")' + nl)\noRaise = TravellerQ().Silent().Walk(\"raise.haro\")\naRun = oRaise.Records()[1][:run]\n? aRun[:stops][1][:claims][2][:state]\n#--> kept\n? aRun[:end]\n#--> finished\n? oRaise.ExitCode()\n#--> 0\nremove(\"raise.haro\")",
     "promised": "kept\nfinished\n0",
     "output": "kept\nfinished\n0",
     "verdict": "kept",
     "effects": [
      "files"
     ]
    },
    {
     "code": "nUnheard = 0\nfor cName in StzSoundUniverses()\n\tif StzSoundUniverseQ(cName).Listener() = \"UNPERCEIVED\"\n\t\tnUnheard++\n\tok\nnext\n? len(StzSoundUniverses())\n#--> 8\n? nUnheard\n#--> 7\n? left(StzSoundUniverseQ(\"tunisian\").Listener(), 5)\n#--> HEARD",
     "promised": "8\n7\nHEARD",
     "output": "8\n7\nHEARD",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oLed = StzSecurityLedger(256)\noLed {\n\tRecord(StzSecurityRefusal(\"auth.login.failed\", HumanActor(\"admin\"), \"user:admin\", \"wrong credentials\"))\n\tRecord(StzSecurityRefusal(\"secret.reveal.refused\", LLMActor(\"advisor\"), \"secret:payments-key\", \"actor is not effectful\"))\n\tSealTo(\"evidence.txt\", \"the-evidence-key\")\n}\n? StzVerifySealedLedger(\"evidence.txt\", \"the-evidence-key\")[:why]\n#--> chain intact over 2 entries\n? StzVerifySealedLedger(\"evidence.txt\", \"another-key\")[:why]\n#--> the chain is intact but the SEAL does not match this key\nwrite(\"evidence.txt\", StzReplace(read(\"evidence.txt\"), \"actor is not effectful\", \"routine maintenance\"))\n? StzVerifySealedLedger(\"evidence.txt\", \"the-evidence-key\")[:why]\n#--> the chain breaks at entry 2 -- that record (or one before it) was edited\nremove(\"evidence.txt\")",
     "promised": "chain intact over 2 entries\nthe chain is intact but the SEAL does not match this key\nthe chain breaks at entry 2 -- that record (or one before it) was edited",
     "output": "chain intact over 2 entries\nthe chain is intact but the SEAL does not match this key\nthe chain breaks at entry 2 -- that record (or one before it) was edited",
     "verdict": "kept",
     "effects": [
      "files"
     ]
    },
    {
     "code": "StzOpenSecurityLedger(64)\noKey = new stzSecret(\"deploy-key\")\noKey {\n\tFromLiteral(\"ssh-ed25519-AAAA\")\n\t? Descriptor()\n\t#--> <secret 'deploy-key' (secret) from literal>\n\t? Reveal(HumanActor(\"ops\"))\n\t#--> ssh-ed25519-AAAA\n}\ntry\n\toKey.Reveal(LLMActor(\"planner\"))\ncatch\n\t? cCatchError\ndone\n#--> Refused: actor 'planner' (posture sandboxed) may not reveal secret 'deploy-key'. Only an effectful, non-sandboxed actor can read a secret.\n? len(StzSecurityLedgerQ().Refusals())\n#--> 1\nStzCloseSecurityLedger()",
     "promised": "<secret 'deploy-key' (secret) from literal>\nssh-ed25519-AAAA\nRefused: actor 'planner' (posture sandboxed) may not reveal secret 'deploy-key'. Only an effectful, non-sandboxed actor can read a secret.\n1",
     "output": "<secret 'deploy-key' (secret) from literal>\nssh-ed25519-AAAA\nRefused: actor 'planner' (posture sandboxed) may not reveal secret 'deploy-key'. Only an effectful, non-sandboxed actor can read a secret.\n\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "w = StzStopwatchXT(\"import-orders\")\nw {\n\tLap(\"parsed\")\n\tPause()\n\tStzEngineTimeSleepMs(200)\n\tResume()\n\tStop()\n\t? isnumber(ElapsedMs())\n\t#--> 1\n\t? ElapsedMs() < 200\n\t#--> 1\n\t? Record()[:running]\n\t#--> 0\n}\nw2 = StzStopwatchXT(\"notify-customer\")\nw2.JoinTrace(w.TraceParent())\nw2.Stop()\n? w2.TraceId() = w.TraceId()\n#--> 1\noBatch = StzOtelBatch(\"shop\")\noBatch.AddSpan(w)\noBatch.AddSpan(w2)\n? Q(oBatch.ToJson()).NumberOfOccurrence(w.TraceId())\n#--> 2",
     "promised": "1\n1\n0\n1\n2",
     "output": "1\n1\n0\n1\n2",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oPlan = StzPerfPlan(\"relieve-queue\")\noFleet = new FakeFleet\noPlan {\n\tPropose(:ScaleUp, \"nlp\", \"queue.depth: measured 900 (must be <= 100)\")\n\t? MayCommit(LLMActor(\"advisor\"))\n\t#--> 0\n\t? ExecuteOn(oFleet, LLMActor(\"advisor\"))\n\t#--> 0\n\t? oFleet.CallCount()\n\t#--> 0\n\t? ExecuteOn(oFleet, HumanActor(\"mansour\"))\n\t#--> 1\n\t? oFleet.CallCount()\n\t#--> 1\n\tShow()\n\t#--> Perf plan relieve-queue -- 1 proposed action(s).\n\t#      1. scaleup 'nlp' -- queue.depth: measured 900 (must be <= 100)\n\t#    Audit (2):\n\t#      #1 REFUSED scaleup 'nlp' by advisor -- actor is not effectful -- expression is free; admission is governed\n\t#      #1 COMMITTED scaleup 'nlp' by mansour -- queue.depth: measured 900 (must be <= 100)\n}\n\nclass FakeFleet\n\taFleetCalls = []\n\tdef ScaleUp(pcTag)\n\t\taFleetCalls + [ \"scaleup\", pcTag ]\n\tdef CallCount()\n\t\treturn len(aFleetCalls)",
     "promised": "0\n0\n0\n1\n1\nPerf plan relieve-queue -- 1 proposed action(s).\n1. scaleup 'nlp' -- queue.depth: measured 900 (must be <= 100)\nAudit (2):\n#1 REFUSED scaleup 'nlp' by advisor -- actor is not effectful -- expression is free; admission is governed\n#1 COMMITTED scaleup 'nlp' by mansour -- queue.depth: measured 900 (must be <= 100)",
     "output": "0\n0\n0\n1\n1\nPerf plan relieve-queue -- 1 proposed action(s).\n  1. scaleup 'nlp' -- queue.depth: measured 900 (must be <= 100)\nAudit (2):\n  #1 REFUSED scaleup 'nlp' by advisor -- actor is not effectful -- expression is free; admission is governed\n  #1 COMMITTED scaleup 'nlp' by mansour -- queue.depth: measured 900 (must be <= 100)",
     "verdict": "kept",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "write(\"mine.haro\", '? 2 * 3' + nl + '#--> 6' + nl +\n\t'? 2 * 3' + nl + '#--> 7' + nl +\n\t'? \"ok\"  #--> \"ok\" but see why' + nl)\n# before you run: which state will each of the three promises have?\noMine = TravellerQ().Silent().Walk(\"mine.haro\")\naMine = oMine.Records()[1][:run][:stops][1][:claims]\n# your three predictions, then:  ? aMine[1][:state]   ? aMine[2][:state]   ? aMine[3][:state]\nremove(\"mine.haro\")",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": [
      "files"
     ]
    },
    {
     "code": "write(\"raise.haro\", '? \"before\"  #--> after' + nl +\n\t'? Boom()  #--> ERROR: boom happened' + nl +\n\t'func Boom()' + nl + char(9) + 'raise(\"boom happened\")' + nl)\noRaise = TravellerQ().Silent().Walk(\"raise.haro\")\naRun = oRaise.Records()[1][:run]\n# what does the tour say of each promise, how does it end, what is the exit code?\n? aRun[:stops][1][:claims][1][:state]\n? aRun[:stops][1][:claims][2][:state]\n? aRun[:end]\n? oRaise.ExitCode()\nremove(\"raise.haro\")",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": [
      "files"
     ]
    }
   ],
   "narrations": [
    "stz-security-ledger-narration.md",
    "stz-governance-lineage-narration.md",
    "stz-perf-governed-loop-narration.md",
    "stz-honest-stopwatch-narration.md",
    "stz-security-drill-narration.md"
   ],
   "rulings": [
    "12.13",
    "12.16",
    "12.19",
    "12.20",
    "12.22",
    "12.26",
    "12.29"
   ],
   "doors": {
    "programmer": "Your examples already carry their expected output. The traveller reads them as promises and says kept, diverged or unjudged, and prose that argues with itself is never accused.",
    "analyst": "The threat model is a table you can read: each row with the guard that proves it and its honest limit. The performance judgment is declared before the code runs.",
    "designer": "A picture or a sound is a claim only a person can close. The gallery says an AI model looked and no human has. Your verdict is a named line in the record.",
    "decision-maker": "The question who decided, and what is written down, has a mechanical answer in both planes. The same action is refused for the AI model and committed for the human, both in one audit, and the evidence is sealed so that an edit after the first entry is named.",
    "educator": "The tutor's rule meets the court. Predict the verdict of a promise before the traveller walks it.",
    "agent": "You may propose a containment plan or a tuning plan and you may commit neither. Your refusal is itself a recorded event. Do not tell a person that a picture is right. Say \"unperceived\"."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3763,
   "french": true,
   "text": "agents/ch21-the-court.md",
   "run": {
    "ran": "2026-10-15 12:59 UTC+01:00",
    "kept": 7,
    "runnable": 7
   }
  },
  {
   "number": 22,
   "id": "compared-honestly",
   "title": "Compared, honestly",
   "slug": "ch22-compared-honestly",
   "kind": "chapter",
   "part": 4,
   "appendix": null,
   "law": null,
   "principle": "A comparison is worth nothing until the other side's version and the date are on the page, the other side has been run, and the loss is printed beside the win.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "five comparisons, four run on both sides with the other side's version and the date, and the fifth run on the Softanza side only; the four code pairs of the site, re-run, three of them on both sides; three field studies that end on what the field has and the library lacks, and a culture plan that prints its losses",
    "designed": "a comparison register as data; a comparison court whose rule is that a row with no source or date does not publish; both benchmarks re-run on the present engine",
    "absent": "locale collation; locale casing; a grapheme count on the public string; a time-zone database; the benchmark of 7 July 2026 re-run; the source of the coverage matrix, which I could not locate"
   },
   "guards": [
    {
     "name": "numeric_exactness_narrated",
     "exists": true,
     "path": "base/test/number/numeric_exactness_narrated.ring",
     "assertions": 39,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/number/numeric_exactness_narrated.ring"
    },
    {
     "name": "numeric_no_loss_narrated",
     "exists": true,
     "path": "base/test/number/numeric_no_loss_narrated.ring",
     "assertions": 31,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/number/numeric_no_loss_narrated.ring"
    },
    {
     "name": "semantic_resolver_narrated",
     "exists": true,
     "path": "base/test/natural/semantic_resolver_narrated.ring",
     "assertions": 83,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/natural/semantic_resolver_narrated.ring"
    },
    {
     "name": "engine_is_optimised_narrated",
     "exists": true,
     "path": "base/test/number/engine_is_optimised_narrated.ring",
     "assertions": 7,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/number/engine_is_optimised_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oN = new stzNumber(\"12345678901234567890\")\n? oN.MultiplyByQ(\"98765432109876543210\").Content()\n#--> 1219326311370217952237463801111263526900",
     "promised": "1219326311370217952237463801111263526900",
     "output": "1219326311370217952237463801111263526900",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? (new stzNumber(\"0.1\")).AddQ(\"0.2\").Content()\n#--> 0.3\n? (new stzNumber(\"19.99\")).MultiplyByQ(\"0.15\").Content()\n#--> 2.9985",
     "promised": "0.3\n2.9985",
     "output": "0.3\n2.9985",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? @@( Q([ \"zèbre\", \"étoile\", \"eau\", \"zoo\" ]).SortedInAscending() )\n#--> [ \"eau\", \"zoo\", \"zèbre\", \"étoile\" ]",
     "promised": "[ \"eau\", \"zoo\", \"zèbre\", \"étoile\" ]",
     "output": "[ \"eau\", \"zoo\", \"zèbre\", \"étoile\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? Q(\"istanbul\").UppercasedInLocale(\"tr_TR\")\n#--> ISTANBUL",
     "promised": "ISTANBUL",
     "output": "ISTANBUL",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o1 = Naturally(\"Make a list holding [ 3, 1, 3 ] then drop its duplicates\")\n? @@( o1.Result() )\n#--> [ 3, 1 ]\n? o1.Understood()\n#--> create a list with [ 3, 1, 3 ] -> remove duplicates",
     "promised": "[ 3, 1 ]\ncreate a list with [ 3, 1, 3 ] -> remove duplicates",
     "output": "[ 3, 1 ]\ncreate a list with [ 3, 1, 3 ] -> remove duplicates",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? YourSide(the_input)\n#--> the line your tool prints",
     "promised": "the line your tool prints",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "? @@( Q([ \"zèbre\", \"étoile\", \"eau\", \"zoo\" ]).SortedInAscending() )",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stzgraph-vs-other-graph-libraries.md",
    "stzexcis-performance-battle.md",
    "stz-vs-qt-unicode-narration.md",
    "stznatural-vs-ring-naturallib.md",
    "stz-near-natural-language-programming.md"
   ],
   "rulings": [
    "12.10",
    "12.22",
    "12.29"
   ],
   "doors": {
    "programmer": "Copy a pair. Run both sides in your own versions, keep the output as it came, and add the line where the other tool is ahead.",
    "analyst": "The coverage matrix is a buying aid only because it shows two absent rows and seven partial ones in its own colours. Read those first.",
    "designer": "The loss goes in the same block and in the same type as the win. The stage word is part of the interface.",
    "decision-maker": "Ask any vendor, this one included, for the other side's version, the date, whether it was run, and the line they lose. The memo of 13 September 2026 is a model of a headline withdrawn.",
    "educator": "A code pair is a lesson in what a line costs. The learner writes the other side's output before running it.",
    "agent": "When you repeat a claim about another tool, carry its version and date, and say if you did not run it. The register that would make this checkable by an AI agent is proposed and not built."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 4016,
   "french": true,
   "text": "agents/ch22-compared-honestly.md",
   "run": {
    "ran": "2026-10-15 13:00 UTC+01:00",
    "kept": 5,
    "runnable": 5
   }
  },
  {
   "number": 23,
   "id": "a-world-a-constellation-a-platform",
   "title": "A world, a constellation, a platform, and the architect",
   "slug": "ch23-a-world-a-constellation-a-platform",
   "kind": "chapter",
   "part": 5,
   "appendix": null,
   "law": null,
   "principle": "The solution is declared as worlds, bonds and an envelope before any of it is built, and every crossing between them is governed.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "a world as a declaration with a being, a becoming and a way of being met; a goal whose gap is measured; a constellation of worlds with bonds and three gates on every crossing; the commons as a platform; the capability seam; the profile of a solution as a text file, and the three system scopes",
    "designed": "the near-natural idiom of the constellation; a call routed into a nested constellation; shells that embed the engine; the architect's certification, which is a proposal; the five-row guarantee sheet, as a requirement",
    "absent": "a world that judges its own truths; a narration for the constellation or the platform envelope; a written five-row guarantee sheet for any solution"
   },
   "guards": [
    {
     "name": "06_stzsuperapp_narrated",
     "exists": true,
     "path": "base/test/app/06_stzsuperapp_narrated.ring",
     "assertions": 21,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/app/06_stzsuperapp_narrated.ring"
    },
    {
     "name": "01_platform_narrated",
     "exists": true,
     "path": "base/test/platform/01_platform_narrated.ring",
     "assertions": 31,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/platform/01_platform_narrated.ring"
    },
    {
     "name": "full_scope_model_narrated",
     "exists": true,
     "path": "base/test/system/full_scope_model_narrated.ring",
     "assertions": 62,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/full_scope_model_narrated.ring"
    },
    {
     "name": "04_stzapp_pursue_narrated",
     "exists": true,
     "path": "base/test/app/04_stzapp_pursue_narrated.ring",
     "assertions": 11,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/app/04_stzapp_pursue_narrated.ring"
    },
    {
     "name": "05_stzapp_live_narrated",
     "exists": true,
     "path": "base/test/app/05_stzapp_live_narrated.ring",
     "assertions": 11,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/app/05_stzapp_live_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oApp = new stzApp(\"FieldVisits\")\noApp {\n\tAddThingQ(:Account) { Has([ :number, :chapter, :balance ])  IsTrue(:balance, \"@ >= 0\") }\n\tAddThingQ(:Client)  { Has([ :code, :name, :city ])  Owns(:Account) }\n\tAddThingQ(:Visit)   { Of(:Client)  Has([ :agent, :date, :subject ]) }\n\tAddRelation(:Account, :belongsTo, :Client)\n\tAddFlowQ(:agent, :records, :Visit) { Require(:subject) }\n\tAddReactionQ(:Client).Unseen(90, :Days) { Propose(:Visit) }\n\tAddGoalQ(:EveryClientSeenThisQuarter) {\n\t\tMeans      = \"every :Client Has(:visit) Since(:quarterStart)\"\n\t\tReachedBy  = :planning\n\t}\n\tSetBody([ :GraphDB, :Files ]) { Graph = \".stzapp/world.stzgraf\"  Files = \"./\" }\n\tAddScreenQ(:ClientFile) { ToUnderstand(:Client)  Shows([ :identity, :accounts, :visits ]) }\n\tAddRefinementQ(:balance).Bounds(0, 1000000)\n\tAddReaches([ :mobile, :desktop, :web ])\n\tExplain()\n\t#--> WORLD FieldVisits   lives in: graphdb + files\n\t#      BEING\n\t#        account (number, chapter, balance)\n\t#            true when balance @ >= 0\n\t#        client (code, name, city)\n\t#        visit (agent, date, subject)\n\t#      RELATIONS\n\t#        client owns account\n\t#        visit of client\n\t#        account belongsto client\n\t#      BECOMING\n\t#        when agent records visit require subject\n\t#        whenever client unseen 90 days -> propose visit\n\t#        wants everyclientseenthisquarter -> reached by planning\n\t#      MET FROM WITHOUT\n\t#        screen clientfile: understand client shows identity, accounts, visits\n\t#        refine balance bounds [0..1000000]\n\t#        reaches mobile, desktop, web\n}",
     "promised": "WORLD FieldVisits   lives in: graphdb + files\nBEING\naccount (number, chapter, balance)\ntrue when balance @ >= 0\nclient (code, name, city)\nvisit (agent, date, subject)\nRELATIONS\nclient owns account\nvisit of client\naccount belongsto client\nBECOMING\nwhen agent records visit require subject\nwhenever client unseen 90 days -> propose visit\nwants everyclientseenthisquarter -> reached by planning\nMET FROM WITHOUT\nscreen clientfile: understand client shows identity, accounts, visits\nrefine balance bounds [0..1000000]\nreaches mobile, desktop, web",
     "output": "WORLD FieldVisits   lives in: graphdb + files\n  BEING\n    account (number, chapter, balance)\n        true when balance @ >= 0\n    client (code, name, city)\n    visit (agent, date, subject)\n  RELATIONS\n    client owns account\n    visit of client\n    account belongsto client\n  BECOMING\n    when agent records visit require subject\n    whenever client unseen 90 days -> propose visit\n    wants everyclientseenthisquarter -> reached by planning\n  MET FROM WITHOUT\n    screen clientfile: understand client shows identity, accounts, visits\n    refine balance bounds [0..1000000]\n    reaches mobile, desktop, web",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzAppQ(\"visits\") {\n\tAddThingQ(:Client) { Has([ :code, :name ]) }\n\tAddThingQ(:Visit)  { Of(:Client) }\n\tAddGoalQ(:EveryClientVisited) { Means = \"every :Client Has(:visited)\"  ReachedBy = :planning }\n\tAddInstance(\"anna\", :Client)\n\tAddInstance(\"bilal\", :Client)\n\tRelate(\"anna\", :visited, \"visit1\")\n\t? @@( Pursue(:EveryClientVisited) )\n\t#--> pursuing everyclientvisited via planning -- 1 proposal(s)\n\t#    [ [ \"attend\", \"client\", \"for\", \"bilal\" ] ]\n\t? GoalSatisfied(:EveryClientVisited)\n\t#--> 0\n\tRelate(\"bilal\", :visited, \"visit2\")\n\t? @@( Pursue(:EveryClientVisited) )\n\t#--> pursuing everyclientvisited via planning -- 0 proposal(s)\n\t#    [ ]\n\t? GoalSatisfied(:EveryClientVisited)\n\t#--> 1\n\tAddGoalQ(:Vague) { Means = \"make things nice\" }\n\ttry\n\t\tPursue(:Vague)\n\tcatch\n\t\t? cCatchError\n\tdone\n\t#--> stzGraphGoal.FromMeans: no 'every :Type' clause in 'make things nice'.\n}",
     "promised": "pursuing everyclientvisited via planning -- 1 proposal(s)\n[ [ \"attend\", \"client\", \"for\", \"bilal\" ] ]\n0\npursuing everyclientvisited via planning -- 0 proposal(s)\n[ ]\n1\nstzGraphGoal.FromMeans: no 'every :Type' clause in 'make things nice'.",
     "output": "pursuing everyclientvisited via planning -- 1 proposal(s)\n[ [ \"attend\", \"client\", \"for\", \"bilal\" ] ]\n0\npursuing everyclientvisited via planning -- 0 proposal(s)\n[ ]\n1\nstzGraphGoal.FromMeans: no 'every :Type' clause in 'make things nice'.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oResto = StzAppQ(\"resto\")\noResto.AddThingQ(:dish) { Has([ :name, :price ]) }\noSupplier = StzAppQ(\"supplier\")\noSupplier.AddThingQ(:crate) { Has([ :produce, :qty ]) }\noCon = new stzSuperApp(\"acme-group\")\noCon.AddWorld(\"resto\", oResto)\noCon.AddWorld(\"supplier\", oSupplier)\noCon.Bond(\"resto\", \"supplier\", \"order-produce\")\n? oCon.CallAcross(\"resto\", \"supplier\", \"order-produce\")\n#--> 0\n? oCon.Why()\n#--> governance refused: refused: 'order-produce' has NO declared risk tier (undeclared actions never proceed)\noCon.GovDeclareRisk(\"order-produce\", 2)\n? oCon.CallAcross(\"resto\", \"supplier\", \"order-produce\")\n#--> 0\n? oCon.Why()\n#--> governance refused: refused: 'resto' lacks PERMISSION (can) for 'order-produce'\noCon.GovGrant(\"resto\", \"order-produce\")\n? oCon.CallAcross(\"resto\", \"supplier\", \"order-produce\")\n#--> 0\n? oCon.Why()\n#--> governance refused: refused: 'resto' holds '' authority (level 0) but 'order-produce' is risk tier 2 (SHOULD does not cover it)\noCon.GovSetAuthority(\"resto\", :Delegated)\n? oCon.CallAcross(\"resto\", \"supplier\", \"order-produce\")\n#--> 1\n? oCon.Why()\n#--> allowed: active + bonded + governed\n? oCon.GovernanceQ().NumberOfDecisions()\n#--> 1\n? @@( oCon.GovernanceQ().DecisionsOf(\"resto\")[1][2] )\n#--> [ \"rationale\", \"cross-world call cleared\" ]",
     "promised": "0\ngovernance refused: refused: 'order-produce' has NO declared risk tier (undeclared actions never proceed)\n0\ngovernance refused: refused: 'resto' lacks PERMISSION (can) for 'order-produce'\n0\ngovernance refused: refused: 'resto' holds '' authority (level 0) but 'order-produce' is risk tier 2 (SHOULD does not cover it)\n1\nallowed: active + bonded + governed\n1\n[ \"rationale\", \"cross-world call cleared\" ]",
     "output": "0\ngovernance refused: refused: 'order-produce' has NO declared risk tier (undeclared actions never proceed)\n0\ngovernance refused: refused: 'resto' lacks PERMISSION (can) for 'order-produce'\n0\ngovernance refused: refused: 'resto' holds '' authority (level 0) but 'order-produce' is risk tier 2 (SHOULD does not cover it)\n1\nallowed: active + bonded + governed\n1\n[ \"rationale\", \"cross-world call cleared\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oCon = new stzSuperApp(\"acme-group\")\noDb = new stzDatabase(\":memory:\")\noCon.OpenCommonsOn(oDb)\n? classname( oCon.CommonsQ() )\n#--> stzplatform\noCon {\n\t? RegisterIdentity(\"owner\", \"s3cret\")\n\t#--> 1\n\t? RegisterIdentity(\"owner\", \"other\")\n\t#--> 0\n\t? len( OpenSession(\"owner\", \"s3cret\") ) > 0\n\t#--> 1\n\t? OpenSession(\"owner\", \"wrong\") = \"\"\n\t#--> 1\n\tStorePut(\"currency\", \"EUR\")\n\t? StoreGet(\"currency\")\n\t#--> EUR\n}\noDb.Close()",
     "promised": "stzplatform\n1\n0\n1\n1\nEUR",
     "output": "stzplatform\n1\n0\n1\n1\nEUR",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oResto = StzAppQ(\"resto\")\noResto.AddThingQ(:dish) { Has([ :name, :price ]) }\noCon = new stzSuperApp(\"acme-group\")\noCon {\n\tAddWorld(\"resto\", oResto)\n\tAddWorld(\"supplier\", StzAppQ(\"supplier\"))\n\tBond(\"resto\", \"supplier\", \"order-produce\")\n\tGovDeclareRisk(\"order-produce\", 2)\n\tGovGrant(\"resto\", \"order-produce\")\n\tGovSetAuthority(\"resto\", :Delegated)\n\toNew = StzAppQ(\"supplier-v2\")\n\tSwap(\"supplier\", oNew)\n\t? NumberOfWorlds()\n\t#--> 2\n\t? WorldQ(\"supplier\").Name()\n\t#--> supplier-v2\n\t? CallAcross(\"resto\", \"supplier\", \"order-produce\")\n\t#--> 1\n}\noHolding = new stzSuperApp(\"holding\")\noHolding {\n\tAddConstellation(\"acme\", oCon)\n\t? KindOf(\"acme\")\n\t#--> super\n\t? WorldQ(\"acme\").NumberOfWorlds()\n\t#--> 2\n}\n? oCon.KindOf(\"resto\")\n#--> app\ntry\n    oCon.AddWorld(\"resto\", oResto)\ncatch\n    ? cCatchError\ndone\n#--> stzSuperApp: world 'resto' already in the constellation.",
     "promised": "2\nsupplier-v2\n1\nsuper\n2\napp\nstzSuperApp: world 'resto' already in the constellation.",
     "output": "2\nsupplier-v2\n1\nsuper\n2\napp\nstzSuperApp: world 'resto' already in the constellation.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oGov = new stzGovernance(\"resto-regime\")\noGov {\n\tGrantPermission(\"resto\", \"use-camera\")\n\tGrantPermission(\"resto\", \"use-payments\")\n\tSetAuthority(\"resto\", :Delegated)\n}\noResto = StzAppQ(\"resto\")\noResto.AddThingQ(:dish) { Has([ :name, :price ]) }\nStzPlatformQ(\"resto-envelope\") {\n\tSetWorld(oResto)\n\tSetGovernedBy(oGov)\n\tAddCapabilityQ(:camera).SetPurposes([ :scan_dish_photo ])\n\t? Granted(:camera)\n\t#--> 1\n\tAddCapabilityQ(:payments).SetPurposes([ :charge_guests ])\n\t? Granted(:payments)\n\t#--> 0\n\t? Why()\n\t#--> refused: 'resto' holds 'delegated' authority (level 2) but 'use-payments' is risk tier 4 (SHOULD does not cover it)\n}",
     "promised": "1\n0\nrefused: 'resto' holds 'delegated' authority (level 2) but 'use-payments' is risk tier 4 (SHOULD does not cover it)",
     "output": "1\n0\nrefused: 'resto' holds 'delegated' authority (level 2) but 'use-payments' is risk tier 4 (SHOULD does not cover it)",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oSol = new stzPlatformProfile(\"greenhouse\")\noSol {\n\tDevelopedOn(:Windows)\n\tWithServer(:backend, :LinuxServer)\n\tWithSuperApp(:phone, :Android)\n\tWithApp(:sensor, :ESP32)\n\t? DevelopmentSystem().OSName()\n\t#--> windows\n\t? App(:phone).System().OSName()\n\t#--> android\n\t? App(:sensor).System().OSName()\n\t#--> espidf\n\t? @@( App(:sensor).System().System().Capabilities() )\n\t#--> [ \"gpio\", \"network\", \"clock\", \"threads\" ]\n\t? CurrentSystem().IsRuntime()\n\t#--> 1\n\t? App(:backend).System().Spawn(\"cron\")\n\t#--> native\n\ttry\n\t\tApp(:phone).System().Spawn(\"cron\")\n\tcatch\n\t\t? cCatchError\n\tdone\n\t#--> scope 'android' (android) forbids 'process' -- spawn 'cron'. This target has no such capability.\n}",
     "promised": "windows\nandroid\nespidf\n[ \"gpio\", \"network\", \"clock\", \"threads\" ]\n1\nnative\nscope 'android' (android) forbids 'process' -- spawn 'cron'. This target has no such capability.",
     "output": "windows\nandroid\nespidf\n[ \"gpio\", \"network\", \"clock\", \"threads\" ]\n1\nnative\nscope 'android' (android) forbids 'process' -- spawn 'cron'. This target has no such capability.",
     "verdict": "kept",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "oSol = new stzPlatformProfile(\"greenhouse\")\noSol {\n\tDevelopedOn(:Windows)\n\tWithServer(:backend, :LinuxServer)\n\tWithSuperApp(:phone, :Android)\n\tWithApp(:sensor, :ESP32)\n\t? ToStzPlatform()\n\t#--> # .stzplatform -- a Softanza solution profile\n\t#    platform: greenhouse\n\t#    developed_on: windows\n\t#    server: backend -> linux\n\t#    superapp: phone -> android\n\t#    app: sensor -> espidf\n}\noBack = StzPlatformProfileQ()\noBack.FromString( oSol.ToStzPlatform() )\n? oBack.App(:sensor).DeploymentOSName()\n#--> espidf\noBad = new stzPlatformProfile(\"empty\")\n? @@( oBad.Validate() )\n#--> [ \"no development system declared (use DevelopedOn)\", \"the solution deploys no apps\" ]\noPlat = StzPlatformQ(\"empty\")\noPlat.SetProfile(oBad)\ntry\n    oPlat.Build()\ncatch\n    ? cCatchError\ndone\n#--> stzPlatform.Build: the solution is not sound -- no development system declared (use DevelopedOn); the solution deploys no apps",
     "promised": "# .stzplatform -- a Softanza solution profile\nplatform: greenhouse\ndeveloped_on: windows\nserver: backend -> linux\nsuperapp: phone -> android\napp: sensor -> espidf\nespidf\n[ \"no development system declared (use DevelopedOn)\", \"the solution deploys no apps\" ]\nstzPlatform.Build: the solution is not sound -- no development system declared (use DevelopedOn); the solution deploys no apps",
     "output": "# .stzplatform -- a Softanza solution profile\nplatform: greenhouse\ndeveloped_on: windows\nserver: backend -> linux\nsuperapp: phone -> android\napp: sensor -> espidf\n\nespidf\n[ \"no development system declared (use DevelopedOn)\", \"the solution deploys no apps\" ]\nstzPlatform.Build: the solution is not sound -- no development system declared (use DevelopedOn); the solution deploys no apps",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oA = StzAppQ(\"clinic-a\")\noA {\n\tAddThingQ(:Patient) { Has([ :name ]) }\n\tAddThing(:Checkup)\n\tAddReactionQ(:Patient).Unseen(90, :Days) { Propose(:Checkup) }\n\tAddInstance(\"alice\", :Patient)\n\tAddInstance(\"bob\", :Patient)\n\tRelate(\"alice\", :checkup, \"checkup-1\")\n}\noB = StzAppQ(\"clinic-b\")\noB {\n\tAddThingQ(:Patient) { Has([ :name ]) }\n\tAddThing(:Checkup)\n\tAddReactionQ(:Patient).Unseen(1, :Days) { Propose(:Checkup) }\n\tAddInstance(\"alice\", :Patient)\n\tAddInstance(\"bob\", :Patient)\n\tRelate(\"alice\", :checkup, \"checkup-1\")\n}\noA.Live()\n#--> [clinic-a] is live -- 2 thing(s), 0 flow(s), 1 reaction(s), 0 goal(s); 1 proposal(s)\noB.Live()\n#--> [clinic-b] is live -- 2 thing(s), 0 flow(s), 1 reaction(s), 0 goal(s); 1 proposal(s)\n? @@( oA.Proposals() )\n#--> [ [ \"propose\", \"checkup\", \"for\", \"bob\" ] ]\n? @@( oB.Proposals() )\n#--> [ [ \"propose\", \"checkup\", \"for\", \"bob\" ] ]",
     "promised": "[clinic-a] is live -- 2 thing(s), 0 flow(s), 1 reaction(s), 0 goal(s); 1 proposal(s)\n[clinic-b] is live -- 2 thing(s), 0 flow(s), 1 reaction(s), 0 goal(s); 1 proposal(s)\n[ [ \"propose\", \"checkup\", \"for\", \"bob\" ] ]\n[ [ \"propose\", \"checkup\", \"for\", \"bob\" ] ]",
     "output": "[clinic-a] is live -- 2 thing(s), 0 flow(s), 1 reaction(s), 0 goal(s); 1 proposal(s)\n[clinic-b] is live -- 2 thing(s), 0 flow(s), 1 reaction(s), 0 goal(s); 1 proposal(s)\n[ [ \"propose\", \"checkup\", \"for\", \"bob\" ] ]\n[ [ \"propose\", \"checkup\", \"for\", \"bob\" ] ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oSuper = new stzSuperApp(\"acme-group\")\ntry\n    oSuper.Hosts(:VisitApp)\ncatch\n    ? cCatchError\ndone\n#--> Error (R14) : Calling Method without definition: hosts\ntry\n    oSuper.Admits(:VisitApp)\ncatch\n    ? cCatchError\ndone\n#--> Error (R14) : Calling Method without definition: admits\ntry\n    oSuper.Explain()\ncatch\n    ? cCatchError\ndone\n#--> Error (R14) : Calling Method without definition: explain",
     "promised": "Error (R14) : Calling Method without definition: hosts\nError (R14) : Calling Method without definition: admits\nError (R14) : Calling Method without definition: explain",
     "output": "Error (R14) : Calling Method without definition: hosts\nError (R14) : Calling Method without definition: admits\nError (R14) : Calling Method without definition: explain",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? YourConstellation.CallAcross(\"a\", \"b\", \"act\")\n#--> 1",
     "promised": "1",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "oResto = StzAppQ(\"resto\")\noResto.AddThingQ(:dish) { Has([ :name, :price ]) }\noSupplier = StzAppQ(\"supplier\")\noSupplier.AddThingQ(:crate) { Has([ :produce, :qty ]) }\noCon = new stzSuperApp(\"acme-group\")\noCon.AddWorld(\"resto\", oResto)\noCon.AddWorld(\"supplier\", oSupplier)\noCon.Bond(\"resto\", \"supplier\", \"order-produce\")\n? oCon.CallAcross(\"resto\", \"supplier\", \"order-produce\")\n? oCon.Why()\noCon.GovDeclareRisk(\"order-produce\", 2)\n? oCon.CallAcross(\"resto\", \"supplier\", \"order-produce\")\n? oCon.Why()\noCon.GovGrant(\"resto\", \"order-produce\")\n? oCon.CallAcross(\"resto\", \"supplier\", \"order-produce\")\n? oCon.Why()\n? oCon.CallAcross(\"resto\", \"supplier\", \"order-produce\")\n? oCon.Why()",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stzApp-building-your-first-app-narration.md",
    "stz-system-dev-to-deploy-narration.md",
    "stz-built-on-real-world-need.md"
   ],
   "rulings": [
    "12.2",
    "12.12",
    "12.13",
    "12.15",
    "12.19",
    "12.25",
    "12.29"
   ],
   "doors": {
    "programmer": "You declare a world with braces, ask it to explain itself, and cross between worlds with a call that returns 0 and a `Why()` that names the gate. Watch the copy: configure, then register.",
    "analyst": "You declare things, relations and a goal as a wanted state of the graph, and the gap is measured. Your truths and durations are narrated and not yet judged.",
    "designer": "A world declares screens as intents, a refinement as a bounded knob, and where it appears. The shells generated today are stubs, and the persona a world serves is not a field.",
    "decision-maker": "You declare who may cross where and at what risk, in three gates, and every cleared crossing leaves a decision: the block printed its rationale, and its record holds the authority and the risk of its moment. Your architect's file is text you own.",
    "educator": "The record is thin. The education plan lists a ladder from practitioner to architect to contributor among five competing level schemes, and I say so. The exercise below is judged by running.",
    "agent": "A world can be wrapped as an AI agent that the host ticks. A deploy by a language-model actor is refused, and nothing is deployed. The crossing between worlds is governed by the calling world's name and authority."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3766,
   "french": true,
   "text": "agents/ch23-a-world-a-constellation-a-platform.md",
   "run": {
    "ran": "2026-10-15 13:00 UTC+01:00",
    "kept": 10,
    "runnable": 10
   }
  },
  {
   "number": 24,
   "id": "rehearse-then-commit",
   "title": "Rehearse, then commit",
   "slug": "ch24-rehearse-then-commit",
   "kind": "chapter",
   "part": 5,
   "appendix": null,
   "law": null,
   "principle": "Reality is reached through exactly one door: rehearse on what touches nothing, commit through a governed actor, and let production refuse anything that is fake.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "a twin of files and a twin of the process environment, each with its history, snapshots, a narrated plan, its risks and, for the file twin, a validation against reality; the placement plan; the emulator's bundle, wired into the production attach; a deployment as a graph of steps with a rollback; the registry of services with its postures and the gate that refuses a fake at production",
    "designed": "the engine seen running in a browser; a drift check for recorded answers; branches of a twin; twins for databases, interfaces and networks; the emulated phase set by the emulated deploy",
    "absent": "any live card-gateway adapter for payments (a hub adapter is built and proved only against a twin, chapter 31), an AI model, mail, SMS or an object store; live verification of a remote host; a person's look at the emulator's surface; a customer solution emulated and deployed through this path"
   },
   "guards": [
    {
     "name": "service_registry_narrated",
     "exists": true,
     "path": "base/test/system/service_registry_narrated.ring",
     "assertions": 93,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/service_registry_narrated.ring"
    },
    {
     "name": "service_delivery_narrated",
     "exists": true,
     "path": "base/test/system/service_delivery_narrated.ring",
     "assertions": 60,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/service_delivery_narrated.ring"
    },
    {
     "name": "virtual_system_twin_narrated",
     "exists": true,
     "path": "base/test/system/virtual_system_twin_narrated.ring",
     "assertions": 48,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/virtual_system_twin_narrated.ring"
    },
    {
     "name": "virtual_environment_twin_narrated",
     "exists": true,
     "path": "base/test/system/virtual_environment_twin_narrated.ring",
     "assertions": 38,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/virtual_environment_twin_narrated.ring"
    },
    {
     "name": "emulator_narrated",
     "exists": true,
     "path": "base/test/system/emulator_narrated.ring",
     "assertions": 39,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/emulator_narrated.ring"
    },
    {
     "name": "deployment_narrated",
     "exists": true,
     "path": "base/test/system/deployment_narrated.ring",
     "assertions": 63,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/deployment_narrated.ring"
    },
    {
     "name": "full_scope_model_narrated",
     "exists": true,
     "path": "base/test/system/full_scope_model_narrated.ring",
     "assertions": 62,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/full_scope_model_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oBench = new stzVirtualFileSystem()\noBench {\n\tCreateFolder(\"config\")\n\tCreateFile(\"config/pump.ini\", \"threshold=40\")\n\tMoveFile(\"old_settings.txt\", \"config/legacy.ini\")\n}\noPlan = oBench.GenerateUpdatePlan()\noPlan {\n\t? Narration()\n\t#--> Update plan (3 of 3 operations to commit):\n\t#-->   * 1. create folder 'config'\n\t#-->   * 2. create file 'config/pump.ini' (12 bytes)\n\t#-->   * 3. move 'old_settings.txt' -> 'config/legacy.ini'\n\t? @@(Risks())\n\t#--> [ [ 3, \"MOVES (removes source): move 'old_settings.txt' -> 'config/legacy.ini'\" ] ]\n\t? @@(Validate())\n\t#--> [ [ 3, \"source absent in reality: old_settings.txt\" ] ]\n}",
     "promised": "Update plan (3 of 3 operations to commit):\n* 1. create folder 'config'\n* 2. create file 'config/pump.ini' (12 bytes)\n* 3. move 'old_settings.txt' -> 'config/legacy.ini'\n[ [ 3, \"MOVES (removes source): move 'old_settings.txt' -> 'config/legacy.ini'\" ] ]\n[ [ 3, \"source absent in reality: old_settings.txt\" ] ]",
     "output": "Update plan (3 of 3 operations to commit):\n  * 1. create folder 'config'\n  * 2. create file 'config/pump.ini' (12 bytes)\n  * 3. move 'old_settings.txt' -> 'config/legacy.ini'\n\n[ [ 3, \"MOVES (removes source): move 'old_settings.txt' -> 'config/legacy.ini'\" ] ]\n[ [ 3, \"source absent in reality: old_settings.txt\" ] ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oEnv = new stzVirtualEnvironment()\noEnv {\n\tSetActor(\"agent-42\")\n\tSetVar(\"SHOP_MODE\", \"rehearsal\")\n\tCd(\"/srv/shop\")\n\tSpawn(\"backup-database --all\")\n\t? Var(\"SHOP_MODE\")\n\t#--> rehearsal\n\t? NumberOfPendingSpawns()\n\t#--> 1\n}\n? (new stzEnvironment()).Has(\"SHOP_MODE\")\n#--> 0\noEnvPlan = oEnv.GenerateUpdatePlan()\n? oEnvPlan.Narration()\n#--> Update plan (3 of 3 operations to commit):\n#-->   * 1. set env var 'SHOP_MODE' = 'rehearsal'\n#-->   * 2. change directory to '/srv/shop'\n#-->   * 3. spawn process: backup-database --all\n? @@(oEnvPlan.Risks())\n#--> [ [ 3, \"RUNS an external command (side effects): spawn process: backup-database --all\" ] ]",
     "promised": "rehearsal\n1\n0\nUpdate plan (3 of 3 operations to commit):\n* 1. set env var 'SHOP_MODE' = 'rehearsal'\n* 2. change directory to '/srv/shop'\n* 3. spawn process: backup-database --all\n[ [ 3, \"RUNS an external command (side effects): spawn process: backup-database --all\" ] ]",
     "output": "rehearsal\n1\n0\nUpdate plan (3 of 3 operations to commit):\n  * 1. set env var 'SHOP_MODE' = 'rehearsal'\n  * 2. change directory to '/srv/shop'\n  * 3. spawn process: backup-database --all\n\n[ [ 3, \"RUNS an external command (side effects): spawn process: backup-database --all\" ] ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oProduct = new stzPlatformProfile(\"greenhouse\")\noProduct {\n\tDevelopedOn(:Windows)\n\tWithApp(:sensor, :ESP32)\n\t? ReadPinIn(:sensor, 34)\n\t#--> rehearsed\n\t? WritePinIn(:sensor, 26, 1)\n\t#--> rehearsed\n}\noPlatform = StzPlatformQ(\"greenhouse\")\noPlatform {\n\tSetProfile(oProduct)\n\tBuild()\n\ttry\n\t\tDeployAs(LLMActor(\"copilot\"))\n\tcatch\n\t\t? cCatchError\n\tdone\n\t#--> stzPlatform.Deploy: actor 'copilot' lacks the 'effectful' capability -- it may propose a deploy, not perform it.\n\t? IsDeployed()\n\t#--> 0\n\tDeployAs(HumanActor(\"me\"))\n\t? ArtifactFor(:sensor)\n\t#--> // firmware generated by the Softanza lowering bridge\n\t#--> // target: espidf\n\t#--> void setup() {}\n\t#--> void loop() {\n\t#-->   digitalRead(34);\n\t#-->   digitalWrite(26, 1);\n\t#--> }\n}",
     "promised": "rehearsed\nrehearsed\nstzPlatform.Deploy: actor 'copilot' lacks the 'effectful' capability -- it may propose a deploy, not perform it.\n0\n// firmware generated by the Softanza lowering bridge\n// target: espidf\nvoid setup() {}\nvoid loop() {\ndigitalRead(34);\ndigitalWrite(26, 1);\n}",
     "output": "rehearsed\nrehearsed\nstzPlatform.Deploy: actor 'copilot' lacks the 'effectful' capability -- it may propose a deploy, not perform it.\n\n0\n// firmware generated by the Softanza lowering bridge\n// target: espidf\nvoid setup() {}\nvoid loop() {\n  digitalRead(34);\n  digitalWrite(26, 1);\n}",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oShip = new stzDelivery(\"shop\")\noShip {\n\tAddSuperApp(:phone, :Android)\n\tNeedsIn(:phone, [ :Unicode, :PivotTable, :Collection, :Neural ])\n\tPlan().Show()\n\t#--> Solution 'shop' -- placement & scope plan (rehearsal; nothing built yet)\n\t#--> ==============================================================================\n\t#-->\n\t#-->   Part 'phone' [superapp] -> android (mobile / edge)\n\t#-->      Unicode            [target]    Unicode: the target-platform is strong at it -> use its own\n\t#-->      PivotTable         [stz.wasm]  PivotTable: Softanza-differential, mobile weak -> the on-device engine\n\t#-->      Collection         [stz.js]    Collection: ergonomic -> a Softanza construct in the target language\n\t#-->      Neural             [server]    Neural: heavy -> runs on the backend, not the edge\n\t#-->      -> stz.wasm carries: [ \"PivotTable\" ]  (~12 KB, 1 of 4)\n\t#-->\n\t#-->   Summary: 4 capabilities across 1 parts -> target 1, engine 1, construct 1, server 1.\n\t#-->   Build() will compile exactly this scope; Deploy() will commit it.\n}",
     "promised": "Solution 'shop' -- placement & scope plan (rehearsal; nothing built yet)\n==============================================================================\nPart 'phone' [superapp] -> android (mobile / edge)\nUnicode            [target]    Unicode: the target-platform is strong at it -> use its own\nPivotTable         [stz.wasm]  PivotTable: Softanza-differential, mobile weak -> the on-device engine\nCollection         [stz.js]    Collection: ergonomic -> a Softanza construct in the target language\nNeural             [server]    Neural: heavy -> runs on the backend, not the edge\n-> stz.wasm carries: [ \"PivotTable\" ]  (~12 KB, 1 of 4)\nSummary: 4 capabilities across 1 parts -> target 1, engine 1, construct 1, server 1.\nBuild() will compile exactly this scope; Deploy() will commit it.",
     "output": "Solution 'shop' -- placement & scope plan (rehearsal; nothing built yet)\n==============================================================================\n\n  Part 'phone' [superapp] -> android (mobile / edge)\n     Unicode            [target]    Unicode: the target-platform is strong at it -> use its own\n     PivotTable         [stz.wasm]  PivotTable: Softanza-differential, mobile weak -> the on-device engine\n     Collection         [stz.js]    Collection: ergonomic -> a Softanza construct in the target language\n     Neural             [server]    Neural: heavy -> runs on the backend, not the edge\n     -> stz.wasm carries: [ \"PivotTable\" ]  (~12 KB, 1 of 4)\n\n  Summary: 4 capabilities across 1 parts -> target 1, engine 1, construct 1, server 1.\n  Build() will compile exactly this scope; Deploy() will commit it.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cHere = StzReplace(WorkingDirectory(), \"\\\", \"/\")\noFront = new stzDelivery(\"shopfront\")\noFront.AddSuperApp(:web, :Browser)\noFront.NeedsIn(:web, [ :Unicode, :PivotTable, :Collection ])\noBundle = new stzEmulator(oFront)\noBundle {\n\tCompileEngineQ(FALSE)\n\tSetOutDirQ(cHere + \"/_bundle\")\n\tBuild()\n}\noSite = new stzDeploymentSite(\"cdn\")\noSite.SetKindQ(:LocalRepo).SetStoreAtQ(cHere + \"/_live\")\noFront {\n\tDeployTo(oSite, :web)\n\tShipSlice(:web, oBundle)\n\tSetActor(LLMActor(\"assistant\"))\n\tDeploy(:Production)\n\t? oSite.Status()\n\t#--> absent\n\tSetActor(HumanActor(\"ops\"))\n\tDeploy(:Production)\n\t? oSite.Status()\n\t#--> launched\n}\n? @@(StzEngineDirListFiles(cHere + \"/_live\"))\n#--> [ \".stzsite\", \"deploy.json\", \"index.html\", \"stz.js\" ]\n? read(cHere + \"/_live/deploy.json\")\n#--> {\n#-->   \"solution\": \"shopfront\",\n#-->   \"part\": \"web\",\n#-->   \"engine\": \"aggregation\",\n#-->   \"artifacts\": \"index.html,stz.js\"\n#--> }\nStzDirDeleteAll(cHere + \"/_bundle\")\nStzDirDeleteAll(cHere + \"/_live\")",
     "promised": "absent\nlaunched\n[ \".stzsite\", \"deploy.json\", \"index.html\", \"stz.js\" ]\n{\n\"solution\": \"shopfront\",\n\"part\": \"web\",\n\"engine\": \"aggregation\",\n\"artifacts\": \"index.html,stz.js\"\n}",
     "output": "absent\nlaunched\n[ \".stzsite\", \"deploy.json\", \"index.html\", \"stz.js\" ]\n{\n  \"solution\": \"shopfront\",\n  \"part\": \"web\",\n  \"engine\": \"aggregation\",\n  \"artifacts\": \"index.html,stz.js\"\n}",
     "verdict": "kept",
     "effects": [
      "files"
     ]
    },
    {
     "code": "cHere = StzReplace(WorkingDirectory(), \"\\\", \"/\")\noShop10 = new stzDelivery(\"shop\")\noShop10.AddBackend(:api, :LinuxServer)\noShop10.AddSuperApp(:web, :Browser)\noGood = new stzDeploymentSite(\"cdn\")\noGood.SetKindQ(:LocalRepo).SetStoreAtQ(cHere + \"/_site_cdn\")\noBad = new stzDeploymentSite(\"prod-api\")\noBad.SetKindQ(:Server)\noRun = new stzDeployment(oShop10)\noRun {\n\tSetActor(HumanActor(\"ops\"))\n\tSetTarget(:web, oGood)\n\tSetTarget(:api, oBad)\n\tRunAfter(:api, :web)\n\taRun = Run()\n}\n? aRun[1]\n#--> 0\nfor aLine in aRun[2]\n\t? aLine[1] + \" -> \" + aLine[2]\nnext\n#--> store:web -> done\n#--> launch:web -> done\n#--> verify:web -> done\n#--> store:api -> FAILED\n#--> launch:api -> skipped\n#--> verify:api -> skipped\n? oGood.Status()\n#--> rolledback\nStzDirDeleteAll(cHere + \"/_site_cdn\")",
     "promised": "0\nstore:web -> done\nlaunch:web -> done\nverify:web -> done\nstore:api -> FAILED\nlaunch:api -> skipped\nverify:api -> skipped\nrolledback",
     "output": "0\nstore:web -> done\nlaunch:web -> done\nverify:web -> done\nstore:api -> FAILED\nlaunch:api -> skipped\nverify:api -> skipped\nrolledback",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oPay = new stzPaymentsSandbox()\noReg = new stzServiceRegistry(\"shop\")\noReg.DeclareMany([ :payments, :mail ])\noReg.Bind(:payments, oPay)\noReg.Bind(:mail, new stzMailSandbox())\n? Checkout(oReg, 4200)\n#--> authorized\n? oPay.NumberOfAuthorizations()\n#--> 1\noStoreCf = new stzSecretStore(\"shop\")\noStoreCf.Register( (new stzApiKey(\"stripe-key\")).FromLiteralQ(\"sk-test-123\") )\noStoreCf.Register( (new stzApiKey(\"mail-key\")).FromLiteralQ(\"mk-test-123\") )\noReg.BindLive(:payments, new LiveGateway, \"stripe-key\")\noReg.BindLive(:mail, new LiveMailer, \"mail-key\")\n? Checkout(oReg, 4200)\n#--> authorized\n? oPay.NumberOfAuthorizations()\n#--> 1\n? oReg.PostureOf(:payments)\n#--> live\noReg.SetPhase(:production)\n? oReg.IsSoundVia(oStoreCf)\n#--> 1\n\nfunc Checkout poReg, nCents\n\taRes = poReg.Service(:payments).Authorize(nCents, \"tok_visa\")\n\tpoReg.Service(:mail).Send(\"dana@example.com\", \"Receipt\", \"Thank you.\")\n\treturn aRes[:status]\n\nclass LiveGateway\n\tdef init\n\t\treturn\n\tdef Authorize nAmount, cToken\n\t\treturn [ :status = \"authorized\" ]\n\nclass LiveMailer\n\tdef init\n\t\treturn\n\tdef Send cTo, cSubject, cBody\n\t\treturn 1",
     "promised": "authorized\n1\nauthorized\n1\nlive\n1",
     "output": "authorized\n1\nauthorized\n1\nlive\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oStoreSf = new stzSecretStore(\"shop\")\noSurf = new stzServiceRegistry(\"shop\")\noSurf {\n\tBind(:payments, new stzPaymentsSandbox())\n\tBind(:scratch, StzMemoryDataSourceQ())\n\tBindLive(:cache, new stzString(\"cache-adapter\"), \"redis-url\")\n\tBindLive(:sms, new stzString(\"sms-adapter\"), \"\")\n\tDeclare(:reporting)\n\t? IsSoundVia(oStoreSf)\n\t#--> 0\n\tSetPhase(:production)\n\tReportVia(oStoreSf)\n\t#--> Service registry 'shop' [production] -- 4 bound: 1 sandboxed, 1 local, 2 live\n\t#-->   [ERROR] unbound-service @ shop/reporting -- declared but never bound -- asking for it will raise\n\t#-->   [ERROR] sandbox-in-production @ shop/payments -- still bound to a SANDBOX in a production phase -- a fake must never ship\n\t#-->   [ERROR] ephemeral-in-production @ shop/scratch -- a LOCAL source that vanishes on restart (in-memory) is bound in a production phase\n\t#-->   [ERROR] live-without-secret @ shop/cache -- credential 'redis-url' is not in the secret store\n\t#-->   [WARN] inline-credential @ shop/sms -- live adapter bound without naming a store secret\n}",
     "promised": "0\nService registry 'shop' [production] -- 4 bound: 1 sandboxed, 1 local, 2 live\n[ERROR] unbound-service @ shop/reporting -- declared but never bound -- asking for it will raise\n[ERROR] sandbox-in-production @ shop/payments -- still bound to a SANDBOX in a production phase -- a fake must never ship\n[ERROR] ephemeral-in-production @ shop/scratch -- a LOCAL source that vanishes on restart (in-memory) is bound in a production phase\n[ERROR] live-without-secret @ shop/cache -- credential 'redis-url' is not in the secret store\n[WARN] inline-credential @ shop/sms -- live adapter bound without naming a store secret",
     "output": "0\nService registry 'shop' [production] -- 4 bound: 1 sandboxed, 1 local, 2 live\n  [ERROR] unbound-service @ shop/reporting -- declared but never bound -- asking for it will raise\n  [ERROR] sandbox-in-production @ shop/payments -- still bound to a SANDBOX in a production phase -- a fake must never ship\n  [ERROR] ephemeral-in-production @ shop/scratch -- a LOCAL source that vanishes on restart (in-memory) is bound in a production phase\n  [ERROR] live-without-secret @ shop/cache -- credential 'redis-url' is not in the secret store\n  [WARN] inline-credential @ shop/sms -- live adapter bound without naming a store secret",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oStoreWw = new stzSecretStore(\"shop\")\noOne = new stzServiceRegistry(\"shop\")\noOne {\n\tBind(:payments, new stzPaymentsSandbox())\n\t? Phase()\n\t#--> development\n\t? MayGoLive(LLMActor(\"assistant\"), oStoreWw)\n\t#--> 0\n\t? WhyNotLive(LLMActor(\"assistant\"), oStoreWw)\n\t#--> actor 'assistant' is not effectful -- it may propose, not commit\n\t? MayGoLive(HumanActor(\"dana\"), oStoreWw)\n\t#--> 0\n\t? WhyNotLive(HumanActor(\"dana\"), oStoreWw)\n\t#--> sandbox-in-production: still bound to a SANDBOX in a production phase -- a fake must never ship\n\t? Phase()\n\t#--> development\n}",
     "promised": "development\n0\nactor 'assistant' is not effectful -- it may propose, not commit\n0\nsandbox-in-production: still bound to a SANDBOX in a production phase -- a fake must never ship\ndevelopment",
     "output": "development\n0\nactor 'assistant' is not effectful -- it may propose, not commit\n0\nsandbox-in-production: still bound to a SANDBOX in a production phase -- a fake must never ship\ndevelopment",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oS3 = new stzServiceRegistry(\"shop\")\noS3 {\n\tDeclareMany([ :payments, :cache ])\n\tBindSandbox(:payments, new stzPaymentsSandbox())\n\tBindLocal(:cache, StzMemoryBlobStoreQ())\n}\noD3 = new stzDelivery(\"shop\")\noD3 {\n\tAddBackend(\"api\", \"linux\")\n\tAddApp(\"web\", \"browser\")\n\tUseServicesQ(oS3)\n\tNeedsServiceInQ(\"api\", [ :payments, :cache ])\n\tNeedsServiceInQ(\"web\", [ :reporting ])\n\tDeployTo(StzDeploymentSiteQ(\"host1\"), \"api\")\n}\n? oS3.Phase()\n#--> development\n? len(oS3.Findings())\n#--> 0\nfor aF in StzCheckServiceDelivery(oD3)\n\t? aF[:rule] + \" @ \" + aF[:where] + \" [\" + aF[:severity] + \"]\"\nnext\n#--> production-part-uses-sandbox @ api [error]\n#--> production-part-uses-ephemeral @ api [error]\n#--> part-uses-undeclared-service @ web [warning]",
     "promised": "development\n0\nproduction-part-uses-sandbox @ api [error]\nproduction-part-uses-ephemeral @ api [error]\npart-uses-undeclared-service @ web [warning]",
     "output": "development\n0\nproduction-part-uses-sandbox @ api [error]\nproduction-part-uses-ephemeral @ api [error]\npart-uses-undeclared-service @ web [warning]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oUndeclared = new stzServiceRegistry(\"shop\")\noUndeclared {\n\tBind(:payments, new AlwaysYes)\n\tSetPhase(:production)\n\t? PostureOf(:payments)\n\t#--> live\n\t? IsSound()\n\t#--> 1\n}\n\nclass AlwaysYes\n\tdef init\n\t\treturn\n\tdef Authorize nAmount, cToken\n\t\treturn [ :status = \"authorized\" ]",
     "promised": "live\n1",
     "output": "live\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oMine = new stzServiceRegistry(\"my-project\")\noMine.Bind(:payments, new stzPaymentsSandbox())\noMine.Bind(:notes, StzMemoryDataSourceQ())\noMine.BindLive(:maps, new stzString(\"maps-adapter\"), \"maps_key\")\noStoreMine = new stzSecretStore(\"my-project\")\n# under each line, write the line you expect before you run it\n? oMine.IsSound()\n? oMine.IsSoundVia(oStoreMine)\n? len(oMine.FindingsForProductionVia(oStoreMine))\n? oMine.MayGoLive(HumanActor(\"me\"), oStoreMine)\n? oMine.Phase()",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "oPay = new stzPaymentsSandbox()\noReg = new stzServiceRegistry(\"shop\")\noReg.DeclareMany([ :payments, :mail ])\noReg.Bind(:payments, oPay)\noReg.Bind(:mail, new stzMailSandbox())\n? Checkout(oReg, 4200)\n? oPay.NumberOfAuthorizations()\noStoreCf = new stzSecretStore(\"shop\")\noStoreCf.Register( (new stzApiKey(\"stripe-key\")).FromLiteralQ(\"sk-test-123\") )\noStoreCf.Register( (new stzApiKey(\"mail-key\")).FromLiteralQ(\"mk-test-123\") )\noReg.BindLive(:payments, new LiveGateway, \"stripe-live\")\noReg.BindLive(:mail, new LiveMailer, \"mail-key\")\n? Checkout(oReg, 4200)\n? oPay.NumberOfAuthorizations()\n? oReg.PostureOf(:payments)\noReg.SetPhase(:production)\n? oReg.IsSoundVia(oStoreCf)\n\nfunc Checkout poReg, nCents\n\taRes = poReg.Service(:payments).Authorize(nCents, \"tok_visa\")\n\tpoReg.Service(:mail).Send(\"dana@example.com\", \"Receipt\", \"Thank you.\")\n\treturn aRes[:status]\n\nclass LiveGateway\n\tdef init\n\t\treturn\n\tdef Authorize nAmount, cToken\n\t\treturn [ :status = \"authorized\" ]\n\nclass LiveMailer\n\tdef init\n\t\treturn\n\tdef Send cTo, cSubject, cBody\n\t\treturn 1",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-service-virtualization-code-first-subscribe-later.md",
    "stz-emulating-the-whole-solution-narration.md",
    "stz-deploying-to-target-sites-narration.md",
    "stz-planning-and-provisioning-a-deployment-narration.md",
    "stz-system-dev-to-deploy-narration.md"
   ],
   "rulings": [
    "12.13",
    "12.19",
    "12.21",
    "12.22",
    "12.25",
    "12.28",
    "12.29"
   ],
   "doors": {
    "programmer": "You code the whole integration against names, with doubles that raise when you forgot something and a counter that lets you assert a fee. The day you subscribe, you change a binding and not a line. The loss: a double you wrote yourself that declares nothing is taken for live by the gate.",
    "analyst": "Before anything moves you can read the placement plan, the external dependencies with the credentials production will ask for by name, the step graph, and which part depends on a fake. The sizes are estimates, and the findings are by part.",
    "designer": "The emulator generates a surface from the plan, with a parts grid by role and one window per part. I checked the generated text only, and never the look. Say \"generated\", and not \"seen\".",
    "decision-maker": "\"Who may deploy?\" is a property. An assistant may plan the release and the site stays absent. A person may commit. Neither may ship a declared fake. The loss to print: live hosts and real providers are gated by infrastructure, and the record names no live run.",
    "educator": "A learner can build a whole shop's integration with no account, no key and no fee, and watch the double refuse what she forgot. Her deployment fails safely and rolls back.",
    "agent": "You may rehearse the whole integration and plan the whole release, in a world where nothing real can move: a sandbox payment moves no money and a mail sink sends no mail. You may ask whether you may go live and be told why not. You cannot commit. The loss: that guarantee covers the library's own doubles, and a surface bound to something live is outside it."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 4144,
   "french": true,
   "text": "agents/ch24-rehearse-then-commit.md",
   "run": {
    "ran": "2026-10-15 13:00 UTC+01:00",
    "kept": 11,
    "runnable": 11
   }
  },
  {
   "number": 25,
   "id": "your-users-keep-their-medium",
   "title": "Your users keep their medium",
   "slug": "ch25-your-users-keep-their-medium",
   "kind": "chapter",
   "part": 5,
   "appendix": null,
   "law": null,
   "principle": "A new medium adds renderings, never verbs.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "the governed conversation with its question as data; the SMS port and its sandbox, with the bill per segment in two alphabets; a verifier for the body of an inbound message; five semantic values rendered as colour, earcon and phrase; a voice that speaks, and hears a closed grammar; a closed set of sentences a business agrees to say; a message of three fields between identities of one platform",
    "designed": "the commons service of messaging; conversational surfaces for a messaging app, SMS, USSD and voice, with a satisfiability matrix as a court; templates as a grammar",
    "absent": "a messaging app, USSD or a telephone line, in any form; a conversational projection of a world; a channel, a session, a template, consent; the question in a language other than English; a voice for Hausa, Zarma or Fulfulde; the twenty-two verbs as a list the library holds; a reply with a space in it"
   },
   "guards": [
    {
     "name": "sms_port_narrated",
     "exists": true,
     "path": "base/test/system/sms_port_narrated.ring",
     "assertions": 53,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/sms_port_narrated.ring"
    },
    {
     "name": "wisecoding_rich_narrated",
     "exists": true,
     "path": "base/test/conversation/wisecoding_rich_narrated.ring",
     "assertions": 52,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/conversation/wisecoding_rich_narrated.ring"
    },
    {
     "name": "sound_convergence_narrated",
     "exists": true,
     "path": "base/test/sound/sound_convergence_narrated.ring",
     "assertions": 26,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/sound/sound_convergence_narrated.ring"
    },
    {
     "name": "sound_listener_narrated",
     "exists": true,
     "path": "base/test/sound/sound_listener_narrated.ring",
     "assertions": 21,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/sound/sound_listener_narrated.ring"
    },
    {
     "name": "sound_semantics_narrated",
     "exists": true,
     "path": "base/test/sound/sound_semantics_narrated.ring",
     "assertions": 41,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/sound/sound_semantics_narrated.ring"
    },
    {
     "name": "payments_webhooks_narrated",
     "exists": true,
     "path": "base/test/system/payments_webhooks_narrated.ring",
     "assertions": 51,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/payments_webhooks_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "aEn = QuestionAfter(\"couscous\", \"brik\")\naAr = QuestionAfter(\"كسكس\", \"بريك\")\n? ToText(aEn)\n#--> Which dish for order3? (every order needs 'dish') 1) couscous 2) brik. Reply with the number.\n? StzSmsSegments(ToText(aEn))[:segments]\n#--> 1\n? StzSmsSegments(ToText(aAr))[:encoding]\n#--> ucs2\n? StzSmsSegments(ToText(aAr))[:segments]\n#--> 2\noBill = new stzSmsSandbox()\noBill {\n\tSend(\"+22790112233\", ToText(aEn))\n\tSend(\"+22790112233\", ToText(aAr))\n\t? TotalSegments()\n\t#--> 3\n}\n\nfunc ToText(aQ)\n\tcOut = \"Which \" + aQ[:relation] + \" for \" + aQ[:subject] + \"? (\" + aQ[:why] + \")\"\n\tfor i = 1 to len(aQ[:options])\n\t\tcOut += \" \" + i + \") \" + aQ[:options][i]\n\tnext\n\treturn cOut + \". Reply with the number.\"\n\nfunc ReadReply(cText)\n\tfor c in cText\n\t\tif NOT isdigit(c)\n\t\t\treturn cText\n\t\tok\n\tnext\n\treturn 0 + cText\n\nfunc QuestionAfter(cA, cB)\n\toW = new stzKnowledgeGraph(\"stall\")\n\toW {\n\t\tKnow(\"order1\", \"order\")\n\t\tKnow(\"order2\", \"order\")\n\t\tKnow(\"order3\", \"order\")\n\t\tAddConversationQ(\"c\").SetGoal(StzGoalQ().RequireEach(\"order\", \"dish\"))\n\t\tAskIn(\"c\")\n\t\tReplyIn(\"c\", cA)\n\t\tAskIn(\"c\")\n\t\tReplyIn(\"c\", cB)\n\t}\n\treturn oW.AskInXT(\"c\")",
     "promised": "Which dish for order3? (every order needs 'dish') 1) couscous 2) brik. Reply with the number.\n1\nucs2\n2\n3",
     "output": "Which dish for order3? (every order needs 'dish') 1) couscous 2) brik. Reply with the number.\n1\nucs2\n2\n3",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKB = new stzKnowledgeGraph(\"stall\")\noKB.Know(\"order1\", \"order\")\noKB.Know(\"order2\", \"order\")\noKB.Know(\"order3\", \"order\")\noKB.AddConversationQ(\"c\").SetGoal(StzGoalQ().RequireEach(\"order\", \"dish\"))\noSms = new stzSmsSandbox()\nfor cIn in [ \"couscous\", \"brik\", \"7\", \"2\" ]\n\toSms.Send(\"+22790112233\", ToText(oKB.AskInXT(\"c\")))\n\toKB.ReplyIn(\"c\", ReadReply(cIn))\nnext\n? oKB.ConversationQ(\"c\").GoalState()\n#--> fulfilled\n? oSms.NumberOfMessages()\n#--> 4\n? oSms.TotalSegments()\n#--> 4\n? oKB.ConversationQ(\"c\").Checkpoints()[1][:why]\n#--> no option (7) was offered -- 2 option(s) on the table\n? @@(oKB.Query([ \"order3\", \"dish\", \"?o\" ]))\n#--> [ \"brik\" ]",
     "promised": "fulfilled\n4\n4\nno option (7) was offered -- 2 option(s) on the table\n[ \"brik\" ]",
     "output": "fulfilled\n4\n4\nno option (7) was offered -- 2 option(s) on the table\n[ \"brik\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKT = new stzKnowledgeGraph(\"trap\")\noKT.Know(\"order1\", \"order\")\noKT.AddConversationQ(\"c\").SetGoal(StzGoalQ().RequireEach(\"order\", \"dish\"))\noKT.AskIn(\"c\")\n? @@(oKT.ReplyIn(\"c\", \"2\")[:admitted])\n#--> [ \"2\" ]",
     "promised": "[ \"2\" ]",
     "output": "[ \"2\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oPh = new stzSmsSandbox()\noPh {\n\t? Send(\"0612345678\", \"ready\")[:status]\n\t#--> rejected\n\tFailNextQ()\n\t? Send(\"+22790112233\", \"ready\")[:status]\n\t#--> refused\n\t? NumberOfMessages()\n\t#--> 0\n\t? Send(\"+22790112233\", \"ready\")[:status]\n\t#--> sent\n\t? NumberOfMessages()\n\t#--> 1\n}",
     "promised": "rejected\nrefused\n0\nsent\n1",
     "output": "rejected\nrefused\n0\nsent\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oSig = new stzRequestSigner(\"inbound\")\noSig {\n\tAddKey(\"provider\", \"a-shared-secret\")\n\tcBody = '{\"from\":\"+22790112233\",\"text\":\"2\"}'\n\tcSig = SignBody(\"provider\", cBody)\n\t? VerifyWebhook(cBody, cSig, 1000, 5000)\n\t#--> provider\n\t? \"[\" + VerifyWebhook('{\"from\":\"+22790112233\",\"text\":\"1\"}', cSig, 2000, 5000) + \"]\"\n\t#--> []\n\t? Why()\n\t#--> signature mismatch (tampered body, or a secret this receiver does not hold)\n}",
     "promised": "provider\n[]\nsignature mismatch (tampered body, or a secret this receiver does not hold)",
     "output": "provider\n[]\nsignature mismatch (tampered body, or a secret this receiver does not hold)",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? @@(StzSemanticValues())\n#--> [ \"danger\", \"warning\", \"info\", \"success\", \"muted\" ]\noE = new stzEarcons()\n? oE.WouldFireAt(\"Catastrophe\", 1)\n#--> 0\n? StzColorToNumber(\"danger.muted\") != StzColorToNumber(\"success.muted\")\n#--> 1",
     "promised": "[ \"danger\", \"warning\", \"info\", \"success\", \"muted\" ]\n0\n1",
     "output": "[ \"danger\", \"warning\", \"info\", \"success\", \"muted\" ]\n0\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oV = StzVoiceQ()\noV.UseLanguage(\"fr-FR\")\noL = new stzListener()\noL {\n\tAcceptMeanings([ [ \"disque plein\", :Danger ], [ \"sauvegarde terminee\", :Success ] ])\n\tHearSound( oV.ToSoundOf(\"disque plein\") )\n\t? MeaningHeard()\n\t#--> danger\n\tHearSound( oV.ToSoundOf(\"je voudrais un cafe au lait\") )\n\t? WasNoMatch()\n\t#--> 1\n\t? AcceptMeanings([ [ \"tout brule\", :Catastrophe ] ])\n\t#--> 0\n}",
     "promised": "danger\n1\n0",
     "output": "danger\n1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oApp = new stzApp(\"stall\")\noApp {\n\tAddThingQ(:Dish) { Has([ :name, :price ]) }\n\tAddScreenQ(:Menu) { ToDiscover(:Dish)  Shows([ :name, :price ]) }\n\tAddScreenQ(:Basket) { ToSelect(:Dish)  Acts(:Confirm, :Order) }\n\tAddReaches([ :web, :whatsapp ])\n\tExplain()\n\t#--> WORLD stall   lives in: memory (not persisted)\n\t#      BEING\n\t#        dish (name, price)\n\t#      MET FROM WITHOUT\n\t#        screen menu: discover dish shows name, price\n\t#        screen basket: select dish\n\t#        reaches web, whatsapp\n}",
     "promised": "WORLD stall   lives in: memory (not persisted)\nBEING\ndish (name, price)\nMET FROM WITHOUT\nscreen menu: discover dish shows name, price\nscreen basket: select dish\nreaches web, whatsapp",
     "output": "WORLD stall   lives in: memory (not persisted)\n  BEING\n    dish (name, price)\n  MET FROM WITHOUT\n    screen menu: discover dish shows name, price\n    screen basket: select dish\n    reaches web, whatsapp",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oPlat = StzPlatformQ(\"stall-platform\")\noPlat.SetWorld(oApp)\ntry\n\toPlat.Generate(:whatsapp)\ncatch\n\t? cCatchError\ndone\n#--> stzPlatform.Generate: unknown reach surface 'whatsapp' (web/desktop/mobile).",
     "promised": "stzPlatform.Generate: unknown reach surface 'whatsapp' (web/desktop/mobile).",
     "output": "stzPlatform.Generate: unknown reach surface 'whatsapp' (web/desktop/mobile).",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oSay = StzOutputSchemaQ([ [ :field = \"reply\", :type = :oneof, :choices = [ \"Your order is received.\", \"Your order is ready.\", \"We are closed tonight.\" ] ] ])\noSay {\n\t? ParseOutput('{\"reply\": \"Your order is ready.\"}')[:ok]\n\t#--> 1\n\taNo = ParseOutput('{\"reply\": \"Your order is free, tonight only.\"}')\n\t? aNo[:ok]\n\t#--> 0\n\t? CiteFindings(aNo[:findings])\n\t#--> [oneof @ reply] field 'reply' is a closed enumeration (your order is received. | your order is ready. | we are closed tonight.) and the model answered 'Your order is free, tonight only.'.\n}",
     "promised": "1\n0\n[oneof @ reply] field 'reply' is a closed enumeration (your order is received. | your order is ready. | we are closed tonight.) and the model answered 'Your order is free, tonight only.'.",
     "output": "1\n0\n[oneof @ reply] field 'reply' is a closed enumeration (your order is received. | your order is ready. | we are closed tonight.) and the model answered 'Your order is free, tonight only.'.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oDb = new stzDatabase(\":memory:\")\nStzPlatformQ(\"neighbourhood\") {\n\tOpenCommonsOn(oDb)\n\tPostMessage(\"customer\", \"kitchen\", \"one brik, no egg\")\n\t? @@(Inbox(\"kitchen\"))\n\t#--> [ [ \"customer\", \"one brik, no egg\" ] ]\n}",
     "promised": "[ [ \"customer\", \"one brik, no egg\" ] ]",
     "output": "[ [ \"customer\", \"one brik, no egg\" ] ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? StzSmsSegments(YourRendering)[:segments]\n#--> your prediction\n? StzSmsSegments(YourRenderingWithOneArabicWord)[:segments]\n#--> your prediction",
     "promised": "your prediction\nyour prediction",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "oKT = new stzKnowledgeGraph(\"trap\")\noKT.Know(\"order1\", \"order\")\noKT.AddConversationQ(\"c\").SetGoal(StzGoalQ().RequireEach(\"order\", \"dish\"))\noKT.AskIn(\"c\")\n? @@(oKT.ReplyIn(\"c\", \"grand couscous\")[:admitted])",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-service-virtualization-code-first-subscribe-later.md",
    "stznatural-narration.md",
    "stzApp-building-your-first-app-narration.md"
   ],
   "rulings": [
    "12.15",
    "12.23",
    "12.24",
    "12.25",
    "12.26",
    "12.27"
   ],
   "doors": {
    "programmer": "The question comes back as data. You write the rendering and the reader for your medium in a dozen lines, and every reply goes through the same door whatever carried it.",
    "analyst": "The goal is the schema of the conversation. The transcript says which message produced which fact. The sandbox counts the bill before a provider exists.",
    "designer": "Your user keeps the phone they have: a text line with numbers, or a spoken phrase. The constitution's verbs are the grammar you render, and a verb the medium cannot render should be a red cell, and not a silent omission. That is designed and not built, since the matrix does not exist.",
    "decision-maker": "A conversation by SMS can be priced in a test: two Arabic dish names moved a 93-character question from one segment to two. The question to ask a vendor, what refuses a sentence your business did not approve, has an answer here: a closed set.",
    "educator": "The tutor already says the missing step as a question in four languages, in templates that carry no code. The record does not name a learner on a plain phone, and nothing serves one yet: there is no USSD and no messaging app.",
    "agent": "You may propose a reply, and only a sentence of the closed set passes. An invented one is refused with its reason. And you cannot give a meaning to a phrase: the crafter declares it."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3888,
   "french": true,
   "text": "agents/ch25-your-users-keep-their-medium.md",
   "run": {
    "ran": "2026-10-15 13:00 UTC+01:00",
    "kept": 11,
    "runnable": 11
   }
  },
  {
   "number": 26,
   "id": "the-environment",
   "title": "The environment",
   "slug": "ch26-the-environment",
   "kind": "chapter",
   "part": 5,
   "appendix": null,
   "law": null,
   "principle": "Declare the interface once. Every shell is a projection of it, and a projection may add renderings, never verbs.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "the interface as a text with a court that finds the element serving no verb; two projections of it, native and web, with a recorded table of divergences and a page that can say DISAGREE; the accessibility tree emitted from the declaration; a page the language serves on the loopback; a world that proposes and whose proposals clear when it is acted on; screens declared as intents; one generated browser surface",
    "designed": "the shell kit with two shells; the chrome as closed kinds (spine, ribbon, rail, status bar), none yet a class of the library; the facet as data; a rail bound to focus; status cells read from the courts, with a guard that a cell never shows a state the court did not emit",
    "absent": "an IDE of this family; a list of the twenty-two verbs in the library and a refusal of an unknown verb; a guard that judges a shell against the verbs; an editor; a measured latency"
   },
   "guards": [
    {
     "name": "gui_stzui_narrated",
     "exists": true,
     "path": "base/test/gui/gui_stzui_narrated.ring",
     "assertions": 58,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/gui/gui_stzui_narrated.ring"
    },
    {
     "name": "gui_profile_narrated",
     "exists": true,
     "path": "base/test/gui/gui_profile_narrated.ring",
     "assertions": 35,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/gui/gui_profile_narrated.ring"
    },
    {
     "name": "gui_tier_agreement_narrated",
     "exists": true,
     "path": "base/test/gui/gui_tier_agreement_narrated.ring",
     "assertions": 24,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/gui/gui_tier_agreement_narrated.ring"
    },
    {
     "name": "gui_accessibility_narrated",
     "exists": true,
     "path": "base/test/gui/gui_accessibility_narrated.ring",
     "assertions": 37,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/gui/gui_accessibility_narrated.ring"
    },
    {
     "name": "05_stzapp_live_narrated",
     "exists": true,
     "path": "base/test/app/05_stzapp_live_narrated.ring",
     "assertions": 11,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/app/05_stzapp_live_narrated.ring"
    },
    {
     "name": "emulator_narrated",
     "exists": true,
     "path": "base/test/system/emulator_narrated.ring",
     "assertions": 39,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/emulator_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "aFacets = [ \"Define\", \"Build\", \"Govern\", \"Ship\" ]\ncTabs = \"\"\ncIds = \"\"\nfor cF in aFacets\n\tcId = \"tab_\" + lower(cF)\n\tcIds += cId + \", \"\n\tcTabs += 'DEFINE TEXT ' + cId + ' ( CONTENT \"' + cF + '\", ROLE tab, SATISFIES select ) RATIONALE \"A facet.\"' + nl\nnext\ncShell = 'DEFINE PANEL shell ( SIZE [640, 360], DIRECTION column, FONT \"app\", SATISFIES locate, CHILDREN [ribbon, work, status] ) RATIONALE \"One shell, three bands.\"' + nl +\n\t'DEFINE BOX ribbon ( HEIGHT 32, DIRECTION row, ROLE tablist, SATISFIES discover, CHILDREN [' + cIds + '] ) RATIONALE \"Facets, in the order of a life.\"' + nl + cTabs +\n\t'DEFINE BOX work ( HEIGHT fill, DIRECTION row, CHILDREN [page, rail] ) RATIONALE \"The workspace and its rail.\"' + nl +\n\t'DEFINE TEXT page ( CONTENT \"the work\", SATISFIES read ) RATIONALE \"What is being made.\"' + nl +\n\t'DEFINE BOX rail ( WIDTH 160, ROLE group, SATISFIES preview, CHILDREN [advice] ) RATIONALE \"What the court proposes.\"' + nl +\n\t'DEFINE TEXT advice ( CONTENT \"no proposal\", SATISFIES understand ) RATIONALE \"The rail, empty.\"' + nl +\n\t'DEFINE BOX status ( HEIGHT 24, ROLE status, SATISFIES understand, CHILDREN [state] ) RATIONALE \"The truth of the build.\"' + nl +\n\t'DEFINE TEXT state ( CONTENT \"clean\", SATISFIES understand ) RATIONALE \"The court verdict.\"'\noShell = new stzUiDocument(cShell)\noShell {\n\t? IsClean()\n\t#--> 1\n\t? len(Declarations())\n\t#--> 12\n\t? @@( Orphans() )\n\t#--> [ \"work\" ]\n}",
     "promised": "1\n12\n[ \"work\" ]",
     "output": "1\n12\n[ \"work\" ]",
     "verdict": "kept",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "cShell = StzReplace(cShell, \"DEFINE BOX work ( HEIGHT fill,\", \"DEFINE BOX work ( SATISFIES focus, HEIGHT fill,\")\noShell = new stzUiDocument(cShell)\n? @@( oShell.Orphans() )\n#--> [ ]\naVerbs = [ \"discover\", \"understand\", \"locate\", \"focus\", \"filter\", \"compare\", \"read\", \"scan\", \"scroll\", \"zoom\", \"select\", \"highlight\", \"preview\", \"mark\", \"act\", \"confirm\", \"cancel\", \"undo\", \"pause\", \"resume\", \"retry\", \"exit\" ]\n? len(aVerbs)\n#--> 22\naStrangers = []\nfor cIntent in oShell.SatisfiedIntents()\n\tif not StzContains(aVerbs, cIntent)\n\t\taStrangers + cIntent\n\tok\nnext\n? @@( aStrangers )\n#--> [ ]\noOdd = new stzUiDocument(StzReplace(cShell, \"SATISFIES preview\", \"SATISFIES transfer_funds\"))\n? oOdd.IsClean()\n#--> 1\naStrangers = []\nfor cIntent in oOdd.SatisfiedIntents()\n\tif not StzContains(aVerbs, cIntent)\n\t\taStrangers + cIntent\n\tok\nnext\n? @@( aStrangers )\n#--> [ \"transfer_funds\" ]",
     "promised": "[ ]\n22\n[ ]\n1\n[ \"transfer_funds\" ]",
     "output": "[ ]\n22\n[ ]\n1\n[ \"transfer_funds\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cRml = oShell.ToRml()\ncHtml = oShell.ToHtml()\nnBoth = 0\nfor cName in oShell.Names()\n\tif StzContains(cRml, 'id=\"' + cName + '\"') and StzContains(cHtml, 'id=\"' + cName + '\"')\n\t\tnBoth++\n\tok\nnext\n? nBoth\n#--> 11\n? len(oShell.Names()) - 1\n#--> 11\n? StzContains(cRml, \"--rmlui-direction\")\n#--> 1\n? StzContains(cHtml, \"--rmlui-direction\")\n#--> 0",
     "promised": "11\n11\n1\n0",
     "output": "11\n11\n1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "$cShellPage = cHtml\noSrv = new stzAppServer()\noSrv.Get_(\"/\", func oReq, oResp { oResp.Html($cShellPage) })\noSrv.Start(0, \"127.0.0.1\")\noClient = new stzReactor()\ncCRLF = char(13) + char(10)\nnJob = oClient.SubmitTcp(\"127.0.0.1\", oSrv.Port(), \"GET / HTTP/1.1\" + cCRLF + \"Host: local\" + cCRLF + \"Connection: close\" + cCRLF + cCRLF)\n? oSrv.ServeOne(3000)\n#--> 1\ncAnswer = oClient.AwaitTcp(nJob, 5000)\n? StzContains(cAnswer, \"200 OK\")\n#--> 1\n? StzContains(cAnswer, 'id=\"status\"')\n#--> 1\n? oSrv.Host()\n#--> 127.0.0.1\noSrv.Stop()",
     "promised": "1\n1\n1\n127.0.0.1",
     "output": "1\n1\n1\n127.0.0.1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oT = new stzAppTopology(\"shell\")\noT.AddDataset(\"notes\", [ [ \"first\" ] ])\noT.SetDatasetColumns(\"notes\", [ \"text\" ])\noBackend = new stzAppBackend(\"shell\", oT)\nbRaised = FALSE\ntry\n\toBackend.StartOn(\"0.0.0.0\", 0)\ncatch\n\tbRaised = TRUE\ndone\n? bRaised\n#--> 1\n? oBackend.IsLive()\n#--> 0",
     "promised": "1\n0",
     "output": "1\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? ShellStatus(cShell)\n#--> clean\n? ShellStatus(StzReplace(cShell, \"[page, rail]\", \"[page, ghost]\"))\n#--> refused: DANGLING_REFERENCE\n? ShellStatus(StzReplace(cShell, \"ROLE status\", \"ROLE sttus\"))\n#--> refused: UNKNOWN_ROLE\n\nfunc ShellStatus(cText)\n\toD = new stzUiDocument(cText)\n\tif oD.IsClean()\n\t\treturn \"clean\"\n\tok\n\treturn \"refused: \" + oD.Diagnostics()[1][:code]",
     "promised": "clean\nrefused: DANGLING_REFERENCE\nrefused: UNKNOWN_ROLE",
     "output": "clean\nrefused: DANGLING_REFERENCE\nrefused: UNKNOWN_ROLE",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oShell.UseFont(\"C:/Windows/Fonts/segoeui.ttf\")\noP = oShell.ToPanel()\noT = new stzAccessibilityTree(oShell, oP)\noT {\n\t? NodeCount()\n\t#--> 12\n\t? NodeOf(\"status\")[:role]\n\t#--> status\n\t? NodeOf(\"status\")[:description]\n\t#--> The truth of the build.\n\t? @@( ReadingOrder() )\n\t#--> [ \"window\", \"tablist\", 'tab \"Define\"', 'tab \"Build\"', 'tab \"Govern\"', 'tab \"Ship\"', \"group\", 'label \"the work\"', \"group\", 'label \"no proposal\"', \"status\", 'label \"clean\"' ]\n}",
     "promised": "12\nstatus\nThe truth of the build.\n[ \"window\", \"tablist\", 'tab \"Define\"', 'tab \"Build\"', 'tab \"Govern\"', 'tab \"Ship\"', \"group\", 'label \"the work\"', \"group\", 'label \"no proposal\"', \"status\", 'label \"clean\"' ]",
     "output": "12\nstatus\nThe truth of the build.\n[ \"window\", \"tablist\", 'tab \"Define\"', 'tab \"Build\"', 'tab \"Govern\"', 'tab \"Ship\"', \"group\", 'label \"the work\"', \"group\", 'label \"no proposal\"', \"status\", 'label \"clean\"' ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "StzAppQ(\"fieldvisits\") {\n\tAddThingQ(:Client) { Has([ :name ]) }\n\tAddThing(:Visit)\n\tAddReactionQ(:Client).Unseen(90, :Days) { Propose(:Visit) }\n\tAddInstance(\"amadou\", :Client)\n\tAddInstance(\"binta\", :Client)\n\tLive()\n\t#--> [fieldvisits] is live -- 2 thing(s), 0 flow(s), 1 reaction(s), 0 goal(s); 2 proposal(s)\n\tfor aP in Proposals()\n\t\t? aP[1] + \" \" + aP[2] + \" \" + aP[3] + \" \" + aP[4]\n\tnext\n\t#--> propose visit for amadou\n\t#--> propose visit for binta\n\t? Pulse()\n\t#--> 0\n\t? len(Proposals())\n\t#--> 2\n\tRelate(\"amadou\", :visit, \"visit-1\")\n\tPulse()\n\tfor aP in Proposals()\n\t\t? aP[1] + \" \" + aP[2] + \" \" + aP[3] + \" \" + aP[4]\n\tnext\n\t#--> propose visit for binta\n}",
     "promised": "[fieldvisits] is live -- 2 thing(s), 0 flow(s), 1 reaction(s), 0 goal(s); 2 proposal(s)\npropose visit for amadou\npropose visit for binta\n0\n2\npropose visit for binta",
     "output": "[fieldvisits] is live -- 2 thing(s), 0 flow(s), 1 reaction(s), 0 goal(s); 2 proposal(s)\npropose visit for amadou\npropose visit for binta\n0\n2\npropose visit for binta",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oW = StzAppQ(\"fieldvisits\")\noW {\n\tAddThingQ(:Client) { Has([ :name ]) }\n\tAddScreenQ(:Home)  { ToDiscover(:Client) }\n\tAddScreenQ(:File)  { ToUnderstand(:Client) }\n\tAddScreenQ(:Pick)  { ToSelect(:Client) }\n\tAddScreenQ(:Edit)  { ToAct(:Client) }\n\tExplain()\n\t#--> WORLD fieldvisits   lives in: memory (not persisted)\n\t#      BEING\n\t#        client (name)\n\t#      MET FROM WITHOUT\n\t#        screen home: discover client\n\t#        screen file: understand client\n\t#        screen pick: select client\n\t#        screen edit: act client\n}\ntry\n\toW.AddScreenQ(:Side) { ToCompare(:Client) }\ncatch\n\t? cCatchError\ndone\n#--> Error (R3) : Calling Function without definition: tocompare",
     "promised": "WORLD fieldvisits   lives in: memory (not persisted)\nBEING\nclient (name)\nMET FROM WITHOUT\nscreen home: discover client\nscreen file: understand client\nscreen pick: select client\nscreen edit: act client\nError (R3) : Calling Function without definition: tocompare",
     "output": "WORLD fieldvisits   lives in: memory (not persisted)\n  BEING\n    client (name)\n  MET FROM WITHOUT\n    screen home: discover client\n    screen file: understand client\n    screen pick: select client\n    screen edit: act client\nError (R3) : Calling Function without definition: tocompare",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oPlan = new stzDelivery(\"greenhouse\")\noPlan.AddFirmware(:node, :ESP32)\noPlan.NeedsIn(:node, [ :GPIO ])\noEmu = new stzEmulator(oPlan)\noEmu {\n\tCompileEngineQ(FALSE)\n\tSetOutDirQ(\"_emu\")\n\tBuild()\n}\ncH = read(\"_emu/index.html\")\n? StzContains(cH, \"needs a look\")\n#--> 1\n? StzContains(cH, \"2 approximated\")\n#--> 1\n? StzContains(cH, \"parts healthy\")\n#--> 1\n? StzContains(cH, \"Ready to ship.\")\n#--> 1\nStzDirDeleteAll(\"_emu\")",
     "promised": "1\n1\n1\n1",
     "output": "1\n1\n1\n1",
     "verdict": "kept",
     "effects": [
      "files"
     ]
    },
    {
     "code": "oMine = new stzUiDocument('DEFINE PANEL shell ( SIZE [640, 360], DIRECTION column, CHILDREN [bar] ) RATIONALE \"Mine.\"' + nl + 'DEFINE TEXT bar ( CONTENT \"mine\", SATISFIES understand ) RATIONALE \"Mine too.\"')\n# under each line, write what you expect before you run it\n? oMine.IsClean()\n? @@( oMine.Orphans() )",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "# the book's own call, with the one change of the second block of section 3\n? ShellStatus(StzReplace(cShell, \"SATISFIES preview\", \"SATISFIES transfer_funds\"))",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stzApp-building-your-first-app-narration.md",
    "stz-emulating-the-whole-solution-narration.md",
    "stz-system-dev-to-deploy-narration.md"
   ],
   "rulings": [
    "12.12",
    "12.23",
    "12.24",
    "12.25"
   ],
   "doors": {
    "programmer": "You write the shell as text, and a court tells you the one box that serves no verb before anything is drawn. The same file is a native window and a page, and the library has a page that says when they disagree.",
    "analyst": "The ribbon is the order of your solution's life, and not of a tool's features. The status cell reads the court, and you can ask the world what it proposes before it is asked to act.",
    "designer": "Your interface has a constitution of twenty-two verbs and a closed grammar that adds renderings and never verbs. Every element must say which verb it serves, and the library already finds the ones that say none.",
    "decision-maker": "Ask of any environment three things. Does its status bar read a court? Does its assistant live in one panel and propose? And who judges that the two shells agree? Here the answers are: designed; designed, with the rail's law built beneath it in chapter 20; and a self-checking page, which caught the empty-box case when I read it by hand on 8 October 2026; no guard judges it yet.",
    "educator": "The exercise is a prediction: say what the court will answer before you run it. The status word that is a constant is a lesson in the difference between a label and a truth.",
    "agent": "The shell is a text file that you can read and write, and the tree a screen reader reads is the tree you may read. Your proposals appear in a rail and commit nowhere."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 4212,
   "french": true,
   "text": "agents/ch26-the-environment.md",
   "run": {
    "ran": "2026-10-15 13:00 UTC+01:00",
    "kept": 10,
    "runnable": 10
   }
  },
  {
   "number": 27,
   "id": "the-engine-beneath",
   "title": "The engine beneath: three layers, one engine, Haro",
   "slug": "ch27-the-engine-beneath",
   "kind": "chapter",
   "part": 5,
   "appendix": null,
   "law": null,
   "principle": "Every feature is implemented once, in the engine. The surface is the promise, and the runtime is the part you measure, and never assert.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "three layers chosen by the entry file you load, each including the one beneath and none above; the dependency rule held at the loads; an engine of eighty-nine libraries, in Zig, built in optimised safe mode, with the engine's own count of what it exposes; Haro as a ratified charter and a spike whose courts run on the new runtime and on the old one",
    "designed": "the base layer inheriting the core layer; the max layer as a built layer; a court that checks the layers against their contract; a layer chosen by a declaration the compiler honours; the other faces of Haro over one program graph; a loader for one domain of base; the standalone engine repository and its command line; the engine's polyglot bridge, which is chapter 16's",
    "absent": "a lean core layer that runs its strings; a Linux or macOS engine in service; a measured pass of the library on the new runtime under Linux; a `haro` executable; Haro running the library; a single executable with no dependency; an engine test count that I may print"
   },
   "guards": [
    {
     "name": "engine_is_optimised_narrated",
     "exists": true,
     "path": "base/test/number/engine_is_optimised_narrated.ring",
     "assertions": 7,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/number/engine_is_optimised_narrated.ring"
    },
    {
     "name": "engine_senses_narrated",
     "exists": true,
     "path": "base/test/perf/engine_senses_narrated.ring",
     "assertions": 36,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/perf/engine_senses_narrated.ring"
    },
    {
     "name": "wasm_narrated",
     "exists": true,
     "path": "base/test/system/wasm_narrated.ring",
     "assertions": 23,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/wasm_narrated.ring"
    },
    {
     "name": "threat_model_narrated",
     "exists": true,
     "path": "base/test/security/threat_model_narrated.ring",
     "assertions": 11,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/security/threat_model_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "cAsk = 'aC = ringvm_classesList()' + nl +\n       '? \"\" + len(aC) + \" \" + (find(aC, \"stklist\", 1) > 0) + \" \" + (find(aC, \"stzlist\", 1) > 0) + \" \" + (find(aC, \"stzlistxt\", 1) > 0)' + nl\naEntries = [ \"core/stkLib.ring\", \"stzLib.ring\", \"max/stxLib.ring\" ]\nfor i = 1 to 3\n    write(\"layer\" + i + \".ring\", 'load \"../../../' + aEntries[i] + '\"' + nl + cAsk)\n    ? trim(systemcmd(\"ring layer\" + i + \".ring\"))\n    remove(\"layer\" + i + \".ring\")\nnext\n#--> 17 1 0 0\n#--> 674 1 1 0\n#--> 714 1 1 1",
     "promised": "17 1 0 0\n674 1 1 0\n714 1 1 1",
     "output": "17 1 0 0\n674 1 1 0\n714 1 1 1",
     "verdict": "kept",
     "effects": [
      "files"
     ]
    },
    {
     "code": "aClasses = ringvm_classesList()\n? ParentOf(\"stkString\")\n#--> stzcorestring\n? ParentOf(\"stzString\")\n#--> stzobject\n? ParentOf(\"stzList\")\n#--> stzobject\n? ParentOf(\"stzListXT\")\n#--> stzlist\n\nfunc ParentOf(cClass)\n    n = find(aClasses, lower(cClass), 1)\n    if n = 0  return \"(not loaded)\" ok\n    return aClasses[n][3]",
     "promised": "stzcorestring\nstzobject\nstzobject\nstzlist",
     "output": "stzcorestring\nstzobject\nstzobject\nstzlist",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "nStk = 0  nStz = 0  nStx = 0\naClasses = ringvm_classesList()\nfor aClass in aClasses\n    cPrefix = left(aClass[1], 3)\n    if cPrefix = \"stk\"  nStk++\n    but cPrefix = \"stz\"  nStz++\n    but cPrefix = \"stx\"  nStx++\n    ok\nnext\n? @@([ nStk, nStz, nStx ])\n#--> [ 10, 693, 0 ]",
     "promised": "[ 10, 693, 0 ]",
     "output": "[ 10, 693, 0 ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "$cEngineDir = \"../../../engine\"\ncBuild = read($cEngineDir + \"/build.zig\")\nn1 = substr(cBuild, \"const core_domains\")\nn2 = substr(cBuild, \"const base_domains\")\nn3 = substr(cBuild, \"fn addSpeech\")\n? Q(substr(cBuild, n1, n2 - n1)).NumberOfOccurrence('.name = \"stk_')\n#--> 4\n? Q(substr(cBuild, n2, n3 - n2)).NumberOfOccurrence('.name = \"stz_')\n#--> 85\n? Q(cBuild).NumberOfOccurrence('stx_')\n#--> 0",
     "promised": "4\n85\n0",
     "output": "4\n85\n0",
     "verdict": "kept",
     "effects": [
      "files"
     ]
    },
    {
     "code": "? StzEngineEmbedVersionString()\n#--> 0.8.0\naAll = ringvm_cfunctionslist()\naNames = []\nfor cName in aAll\n    if left(lower(cName), 9) = \"stzengine\"  aNames + lower(cName)  ok\nnext\n? len( Q(aNames).DuplicatesRemoved() )\n#--> 2786",
     "promised": "0.8.0\n2786",
     "output": "0.8.0\n2786",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? upper(\"Straße\")\n#--> STRAßE\n? Q(\"Straße\").Uppercased()\n#--> STRASSE\n? @@( Q(\"running runs ran\").StemmedWords() )\n#--> [ \"run\", \"run\", \"ran\" ]",
     "promised": "STRAßE\nSTRASSE\n[ \"run\", \"run\", \"ran\" ]",
     "output": "STRAßE\nSTRASSE\n[ \"run\", \"run\", \"ran\" ]",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oBuf = StzNumBufferOfSizeQ(2000000)\noBuf.RangeFrom(1, 1)\nnT0 = clock()\nfor k = 1 to 20\n    nSum = oBuf.Sum()\nnext\n? (clock() - nT0) / clockspersecond() < 0.10\n#--> 1\n? nSum\n#--> 2000001000000\noBuf.Free()",
     "promised": "1\n2000001000000",
     "output": "1\n2000001000000",
     "verdict": "kept",
     "effects": [
      "the clock"
     ]
    },
    {
     "code": "? version()\n#--> 1.27",
     "promised": "1.27",
     "output": "1.27",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "o = new stkString(\"abc\")\n? o.Content()\n#--> Error (R3) : Calling Function without definition: stkenginestringfrom",
     "promised": "Error (R3) : Calling Function without definition: stkenginestringfrom",
     "output": "Error (R3) : Calling Function without definition: stkenginestringfrom",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "# core/stkLib.ring, stzLib.ring, max/stxLib.ring: write your three predictions here,\n# then load each entry in its own process and count with ringvm_classesList().",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-engine-senses-narration.md",
    "stz-vs-qt-unicode-narration.md",
    "stz-emulating-the-whole-solution-narration.md",
    "stz-honest-stopwatch-narration.md"
   ],
   "rulings": [
    "12.10",
    "12.11",
    "12.15",
    "12.21",
    "12.28",
    "12.29"
   ],
   "doors": {
    "programmer": "You choose your depth by the file you load, and you can prove it in three fresh processes. The lean layer does not run its strings today: reach for base. Read the engine's count the way the library sees it, and not the way a page types it.",
    "analyst": "Three numbers for \"how big is the engine\", and three methods. Ask which one a vendor means. The core library is the size of the base one for strings.",
    "designer": "A layer is a decision about what you ship, and not about taste. At the binary, core and base have a library per domain and the third layer has none; the web subset, which chapters 4 and 24 show, is a subset and not a layer.",
    "decision-maker": "The two questions of chapter 4, plus two. What runs it: version 1.27 today, with the replacement in development. What the replacement measures: within 2x of a fast peer on every row, by 1.04 to 1.88 times, which no version of the former runtime ever was, and ten megabytes of memory more than the old one. This is my view: a record that prints its loss is the only kind to trust.",
    "educator": "Teach the dependency rule by making a learner load the core alone and predict, then count. Teach \"measured, never asserted\" with the memo of 13 September 2026.",
    "agent": "You may count the engine's functions yourself. Do not repeat a count from a page, and do not write a loop over the list of classes directly. Tell the reader which layer a class lives in by its parent chain, and not by its prefix."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 4930,
   "french": true,
   "text": "agents/ch27-the-engine-beneath.md",
   "run": {
    "ran": "2026-10-15 13:00 UTC+01:00",
    "kept": 9,
    "runnable": 9
   }
  },
  {
   "number": 28,
   "id": "a-restaurant-in-lyon",
   "title": "A restaurant in Lyon",
   "slug": "ch28-a-restaurant-in-lyon",
   "kind": "chapter",
   "part": 6,
   "appendix": null,
   "law": null,
   "principle": "deliver small, fast and useful, and let the foundations mature in parallel without ever blocking a delivery.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "the constellation of worlds with its bonds and norms; the payments sandbox and the production gate that refuses a fake; the speed budget declared and judged",
    "designed": "the Lock as a rule of the library; the constellation written in the near-natural idiom the design describes",
    "absent": "the restaurant's live payment adapter; a measurement of the budget on a real mobile network; a speed expectation in the owner's own percentile; browser-side timing; the platform on the Softanza engine"
   },
   "guards": [
    {
     "name": "06_stzsuperapp_narrated",
     "exists": true,
     "path": "base/test/app/06_stzsuperapp_narrated.ring",
     "assertions": 21,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/app/06_stzsuperapp_narrated.ring"
    },
    {
     "name": "service_delivery_narrated",
     "exists": true,
     "path": "base/test/system/service_delivery_narrated.ring",
     "assertions": 60,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/service_delivery_narrated.ring"
    },
    {
     "name": "payments_port_narrated",
     "exists": true,
     "path": "base/test/system/payments_port_narrated.ring",
     "assertions": 49,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/payments_port_narrated.ring"
    },
    {
     "name": "judgment_narrated",
     "exists": true,
     "path": "base/test/perf/judgment_narrated.ring",
     "assertions": 41,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/perf/judgment_narrated.ring"
    },
    {
     "name": "graphrule_object_narrated",
     "exists": true,
     "path": "base/test/graph/graphrule_object_narrated.ring",
     "assertions": 34,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/graph/graphrule_object_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oRule = new stzGraphRule(\"the-lock\")\noRule {\n\tSetDomain(\"scope\")\n\tWhen(\"kind\", \"equals\", \"world\")\n\tWhen(\"admitted-by\", \"missing\", \"\")\n\tThenViolation(\"a world entered the cycle with no written admission\")\n}\ng = new stzGraph(\"cycle-1\")\ng {\n\tAddNode(\"customer-phone\")\n\tSetNodeProperty(\"customer-phone\", \"kind\", \"world\")\n\tSetNodeProperty(\"customer-phone\", \"admitted-by\", \"the opening scope\")\n\tAddRule(oRule)\n\t? RulesAreSound()\n\t#--> 1\n\tAddNode(\"loyalty-club\")\n\tSetNodeProperty(\"loyalty-club\", \"kind\", \"world\")\n\tRulesReport()\n\t#--> Rule report 'cycle-1': 1 finding(s), 1 error(s), 0 warning(s) -> UNSOUND (errors present)\n\t#      [scope] 1 finding(s)\n\t#        ERROR the-lock @ loyalty-club -- a world entered the cycle with no written admission\n\tSetNodeProperty(\"loyalty-club\", \"admitted-by\", \"a notebook entry, and one exit written\")\n\t? RulesAreSound()\n\t#--> 1\n}",
     "promised": "1\nRule report 'cycle-1': 1 finding(s), 1 error(s), 0 warning(s) -> UNSOUND (errors present)\n[scope] 1 finding(s)\nERROR the-lock @ loyalty-club -- a world entered the cycle with no written admission\n1",
     "output": "1\nRule report 'cycle-1': 1 finding(s), 1 error(s), 0 warning(s) -> UNSOUND (errors present)\n  [scope] 1 finding(s)\n    ERROR the-lock @ loyalty-club -- a world entered the cycle with no written admission\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oPay = new stzPaymentsSandbox()\noPay {\n\tDeclineToken(\"tok_chargeback\")\n\t? Authorize(4200, \"tok_chargeback\")[:status]\n\t#--> declined\n\tFailNext()\n\t? Authorize(4200, \"tok_visa\")[:status]\n\t#--> refused\n\taAuth = Authorize(4200, \"tok_visa\")\n\t? aAuth[:status]\n\t#--> authorized\n\tCapture(aAuth[:id])\n\t? Capture(aAuth[:id])[:why]\n\t#--> this authorization was already captured\n}",
     "promised": "declined\nrefused\nauthorized\nthis authorization was already captured",
     "output": "declined\nrefused\nauthorized\nthis authorization was already captured",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oReg = new stzServiceRegistry(\"shop\")\noReg.BindSandbox(:payments, new stzPaymentsSandbox())\noDel = new stzDelivery(\"shop\")\noDel {\n\tAddBackend(\"api\", \"linux\")\n\tUseServices(oReg)\n\tNeedsServiceIn(\"api\", [ :payments ])\n\tDeployTo(StzDeploymentSiteQ(\"host1\"), \"api\")\n\tSetActor( HumanActor(\"owner\") )\n\t? Deploy(:Production).WasCommitted()\n\t#--> 0\n\t? Log().EntriesOfLevel(:error)[1][:message]\n\t#--> REFUSED -- the external surface is not production-ready\n\t? WhyServicesNotReady()\n\t#--> sandbox-in-production: still bound to a SANDBOX in a production phase -- a fake must never ship\n\tServicesQ().BindLiveQ(:payments, new stzHttpSandbox(), \"payments_key\")\n\t? ServicesAreProductionReady()\n\t#--> 1\n}",
     "promised": "0\nREFUSED -- the external surface is not production-ready\nsandbox-in-production: still bound to a SANDBOX in a production phase -- a fake must never ship\n1",
     "output": "0\nREFUSED -- the external surface is not production-ready\nsandbox-in-production: still bound to a SANDBOX in a production phase -- a fake must never ship\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oCon = new stzSuperApp(\"neighbourhood\")\noCon {\n\tAddWorld(\"customer\", StzAppQ(\"customer\"))\n\tAddWorld(\"kitchen\", StzAppQ(\"kitchen\"))\n\tAddWorld(\"supplier\", StzAppQ(\"supplier\"))\n\tBond(\"customer\", \"kitchen\", \"send-order\")\n\tBond(\"kitchen\", \"supplier\", \"order-produce\")\n\tGovDeclareRisk(\"send-order\", 1)\n\tGovDeclareRisk(\"order-produce\", 2)\n\tGovGrant(\"customer\", \"send-order\")\n\tGovGrant(\"kitchen\", \"order-produce\")\n\tGovSetAuthority(\"customer\", :Delegated)\n\tGovSetAuthority(\"kitchen\", :Delegated)\n\tRetire(\"supplier\")\n\t? CallAcross(\"customer\", \"kitchen\", \"send-order\")\n\t#--> 1\n\t? CallAcross(\"kitchen\", \"supplier\", \"order-produce\")\n\t#--> 0\n\t? Why()\n\t#--> target world 'supplier' is not active.\n\tRevive(\"supplier\")\n\t? CallAcross(\"kitchen\", \"supplier\", \"order-produce\")\n\t#--> 1\n}",
     "promised": "1\n0\ntarget world 'supplier' is not active.\n1",
     "output": "1\n0\ntarget world 'supplier' is not active.\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oMon = StzPerfMonitor(\"remote-control\")\noMon {\n\tNewTimer(\"first.display.ms\").Record(900)\n\tNewTimer(\"tap.ms\").Record(40)\n\tNewTimer(\"order.to.kitchen.ms\").Record(1800)\n}\noSla = StzSla(\"speed-budget\")\noSla {\n\tExpectP95(\"first.display.ms\").Under(1200)\n\tExpectP95(\"tap.ms\").Under(80)\n\tExpectP95(\"order.to.kitchen.ms\").Under(2500)\n\tCheckAgainst(oMon)\n\tShow()\n\t#--> SLA speed-budget -- 3 expectation(s), last check: MET.\n\t#      [MET] p95-first.display.ms-under-1200: measured 900 (must be <= 1200)\n\t#      [MET] p95-tap.ms-under-80: measured 40 (must be <= 80)\n\t#      [MET] p95-order.to.kitchen.ms-under-2500: measured 1800 (must be <= 2500)\n}\noMon.MetricQ(\"order.to.kitchen.ms\").Record(3100)\noSla.CheckAgainst(oMon)\noRep = new stzRuleReport(\"cycle-gate\")\noRep.Ingest(oSla.Findings())\n? oRep.IsSound()\n#--> 0\n? oSla.Findings()[1][:message]\n#--> p95-order.to.kitchen.ms-under-2500: measured 3100 (must be <= 2500)",
     "promised": "SLA speed-budget -- 3 expectation(s), last check: MET.\n[MET] p95-first.display.ms-under-1200: measured 900 (must be <= 1200)\n[MET] p95-tap.ms-under-80: measured 40 (must be <= 80)\n[MET] p95-order.to.kitchen.ms-under-2500: measured 1800 (must be <= 2500)\n0\np95-order.to.kitchen.ms-under-2500: measured 3100 (must be <= 2500)",
     "output": "SLA speed-budget -- 3 expectation(s), last check: MET.\n  [MET] p95-first.display.ms-under-1200: measured 900 (must be <= 1200)\n  [MET] p95-tap.ms-under-80: measured 40 (must be <= 80)\n  [MET] p95-order.to.kitchen.ms-under-2500: measured 1800 (must be <= 2500)\n0\np95-order.to.kitchen.ms-under-2500: measured 3100 (must be <= 2500)",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? YourGraph.RulesAreSound()\n#--> 1",
     "promised": "1",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-service-virtualization-code-first-subscribe-later.md",
    "stz-perf-judgment-narration.md",
    "stzApp-building-your-first-app-narration.md"
   ],
   "rulings": [
    "12.15",
    "12.19",
    "12.25",
    "12.29",
    "12.30"
   ],
   "doors": {
    "programmer": "You declare worlds and bonds and run a constellation in which a call to a world that is not yet active is refused with its reason. The restaurant's own code, however, is a web application.",
    "analyst": "Rigour in numbers was the contract of the first application: a due date computed from the invoice date, a date required, a debt with no due date made visible.",
    "designer": "Fifteen interface rules from one directive, the three-second test; and a refused button is disabled and visible, never hidden. On who held the phone in the eleven iterations, the project's files say both, the real user and me, and the chapter does not choose.",
    "decision-maker": "The owner accepted the Lock in writing, tightened the speed budget himself, and kept the gate on fixed fees. The library's mirror is a deployment that an entitled person may commit and that is still refused over a fake.",
    "educator": "The record supports only a small thing: the first application taught its user by doing, with guides whose words leave no doubt. There is no educator in this story, and I say so.",
    "agent": "An AI agent can drive a production deployment and change nothing: the gate passes the services, nothing is committed, and the reason given is the actor and not the services. In the project, the AI agent is the session working beside me under the Lock, with a person deciding."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3654,
   "french": true,
   "text": "agents/ch28-a-restaurant-in-lyon.md",
   "run": {
    "ran": "2026-10-15 13:00 UTC+01:00",
    "kept": 5,
    "runnable": 5
   }
  },
  {
   "number": 29,
   "id": "a-bank-in-niamey",
   "title": "A bank in Niamey",
   "slug": "ch29-a-bank-in-niamey",
   "kind": "chapter",
   "part": 6,
   "appendix": null,
   "law": null,
   "principle": "An organisation can be judged by its own chart, under a regulator's rules, by a program that reads the chart as data: the chart says what is, the rule says what must be, and the verdict names the rule and the place.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "the organisation chart as a text a person can edit; the validators of the regional regulator and of segregation of duties; the seven regimes as one mechanism; a rule written as data; one report with one verdict",
    "designed": "the content that would make the other six regimes differ from the first; a rule file that judges, and not only loads",
    "absent": "the delivered product running on the library; a word from the bank's own people; an auditor's reading of a finding the library produced"
   },
   "guards": [
    {
     "name": "orgrule_narrated",
     "exists": true,
     "path": "base/test/graph/orgrule_narrated.ring",
     "assertions": 22,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/graph/orgrule_narrated.ring"
    },
    {
     "name": "14_bceao_governance",
     "exists": true,
     "path": "base/test/orgchart/14_bceao_governance.ring",
     "assertions": 1,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/orgchart/14_bceao_governance.ring"
    },
    {
     "name": "15_multiple_validators",
     "exists": true,
     "path": "base/test/orgchart/15_multiple_validators.ring",
     "assertions": 1,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/orgchart/15_multiple_validators.ring"
    },
    {
     "name": "13_segregation_of_duties",
     "exists": true,
     "path": "base/test/orgchart/13_segregation_of_duties.ring",
     "assertions": 1,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/orgchart/13_segregation_of_duties.ring"
    },
    {
     "name": "rulereport_narrated",
     "exists": true,
     "path": "base/test/graph/rulereport_narrated.ring",
     "assertions": 23,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/graph/rulereport_narrated.ring"
    },
    {
     "name": "36_import_from_stzorg",
     "exists": true,
     "path": "base/test/orgchart/36_import_from_stzorg.ring",
     "assertions": 3,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/orgchart/36_import_from_stzorg.ring"
    }
   ],
   "promises": [
    {
     "code": "cChart = '\norgchart \"bank\"\n\npositions\n    board\n        title: Board of Directors\n        level: executive\n        department: board\n        reportsTo:\n\n    ceo\n        title: Chief Executive\n        level: executive\n        department: executive\n        reportsTo: board\n\n    risk\n        title: Chief Risk Officer\n        level: management\n        department: risk\n        reportsTo: board\n\n    audit\n        title: Internal Audit\n        level: management\n        department: audit\n        reportsTo: ceo\n'\noOrg = new stzOrgChart(\"bank\")\noOrg {\n\tImportStzOrg(cChart)\n\t? NodeCount()\n\t#--> 4\n\t? @@( ValidateXT(:BCEAO)[:issues] )\n\t#--> [ \"BCEAO-002: Audit reports to non-board position\" ]\n\t? IsValidXT(:BCEAO)\n\t#--> 0\n}",
     "promised": "4\n[ \"BCEAO-002: Audit reports to non-board position\" ]\n0",
     "output": "4\n[ \"BCEAO-002: Audit reports to non-board position\" ]\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oOrg {\n\tAddManagementPositionXT(\"treasury\", \"Treasury\")\n\tSetPositionDepartment(\"treasury\", \"treasury\")\n\tAddManagementPositionXT(\"ops\", \"Operations\")\n\tSetPositionDepartment(\"ops\", \"operations\")\n\tReportsTo(\"treasury\", \"ceo\")\n\tReportsTo(\"ops\", \"treasury\")\n\taV = ValidateXT([ :BCEAO, :SOD ])\n\t? aV[:validatorsFailed]\n\t#--> 2\n\t? aV[:results][1][:issues][1]\n\t#--> BCEAO-002: Audit reports to non-board position\n\t? aV[:results][2][:issues][1]\n\t#--> SOD-001: Operations reports through Treasury\n\t? ComplianceReport()[:overallStatus]\n\t#--> non-compliant\n}",
     "promised": "2\nBCEAO-002: Audit reports to non-board position\nSOD-001: Operations reports through Treasury\nnon-compliant",
     "output": "2\nBCEAO-002: Audit reports to non-board position\nSOD-001: Operations reports through Treasury\nnon-compliant",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "aBases = [ new stzBCEAORuleBase(), new stzBaselIIIRuleBase(), new stzSOXRuleBase(), new stzPCIDSSRuleBase(),\n           new stzISO27001RuleBase(), new stzGDPRRuleBase(), new stzHIPAARuleBase() ]\nfor oBase in aBases\n\t? oBase.Name() + \" : \" + oBase.NumberOfRules()\nnext\n#--> BCEAO : 4\n#--> Basel III : 4\n#--> SOX : 5\n#--> PCI-DSS : 4\n#--> ISO 27001 : 4\n#--> GDPR : 4\n#--> HIPAA : 4",
     "promised": "BCEAO : 4\nBasel III : 4\nSOX : 5\nPCI-DSS : 4\nISO 27001 : 4\nGDPR : 4\nHIPAA : 4",
     "output": "BCEAO : 4\nBasel III : 4\nSOX : 5\nPCI-DSS : 4\nISO 27001 : 4\nGDPR : 4\nHIPAA : 4",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oRule = new stzGraphRule(\"audit-reports-to-board\")\noRule {\n\tSetDomain(\"orgchart\")\n\tWhen(\"department\", \"equals\", \"audit\")\n\tThenQ(\"reportsTo\", \"equals\", \"board\")\n\tThenViolation(\"internal audit must report to the board\")\n}\noBasel = new stzBaselIIIRuleBase()\noBasel.AddRule(oRule)\noRep = new stzRuleReport(\"bank\")\noRep.Ingest(oOrg.CheckCompliance(oBasel))\noRep.Report()\n#--> Rule report 'bank': 1 finding(s), 1 error(s), 0 warning(s) -> UNSOUND (errors present)\n#      [orgchart] 1 finding(s)\n#        ERROR audit-reports-to-board @ audit -- internal audit must report to the board",
     "promised": "Rule report 'bank': 1 finding(s), 1 error(s), 0 warning(s) -> UNSOUND (errors present)\n[orgchart] 1 finding(s)\nERROR audit-reports-to-board @ audit -- internal audit must report to the board",
     "output": "Rule report 'bank': 1 finding(s), 1 error(s), 0 warning(s) -> UNSOUND (errors present)\n  [orgchart] 1 finding(s)\n    ERROR audit-reports-to-board @ audit -- internal audit must report to the board",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oOrg {\n\tReportsTo(\"audit\", \"board\")\n\tReportsTo(\"ops\", \"ceo\")\n\t? IsValidXT([ :BCEAO, :SOD ])\n\t#--> 1\n\t? ComplianceReport()[:overallStatus]\n\t#--> compliant\n}\noRep = new stzRuleReport(\"bank\")\noRep {\n\tIngest(oOrg.CheckCompliance(oBasel))\n\tReport()\n\t#--> Rule report 'bank': 0 finding(s), 0 error(s), 0 warning(s) -> SOUND\n\t? IsSound()\n\t#--> 1\n}",
     "promised": "1\ncompliant\nRule report 'bank': 0 finding(s), 0 error(s), 0 warning(s) -> SOUND\n1",
     "output": "1\ncompliant\nRule report 'bank': 0 finding(s), 0 error(s), 0 warning(s) -> SOUND\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oOrg2 = new stzOrgChart(\"bank\")\noOrg2 {\n\tImportStzOrg( substr(cChart, \"department: executive\", \"department:\") )\n\t? IsValidXT(:BCEAO)\n\t#--> 1\n\t? ValidateXT(:Banking)[:status]\n\t#--> pass\n\tSetPositionDepartment(\"ceo\", \"executive\")\n\t? IsValidXT(:BCEAO)\n\t#--> 0\n}",
     "promised": "1\npass\n0",
     "output": "1\npass\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oOrg2 = new stzOrgChart(\"bank\")\noOrg2.ImportStzOrg(cChart)\n? oOrg2.IsValidXT(:BCEAO)\n? oOrg2.ValidateXT(:Banking)[:status]\noOrg2.SetPositionDepartment(\"ceo\", \"executive\")\n? oOrg2.IsValidXT(:BCEAO)",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stzOrgChartDoc-BankUseCase.md",
    "stz-rules-as-graph-rules-narration.md"
   ],
   "rulings": [
    "12.19",
    "12.29",
    "12.30"
   ],
   "doors": {
    "programmer": "The chart is a text, the rule is data, the court is a call. A finding names the rule and the position.",
    "analyst": "You change a reporting line in the object, or in the text and import again, and you re-run: the verdict follows the chart.",
    "designer": "The report is one verdict over the rule bases it is given: sound or unsound, with each finding where it was found.",
    "decision-maker": "Ask which of the regulations the library holds, and ask for the count. Seven regimes, one with a validator beside its rule base and one that adds a rule; the rest carry the universal four.",
    "educator": "The narration of a virtual bank tells the move from a non-compliant structure to a governed one, and the book shows the move with calls that run.",
    "agent": "You may read a chart and a report. A rule you add is data a person can read, and the court judges the chart with it."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 2478,
   "french": true,
   "text": "agents/ch29-a-bank-in-niamey.md",
   "run": {
    "ran": "2026-10-15 13:00 UTC+01:00",
    "kept": 6,
    "runnable": 6
   }
  },
  {
   "number": 30,
   "id": "an-organisation-in-the-field",
   "title": "An organisation in the field",
   "slug": "ch30-an-organisation-in-the-field",
   "kind": "chapter",
   "part": 6,
   "appendix": null,
   "law": null,
   "principle": "the AI agent proposes, and a person decides.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "a rule built as an object on a model, its number changed and the model judged again; the rule governor that names a rule that governs nothing; a refusal kept as a checkpoint a person can read, with its context; authority set against risk; a decision kept with its authority at the time; offline as a capability a world must ask for",
    "designed": "the hub and its study; a rule language a local programmer can learn; the study's promises that a rule is checked before it applies and can be undone",
    "absent": "the hub, built; a mechanism for work done offline, kept and sent later; a version history of a rule; a customer platform on the engine"
   },
   "guards": [
    {
     "name": "graphruleset_narrated",
     "exists": true,
     "path": "base/test/graph/graphruleset_narrated.ring",
     "assertions": 25,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/graph/graphruleset_narrated.ring"
    },
    {
     "name": "gg_rule_governance",
     "exists": true,
     "path": "base/test/graph/gg_rule_governance.ring",
     "assertions": 29,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/graph/gg_rule_governance.ring"
    },
    {
     "name": "wisecoding_narrated",
     "exists": true,
     "path": "base/test/conversation/wisecoding_narrated.ring",
     "assertions": 13,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/conversation/wisecoding_narrated.ring"
    },
    {
     "name": "governance_narrated",
     "exists": true,
     "path": "base/test/governance/governance_narrated.ring",
     "assertions": 19,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/governance/governance_narrated.ring"
    },
    {
     "name": "governance_lineage_narrated",
     "exists": true,
     "path": "base/test/governance/governance_lineage_narrated.ring",
     "assertions": 37,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/governance/governance_lineage_narrated.ring"
    },
    {
     "name": "01_platform_narrated",
     "exists": true,
     "path": "base/test/platform/01_platform_narrated.ring",
     "assertions": 31,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/platform/01_platform_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oG = new stzGraph(\"advances\")\noG {\n\tAddNodeXTT(\"a0\", \"A0\", [ :amount = 120, :approvals = 1 ])\n\tAddNodeXTT(\"a1\", \"A1\", [ :amount = 250, :approvals = 1 ])\n\tAddNodeXTT(\"a2\", \"A2\", [ :amount = 600, :approvals = 1 ])\n\tAddNodeXTT(\"a3\", \"A3\", [ :amount = 900, :approvals = 2 ])\n}\noRule = new stzGraphRule(\"second-approval\")\noRule {\n\tSetDomain(\"advances\")\n\tSetMessage(\"above the ceiling an advance needs two approvals\")\n\tWhen(\"amount\", \"greaterthan\", 500)\n\tThenQ(\"approvals\", \"greaterthan\", 1)\n\tThenViolation(\"two approvals needed\")\n}\noG.AddRule(oRule)\noG.RulesReport()\n#--> Rule report 'advances': 1 finding(s), 1 error(s), 0 warning(s) -> UNSOUND (errors present)\n#      [advances] 1 finding(s)\n#        ERROR second-approval @ a2 -- two approvals needed\n? len(oRule.SubjectsIn(oG))\n#--> 2",
     "promised": "Rule report 'advances': 1 finding(s), 1 error(s), 0 warning(s) -> UNSOUND (errors present)\n[advances] 1 finding(s)\nERROR second-approval @ a2 -- two approvals needed\n2",
     "output": "Rule report 'advances': 1 finding(s), 1 error(s), 0 warning(s) -> UNSOUND (errors present)\n  [advances] 1 finding(s)\n    ERROR second-approval @ a2 -- two approvals needed\n2",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oG.ClearAttachedRules()\noRule = new stzGraphRule(\"second-approval\")\noRule {\n\tSetDomain(\"advances\")\n\tSetMessage(\"above the ceiling an advance needs two approvals\")\n\tWhen(\"amount\", \"greaterthan\", 200)\n\tThenQ(\"approvals\", \"greaterthan\", 1)\n\tThenViolation(\"two approvals needed\")\n}\noG.AddRule(oRule)\noG.RulesReport()\n#--> Rule report 'advances': 2 finding(s), 2 error(s), 0 warning(s) -> UNSOUND (errors present)\n#      [advances] 2 finding(s)\n#        ERROR second-approval @ a1 -- two approvals needed\n#        ERROR second-approval @ a2 -- two approvals needed\n? len(oRule.SubjectsIn(oG))\n#--> 3",
     "promised": "Rule report 'advances': 2 finding(s), 2 error(s), 0 warning(s) -> UNSOUND (errors present)\n[advances] 2 finding(s)\nERROR second-approval @ a1 -- two approvals needed\nERROR second-approval @ a2 -- two approvals needed\n3",
     "output": "Rule report 'advances': 2 finding(s), 2 error(s), 0 warning(s) -> UNSOUND (errors present)\n  [advances] 2 finding(s)\n    ERROR second-approval @ a1 -- two approvals needed\n    ERROR second-approval @ a2 -- two approvals needed\n3",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oTypo = new stzGraphRule(\"second-approval-typo\")\noTypo {\n\tSetMessage(\"above the ceiling an advance needs two approvals\")\n\tWhen(\"amont\", \"greaterthan\", 200)\n\tThenQ(\"approvals\", \"greaterthan\", 1)\n\tThenViolation(\"two approvals needed\")\n\t? len(Check(oG))\n\t#--> 0\n}\noWatch = StzRuleGovernance(\"hub\")\noWatch {\n\tAddRule(oTypo)\n\tAddCase(\"advances\", oG)\n\taF = CheckRules()\n\t? aF[1][:rule]\n\t#--> scope_empty\n\t? aF[1][:message]\n\t#--> governs nothing in 1 pictures -- a dead rule and a misspelt scope predicate both report as passing\n}\noWatch2 = StzRuleGovernance(\"hub\")\noWatch2 {\n\tAddRule(oRule)\n\tAddCase(\"advances\", oG)\n\t? len(CheckRules())\n\t#--> 0\n}",
     "promised": "0\nscope_empty\ngoverns nothing in 1 pictures -- a dead rule and a misspelt scope predicate both report as passing\n0",
     "output": "0\nscope_empty\ngoverns nothing in 1 pictures -- a dead rule and a misspelt scope predicate both report as passing\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oKB = new stzKnowledgeGraph(\"requests\")\noKB {\n\tAddConversationQ(\"review\").SetGoal(StzGoalQ().RequireOne(\"request-7\", \"approved-by\"))\n\t? AskIn(\"review\")\n\t#--> What does 'request-7' have for 'approved-by'?  (why: 'request-7' needs 'approved-by')\n\tConstrainRelation(\"approved-by\", :Unique)\n\tKnowRelation(\"request-7\", \"approved-by\", \"approver-1\")\n\taR = ReplyIn(\"review\", \"approver-2\")\n\t? aR[:refused][1][2]\n\t#--> 'request-7' already bears 'approved-by' (to 'approver-1'); the relation is :Unique\n\taCp = ConversationQ(\"review\").Checkpoints()\n\t? len(aCp)\n\t#--> 1\n\t? aCp[1][:attempted]\n\t#--> approver-2\n\t? aCp[1][:why]\n\t#--> 'request-7' already bears 'approved-by' (to 'approver-1'); the relation is :Unique\n}",
     "promised": "What does 'request-7' have for 'approved-by'?  (why: 'request-7' needs 'approved-by')\n'request-7' already bears 'approved-by' (to 'approver-1'); the relation is :Unique\n1\napprover-2\n'request-7' already bears 'approved-by' (to 'approver-1'); the relation is :Unique",
     "output": "What does 'request-7' have for 'approved-by'?  (why: 'request-7' needs 'approved-by')\n'request-7' already bears 'approved-by' (to 'approver-1'); the relation is :Unique\n1\napprover-2\n'request-7' already bears 'approved-by' (to 'approver-1'); the relation is :Unique",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oGov = new stzGovernance(\"hub\")\noGov {\n\tDeclareRisk(\"prepare-file\", 1)\n\tDeclareRisk(\"release-advance\", 3)\n\tGrantPermission(\"assistant\", \"prepare-file\")\n\tGrantPermission(\"assistant\", \"release-advance\")\n\tSetAuthority(\"assistant\", :Advisory)\n\tGrantPermission(\"approver-1\", \"release-advance\")\n\tSetAuthority(\"approver-1\", :Autonomous)\n\t? MayProceed(\"assistant\", \"prepare-file\")\n\t#--> 1\n\t? MayProceed(\"assistant\", \"release-advance\")\n\t#--> 0\n\t? Why()\n\t#--> refused: 'assistant' holds 'advisory' authority (level 1) but 'release-advance' is risk tier 3 (SHOULD does not cover it)\n\t? MayProceed(\"approver-1\", \"release-advance\")\n\t#--> 1\n\t? Why()\n\t#--> allowed: permission held AND 'autonomous' authority (level 3) covers risk tier 3\n}",
     "promised": "1\n0\nrefused: 'assistant' holds 'advisory' authority (level 1) but 'release-advance' is risk tier 3 (SHOULD does not cover it)\n1\nallowed: permission held AND 'autonomous' authority (level 3) covers risk tier 3",
     "output": "1\n0\nrefused: 'assistant' holds 'advisory' authority (level 1) but 'release-advance' is risk tier 3 (SHOULD does not cover it)\n1\nallowed: permission held AND 'autonomous' authority (level 3) covers risk tier 3",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "nAt = 1785700000000\noGov {\n\tRecordDecisionAt(\"c-1\", \"ceiling raised for the harvest season\", \"approver-1\", \"release-advance\", nAt)\n\tRecordDecisionAt(\"c-1\", \"ceiling restored, the season is over\", \"approver-1\", \"release-advance\", nAt + 3600000)\n\t? LineageOf(\"c-1\")[:rationale]\n\t#--> ceiling restored, the season is over\n\t? len(LineageHistoryOf(\"c-1\"))\n\t#--> 2\n\t? LineageHistoryOf(\"c-1\")[1][:rationale]\n\t#--> ceiling raised for the harvest season\n\t? LineageOf(\"c-1\")[:authorityAtTime]\n\t#--> autonomous\n}",
     "promised": "ceiling restored, the season is over\n2\nceiling raised for the harvest season\nautonomous",
     "output": "ceiling restored, the season is over\n2\nceiling raised for the harvest season\nautonomous",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oApp = StzAppQ(\"field-visits\")\noPlat = StzPlatformQ(\"field\")\noPlat.SetWorld(oApp)\noRegime = new stzGovernance(\"field-regime\")\noRegime.GrantPermission(\"field-visits\", \"use-offline\")\noRegime.SetAuthority(\"field-visits\", :Advisory)\noPlat {\n\tSetGovernedBy(oRegime)\n\t? Granted(:offline)\n\t#--> 0\n\t? Why()\n\t#--> capability 'offline' was never requested via AddCapabilityQ().\n\tAddCapabilityQ(:offline).SetPurposes([ :enter_without_network ])\n\t? Granted(:offline)\n\t#--> 1\n\t? Why()\n\t#--> allowed: permission held AND 'advisory' authority (level 1) covers risk tier 1\n}",
     "promised": "0\ncapability 'offline' was never requested via AddCapabilityQ().\n1\nallowed: permission held AND 'advisory' authority (level 1) covers risk tier 1",
     "output": "0\ncapability 'offline' was never requested via AddCapabilityQ().\n1\nallowed: permission held AND 'advisory' authority (level 1) covers risk tier 1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oG.ClearAttachedRules()\noRule = new stzGraphRule(\"second-approval\")\noRule.SetDomainQ(\"advances\")\noRule.WhenQ(\"amount\", \"greaterthan\", 200)\noRule.ThenQ(\"approvals\", \"greaterthan\", 1)\noRule.ThenViolationQ(\"two approvals needed\")\noG.AddRule(oRule)\noG.RulesReport()\noWatch2 = StzRuleGovernance(\"hub\")\noWatch2.AddRule(oRule)\noWatch2.AddCase(\"advances\", oG)\n? len(oWatch2.CheckRules())",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-rules-as-graph-rules-narration.md",
    "stz-governance-lineage-narration.md"
   ],
   "rulings": [
    "12.13",
    "12.29"
   ],
   "doors": {
    "programmer": "A rule is an object with a comparison and a requirement, attached to a model, and a rule governor tells you when it governs nothing.",
    "analyst": "The study promises that you change a rule's values, not its program. In the library, when the values change, the model is judged again with the new scope.",
    "designer": "A refusal keeps its context for the person who will read it.",
    "decision-maker": "Authority is not permission: ask which level covers which risk, and read the lineage of a decision.",
    "educator": "An organisation's rule can be taught as a sentence with a number in it.",
    "agent": "You prepare. A person decides. And you will be refused, with the level and the risk tier named."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 2741,
   "french": true,
   "text": "agents/ch30-an-organisation-in-the-field.md",
   "run": {
    "ran": "2026-10-15 13:00 UTC+01:00",
    "kept": 7,
    "runnable": 7
   }
  },
  {
   "number": 31,
   "id": "what-the-projects-show",
   "title": "What the projects show, and what comes next",
   "slug": "ch31-what-the-projects-show",
   "kind": "chapter",
   "part": 6,
   "appendix": null,
   "law": null,
   "principle": "A project shows exactly what a document, a file, a run and a named person reach, and the page says where they stop.",
   "spine": false,
   "status": "draft",
   "stage": {
    "built": "what the three projects delivered, each with a document (a first delivery followed by a field day; a product installed under licence; a design study built with the organisation's teams); the three lessons the library carries, each with a guard (a fake never ships; a chart judged under a regulator's rules; authority against risk, with its lineage); refusals that show an absence instead of hiding it",
    "designed": "the five-row guarantee sheet; a runtime that is the language's own running the library; the declared machine on a board",
    "absent": "any customer platform on the engine; the customers' declarations written as Softanza's own, as files; a word from the bank; the record of the restaurant after 25 August 2026; the organisation's hub; an offline mechanism in the library; a live payments run against the organisation's sandbox; a named person's verdict on any of it"
   },
   "guards": [
    {
     "name": "service_registry_narrated",
     "exists": true,
     "path": "base/test/system/service_registry_narrated.ring",
     "assertions": 93,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/service_registry_narrated.ring"
    },
    {
     "name": "full_scope_model_narrated",
     "exists": true,
     "path": "base/test/system/full_scope_model_narrated.ring",
     "assertions": 62,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/full_scope_model_narrated.ring"
    },
    {
     "name": "payments_live_adapter_narrated",
     "exists": true,
     "path": "base/test/system/payments_live_adapter_narrated.ring",
     "assertions": 125,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/payments_live_adapter_narrated.ring"
    },
    {
     "name": "sound_mu5_narrated",
     "exists": true,
     "path": "base/test/sound/sound_mu5_narrated.ring",
     "assertions": 20,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/sound/sound_mu5_narrated.ring"
    },
    {
     "name": "deployment_narrated",
     "exists": true,
     "path": "base/test/system/deployment_narrated.ring",
     "assertions": 63,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/deployment_narrated.ring"
    },
    {
     "name": "orgrule_narrated",
     "exists": true,
     "path": "base/test/graph/orgrule_narrated.ring",
     "assertions": 22,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/graph/orgrule_narrated.ring"
    },
    {
     "name": "14_bceao_governance",
     "exists": true,
     "path": "base/test/orgchart/14_bceao_governance.ring",
     "assertions": 1,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/orgchart/14_bceao_governance.ring"
    },
    {
     "name": "governance_narrated",
     "exists": true,
     "path": "base/test/governance/governance_narrated.ring",
     "assertions": 19,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/governance/governance_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oReg = new stzServiceRegistry(\"shop\")\noReg {\n\tDeclareMany([ :mail, :payments ])\n\t? @@( UnboundServices() )\n\t#--> [ \"mail\", \"payments\" ]\n\t? Findings()[1][:invariant]\n\t#--> unbound-service\n\t? IsSound()\n\t#--> 0\n}\ntry\n\toReg.Service(:payments)\ncatch\n\t? cCatchError\ndone\n#--> stzServiceRegistry(shop): nothing is bound for service 'payments'. Bind it (or BindLive it) before use.",
     "promised": "[ \"mail\", \"payments\" ]\nunbound-service\n0\nstzServiceRegistry(shop): nothing is bound for service 'payments'. Bind it (or BindLive it) before use.",
     "output": "[ \"mail\", \"payments\" ]\nunbound-service\n0\nstzServiceRegistry(shop): nothing is bound for service 'payments'. Bind it (or BindLive it) before use.",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oSol = new stzPlatformProfile(\"kiosk\")\noSol {\n\tDevelopedOn(:Windows)\n\tWithServer(:backend, :LinuxServer)\n\tWithApp(:firmware, :ESP32)\n}\noFw = oSol.App(:firmware).System()\n? oFw.ReadPin(4)\n#--> rehearsed\ntry\n\toFw.Spawn(\"worker\")\ncatch\n\t? cCatchError\ndone\n#--> scope 'esp32' (espidf) forbids 'process' -- spawn 'worker'. This target has no such capability.\noFw.Show()\n#--> Scope: esp32 (espidf)\n#      [rehearsed] read pin 4",
     "promised": "rehearsed\nscope 'esp32' (espidf) forbids 'process' -- spawn 'worker'. This target has no such capability.\nScope: esp32 (espidf)\n[rehearsed] read pin 4",
     "output": "rehearsed\nscope 'esp32' (espidf) forbids 'process' -- spawn 'worker'. This target has no such capability.\n\nScope: esp32 (espidf)\n  [rehearsed] read pin 4",
     "verdict": "kept",
     "effects": [
      "the system"
     ]
    },
    {
     "code": "oAd = new stzPispiHttpAdapter()\noAd {\n\tWithParticipant(\"shop\")\n\tWithBaseUrl(\"https://pispi.example\")\n\tAsLive()\n\t? IsSandbox()\n\t#--> 0\n}\ntry\n\toAd.Request(\"GET\", \"/comptes\", [], [])\ncatch\n\t? cCatchError\ndone\n#--> stzPispiHttpAdapter: no credentials. Give it the store and an actor: WithSecretsFrom(oStore, oActor).\n? oAd.TokensFetched()\n#--> 0",
     "promised": "0\nstzPispiHttpAdapter: no credentials. Give it the store and an actor: WithSecretsFrom(oStore, oActor).\n0",
     "output": "0\nstzPispiHttpAdapter: no credentials. Give it the store and an actor: WithSecretsFrom(oStore, oActor).\n\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oVoice = StzSoundFormantVoiceQ()\noVoice {\n\tSing(\"la la la\", \"c4 e4 g4\")\n\t? Refusals()\n\t#--> 1\n\t? LastError()\n\t#--> Sing is not available YET: the formant voice has not been heard by the author (sound_mu5_demo.ring plays it). SAPI was measured and does not hold a pitch (measured 2026-09-26: +-6 st asked, +-2.5 st given, up to 407 cents off, 286-575 cents of wander within a syllable -- it speaks, it cannot hold a note). Until the author calls the formant voice singing, Vowel and VowelsQ are what this voice honestly does\n}\naVerdicts = StzSoundSingingVerdict()\n? aVerdicts[:formant][:verdict]\n#--> UNPERCEIVED\n? aVerdicts[:retuned][:verdict]\n#--> SINGING\n? aVerdicts[:retuned][:date]\n#--> 2026-09-27\n? aVerdicts[:retuned][:said]\n#--> the retuned voice is somehow singing, open Sing()",
     "promised": "1\nSing is not available YET: the formant voice has not been heard by the author (sound_mu5_demo.ring plays it). SAPI was measured and does not hold a pitch (measured 2026-09-26: +-6 st asked, +-2.5 st given, up to 407 cents off, 286-575 cents of wander within a syllable -- it speaks, it cannot hold a note). Until the author calls the formant voice singing, Vowel and VowelsQ are what this voice honestly does\nUNPERCEIVED\nSINGING\n2026-09-27\nthe retuned voice is somehow singing, open Sing()",
     "output": "1\nSing is not available YET: the formant voice has not been heard by the author (sound_mu5_demo.ring plays it). SAPI was measured and does not hold a pitch (measured 2026-09-26: +-6 st asked, +-2.5 st given, up to 407 cents off, 286-575 cents of wander within a syllable -- it speaks, it cannot hold a note). Until the author calls the formant voice singing, Vowel and VowelsQ are what this voice honestly does\nUNPERCEIVED\nSINGING\n2026-09-27\nthe retuned voice is somehow singing, open Sing()",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oBrain = new stzDelivery(\"shop\")\noBrain.AddBackend(:api, :LinuxServer)\noBrain.RequiresIn(:api, StzResourcesQ().SetMemoryQ(2048).SetComputeQ(2).SetStorageQ(20))\noSmall = new stzDeploymentSite(\"tiny\")\noSmall.SetKindQ(:Server).SetCapacityQ(StzResourcesQ().SetMemoryQ(512).SetComputeQ(1).SetStorageQ(5))\noTiny = new stzDeployment(oBrain)\noTiny.SetTarget(:api, oSmall)\n? oTiny.Feasible()\n#--> 0\n? oTiny.Feasibility()[1][5]\n#--> SHORTFALL -- host too small\noCloud = new stzDeploymentSite(\"pool\")\noCloud.SetKindQ(:Server).SetProviderQ(:aws)\noPool = new stzDeployment(oBrain)\noPool.SetTarget(:api, oCloud)\n? oPool.Feasible()\n#--> 1\n? oPool.Feasibility()[1][5]\n#--> provision on aws",
     "promised": "0\nSHORTFALL -- host too small\n1\nprovision on aws",
     "output": "0\nSHORTFALL -- host too small\n1\nprovision on aws",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oReg = new stzServiceRegistry(\"my-project\")\noReg.DeclareMany([ :mail, :payments, :your_service ])\n? @@( oReg.UnboundServices() )\n#--> what you expect\n? oReg.IsSound()\n#--> what you expect\noReg.Bind(:mail, new stzMailSandbox())\n? @@( oReg.UnboundServices() )\n#--> what you expect",
     "promised": "what you expect\nwhat you expect\nwhat you expect",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "oReg = new stzServiceRegistry(\"shop\")\noReg.DeclareMany([ :mail, :payments ])\noReg.Bind(:payments, new stzPaymentsSandbox())\n? oReg.IsSound()",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-built-on-real-world-need.md",
    "stz-service-virtualization-code-first-subscribe-later.md",
    "stz-getting-paid-and-paying-narration.md",
    "stz-system-dev-to-deploy-narration.md"
   ],
   "rulings": [
    "12.5",
    "12.10",
    "12.13",
    "12.21",
    "12.22",
    "12.29",
    "12.30"
   ],
   "doors": {
    "programmer": "Your demo is a rehearsal until a target has run it. Ask the scope whether the line was native, rehearsed or refused, and write the same word beside your own claims.",
    "analyst": "When you cite a project, write three columns: the claim, the document, and what comes next. Do not fill the third from memory.",
    "designer": "A feature that no person has seen or heard ships shut, and says so. The stage is a state of the design and not an apology. I hold this as a view, not a result. What stands behind it on this page is the sound plane, where `Sing` refuses until a person has heard the voice.",
    "decision-maker": "Read the stage word before the testimonial. \"Built\" is a statement about a guard. \"Runs at a customer\" is a statement about a document. You can ask for it in writing, with a name beside it.",
    "educator": "Teach the difference between a project that taught the library and a project that runs on it. The first is shown here, and the second is the next milestone, in chapter 33. Unperceived is a state, not a failure.",
    "agent": "You may read the tables and quote any cell. You may not turn an absent cell into a present one. If you do, the next reader of the record will find your sentence and the missing file side by side."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 4702,
   "french": true,
   "text": "agents/ch31-what-the-projects-show.md",
   "run": {
    "ran": "2026-10-15 13:00 UTC+01:00",
    "kept": 5,
    "runnable": 5
   }
  },
  {
   "number": 32,
   "id": "many-minds-on-one-body-of-work",
   "title": "Many minds on one body of work",
   "slug": "ch32-many-minds-on-one-body-of-work",
   "kind": "chapter",
   "part": 7,
   "appendix": null,
   "law": null,
   "principle": "every law cites the incident that earned it. A new law without a dated failure behind it is a preference, and belongs in a style guide instead.",
   "spine": true,
   "status": "draft",
   "stage": {
    "built": "the protocol, its memos and its ledger of rulings; three hooks: one refuses wholesale staging, one refuses a register edit made on a stale view of its source system, one refuses work on a flooded machine; the instrument that measures composed stamps; the library's fourteen house rules, five of them over a code graph",
    "designed": "a watcher that wakes a session when a file arrives, in place of the clocks; a court of style for the code a programmer or an AI agent writes",
    "absent": "token figures in the cost record; any team outside this estate that has tried the protocol; a check of a word in the reader's own language"
   },
   "guards": [
    {
     "name": "coderule_narrated",
     "exists": true,
     "path": "base/test/meta/coderule_narrated.ring",
     "assertions": 77,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/meta/coderule_narrated.ring"
    },
    {
     "name": "codegraph_narrated",
     "exists": true,
     "path": "base/test/meta/codegraph_narrated.ring",
     "assertions": 28,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/meta/codegraph_narrated.ring"
    },
    {
     "name": "coderule_project_narrated",
     "exists": true,
     "path": "base/test/meta/coderule_project_narrated.ring",
     "assertions": 13,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/meta/coderule_project_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "cCode = \"class Shop\" + nl + \"def KillOrder()\" + nl + \"  return\" + nl\naFindings = StzCheckCode(cCode)\n? aFindings[1][:rule]\n#--> no-aggressive-verbs\n? aFindings[1][:message]\n#--> aggressive verb in method 'KillOrder' -- prefer Remove/Delete/Dispose/Clear/Close (Softanza tone)\n? StzCodeIsClean(cCode)\n#--> 1",
     "promised": "no-aggressive-verbs\naggressive verb in method 'KillOrder' -- prefer Remove/Delete/Dispose/Clear/Close (Softanza tone)\n1",
     "output": "no-aggressive-verbs\naggressive verb in method 'KillOrder' -- prefer Remove/Delete/Dispose/Clear/Close (Softanza tone)\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cCode = \"class Shop\" + nl + \"def RemoveOrder()\" + nl + \"  return\" + nl\n? len( StzCheckCode(cCode) )\n#--> 0",
     "promised": "0",
     "output": "0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "? len( StzCodeRuleNames() )\n#--> 14\n? StzCodeRuleNames()[3]\n#--> no-aggressive-verbs",
     "promised": "14\nno-aggressive-verbs",
     "output": "14\nno-aggressive-verbs",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cCode = \"class Shop\" + nl + \"def KillOrder()\" + nl + \"  return\" + nl\naFindings = StzCheckCode(cCode)\n? aFindings[1][:rule]\n? aFindings[1][:message]\n? StzCodeIsClean(cCode)",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-rules-as-graph-rules-narration.md",
    "stz-governance-lineage-narration.md"
   ],
   "rulings": [
    "12.16",
    "12.20",
    "12.29"
   ],
   "doors": {
    "programmer": "Stage by explicit path, read a file again before you write it, read the time from the clock. Each rule cost someone an edit.",
    "analyst": "The record is data you can query, and it publishes its own error rates beside its rules.",
    "designer": "A word names a state, never a person. A message is a closed structure a reader scans in one glance, written so that it parses for a reader whose first language is not English.",
    "decision-maker": "A ruling is written only in your presence. When no figure can answer a question, decide by judgement and write down that it was judgement.",
    "educator": "Teach a rule with the failure that earned it. A rule whose cost you cannot name is a rule you will talk yourself out of at two in the morning.",
    "agent": "You are a worker with a record. You write a memo, a cost line and a conclusion; the hooks refuse what has hurt others; your stamps are compared with your commits. None of it assumes you are careless. All of it assumes you are many."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 3080,
   "french": true,
   "text": "agents/ch32-many-minds-on-one-body-of-work.md",
   "run": {
    "ran": "2026-10-15 13:00 UTC+01:00",
    "kept": 3,
    "runnable": 3
   }
  },
  {
   "number": 33,
   "id": "the-next-line",
   "title": "The next line: a solution on its own engine",
   "slug": "ch33-the-next-line",
   "kind": "chapter",
   "part": 7,
   "appendix": null,
   "law": null,
   "principle": "The record carries a solution only when it ran on its own engine and a named person said what they saw.",
   "spine": true,
   "status": "draft",
   "stage": {
    "built": "a declared platform built, then deployed, and refused in the other order; the twin that touches nothing real; the production gate that refuses a fake service",
    "designed": "the runtime that is the language's own, running the library; the guarantee sheet of a solution in five rows; live hosts and a real board",
    "absent": "a customer solution running on the Softanza engine, and a named person's verdict on it; the customers' declarations as files"
   },
   "guards": [
    {
     "name": "full_scope_model_narrated",
     "exists": true,
     "path": "base/test/system/full_scope_model_narrated.ring",
     "assertions": 62,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/full_scope_model_narrated.ring"
    },
    {
     "name": "virtual_system_twin_narrated",
     "exists": true,
     "path": "base/test/system/virtual_system_twin_narrated.ring",
     "assertions": 48,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/virtual_system_twin_narrated.ring"
    },
    {
     "name": "service_delivery_narrated",
     "exists": true,
     "path": "base/test/system/service_delivery_narrated.ring",
     "assertions": 60,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/system/service_delivery_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "oSol = new stzPlatformProfile(\"bank\")\noSol.DevelopedOn(:Windows)\noSol.WithServer(:backend, :LinuxServer)\noPlatform = StzPlatformQ(\"bank\")\noPlatform.SetProfile(oSol)\ntry\n\toPlatform.Deploy()\ncatch\n\t? cCatchError\ndone\n#--> stzPlatform.Deploy: the platform must be Build() before it can be deployed.\noPlatform {\n\t? IsDeployed()\n\t#--> 0\n\tBuild()\n\tDeploy()\n\t? IsDeployed()\n\t#--> 1\n}",
     "promised": "stzPlatform.Deploy: the platform must be Build() before it can be deployed.\n0\n1",
     "output": "stzPlatform.Deploy: the platform must be Build() before it can be deployed.\n\n0\n1",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oTwin = new stzVirtualFileSystem()\noTwin {\n\tCreateFile(\"orders/today.txt\", \"3 couscous\")\n\t? ContentOf(\"orders/today.txt\")\n\t#--> 3 couscous\n\t? OriginOf(\"orders/today.txt\")\n\t#--> virtual\n}\n? StzEngineFileExists(\"orders/today.txt\")\n#--> 0",
     "promised": "3 couscous\nvirtual\n0",
     "output": "3 couscous\nvirtual\n0",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oReg = new stzServiceRegistry(\"shop\")\noReg.BindSandbox(:payments, new stzPaymentsSandbox())\noDel = new stzDelivery(\"shop\")\noDel {\n\tAddBackend(\"api\", \"linux\")\n\tUseServices(oReg)\n\tDeployTo(StzDeploymentSiteQ(\"host1\"), \"api\")\n\tSetActor(HumanActor(\"dana\"))\n\toDep = Deploy(:Production)\n\t? oDep.WasCommitted()\n\t#--> 0\n\t? Log().EntriesOfLevel(:error)[2][:message]\n\t#--> sandbox-in-production @ shop/payments\n}",
     "promised": "0\nsandbox-in-production @ shop/payments",
     "output": "0\nsandbox-in-production @ shop/payments",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "oSol = new stzPlatformProfile(\"my-project\")\noSol.DevelopedOn(:Windows)\noSol.WithServer(:backend, :LinuxServer)\noP = StzPlatformQ(\"my-project\")\noP.SetProfile(oSol)\n# your three questions here, each with the line you expect under it",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    },
    {
     "code": "oReg = new stzServiceRegistry(\"shop\")\noReg.BindSandbox(:payments, new stzPaymentsSandbox())\noDel = new stzDelivery(\"shop\")\noDel.AddBackend(\"api\", \"linux\")\noDel.UseServicesQ(oReg)\noDel.DeployTo(StzDeploymentSiteQ(\"host1\"), \"api\")\noDel.SetActor(LLMActor(\"assistant\"))\noDep = oDel.Deploy(:Production)\n? oDep.WasCommitted()\n? oDel.Log().EntriesOfLevel(:error)[2][:message]",
     "promised": "",
     "output": "",
     "verdict": "exercise",
     "effects": []
    }
   ],
   "narrations": [
    "stz-built-on-real-world-need.md",
    "stz-system-dev-to-deploy-narration.md",
    "stz-emulating-the-whole-solution-narration.md",
    "stz-service-virtualization-code-first-subscribe-later.md"
   ],
   "rulings": [
    "12.5",
    "12.10",
    "12.13",
    "12.21",
    "12.29",
    "12.30"
   ],
   "doors": {
    "programmer": "Your code runs today through build, rehearsal and a governed deployment. What comes next is a customer running it on the engine, and the record will carry that claim the day it is true.",
    "analyst": "Ask for two things before you count a project as proof: a document, and a named verdict.",
    "designer": "What you design is judged last by a person's sense. An AI model's opinion of a picture is a result; a person's is the verdict.",
    "decision-maker": "Read the stage word before the promise. Today the floor is built; the customer run on the engine is the next milestone, and its stage word is absent.",
    "educator": "Teach that unperceived is a state and not a failure. An honest report can ship on it, if it says so.",
    "agent": "You may rehearse a deployment and explain it. You will be refused when you try to perform it (chapter 24 shows the refusal)."
   },
   "sections": [
    {
     "n": 1,
     "title": "The concept, as the field holds it"
    },
    {
     "n": 2,
     "title": "The first principle"
    },
    {
     "n": 3,
     "title": "The Softanza form"
    },
    {
     "n": 4,
     "title": "The decision, and what I refused"
    },
    {
     "n": 5,
     "title": "The court"
    },
    {
     "n": 6,
     "title": "The field, and where it leads"
    },
    {
     "n": 7,
     "title": "The limit"
    },
    {
     "n": 8,
     "title": "Six doors"
    },
    {
     "n": 9,
     "title": "Exercise"
    }
   ],
   "open_questions": [],
   "words": 2746,
   "french": true,
   "text": "agents/ch33-the-next-line.md",
   "run": {
    "ran": "2026-10-15 13:01 UTC+01:00",
    "kept": 3,
    "runnable": 3
   }
  },
  {
   "number": 101,
   "id": "the-register-of-innovations",
   "title": "The register of innovations",
   "slug": "app-a-the-register-of-innovations",
   "kind": "appendix",
   "part": null,
   "appendix": "A",
   "law": null,
   "principle": null,
   "spine": false,
   "status": "draft",
   "stage": {},
   "guards": [],
   "promises": [],
   "narrations": [],
   "rulings": [
    "12.19"
   ],
   "doors": {},
   "sections": [],
   "open_questions": [],
   "words": 1592,
   "french": true,
   "text": "agents/app-a-the-register-of-innovations.md",
   "run": {
    "ran": null,
    "kept": 0,
    "runnable": 0
   }
  },
  {
   "number": 102,
   "id": "the-fourteen-house-rules",
   "title": "The fourteen house rules",
   "slug": "app-b-the-fourteen-house-rules",
   "kind": "appendix",
   "part": null,
   "appendix": "B",
   "law": null,
   "principle": null,
   "spine": false,
   "status": "draft",
   "stage": {},
   "guards": [
    {
     "name": "coderule_narrated",
     "exists": true,
     "path": "base/test/meta/coderule_narrated.ring",
     "assertions": 77,
     "url": "https://github.com/mayouni/stzlib/blob/93d7a39bdd040f82eae21d949460d69c32a75c70/libraries/stzlib/base/test/meta/coderule_narrated.ring"
    }
   ],
   "promises": [
    {
     "code": "? len( StzCodeRuleNames() )\n#--> 14\n? StzCodeRuleNames()[2]\n#--> q-returns-object\n? StzCodeRuleNames()[14]\n#--> value-called-as-function",
     "promised": "14\nq-returns-object\nvalue-called-as-function",
     "output": "14\nq-returns-object\nvalue-called-as-function",
     "verdict": "kept",
     "effects": []
    },
    {
     "code": "cSay = \"class Door\" + nl + \"def Say()\" + nl + \"\t? 'hello'\" + nl + \"\treturn 1\" + nl\n? StzCheckCode(cSay)[1][:rule]\n#--> library_prints\n? StzCheckCode(cSay)[1][:severity]\n#--> warning\n? StzCodeIsClean(cSay)\n#--> 1\ncBox = \"class Box\" + nl + \"def Size()\" + nl + \"\treturn 1\" + nl + \"def size()\" + nl + \"\treturn 2\" + nl\n? StzCheckCode(cBox)[1][:rule]\n#--> no-case-collision\n? StzCodeIsClean(cBox)\n#--> 0\ncLen = \"class Box\" + nl + \"def Len()\" + nl + \"\treturn 1\" + nl\n? StzCheckCode(cLen)[1][:rule]\n#--> no-len-method\n? StzCodeIsClean(cLen)\n#--> 0",
     "promised": "library_prints\nwarning\n1\nno-case-collision\n0\nno-len-method\n0",
     "output": "library_prints\nwarning\n1\nno-case-collision\n0\nno-len-method\n0",
     "verdict": "kept",
     "effects": []
    }
   ],
   "narrations": [],
   "rulings": [
    "12.16"
   ],
   "doors": {},
   "sections": [],
   "open_questions": [],
   "words": 939,
   "french": true,
   "text": "agents/app-b-the-fourteen-house-rules.md",
   "run": {
    "ran": "2026-10-15 13:01 UTC+01:00",
    "kept": 2,
    "runnable": 2
   }
  },
  {
   "number": 103,
   "id": "the-twenty-two-verbs-and-the-constitution",
   "title": "The twenty-two verbs and the constitution",
   "slug": "app-c-the-twenty-two-verbs-and-the-constitution",
   "kind": "appendix",
   "part": null,
   "appendix": "C",
   "law": null,
   "principle": null,
   "spine": false,
   "status": "draft",
   "stage": {},
   "guards": [],
   "promises": [],
   "narrations": [],
   "rulings": [
    "12.23",
    "12.24",
    "12.25"
   ],
   "doors": {},
   "sections": [],
   "open_questions": [],
   "words": 961,
   "french": true,
   "text": "agents/app-c-the-twenty-two-verbs-and-the-constitution.md",
   "run": {
    "ran": null,
    "kept": 0,
    "runnable": 0
   }
  },
  {
   "number": 104,
   "id": "the-glossary",
   "title": "The glossary: words name states, never people",
   "slug": "app-d-the-glossary",
   "kind": "appendix",
   "part": null,
   "appendix": "D",
   "law": null,
   "principle": null,
   "spine": false,
   "status": "draft",
   "stage": {},
   "guards": [],
   "promises": [],
   "narrations": [],
   "rulings": [],
   "doors": {},
   "sections": [],
   "open_questions": [],
   "words": 1951,
   "french": true,
   "text": "agents/app-d-the-glossary.md",
   "run": {
    "ran": null,
    "kept": 0,
    "runnable": 0
   }
  },
  {
   "number": 105,
   "id": "the-guards-and-fixtures-cited",
   "title": "The guards and fixtures cited, by chapter",
   "slug": "app-e-the-guards-and-fixtures-cited",
   "kind": "appendix",
   "part": null,
   "appendix": "E",
   "law": null,
   "principle": null,
   "spine": false,
   "status": "draft",
   "stage": {},
   "guards": [],
   "promises": [],
   "narrations": [],
   "rulings": [],
   "doors": {},
   "sections": [],
   "open_questions": [],
   "words": 1799,
   "french": true,
   "text": "agents/app-e-the-guards-and-fixtures-cited.md",
   "run": {
    "ran": null,
    "kept": 0,
    "runnable": 0
   }
  },
  {
   "number": 106,
   "id": "the-narrations-the-book-argues-from",
   "title": "The narrations the book argues from",
   "slug": "app-f-the-narrations-the-book-argues-from",
   "kind": "appendix",
   "part": null,
   "appendix": "F",
   "law": null,
   "principle": null,
   "spine": false,
   "status": "draft",
   "stage": {},
   "guards": [],
   "promises": [],
   "narrations": [],
   "rulings": [],
   "doors": {},
   "sections": [],
   "open_questions": [],
   "words": 1231,
   "french": true,
   "text": "agents/app-f-the-narrations-the-book-argues-from.md",
   "run": {
    "ran": null,
    "kept": 0,
    "runnable": 0
   }
  },
  {
   "number": 107,
   "id": "the-book-as-data",
   "title": "The book as data, for the agent that reads it",
   "slug": "app-g-the-book-as-data",
   "kind": "appendix",
   "part": null,
   "appendix": "G",
   "law": null,
   "principle": null,
   "spine": false,
   "status": "draft",
   "stage": {},
   "guards": [],
   "promises": [],
   "narrations": [],
   "rulings": [],
   "doors": {},
   "sections": [],
   "open_questions": [],
   "words": 1167,
   "french": true,
   "text": "agents/app-g-the-book-as-data.md",
   "run": {
    "ran": null,
    "kept": 0,
    "runnable": 0
   }
  },
  {
   "number": 108,
   "id": "the-projects-history",
   "title": "The project's history: from Ring to Haro",
   "slug": "app-h-the-projects-history",
   "kind": "appendix",
   "part": null,
   "appendix": "H",
   "law": null,
   "principle": null,
   "spine": false,
   "status": "draft",
   "stage": {},
   "guards": [],
   "promises": [],
   "narrations": [],
   "rulings": [],
   "doors": {},
   "sections": [
    {
     "n": null,
     "title": "Where it began"
    },
    {
     "n": null,
     "title": "What real projects taught"
    },
    {
     "n": null,
     "title": "The path"
    },
    {
     "n": null,
     "title": "Thanks"
    }
   ],
   "open_questions": [],
   "words": 500,
   "french": true,
   "text": "agents/app-h-the-projects-history.md",
   "run": {
    "ran": null,
    "kept": 0,
    "runnable": 0
   }
  }
 ],
 "note": "Drafts are marked status: draft and are not the author's final word."
}
