@turri-dev/cli 0.2.4-next.240620d → 0.2.4-next.359b847

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +6 -7
  2. package/dist/bedrock-region.js +3 -3
  3. package/dist/chat-models.d.ts +1 -1
  4. package/dist/chat-models.js +1 -1
  5. package/dist/chat-scope.d.ts +1 -3
  6. package/dist/chat-skills.d.ts +1 -1
  7. package/dist/chat-skills.js +1 -1
  8. package/dist/chats.d.ts +44 -10
  9. package/dist/chats.js +125 -41
  10. package/dist/cli.js +10 -26
  11. package/dist/config-edit.d.ts +20 -8
  12. package/dist/config-edit.js +32 -24
  13. package/dist/config.d.ts +101 -58
  14. package/dist/config.js +265 -118
  15. package/dist/conform-cli.js +14 -3
  16. package/dist/conformance-switch.d.ts +7 -6
  17. package/dist/conformance-switch.js +19 -16
  18. package/dist/extension.d.ts +29 -3
  19. package/dist/extension.js +375 -351
  20. package/dist/genome.js +5 -1
  21. package/dist/host-session.d.ts +8 -7
  22. package/dist/host-session.js +4 -4
  23. package/dist/host.d.ts +3 -1
  24. package/dist/host.js +3 -3
  25. package/dist/identity.js +2 -2
  26. package/dist/init-config.d.ts +1 -1
  27. package/dist/init-config.js +8 -8
  28. package/dist/launch-agent.d.ts +51 -0
  29. package/dist/launch-agent.js +267 -0
  30. package/dist/{release-cli.js → launch-cli.js} +41 -24
  31. package/dist/launch-session.d.ts +68 -0
  32. package/dist/launch-session.js +217 -0
  33. package/dist/launch-tools.d.ts +28 -0
  34. package/dist/launch-tools.js +69 -0
  35. package/dist/launch-track.d.ts +125 -0
  36. package/dist/launch-track.js +320 -0
  37. package/dist/loop-cli.js +4 -4
  38. package/dist/loop-tools.d.ts +45 -21
  39. package/dist/loop-tools.js +152 -82
  40. package/dist/notice.d.ts +7 -6
  41. package/dist/parse-cli.js +2 -2
  42. package/dist/pi-launch.js +3 -0
  43. package/dist/pi-settings.d.ts +4 -0
  44. package/dist/pi-settings.js +39 -0
  45. package/dist/pi.js +6 -3
  46. package/dist/plain/check.d.ts +1 -1
  47. package/dist/plain/check.js +3 -1
  48. package/dist/plain-files.d.ts +2 -2
  49. package/dist/plain-files.js +7 -7
  50. package/dist/regenerate/agent-env.d.ts +1 -1
  51. package/dist/regenerate/agent-env.js +3 -3
  52. package/dist/regenerate/agent-shell.js +5 -3
  53. package/dist/regenerate/audit.js +9 -0
  54. package/dist/regenerate/base-folder.d.ts +2 -2
  55. package/dist/regenerate/base-folder.js +1 -1
  56. package/dist/regenerate/cases.js +7 -0
  57. package/dist/regenerate/chunk-plan.d.ts +5 -0
  58. package/dist/regenerate/chunk-plan.js +16 -1
  59. package/dist/regenerate/command-check.d.ts +7 -1
  60. package/dist/regenerate/command-check.js +43 -1
  61. package/dist/regenerate/delivery.d.ts +1 -1
  62. package/dist/regenerate/delivery.js +3 -3
  63. package/dist/regenerate/drift.d.ts +4 -0
  64. package/dist/regenerate/drift.js +26 -6
  65. package/dist/regenerate/job-panel.js +3 -1
  66. package/dist/regenerate/jobs.d.ts +2 -2
  67. package/dist/regenerate/jobs.js +10 -10
  68. package/dist/regenerate/launch.d.ts +154 -0
  69. package/dist/regenerate/{release.js → launch.js} +195 -51
  70. package/dist/regenerate/ledger.d.ts +33 -2
  71. package/dist/regenerate/lineage.d.ts +2 -0
  72. package/dist/regenerate/lineage.js +8 -0
  73. package/dist/regenerate/loop.d.ts +30 -10
  74. package/dist/regenerate/loop.js +166 -59
  75. package/dist/regenerate/model-names.d.ts +33 -0
  76. package/dist/regenerate/{engine.js → model-names.js} +2 -28
  77. package/dist/regenerate/paths.d.ts +3 -3
  78. package/dist/regenerate/paths.js +4 -4
  79. package/dist/regenerate/records.d.ts +11 -0
  80. package/dist/regenerate/records.js +15 -0
  81. package/dist/regenerate/regenerate.js +4 -1
  82. package/dist/regenerate/renames.js +4 -4
  83. package/dist/regenerate/requires.d.ts +7 -0
  84. package/dist/regenerate/requires.js +24 -18
  85. package/dist/regenerate/scripts-being-written.d.ts +4 -4
  86. package/dist/regenerate/scripts-being-written.js +3 -3
  87. package/dist/regenerate/spec-map.js +3 -3
  88. package/dist/regenerate/submit-work.d.ts +2 -0
  89. package/dist/regenerate/submit-work.js +8 -3
  90. package/dist/regenerate/test-scripts.d.ts +2 -1
  91. package/dist/regenerate/test-scripts.js +33 -23
  92. package/dist/regenerate/testing-steps.d.ts +6 -6
  93. package/dist/regenerate/testing-steps.js +8 -8
  94. package/dist/regenerate-cli.js +1 -1
  95. package/dist/self-invocation.d.ts +11 -0
  96. package/dist/self-invocation.js +36 -7
  97. package/dist/sentinel-check.d.ts +3 -3
  98. package/dist/sentinel-check.js +3 -3
  99. package/dist/sentinel.d.ts +18 -12
  100. package/dist/sentinel.js +72 -43
  101. package/dist/{config-command.d.ts → settings.d.ts} +13 -8
  102. package/dist/{config-command.js → settings.js} +155 -24
  103. package/dist/setup.d.ts +2 -2
  104. package/dist/setup.js +7 -7
  105. package/dist/turri-versions.js +2 -1
  106. package/docs/README.md +4 -4
  107. package/docs/chats.md +5 -6
  108. package/docs/claude-subscription.md +2 -2
  109. package/docs/config.md +58 -46
  110. package/docs/development.md +2 -2
  111. package/docs/headless.md +4 -4
  112. package/docs/hosting.md +20 -19
  113. package/docs/launch.md +67 -0
  114. package/docs/parser.md +2 -2
  115. package/docs/regenerating.md +21 -15
  116. package/docs/sandbox.md +3 -3
  117. package/docs/sentinel.md +26 -14
  118. package/docs/skills-and-gates.md +4 -4
  119. package/docs/using.md +19 -28
  120. package/genome/rules/project-model.md +2 -1
  121. package/genome/rules/turri-regeneration.md +5 -3
  122. package/genome/skills/implement-conformance-testing-script/SKILL.md +2 -2
  123. package/genome/skills/implement-unit-testing-script/SKILL.md +3 -3
  124. package/package.json +1 -1
  125. package/dist/regenerate/engine.d.ts +0 -52
  126. package/dist/regenerate/release.d.ts +0 -121
  127. package/dist/release-agent.d.ts +0 -43
  128. package/dist/release-agent.js +0 -130
  129. package/dist/release-tools.d.ts +0 -44
  130. package/dist/release-tools.js +0 -170
  131. package/dist/stacks.d.ts +0 -13
  132. package/dist/stacks.js +0 -96
  133. package/docs/deploy.md +0 -48
  134. /package/dist/{release-cli.d.ts → launch-cli.d.ts} +0 -0
package/docs/config.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # The project config
2
2
 
3
- A project says how its \*\*\*plain is built in `config.turri.yaml`, at the project root. Everything in it is optional: with no file at all, turri finds the testing scripts on its own, turns conformance tests on wherever a module has test reqs, and runs on [pi](https://pi.dev)'s configured model. A project whose parts are on different stacks - a backend and a frontend - adds a file per stack, `config.turri.<stack>.yaml`, beside it, and chooses the stack to build with (see [stacks](#stacks)). turri never writes a `config.yaml`: it may be another tool's, and is read only by a project that has no file of turri's yet (see [the old config.yaml](#the-old-configyaml)).
3
+ A project says how its \*\*\*plain is built in `config.turri.yaml`, at the project root. Everything in it is optional: with no file at all, turri finds the testing scripts on its own, turns conformance tests on wherever a module has test reqs, and runs on [pi](https://pi.dev)'s configured model. A project whose parts are on different stacks - a backend and a frontend - gives a module a file of its own, `config.turri.<module>.yaml`, beside it, which builds that module and those built on it (see [a module's own config](#a-modules-own-config)). turri never writes a `config.yaml`: it may be another tool's, and is read only by a project that has no file of turri's yet (see [the old config.yaml](#the-old-configyaml)). A key in `config.turri.yaml` or a module's file that turri reads nothing of - a setting it no longer has, like `test-advisor`, or one misspelt - is named in a warning under the banner as turri starts, rather than ignored without a word. A key turri has renamed is renamed in the file itself as turri first reads or writes the project's config - `release-after-pulse`, now `launch-after-pulse` - its value and its comment kept, and the banner says so; a file that sets the new name too is left as it is, the banner saying the old one does nothing.
4
4
 
5
5
  `turri init-config` starts one: the two models, a strong one to talk to and a smaller one to write the code. It asks which vendor's models you use - `--vendor` says it without asking, and with neither, as from a script, it is `other`:
6
6
 
@@ -32,7 +32,7 @@ Beside a `config.yaml` - another tool's, say - the new file takes from it the ke
32
32
 
33
33
  ## Where it is read from
34
34
 
35
- \*\*\*plain belongs to its **project**: the nearest folder, from its own folder up, that holds a `config.turri.yaml`, a stack's `config.turri.<stack>.yaml`, the old `config.yaml` or a `plain_modules/`. Without any of them, the \*\*\*plain description's own folder is the project. That folder's config is the one read, and its `plain_modules/` is where the code is built, wherever turri was started. So a project that keeps its \*\*\*plain in `plain/`, with `plain/config.turri.yaml`, builds `plain/app.plain` by `plain/config.turri.yaml` even when `turri` runs in the folder above.
35
+ \*\*\*plain belongs to its **project**: the nearest folder, from its own folder up, that holds a `config.turri.yaml`, a module's `config.turri.<module>.yaml`, the old `config.yaml` or a `plain_modules/`. Without any of them, the \*\*\*plain description's own folder is the project. That folder's config is the one read, and its `plain_modules/` is where the code is built, wherever turri was started. So a project that keeps its \*\*\*plain in `plain/`, with `plain/config.turri.yaml`, builds `plain/app.plain` by `plain/config.turri.yaml` even when `turri` runs in the folder above.
36
36
 
37
37
  When it is read:
38
38
 
@@ -41,7 +41,19 @@ When it is read:
41
41
 
42
42
  ## Changing it from the chat
43
43
 
44
- `/turri-config` changes any key in the chat, and writes it into the `config.turri.yaml` of the folder turri was started in - its comments, and the commented-out examples, kept. Alone, it lists every key with what it is now, and asks for the value of the one you pick the way the key takes it: `true` or `false`, one of its words, a number from a few offered or typed, a model from those this machine can reach and then how hard it thinks, a script or a `.plain` file the project has, rules ticked on and off. `/turri-config review` asks for review's value; `/turri-config review false` sets it, and `/turri-config review unset` takes it out, back to its default. Completion offers the keys, then each one's values. Each role's model and turn limit is `models.<role>` and `models.<role>.turn-limit` - `models.coding`, `models.planner.turn-limit`.
44
+ `/settings` changes any key in the chat, and writes it into the `config.turri.yaml` of the folder turri was started in - its comments, and the commented-out examples, kept. Alone, it lists every key with what it is now, and asks for the value of the one you pick the way the key takes it: `true` or `false`, one of its words, a number from a few offered or typed, a model from those this machine can reach and then how hard it thinks, a script or a `.plain` file the project has, rules ticked on and off. `/settings review` asks for review's value; `/settings review false` sets it, and `/settings review unset` takes it out, back to its default. Completion offers the keys, then each one's values. Each role's model and turn limit is `models.<role>` and `models.<role>.turn-limit` - `models.coding`, `models.planner.turn-limit`. It takes [pi](https://pi.dev)'s own `/settings` over: pi's menu - the theme, the editor, how the chat is shown - is the last entry of its list.
45
+
46
+ You can ask the chat too - "regenerate with gpt 5.5 from now on" - and its `settings` tool writes `coding-model` for you, the model checked as it is written, by the name you said: one that fits several models, or none signed in, comes back to you as a question instead. It writes into `config.turri.yaml`, or a module's own file (see [a module's own config](#a-modules-own-config)), and says what it set and when it takes effect. It changes a setting only when you ask, and some it never changes, whatever you ask - they are yours, with `/settings`:
47
+
48
+ | yours alone | why |
49
+ | --- | --- |
50
+ | `conformance-tests` | it doubles the time each change takes - see [conformance tests](#conformance-tests) |
51
+ | `agent-env`, `toolchains` | they hand the agents credentials, and folders of this machine past the [sandbox](sandbox.md) |
52
+ | `sentinel` | it checks the chat's own work |
53
+ | `rules-off` | it takes \*\*\*plain rules out of the chat's own prompt |
54
+ | `ledger-keep` | the ledger is the record of what the agents did |
55
+
56
+ A path it writes stays inside the project. For one pulse on another model, the chat passes `model` to `regenerate` or `conform` instead, and the config stays as it is.
45
57
 
46
58
  Each change says when it takes effect. None needs turri started again - what turri fixes as it starts is changed as it runs:
47
59
 
@@ -52,11 +64,11 @@ Each change says when it takes effect. None needs turri started again - what tur
52
64
  | the next pulse - one running keeps what it started with | `coding-model`, `judge-model`, every other `models.<role>`, `review`, `mutation-testing`, `turn-limit`, `compact-at`, `agent-env`, `toolchains`, `debug` |
53
65
  | the next time the work is planned | `max-specs-per-pulse`, `max-lines-per-pulse` |
54
66
  | the next test run - the running pulse's too | the testing scripts, `testing-scripts-run-on` |
55
- | the next pulse that lands - the running one too | `release-after-pulse`, `sentinel` |
67
+ | the next pulse that lands - the running one too | `launch-after-pulse`, `sentinel` |
56
68
  | the next regeneration that names no `.plain` file | `module` |
57
69
  | the next time turri starts here | `ledger-keep`, `cache-keep` |
58
70
 
59
- A coding model chosen this session - `--coding-model`, or `engine` - gives way to one set here: the last word wins. It says, too, what wins over the change: `models.chat` over `harness-model` (and so on), and a stack's `config.turri.<stack>.yaml`, which is not changed here, while that stack is chosen. In a project still read from `config.yaml`, the first change copies it to `config.turri.yaml` first - see [the old config.yaml](#the-old-configyaml).
71
+ A coding model given for this session with `--coding-model` gives way to one set here: the last word wins. It says, too, what wins over the change: `models.chat` over `harness-model` (and so on), and a module's own `config.turri.<module>.yaml`, which `/settings` does not change, for that module and those built on it. In a project still read from `config.yaml`, the first change copies it to `config.turri.yaml` first - see [the old config.yaml](#the-old-configyaml).
60
72
 
61
73
  ## The keys
62
74
 
@@ -94,11 +106,11 @@ models: # each agent role's model, thinking and tur
94
106
  | `mutation-testing` | `true` or `false`: whether the coding agent and the reviewer have `can_it_fail` - one change put in the code for one run of the unit testing script, to see that a test catches it; on a copy of the code, or in place and put back after the run (see [regenerating the code](regenerating.md#checking-its-own-work)). `turri regenerate --mutation-testing false` for one run | `true` |
95
107
  | `rules-off` | a list of rule names - `integrations`, `concise-specs`, the files of `genome/rules/` without `.md` - left out of the conversation's prompt and every \*\*\*plain-writing agent's: a rule this project's own skills or AGENTS.md replace, such as one that says to probe a live API before any \*\*\*plain is written. `turri init-config` writes it with `integration-embedded`, `integration-embedded-testing` and `integration-standalone` - take them out when the project writes an integration against a REST API. The project's alone | none |
96
108
  | `allow-to-stop-jobs` | `true` or `false`: whether turri stops a running job \*\*\*plain has moved on from - a functional spec it regenerates changed, or a file one links was edited - rolls it back and regenerates \*\*\*plain as it now is. `false`: the job runs to its end and lands, and what changed since is regenerated on top of it by the next job - see [regenerating the code](regenerating.md). Your own `halt` stops a job either way | `true` |
97
- | `release-after-pulse` | `true` or `false`: whether every pulse that lands code releases it, in the chat, as its last stage - before the module's next pulse starts, whatever the chat is doing: an agent on the coding model releases it, following the project's release guidance as the chat finds it (what was passed to `release` this conversation, AGENTS.md, the project's skills) for how, or to `dist/<module>` without any - see [deploy](deploy.md#after-every-pulse). One release a pulse that lands; a release that fails is said in the pulse's report, and what it landed stays. `turri init-config` writes `true` | `false` |
98
- | `sentinel` | `ask`, `true` or `false`: whether a chat of turri's own, the sentinel, gets every pulse that finishes - checks it, tests what was released under `release-after-pulse`, and puts what needs you as a notice in the chat you are in - instead of the chat that asked for it. `ask`: you are asked, with what it does, before it first opens in a session - see [starting it](sentinel.md#starting-it); `true`: it opens without asking. `/sentinel` sets it from the chat. `turri init-config` writes `ask` | `ask` |
99
- | `conformance-tests` | whether functional specs are conformance tested - black-box tests of the built software against the scenarios of their test plain files, run with the whole suite as more lands. `false`: none - no scenarios written or tested, no conformance testing script, and the chat's `conform` refused. Off by default for fast iteration - they make each change take about twice as long - and turned on by the person, with `/conform` - see [conformance tests](#conformance-tests). A stack's `config.turri.<stack>.yaml` can set its own | `false` |
100
- | `test-dir` | the folder of the test plain files, by path from the project root: a module's are every `.plain` file in `<test-dir>/<module>/`, each a functional spec's conformance and acceptance scenarios - see [test plain files](parser.md#test-plain-files). A stack's `config.turri.<stack>.yaml` can set its own | `tests` |
101
- | `base-folder` | a folder, by path from the project root, that a codebase requiring no other module starts from instead of nothing - an existing codebase to build on, files to use (images, animations, fonts), or both. It is copied in once, before the codebase's first pulse, and never written to: from a git repo what git sees, else every file but `.git` and installed dependencies. The \*\*\*plain may refer to it, and link into it; a codebase built on another starts from that one's code, base folder and all. A stack's `config.turri.<stack>.yaml` can name its own - see [the base folder](regenerating.md#the-base-folder) | none: the codebase starts empty |
109
+ | `launch-after-pulse` | `true` or `false`: whether every pulse that lands code is launched, in the chat, in the background - the pulse ends as it lands, and the codebase's next pulse does not wait: the commit it landed goes on the [launch track](launch.md#the-launch-track), one launch of a codebase at a time, the newest commit winning. An agent on the coding model launches it, following the project's launch guidance (what was passed to `launch` this session, AGENTS.md, the project's skills) for how, or from `dist/<module>` without any - see [launch](launch.md#after-every-pulse). The sentinel tests each pulse in a launch that holds its commit; with it off, the chat is told how each launch went. `turri init-config` writes `true`. Formerly `release-after-pulse`: a file that still has it has it renamed as turri first reads it | `false` |
110
+ | `sentinel` | `ask`, `true` or `false`: whether a chat of turri's own, the sentinel, gets every pulse that finishes - checks it, tests what was launched under `launch-after-pulse`, and puts what needs you as a notice in the chat you are in - instead of the chat that asked for it. `ask`: you are asked, with what it does, before it first opens in a session - see [starting it](sentinel.md#starting-it); `true`: it opens without asking. `/sentinel` sets it from the chat. `turri init-config` writes `ask` | `ask` |
111
+ | `conformance-tests` | whether functional specs are conformance tested - black-box tests of the built software against the scenarios of their test plain files, run with the whole suite as more lands. `false`: none - no scenarios written or tested, no conformance testing script, and the chat's `conform` refused. Off by default for fast iteration - they make each change take about twice as long - and turned on by the person, with `/conform` - see [conformance tests](#conformance-tests). A module's `config.turri.<module>.yaml` can set its own | `false` |
112
+ | `test-dir` | the folder of the test plain files, by path from the project root: a module's are every `.plain` file in `<test-dir>/<module>/`, each a functional spec's conformance and acceptance scenarios - see [test plain files](parser.md#test-plain-files). A module's `config.turri.<module>.yaml` can set its own | `tests` |
113
+ | `base-folder` | a folder, by path from the project root, that a codebase requiring no other module starts from instead of nothing - an existing codebase to build on, files to use (images, animations, fonts), or both. It is copied in once, before the codebase's first pulse, and never written to: from a git repo what git sees, else every file but `.git` and installed dependencies. The \*\*\*plain may refer to it, and link into it; a codebase built on another starts from that one's code, base folder and all. A module's `config.turri.<module>.yaml` can name its own - see [the base folder](regenerating.md#the-base-folder) | none: the codebase starts empty |
102
114
  | `unittests-script` | the unit testing script, by path from the project root - it runs the code's static checks too, exiting 80 when only they fail (see [the static checks](regenerating.md#the-static-checks)) | looked for - see below |
103
115
  | `conformance-tests-script` | the conformance testing script, by path from the project root | looked for - see below |
104
116
  | `prepare-environment-script` | optional: run as `<script> <build>` before every run of the conformance testing script, which runs only once it passes - see [the testing scripts](regenerating.md#the-testing-scripts). turri never writes one | the one `prepare_environment*.sh` at the root or in `test_scripts/`, else none |
@@ -106,11 +118,11 @@ models: # each agent role's model, thinking and tur
106
118
  | `ledger-keep` | how many megabytes of the ledger - what turri did, as facts, in `.turri/ledger` - the project keeps: past it, the oldest runs' are pruned when a run first writes; `0` keeps none, and writes none; the project's alone. See [the ledger](using.md#the-ledger) | 100 |
107
119
  | `debug` | `true` or `false`: whether turri keeps what it writes only for a person debugging it - every agent's whole log and saved session, each pulse's log, the whole outputs of its test runs and services, its agents' temporary files, and the dependencies installed in the modules a chain has left behind. `false`: only what turri reads to work is kept. `TURRI_DEBUG=1` - or `turri --debug` - turns it on for one run, and `TURRI_DEBUG=0` off; the project's alone. See [debug mode](#debug-mode) | `false` |
108
120
  | `cache-keep` | how many megabytes of package caches the project keeps - `plain_modules/.turri/cache`, and the caches in the agents' home folders: past it, the least recently written - by the newest file in each - are removed when a run starts its first agent command, each downloaded again when it is wanted; `0` keeps none; the project's alone | 4096 |
109
- | `max-specs-per-pulse` | the most functional specs the planner groups into one pulse - what builds one feature goes together, up to this many; a stack's file wins | 3 |
110
- | `max-lines-per-pulse` | the most lines of \*\*\*plain in one pulse - its functional specs with the definitions they bring; a group past it is split again, a functional spec a pulse; a stack's file wins | 120 |
121
+ | `max-specs-per-pulse` | the most functional specs the planner groups into one pulse - what builds one feature goes together, up to this many; a module's file wins | 3 |
122
+ | `max-lines-per-pulse` | the most lines of \*\*\*plain in one pulse - its functional specs with the definitions they bring; a group past it is split again, a functional spec a pulse; a module's file wins | 120 |
111
123
  | `parallel-jobs` | how many jobs the chat runs at once - modules that share nothing build side by side up to it; read when the chat starts, from the folder it starts in | half this machine's cores, between one and four - see [how many jobs at once](#how-many-jobs-at-once) |
112
- | `agent-env` | credentials the agents' commands need while they work - a live API probed, tests run against a real service: `files: [...]`, dotenv files by path from the project root, every variable in them; `vars: [...]`, variables by name from the environment turri was started in. A stack's `config.turri.<stack>.yaml` adds its own to the project's. See [credentials for the agents](#credentials-for-the-agents) | none: an agent's commands get no credential |
113
- | `toolchains` | folders of this machine an agent's commands may read beside the system's, the `PATH`'s and those the toolchain variables point at - a toolchain installed somewhere unusual (`[/srv/zig]`). A stack's add to the project's. See [the OS sandbox](sandbox.md#the-os-sandbox) | none |
124
+ | `agent-env` | credentials the agents' commands need while they work - a live API probed, tests run against a real service: `files: [...]`, dotenv files by path from the project root, every variable in them; `vars: [...]`, variables by name from the environment turri was started in. A module's `config.turri.<module>.yaml` adds its own to the project's. See [credentials for the agents](#credentials-for-the-agents) | none: an agent's commands get no credential |
125
+ | `toolchains` | folders of this machine an agent's commands may read beside the system's, the `PATH`'s and those the toolchain variables point at - a toolchain installed somewhere unusual (`[/srv/zig]`). A module's add to the project's. See [the OS sandbox](sandbox.md#the-os-sandbox) | none |
114
126
  | `turn-limit` | seconds each turn of an agent a job starts has, for every role without its own (`models:`); `0` for none. The config is the only place it is set. A turn past it ends at its next request to the model - see [regenerating the code](regenerating.md) | 120 |
115
127
  | `models` | each agent role's own model, thinking and turn limit - see [models per role](#models-per-role) | every role on `coding-model`, the conversation's side on `harness-model` |
116
128
  | `testing-scripts-run-on` | what the testing scripts run on - always on this machine, in your environment. `in-place`: the real build and tests folders, the script at its own path, from the project - so a script that finds a host codebase from its own path finds it. `copy`: a fresh copy of the code, staged in `plain_modules/.turri/scripts/`, with the script copied beside it. `can_it_fail` works on either: on a copy it changes the copy, in place the code itself for the one run, put back after it (see [the testing scripts](regenerating.md#the-testing-scripts)) | `in-place` |
@@ -125,11 +137,11 @@ Keys are written with dashes; underscores are read the same (`mutation_testing`)
125
137
  | --- | --- |
126
138
  | `default` | every role not named below - but the conversation's side |
127
139
  | `chat` | `turri`'s model - the same as `harness-model`, which it wins over |
128
- | `sentinel` | [the sentinel](sentinel.md): checks every finished pulse, and tests the release. Unnamed, the chat's model |
140
+ | `sentinel` | [the sentinel](sentinel.md): checks every finished pulse, and tests what was launched. Unnamed, the chat's model |
129
141
  | `planner` | the conversation's side: the planner's agents. Unnamed, the chat's model |
130
142
  | `diagnosis` | the diagnosis of a job that failed for good: why it did not land, and what to do. Unnamed, the coding model the job ran on, thinking medium |
131
- | `release` | `turri release`'s agent and release-after-pulse's: it follows steps - a script, a start command - so it runs on the coding model, thinking low |
132
- | `coding` | the coding agent, the code fixer of a conformance run and the repair agent - the same as `coding-model`, which it wins over. `--model` on the command line, or a model chosen in the conversation (`engine`), wins over both |
143
+ | `launch` | the launch agent - the chat's `launch`, `turri launch` and launch-after-pulse's: it follows steps - a script, a start command - so it runs on the coding model, thinking low |
144
+ | `coding` | the coding agent, the code fixer of a conformance run and the repair agent - the same as `coding-model`, which it wins over. `--model` on the command line, or a model a call to `regenerate` or `conform` names, wins over both |
133
145
  | `conformance` | the conformance agent |
134
146
  | `explorer` | the explorers of a conformance run |
135
147
  | `reviewer` | the review of the code and its unit tests |
@@ -138,15 +150,15 @@ Keys are written with dashes; underscores are read the same (`mutation_testing`)
138
150
  | `arbiter` | the arbiters that weigh a second review |
139
151
  | `debugger` | the fresh look at unit tests that keep failing the same way, or a coding agent going round in circles. Unnamed, `judge-model` when it is set, else the harness model - not `default` |
140
152
 
141
- What an entry leaves out it takes from `default`: `reviewer: { thinking: low }` runs the default model, thinking little. A turn limit is the role's own, else `default`'s, else `turn-limit:`, else two minutes. A stack's `config.turri.<stack>.yaml` lays its own `models:` over the project's, role by role - all but `chat`, the project's alone.
153
+ What an entry leaves out it takes from `default`: `reviewer: { thinking: low }` runs the default model, thinking little. A turn limit is the role's own, else `default`'s, else `turn-limit:`, else two minutes. A module's `config.turri.<module>.yaml` lays its own `models:` over the project's, role by role - all but `chat`, the project's alone.
142
154
 
143
- A role whose thinking nothing names - neither its entry, `default`'s, nor a `:level` on the model it runs on - thinks as its kind of work needs: **low** for the agents that do the work (`coding`, `conformance`, `explorer`, `release`), which work from \*\*\*plain that leaves little to guess and take many turns, and **medium** for the ones that judge (`reviewer`, `test-reviewer`, `judge`, `arbiter`, `debugger`, `planner`, `diagnosis`), where a wrong call costs pulses. A judging role that falls back on the coding model takes its model alone, not its thinking. The conversation keeps its own level, as [pi](https://pi.dev) sets it.
155
+ A role whose thinking nothing names - neither its entry, `default`'s, nor a `:level` on the model it runs on - thinks as its kind of work needs: **low** for the agents that do the work (`coding`, `conformance`, `explorer`, `launch`), which work from \*\*\*plain that leaves little to guess and take many turns, and **medium** for the ones that judge (`reviewer`, `test-reviewer`, `judge`, `arbiter`, `debugger`, `planner`, `diagnosis`), where a wrong call costs pulses. A judging role that falls back on the coding model takes its model alone, not its thinking. The conversation keeps its own level, as [pi](https://pi.dev) sets it.
144
156
 
145
157
  The thinking level reaches the model as each provider takes it. OpenAI's models on Bedrock are sent it as their reasoning effort (`none`, `low`, `medium`, `high`, `xhigh`) by turri itself, as [pi](https://pi.dev) sends them none.
146
158
 
147
159
  ## How many jobs at once
148
160
 
149
- Jobs on the same module, or on modules of one `requires` chain, always run one after another. Modules that share nothing - a backend, a frontend, a worker, ten of them - build side by side, each pulse's builds and tests running on this machine beside your own work. So the chat runs at most `parallel-jobs` jobs at once; a job whose turn has come waits for a free slot past that, and its line says so. Unset, it is half this machine's cores, at least one and at most four. The config is the only place it is set. It is the project's alone, never read from a stack's file.
161
+ Jobs on the same module, or on modules of one `requires` chain, always run one after another. Modules that share nothing - a backend, a frontend, a worker, ten of them - build side by side, each pulse's builds and tests running on this machine beside your own work. So the chat runs at most `parallel-jobs` jobs at once; a job whose turn has come waits for a free slot past that, and its line says so. Unset, it is half this machine's cores, at least one and at most four. The config is the only place it is set. It is the project's alone, never read from a module's file.
150
162
 
151
163
  The testing scripts all run on this machine, each on a copy of its module's code, so they never share files - but they do share its network: two modules whose conformance scripts start a server on the same port collide when they run at once. Give each its own.
152
164
 
@@ -169,7 +181,7 @@ They are defaults. What is asked for wins over them:
169
181
  | model | wins over the config |
170
182
  | --- | --- |
171
183
  | harness | `turri --harness-model <m>` (or [pi](https://pi.dev)'s own `--model`), and [pi](https://pi.dev)'s `/model` in the conversation |
172
- | coding | `turri --coding-model <m>`, `engine` in the conversation |
184
+ | coding | `turri --coding-model <m>` |
173
185
  | judge | - |
174
186
 
175
187
  `turri regenerate` and `conform` read `--harness-model`, `--coding-model` (or `--model`), `--judge-model` and `--review` differently: as the keys themselves, as if the file had them. Each takes its key's value and its place in the order above - a `models:` entry still wins over it - so a headless run is the same as a chat with those keys in the file.
@@ -178,7 +190,7 @@ A job keeps the model it was queued with: choosing another holds for what is que
178
190
 
179
191
  ## Conformance tests
180
192
 
181
- `conformance-tests: true` turns them on, a stack's `config.turri.<stack>.yaml` able to say its own. Unset, they are off, and `turri init-config` writes `conformance-tests: false`: no scenarios are written or tested, no conformance testing script is written, no conformance pulse runs - in the work loop, from `conform` or `turri conform` - and the chat's `conform` is refused. Test plain files already there are kept and parsed, and not tested: `parse` and `drift` say so. Turning them on is yours to decide, as they make each change take about twice as long: the chat always knows what they are, that they are off, and how they are turned on, and when it thinks a module needs them - or you ask it for them - it tells you why, and leaves it to you. `/conform` turns them on: it writes `conformance-tests: true` - into the stack's file when that names the key, else `config.turri.yaml` - in effect at once, and kept for the sessions after, then tests what has scenarios and code at once. So does `/turri-config conformance-tests true`, without testing anything.
193
+ `conformance-tests: true` turns them on, a module's `config.turri.<module>.yaml` able to say its own. Unset, they are off, and `turri init-config` writes `conformance-tests: false`: no scenarios are written or tested, no conformance testing script is written, no conformance pulse runs - in the work loop, from `conform` or `turri conform` - and the chat's `conform` is refused. Test plain files already there are kept and parsed, and not tested: `parse` and `drift` say so. Turning them on is yours to decide, as they make each change take about twice as long: the chat always knows what they are, that they are off, and how they are turned on, and when it thinks a module needs them - or you ask it for them - it tells you why, and leaves it to you. `/conform` turns them on: it writes `conformance-tests: true` - into the module's config file when that names the key, else `config.turri.yaml` - in effect at once, and kept for the sessions after, then tests what has scenarios and code at once. So does `/settings conformance-tests true`, without testing anything.
182
194
 
183
195
  On, what is tested is the functional specs with scenarios - the conformance and acceptance scenarios of each one's test plain file, `<test-dir>/<module>/<func-id>.plain` - in every module with `***test reqs***`. A functional spec with no test plain file is not tested, and a module with no functional spec with scenarios gets no conformance pulse at all - but keeps the codebase's existing tests passing. `test-dir` says where the test plain files are. To have a functional spec tested, write its scenarios: the chat writes them with its file tools, then calls `regenerate`, when you ask for conformance tests (see [conformance tests](regenerating.md#conformance-tests)).
184
196
 
@@ -186,7 +198,7 @@ On, what is tested is the functional specs with scenarios - the conformance and
186
198
 
187
199
  A build needs a unit testing script - and, with conformance on, a conformance testing script - to decide when it is done. They are looked for at the project root, in this order:
188
200
 
189
- 1. named in the config - the chosen stack's file first, then `config.turri.yaml` - by path from the root;
201
+ 1. named in the config - the module's own file first (or the one of a module it requires), then `config.turri.yaml` - by path from the root;
190
202
  2. the one `run_unittests*.sh` / `run_conformance_tests*.sh` in the project root;
191
203
  3. the one of each in `test_scripts/`.
192
204
 
@@ -201,15 +213,15 @@ turri writes much more than it needs to work, for a person working out why it di
201
213
  | | outside debug mode | in debug mode |
202
214
  | --- | --- | --- |
203
215
  | each pulse's log (`.turri/jobs/`) and its agents' (`.turri/debug/`) | written while the pulse runs - the diagnosis of a failure reads them - and removed as it ends | kept |
204
- | the logs of agents outside a pulse - the release agent, a side question | not written | kept |
216
+ | the logs of agents outside a pulse - the launch agent, a side question | not written | kept |
205
217
  | the agents' saved sessions (`.turri/sessions/`) | not written - each is kept in memory while it works; a gated skill's alone is saved, as its run resumes from it | kept |
206
218
  | whole outputs of test runs and services (`plain_modules/.turri/logs/`, `services/`) | read by the pulse's agents while it runs, removed as it ends | kept, the last 100 outputs |
207
219
  | a module's `TMPDIR` (`plain_modules/.turri/tmp/<module>`) | emptied as each of its pulses ends | kept |
208
220
  | dependencies installed in the modules below a pulse's own in its chain (`node_modules`, `.venv`) | removed as the pulse ends: the chain is built in its tip, and a module built on again installs them again, from the cache | kept |
209
221
 
210
- Kept either way: the ledger - what each pulse did, how it ended, what it cost (see [the ledger](using.md#the-ledger)) - and, for each pulse that failed or finished without landing, why: its report in `.turri/pulses/<id>.md` - its diagnosis, the stages that went wrong, the last failing test run's output, the last review that sent the work back, the tool calls that failed - which `pulses` tells with it in a later session, the newest 200 kept and none where `ledger-keep: 0`; the code, its tests and their history, a gated skill's run, what a conformance explorer found, what `deploy` started, and the package caches, held to `cache-keep:`. The testing scripts install what they run with themselves, so nothing removed is ever missed by a test run.
222
+ Kept either way: the ledger - what each pulse did, how it ended, what it cost (see [the ledger](using.md#the-ledger)) - and, for each pulse that failed or finished without landing, why: its report in `.turri/pulses/<id>.md` - its diagnosis, the stages that went wrong, the last failing test run's output, the last review that sent the work back, the tool calls that failed - which `pulses` tells with it in a later session, the newest 200 kept and none where `ledger-keep: 0`; the code, its tests and their history, a gated skill's run, what a conformance explorer found, what a launch started, and the package caches, held to `cache-keep:`. The testing scripts install what they run with themselves, so nothing removed is ever missed by a test run.
211
223
 
212
- Turn it on in `config.turri.yaml` (`debug: true`, or `/turri-config debug true`), or for one run with `TURRI_DEBUG=1` or `turri --debug`.
224
+ Turn it on in `config.turri.yaml` (`debug: true`, or `/settings debug true`), or for one run with `TURRI_DEBUG=1` or `turri --debug`.
213
225
 
214
226
  ## Credentials for the agents
215
227
 
@@ -223,22 +235,23 @@ agent-env:
223
235
  vars: [D365_TENANT_ID] # these variables, from the environment turri was started in
224
236
  ```
225
237
 
226
- What it names reaches every agent with a shell, as environment variables of its commands only - the file stays where it is, outside every agent's reach - and never replaces turri's own home, `TMPDIR` or caches. A stack's file adds to the project's. A file that is not there, or a variable unset or empty, is reported as missing. The testing scripts are not affected: they run in your own environment.
238
+ What it names reaches every agent with a shell, as environment variables of its commands only - the file stays where it is, outside every agent's reach - and never replaces turri's own home, `TMPDIR` or caches. A module's file adds to the project's. A file that is not there, or a variable unset or empty, is reported as missing. The testing scripts are not affected: they run in your own environment.
227
239
 
228
240
  Their values never appear in what an agent is shown or what turri writes: each is replaced by its name - `[D365_CLIENT_SECRET]` - whole, URL-encoded, or split over a command's output as it streams: in every tool result and refusal an agent is given (and so in the session transcripts, which hold only those), in the whole outputs kept for `read_output`, and in the job and debug logs. A value shorter than four characters is not masked - `1` or `eu` is everywhere in ordinary output.
229
241
 
230
- ## Stacks
242
+ ## A module's own config
231
243
 
232
- One project can hold parts that share nothing but a common module - a Python backend and a React frontend side by side, each importing `base` from `template/`, neither requiring the other - each needing its own testing scripts. Each stack gets a file of its own beside `config.turri.yaml`, `config.turri.<stack>.yaml`, holding what differs for it - typically its testing scripts, its `toolchains:`, its models:
244
+ One project can hold parts that share nothing but a common module - a Python backend and a React frontend side by side, each importing `base` from `template/`, neither requiring the other - each needing its own testing scripts. A module can have a file of its own beside `config.turri.yaml`, `config.turri.<module>.yaml`, holding what differs for it - typically its testing scripts, its `toolchains:`, its models:
233
245
 
234
246
  ```
235
247
  config.turri.yaml # the project's: harness-model, coding-model, review
236
- config.turri.backend.yaml # the stack backend: its testing scripts
237
- config.turri.frontend.yaml # the stack frontend: its testing scripts, and a coding model of its own
248
+ config.turri.backend.yaml # backend.plain's: its testing scripts
249
+ config.turri.frontend.yaml # frontend.plain's: its testing scripts, and a coding model of its own
238
250
  backend.plain # import: [base, python_fastapi_template]
251
+ backend_auth.plain # requires: [backend] - built with config.turri.backend.yaml too
239
252
  frontend.plain # import: [base, react_vite_template]
240
253
  template/ # base.plain, python_fastapi_template.plain, react_vite_template.plain
241
- test_scripts/ # both stacks' scripts
254
+ test_scripts/ # both modules' scripts
242
255
  ```
243
256
 
244
257
  ```yaml
@@ -249,27 +262,26 @@ coding-model:
249
262
  thinking: high
250
263
  ```
251
264
 
252
- Which stack builds a module, first match wins:
253
-
254
- - **The one a call names.** `regenerate`, `conform` and `pulses` (with `plain_file`) take a `stack`; the chat's model passes it for a module whose stack has a name of its own, leaving the chat's choice as it is.
255
- - **The stack named after the module** - `config.turri.backend.yaml` builds `backend.plain` - with nothing to choose or pass. Name each stack after the module it builds, and a backend and a frontend are each built with their own, side by side - in the chat, as each change is written, and on the command line.
256
- - **The one chosen in the chat** - each [chat](chats.md) its own - with `/stack` - a list of the project's stacks and none - or `/stack backend`, `/stack none`. The chat's model has a `stack` tool too, and switches the stack when you ask it to. `/stack` alone says which is chosen now. On the command line, with `--stack <name>` on any command - `turri regenerate`, `conform`, `release`, `cultivate` - and on `turri --stack backend` for the chat; or with `TURRI_STACK` in the environment.
265
+ Nobody chooses which file builds a module: turri works it out from the module, the same in the chat and on the command line.
257
266
 
258
- A chat's choice is its own, and lasts while it is open: a new chat starts with `--stack`'s, or none, and nothing remembers it - turri started again has none chosen. A stack the project has no file for is refused, with the stacks it has. With none chosen, `config.turri.yaml` alone is used.
267
+ 1. **`config.turri.yaml`**, by default.
268
+ 2. **The module's own file**, `config.turri.<module>.yaml`, laid over it.
269
+ 3. **The file of a module it requires**, when it has none of its own - all the way down its `requires` chain. A module is built on the code of those it requires, in one codebase, with their testing scripts: `backend_auth.plain` is built with `config.turri.backend.yaml`, and so is every module built on it that has no file of its own. Only `requires` counts, not `import`.
270
+ 4. **An error**, when two modules it requires have a file of their own and it has none: which one builds it cannot be told. `turri parse` says so, and `regenerate` and `conform` refuse it - give the module its own file, or keep one of theirs.
259
271
 
260
- How a stack's config is made:
272
+ How a module's config is made:
261
273
 
262
- - **Laid over `config.turri.yaml`, key by key.** What the stack's file gives wins; what it leaves out is the project's. A model it names takes what it leaves out from the project's same model - above, with the stack frontend chosen, everything regenerates on the project's coding model, thinking `high`.
263
- - **Pinned to a module when it is asked for.** A module is built with the stack it was asked for with, from its first pulse to its last: the pulses planned after it, its test runs, the scripts found, its plans and its conformance tests, whatever stack is chosen meanwhile. A pulse waiting for a free slot keeps the stack it was queued with. A change to its \*\*\*plain keeps its stack - unless it was built with none and has a stack of its own now; asked for again, its stack is worked out again. What `regenerate` says back names each module's stack, and so does a pulse's report.
264
- - **Refused with none, when that cannot build.** In a project of stacks, a module asked for with no stack - none named, none named after it, none chosen - is refused before anything is planned when `config.turri.yaml` alone names no unit testing script: every pulse would stop for want of one. The refusal names the stacks and the script each names. `stack: none` builds with `config.turri.yaml` alone all the same.
265
- - **The project's alone.** `module:`, `harness-model:`, `parallel-jobs:`, `rules-off:`, `compact-at:`, `ledger-keep:`, `debug:` and `cache-keep:` are read only from `config.turri.yaml` - there is one conversation, one module built when none is named, one machine. `agent-env:` and `toolchains:` in a stack's file add to the project's.
274
+ - **Laid over `config.turri.yaml`, key by key.** What the module's file gives wins; what it leaves out is the project's. A model it names takes what it leaves out from the project's same model - above, `frontend.plain` regenerates on the project's coding model, thinking `high`.
275
+ - **Pinned to each pulse.** A pulse runs with the config it was planned with - its test runs, the scripts found, its agents - and a pulse waiting for a free slot keeps the one it was queued with. A module is looked at again each time it is asked for or its \*\*\*plain changes: a file added since is used from its next pulse. What `regenerate` says back names the file each module is built with, and so does a pulse's report.
276
+ - **Refused when that cannot build.** In a project where modules have files of their own, a module with none - and none among the modules it requires - is refused before anything is planned when `config.turri.yaml` alone names no unit testing script: every pulse would stop for want of one. The refusal names the modules' files and the script each names. Give the module a file of its own - the chat's `settings` tool writes one, with `module` - or name the script in `config.turri.yaml`.
277
+ - **The project's alone.** `module:`, `harness-model:`, `parallel-jobs:`, `rules-off:`, `compact-at:`, `ledger-keep:`, `debug:` and `cache-keep:` are read only from `config.turri.yaml` - there is one conversation, one module built when none is named, one machine. `agent-env:` and `toolchains:` in a module's file add to the project's.
266
278
 
267
- The chat is told each stack's config and the one chosen. The skills that write testing scripts put each stack's in its own file once a project has two stacks, each stack named after the module it builds.
279
+ The chat is told each module's file and the modules it builds. The skills that write testing scripts put each module's scripts in its own file once a project has two, named after the module at the bottom of its chain.
268
280
 
269
281
  ## The old config.yaml
270
282
 
271
- turri's settings were once in `config.yaml`, and a stack's in `config.<stack>.yaml`. A `config.yaml` may be another tool's, so turri never writes one. While a project folder has no `config.turri*.yaml` at all, turri still reads its `config.yaml`, and each `config.<name>.yaml` as the stack `<name>`.
283
+ turri's settings were once in `config.yaml`, and a module's own in `config.<module>.yaml`. A `config.yaml` may be another tool's, so turri never writes one. While a project folder has no `config.turri*.yaml` at all, turri still reads its `config.yaml`, and each `config.<name>.yaml` as the module `<name>`'s own.
272
284
 
273
- The first time turri itself writes a setting there with `/turri-config`, it copies `config.yaml` to `config.turri.yaml` and each `config.<name>.yaml` to `config.turri.<name>.yaml` first, leaves the old files as they are, and from then on reads only the new ones. `turri init-config` copies the stacks' files the same way, but writes `config.turri.yaml` as its quick start, taking from `config.yaml` only the keys turri reads too - `unittests-script`, `conformance-tests-script` and `prepare-environment-script`, say - each in its place in the file, and saying which keys it left: `template_dir`, `verbose`, `api`, the other tool's alone. The two models are the vendor's, never taken. To change a setting by hand in such a project, do the same: copy the files to their new names, and edit the copies - never `config.yaml`. Writing a `config.turri.yaml` of your own beside it is the same move: from then on `config.yaml` is not read, its testing scripts with it. For a headless run that only needs conformance tests or another judge, or review, those options leave the files alone: `--conformance-tests`, `--judge-model`, `--review true|false`, and the models' too.
285
+ The first time turri itself writes a setting there with `/settings`, it copies `config.yaml` to `config.turri.yaml` and each `config.<name>.yaml` to `config.turri.<name>.yaml` first, leaves the old files as they are, and from then on reads only the new ones. `turri init-config` copies the modules' files the same way, but writes `config.turri.yaml` as its quick start, taking from `config.yaml` only the keys turri reads too - `unittests-script`, `conformance-tests-script` and `prepare-environment-script`, say - each in its place in the file, and saying which keys it left: `template_dir`, `verbose`, `api`, the other tool's alone. The two models are the vendor's, never taken. To change a setting by hand in such a project, do the same: copy the files to their new names, and edit the copies - never `config.yaml`. Writing a `config.turri.yaml` of your own beside it is the same move: from then on `config.yaml` is not read, its testing scripts with it. For a headless run that only needs conformance tests or another judge, or review, those options leave the files alone: `--conformance-tests`, `--judge-model`, `--review true|false`, and the models' too.
274
286
 
275
287
  Keys turri does not read - another tool's `verbose`, `api-key`, `build-folder`, ... - are ignored without a word, and so is a value of the wrong type. A file that does not parse as YAML is read as empty, so its testing scripts are then looked for by name.
@@ -53,9 +53,9 @@ The workflow signs in to npm with npm's trusted publishing (OIDC), not a token:
53
53
  | `src/regenerate/chunk-plan.ts`, `src/regenerate/cases.ts` | cutting the work into jobs, and what a job's agents are told by its cases |
54
54
  | `src/regenerate/regression.ts` | the whole conformance suite run, and the repair agent that may not touch tests |
55
55
  | `src/regenerate/lineage.ts` | module history in `.plaingit` |
56
- | `src/regenerate/release.ts`, `src/release-tools.ts`, `src/release-cli.ts` | deploy: the last commit to `dist/<module>`, what installs software, what it starts on the host - see [deploy](deploy.md) |
56
+ | `src/regenerate/launch.ts`, `src/launch-track.ts`, `src/launch-session.ts`, `src/launch-agent.ts`, `src/launch-tools.ts`, `src/launch-cli.ts` | launch: a commit to `dist/<module>`, the launch track, the launch agent and what it starts on the host - see [launch](launch.md) |
57
57
  | `src/regenerate/confine.ts`, `src/regenerate/agent-shell.ts`, `src/regenerate/command-check.ts`, `src/regenerate/os-sandbox.ts`, `src/regenerate/audit.ts`, `src/regenerate/agent-env.ts`, `src/regenerate/shell.ts` | the file-tool fence and the walls around every agent command: the check, the OS sandbox, the audit, the module's environment, the host runner - see [sandbox](sandbox.md) |
58
- | `src/regenerate/engine.ts` | choosing and resolving the models that regenerate |
58
+ | `src/regenerate/model-names.ts` | resolving a model named as the person said it - for a call's `model` and the `settings` tool |
59
59
  | `src/regenerate/job-panel.ts`, `src/regenerate/transcript-view.ts`, `src/regenerate/diff-view.ts` | the job panel, the side panel's colours, and a \*\*\*plain diff as they show it - highlighted and banded |
60
60
  | `src/regenerate/side-panel.ts`, `src/regenerate/panel-dock.ts` | the side panel, and the chat narrowed beside it when it is docked |
61
61
  | `src/screen-padding.ts` | the blank row above and below the whole screen and the two columns either side, in both of [pi](https://pi.dev)'s ways of drawing it |
package/docs/headless.md CHANGED
@@ -27,7 +27,7 @@ turri parse app.plain
27
27
  turri regenerate app.plain --model anthropic/claude-sonnet-5
28
28
  ```
29
29
 
30
- That builds every functionality in order - code and unit tests, then conformance tests when the module has `***test reqs***`, then every conformance test so far - and advances only when they pass. A module that `requires` others builds them first, bottom up. When it is done it prints `To try it: turri release <spec>` - see [deploy](deploy.md).
30
+ That builds every functionality in order - code and unit tests, then conformance tests when the module has `***test reqs***`, then every conformance test so far - and advances only when they pass. A module that `requires` others builds them first, bottom up. When it is done it prints `To try it: turri launch <spec>` - see [launch](launch.md).
31
31
 
32
32
  Keep it running when the terminal closes and the laptop would sleep, and keep the log:
33
33
 
@@ -51,7 +51,7 @@ coding-model: # the model every agent runs on, and h
51
51
  judge-model: anthropic/claude-opus-5-5 # the judge and the test review (default: coding-model)
52
52
  ```
53
53
 
54
- The same file names the [testing scripts](regenerating.md#the-testing-scripts); every key is in [the project config](config.md). `turri regenerate` and `conform` take four of its keys on the command line too - `--harness-model`, `--coding-model` (`--model` is the same), `--judge-model` and `--review`. Each is read as if the file had it, in its place: it takes that key's value, and every key keeps its place in the order the config resolves them in - a `models:` entry still wins over `harness-model`, `coding-model` or `judge-model`, the planner runs on the harness model, the judge falls back on the coding model. So a run with the options is the same as one, or a chat, with those keys in `config.turri.yaml` - and a `config.yaml` the project has is left as it is. A project whose parts are on different stacks keeps each stack's settings in `config.turri.<stack>.yaml` beside it ([stacks](config.md#stacks)). Choose the one to build with `--stack <name>` - on any command: `regenerate`, `conform`, `release`, `cultivate` - or `TURRI_STACK`: `turri regenerate backend.plain --stack backend`. With none chosen, `config.turri.yaml` alone is used; a stack the project has no file for is refused.
54
+ The same file names the [testing scripts](regenerating.md#the-testing-scripts); every key is in [the project config](config.md). `turri regenerate` and `conform` take four of its keys on the command line too - `--harness-model`, `--coding-model` (`--model` is the same), `--judge-model` and `--review`. Each is read as if the file had it, in its place: it takes that key's value, and every key keeps its place in the order the config resolves them in - a `models:` entry still wins over `harness-model`, `coding-model` or `judge-model`, the planner runs on the harness model, the judge falls back on the coding model. So a run with the options is the same as one, or a chat, with those keys in `config.turri.yaml` - and a `config.yaml` the project has is left as it is. A project whose parts are on different stacks gives a module its own settings in `config.turri.<module>.yaml` beside it ([a module's own config](config.md#a-modules-own-config)): `turri regenerate backend.plain` builds with `config.turri.backend.yaml`, and so does every module built on `backend.plain` that has no file of its own - with nothing to choose. A module with none, and none below it, is built with `config.turri.yaml` alone.
55
55
 
56
56
  Useful options - `turri regenerate --help` lists all of them:
57
57
 
@@ -62,9 +62,9 @@ Useful options - `turri regenerate --help` lists all of them:
62
62
  | `--judge-model <provider/id>` | `judge-model`: the judge and the test review; not given, the coding model |
63
63
  | `--review <true\|false>` | `review`: whether the code and its tests are reviewed once they pass |
64
64
  | `--mutation-testing <true\|false>` | `mutation-testing`: whether the coding agent and the reviewer have `can_it_fail` |
65
- | `--stack <name>` | build with the stack's `config.turri.<name>.yaml` over `config.turri.yaml`; default, `TURRI_STACK`, else none |
66
65
  | `--from-scratch` | delete the module's code and conformance tests (its lineage keeps them) and regenerate all of it |
67
66
  | `--from-scratch-chain` | the same for every module of its requires chain, the base's included, built again from the bottom |
67
+ | `turri conform --from-scratch` | take out the tests folder at the tip of the module's chain (its lineage keeps it) and write the tests again from a copy of the tests of the module the tip requires, the code untouched; `--from-scratch-chain`, from nothing |
68
68
  | `--start-over` | start over, unasked, a codebase built without a module it now requires - without a terminal, a run that needs it and lacks it stops |
69
69
  | `--build-dir <dir>` | as the run ends, export the code there - see below |
70
70
  | `--report <file.json>` | write [the run report](#the-run-report) there |
@@ -226,4 +226,4 @@ turri regenerate app.plain --harness-model amazon-bedrock/eu.anthropic.claude-op
226
226
  nohup turri -p "Render app.plain as a whole module, with conformance tests" > render.log 2>&1 &
227
227
  ```
228
228
 
229
- It reports what it did at the end, and nothing streams in between, so for long runs `turri regenerate` is the better choice. A skill that interviews needs someone to answer; without one it decides and record their assumptions, and a gate that escalates to a human stops the run.
229
+ It reports what it did at the end, and nothing streams in between, so for long runs `turri regenerate` is the better choice. A tool that waited - `regenerate`, `conform` - comes back with every pulse of the chat that ran while it waited, each with its report or why it did not land, before how each module stands; those pulses' ends start no turn of their own after it, so the answer says each once. A module waiting for a testing script being written beside it - a skill run in the same turn - is waited for too, until its pulse has run. A skill that interviews needs someone to answer; without one it decides and record their assumptions, and a gate that escalates to a human stops the run.
package/docs/hosting.md CHANGED
@@ -13,7 +13,7 @@
13
13
  | `MAX_CHATS`, `ChatInfo`, `ChatStatus` | the most chats a session has open - nine - and what the host is told of each. |
14
14
  | `pi` | [pi](https://pi.dev) itself, as turri is built against it. Make the host's own extensions and UI with this one, not another copy. |
15
15
  | `readProjectConfig`, `projectModels`, `modelSpec`, `configForSpec`, `hasProjectConfig`, `stacksOf` | the project's settings, as [config.turri.yaml](config.md) has them. |
16
- | `configSettings`, `currentValue`, `readConfigText`, `overriddenBy`, `EFFECT_TEXT` | every setting of config.turri.yaml as [/turri-config](config.md#changing-it-from-the-chat) knows it - its key, what it does, its kind (a yes or no, one of a few words, a number, a model, a list, a path, a budget), its words or the values offered first, what it is unset and when a change takes effect - and what the file has now (`currentValue(readConfigText(dir), key)`), and what wins over it. Change one as the person would, by sending `/turri-config <key> <value>` to the chat: turri checks it and writes it with the file's comments kept. A setting's values for a list are the session's `settingChoices(key, typed?)`: what /turri-config's completions offer after `typed`, in their order, but whole - uncapped, where the terminal shows forty - and without unset, which the host draws itself; the values alone. A model setting's are every model of every provider signed in to, from the model registry the chats use, whether or not one has run /turri-config - and after a colon, that model's thinking levels. An unknown key gives `[]`. |
16
+ | `configSettings`, `currentValue`, `readConfigText`, `overriddenBy`, `EFFECT_TEXT` | every setting of config.turri.yaml as [/settings](config.md#changing-it-from-the-chat) knows it - its key, what it does, its kind (a yes or no, one of a few words, a number, a model, a list, a path, a budget), its words or the values offered first, what it is unset and when a change takes effect - and what the file has now (`currentValue(readConfigText(dir), key)`), and what wins over it. Change one as the person would, by sending `/settings <key> <value>` to the chat: turri checks it and writes it with the file's comments kept. A setting's values for a list are the session's `settingChoices(key, typed?)`: what /settings's completions offer after `typed`, in their order, but whole - uncapped, where the terminal shows forty - and without unset, which the host draws itself; the values alone. A model setting's are every model of every provider signed in to, from the model registry the chats use, whether or not one has run /settings - and after a colon, that model's thinking levels. An unknown key gives `[]`. |
17
17
  | `debugMode` | whether turri keeps, in a project, what it writes only for debugging it - `debug:`, or `TURRI_DEBUG` over it (see [debug mode](config.md#debug-mode)). |
18
18
  | `initConfig(dir, { vendor, bedrock, models, force, catalogue })`, `VENDORS`, `BEDROCK_REGIONS`, `BEDROCK_DEFAULT` | a project's first config.turri.yaml, as `turri init-config` writes it - async, it may read [pi](https://pi.dev)'s catalogue - see [a project's first config](#a-projects-first-config). |
19
19
  | `machineChange(command)`, `machineChangeReason(why)` | whether a command line would install something on the machine or change a setting of the machine's or the person's shell - and why - and what turri says instead: for a host's own tool that types into a shell, which turri cannot see a command in. |
@@ -24,7 +24,7 @@
24
24
  | `checkPlainFile`, `plainFileParser`, `resolveTemplateDirs`, `iterateFunctionalSpecs`, `FUNCTIONAL_REQUIREMENTS` | \*\*\*plain checked and parsed, with its test plain files, its functional specs one by one - `{ funcId, specifications }`, the specifications with the functional spec's conformance and acceptance scenarios, each `{ id, text }` - as `turri parse` reads it. |
25
25
  | `highlightLines`, `roleOf` | \*\*\*plain's lines coloured by turri's own [\*\*\*plain](https://plainlang.org/docs/) grammar, each piece by its `PlainRole`: `section`, `concept`, `link`, `literal`, `keyword`, `module`, `comment`, `bullet` and `id` - the `# <id>` heading of a functional spec or a scenario, and a test plain file's `func_id:` value, the functional spec it binds to. A test plain file's `module:` value is a `module`, whole - `my-app`, `billing.v2` - as a module name listed under `import:` or `requires:` is. |
26
26
  | `plainGraph(projectDir)` | a project's \*\*\*plain as a graph to move around in: its modules with what each imports and requires and what imports and requires it, each item of their sections with its line, and the concepts - an item linked to those it names and to where each is defined - see [\*\*\*plain for a host](#plain-for-a-host). |
27
- | `testDirOf(plainFile)`, `DEFAULT_TEST_DIR` | the absolute folder a module's test plain files are in - `test-dir`, its stack's over the project's, else `tests` (`DEFAULT_TEST_DIR`), from the project's folder - for a host that lists a project's modules by walking its .plain files and leaves the test plain files out. It is a module's, not a project's, because a stack's `config.turri.<stack>.yaml` may name a folder of its own. |
27
+ | `testDirOf(plainFile)`, `DEFAULT_TEST_DIR` | the absolute folder a module's test plain files are in - `test-dir`, its module's own file's over the project's, else `tests` (`DEFAULT_TEST_DIR`), from the project's folder - for a host that lists a project's modules by walking its .plain files and leaves the test plain files out. It is a module's, not a project's, because a module's `config.turri.<module>.yaml` may name a folder of its own. |
28
28
  | `conceptsOf(plainFile)`, `findConcepts(text)`, `conceptBeingTyped(text)` | the concepts a module can name, with what each is and the module that defines it; the concepts written in a piece of text; the one being typed at its end. |
29
29
  | `stdlibTemplates()`, `isStack`, `STDLIB_KINDS` | turri's standard library: every template with its kind, file, text, imports and its conformance template or the stack it tests, and the kinds in order with their titles. |
30
30
  | `projectStanding(projectDir, { loop?, files? })`, `ModuleStanding` | how every module of a project stands, in one call - see [how a project stands](#how-a-project-stands). |
@@ -56,7 +56,7 @@ const { written, message } = await initConfig(project, { models: { harness, codi
56
56
  - `models: { harness, coding, strong? }` writes those two instead - any pair [pi](https://pi.dev)'s catalogue has as chat models, full model ids without a thinking level (`amazon-bedrock/global.xai.grok-4.7`). They go wherever the vendor's own would: the two models with the thinking turri writes, the commented-out `judge-model` and `models:` examples, `strong` - the judging examples' model - being `harness` unless given. The vendor, the Bedrock maker and the geography are read from them, so neither `vendor` nor `bedrock` is needed. A model the catalogue does not have, or that is not a chat model, writes nothing: `written` is false and `message` says which, with the closest the catalogue has.
57
57
  - `catalogue`, the one the host already read, saves reading it again.
58
58
 
59
- The message says whose models were written - "with xAI's models on Amazon Bedrock (global)" - and how to sign in: an `AWS_PROFILE` or a Bedrock API key, never a region. For a geography that needs one, it says which turri calls it in - `turri calls eu's models in eu-central-1. AWS_REGION, set, overrides it - and so does your AWS profile's region, when it is in eu.` - `bedrockAwsRegion(geography)` being that region, and `bedrockNeedsAwsRegion(geography)` whether the geography needs one. turri sets it itself: `createTurri` - and `turri` in a terminal, and every command that calls a model - sets `AWS_REGION` for the project's Bedrock models before any is called, when they need a region and neither `AWS_REGION` nor `AWS_DEFAULT_REGION` is set, and works it out again when the config's models change through `/turri-config` and as each pulse takes its model. A host that shows the person where their models run reads `bedrockRegionFor(projectDir)` - "turri calls these models in eu-central-1" - rather than asking them to set anything.
59
+ The message says whose models were written - "with xAI's models on Amazon Bedrock (global)" - and how to sign in: an `AWS_PROFILE` or a Bedrock API key, never a region. For a geography that needs one, it says which turri calls it in - `turri calls eu's models in eu-central-1. AWS_REGION, set, overrides it - and so does your AWS profile's region, when it is in eu.` - `bedrockAwsRegion(geography)` being that region, and `bedrockNeedsAwsRegion(geography)` whether the geography needs one. turri sets it itself: `createTurri` - and `turri` in a terminal, and every command that calls a model - sets `AWS_REGION` for the project's Bedrock models before any is called, when they need a region and neither `AWS_REGION` nor `AWS_DEFAULT_REGION` is set, and works it out again when the config's models change through `/settings` and as each pulse takes its model. A host that shows the person where their models run reads `bedrockRegionFor(projectDir)` - "turri calls these models in eu-central-1" - rather than asking them to set anything.
60
60
 
61
61
  ## How a project stands
62
62
 
@@ -120,7 +120,7 @@ const turri = await createTurri({
120
120
  pulseEndsShown: true, // the host shows each pulse that lands and each conclusion itself: the chat is told without a turn
121
121
  onChatSession: (chat, session) => {}, // a chat's session replaced, same id: the sentinel's, fresh for each pulse - follow this one
122
122
  sentinel: {
123
- tools: [browserTool], // the sentinel's own tools, beside turri's: what it tests a release with
123
+ tools: [browserTool], // the sentinel's own tools, beside turri's: what it tests a launch with
124
124
  surface: "...", // where the person watches it use them, in the host's words
125
125
  },
126
126
  });
@@ -133,8 +133,8 @@ await turri.interrupt(chat.id); // ctrl+c: "stopped" what it was doing, e
133
133
  await turri.decline(chat.id); // ctrl+c at a question: "declined", the turn going on - "none", "missing"
134
134
  turri.chats(); // [{ id, title, status: "idle" | "working" | "question" | "unread", shown, role? }]
135
135
  turri.notices(); // the notices open now
136
- turri.check({ module: "app", funcIds: ["add-task"] }); // the sentinel to test these in app's release: { check: id } or { refused: why }
137
- turri.settingChoices("harness-model"); // every value /turri-config offers for a setting, whole: every model signed in to
136
+ turri.check({ module: "app", funcIds: ["add-task"] }); // the sentinel to test these in what is launched of app: { check: id } or { refused: why }
137
+ turri.settingChoices("harness-model"); // every value /settings offers for a setting, whole: every model signed in to
138
138
  turri.settingChoices("harness-model", "openai/gpt-6-astra:"); // after a colon, that model's thinking levels
139
139
  turri.turnOnConformanceTests("app.plain"); // conformance tests on: the file written - config.turri.yaml, or the stack's
140
140
  await turri.answer(notice.id, { action: 0 }); // or { steer: "…" }, { dismiss: true }, { ignore: true }: "done", "dismissed", "ignored", "refused", "over", "missing"
@@ -142,22 +142,23 @@ turri.onChats((chats) => {}); // a chat opened, closed, renamed, workin
142
142
  await turri.closeChat(chat.id); // its turn stopped, its conversation deleted - its pulses run on
143
143
  turri.jobs; // the session's job registry: every pulse any chat started
144
144
  turri.loop; // its work loop, once a chat is open
145
- await turri.dispose(); // every chat let go, what activate started stopped
145
+ await turri.dispose(); // every chat let go, what launches started stopped
146
146
  ```
147
147
 
148
- - **The chats.** Up to nine, each its own history, model, thinking level and stack, all on the session's one job registry and work loop - see [chats](chats.md). `openChat({ sessionFile })` reopens a saved one. A pulse's end goes to the sentinel (below), and is shown in the chat `focus` last named - its agent told of a pulse that landed only to say so and what the sentinel is doing with it, and not told of one that went wrong. What the `surface` says to do once something is released is then not done: the sentinel tests the release. With `sentinel: false`, it is told to the chat that asked for it, its agent reacting there - to the chat `focus` last named when that one is closed. A chat is never hidden from turri's side: what the host does not show, it still runs, and its questions go to the host's dialogs at once - the host decides where they wait. `status` says a turn is running (`working`) or that it said something since it was last focused (`unread`).
148
+ - **The chats.** Up to nine, each its own history, model, thinking level and stack, all on the session's one job registry and work loop - see [chats](chats.md). `openChat({ sessionFile })` reopens a saved one. A pulse's end goes to the sentinel (below), and is shown in the chat `focus` last named - its agent told of a pulse that landed only to say so and what the sentinel is doing with it, and not told of one that went wrong. What the `surface` says to do once something is launched is then not done after a pulse: the sentinel tests what was launched. With `sentinel: false`, it is told to the chat that asked for it, its agent reacting there - to the chat `focus` last named when that one is closed. A chat is never hidden from turri's side: what the host does not show, it still runs, and its questions go to the host's dialogs at once - the host decides where they wait. `status` says a turn is running (`working`) or that it said something since it was last focused (`unread`).
149
149
  - **Interrupting.** `interrupt(id)` is the terminal's ctrl+c for a host's key or button: it stops what that chat is doing - its turn, a skill or a tool in it, a `!` command, a compaction - and nothing in the other chats (`stopped`). A skill stopped keeps its run, to be continued. A question of the chat's open in the host's dialogs when its turn is stopped is over - declined - and its dialog's `signal` aborted, for the host to close it. A chat doing nothing ends the session, every chat with it, as `dispose` does (`ended`): turri never exits the host's process, so the host closes what showed it. An interrupt straight after one that stopped something is `ignored`, so pressing twice to be sure ends nothing. `session.abort()` is the chat's turn alone, and never ends the session.
150
150
  - **Declining a question.** `decline(id)` is ctrl+c at a question in turri's terminal: the question the chat asks now - its ask_user, a skill's interview, a review gate's escalation, whatever goes through the host's dialogs - declined. The asker is told "The user declined to answer the question." and the turn goes on; a review gate declined stands. It declines each question it is called at, however many in a row, and never stops the turn - that is `interrupt`. `none` when the chat asks nothing now, `missing` for a chat not open. A dialog that resolves with `undefined` is something else - dismissed, and in a question of several answers "done" with the boxes ticked so far.
151
151
  - **The record.** The chats are recorded in `.turri/chats.json` as the terminal records them, and `restore: true` reopens the last ended session's - without it, a host starts with none and deletes nothing. A chat closed is deleted; a session's chats are kept until five newer sessions have recorded theirs.
152
152
  - **The jobs.** The host is told of each job as it changes, and has the registry and the loop themselves, so it shows the very jobs the chats run. Its buttons are best a chat's commands - `session.prompt("/regenerate app.plain")`, `session.prompt("/conform app.plain app:add-task")` - so the plan is the chats', and no model turn stands between the button and the pulse. A job's \*\*\*plain diff is `job.diff`, and `job.diffWhere` places its lines in the `.plain` files: by a line's place in the diff, its `file`, its `line` there, the `section` it is in and `written` - the line as the file has it. The diff is \*\*\*plain as read, a link `[text](path)` in it as `` `[resource]text` ``, so a host that finds the lines again in a file's text - after an edit since the pulse started - matches them by `written`, never by the diff's text. A `job.diff` in a ledger written before `written` was added has none. `job.cases` is the functional specs the pulse covers, as planned, by what it does to each - `{ add, patch, again, delete }`, each a list of `{ module, funcId }`, `module` the pulse's own or one below it: new, changed, regenerated again with its text unchanged, taken out. A host lights those specs from it, and marks a line of the diff as regenerated again from `again` - never from the diff, where such a line is unchanged. A pulse of none is mechanical - reqs, or definitions none uses; a job that is not a pulse has no `cases`. The ledger's `job.queued` carries them too. `job.building` is the one functional spec a job is on now, when it is on one: `{ spec: { module, funcId }, label, text, since }` - `spec` the functional spec as data, `label` and `text` what the terminal shows (`core:add-task, functional spec of 3`, its text with its scenarios). Only a conformance run of one named functional spec sets it; a pulse the work loop plans covers its functional specs together and leaves it unset - light those from `cases`.
153
153
  - **The questions.** `dialogs(chat)` gives a chat's two dialogs: `select(title, options, context, at, { signal })` and `input(title, context, { signal })`, each resolving with the answer, or undefined when the person dismissed it. `signal` is aborted when the question is over without the dialog's answer - declined by `decline`, or its turn stopped (`interrupt`, `session.abort()`): the host closes the dialog it opened for it, whatever it resolves with then being ignored. A host may leave it unread. The chat's questions, a skill's interview and a review gate's escalation are put in them; without them, in the `uiContext`'s own dialogs.
154
- - **The surface.** What turri tells the model of where the person watches the work is the terminal's by default: regen, the side panel on `ctrl+h`, `/pulses`. In a host none of that is there, and the model would send the person to keys and panels that do not exist. `surface` is the host's own description of its UI - the views it has in place of the terminal's, what its marks and buttons mean, where questions appear - in its own words. Given, turri leaves every terminal instruction out of what the model is told and puts the surface in turri's identity, as a `<surface>` block, where the identity speaks of regen. It reaches the side questions and the tools' own words too: a pulse not found says the `pulses` tool lists them, not `/pulses`. Text only the person sees in the terminal - the job panel, the side panel - is the terminal's and stays as it is. Without `surface`, the prompt is the terminal's, byte for byte. What the conversation is to do once something is released belongs there too - open it in the host's preview, say what to test: with `sentinel: false`, after a pulse released under `release-after-pulse`, the conversation does what it was told to do once something is released. With the sentinel on, the sentinel tests the release, and the conversation only says it landed.
154
+ - **The surface.** What turri tells the model of where the person watches the work is the terminal's by default: regen, the side panel on `ctrl+h`, `/pulses`. In a host none of that is there, and the model would send the person to keys and panels that do not exist. `surface` is the host's own description of its UI - the views it has in place of the terminal's, what its marks and buttons mean, where questions appear - in its own words. Given, turri leaves every terminal instruction out of what the model is told and puts the surface in turri's identity, as a `<surface>` block, where the identity speaks of regen. It reaches the side questions and the tools' own words too: a pulse not found says the `pulses` tool lists them, not `/pulses`. Text only the person sees in the terminal - the job panel, the side panel - is the terminal's and stays as it is. Without `surface`, the prompt is the terminal's, byte for byte. What the conversation is to do once something is launched belongs there too - open it in the host's preview, say what to test: it is told once each launch it asked for ends, and - with `sentinel: false` - each launch after a pulse under `launch-after-pulse`, and does then what it was told to do once something is launched. With the sentinel on, the sentinel tests what is launched after a pulse, and the conversation only says it landed. With `sentinel: false`, the chat that asked for a pulse that lands under `launch-after-pulse` is told as it lands that its commit is being launched in the background - to say so in a line and offer nothing else - and then told the launch's end. Every launch, as it is asked for, starts and ends, comes to the host as `onLaunch(launch)` - its codebase, commit, status and summary. One whose code runs already - the chat asking for what runs, a pulse that landed only tests - comes once, `status: "launched"` with `already: true`, its own cause and the commit it was asked for; the launch that started what runs is not told again. One that ended with a newer launch of its codebase waiting comes with its real status and `replacedBy`, the newer one's id: that one starts at once and stops what it started, so draw it as replaced rather than as running - the chat that asked for it is told so, and hears the newer one's end instead, as for one `superseded` as it waited (`supersededBy`). What a launch started, halted on request (`/halt launched`, the `halt` tool) with nothing of it left running, comes again as `status: "stopped"`, "Stopped on request.": nothing of the codebase is launched from then on, and its next launch launches anew. A launch that said a server runs is `launched` only while one it started itself runs: something else answering at its port - a server an earlier session left, another program - makes it `failed`, its summary saying what holds the port. What an earlier turri's launches left running - a host that quit without `dispose`, a turri killed outright - is stopped as the session starts and before each launch of its codebase, and the next launch's `summary` begins with what was stopped (see [what an earlier session left running](launch.md#what-an-earlier-session-left-running)).
155
+ - **The banner.** The first chat's session starts with turri's banner, an entry `customType: "turri_banner"`. Its `data.config` is what turri says of the project's config files, a line each - `{ kind, file, text }`, `text` as the terminal shows it: `renamed`, a key turri renamed in the file itself, its value kept (`release-after-pulse` to `launch-after-pulse`) - information, nothing to do; `old-beside-new`, a file that sets an old name beside its new one, the old doing nothing - take it out; `unknown`, keys turri does not read - a setting it no longer has, a misspelt one. Draw `renamed` as information, the others as warnings, by `kind`, never by the words. `ConfigLine` and `ConfigLineKind` are exported.
155
156
  - **The system prompt.** `systemPrompt(prompt)` gets the whole system prompt for the turn - [pi](https://pi.dev)'s, turri's identity and blocks, the rules - after turri's own `before_agent_start` work, and returns what is sent. It is for what `surface` does not cover; to describe the UI, use `surface`, rather than words appended after turri's that contradict them.
156
157
  - **The mode.** Each chat is bound in [pi](https://pi.dev)'s `tui` mode: the work runs in the background and keeps the chat free, as the terminal does. Its other UI calls - its notices, its working line, a confirm - come to `uiContext(chat)`, as [pi](https://pi.dev)'s [SDK](https://github.com/earendil-works/pi) describes it.
157
158
 
158
159
  ### Conformance tests
159
160
 
160
- Conformance tests are on only with `conformance-tests: true` ([config](config.md#conformance-tests)) - off when unset: then no conformance pulse runs, and the chats' `conform` is refused - turning them on is the person's decision; `conformance-tests` is one of `configSettings()`, and `settingChoices("conformance-tests")` gives `true` and `false`. To turn them on from the host's own button, the session's `turnOnConformanceTests(plainFile?)` does what `/conform` does before it tests, with no model call: it writes `conformance-tests: true` where the module's value comes from - its stack's `config.turri.<stack>.yaml` when that sets the key, which `/turri-config` alone would not change, else `config.turri.yaml` - the chats' `conform` no longer refused, and returns the file it wrote, from the project. `plainFile`, absolute or from the project, picks the module; omitted, the project's. It starts no conformance pulse: the host offers that itself, with `/conform`. With them on, the chats write scenarios for a functional spec they judge needs them, as a \*\*\*plain change like any other - its test plain file, `<test-dir>/<module>/<func-id>.plain` - which the work loop then tests.
161
+ Conformance tests are on only with `conformance-tests: true` ([config](config.md#conformance-tests)) - off when unset: then no conformance pulse runs, and the chats' `conform` is refused - turning them on is the person's decision; `conformance-tests` is one of `configSettings()`, and `settingChoices("conformance-tests")` gives `true` and `false`. To turn them on from the host's own button, the session's `turnOnConformanceTests(plainFile?)` does what `/conform` does before it tests, with no model call: it writes `conformance-tests: true` where the module's value comes from - its own `config.turri.<module>.yaml`, or a required module's, when that sets the key, which `/settings` alone would not change, else `config.turri.yaml` - the chats' `conform` no longer refused, and returns the file it wrote, from the project. `plainFile`, absolute or from the project, picks the module; omitted, the project's. It starts no conformance pulse: the host offers that itself, with `/conform`. With them on, the chats write scenarios for a functional spec they judge needs them, as a \*\*\*plain change like any other - its test plain file, `<test-dir>/<module>/<func-id>.plain` - which the work loop then tests.
161
162
 
162
163
  A host's chats run the [background skills](skills-and-gates.md) in the background, as the terminal's do - the two that write the testing scripts: `cultivate` returns at once, and nothing of the run shows while it runs. Its result's `details` say what it started: `{ background: true, kind?, plainFile? }` - `kind` the testing script it writes, `unit` or `conformance`, and `plainFile` the module it is for, relative to the project, each left out when there is none; `started: false` too when the skill was running already and nothing new was started - enough to show "writing the unit testing script for hello.plain, in the background" with no table of which skill writes which. Its end goes to the chat that started it, once that chat is idle: a run that did its work as an entry of its session, `turri_skill_run` (`data.text`, the line - `Unit testing script written: test_scripts/run_unittests_python.sh.`), that starts no turn; one that did not as a hidden message to its agent, `customType: "turri_skill_run"` (`details.skills`), that starts a turn in which the chat tells the person what went wrong, its `details` `{ skills, runs }` - `runs` one `{ skill, kind?, plainFile? }` for each run in it, for a turn marked "unit testing script not written · hello.plain". Meanwhile a module that lacks the script waits for it, its `why` in `mapPlan()` and `status()` `waiting for its unit testing script, which is being written` - or its conformance testing script - and starts by itself once it is written. `onPlanChange` fires as it starts waiting and as it stops - the script written, or the run ended without it - as it does whenever a module's `why` changes.
163
164
 
@@ -171,17 +172,17 @@ The [sentinel](sentinel.md) is one of the host's chats: turri opens it with the
171
172
 
172
173
  - **Notices.** What it finds wrong comes as `onNotice(notice)`: `{ id, chat, severity: "error" | "warning" | "info", summary, evidence: string[], actions: [{ label, task }], module?, pulse?, job?, ignorable?, state: "open" }`. Draw it in the chat `chat` names - the one `focus` last named, or, while that is the sentinel, the chat that asked for the pulse. It is drawn there as a card in the transcript too. A host given `onNotice` answers it itself - the terminal's dialog is not opened - with `answer(id, …)`: `{ action: index | label }` starts that chat's agent on the action's task, `{ steer: text }` on the person's words, `{ dismiss: true }` on nothing, this once. A notice with `ignorable: true` - a gap in the \*\*\*plain the build settled with an assumption, which the person may leave as it is - takes `{ ignore: true }` too: offer it as its own button beside the actions. Nothing is done in the chat, the notice ends `state: "ignored"` (`"ignored"`), and turri writes it to the sentinel's guidance, so it is not raised again in this session or the next; on a notice without `ignorable`, `{ ignore: true }` is `"refused"` and the notice stays open. `onNoticeOver(notice)` comes as it is answered - and when a newer notice about its module supersedes it (`state: "superseded"`) - for the host to take the card down. `notices()` lists the open ones.
173
174
  - **Fixes it made.** The sentinel fixes the project's testing scripts and their config itself ([what it may do](sentinel.md#what-it-may-do)), and says so as a notice with `kind: "fixed"`, `severity: "info"`, no actions, the lines before and after in `evidence`: a note, with nothing to answer. Draw it as one - its card with a way to put it away (`answer(id, { dismiss: true })`), no "say what to do instead". It never supersedes a notice about its module. The terminal draws its card and puts no dialog.
174
- - **The machine is the person's.** turri installs nothing and changes no setting of the machine's or the person's shell, in any chat, the sentinel's included - and through a host's tools as through its own: a tool call whose input has a `command` string - a host's `terminal_run` - is refused when the command would (`machineChange`), with what to do instead (`machineChangeReason`), as turri's own `bash` is; and the sentinel's, also when it writes a `.plain` file. A tool that types into what already runs - a terminal's `terminal_type` at a shell prompt - is the host's to check: `machineChange(text)` says whether a line would change the machine, and why.
175
- - **Starting it.** Under `sentinel: ask` - as it is unset - the person is asked before it first opens in the session: a notice with `kind: "sentinel-start"`, `severity: "info"`, in the chat `chat` names, its `summary` the question in one sentence, no `evidence`, and its actions the answers - `Start the sentinel`, `Start it, and don't ask again`, `Not this session`, `Turn it off for this project`. Draw it as a question rather than as something wrong. `answer(id, { action })` answers it, by index or label - `"done"` - and `{ dismiss: true }` is not this session; turri writes `sentinel:` itself for the two that choose for the project. Until it is answered, the pulses that finish are held: neither the sentinel nor the chat hears of them. A host that offers the setting too writes it as `/turri-config` does - `ask`, `true` or `false` (see `configSettings`).
176
- - **Conclusions.** As the sentinel is done with each pulse - all well or not - `onConcluded({ job, verdict: "holds" | "wrong", summary, module, pulse, chat })` comes, and the chat `chat` names - the one `focus` last named, as for a notice - shows it and its agent says so in a line.
175
+ - **The machine is the person's.** turri installs nothing and changes no setting of the machine's or the person's shell, in any chat, the sentinel's included - and through a host's tools as through its own: a tool call whose input has a `command` string - a host's `terminal_run` - is refused when the command would (`machineChange`), with what to do instead (`machineChangeReason`), as turri's own `bash` is; and the sentinel's, also when it writes a `.plain` file, or starts or runs the code in `plain_modules` - what nobody launched: it tests what is launched. A tool that types into what already runs - a terminal's `terminal_type` at a shell prompt - is the host's to check: `machineChange(text)` says whether a line would change the machine, and why.
176
+ - **Starting it.** Under `sentinel: ask` - as it is unset - the person is asked before it first opens in the session: a notice with `kind: "sentinel-start"`, `severity: "info"`, in the chat `chat` names, its `summary` the question in one sentence, no `evidence`, and its actions the answers - `Start the sentinel`, `Start it, and don't ask again`, `Not this session`, `Turn it off for this project`. Draw it as a question rather than as something wrong. `answer(id, { action })` answers it, by index or label - `"done"` - and `{ dismiss: true }` is not this session; turri writes `sentinel:` itself for the two that choose for the project. Until it is answered, the pulses that finish are held: neither the sentinel nor the chat hears of them. A host that offers the setting too writes it as `/settings` does - `ask`, `true` or `false` (see `configSettings`).
177
+ - **Conclusions.** As the sentinel is done with each pulse - all well or not - `onConcluded({ job, verdict: "holds" | "wrong", summary, module, pulse, chat })` comes, and the chat `chat` names - the one `focus` last named, as for a notice - shows it and its agent says so in a line. A pulse turri cannot brief it on - what runs cannot hold the pulse's commit, turri's own error - ends `verdict: "unchecked"`, with an error shown in that chat as well.
177
178
  - **A host that shows them itself.** With the sentinel on, the chat the person is in is told of each pulse that lands - to say it landed and what the sentinel does with it - and of each conclusion, each in a turn of its own: its agent says it in the conversation, as the terminal has it. A host that shows both itself - its own notifications, from `onJobChange` and `onConcluded` - passes `pulseEndsShown: true`, and the chat then says neither. Both still reach it - `customType: "turri_job_landed"` and `"turri_sentinel_concluded"`, hidden - put in its conversation in order and starting no turn: its agent has them in its next turn, and knows what landed and what the sentinel found when the person asks. Their words say what happened, and ask nothing of it. The rest is as it was: the sentinel's briefs and checks, its notices, a pulse that stopped on \*\*\*plain that contradicts itself (a notice of turri's own), `onConcluded` itself - and, with the sentinel off, the turn in the chat that asked for a pulse, which does what the project's guidance says once a pulse finishes.
178
- - **Checks.** `check({ module, funcIds })` asks the sentinel to test functional specs of one module - the person picked them on a list of its built ones, say - in the background, on its own judgement, reported as a pulse is. `module` is the module whose release is checked, by name; `funcIds` the functional specs to test, each `module:func-id` - of that module, or of any module its requires chain builds on, whose code its release holds: `check({ module: "predators", funcIds: ["depths:gene-fragments"] })`. A bare func-id is the module's own. The check and its brief name each as `module:func-id`. It returns `{ check: id }` at once, or `{ refused: why }`, saying which: the sentinel off (`sentinel: false`), or not started this session; a module not in the project's folder, an import module, one that does not parse; a name outside its chain - `Not in predators' release: arena:waves - arena is not predators or a module its requires chain builds on (depths, ocean).`; a func-id its module does not have; one not built in the module's own codebase as its \*\*\*plain has it now - with where the module's code is built on instead, when it is. What is tested is the module's release - its own codebase's last commit, which holds the code of every module its requires chain builds on - never what a pulse is writing, and never another module's: turri does not choose one for it. Under `sentinel: ask`, a check asked before the sentinel was started puts the start question first, as a pulse does - `check` set on the notice - and waits for the answer.
179
+ - **Checks.** `check({ module, funcIds })` asks the sentinel to test functional specs of one module - the person picked them on a list of its built ones, say - in the background, on its own judgement, reported as a pulse is. `module` is the module whose launch is checked, by name; `funcIds` the functional specs to test, each `module:func-id` - of that module, or of any module its requires chain builds on, whose code its codebase holds: `check({ module: "predators", funcIds: ["depths:gene-fragments"] })`. A bare func-id is the module's own. The check and its brief name each as `module:func-id`. It returns `{ check: id }` at once, or `{ refused: why }`, saying which: the sentinel off (`sentinel: false`), or not started this session; a module not in the project's folder, an import module, one that does not parse; a name outside its chain - `Not in predators' codebase: arena:waves - arena is not predators or a module its requires chain builds on (depths, ocean).`; a func-id its module does not have; one not built in the module's own codebase as its \*\*\*plain has it now - with where the module's code is built on instead, when it is. What is tested is what is launched of the module - its own codebase's code, which holds the code of every module its requires chain builds on - never what a pulse is writing, and never another module's: turri does not choose one for it. Under `sentinel: ask`, a check asked before the sentinel was started puts the start question first, as a pulse does - `check` set on the notice - and waits for the answer.
179
180
  - **Queued with the pulses.** It waits its turn behind the sentinel's work, and is taken in a conversation of its own: `onChatSession`, then the conversation's first message, the hidden brief of the check - `customType: "turri_sentinel_check"`, `details: { checkId, module, funcIds }`. A pulse of its module that lands meanwhile waits for it, rather than stopping it.
180
- - **Released first.** When what runs of the module is its last commit - released since it landed, and nothing it started has ended - it is used as it is. Otherwise the module is released as release-after-pulse releases it - its release guidance followed, or its last commit put in `dist/<module>` and started - before the sentinel is told; the brief says what runs and where, as a pulse's does, and gives each functional spec's text and scenarios, as turri reads them, to test those and not the module's others.
181
- - **Reported as a pulse is.** Its notices come as `onNotice`, with `check` - its id - and its module. It ends with `onConcluded({ check, verdict, summary, module, chat })` - `check` in place of `job`, which it has none of. A release that fails ends it there, the sentinel told nothing: `verdict: "wrong"`, the summary saying why. A check that never runs - the person did not start the sentinel when asked, it could not be opened, it was closed before it got to it - ends `verdict: "unchecked"`, which the sentinel itself never gives. The ledger has `sentinel.asked` as it is asked for, and `sentinel.checking` and `sentinel.concluded` with `check`.
181
+ - **In what is launched.** The sentinel launches nothing. Once the module's launches are settled - nothing launching, nothing waiting to - it is told what runs and where, as for a pulse, and each functional spec's text and scenarios, as turri reads them, to test those and not the module's others. With nothing of the module launched - never, or halted - the check ends unchecked, its summary saying so in the person's words - `Not checked: nothing of app is launched to test it in - ask the chat to try it first, which launches it.` - and with no notice: it is an answer, not an error. When the module's last launch did not come up, the sentinel is told why, and that is its finding.
182
+ - **Reported as a pulse is.** Its notices come as `onNotice`, with `check` - its id - and its module. It ends with `onConcluded({ check, verdict, summary, module, chat })` - `check` in place of `job`, which it has none of. A check that never runs - nothing of the module launched, the person did not start the sentinel when asked, it could not be opened, it was closed before it got to it - ends `verdict: "unchecked"`, the summary saying why, which the sentinel itself never gives. The ledger has `sentinel.asked` as it is asked for, and `sentinel.checking` and `sentinel.concluded` with `check`.
182
183
  - **Its model.** The `sentinel` role in `models:`, else the chat's model - `models.chat`, else `harness-model` - with its thinking, set as its chat opens: not pi's default model, which may not be one the project's provider has. What the person then picks in its chat stands. See [its model](sentinel.md#its-model).
183
- - **Its tools.** `sentinel: { tools }` are [pi](https://pi.dev) tool definitions registered in the sentinel's chat alone and told to it in its prompt - the host's browser, say, for it to test a release with. The rest of the host's `extensions` are built into its chat too, but their tools are refused it: only its own read, and these.
184
- - **Its surface.** `sentinel: { surface }` is where the person watches the sentinel use those tools, in the host's own words - the preview pane its browser and terminal show in, say. Given, the sentinel's prompt has it, as a `<surface>` block, in place of the person not watching it: it tries a release with the host's tools, where the person can watch, and keeps its own shell for what those cannot show - logs, exit codes, files. Without it, the person does not watch the sentinel, and the host's tools are only to test with as well. As for the conversation, `systemPrompt` has the last word on its prompt.
184
+ - **Its tools.** `sentinel: { tools }` are [pi](https://pi.dev) tool definitions registered in the sentinel's chat alone and told to it in its prompt - the host's browser, say, for it to test what is launched with. The rest of the host's `extensions` are built into its chat too, but their tools are refused it: only its own read, and these.
185
+ - **Its surface.** `sentinel: { surface }` is where the person watches the sentinel use those tools, in the host's own words - the preview pane its browser and terminal show in, say. Given, the sentinel's prompt has it, as a `<surface>` block, in place of the person not watching it: it tries what is launched with the host's tools, where the person can watch, and keeps its own shell for what those cannot show - logs, exit codes, files. Without it, the person does not watch the sentinel, and the host's tools are only to test with as well. As for the conversation, `systemPrompt` has the last word on its prompt.
185
186
  - **Its surface.** What it is told is its own prompt, not the conversation's: the host's `surface` is not in it; `systemPrompt` still has the last word.
186
187
 
187
188
  A surface for a desktop app might read:
@@ -194,7 +195,7 @@ the chat, and the toolbar's buttons send them too.
194
195
  - The Pulses view lists every pulse - running, planned and finished. A row opens what its agents did and its log; its
195
196
  Halt button stops it.
196
197
  - Your questions appear as cards above the message box: the person picks an option or types an answer there.
197
- - The Run button releases what is built and opens it.`;
198
+ - The Run button launches what is built and opens it.`;
198
199
  ```
199
200
 
200
201
  ## \*\*\*plain for a host