@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/launch.md ADDED
@@ -0,0 +1,67 @@
1
+ # Trying what is built: launch
2
+
3
+ Ask to try it - "let me try it", "run the app" - at any time, even while a regeneration is running. The chat calls `launch`, and it returns at once: in the background, the module's code, as one of its commits has it, goes in `dist/<module>` in the project, and an agent starts it on your machine. The chat is told how it went once it ends - an app with a backend and a frontend started whole, and where to open your browser; for a command-line tool or a library, a few commands to paste, run from `dist/<module>`, and what they print.
4
+
5
+ With `launch-after-pulse: true`, turri launches what every pulse lands itself - see [after every pulse](#after-every-pulse).
6
+
7
+ ## The launch track
8
+
9
+ Every launch goes through the session's launch track, one codebase at a time:
10
+
11
+ - **One at a time.** A codebase has one launch running at most. A launch is never stopped for a newer one: it finishes, and then the newest is launched.
12
+ - **The newest wins.** While one runs, a newer commit asked for waits as the next - and replaces any older one waiting there, which is never launched (`superseded`). Its code is in the newer one: code accumulates commit by commit. A launch that ends with a newer one waiting is replaced too (`replacedBy`): the newer one starts at once and stops what it started - unless its code is out already. Whoever asked for either is told that a newer launch takes its place, and then where that one runs, or why it did not come up, once it ends - never that the one it asked for is up, only for it to be stopped the next moment.
13
+ - **Nothing waits on it.** A launch is not a pulse. It holds no lane and takes no `parallel-jobs` slot: the next pulse starts while it runs, and the person goes on talking.
14
+ - **Out already.** When what runs is a commit's code already - the same code, and nothing it started has ended - it does nothing, and says so: nothing exported, nothing stopped, what runs left running. It still ends as a launch of its own, at once - `already`, its own cause, the commit asked for - and when that commit is built on what runs, what runs holds it from then on; the launch that started what runs is left as it was. A pulse that landed only conformance tests is out already. Guidance passed again does not launch it anew - the agent found the project's guidance itself; `again: true` launches it anyway, for when the last launch did not leave it as you need it - guidance that says to launch it some other way, say.
15
+
16
+ What each launch is - its codebase, its commit, whether it came up, what it started - is recorded, and the [sentinel](sentinel.md) tests a pulse only in a launch whose commit holds the pulse's.
17
+
18
+ ## When the project says how it is launched
19
+
20
+ Every launch starts the same way: the commit's code goes in `dist/<module>`, as below. Not everything is tried from there, though. An integration that a host application loads goes on into the host's own tree, with the host's own scripts, and then the host is started. So the agent asks itself whether there is guidance for how this project is launched - in what you said (the chat passes it to `launch` whole), the project's AGENTS.md, a skill - and:
21
+
22
+ - **There is guidance.** The code goes on from `dist/<module>` as the guidance says, on your machine, from the host codebase - the git repository the project is in, or else where turri runs: the scripts it names, in their order, and any change it says the host needs. The code is taken from `dist`, never from `plain_modules`, where the next pulse may be writing; where the host's tooling reads `plain_modules` itself, the agent points it at `dist`, or does by hand from `dist` what it does. The rules below hold as they do for `dist`: the agent runs the project's scripts and installs what they need itself, and what keeps running - a start script, a server - is started with `activate`, from the host codebase. Nothing built is changed, and nor is the \*\*\*plain: its file tools refuse a `.plain` file - a module or a test plain file - as they refuse `plain_modules`.
23
+ - **There is none.** The default: it is started from `dist/<module>`, as below, as best it can be.
24
+
25
+ Guidance is whatever says it, in any words - a line in AGENTS.md such as *integrations are launched with `scripts/deploy_integrations.sh`, then the app is started with `scripts/start.sh`*, or the same said in the chat. What was said in the chat is kept for the codebase's launches after it, those after a pulse among them.
26
+
27
+ ## What goes in dist
28
+
29
+ - **The module on top.** Code accumulates up a `requires` chain: a module starts from a copy of the code of the one it requires. So a launch takes the module on top of the `requires` chain - the project's `module` from `config.turri.yaml` unless another module's \*\*\*plain is named. Before the module on top has anything built, it takes the nearest one below it that has, and says so.
30
+ - **A commit, whole.** Each `plain_modules/<module>` is a git repository (`.plaingit`), and every unit of work starts from a commit and ends with one. A launch after a pulse takes the commit the pulse landed; one the chat asks for, the codebase's last. What a pulse is writing right now is half-done, so it is left out: the launch exports the commit - `git archive` of `code/` - which is the code with every uncommitted change put back, and no `node_modules`, `.venv`, `target` or other build leftovers, whatever the stack. The working tree the next pulse is using is never read, reset or touched. The harness's own files - `.turri.json`, the agents' notes - are left out too.
31
+ - **Replaced whole.** Each launch stops what the last one of the codebase started, empties `dist/<module>` and exports again. Change nothing there you want to keep. `dist/` is not added to `.gitignore`: whether it is committed is yours to decide.
32
+
33
+ ## Starting it
34
+
35
+ It runs on your machine, outside the [sandbox](sandbox.md) - with your toolchains, where your browser can reach it. The launch agent - on the codebase's coding model, thinking low: it follows steps, and a small model does that well - reads how the code runs (its README, manifests and entry points), then:
36
+
37
+ 1. **Checks the toolchains** it needs (`node`, `python3`, `go`, ...) - under another name too: `python` where `python3` is not, of the version it needs. One is missing: it stops, and says the exact command to install it yourself (`brew install node`). turri installs nothing on your machine and changes none of its settings - not a launch, not the chat, not any agent: its shell refuses it.
38
+ 2. **Installs what it needs into the project.** Dependencies into a virtual environment or `node_modules`, a build that downloads packages, an image pull, a guided launch's project scripts: it runs them in its own shell, as any agent with a shell would, and fixes what fails. Nothing is put to you - there is no dialog to answer. Never a global install, never a system setting.
39
+ 3. **Starts what serves** with `activate`: in the background, in its own process group, its output in `.turri/launch/<module>-<name>.log`. It waits until something answers at the server's URL - up to a minute - so the URL you are given has answered once; one that exits first comes back with the end of its output. A port something else holds is said, with what holds it, and nothing is started there: the app is not moved to a port you were not told about. It runs in `dist/<module>`, or a folder inside it the agent names (`frontend`) - or, with guidance, in the host codebase; a folder that is not there starts nothing, and the agent is told so with what the folder holds, to name the right one.
40
+ 4. **Says how it went** with `submit_launch`: launched or not, whether it serves - a backend or a frontend, against a CLI or a library tried from its folder - and in a line or three where it runs, or why it did not come up. The chat is told that, not the agent's prose. turri checks it rather than trusting it: a launch that says it serves - or names a URL - is launched only while something it started with `activate` still runs. Something else answering at its port - an earlier build left running, another program - is not this launch: `submit_launch` refuses it, and a launch that ends that way is `failed`, saying what holds the port.
41
+
42
+ `activate` and `submit_launch` are the launch agent's alone: the chat has `launch`, and nothing else of it. What a launch started is listed by the `pulses` tool and by **`/halt`**, with the launches under way and waiting, and stopped by **`/halt launched <name>`** (one server), **`/halt launched <module>`** (the module's launch under way, the one waiting, and what it started), by `halt` with `launched`, by the next launch of the codebase, and when turri exits. Halted, a launch that has nothing left running is `stopped` - "Stopped on request." - a host hears it, the sentinel has nothing of it to test, and the next launch of the codebase launches anew, never out already.
43
+
44
+ ### What an earlier session left running
45
+
46
+ What a launch starts is written down as it starts - `.turri/launch/running/<pid>.json`: its process, its process group, its codebase, its command, folder and URL, and the turri that started it - and taken out as it ends. A turri that is killed outright stops nothing it started, and a server it left would hold its port in the next session, answering with old code. So as a session starts, and again before each launch of a codebase, turri stops what those records name whose turri has ended - its process group, politely and then not, as it stops its own - and says so in the ledger (`launch.left-behind`) and at the head of the summary of the codebase's next launch: `Stopped what an earlier turri session left running of shorty: backend (pid 66816, http://127.0.0.1:8000).` It stops only a process its records name, and only while it is still the one recorded - started when the record says; a pid given to another process since is left alone, its record taken out. What another turri still running started is that turri's.
47
+
48
+ ## After every pulse
49
+
50
+ With `launch-after-pulse: true` in `config.turri.yaml`, turri launches what each pulse lands itself, on the launch track: the pulse ends as it lands - once its line in the notes is committed with it - and its commit is asked for as the codebase's next launch. The codebase's next pulse starts at once; nothing waits on the launch, and the chat - waiting on your answer to a question, say - has no part in it.
51
+
52
+ The launch agent finds the guidance as for any launch: what the chat passed to `launch` earlier for the codebase, the project's AGENTS.md and its skills. The setting is the word to launch; the guidance says only how - without any, the code goes to `dist/<module>` and is started from there.
53
+
54
+ - **With the [sentinel](sentinel.md) on** - the default - the chat you are in is told that the pulse landed, is being launched in the background, and that the sentinel tests it once it is up; the sentinel is told the pulse once what runs holds its commit, and tests it there. A launch that did not come up is told to it, and is a finding of its own like any other. A host hears every launch as it is asked for, starts and ends (`onLaunch`) - one out already once, as launched.
55
+ - **With `sentinel: false`**, the chat that asked for the pulse - or the one shown - is told as the pulse lands that its commit is being launched in the background, and says so in a line, offering nothing else for it. It is told again once the launch ends, as a turn of its own: where it runs, or why it did not come up - unless a newer launch replaced it, whose end is told instead. It then does what it was told to do once something is launched - a host such as a desktop app tells it, in its `surface`, to open it where the person can watch and say what to test.
56
+
57
+ Off without the key: launching after a pulse is then the chat's, when its guidance says so. `turri init-config` writes `launch-after-pulse: true`.
58
+
59
+ ## On the command line
60
+
61
+ ```bash
62
+ turri launch [file.plain] [--in-module <module>] [--guidance <text>] [--model <provider/id>]
63
+ ```
64
+
65
+ The same, without the chat: one launch of the codebase's last commit, the agent on `coding-model`, thinking low (or `--model`; without either, [pi](https://pi.dev)'s default), given the project's AGENTS.md and what `--guidance <text>` says. It stays in the foreground with the servers' output; `Ctrl-C` stops them. If it does not get there, launch from the chat instead.
66
+
67
+ `turri regenerate` and `conform` end a build that landed with `To try it: turri launch <spec>`.
package/docs/parser.md CHANGED
@@ -65,7 +65,7 @@ turri parse . # every .plain module in a directory
65
65
  turri parse <file.plain> --json
66
66
  ```
67
67
 
68
- It uses this repo's own parser, so it needs no external tool, no API key and no credits: it parses each module with its test plain files, resolves its imports and required modules, and reports every syntax, concept and structure error with the line it is on. A module that passes lists each functional spec with its test plain file and its scenarios - and, where they have scenarios but the module has no test reqs, or no conformance testing script for its stack, a `WARN` line naming the next step ([the steps of adding tests](regenerating.md#the-steps-of-adding-tests)): a warning, never a failure:
68
+ It uses this repo's own parser, so it needs no external tool, no API key and no credits: it parses each module with its test plain files, resolves its imports and required modules, and reports every syntax, concept and structure error with the line it is on. A module that passes lists each functional spec with its test plain file and its scenarios - and, where they have scenarios but the module has no test reqs, or no conformance testing script, a `WARN` line naming the next step ([the steps of adding tests](regenerating.md#the-steps-of-adding-tests)): a warning, never a failure:
69
69
 
70
70
  ```
71
71
  PASS todo.plain 3 functional specs, requires base
@@ -86,7 +86,7 @@ FAIL tests/ 2 test plain files outside a module's folder
86
86
  tests/todos/x.plain - no module todos; module: todo is in tests/todo/
87
87
  ```
88
88
 
89
- A test plain file, or a test folder, is never taken for a module: `parse` - and `regenerate`, `conform`, `pulses`, `drift`, `release`, `/regenerate` and the commands - refuse one, naming its module (`\`tests/todo/add-task.plain\` is a test plain file of \`todo\`; name \`todo.plain\`, or \`todo:add-task\` for that one functional spec`).
89
+ A test plain file, or a test folder, is never taken for a module: `parse` - and `regenerate`, `conform`, `pulses`, `drift`, `launch`, `/regenerate` and the commands - refuse one, naming its module (`\`tests/todo/add-task.plain\` is a test plain file of \`todo\`; name \`todo.plain\`, or \`todo:add-task\` for that one functional spec`).
90
90
 
91
91
  The exit code is 0 only when every file passed. In a conversation the same check is `parse`; `regenerate` runs it on the module it is given, and regenerates nothing from one that does not pass.
92
92
 
@@ -4,13 +4,13 @@ What happens when \*\*\*plain is turned into code - in which order, by which age
4
4
 
5
5
  ## Where things go
6
6
 
7
- \*\*\*plain is built in its **project**: the nearest folder, from \*\*\*plain's own up, that holds a `config.turri.yaml`, a stack's `config.turri.<stack>.yaml`, the old `config.yaml` or a `plain_modules/` - or, with none, \*\*\*plain's own folder. That is where its `plain_modules/` is, its `config.turri.yaml` read and its testing scripts found, wherever turri was started: a project that keeps its \*\*\*plain in `plain/`, with `plain/config.turri.yaml` and `plain/plain_modules/`, builds `plain/hubspot.plain` in `plain/plain_modules/hubspot/`, named from the folder above. Links in \*\*\*plain are relative to the file they are in.
7
+ \*\*\*plain is built in its **project**: the nearest folder, from \*\*\*plain's own up, that holds a `config.turri.yaml`, a module's `config.turri.<module>.yaml`, the old `config.yaml` or a `plain_modules/` - or, with none, \*\*\*plain's own folder. That is where its `plain_modules/` is, its `config.turri.yaml` read and its testing scripts found, wherever turri was started: a project that keeps its \*\*\*plain in `plain/`, with `plain/config.turri.yaml` and `plain/plain_modules/`, builds `plain/hubspot.plain` in `plain/plain_modules/hubspot/`, named from the folder above. Links in \*\*\*plain are relative to the file they are in.
8
8
 
9
9
  Every path below is in the project. What the person writes:
10
10
 
11
11
  | | |
12
12
  | --- | --- |
13
- | `config.turri.yaml`, `config.turri.<stack>.yaml` | the project config, and each stack's, laid over it while the stack is chosen - see [the project config](config.md) |
13
+ | `config.turri.yaml`, `config.turri.<module>.yaml` | the project config, and a module's own, laid over it for that module and the modules built on it - see [the project config](config.md) |
14
14
  | `test_scripts/run_unittests_<lang>.sh`, `test_scripts/run_conformance_tests_<lang>.sh` | the testing scripts, the only judges of pass or fail - their static checks included, the formatter, linter and type checker - where `config.turri.yaml` names them, else in the project folder, else in `test_scripts/` - see [below](#the-testing-scripts) |
15
15
  | `AGENTS.md` | optional: a section whose heading names the queue steers how the work is cut - see [how the work is cut into jobs](#how-the-work-is-cut-into-jobs) |
16
16
 
@@ -40,16 +40,16 @@ The harness's scratch - each ignores itself, and is never part of a module's his
40
40
  | `.turri/debug/` | each agent's log: its prompt, every tool call and every answer - kept in debug mode only |
41
41
  | `.turri/sessions/` | the agents' saved sessions - in debug mode, and a gated skill's run's |
42
42
  | `.turri/runs/<skill>/` | a gated skill's run: what an interrupted one resumes from, and its gates' evidence |
43
- | `.turri/deploy/` | the output of what `deploy` started |
44
- | `dist/<module>/` | what `deploy` puts out: the module's code as its last commit has it, replaced whole each time - see [deploy](deploy.md) |
43
+ | `.turri/launch/` | the output of what a launch started |
44
+ | `dist/<module>/` | what a launch puts out: the module's code as a commit has it, replaced whole each time - see [launch](launch.md) |
45
45
 
46
46
  ### Parts on different stacks
47
47
 
48
- One project can hold modules that share nothing but a common module - a Python backend and a React frontend side by side, each importing `base`, neither requiring the other. Each stack gets its testing scripts, models and conformance in its own `config.turri.<stack>.yaml`, laid over `config.turri.yaml` for the modules built with it - in the chat, `regenerate` with `stack: backend`, pinned to that module's pulses, or `/stack backend` for the session; `--stack backend` on the command line: see [the project config](config.md#stacks).
48
+ One project can hold modules that share nothing but a common module - a Python backend and a React frontend side by side, each importing `base`, neither requiring the other. Each gets its testing scripts, models and conformance in a file of its own, `config.turri.<module>.yaml`, laid over `config.turri.yaml` for that module and every module built on it that has no file of its own - worked out from the module, never chosen, and pinned to each pulse: see [a module's own config](config.md#a-modules-own-config).
49
49
 
50
50
  ### The base folder
51
51
 
52
- A codebase that requires no other module starts empty - unless `base-folder:` in [the config](config.md) names a folder, by path from the project root, that it starts from instead: an existing codebase to build on, files the code is to use - images, animations, fonts - or both. A stack's `config.turri.<stack>.yaml` can name its own.
52
+ A codebase that requires no other module starts empty - unless `base-folder:` in [the config](config.md) names a folder, by path from the project root, that it starts from instead: an existing codebase to build on, files the code is to use - images, animations, fonts - or both. A module's `config.turri.<module>.yaml` can name its own.
53
53
 
54
54
  - **Copied once.** Before the codebase's first pulse, the folder's files are copied into `plain_modules/<module>/code` and committed - `start from the base folder <folder>` - and what was copied is recorded beside the code record, `code/.turri-base.json`. From a git repo, what git sees is copied - tracked files, and untracked ones it does not ignore - so no dependencies or build output; from any other folder, every file but `.git` and installed dependencies. The folder itself is never written to.
55
55
  - **Up the chain with the code.** A module that requires another starts from that one's finished code, as always - whatever its agents did to what came from the base folder - and the record comes with it.
@@ -158,7 +158,7 @@ Every time a review sends tests back, the agent that fixes them also leaves the
158
158
 
159
159
  ### Then
160
160
 
161
- Once the unit tests pass and are reviewed, the job lands: the code record becomes the \*\*\*plain description the job ends on, and a commit is made to the module's history. The conformance tests are not run here: they are the conformance track's, and its job for what this one built runs next, before anything is built on it (see [conformance tests in the work loop](#conformance-tests-in-the-work-loop)). A job that does not pass is undone instead - see [below](#what-the-code-is-built-from). Trying what it built is [deploy](deploy.md)'s, not the job's: on the command line, a run that landed ends with `turri release <spec>`.
161
+ Once the unit tests pass and are reviewed, the job lands: the code record becomes the \*\*\*plain description the job ends on, and a commit is made to the module's history. The conformance tests are not run here: they are the conformance track's, and its job for what this one built runs next, before anything is built on it (see [conformance tests in the work loop](#conformance-tests-in-the-work-loop)). A job that does not pass is undone instead - see [below](#what-the-code-is-built-from). Trying what it built is a [launch](launch.md)'s, not the job's: under `launch-after-pulse` the chat launches what each pulse lands in the background, and on the command line a run that landed ends with `turri launch <spec>`.
162
162
 
163
163
  ## A whole module
164
164
 
@@ -186,7 +186,7 @@ A job that regenerates the whole of a new module's \*\*\*plain is too big to bui
186
186
 
187
187
  Each pulse's title says what it does - at most 10 words and 70 characters, as it heads the pulse where the person watches the work. The grouping agent titles its groups; groups no agent made - the conformance tests', and a grouping that fell back - are titled by a third agent, told what each pulse does: what it builds, or, for the conformance tests, what they test. Without it, or when it fails, a pulse is titled by its functional specs' first lines, cut short. A pulse that makes the whole of an edit in one go - an edit that only changes what is built (a functional spec reworded, a definition or an implementation req changed, none new and none marked to regenerate again), or one no plan of holds together - is titled by the same agent, shown every change, before and after: by what the edit does (`Expired links answer 410 and the stats page goes`), and an edit to definitions or implementation reqs alone by what it changes in what is built (`Links are kept for 30 days`), never by its section. Without it, or when it fails, it is titled by the first line of the first functional spec it changes - else of its first change - and how many more (`Follow-link answers 410 for expired links, and 2 more`). A title names the change, never the act: one that starts with "regenerate" does not hold. Pulses already in the ledger keep the titles they were recorded with.
188
188
 
189
- Changes to what is built - an item edited or taken out, a functional spec built worded differently - go where the same agent places each: with the group of new functional specs it is about, by default - so one edit that adds a functional spec, changes another and takes out a third is one pulse - or first, in a pulse of its own, when it reshapes what the new work is built on (a concept many functional specs use redefined, one others rely on taken out, a large rewrite) or has nothing to do with it. A functional spec changed counts toward its group's `max-specs-per-pulse`; one taken out does not. Every answer is checked: every new functional spec once, in order, next to each other, at most `max-specs-per-pulse`; every change to what is built placed once; every req placed once; every group titled once, within the limit. One that does not hold goes back to its agent, twice at most, and then the plan is a functional spec a job with every req in the first. A group whose functional specs and the definitions they bring pass `max-lines-per-pulse` (120 unset) is split into as few pulses as fit - its functional specs kept together in runs, in order, as long as each run stays within it, `Comments (1 of 2)`, `Comments (2 of 2)` - not a functional spec a job; its reqs do not count, as a split leaves them with its first job whatever happens. The planner runs on the chat's model in a conversation, and on the harness model under `turri regenerate`. No agent reviews its plan: the harness checks it - every change in exactly one job, \*\*\*plain holding together after each, the last ending on \*\*\*plain as it is.
189
+ Changes to what is built - an item edited or taken out, a functional spec built worded differently - go where the same agent places each: with the group of new functional specs it is about, by default - so one edit that adds a functional spec, changes another and takes out a third is one pulse - or first, in a pulse of its own, when it reshapes what the new work is built on (a concept many functional specs use redefined, one others rely on taken out, a large rewrite) or has nothing to do with it - titled by what it changes: `Changes to top-words`, or `Changes to the definitions` when no functional spec is among them. A functional spec changed counts toward its group's `max-specs-per-pulse`; one taken out does not. Every answer is checked: every new functional spec once, in order, next to each other, at most `max-specs-per-pulse`; every change to what is built placed once; every req placed once; every group titled once, within the limit. One that does not hold goes back to its agent, twice at most, and then the plan is a functional spec a job with every req in the first. A group whose functional specs and the definitions they bring pass `max-lines-per-pulse` (120 unset) is split into as few pulses as fit - its functional specs kept together in runs, in order, as long as each run stays within it, `Comments (1 of 2)`, `Comments (2 of 2)` - not a functional spec a job; its reqs do not count, as a split leaves them with its first job whatever happens. The planner runs on the chat's model in a conversation, and on the harness model under `turri regenerate`. No agent reviews its plan: the harness checks it - every change in exactly one job, \*\*\*plain holding together after each, the last ending on \*\*\*plain as it is.
190
190
 
191
191
  Each planned job knows its cases - which functional specs it adds, changes (their text, or a concept they use) and takes out, or none: reqs and definitions only - and the loop says them, with each job's title, where the person looks (`drift`, `pulses`, and what `regenerate` returns).
192
192
 
@@ -194,7 +194,7 @@ Each planned job knows its cases - which functional specs it adds, changes (thei
194
194
 
195
195
  A plan is kept until \*\*\*plain, what it starts from or its steering changes. `steer` alone plans nothing: the next look does - a `regenerate`, a job ending, \*\*\*plain changing. Then the work not running yet is planned again to follow it, a running job going on as it is. Where a plan did not do as asked, it says so, and what `regenerate` returns lists it under "what the plan did not do as asked": each wish an agent did not follow, with why (both tools take a `notes` for that), a grouping or placement that did not hold, with what was wrong, and a group split for its size. The conversation tells the person that, rather than guessing.
196
196
 
197
- **Looking ahead.** What will run can be seen before it does, from the same plan: a look ahead (`WorkLoop.lookAhead` - the chat's `pulses` with a module's `plain_file`, and `turri regenerate --dry-run`) has the session's work loop plan the module as `regenerate` would - the same codebases, its stack pinned, the steering and AGENTS.md's queue section given to the planner - and keep the plans, starting nothing. Its codebases are held for it, apart from a halt: none of their pulses starts when another pulse ends and the loop looks again, and the look ahead writes nothing - a pure rename is not made, the work planned from the code as it would leave it. A codebase whose chain has a pulse running goes on as it was, what follows that pulse planned; a module the person halted stays halted. `regenerate`, `conform` or `/regenerate` lifts the hold, and the first pulse of the kept plan starts as it is, no planner asked again - so the plan seen is the plan run. Until then the plan is kept only while it fits: \*\*\*plain, what it starts from or the steering changed, it is dropped, not made again - only a look ahead plans a held codebase - and the next look ahead or `regenerate` plans it anew. The planned rows say they wait for `regenerate`. A planned row's id (`pulses` with `planned-<module>-1`) gives the next pulse of its codebase's whole prompt, built from the kept plan - and never planned again for it; a later pulse's prompt depends on what the ones before it land, a conformance pulse's on the code once it is built, and a codebase with a pulse running shows none.
197
+ **Looking ahead.** What will run can be seen before it does, from the same plan: a look ahead (`WorkLoop.lookAhead` - the chat's `pulses` with a module's `plain_file`, and `turri regenerate --dry-run`) has the session's work loop plan the module as `regenerate` would - the same codebases, its config pinned, the steering and AGENTS.md's queue section given to the planner - and keep the plans, starting nothing. Its codebases are held for it, apart from a halt: none of their pulses starts when another pulse ends and the loop looks again, and the look ahead writes nothing - a pure rename is not made, the work planned from the code as it would leave it. A codebase whose chain has a pulse running goes on as it was, what follows that pulse planned; a module the person halted stays halted. `regenerate`, `conform` or `/regenerate` lifts the hold, and the first pulse of the kept plan starts as it is, no planner asked again - so the plan seen is the plan run. Until then the plan is kept only while it fits: \*\*\*plain, what it starts from or the steering changed, it is dropped, not made again - only a look ahead plans a held codebase - and the next look ahead or `regenerate` plans it anew. The planned rows say they wait for `regenerate`. A planned row's id (`pulses` with `planned-<module>-1`) gives the next pulse of its codebase's whole prompt, built from the kept plan - and never planned again for it; a later pulse's prompt depends on what the ones before it land, a conformance pulse's on the code once it is built, and a codebase with a pulse running shows none. `turri regenerate --dry-run` keeps its plan only while it runs: it prints the next pulse's prompt and exits, and the `turri regenerate` after it plans again.
198
198
 
199
199
  ### When \*\*\*plain changes
200
200
 
@@ -220,9 +220,9 @@ Whether something is done is never the agent's call, and never a command it chos
220
220
  | `test_scripts/run_conformance_tests_<lang>.sh` | `run_conformance_tests_<lang>.sh <build> <tests>` | whether the conformance tests pass - the whole suite in `plain_modules/<module>/tests`, every functionality's and those carried up from below, at once - and the tests' static checks with them, exit 80 when only the checks fail |
221
221
  | `test_scripts/prepare_environment_<lang>.sh` - optional | `prepare_environment_<lang>.sh <build>`, before every run of the conformance testing script | nothing on its own: it readies the environment the conformance tests run in - a `mvn install` of the build, say - and when it fails, the conformance tests are not run and the run fails as the preparation's |
222
222
 
223
- The `implement-unit-testing-script` and `implement-conformance-testing-script` skills write them, in the background on the coding model of the module they are for ([background skills](skills-and-gates.md)). While one is being written, a module that lacks that script waits for it - `waiting for its unit testing script, which is being written`, or its conformance testing script - rather than fail for want of it, and is looked at again once the run ends: built, once the script is there, and stopped for want of it as before, when the run wrote none (`src/regenerate/scripts-being-written.ts`). A script written for one stack holds only the modules on that stack. They are looked for at the project root - the folder that holds `plain_modules` - in this order:
223
+ The `implement-unit-testing-script` and `implement-conformance-testing-script` skills write them, in the background on the coding model of the module they are for ([background skills](skills-and-gates.md)). While one is being written - in the background, or to its end in print mode - a module built with the config it is named in waits for it, whether it lacks that script or has one being written over (a pulse started meanwhile would run against the old one) - `waiting for its unit testing script, which is being written`, or its conformance testing script - rather than fail for want of it, and is looked at again once the run ends: built, once the script is there, and stopped for want of it as before, when the run wrote none (`src/regenerate/scripts-being-written.ts`). A script written for one module's config file holds only the modules built with that file. They are looked for at the project root - the folder that holds `plain_modules` - in this order:
224
224
 
225
- 1. `config.turri.yaml` - with the chosen stack's `config.turri.<stack>.yaml` over it, for a project whose parts are on different stacks - naming them by path from the root:
225
+ 1. `config.turri.yaml` - with the module's own `config.turri.<module>.yaml` over it, or the one of a module it requires - naming them by path from the root:
226
226
 
227
227
  ```yaml
228
228
  unittests-script: test_scripts/run_unittests.sh
@@ -232,7 +232,7 @@ The `implement-unit-testing-script` and `implement-conformance-testing-script` s
232
232
  2. the root itself: the one `run_unittests*.sh` and `run_conformance_tests*.sh` there;
233
233
  3. `test_scripts/`: the one of each there.
234
234
 
235
- The same `config.turri.yaml` holds the project's other defaults - `module`, `model`, `review` - for [unattended runs](headless.md). A folder holding two of a kind is not guessed between: name the one to use in `config.turri.yaml` - or, in a project of stacks, in each stack's own file, and build each module with its stack. A module of such a project built with none says so when it stops: which stacks there are, and which script each names. The scripts are not linked from \*\*\*plain; a link to one is ignored.
235
+ The same `config.turri.yaml` holds the project's other defaults - `module`, `model`, `review` - for [unattended runs](headless.md). A folder holding two of a kind is not guessed between: name the one to use in `config.turri.yaml` - or in the module's own `config.turri.<module>.yaml`. A module with no file of its own, where others have one, says so when it stops: which files there are, and which script each names. The scripts are not linked from \*\*\*plain; a link to one is ignored.
236
236
 
237
237
  They are required: a build with no unit testing script, or with conformance on and no conformance testing script, stops before it starts and says which skill adds it.
238
238
 
@@ -324,16 +324,18 @@ The unit tests are written by the agent that wrote the code. Conformance tests a
324
324
 
325
325
  ```bash
326
326
  turri conform <file.plain> # every functional spec with scenarios
327
- turri conform <file.plain> app:add-task # one, named module:func-id
327
+ turri conform <file.plain> app:add-task # one, named module:func-id - written again when its tests are written
328
+ turri conform <file.plain> --from-scratch # the tests folder at the tip taken out, written again from the module it requires
329
+ turri conform <file.plain> --from-scratch-chain # the same, from nothing: every functional spec of the chain written again
328
330
  ```
329
331
 
330
332
  They follow the code: a functional spec's scenarios get their tests once its code is built, for modules with `***test reqs***` and a conformance testing script. Once a codebase has conformance tests, they are always run and kept passing, and they are carried up to the modules built on top of it.
331
333
 
332
334
  ### The steps of adding tests
333
335
 
334
- Nothing about testing exists until the person asks for it, or - conformance tests on - the chat judges a functional spec needs it: a module imports its stack alone, and its functional specs have no test plain files. The first time tests are written in a module, the chat takes three steps, in order, each a visible change: the **test reqs** - the stack's conformance template, `stdlib/<kind>/conformance/<stack>`, imported, or the module's own `***test reqs***`; the **conformance testing script** for the module's stack, written with `implement-conformance-testing-script` when the project has none ([the testing scripts](#the-testing-scripts)) - in the background, so the chat goes straight on, and the conformance tests wait for the script; then the **scenarios**.
336
+ Nothing about testing exists until the person asks for it, or - conformance tests on - the chat judges a functional spec needs it: a module imports its stack alone, and its functional specs have no test plain files. The first time tests are written in a module, the chat takes three steps, in order, each a visible change, asking nothing - conformance tests on, or `/conform`, is the person's yes to them: the **test reqs** - the stack's conformance template, `stdlib/<kind>/conformance/<stack>`, imported, or the module's own `***test reqs***`; the **conformance testing script** for the module's stack, written with `implement-conformance-testing-script` when the project has none ([the testing scripts](#the-testing-scripts)) - in the background, so the chat goes straight on, and the conformance tests wait for the script; then the **scenarios**.
335
337
 
336
- A step skipped - functional specs with scenarios, and no test reqs (the module's own or imported), or no conformance testing script for its stack - and turri refuses to start a conformance pulse there, the work loop's and `conform`'s alike, naming the first step missing and the next step: `app has scenarios to test - app:say-hello - but no ***test reqs***, so its conformance tests cannot be written - the test reqs are the first step of adding tests. Next step: import the stack's conformance template, stdlib/backend/conformance/python-flask.` Nothing is started and nothing halts: the code goes on being built, and once it is, the module waits on that step - `waiting for its test reqs: …` in the loop's status and in `drift` - until \*\*\*plain or the scripts change, when the next look starts the pulse. `parse` gives the same as a warning, never a failure, and the map's top line says what is missing. A module another requires has its conformance tests written in the tips above it, so `parse` judges it by them, and says which: `base's conformance tests are written in top, which requires it: …`. A module with no scenarios skipped nothing: it is not tested, and nothing is said. Asked to conform a module none of whose functional specs has scenarios yet, turri names every step still to take, in their order, from the first one missing - `No functional spec of app has scenarios - none has a test plain file - so there is nothing to test. Adding tests is three steps, in this order: the test reqs, the conformance testing script, the scenarios. Next step: write the module's own ***test reqs***; then write the conformance testing script with the implement-conformance-testing-script skill; then write the scenarios, each functional spec's in tests/app/<func-id>.plain, then regenerate.` - and with only the scenarios left, that step alone.
338
+ A step skipped - functional specs with scenarios, and no test reqs (the module's own or imported), or no conformance testing script - and turri refuses to start a conformance pulse there, the work loop's and `conform`'s alike, naming the first step missing and the next step: `app has scenarios to test - app:say-hello - but no ***test reqs***, so its conformance tests cannot be written - the test reqs are the first step of adding tests. Next step: import the stack's conformance template, stdlib/backend/conformance/python-flask.` Nothing is started and nothing halts: the code goes on being built, and once it is, the module waits on that step - `waiting for its test reqs: …` in the loop's status and in `drift` - until \*\*\*plain or the scripts change, when the next look starts the pulse. `parse` gives the same as a warning, never a failure, and the map's top line says what is missing. A module another requires has its conformance tests written in the tips above it, so `parse` judges it by them, and says which: `base's conformance tests are written in top, which requires it: …`. A module with no scenarios skipped nothing: it is not tested, and nothing is said. Asked to conform a module none of whose functional specs has scenarios yet, turri names every step still to take, in their order, from the first one missing - `No functional spec of app has scenarios - none has a test plain file - so there is nothing to test. Adding tests is three steps, in this order: the test reqs, the conformance testing script, the scenarios. Next step: write the module's own ***test reqs***; then write the conformance testing script with the implement-conformance-testing-script skill; then write the scenarios, each functional spec's in tests/app/<func-id>.plain, then regenerate.` - and with only the scenarios left, that step alone.
337
339
 
338
340
  ### Conformance tests in the work loop
339
341
 
@@ -345,6 +347,8 @@ A conformance job is a \*\*\*plain diff's conformance run: the tests of its chan
345
347
 
346
348
  **`conform`.** The loop starts conformance pulses by itself; `conform` starts them now - every functional spec of the module with scenarios, or those named as `module:func-id`. Named, it writes their tests alone: the module's other functional specs whose tests are behind are left as they are - `drift` lists them, saying conform asked for the named ones alone - until `conform` names none or the module is asked for again (`regenerate`); one of them whose text or scenarios change meanwhile joins those named. A module none of whose functional specs has scenarios, a functional spec \*\*\*plain does not have, one with no scenarios ("write them first") or a module that skipped a step of adding tests ([above](#the-steps-of-adding-tests)) is refused, and nothing is started. `conform` changes the module named alone, never the modules below it. For a module not regenerated yet, its tests are written once its code is built, before anything is built on it. For a module already regenerated whose tests are not written, while a module above it was started from it - its first pulse running, or code of its own built - the codebase above is disposable: a pulse running there is stopped, whatever `allow-to-stop-jobs` says, as the person asked; the codebase is deleted whole, its history with it; the tests are written in the module's own codebase; and the module above is regenerated from it once they pass. With every test written for what is built, it says so, and nothing is touched.
347
349
 
350
+ **Written again.** `conform` asks for tests written already to be written again - as `regenerate` does code - and touches no code. A functional spec it names whose tests are written has them written anew: marked `conform_again` in the tests record of every codebase where its code lives - the tips of its chains, whose suite holds the chain's tests, among the functional specs required there for a module below - committed, so the mark differs from what the tests are to be written for and the work loop plans a conformance pulse for it; one named whose tests are not written is written, as before. The pulse deletes every test labelled with each of its scenarios, and what only those tests used, and writes them again from the scenario and the functional spec's text, never from the old tests; it lands the tests record without the mark. **From scratch** (`from_scratch`, `/conform … from scratch`, `turri conform --from-scratch`) works where the module's code lives, as `regenerate` from scratch does - the tip of each chain it is built in, never a codebase in the middle: the tip's whole tests folder - its tests, their notes and their record - is taken out, committed first so its lineage keeps it, and the tests of the module the tip requires are copied in, as the codebase started from them; the tip's own tests are written anew on them, and those it inherits are brought up to date. `"chain"` (`from scratch, whole chain`, `--from-scratch-chain`) copies nothing in: every functional spec of the chain with scenarios has its tests written anew at the tip. Neither touches the code, a codebase below the tip or one built on the module. Functional specs named and from scratch are not asked for together, and a pulse running in a codebase it would touch refuses it, as `regenerate` from scratch does.
351
+
348
352
  **`turri drift`** lists the conformance work one functional spec a line, its scenarios counted by case, and why else its tests are behind:
349
353
 
350
354
  ```
@@ -353,6 +357,7 @@ A conformance job is a \*\*\*plain diff's conformance run: the tests of its chan
353
357
  todo:edit-task 1 added, 1 changed, 1 removed
354
358
  todo:list-tasks its code was regenerated again - 3 to run on it
355
359
  todo:delete-task taken out - its tests go (2 removed)
360
+ todo:log-in written again from scratch - 2 to write anew
356
361
  ```
357
362
 
358
363
  A functional spec with no scenarios is not listed: `parse` shows it as "no scenarios - not tested".
@@ -372,6 +377,7 @@ A conformance job goes down to the scenarios. For each functional spec it touche
372
377
  | removed | deleted, every test labelled with it - and nothing else |
373
378
  | unchanged | left exactly as they are |
374
379
  | unchanged, its functional spec's code changed - its text or a file it links patched, it was regenerated again, or a concept it uses changed | run on the new code: those that pass stay as they are, and one that fails is fixed against its scenario, read with the functional spec's text - no test holds the new code to what only the old code did |
380
+ | written anew - its functional spec's tests asked for again (`conform`, [above](#conformance-tests-in-the-work-loop)) | deleted, every test labelled with it, and written again from the scenario - none left as it was; a scenario it no longer has is removed |
375
381
 
376
382
  A scenario given another scenario-id, and nothing else with it, is relabelled by turri itself, its tests not rewritten (see [a pure rename](#what-a-job-is-given-and-what-it-records)); renamed with any other change of its functional spec's, it is one removed and one added, and so is one moved between `***conformance tests***` and `***acceptance tests***`, as its label changes; one moved between two test plain files of the same functional spec is nothing. A functional spec whose text and scenarios both changed gets both cases. The tests record stores nothing new for it: each scenario's `{id, text}`, as written. The reviewer holds the agent to the cases: the tests of an unchanged scenario come out unchanged - unless the code changed under it and a test failed on it - and none labelled with a removed scenario is left.
377
383
 
package/docs/sandbox.md CHANGED
@@ -63,7 +63,7 @@ Before an agent's command runs, its text is checked (`src/regenerate/command-che
63
63
  - names a path outside the role's roots - absolute, a `..` that climbs out of the agent's folder (after the `cd`s before it), or inside a quoted string (`python3 -c "..."`). `~`, `$HOME` and `$TMPDIR` are the module's own and allowed, as are the package caches, the machine's system folders and the toolchains, and the devices (`/dev/null`). A path is checked when it names something on disk - under a top folder such as `/Users`, `/home`, `/etc` or `/tmp`, one of the fence's, or one that exists - so an API route in a curl or a JSON body is not one, and nor is `/` alone, a slash in code (`case '/':`), though writing to `/` is refused;
64
64
  - names the code record, `.turri.json`;
65
65
  - writes a credential file (`.env` and its variants; a template is fine) - by redirect, `tee`, `cp`, `mv` or an edit in place;
66
- - changes a setting of the machine's or the person's environment: `defaults write`, `launchctl`, `systemctl enable`, `sysctl -w`, `git config --global`, `npm config set`, a line written to a shell profile (`~/.zshrc`) or `/etc`. The same rule (`machineChange`) holds in every shell turri runs, not only the agents': the chat's and the release agent's refuse an install or a system setting too, asked or not - turri changes nothing of the machine's;
66
+ - changes a setting of the machine's or the person's environment: `defaults write`, `launchctl`, `systemctl enable`, `sysctl -w`, `git config --global`, `npm config set`, a line written to a shell profile (`~/.zshrc`) or `/etc`. The same rule (`machineChange`) holds in every shell turri runs, not only the agents': the chat's and the launch agent's refuse an install or a system setting too, asked or not - turri changes nothing of the machine's;
67
67
  - installs software outside the project: `sudo`, the system's package managers installing (`brew`, `apt`, `dnf`, `apk`, `pacman`, `choco`, `winget`, ...), toolchain managers installing (`nvm`, `sdk`, `rustup`, `pyenv`, `asdf`, ...), global installs (`npm -g`, `yarn global`, `pip --user`, `pipx`, `gem install`), a script downloaded and run (`curl ... | sh`), an installer (`.pkg`, `.msi`, `.dmg`, `.run`). The project's own dependencies - `npm install`, pip into its venv, `mvn`, `cargo`, `go mod` - are building the code, and pass;
68
68
  - kills what its pulse did not start: `pkill`, `killall`, `taskkill`, `fuser -k`, or `kill` aimed at a port or name lookup. `kill $!` and `kill %1` pass.
69
69
 
@@ -98,9 +98,9 @@ Every regenerating agent - regenerate, \*\*\*plain change, conformance, regressi
98
98
 
99
99
  DuckDuckGo is used without a key through its Lite page, which is not an official API: it rate-limits, and a search that is turned away tells the agent to wait or fetch a page it knows instead.
100
100
 
101
- ## Outside the sandbox: deploy
101
+ ## Outside the sandbox: launch
102
102
 
103
- What `deploy` starts runs on your machine unfenced: you asked to try the software, with your toolchains, in your browser. It runs from `dist/<module>`, a copy of the last commit outside `plain_modules`, so no regenerating agent reaches it. Nothing is installed on the machine for it: its dependencies go into the project, and a toolchain or system setting it lacks is yours to install - the release agent's shell refuses it, and tells you the command. See [deploy](deploy.md).
103
+ What a launch starts runs on your machine unfenced: you asked to try the software, with your toolchains, in your browser. It runs from `dist/<module>`, a copy of a commit outside `plain_modules`, so no regenerating agent reaches it. Nothing is installed on the machine for it: its dependencies go into the project, and a toolchain or system setting it lacks is yours to install - the launch agent's shell refuses it, and tells you the command. See [launch](launch.md).
104
104
 
105
105
  ## What turri keeps beside the code
106
106
 
package/docs/sentinel.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # The sentinel
2
2
 
3
- The sentinel is a chat of turri's own, beside the chats you talk to. Every pulse that finishes goes to it: it checks how the pulse went - and, with `release-after-pulse` on, tests what was released - and when something needs you, it says so in the chat you are in, with what can be done about it. You go on talking about the software, and building it, while it watches what lands.
3
+ The sentinel is a chat of turri's own, beside the chats you talk to. Every pulse that finishes goes to it: it checks how the pulse went - and, with `launch-after-pulse` on, tests what was launched - and when something needs you, it says so in the chat you are in, with what can be done about it. You go on talking about the software, and building it, while it watches what lands.
4
4
 
5
5
  `sentinel:` in `config.turri.yaml` says whether there is one: `ask`, as it is unset - you are asked before it first opens in a session (below); `true` - it opens without asking; `false` - none. It is there in the terminal and in a host such as turri-desktop - wherever turri holds [chats](chats.md) - and not in pi's print, json or rpc modes, nor on the command line (`turri regenerate`, `turri conform`), which have no chat to tell: there a pulse is told as it is without it.
6
6
 
7
7
  ## Starting it
8
8
 
9
- Under `sentinel: ask`, a tab that starts working on its own is not sprung on you. When the first pulse of a session finishes, turri asks first - a notice of its own in the chat you are in, before the sentinel opens, in one sentence: `app · regenerate pulse 3 finished - start the sentinel, a background tab that reviews each finished pulse and tries to use what was released?` - the release left out with `release-after-pulse` off. In the terminal it is a dialog once that chat is not mid-turn, with how to switch to the sentinel once it is open - `Use "/chat 2" to open the sentinel.`, the number the one it will have in the strip; in a host, a notice with `kind: "sentinel-start"` (see [in a host](#in-a-host)). You answer:
9
+ Under `sentinel: ask`, a tab that starts working on its own is not sprung on you. When the first pulse of a session finishes, turri asks first - a notice of its own in the chat you are in, before the sentinel opens, in one sentence: `app · regenerate pulse 3 finished - start the sentinel, a background tab that reviews each finished pulse and tries to use what was launched?` - the launch left out with `launch-after-pulse` off. In the terminal it is a dialog once that chat is not mid-turn, with how to switch to the sentinel once it is open - `Use "/chat 2" to open the sentinel.`, the number the one it will have in the strip; in a host, a notice with `kind: "sentinel-start"` (see [in a host](#in-a-host)). You answer:
10
10
 
11
11
  - **Start the sentinel** - it opens, and checks this pulse and each after it this session;
12
12
  - **Start it, and don't ask again** - the same, and `sentinel: true` is written to `config.turri.yaml`;
@@ -15,11 +15,11 @@ Under `sentinel: ask`, a tab that starts working on its own is not sprung on you
15
15
 
16
16
  Nothing goes to the sentinel, or to your chat, until you answer: the pulses that finish meanwhile are held, and go to it - or to their chats - as you say. You are asked once a session: a sentinel closed and opened again by the next pulse is not asked for again, nor one `turri --continue` reopened. Close the chat it was asked in, and it is asked again in the one you look at.
17
17
 
18
- `/sentinel` sets it from the chat - `/sentinel ask`, `/sentinel on`, `/sentinel off`, or `/sentinel` alone to pick - written to `config.turri.yaml` as `/turri-config sentinel` does.
18
+ `/sentinel` sets it from the chat - `/sentinel ask`, `/sentinel on`, `/sentinel off`, or `/sentinel` alone to pick - written to `config.turri.yaml` as `/settings sentinel` does.
19
19
 
20
20
  ## What you see
21
21
 
22
- - **In the chat you are in**, a pulse that finishes shows as it always has - `✓ app · regenerate pulse 3 finished after 4m 10s`, and for one that went wrong, where to see why. A pulse that landed is told to the chat's agent, which tells you in a line or two what landed and what the sentinel is doing with it - and again, in a line, when the sentinel is done with it - checking it, testing what was released - and does nothing else about it: it does not test, release or open it, nor do what the project's guidance says to do once a pulse finishes. The pulse is the sentinel's. A pulse that went wrong is not told to it: the sentinel looks into it, and you hear of it as a notice.
22
+ - **In the chat you are in**, a pulse that finishes shows as it always has - `✓ app · regenerate pulse 3 finished after 4m 10s`, and for one that went wrong, where to see why. A pulse that landed is told to the chat's agent, which tells you in a line or two what landed and what the sentinel is doing with it - and again, in a line, when the sentinel is done with it - checking it, testing what was launched - and does nothing else about it: it does not test, launch or open it, nor do what the project's guidance says to do once a pulse finishes. The pulse is the sentinel's. A pulse that went wrong is not told to it: the sentinel looks into it, and you hear of it as a notice.
23
23
  - **The sentinel** opens with the first pulse that finishes - once you said to start it, under `sentinel: ask` - in the background: it never takes the screen, and you stay in your chat. It is a tab in the strip like any other chat - `sentinel` - marked while it works and when it has something new. Switch to it to read what it checked: it shows the pulse it is on, or the last one it checked - each pulse has a conversation of its own (below).
24
24
  - **A notice**, when something needs you: a card in the chat you are in - what is wrong, what shows it, and what can be done, numbered - and, in the terminal, once that chat is not mid-turn, a dialog on it:
25
25
  - `enter` on an action accepts it: the chat's agent is started on it - a change to the \*\*\*plain, a pulse regenerated again, a credential to provide, a setting to change;
@@ -31,19 +31,31 @@ Nothing goes to the sentinel, or to your chat, until you answer: the pulses that
31
31
 
32
32
  ## What it does
33
33
 
34
- Each pulse it checks from scratch, in a conversation of its own: its prompt, your guidance (`.turri/sentinel.md`, below) and what turri writes it of that pulse - nothing of the pulses before it. Its chat stays the same tab; the conversation in it is replaced as it starts on the next pulse, and the one before is let go - deleted, outside [debug mode](config.md). For each pulse that finishes, turri writes the sentinel what it was and how it ended - its stages, rounds and failures as the [ledger](using.md#the-ledger) has them, its \*\*\*plain diff, its log, the chat that asked for it, the chat you are in, and what was released and where it runs. Then it:
34
+ Each pulse it checks from scratch, in a conversation of its own: its prompt, your guidance (`.turri/sentinel.md`, below) and what turri writes it of that pulse - nothing of the pulses before it. Its chat stays the same tab; the conversation in it is replaced as it starts on the next pulse, and the one before is let go - deleted, outside [debug mode](config.md). For each pulse that finishes, turri writes the sentinel what it was and how it ended - its stages, rounds and failures as the [ledger](using.md#the-ledger) has them, its \*\*\*plain diff, its log, the chat that asked for it, the chat you are in, and what runs of it: the launch whose commit holds the pulse's, the pulses after it that the launch holds too, and where it runs. Then it:
35
35
 
36
36
  1. **checks the pulse** - from what it is told, and when that is not enough, from the pulse in full (`pulses` with its id), its log, the code and the \*\*\*plain;
37
- 2. **tests the release**, with `release-after-pulse` on: what was released is running where it is told, and it tries it - in the terminal with its shell (`curl`, the program itself, the logs), in a host also with what the host gives it, a browser say. How far it tests is its own judgement, from what the pulse changed and what the \*\*\*plain says it now does. With `release-after-pulse` off nothing is running, and it checks the pulse alone;
38
- 3. **finds out why**, when something is wrong - the pulse failed or stopped, it did not pass, the release did not come up, the software does not do what its \*\*\*plain says. A testing script, or where the config says the scripts are, it fixes itself, resumes the module, and tells you what it changed (below). Anything else it puts to you as a notice, each action a task your chat's agent can carry out once you accept it - and what the machine lacks, the exact command for you to run;
37
+ 2. **tests what was launched**, with `launch-after-pulse` on: what runs is where it is told, and it tries it - in the terminal with its shell (`curl`, the program itself, the logs), in a host also with what the host gives it, a browser say. How far it tests is its own judgement, from what the pulse changed and what the \*\*\*plain says it now does - but not what a later pulse in the same launch changed again: that is the later pulse's check. Where the \*\*\*plain picks one way among several - which of a tie comes first, how a default is chosen - it tries an input on which the ways give different answers, so a pass shows the \*\*\*plain's way and no other. With `launch-after-pulse` off nothing is running, and it checks the pulse alone;
38
+ 3. **finds out why**, when something is wrong - the pulse failed or stopped, it did not pass, the launch did not come up, the software does not do what its \*\*\*plain says. A testing script, or where the config says the scripts are, it fixes itself, resumes the module, and tells you what it changed (below). Anything else it puts to you as a notice, each action a task your chat's agent can carry out once you accept it - and what the machine lacks, the exact command for you to run;
39
39
  4. **notifies no one** when all is well;
40
40
  5. **concludes**, last, whether all is well or not: what it checked and what it found, in a line or two. The chat you are in shows it - `✓ sentinel · app · pulse 3 · checked, it holds` - and its agent tells you so in a line, and does nothing more; when something was wrong, that its notice says what.
41
41
 
42
- A host can ask it to check too: functional specs the person picks in a module's release - its own, or those of any module its requires chain builds on (`depths:gene-fragments` in predators' release) - in turri-desktop, on the preview's list of a module's built ones. It tests those, on its own judgement, in the module's release - its own codebase's last commit, released first unless that is what runs - and reports as for a pulse: a notice when something is wrong, and its conclusion. It is refused with the sentinel off, and for a module that does not parse, a functional spec it does not have, or one not built; see [in a host](hosting.md#the-sentinel).
42
+ A host can ask it to check too: functional specs the person picks in a module - its own, or those of any module its requires chain builds on (`depths:gene-fragments` in predators') - in turri-desktop, on the preview's list of a module's built ones. It tests those, on its own judgement, in what is launched of the module - its own codebase's code - once the codebase's launches are settled, and reports as for a pulse: a notice when something is wrong, and its conclusion. The sentinel launches nothing: with nothing of the module launched - never, or you halted it - the check ends unchecked, its conclusion saying so - "ask the chat to try it first, which launches it" - and nothing else: it is an answer, not an error; when its last launch did not come up, that is what the sentinel finds out about, as for a pulse. It is refused with the sentinel off, and for a module that does not parse, a functional spec it does not have, or one not built; see [in a host](hosting.md#the-sentinel).
43
43
 
44
- It checks one pulse at a time. A pulse that finishes while it works waits its turn, and is checked once it is done - from scratch, as every pulse is. A pulse that went well is checked until a newer pulse of its module finishes: its check is stopped, and the newer one is checked instead, at once - and a newer pulse of a module takes the place of one of it that went well and waits. A pulse that went wrong is looked into to its end.
44
+ It checks every pulse, one at a time, in the order they finished. A pulse that finishes while it works waits its turn, and is checked once it is done - from scratch, as every pulse is. None takes the place of another: a newer pulse of a module waits behind the check of the one before it.
45
45
 
46
- A notice may be **ignorable**: the sentinel marks one so when you may reasonably leave it as it is - chiefly a gap in the \*\*\*plain the build settled with an assumption: *the \*\*\*plain does not say what happens to passwords over 72 bytes; the build refuses them with 422*. Never something broken, a pulse that went wrong, a release that did not come up, nor the question whether to start the sentinel. Ignore one and it is left as the build has it, for good: nothing is done in your chat, and a line is written to the sentinel's guidance (`.turri/sentinel.md`, as `keep_guidance` writes) saying what was left as it is - its module, the gap, what the build does - and that you chose to. Every conversation after has it, and does not raise it again - unless the build no longer does what you accepted. To have it raised again, take the line out of `.turri/sentinel.md`.
46
+ ## What it tests in
47
+
48
+ With `launch-after-pulse` on, a pulse is launched in the background on the [launch track](launch.md#the-launch-track), the newest commit winning - so what runs may be a later commit than the pulse's own. The sentinel tests a pulse only in a launch whose commit holds the pulse's: its commit, or one built on it. Before it is told of a pulse, turri waits for its codebase's launches to settle - nothing launching, nothing waiting to - and checks that what runs holds the pulse's commit. The pulses waiting behind it wait with it.
49
+
50
+ - **What runs holds it**: it is told the launch, the commit, the pulses after it that the launch holds too - and that what those changed again is theirs to test. A launch that left nothing running - a CLI, a library - is named with the folder to try it from, `dist/<module>`, its absolute path.
51
+ - **The launch did not come up**: it is told why, and that is what it finds out about - a finding like any other. It tests nothing in its place: never the code in `plain_modules`, where a pulse may be writing, nor a server of its own.
52
+ - **You stopped the launch** (`/halt launched <module>`, or every server it started): nothing runs, and it checks the pulse alone.
53
+ - **Whichever it is**, it is told never to run the code in `plain_modules`, where a pulse may be writing, nor to start a server of its own - not in its shell, not with a host's terminal: what would pass there is not what you try. A server that should run and does not is its finding. A host's terminal command that starts or runs the code there - `cd plain_modules/shorty/code && .venv/bin/uvicorn …`, a program or a path there, an environment variable pointing there - is refused it, saying why; reading there is not.
54
+ - **What runs cannot hold it** - turri got it wrong: it is not told of the pulse. The error is shown in the chat you are in, recorded in the ledger (`sentinel.refused`), and the pulse is concluded unchecked; the next is taken.
55
+
56
+ When its codebase is launched again while it checks a pulse - a newer pulse landed - its turn is stopped where it is, its conversation kept: what it was testing is being replaced. It takes nothing else meanwhile. Once the codebase's launches have settled - one, or several in a row - turri checks again that what runs holds the pulse's commit, and tells it, in the same conversation, to carry on: what runs now, and to do again what it was doing as the servers restarted. What runs no longer holding it, it is refused as above. A launch of another codebase leaves it alone.
57
+
58
+ A notice may be **ignorable**: the sentinel marks one so when you may reasonably leave it as it is - chiefly a gap in the \*\*\*plain the build settled with an assumption: *the \*\*\*plain does not say what happens to passwords over 72 bytes; the build refuses them with 422*. Never something broken, a pulse that went wrong, a launch that did not come up, nor the question whether to start the sentinel. Ignore one and it is left as the build has it, for good: nothing is done in your chat, and a line is written to the sentinel's guidance (`.turri/sentinel.md`, as `keep_guidance` writes) saying what was left as it is - its module, the gap, what the build does - and that you chose to. Every conversation after has it, and does not raise it again - unless the build no longer does what you accepted. To have it raised again, take the line out of `.turri/sentinel.md`.
47
59
 
48
60
  Two functional specs that contradict each other stop a pulse in a way only you can settle: turri puts that notice itself, with an action that starts your chat on working it out with you.
49
61
 
@@ -55,7 +67,7 @@ It fixes the project's tooling itself, and nothing else:
55
67
  - **It never changes \*\*\*plain.** The \*\*\*plain is your intent: what needs it changed is a notice, its action a task for your chat's agent once you accept it.
56
68
  - **It installs nothing, and changes no setting of the machine's or your shell's** - not a toolchain, not a package, not a PATH line in your profile - under no circumstances: its shell refuses it, as every shell turri runs does. What the machine lacks is a notice with the exact command for you to run, and resuming as its action once you have.
57
69
 
58
- Its file tools - `read`, `ls`, `grep`, `find` - read the whole project; `write` and `edit` reach the tooling above and nothing else, \*\*\*plain never. Its shell runs [behind the walls](sandbox.md) every agent's does - the command check, the OS sandbox where one is up, the audit - with the project read only and the network open, its home and temporary folder its own. It has `pulses`, `parse`, `doctor` and the web, `resume`, `notify_person` for its notices, `conclude` for when it is done with a pulse, `keep_guidance`, and what a host gives it. Whatever else it calls is refused: it never steers, releases, or regenerates but by `resume` after a fix of its own, and never asks you a question - a notice is how it reaches you.
70
+ Its file tools - `read`, `ls`, `grep`, `find` - read the whole project; `write` and `edit` reach the tooling above and nothing else, \*\*\*plain never. Its shell runs [behind the walls](sandbox.md) every agent's does - the command check, the OS sandbox where one is up, the audit - with the project read only and the network open, its home and temporary folder its own. It has `pulses`, `parse`, `doctor` and the web, `resume`, `notify_person` for its notices, `conclude` for when it is done with a pulse, `keep_guidance`, and what a host gives it. Whatever else it calls is refused: it never steers, launches, or regenerates but by `resume` after a fix of its own, and never asks you a question - a notice is how it reaches you.
59
71
 
60
72
  ## Talking to it
61
73
 
@@ -63,7 +75,7 @@ Switch to its chat and say how to check your software - *test the sign-up flow a
63
75
 
64
76
  ## Closing it
65
77
 
66
- It closes like any chat (`/chat close`, `alt+w`, a host's `closeChat`), and that does not turn it off: what it was checking is stopped, the pulses that waited for it are let go, and the next pulse that finishes opens it again, with a fresh conversation - and your guidance. `turri --continue` reopens it with the other chats, with the conversation of the last pulse it was on; the next pulse starts a fresh one. `sentinel: false` - in `config.turri.yaml`, or with `/sentinel off` or `/turri-config` - turns it off: from the next pulse that finishes, a pulse is told to the chat that asked for it, whose agent reacts to it, as without one.
78
+ It closes like any chat (`/chat close`, `alt+w`, a host's `closeChat`), and that does not turn it off: what it was checking is stopped, the pulses that waited for it are let go, and the next pulse that finishes opens it again, with a fresh conversation - and your guidance. `turri --continue` reopens it with the other chats, with the conversation of the last pulse it was on; the next pulse starts a fresh one. `sentinel: false` - in `config.turri.yaml`, or with `/sentinel off` or `/settings` - turns it off: from the next pulse that finishes, a pulse is told to the chat that asked for it, whose agent reacts to it, as without one.
67
79
 
68
80
  It has a slot of its own: with it on, you open up to eight chats, and the ninth is the sentinel's, open or not.
69
81
 
@@ -73,8 +85,8 @@ The `sentinel` role in `models:` - else the chat's model, `models.chat` else `ha
73
85
 
74
86
  ## In a host
75
87
 
76
- A host sees the sentinel as one of its chats - `role: "sentinel"` in `chats()` and `onChats` - and never has focus moved to it. Each pulse's fresh conversation is a new pi session in the same chat, under the same id: `onChatSession(chat, session)` comes before the pulse is put to it, and `session(id)` returns the new one. Under `sentinel: ask`, the question before it first opens comes as a notice like the others, with `kind: "sentinel-start"`, its actions the four answers: `answer(id, { action })` answers it - by index or label - and `{ dismiss: true }` is not this session. Each notice comes as `onNotice(notice)` - `{ id, chat, module, pulse, job, severity, summary, evidence, actions, state }`, `chat` the one to draw it in - and `onNoticeOver(notice)` when it is answered or superseded; `notices()` lists those open. `answer(id, { action } | { steer } | { dismiss: true } | { ignore: true })` answers one, as the terminal's dialog does - `{ ignore: true }` only on a notice with `ignorable: true`, `"refused"` on any other; it ends `state: "ignored"`. `onConcluded({ job, verdict: "holds" | "wrong", summary, module, pulse, chat })` comes as it is done with a pulse, all well or not - told to the chat `chat` too. The sentinel's own tools - a browser - are given with `createTurri({ sentinel: { tools } })`, and it is told it has them. `sentinel: { surface }` says, in the host's words, where the person watches it use them: then it tries a release with them, where the person can watch, and keeps its shell for what they 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. See [running turri in a host](hosting.md#the-sentinel).
88
+ A host sees the sentinel as one of its chats - `role: "sentinel"` in `chats()` and `onChats` - and never has focus moved to it. Each pulse's fresh conversation is a new pi session in the same chat, under the same id: `onChatSession(chat, session)` comes before the pulse is put to it, and `session(id)` returns the new one. Under `sentinel: ask`, the question before it first opens comes as a notice like the others, with `kind: "sentinel-start"`, its actions the four answers: `answer(id, { action })` answers it - by index or label - and `{ dismiss: true }` is not this session. Each notice comes as `onNotice(notice)` - `{ id, chat, module, pulse, job, severity, summary, evidence, actions, state }`, `chat` the one to draw it in - and `onNoticeOver(notice)` when it is answered or superseded; `notices()` lists those open. `answer(id, { action } | { steer } | { dismiss: true } | { ignore: true })` answers one, as the terminal's dialog does - `{ ignore: true }` only on a notice with `ignorable: true`, `"refused"` on any other; it ends `state: "ignored"`. `onConcluded({ job, verdict: "holds" | "wrong", summary, module, pulse, chat })` comes as it is done with a pulse, all well or not - told to the chat `chat` too. The sentinel's own tools - a browser - are given with `createTurri({ sentinel: { tools } })`, and it is told it has them. `sentinel: { surface }` says, in the host's words, where the person watches it use them: then it tries what is launched with them, where the person can watch, and keeps its shell for what they 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. See [running turri in a host](hosting.md#the-sentinel).
77
89
 
78
90
  ## In the ledger
79
91
 
80
- `chat.opened` carries `role: "sentinel"` for its chat; `sentinel.asked` each check a host asks of it, its `check` and `module`; `sentinel.checking` each pulse - or check, with `check` - it starts a conversation for - `replaced`, the pulse of the same module whose check it stopped; `notice.put` and `notice.over` record each notice - the question before it opens among them - - its severity and module, and how it ended: `accepted`, `steered`, `dismissed`, `ignored`, `superseded` - and `sentinel.concluded` each pulse or check it is done with, `holds` or `wrong` - `unchecked`, a check that never ran.
92
+ `chat.opened` carries `role: "sentinel"` for its chat; `sentinel.asked` each check a host asks of it, its `check` and `module`; `sentinel.checking` each pulse - or check, with `check` - it starts a conversation for; `sentinel.paused` and `sentinel.resumed` a check paused while its codebase was launched again, and carried on - the launch's id; `sentinel.refused` a pulse or check it was not told of because what runs cannot hold it - or, for a check, nothing of its module is launched - and why; `notice.put` and `notice.over` record each notice - the question before it opens among them - - its severity and module, and how it ended: `accepted`, `steered`, `dismissed`, `ignored`, `superseded` - and `sentinel.concluded` each pulse or check it is done with, `holds` or `wrong` - `unchecked`, one it never checked.
@@ -39,7 +39,7 @@ A skill declares its steps with a `## Steps` section whose `###` headings are th
39
39
 
40
40
  `command-only: true` under `metadata:` keeps a skill from the model: it is started only by the person, with its slash command. None of turri's own is; turri registers the command for every such skill, the project's own too. Typed, the command puts what was typed in the chat as the person's message, and lets `cultivate` start the skill once - and so does an option starting with the command - a project's `/release-notes - for this release` - picked in the conversation's `ask_user` (`chosenCommand` in `src/skills.ts`). The answer tells the model to call `cultivate` for it at once, with the person's request word for word as its context (`startPicked`), so they never type the command after picking it; the run starting uses that up, so the model cannot start it again later on its own. Without either, `cultivate` refuses it and the model is told how the person starts it; the skill's line in `cultivate`'s list says so too.
41
41
 
42
- `background: true` under `metadata:` runs a skill in the background, in the chat and a host: `cultivate` starts it and returns at once, and the chat's turn goes on. Nothing shows while it runs - no progress, no spinner - and nobody is asked anything: it has no `ask_user`, a gate it cannot pass stands, and its agent is told to decide what is left open and say what it decided. Its end comes back to the chat it was started from once that chat is idle - its agent done, nothing typed - batched (`src/background-skills.ts`): a line drawn by turri when it did its work, naming the files it changed; a message that starts a turn when it stopped at a gate, failed, or changed no file, for the chat to tell the person and decide what next. One runs at a time a skill and project, whichever chat started it; quitting turri stops it. In pi's print, json and rpc modes, and from `turri cultivate`, it runs as any skill does, to its end. `model: coding` runs a skill on the coding model of the module it is for - `cultivate`'s `plainFile`: that module's stack's `coding-model` over the project's, and the one chosen with `engine` this session over both - the model a code pulse of that module runs on; without it, a skill runs on the chat's model (`harness-model` from the command line). turri's two that write the testing scripts, `implement-unit-testing-script` and `implement-conformance-testing-script`, are its only ones that set either, and they set both.
42
+ `background: true` under `metadata:` runs a skill in the background, in the chat and a host: `cultivate` starts it and returns at once, and the chat's turn goes on. Nothing shows while it runs - no progress, no spinner - and nobody is asked anything: it has no `ask_user`, a gate it cannot pass stands, and its agent is told to decide what is left open and say what it decided. Its end comes back to the chat it was started from once that chat is idle - its agent done, nothing typed - batched (`src/background-skills.ts`): a line drawn by turri when it did its work, naming the files it changed; a message that starts a turn when it stopped at a gate, failed, or changed no file, for the chat to tell the person and decide what next. One runs at a time a skill and project, whichever chat started it; quitting turri stops it. In pi's print, json and rpc modes, and from `turri cultivate`, it runs as any skill does, to its end. `model: coding` runs a skill on the coding model of the module it is for - `cultivate`'s `plainFile`: that module's own file's `coding-model` over the project's, and `--coding-model` over both - the model a code pulse of that module runs on; without it, a skill runs on the chat's model (`harness-model` from the command line). turri's two that write the testing scripts, `implement-unit-testing-script` and `implement-conformance-testing-script`, are its only ones that set either, and they set both.
43
43
 
44
44
  `questioning:` under `metadata:` names the steps the questioning level caps (`src/questioning.ts`) - `[stack, product]`, say. When there are any and someone to ask, the harness itself asks the first question of the first step: how many questions those steps may ask - light (3), medium (5), thorough (10) or best judgement - and tells the agent the answer beside each step's instructions, with how broad each question is to be: broad at light, a whole area at once, narrow at thorough, an edge case at a time. Every level covers the same ground, in less or more depth. In a capped step `ask_user` refuses a question past the cap; the step's closing confirmation, asked with `confirms_phase: true`, is never counted. `end_questions` ends the step's questions sooner - best judgement's only end. What the questions leave open, the agent decides itself and says what it chose. The level, and how many questions each step has asked, are kept in the run's `run.json`, so a resumed run keeps them. A step it does not name, or a run with nobody to ask, is not capped.
45
45
 
@@ -49,9 +49,9 @@ A step ends when its agent's turn does. A turn that ends on a question in the re
49
49
 
50
50
  A skill gets the tools its `allowed-tools` names, and nothing else: one that names none has none. So every skill here names its own - the file tools (`read`, `write`, `edit`, `ls`, `grep`, `find`) for the ones that write \*\*\*plain, resources or scripts, `bash` only for those that need a shell (running the testing script they write, deleting a module they split up), only the reading ones for those that analyse and report, and turri's own (the ones below) where a skill uses them.
51
51
 
52
- A skill's `write` and `edit` reach the project's \*\*\*plain only (`plainWriteTools` in `src/plain-files.ts`): a `.plain` file, a resource one links, a testing script, a `config.turri*.yaml`, or a new file outside `plain_modules/`, `dist/` and the hidden folders - a resource about to be linked, a script about to be named. Any other file that is there already - the code, a release, what an app it started writes - is refused, with why. Its `bash`, where it has one, is not fenced.
52
+ A skill's `write` and `edit` reach the project's \*\*\*plain only (`plainWriteTools` in `src/plain-files.ts`): a `.plain` file, a resource one links, a testing script, a `config.turri*.yaml`, or a new file outside `plain_modules/`, `dist/` and the hidden folders - a resource about to be linked, a script about to be named. Any other file that is there already - the code, a launch, what an app it started writes - is refused, with why. Its `bash`, where it has one, is not fenced.
53
53
 
54
- What a run changed is part of its result: every file of the project's \*\*\*plain it added, changed or removed - its `.plain` files, the resources they link, its testing scripts and `config.turri*.yaml` (`projectFiles` in `src/plain-files.ts`), never the built code, a release in `dist/` or the log of an app it started, which change while a skill runs without being its doing - or that it changed none, which is said as such, so a run that wrote nothing is never reported as done. A skill without gates says it was not reviewed. A `.plain` file a skill edited with the file tools is not regenerated by it: the result says so, for the conversation to regenerate the change.
54
+ What a run changed is part of its result: every file of the project's \*\*\*plain it added, changed or removed - its `.plain` files, the resources they link, its testing scripts and `config.turri*.yaml` (`projectFiles` in `src/plain-files.ts`), never the built code, a launch in `dist/` or the log of an app it started, which change while a skill runs without being its doing - or that it changed none, which is said as such, so a run that wrote nothing is never reported as done. A skill without gates says it was not reviewed. A `.plain` file a skill edited with the file tools is not regenerated by it: the result says so, for the conversation to regenerate the change.
55
55
 
56
56
  A skill acts on the work loop with the conversation's own tools, on the conversation's loop - never copies of them (`src/loop-tools.ts`). Every skill with the loop has `drift`: what is left to regenerate, what is regenerating, and "Fully regenerated" once nothing is. One that lists `regenerate` and `halt` in `allowed-tools` can regenerate what a module's \*\*\*plain holds and halt a pulse, with why.
57
57
 
@@ -78,7 +78,7 @@ A gate can also have a `continuous` reviewer: a read-only agent that re-reads th
78
78
  Beside "Something else…", every list an agent's question shows carries "Chat about this": the person says what they want to talk over - why it is asked, what an option means for later - and it goes back to the agent that asked, as no answer. A skill's agent answers in the `context` of the question asked again, since nothing else it writes reaches them; the conversation's agent answers in its reply and ends its turn, the person going on in the chat. It is not counted against the questioning level, and owes no \*\*\*plain change. The harness's own first question - how many the phases may ask - has no agent to answer, and does not offer it. Either choice is backed out of with Esc, or by typing nothing: the options come back, so one picked by accident costs nothing. Esc on the options themselves dismisses the question.
79
79
  - **Be asked something on the side.** A skill runs inside one `cultivate` call, so the conversation can answer nothing until it returns. `/btw <question>` (`btw.ts`) can: [pi](https://pi.dev) runs a command at once, even mid-turn, and it starts an agent of its own - fresh, on the chat's model, reading the project and turri and changing nothing - shown the conversation, the running skill's trace and the end of its agent's session, and the pulses. It is told it is turri, as the conversation's agent is (`identity.ts`), and answers as turri, in the first person - never as an onlooker who sends the person to turri with a message to pass on. Its answer goes in the transcript as an entry, in no model's context: the conversation and the skill go on as if nothing was asked. While a question of the skill's has the keys, `/btw <question>` typed as the answer (under "Something else…") is the same: answered, and the question asked again with the answer above it - the skill's agent never sees it.
80
80
  - **Regenerate, and conform.** A skill that names them in `allowed-tools` gets the conversation's own `regenerate`, `drift`, `halt` and `conform`, on its loop: `conform` schedules a conformance pulse for functional specs not built yet, as it does from the chat. The skill never waits for them.
81
- - **Choose the model that regenerates**, when the user says so - `engine`, the same tool the conversation has.
81
+ - **Run commands, never turri again.** A skill with `bash` in `allowed-tools` has a shell in the project that refuses what the conversation's refuses: turri's own commands that start work - `turri regenerate`, `conform`, `cultivate`, `launch` - turri itself or another pi, and any change to the machine's toolchains or settings (`skillShell` in `self-invocation.ts`). Such a run would build outside the session's work loop, beside its pulses and unseen by them: a script skill that tried its new conformance testing script with `turri conform` wrote and committed the module's conformance tests from a second turri the chat never heard of. The skill says what should run next in what it hands back, and the conversation runs it.
82
82
 
83
83
  The harness still owns the sequence. A step chooses what to ask; it does not choose whether the gate afterwards runs. A run is saved as it goes, so an interrupted one can be resumed where it stopped - a run stopped with the chat's turn (`ctrl+c`, `esc`) too: its agents end their turns there, and what it started on the work loop goes on.
84
84