@turri-dev/cli 0.2.3-next.fea0bd9 → 0.2.4-next.009bd0c

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 (176) hide show
  1. package/README.md +57 -62
  2. package/dist/bedrock-region.js +3 -3
  3. package/dist/chat-idle.d.ts +2 -2
  4. package/dist/chat-idle.js +2 -2
  5. package/dist/chat-models.d.ts +1 -1
  6. package/dist/chat-models.js +1 -1
  7. package/dist/chat-scope.d.ts +1 -3
  8. package/dist/chat-skills.d.ts +1 -1
  9. package/dist/chat-skills.js +1 -1
  10. package/dist/chats.d.ts +44 -20
  11. package/dist/chats.js +125 -64
  12. package/dist/cli.js +42 -31
  13. package/dist/config-edit.d.ts +20 -8
  14. package/dist/config-edit.js +32 -26
  15. package/dist/config.d.ts +106 -78
  16. package/dist/config.js +267 -133
  17. package/dist/conform-cli.js +14 -3
  18. package/dist/conformance-switch.d.ts +13 -22
  19. package/dist/conformance-switch.js +37 -59
  20. package/dist/drift-cli.js +1 -1
  21. package/dist/extension.d.ts +31 -12
  22. package/dist/extension.js +555 -556
  23. package/dist/genome.js +10 -49
  24. package/dist/graph.js +3 -5
  25. package/dist/host-session.d.ts +11 -21
  26. package/dist/host-session.js +6 -8
  27. package/dist/host.d.ts +4 -4
  28. package/dist/host.js +4 -7
  29. package/dist/identity.js +2 -3
  30. package/dist/init-config.d.ts +1 -2
  31. package/dist/init-config.js +10 -17
  32. package/dist/installed-providers.d.ts +1 -1
  33. package/dist/installed-providers.js +2 -2
  34. package/dist/launch-agent.d.ts +41 -0
  35. package/dist/launch-agent.js +219 -0
  36. package/dist/{release-cli.js → launch-cli.js} +41 -24
  37. package/dist/launch-session.d.ts +58 -0
  38. package/dist/launch-session.js +195 -0
  39. package/dist/launch-tools.d.ts +28 -0
  40. package/dist/launch-tools.js +69 -0
  41. package/dist/launch-track.d.ts +120 -0
  42. package/dist/launch-track.js +298 -0
  43. package/dist/loop-cli.d.ts +4 -3
  44. package/dist/loop-cli.js +17 -15
  45. package/dist/loop-tools.d.ts +45 -21
  46. package/dist/loop-tools.js +155 -90
  47. package/dist/new-project.js +2 -2
  48. package/dist/notice.d.ts +7 -6
  49. package/dist/parse-cli.js +2 -2
  50. package/dist/pi-launch.js +4 -1
  51. package/dist/pi-settings.d.ts +4 -0
  52. package/dist/pi-settings.js +39 -0
  53. package/dist/pi.js +12 -9
  54. package/dist/plain/check.d.ts +2 -9
  55. package/dist/plain/check.js +6 -39
  56. package/dist/plain-files.d.ts +2 -2
  57. package/dist/plain-files.js +7 -7
  58. package/dist/regenerate/activity.d.ts +0 -7
  59. package/dist/regenerate/activity.js +2 -20
  60. package/dist/regenerate/agent-env.d.ts +1 -1
  61. package/dist/regenerate/agent-env.js +3 -3
  62. package/dist/regenerate/agent-shell.js +5 -3
  63. package/dist/regenerate/audit.js +9 -0
  64. package/dist/regenerate/base-folder.d.ts +2 -2
  65. package/dist/regenerate/base-folder.js +1 -1
  66. package/dist/regenerate/cases.js +7 -0
  67. package/dist/regenerate/chunk-plan.d.ts +5 -0
  68. package/dist/regenerate/chunk-plan.js +16 -1
  69. package/dist/regenerate/command-check.d.ts +1 -1
  70. package/dist/regenerate/command-check.js +1 -1
  71. package/dist/regenerate/delivery.d.ts +1 -1
  72. package/dist/regenerate/delivery.js +3 -3
  73. package/dist/regenerate/drift.d.ts +4 -0
  74. package/dist/regenerate/drift.js +26 -6
  75. package/dist/regenerate/failure-reports.d.ts +28 -0
  76. package/dist/regenerate/failure-reports.js +79 -0
  77. package/dist/regenerate/job-panel.js +3 -1
  78. package/dist/regenerate/jobs-tree.js +1 -1
  79. package/dist/regenerate/jobs.d.ts +4 -2
  80. package/dist/regenerate/jobs.js +14 -10
  81. package/dist/regenerate/launch.d.ts +126 -0
  82. package/dist/regenerate/{release.js → launch.js} +60 -48
  83. package/dist/regenerate/ledger-view.d.ts +11 -24
  84. package/dist/regenerate/ledger-view.js +14 -60
  85. package/dist/regenerate/ledger.d.ts +26 -16
  86. package/dist/regenerate/ledger.js +1 -1
  87. package/dist/regenerate/lineage.d.ts +2 -0
  88. package/dist/regenerate/lineage.js +8 -0
  89. package/dist/regenerate/loop.d.ts +57 -65
  90. package/dist/regenerate/loop.js +354 -171
  91. package/dist/regenerate/model-names.d.ts +33 -0
  92. package/dist/regenerate/{engine.js → model-names.js} +2 -28
  93. package/dist/regenerate/paths.d.ts +3 -3
  94. package/dist/regenerate/paths.js +4 -4
  95. package/dist/regenerate/records.d.ts +11 -0
  96. package/dist/regenerate/records.js +15 -0
  97. package/dist/regenerate/regenerate.d.ts +0 -2
  98. package/dist/regenerate/regenerate.js +4 -15
  99. package/dist/regenerate/renames.js +4 -4
  100. package/dist/regenerate/requires.d.ts +7 -0
  101. package/dist/regenerate/requires.js +24 -18
  102. package/dist/regenerate/scripts-being-written.d.ts +4 -4
  103. package/dist/regenerate/scripts-being-written.js +3 -3
  104. package/dist/regenerate/spec-map.js +3 -3
  105. package/dist/regenerate/standing.js +1 -1
  106. package/dist/regenerate/submit-work.d.ts +2 -0
  107. package/dist/regenerate/submit-work.js +8 -3
  108. package/dist/regenerate/test-scripts.d.ts +2 -1
  109. package/dist/regenerate/test-scripts.js +33 -23
  110. package/dist/regenerate/testing-steps.d.ts +16 -5
  111. package/dist/regenerate/testing-steps.js +28 -9
  112. package/dist/regenerate-cli.js +18 -9
  113. package/dist/self-invocation.d.ts +11 -0
  114. package/dist/self-invocation.js +37 -11
  115. package/dist/sentinel-check.d.ts +3 -3
  116. package/dist/sentinel-check.js +3 -3
  117. package/dist/sentinel.d.ts +17 -12
  118. package/dist/sentinel.js +75 -46
  119. package/dist/{config-command.d.ts → settings.d.ts} +13 -8
  120. package/dist/{config-command.js → settings.js} +155 -24
  121. package/dist/setup.d.ts +2 -2
  122. package/dist/setup.js +7 -7
  123. package/dist/skill.d.ts +0 -11
  124. package/dist/skill.js +0 -9
  125. package/dist/tools.js +2 -3
  126. package/dist/turri-versions.js +2 -1
  127. package/docs/README.md +4 -6
  128. package/docs/authoring-plain.md +3 -3
  129. package/docs/chats.md +6 -9
  130. package/docs/claude-subscription.md +8 -8
  131. package/docs/config.md +62 -52
  132. package/docs/development.md +4 -5
  133. package/docs/headless.md +7 -6
  134. package/docs/hosting.md +25 -24
  135. package/docs/installation.md +4 -0
  136. package/docs/launch.md +63 -0
  137. package/docs/parser.md +3 -3
  138. package/docs/regenerating.md +30 -22
  139. package/docs/sandbox.md +3 -3
  140. package/docs/sentinel.md +27 -16
  141. package/docs/skills-and-gates.md +6 -11
  142. package/docs/using.md +26 -42
  143. package/genome/rules/project-model.md +2 -1
  144. package/genome/rules/test-plain-files.md +15 -7
  145. package/genome/rules/turri-regeneration.md +7 -10
  146. package/genome/skills/convert-old-syntax/SKILL.md +5 -5
  147. package/genome/skills/implement-conformance-testing-script/SKILL.md +2 -2
  148. package/genome/skills/implement-unit-testing-script/SKILL.md +3 -3
  149. package/package.json +1 -1
  150. package/dist/advisor-chat.d.ts +0 -63
  151. package/dist/advisor-chat.js +0 -290
  152. package/dist/change-plain-cli.js +0 -55
  153. package/dist/ledger-cli.d.ts +0 -1
  154. package/dist/ledger-cli.js +0 -50
  155. package/dist/ledger-tools.d.ts +0 -10
  156. package/dist/ledger-tools.js +0 -64
  157. package/dist/regenerate/advisor-records.d.ts +0 -93
  158. package/dist/regenerate/advisor-records.js +0 -110
  159. package/dist/regenerate/advisor-runs.d.ts +0 -87
  160. package/dist/regenerate/advisor-runs.js +0 -327
  161. package/dist/regenerate/engine.d.ts +0 -52
  162. package/dist/regenerate/release.d.ts +0 -121
  163. package/dist/regenerate/test-advisor.d.ts +0 -101
  164. package/dist/regenerate/test-advisor.js +0 -379
  165. package/dist/release-agent.d.ts +0 -43
  166. package/dist/release-agent.js +0 -130
  167. package/dist/release-cli.d.ts +0 -1
  168. package/dist/release-tools.d.ts +0 -44
  169. package/dist/release-tools.js +0 -170
  170. package/dist/spec-tools.d.ts +0 -36
  171. package/dist/spec-tools.js +0 -128
  172. package/dist/stacks.d.ts +0 -13
  173. package/dist/stacks.js +0 -96
  174. package/docs/deploy.md +0 -48
  175. package/docs/test-advisor.md +0 -110
  176. /package/dist/{change-plain-cli.d.ts → launch-cli.d.ts} +0 -0
package/docs/deploy.md DELETED
@@ -1,48 +0,0 @@
1
- # Trying what is built: deploy
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 `deploy`: it puts the module's code, as it was last built, in `dist/<module>` in the project, and starts it on your machine. An app with a backend and a frontend is started whole, and you are told where to open your browser. For a command-line tool or a library you get a few commands to paste, run from `dist/<module>`, and what they print.
4
-
5
- ## When the project says how it is released
6
-
7
- Every release starts the same way: the module's last commit - what last landed whole - 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 model asks itself whether there is guidance for how this project is released - in what you said, the project's AGENTS.md, a skill, anything it was given - and passes it to `release` whole:
8
-
9
- - **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 a pulse may be writing; where the host's tooling reads `plain_modules` itself, the model points it at `dist`, or does by hand from `dist` what it does. Whether to release after every pulse is `release-after-pulse`'s to say - see [after every pulse](#after-every-pulse). The rules below hold as they do for `dist`: the model runs the project's scripts and installs what they need itself, and what keeps running - a start script, a server - is started with `activate`. 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`.
10
- - **There is none.** The default: it is started from `dist/<module>`, as below, as best it can be.
11
-
12
- Guidance is whatever says it, in any words - a line in AGENTS.md such as *integrations are released with `scripts/deploy_integrations.sh`, then the app is started with `scripts/start.sh`*, or the same said in the chat.
13
-
14
- With `sentinel: false`, the chat reacts to every pulse that finishes as it finishes, without waiting for you to speak: guidance that says to release after a build - *release each integration once it is regenerated* - is followed then. With the [sentinel](sentinel.md) on - the default - the chat is told only that a pulse landed, and does nothing about it: guidance to follow once a pulse finishes is not followed, and releasing after every pulse is `release-after-pulse`'s. It never has to work out whether what a pulse landed is already out: `release` does. When the module's last commit is what its last release in this conversation shipped, it does nothing - nothing exported, nothing stopped, what runs left running - and says so; `again: true` releases it anyway, for when what that release said to do was not done.
15
-
16
- ## What goes in dist
17
-
18
- - **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 deploy always 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.
19
- - **Its last commit.** Each `plain_modules/<module>` is a git repository (`.plaingit`), and every unit of work starts from a commit and ends with one. What a pulse is writing right now is half-done, so it is left out: deploy exports the commit - `git archive` of `code/` - which is the working tree with every unstaged and untracked change put back, and no `node_modules`, `.venv`, `target` or other build leftovers, whatever the stack. The working tree the pulse is using is never read or touched. The harness's own files - `.turri.json`, the agents' notes - are left out too.
20
- - **Replaced whole.** Each deploy stops what the last one of the module 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.
21
-
22
- ## Starting it
23
-
24
- It runs on your machine, outside the [sandbox](sandbox.md) - with your toolchains, where your browser can reach it. The chat reads how the code runs (its README, manifests and entry points), then:
25
-
26
- 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 tells you the exact command to install it yourself (`brew install node`). turri installs nothing on your machine and changes none of its settings - not the release, not the chat, not any agent: its shell refuses it.
27
- 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 release'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.
28
- 3. **Starts what serves** with `activate`: in the background, in its own process group, its output in `.turri/deploy/<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 the deployed folder, or a folder inside it the model names relative to it (`frontend`); a folder that is not there starts nothing, and the model is told so with what the deployed folder holds, to name the right one.
29
-
30
- What it started is listed by the `pulses` tool and by **`/halt`**, and stopped by **`/halt activated <name>`**, by `halt`, by the next deploy of the module, and when the chat exits.
31
-
32
- ## After every pulse
33
-
34
- With `release-after-pulse: true` in `config.turri.yaml`, turri releases what each pulse lands itself, as the pulse's last stage (`releasing what this pulse landed`): the pulse ends once it is released, so the module's next pulse starts on what is out, and the chat - waiting on your answer to a question, say - has no part in it. One release a pulse that lands, in order.
35
-
36
- The release is done by an agent on the coding model, thinking low - it follows steps, and a small model does that well - the same one `turri release` runs, and it finds the guidance as the chat would: what was passed to `release` earlier in the conversation, the project's AGENTS.md and its skills. The setting is the word to release; the guidance says only how - without any, the code goes to `dist/<module>` and is started from there. Its last words go in the pulse's report - "Released after the pulse: ..." - and the [sentinel](sentinel.md) is told what was released and where it runs, and tests it: what needs you comes as a notice in the chat you are in, and the chat you are in says only that it landed and is being tested. With `sentinel: false`, the chat, seeing the report, does not release it again: it says in a line what was released, then does what it was told to do once something is released - 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. A release that fails is said there too; what the pulse landed stays.
37
-
38
- Off without the key: releasing after a pulse is then the chat's, when its guidance says so. `turri init-config` writes `release-after-pulse: true`.
39
-
40
- ## On the command line
41
-
42
- ```bash
43
- turri release [file.plain] [--in-module <module>] [--guidance <text>] [--model <provider/id>]
44
- ```
45
-
46
- The same, without the chat: a one-off agent on `coding-model`, thinking low (or `--model`; without either, [pi](https://pi.dev)'s default) is given the project's AGENTS.md and what `--guidance <text>` says, looks for guidance in them, and releases as above - as the guidance says, or to `dist/<module>` - then works out how to start it and starts it here, installing what it needs without asking. It stays in the foreground with the servers' output; `Ctrl-C` stops them. If it does not get there, deploy from the chat instead.
47
-
48
- `turri regenerate`, `change-plain` and `conform` end a build that landed with `To try it: turri release <spec>`.
@@ -1,110 +0,0 @@
1
- # The test advisor
2
-
3
- Which functional specs need explicit testing scenarios is not obvious, and not every one should be tested - only the functionality that matters. The test advisor decides for you: when a functional spec is new or its text changed and it has no scenarios - or when the chat asks - turri checks in the background whether it needs testing. When it does, the chat you are looking at tells you so and writes what testing it takes - the \*\*\*test reqs\*\*\*, the conformance testing script and its scenarios - so the module's conformance pulse runs once its code is built. The advisor decides; the chat is the only writer of the \*\*\*plain. You are never asked anything.
4
-
5
- ## When it runs
6
-
7
- **Only with conformance tests on.** The advisor is there to say which functional specs need scenarios, and scenarios are only tested with `conformance-tests: true` ([config](config.md#conformance-tests)): off - as it is unset - the advisor is off too, by itself and when asked: the chat has no `evaluate_tests`, and a host's `evaluateTests` throws, saying how they are turned on.
8
-
9
- **Two ways in.** By itself, for every new or changed functional spec without scenarios, as below - what `test-advisor: false` turns off. And when the chat asks, with `evaluate_tests`, whatever the setting - see [asking for an evaluation](#asking-for-an-evaluation).
10
-
11
- **Only in the chat and a host.** Never in a headless command - `turri regenerate`, `conform`, `change-plain` and the rest - and never in [pi](https://pi.dev)'s print, json and rpc modes (`turri -p`), which end when the answer is printed. That is decided where the session starts: the terminal's chat and a host's session have one, nothing else does.
12
-
13
- **What it looks at by itself:** a functional spec, in any module, that is new or whose text changed since its code was built - measured against the code record, what the code was built from: text that differs from the record, or a functional spec not built yet. Then against the advisor's file: a text already looked at, under its hash, is not looked at again. So a fresh project's first functional specs are looked at, and a project already built that has no advisor file gets no backlog: only what changes from now on is.
14
-
15
- **What it leaves alone:**
16
- - a functional spec with scenarios of any kind - [today's review](regenerating.md#conformance-tests) of its scenarios covers it when its text changes
17
- - the standard library's templates, which have no functional specs
18
-
19
- **When:** by itself, as soon as the work loop sees a \*\*\*plain change - a `change_plain`, a `regenerate`, a pulse ending - beside the code pulse it plans. The functional spec is marked `pending` in the advisor's file there and then, so quitting loses nothing: the next start in the chat or a host picks up every `pending` entry.
20
-
21
- **Two at a time at most,** outside `parallel-jobs` and the lanes: it never takes a pulse's slot, no pulse waits for it, and it never steers or stops one.
22
-
23
- **A text that changes while it runs throws the work away,** whoever changed it - you, the chat's `change_plain`, a skill: what it had judged for the old text is dropped (`advisor.dropped`), and the new text starts again.
24
-
25
- A failure - a model error, a call that never answered - is dropped quietly: the entry says `failed` and why, `advisor.failed` goes into the ledger, and the same text is not tried again. Nothing is shown.
26
-
27
- ## What you see
28
-
29
- **Being evaluated.** A change's result - `regenerate`'s, `change_plain`'s - names the functional specs the advisor has just taken up, as `evaluate_tests` names the ones it was asked for, and the chat says in a line that testing scenarios are being evaluated for them, and goes on: there is nothing to wait for.
30
-
31
- **A yes** comes back to the chat you are looking at as a message that starts a turn. It holds the report - the questions that were a yes with their evidence, and the inputs to cover - and the chat, asking you nothing, tells you in a line:
32
-
33
- > core:clear-tasks needs testing scenarios - a wrong implementation could look right. Writing them now.
34
-
35
- Then it writes, with `change_plain`, whatever the [step-7 guard](regenerating.md#the-steps-of-adding-tests) would refuse the scenarios for, in turn and only what is missing: the \*\*\*test reqs\*\*\* of the module it is tested in - the top of its chain, where its conformance tests live - the stack's conformance template, `stdlib/<kind>/conformance/<stack>`, imported, or the module's own; the conformance testing script for its stack, with `implement-conformance-testing-script` - in the background, the chat going straight on; then the scenarios, in `tests/<module>/<func-id>.plain`. They cover the report's inputs that are this functional spec's - an agreed one with the readers' output, never a placeholder - and a split one is settled by the reading most consistent with the functional spec and its module, the chat saying which it took. The change is visible as any is, and the conformance pulse follows once the code is built.
36
-
37
- **A no** is one line turri draws itself, starting no turn and reaching no model:
38
-
39
- > core:list-tasks doesn't need testing scenarios - nothing silent to get wrong.
40
-
41
- **Never an interruption.** A verdict that arrives while the chat is busy - its agent working, or you typing - waits until it is idle; verdicts that arrive meanwhile come together, as one turn for every yes and a line for each no. One whose functional spec changed meanwhile, or was given scenarios, is let go. A yes is kept in the advisor's file until a chat has it: one that arrives with no chat open, or whose session ends first, is delivered at the next start, as `pending` work is picked up.
42
-
43
- Asked for scenarios - "write conformance scenarios for core:add-task" - the chat decides and writes them itself, as a \*\*\*plain change you see, whatever `test-advisor` says.
44
-
45
- A host gets the verdicts in its chats the same way - see [hosting](hosting.md).
46
-
47
- ## Asking for an evaluation
48
-
49
- The chat has a tool of its own, `evaluate_tests`: the functional specs as `module:func-id`s - or func-ids, with `plain_file` - and an optional `reason`. It returns at once - "Testing scenarios for core:add-task are being evaluated in the background; the verdict comes back to this chat." - and the verdict comes back as any verdict does. The chat calls it:
50
-
51
- - when you ask whether something needs tests - "does add-task need tests?";
52
- - on its own, as another way of saying what a functional spec means: when pulses keep failing on a complicated one, say, scenarios may pin down what it should do.
53
-
54
- It evaluates even a text the advisor already judged. A functional spec being evaluated already is not started twice, and one that has scenarios is answered at once as such and not evaluated. It works whatever `test-advisor` says. The `reason` - "the coding agent failed three times to implement it" - reaches the classifier as context, never as evidence.
55
-
56
- ## How it decides
57
-
58
- Every step is a plain model call on the advisor's model, answered through one tool and checked by turri - none of them is a skill, and none can touch the project. Each is given the functional spec, its module whole - and for a module below, the tip its scenarios are tested in, whose own functional specs show in the same commands - and the project's own words on what matters: its `AGENTS.md`, and what you said in the conversation about how the work is to be planned. There is no keyword filter and no confidence score.
59
-
60
- **Classifying** is one call with four questions, each yes backed by evidence:
61
-
62
- | question | a yes needs |
63
- | --- | --- |
64
- | silent failure: could a wrong implementation give output that looks right? | one such wrong output |
65
- | divergence: is there an input two reasonable readings answer differently? | the input, and both outputs |
66
- | revisited: is it likely to be changed or built on later? | what would change |
67
- | cost: would a bug cost money, expose something, lose data or harm users' trust? | the consequence |
68
-
69
- A yes whose evidence is empty or malformed - two readings that are the same - counts as no. The verdict is **yes** when silent failure, divergence or cost is a yes; revisited alone, or all four no, is **no**: the coding agent's unit tests are the regression protection there. A no costs one call, and ends there.
70
-
71
- **On a yes, the inputs** the scenarios are to cover are picked by readers that disagree on purpose:
72
-
73
- 1. **Probes:** one call writes concrete boundary inputs, as many as the functional spec has real boundaries - one to ten, never padded to a number - limits, empty and missing values, the cases the wording leaves open - and the divergence's input joins them. Only inputs the functional spec bears on: never a command, flag or alias it does not name.
74
- 2. **Readers:** each predicts every probe's output. There are three - a literal reader, an edge-case hunter, and a reader from another domain - the same call on the same model, differing only by their system prompt. Two run first; when they already disagree on a probe, the third is spared. A reader answers `unspecified` for an input the functional spec says nothing about.
75
- 3. **Comparing,** in code: the outputs are compared with whitespace and case left aside, and any disagreement makes the input a candidate - the union of the readers, never a majority.
76
- 4. **Verifying:** one last call keeps, of each candidate, the readings a reasonable person could hold. A candidate left with one is an agreed input; one left with none is dropped. An input whose `unspecified` holds - every reader's, or one the verifier keeps - is left out: a scenario on it would pin a guess, testing more than the functional spec says.
77
-
78
- The **report** is what the advisor's file keeps: the questions that were a yes with their evidence, and each input, either agreed - with the readers' output - or split, with its readings.
79
-
80
- ## The setting and its model
81
-
82
- `test-advisor: true | false` in `config.turri.yaml`, `true` when it is left out - `/turri-config` sets it. `false` turns off only the advisor's own start: `evaluate_tests` still works, and asked for scenarios, the chat writes them as it always has, whatever the setting says.
83
-
84
- Every call the advisor makes runs on `models.advisor` - see [models per role](config.md#models-per-role). Without one it runs on `default`'s model, else the coding model alone, thinking low.
85
-
86
- ## What it keeps
87
-
88
- What the advisor made of each functional spec is in `.turri/advisor/<module>.json`, in the project - local to this machine, as all of `.turri/` is: another machine starts with none, and looks only at what changes there. One entry a functional spec, by its func-id:
89
-
90
- | | |
91
- | --- | --- |
92
- | `hash` | a hash of the functional spec's text: the entry is about that text, and stale once it changes |
93
- | `state` | `pending` - seen, not finished; `yes`; `no`; or `failed` |
94
- | `report` | the verdict, the questions that were a yes with their evidence, and on a yes the inputs to cover |
95
- | `model`, `at` | what it ran on, and when |
96
- | `tip` | the module at the top of its chain, where its scenarios are tested |
97
- | `undelivered` | a yes no chat has had yet: delivered at the next start |
98
- | `asked` | pending at the chat's asking, with its reason: picked up at the next start whatever `test-advisor` says |
99
-
100
- Deleting the folder loses only what the advisor knows: an entry that is not there is a functional spec it has not looked at.
101
-
102
- ## In the ledger
103
-
104
- Three facts go into [the ledger](using.md#the-ledger), the report staying in the advisor's file:
105
-
106
- | event | |
107
- | --- | --- |
108
- | `advisor.classified` | the functional spec, `module:func-id`, its verdict, the questions that were a yes, and whether the chat asked for it (`asked: true`) or a change started it |
109
- | `advisor.dropped` | the work on a functional spec thrown away, its text changed while it ran |
110
- | `advisor.failed` | why it failed |
File without changes