@turri-dev/cli 0.2.4-next.8422d0f → 0.2.4-next.d779410
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.
- package/README.md +7 -8
- package/dist/bedrock-region.js +3 -3
- package/dist/chat-idle.d.ts +2 -2
- package/dist/chat-idle.js +2 -2
- package/dist/chat-models.d.ts +1 -1
- package/dist/chat-models.js +1 -1
- package/dist/chat-scope.d.ts +1 -3
- package/dist/chat-skills.d.ts +1 -1
- package/dist/chat-skills.js +1 -1
- package/dist/chats.d.ts +44 -20
- package/dist/chats.js +125 -64
- package/dist/cli.js +12 -31
- package/dist/config-edit.d.ts +20 -8
- package/dist/config-edit.js +32 -26
- package/dist/config.d.ts +106 -78
- package/dist/config.js +267 -133
- package/dist/conform-cli.js +14 -3
- package/dist/conformance-switch.d.ts +13 -22
- package/dist/conformance-switch.js +37 -59
- package/dist/drift-cli.js +1 -1
- package/dist/extension.d.ts +17 -10
- package/dist/extension.js +435 -532
- package/dist/genome.js +10 -49
- package/dist/graph.js +3 -5
- package/dist/host-session.d.ts +11 -21
- package/dist/host-session.js +6 -8
- package/dist/host.d.ts +4 -4
- package/dist/host.js +4 -7
- package/dist/identity.js +2 -3
- package/dist/init-config.d.ts +1 -2
- package/dist/init-config.js +10 -17
- package/dist/installed-providers.d.ts +1 -1
- package/dist/installed-providers.js +1 -1
- package/dist/launch-agent.d.ts +51 -0
- package/dist/launch-agent.js +267 -0
- package/dist/{release-cli.js → launch-cli.js} +41 -24
- package/dist/launch-session.d.ts +68 -0
- package/dist/launch-session.js +217 -0
- package/dist/launch-tools.d.ts +28 -0
- package/dist/launch-tools.js +69 -0
- package/dist/launch-track.d.ts +125 -0
- package/dist/launch-track.js +320 -0
- package/dist/loop-cli.d.ts +4 -3
- package/dist/loop-cli.js +17 -15
- package/dist/loop-tools.d.ts +45 -21
- package/dist/loop-tools.js +155 -90
- package/dist/new-project.js +2 -2
- package/dist/notice.d.ts +7 -6
- package/dist/parse-cli.js +2 -2
- package/dist/pi-launch.js +4 -1
- package/dist/pi-settings.d.ts +4 -0
- package/dist/pi-settings.js +39 -0
- package/dist/pi.js +12 -9
- package/dist/plain/check.d.ts +2 -9
- package/dist/plain/check.js +6 -39
- package/dist/plain-files.d.ts +2 -2
- package/dist/plain-files.js +7 -7
- package/dist/regenerate/activity.d.ts +0 -7
- package/dist/regenerate/activity.js +2 -20
- package/dist/regenerate/agent-env.d.ts +1 -1
- package/dist/regenerate/agent-env.js +3 -3
- package/dist/regenerate/agent-shell.js +5 -3
- package/dist/regenerate/audit.js +9 -0
- package/dist/regenerate/base-folder.d.ts +2 -2
- package/dist/regenerate/base-folder.js +1 -1
- package/dist/regenerate/cases.js +7 -0
- package/dist/regenerate/chunk-plan.d.ts +5 -0
- package/dist/regenerate/chunk-plan.js +16 -1
- package/dist/regenerate/command-check.d.ts +7 -1
- package/dist/regenerate/command-check.js +43 -1
- package/dist/regenerate/delivery.d.ts +1 -1
- package/dist/regenerate/delivery.js +3 -3
- package/dist/regenerate/drift.d.ts +4 -0
- package/dist/regenerate/drift.js +26 -6
- package/dist/regenerate/failure-reports.d.ts +28 -0
- package/dist/regenerate/failure-reports.js +79 -0
- package/dist/regenerate/job-panel.js +3 -1
- package/dist/regenerate/jobs-tree.js +1 -1
- package/dist/regenerate/jobs.d.ts +4 -2
- package/dist/regenerate/jobs.js +14 -10
- package/dist/regenerate/launch.d.ts +154 -0
- package/dist/regenerate/{release.js → launch.js} +195 -51
- package/dist/regenerate/ledger-view.d.ts +11 -24
- package/dist/regenerate/ledger-view.js +14 -60
- package/dist/regenerate/ledger.d.ts +34 -16
- package/dist/regenerate/ledger.js +1 -1
- package/dist/regenerate/lineage.d.ts +2 -0
- package/dist/regenerate/lineage.js +8 -0
- package/dist/regenerate/loop.d.ts +54 -67
- package/dist/regenerate/loop.js +312 -148
- package/dist/regenerate/model-names.d.ts +33 -0
- package/dist/regenerate/{engine.js → model-names.js} +2 -28
- package/dist/regenerate/paths.d.ts +3 -3
- package/dist/regenerate/paths.js +4 -4
- package/dist/regenerate/records.d.ts +11 -0
- package/dist/regenerate/records.js +15 -0
- package/dist/regenerate/regenerate.d.ts +0 -2
- package/dist/regenerate/regenerate.js +4 -15
- package/dist/regenerate/renames.js +4 -4
- package/dist/regenerate/requires.d.ts +7 -0
- package/dist/regenerate/requires.js +24 -18
- package/dist/regenerate/scripts-being-written.d.ts +4 -4
- package/dist/regenerate/scripts-being-written.js +3 -3
- package/dist/regenerate/spec-map.js +3 -3
- package/dist/regenerate/standing.js +1 -1
- package/dist/regenerate/submit-work.d.ts +2 -0
- package/dist/regenerate/submit-work.js +8 -3
- package/dist/regenerate/test-scripts.d.ts +2 -1
- package/dist/regenerate/test-scripts.js +33 -23
- package/dist/regenerate/testing-steps.d.ts +16 -5
- package/dist/regenerate/testing-steps.js +28 -9
- package/dist/regenerate-cli.js +18 -9
- package/dist/self-invocation.d.ts +11 -0
- package/dist/self-invocation.js +36 -10
- package/dist/sentinel-check.d.ts +3 -3
- package/dist/sentinel-check.js +3 -3
- package/dist/sentinel.d.ts +18 -12
- package/dist/sentinel.js +75 -46
- package/dist/{config-command.d.ts → settings.d.ts} +13 -8
- package/dist/{config-command.js → settings.js} +155 -24
- package/dist/setup.d.ts +2 -2
- package/dist/setup.js +7 -7
- package/dist/skill.d.ts +0 -11
- package/dist/skill.js +0 -9
- package/dist/tools.js +2 -3
- package/dist/turri-versions.js +2 -1
- package/docs/README.md +4 -6
- package/docs/authoring-plain.md +3 -3
- package/docs/chats.md +6 -9
- package/docs/claude-subscription.md +2 -2
- package/docs/config.md +61 -51
- package/docs/development.md +4 -5
- package/docs/headless.md +7 -6
- package/docs/hosting.md +25 -24
- package/docs/launch.md +67 -0
- package/docs/parser.md +3 -3
- package/docs/regenerating.md +30 -22
- package/docs/sandbox.md +3 -3
- package/docs/sentinel.md +28 -16
- package/docs/skills-and-gates.md +6 -11
- package/docs/using.md +25 -42
- package/genome/rules/project-model.md +2 -1
- package/genome/rules/test-plain-files.md +15 -7
- package/genome/rules/turri-regeneration.md +7 -10
- package/genome/skills/convert-old-syntax/SKILL.md +5 -5
- package/genome/skills/implement-conformance-testing-script/SKILL.md +2 -2
- package/genome/skills/implement-unit-testing-script/SKILL.md +3 -3
- package/package.json +1 -1
- package/dist/advisor-chat.d.ts +0 -63
- package/dist/advisor-chat.js +0 -290
- package/dist/change-plain-cli.js +0 -55
- package/dist/ledger-cli.d.ts +0 -1
- package/dist/ledger-cli.js +0 -50
- package/dist/ledger-tools.d.ts +0 -10
- package/dist/ledger-tools.js +0 -64
- package/dist/regenerate/advisor-records.d.ts +0 -93
- package/dist/regenerate/advisor-records.js +0 -110
- package/dist/regenerate/advisor-runs.d.ts +0 -87
- package/dist/regenerate/advisor-runs.js +0 -327
- package/dist/regenerate/engine.d.ts +0 -52
- package/dist/regenerate/release.d.ts +0 -121
- package/dist/regenerate/test-advisor.d.ts +0 -101
- package/dist/regenerate/test-advisor.js +0 -379
- package/dist/release-agent.d.ts +0 -43
- package/dist/release-agent.js +0 -130
- package/dist/release-cli.d.ts +0 -1
- package/dist/release-tools.d.ts +0 -44
- package/dist/release-tools.js +0 -170
- package/dist/spec-tools.d.ts +0 -36
- package/dist/spec-tools.js +0 -128
- package/dist/stacks.d.ts +0 -13
- package/dist/stacks.js +0 -96
- package/docs/deploy.md +0 -48
- package/docs/test-advisor.md +0 -110
- /package/dist/{change-plain-cli.d.ts → launch-cli.d.ts} +0 -0
package/docs/config.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# The project config
|
|
2
2
|
|
|
3
|
-
A project says how its \*\*\*plain is built in `config.turri.yaml`, at the project root. Everything in it is optional: with no file at all, turri finds the testing scripts on its own, turns conformance tests on wherever a module has test reqs, and runs on [pi](https://pi.dev)'s configured model. A project whose parts are on different stacks - a backend and a frontend -
|
|
3
|
+
A project says how its \*\*\*plain is built in `config.turri.yaml`, at the project root. Everything in it is optional: with no file at all, turri finds the testing scripts on its own, turns conformance tests on wherever a module has test reqs, and runs on [pi](https://pi.dev)'s configured model. A project whose parts are on different stacks - a backend and a frontend - gives a module a file of its own, `config.turri.<module>.yaml`, beside it, which builds that module and those built on it (see [a module's own config](#a-modules-own-config)). turri never writes a `config.yaml`: it may be another tool's, and is read only by a project that has no file of turri's yet (see [the old config.yaml](#the-old-configyaml)). A key in `config.turri.yaml` or a module's file that turri reads nothing of - a setting it no longer has, like `test-advisor`, or one misspelt - is named in a warning under the banner as turri starts, rather than ignored without a word. A key turri has renamed is renamed in the file itself as turri first reads or writes the project's config - `release-after-pulse`, now `launch-after-pulse` - its value and its comment kept, and the banner says so; a file that sets the new name too is left as it is, the banner saying the old one does nothing.
|
|
4
4
|
|
|
5
5
|
`turri init-config` starts one: the two models, a strong one to talk to and a smaller one to write the code. It asks which vendor's models you use - `--vendor` says it without asking, and with neither, as from a script, it is `other`:
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@ Beside a `config.yaml` - another tool's, say - the new file takes from it the ke
|
|
|
32
32
|
|
|
33
33
|
## Where it is read from
|
|
34
34
|
|
|
35
|
-
\*\*\*plain belongs to its **project**: the nearest folder, from its own folder up, that holds a `config.turri.yaml`, a
|
|
35
|
+
\*\*\*plain belongs to its **project**: the nearest folder, from its own folder up, that holds a `config.turri.yaml`, a module's `config.turri.<module>.yaml`, the old `config.yaml` or a `plain_modules/`. Without any of them, the \*\*\*plain description's own folder is the project. That folder's config is the one read, and its `plain_modules/` is where the code is built, wherever turri was started. So a project that keeps its \*\*\*plain in `plain/`, with `plain/config.turri.yaml`, builds `plain/app.plain` by `plain/config.turri.yaml` even when `turri` runs in the folder above.
|
|
36
36
|
|
|
37
37
|
When it is read:
|
|
38
38
|
|
|
@@ -41,7 +41,19 @@ When it is read:
|
|
|
41
41
|
|
|
42
42
|
## Changing it from the chat
|
|
43
43
|
|
|
44
|
-
`/
|
|
44
|
+
`/settings` changes any key in the chat, and writes it into the `config.turri.yaml` of the folder turri was started in - its comments, and the commented-out examples, kept. Alone, it lists every key with what it is now, and asks for the value of the one you pick the way the key takes it: `true` or `false`, one of its words, a number from a few offered or typed, a model from those this machine can reach and then how hard it thinks, a script or a `.plain` file the project has, rules ticked on and off. `/settings review` asks for review's value; `/settings review false` sets it, and `/settings review unset` takes it out, back to its default. Completion offers the keys, then each one's values. Each role's model and turn limit is `models.<role>` and `models.<role>.turn-limit` - `models.coding`, `models.planner.turn-limit`. It takes [pi](https://pi.dev)'s own `/settings` over: pi's menu - the theme, the editor, how the chat is shown - is the last entry of its list.
|
|
45
|
+
|
|
46
|
+
You can ask the chat too - "regenerate with gpt 5.5 from now on" - and its `settings` tool writes `coding-model` for you, the model checked as it is written, by the name you said: one that fits several models, or none signed in, comes back to you as a question instead. It writes into `config.turri.yaml`, or a module's own file (see [a module's own config](#a-modules-own-config)), and says what it set and when it takes effect. It changes a setting only when you ask, and some it never changes, whatever you ask - they are yours, with `/settings`:
|
|
47
|
+
|
|
48
|
+
| yours alone | why |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| `conformance-tests` | it doubles the time each change takes - see [conformance tests](#conformance-tests) |
|
|
51
|
+
| `agent-env`, `toolchains` | they hand the agents credentials, and folders of this machine past the [sandbox](sandbox.md) |
|
|
52
|
+
| `sentinel` | it checks the chat's own work |
|
|
53
|
+
| `rules-off` | it takes \*\*\*plain rules out of the chat's own prompt |
|
|
54
|
+
| `ledger-keep` | the ledger is the record of what the agents did |
|
|
55
|
+
|
|
56
|
+
A path it writes stays inside the project. For one pulse on another model, the chat passes `model` to `regenerate` or `conform` instead, and the config stays as it is.
|
|
45
57
|
|
|
46
58
|
Each change says when it takes effect. None needs turri started again - what turri fixes as it starts is changed as it runs:
|
|
47
59
|
|
|
@@ -52,17 +64,17 @@ Each change says when it takes effect. None needs turri started again - what tur
|
|
|
52
64
|
| the next pulse - one running keeps what it started with | `coding-model`, `judge-model`, every other `models.<role>`, `review`, `mutation-testing`, `turn-limit`, `compact-at`, `agent-env`, `toolchains`, `debug` |
|
|
53
65
|
| the next time the work is planned | `max-specs-per-pulse`, `max-lines-per-pulse` |
|
|
54
66
|
| the next test run - the running pulse's too | the testing scripts, `testing-scripts-run-on` |
|
|
55
|
-
| the next pulse that lands - the running one too | `
|
|
67
|
+
| the next pulse that lands - the running one too | `launch-after-pulse`, `sentinel` |
|
|
56
68
|
| the next regeneration that names no `.plain` file | `module` |
|
|
57
69
|
| the next time turri starts here | `ledger-keep`, `cache-keep` |
|
|
58
70
|
|
|
59
|
-
A coding model
|
|
71
|
+
A coding model given for this session with `--coding-model` gives way to one set here: the last word wins. It says, too, what wins over the change: `models.chat` over `harness-model` (and so on), and a module's own `config.turri.<module>.yaml`, which `/settings` does not change, for that module and those built on it. In a project still read from `config.yaml`, the first change copies it to `config.turri.yaml` first - see [the old config.yaml](#the-old-configyaml).
|
|
60
72
|
|
|
61
73
|
## The keys
|
|
62
74
|
|
|
63
75
|
```yaml
|
|
64
76
|
module: app.plain # what to build when no .plain file is named
|
|
65
|
-
conformance-tests: false # whether functional specs are conformance tested - false: none
|
|
77
|
+
conformance-tests: false # whether functional specs are conformance tested - false: none (default: false)
|
|
66
78
|
test-dir: tests # the test plain files, a folder per module (default: tests)
|
|
67
79
|
base-folder: existing-app # what a codebase that requires no module starts from (default: nothing)
|
|
68
80
|
harness-model: # the model you chat with
|
|
@@ -94,12 +106,11 @@ models: # each agent role's model, thinking and tur
|
|
|
94
106
|
| `mutation-testing` | `true` or `false`: whether the coding agent and the reviewer have `can_it_fail` - one change put in the code for one run of the unit testing script, to see that a test catches it; on a copy of the code, or in place and put back after the run (see [regenerating the code](regenerating.md#checking-its-own-work)). `turri regenerate --mutation-testing false` for one run | `true` |
|
|
95
107
|
| `rules-off` | a list of rule names - `integrations`, `concise-specs`, the files of `genome/rules/` without `.md` - left out of the conversation's prompt and every \*\*\*plain-writing agent's: a rule this project's own skills or AGENTS.md replace, such as one that says to probe a live API before any \*\*\*plain is written. `turri init-config` writes it with `integration-embedded`, `integration-embedded-testing` and `integration-standalone` - take them out when the project writes an integration against a REST API. The project's alone | none |
|
|
96
108
|
| `allow-to-stop-jobs` | `true` or `false`: whether turri stops a running job \*\*\*plain has moved on from - a functional spec it regenerates changed, or a file one links was edited - rolls it back and regenerates \*\*\*plain as it now is. `false`: the job runs to its end and lands, and what changed since is regenerated on top of it by the next job - see [regenerating the code](regenerating.md). Your own `halt` stops a job either way | `true` |
|
|
97
|
-
| `
|
|
98
|
-
| `sentinel` | `ask`, `true` or `false`: whether a chat of turri's own, the sentinel, gets every pulse that finishes - checks it, tests what was
|
|
99
|
-
| `
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
102
|
-
| `base-folder` | a folder, by path from the project root, that a codebase requiring no other module starts from instead of nothing - an existing codebase to build on, files to use (images, animations, fonts), or both. It is copied in once, before the codebase's first pulse, and never written to: from a git repo what git sees, else every file but `.git` and installed dependencies. The \*\*\*plain may refer to it, and link into it; a codebase built on another starts from that one's code, base folder and all. A stack's `config.turri.<stack>.yaml` can name its own - see [the base folder](regenerating.md#the-base-folder) | none: the codebase starts empty |
|
|
109
|
+
| `launch-after-pulse` | `true` or `false`: whether every pulse that lands code is launched, in the chat, in the background - the pulse ends as it lands, and the codebase's next pulse does not wait: the commit it landed goes on the [launch track](launch.md#the-launch-track), one launch of a codebase at a time, the newest commit winning. An agent on the coding model launches it, following the project's launch guidance (what was passed to `launch` this session, AGENTS.md, the project's skills) for how, or from `dist/<module>` without any - see [launch](launch.md#after-every-pulse). The sentinel tests each pulse in a launch that holds its commit; with it off, the chat is told how each launch went. `turri init-config` writes `true`. Formerly `release-after-pulse`: a file that still has it has it renamed as turri first reads it | `false` |
|
|
110
|
+
| `sentinel` | `ask`, `true` or `false`: whether a chat of turri's own, the sentinel, gets every pulse that finishes - checks it, tests what was launched under `launch-after-pulse`, and puts what needs you as a notice in the chat you are in - instead of the chat that asked for it. `ask`: you are asked, with what it does, before it first opens in a session - see [starting it](sentinel.md#starting-it); `true`: it opens without asking. `/sentinel` sets it from the chat. `turri init-config` writes `ask` | `ask` |
|
|
111
|
+
| `conformance-tests` | whether functional specs are conformance tested - black-box tests of the built software against the scenarios of their test plain files, run with the whole suite as more lands. `false`: none - no scenarios written or tested, no conformance testing script, and the chat's `conform` refused. Off by default for fast iteration - they make each change take about twice as long - and turned on by the person, with `/conform` - see [conformance tests](#conformance-tests). A module's `config.turri.<module>.yaml` can set its own | `false` |
|
|
112
|
+
| `test-dir` | the folder of the test plain files, by path from the project root: a module's are every `.plain` file in `<test-dir>/<module>/`, each a functional spec's conformance and acceptance scenarios - see [test plain files](parser.md#test-plain-files). A module's `config.turri.<module>.yaml` can set its own | `tests` |
|
|
113
|
+
| `base-folder` | a folder, by path from the project root, that a codebase requiring no other module starts from instead of nothing - an existing codebase to build on, files to use (images, animations, fonts), or both. It is copied in once, before the codebase's first pulse, and never written to: from a git repo what git sees, else every file but `.git` and installed dependencies. The \*\*\*plain may refer to it, and link into it; a codebase built on another starts from that one's code, base folder and all. A module's `config.turri.<module>.yaml` can name its own - see [the base folder](regenerating.md#the-base-folder) | none: the codebase starts empty |
|
|
103
114
|
| `unittests-script` | the unit testing script, by path from the project root - it runs the code's static checks too, exiting 80 when only they fail (see [the static checks](regenerating.md#the-static-checks)) | looked for - see below |
|
|
104
115
|
| `conformance-tests-script` | the conformance testing script, by path from the project root | looked for - see below |
|
|
105
116
|
| `prepare-environment-script` | optional: run as `<script> <build>` before every run of the conformance testing script, which runs only once it passes - see [the testing scripts](regenerating.md#the-testing-scripts). turri never writes one | the one `prepare_environment*.sh` at the root or in `test_scripts/`, else none |
|
|
@@ -107,11 +118,11 @@ models: # each agent role's model, thinking and tur
|
|
|
107
118
|
| `ledger-keep` | how many megabytes of the ledger - what turri did, as facts, in `.turri/ledger` - the project keeps: past it, the oldest runs' are pruned when a run first writes; `0` keeps none, and writes none; the project's alone. See [the ledger](using.md#the-ledger) | 100 |
|
|
108
119
|
| `debug` | `true` or `false`: whether turri keeps what it writes only for a person debugging it - every agent's whole log and saved session, each pulse's log, the whole outputs of its test runs and services, its agents' temporary files, and the dependencies installed in the modules a chain has left behind. `false`: only what turri reads to work is kept. `TURRI_DEBUG=1` - or `turri --debug` - turns it on for one run, and `TURRI_DEBUG=0` off; the project's alone. See [debug mode](#debug-mode) | `false` |
|
|
109
120
|
| `cache-keep` | how many megabytes of package caches the project keeps - `plain_modules/.turri/cache`, and the caches in the agents' home folders: past it, the least recently written - by the newest file in each - are removed when a run starts its first agent command, each downloaded again when it is wanted; `0` keeps none; the project's alone | 4096 |
|
|
110
|
-
| `max-specs-per-pulse` | the most functional specs the planner groups into one pulse - what builds one feature goes together, up to this many; a
|
|
111
|
-
| `max-lines-per-pulse` | the most lines of \*\*\*plain in one pulse - its functional specs with the definitions they bring; a group past it is split again, a functional spec a pulse; a
|
|
121
|
+
| `max-specs-per-pulse` | the most functional specs the planner groups into one pulse - what builds one feature goes together, up to this many; a module's file wins | 3 |
|
|
122
|
+
| `max-lines-per-pulse` | the most lines of \*\*\*plain in one pulse - its functional specs with the definitions they bring; a group past it is split again, a functional spec a pulse; a module's file wins | 120 |
|
|
112
123
|
| `parallel-jobs` | how many jobs the chat runs at once - modules that share nothing build side by side up to it; read when the chat starts, from the folder it starts in | half this machine's cores, between one and four - see [how many jobs at once](#how-many-jobs-at-once) |
|
|
113
|
-
| `agent-env` | credentials the agents' commands need while they work - a live API probed, tests run against a real service: `files: [...]`, dotenv files by path from the project root, every variable in them; `vars: [...]`, variables by name from the environment turri was started in. A
|
|
114
|
-
| `toolchains` | folders of this machine an agent's commands may read beside the system's, the `PATH`'s and those the toolchain variables point at - a toolchain installed somewhere unusual (`[/srv/zig]`). A
|
|
124
|
+
| `agent-env` | credentials the agents' commands need while they work - a live API probed, tests run against a real service: `files: [...]`, dotenv files by path from the project root, every variable in them; `vars: [...]`, variables by name from the environment turri was started in. A module's `config.turri.<module>.yaml` adds its own to the project's. See [credentials for the agents](#credentials-for-the-agents) | none: an agent's commands get no credential |
|
|
125
|
+
| `toolchains` | folders of this machine an agent's commands may read beside the system's, the `PATH`'s and those the toolchain variables point at - a toolchain installed somewhere unusual (`[/srv/zig]`). A module's add to the project's. See [the OS sandbox](sandbox.md#the-os-sandbox) | none |
|
|
115
126
|
| `turn-limit` | seconds each turn of an agent a job starts has, for every role without its own (`models:`); `0` for none. The config is the only place it is set. A turn past it ends at its next request to the model - see [regenerating the code](regenerating.md) | 120 |
|
|
116
127
|
| `models` | each agent role's own model, thinking and turn limit - see [models per role](#models-per-role) | every role on `coding-model`, the conversation's side on `harness-model` |
|
|
117
128
|
| `testing-scripts-run-on` | what the testing scripts run on - always on this machine, in your environment. `in-place`: the real build and tests folders, the script at its own path, from the project - so a script that finds a host codebase from its own path finds it. `copy`: a fresh copy of the code, staged in `plain_modules/.turri/scripts/`, with the script copied beside it. `can_it_fail` works on either: on a copy it changes the copy, in place the code itself for the one run, put back after it (see [the testing scripts](regenerating.md#the-testing-scripts)) | `in-place` |
|
|
@@ -126,11 +137,11 @@ Keys are written with dashes; underscores are read the same (`mutation_testing`)
|
|
|
126
137
|
| --- | --- |
|
|
127
138
|
| `default` | every role not named below - but the conversation's side |
|
|
128
139
|
| `chat` | `turri`'s model - the same as `harness-model`, which it wins over |
|
|
129
|
-
| `sentinel` | [the sentinel](sentinel.md): checks every finished pulse, and tests
|
|
140
|
+
| `sentinel` | [the sentinel](sentinel.md): checks every finished pulse, and tests what was launched. Unnamed, the chat's model |
|
|
130
141
|
| `planner` | the conversation's side: the planner's agents. Unnamed, the chat's model |
|
|
131
142
|
| `diagnosis` | the diagnosis of a job that failed for good: why it did not land, and what to do. Unnamed, the coding model the job ran on, thinking medium |
|
|
132
|
-
| `
|
|
133
|
-
| `coding` | the coding agent, the code fixer of a conformance run and the repair agent - the same as `coding-model`, which it wins over. `--model` on the command line, or a model
|
|
143
|
+
| `launch` | the launch agent - the chat's `launch`, `turri launch` and launch-after-pulse's: it follows steps - a script, a start command - so it runs on the coding model, thinking low |
|
|
144
|
+
| `coding` | the coding agent, the code fixer of a conformance run and the repair agent - the same as `coding-model`, which it wins over. `--model` on the command line, or a model a call to `regenerate` or `conform` names, wins over both |
|
|
134
145
|
| `conformance` | the conformance agent |
|
|
135
146
|
| `explorer` | the explorers of a conformance run |
|
|
136
147
|
| `reviewer` | the review of the code and its unit tests |
|
|
@@ -138,17 +149,16 @@ Keys are written with dashes; underscores are read the same (`mutation_testing`)
|
|
|
138
149
|
| `judge` | the judge of a failing conformance run - the same as `judge-model`, which it wins over |
|
|
139
150
|
| `arbiter` | the arbiters that weigh a second review |
|
|
140
151
|
| `debugger` | the fresh look at unit tests that keep failing the same way, or a coding agent going round in circles. Unnamed, `judge-model` when it is set, else the harness model - not `default` |
|
|
141
|
-
| `advisor` | the [test advisor](test-advisor.md): classifying a new or changed functional spec, its probes, readers and verifier |
|
|
142
152
|
|
|
143
|
-
What an entry leaves out it takes from `default`: `reviewer: { thinking: low }` runs the default model, thinking little. A turn limit is the role's own, else `default`'s, else `turn-limit:`, else two minutes. A
|
|
153
|
+
What an entry leaves out it takes from `default`: `reviewer: { thinking: low }` runs the default model, thinking little. A turn limit is the role's own, else `default`'s, else `turn-limit:`, else two minutes. A module's `config.turri.<module>.yaml` lays its own `models:` over the project's, role by role - all but `chat`, the project's alone.
|
|
144
154
|
|
|
145
|
-
A role whose thinking nothing names - neither its entry, `default`'s, nor a `:level` on the model it runs on - thinks as its kind of work needs: **low** for the agents that do the work (`coding`, `conformance`, `explorer`, `
|
|
155
|
+
A role whose thinking nothing names - neither its entry, `default`'s, nor a `:level` on the model it runs on - thinks as its kind of work needs: **low** for the agents that do the work (`coding`, `conformance`, `explorer`, `launch`), which work from \*\*\*plain that leaves little to guess and take many turns, and **medium** for the ones that judge (`reviewer`, `test-reviewer`, `judge`, `arbiter`, `debugger`, `planner`, `diagnosis`), where a wrong call costs pulses. A judging role that falls back on the coding model takes its model alone, not its thinking. The conversation keeps its own level, as [pi](https://pi.dev) sets it.
|
|
146
156
|
|
|
147
157
|
The thinking level reaches the model as each provider takes it. OpenAI's models on Bedrock are sent it as their reasoning effort (`none`, `low`, `medium`, `high`, `xhigh`) by turri itself, as [pi](https://pi.dev) sends them none.
|
|
148
158
|
|
|
149
159
|
## How many jobs at once
|
|
150
160
|
|
|
151
|
-
Jobs on the same module, or on modules of one `requires` chain, always run one after another. Modules that share nothing - a backend, a frontend, a worker, ten of them - build side by side, each pulse's builds and tests running on this machine beside your own work. So the chat runs at most `parallel-jobs` jobs at once; a job whose turn has come waits for a free slot past that, and its line says so. Unset, it is half this machine's cores, at least one and at most four. The config is the only place it is set. It is the project's alone, never read from a
|
|
161
|
+
Jobs on the same module, or on modules of one `requires` chain, always run one after another. Modules that share nothing - a backend, a frontend, a worker, ten of them - build side by side, each pulse's builds and tests running on this machine beside your own work. So the chat runs at most `parallel-jobs` jobs at once; a job whose turn has come waits for a free slot past that, and its line says so. Unset, it is half this machine's cores, at least one and at most four. The config is the only place it is set. It is the project's alone, never read from a module's file.
|
|
152
162
|
|
|
153
163
|
The testing scripts all run on this machine, each on a copy of its module's code, so they never share files - but they do share its network: two modules whose conformance scripts start a server on the same port collide when they run at once. Give each its own.
|
|
154
164
|
|
|
@@ -171,24 +181,24 @@ They are defaults. What is asked for wins over them:
|
|
|
171
181
|
| model | wins over the config |
|
|
172
182
|
| --- | --- |
|
|
173
183
|
| harness | `turri --harness-model <m>` (or [pi](https://pi.dev)'s own `--model`), and [pi](https://pi.dev)'s `/model` in the conversation |
|
|
174
|
-
| coding | `turri --coding-model <m
|
|
184
|
+
| coding | `turri --coding-model <m>` |
|
|
175
185
|
| judge | - |
|
|
176
186
|
|
|
177
|
-
`turri regenerate
|
|
187
|
+
`turri regenerate` and `conform` read `--harness-model`, `--coding-model` (or `--model`), `--judge-model` and `--review` differently: as the keys themselves, as if the file had them. Each takes its key's value and its place in the order above - a `models:` entry still wins over it - so a headless run is the same as a chat with those keys in the file.
|
|
178
188
|
|
|
179
189
|
A job keeps the model it was queued with: choosing another holds for what is queued after.
|
|
180
190
|
|
|
181
191
|
## Conformance tests
|
|
182
192
|
|
|
183
|
-
`conformance-tests: true` turns them on, a
|
|
193
|
+
`conformance-tests: true` turns them on, a module's `config.turri.<module>.yaml` able to say its own. Unset, they are off, and `turri init-config` writes `conformance-tests: false`: no scenarios are written or tested, no conformance testing script is written, no conformance pulse runs - in the work loop, from `conform` or `turri conform` - and the chat's `conform` is refused. Test plain files already there are kept and parsed, and not tested: `parse` and `drift` say so. Turning them on is yours to decide, as they make each change take about twice as long: the chat always knows what they are, that they are off, and how they are turned on, and when it thinks a module needs them - or you ask it for them - it tells you why, and leaves it to you. `/conform` turns them on: it writes `conformance-tests: true` - into the module's config file when that names the key, else `config.turri.yaml` - in effect at once, and kept for the sessions after, then tests what has scenarios and code at once. So does `/settings conformance-tests true`, without testing anything.
|
|
184
194
|
|
|
185
|
-
On, what is tested is the functional specs with scenarios - the conformance and acceptance scenarios of each one's test plain file, `<test-dir>/<module>/<func-id>.plain` - in every module with `***test reqs***`. A functional spec with no test plain file is not tested, and a module with no functional spec with scenarios gets no conformance pulse at all - but keeps the codebase's existing tests passing. `test-dir` says where the test plain files are. To have a functional spec tested, write its scenarios: the chat writes them with `
|
|
195
|
+
On, what is tested is the functional specs with scenarios - the conformance and acceptance scenarios of each one's test plain file, `<test-dir>/<module>/<func-id>.plain` - in every module with `***test reqs***`. A functional spec with no test plain file is not tested, and a module with no functional spec with scenarios gets no conformance pulse at all - but keeps the codebase's existing tests passing. `test-dir` says where the test plain files are. To have a functional spec tested, write its scenarios: the chat writes them with its file tools, then calls `regenerate`, when you ask for conformance tests (see [conformance tests](regenerating.md#conformance-tests)).
|
|
186
196
|
|
|
187
197
|
## The testing scripts
|
|
188
198
|
|
|
189
199
|
A build needs a unit testing script - and, with conformance on, a conformance testing script - to decide when it is done. They are looked for at the project root, in this order:
|
|
190
200
|
|
|
191
|
-
1. named in the config - the
|
|
201
|
+
1. named in the config - the module's own file first (or the one of a module it requires), then `config.turri.yaml` - by path from the root;
|
|
192
202
|
2. the one `run_unittests*.sh` / `run_conformance_tests*.sh` in the project root;
|
|
193
203
|
3. the one of each in `test_scripts/`.
|
|
194
204
|
|
|
@@ -203,15 +213,15 @@ turri writes much more than it needs to work, for a person working out why it di
|
|
|
203
213
|
| | outside debug mode | in debug mode |
|
|
204
214
|
| --- | --- | --- |
|
|
205
215
|
| each pulse's log (`.turri/jobs/`) and its agents' (`.turri/debug/`) | written while the pulse runs - the diagnosis of a failure reads them - and removed as it ends | kept |
|
|
206
|
-
| the logs of agents outside a pulse - the
|
|
216
|
+
| the logs of agents outside a pulse - the launch agent, a side question | not written | kept |
|
|
207
217
|
| the agents' saved sessions (`.turri/sessions/`) | not written - each is kept in memory while it works; a gated skill's alone is saved, as its run resumes from it | kept |
|
|
208
218
|
| whole outputs of test runs and services (`plain_modules/.turri/logs/`, `services/`) | read by the pulse's agents while it runs, removed as it ends | kept, the last 100 outputs |
|
|
209
219
|
| a module's `TMPDIR` (`plain_modules/.turri/tmp/<module>`) | emptied as each of its pulses ends | kept |
|
|
210
220
|
| dependencies installed in the modules below a pulse's own in its chain (`node_modules`, `.venv`) | removed as the pulse ends: the chain is built in its tip, and a module built on again installs them again, from the cache | kept |
|
|
211
221
|
|
|
212
|
-
Kept either way: the ledger - what each pulse did, how it ended, what it cost (see [the ledger](using.md#the-ledger)) - the code, its tests and their history, a gated skill's run, what a conformance explorer found, what
|
|
222
|
+
Kept either way: the ledger - what each pulse did, how it ended, what it cost (see [the ledger](using.md#the-ledger)) - and, for each pulse that failed or finished without landing, why: its report in `.turri/pulses/<id>.md` - its diagnosis, the stages that went wrong, the last failing test run's output, the last review that sent the work back, the tool calls that failed - which `pulses` tells with it in a later session, the newest 200 kept and none where `ledger-keep: 0`; the code, its tests and their history, a gated skill's run, what a conformance explorer found, what a launch started, and the package caches, held to `cache-keep:`. The testing scripts install what they run with themselves, so nothing removed is ever missed by a test run.
|
|
213
223
|
|
|
214
|
-
Turn it on in `config.turri.yaml` (`debug: true`, or `/
|
|
224
|
+
Turn it on in `config.turri.yaml` (`debug: true`, or `/settings debug true`), or for one run with `TURRI_DEBUG=1` or `turri --debug`.
|
|
215
225
|
|
|
216
226
|
## Credentials for the agents
|
|
217
227
|
|
|
@@ -225,22 +235,23 @@ agent-env:
|
|
|
225
235
|
vars: [D365_TENANT_ID] # these variables, from the environment turri was started in
|
|
226
236
|
```
|
|
227
237
|
|
|
228
|
-
What it names reaches every agent with a shell, as environment variables of its commands only - the file stays where it is, outside every agent's reach - and never replaces turri's own home, `TMPDIR` or caches. A
|
|
238
|
+
What it names reaches every agent with a shell, as environment variables of its commands only - the file stays where it is, outside every agent's reach - and never replaces turri's own home, `TMPDIR` or caches. A module's file adds to the project's. A file that is not there, or a variable unset or empty, is reported as missing. The testing scripts are not affected: they run in your own environment.
|
|
229
239
|
|
|
230
240
|
Their values never appear in what an agent is shown or what turri writes: each is replaced by its name - `[D365_CLIENT_SECRET]` - whole, URL-encoded, or split over a command's output as it streams: in every tool result and refusal an agent is given (and so in the session transcripts, which hold only those), in the whole outputs kept for `read_output`, and in the job and debug logs. A value shorter than four characters is not masked - `1` or `eu` is everywhere in ordinary output.
|
|
231
241
|
|
|
232
|
-
##
|
|
242
|
+
## A module's own config
|
|
233
243
|
|
|
234
|
-
One project can hold parts that share nothing but a common module - a Python backend and a React frontend side by side, each importing `base` from `template/`, neither requiring the other - each needing its own testing scripts.
|
|
244
|
+
One project can hold parts that share nothing but a common module - a Python backend and a React frontend side by side, each importing `base` from `template/`, neither requiring the other - each needing its own testing scripts. A module can have a file of its own beside `config.turri.yaml`, `config.turri.<module>.yaml`, holding what differs for it - typically its testing scripts, its `toolchains:`, its models:
|
|
235
245
|
|
|
236
246
|
```
|
|
237
247
|
config.turri.yaml # the project's: harness-model, coding-model, review
|
|
238
|
-
config.turri.backend.yaml #
|
|
239
|
-
config.turri.frontend.yaml #
|
|
248
|
+
config.turri.backend.yaml # backend.plain's: its testing scripts
|
|
249
|
+
config.turri.frontend.yaml # frontend.plain's: its testing scripts, and a coding model of its own
|
|
240
250
|
backend.plain # import: [base, python_fastapi_template]
|
|
251
|
+
backend_auth.plain # requires: [backend] - built with config.turri.backend.yaml too
|
|
241
252
|
frontend.plain # import: [base, react_vite_template]
|
|
242
253
|
template/ # base.plain, python_fastapi_template.plain, react_vite_template.plain
|
|
243
|
-
test_scripts/ # both
|
|
254
|
+
test_scripts/ # both modules' scripts
|
|
244
255
|
```
|
|
245
256
|
|
|
246
257
|
```yaml
|
|
@@ -251,27 +262,26 @@ coding-model:
|
|
|
251
262
|
thinking: high
|
|
252
263
|
```
|
|
253
264
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
- **The one a call names.** `regenerate`, `conform`, `glimpse` and `change_plain` take a `stack`; the chat's model passes it for a module whose stack has a name of its own, leaving the chat's choice as it is.
|
|
257
|
-
- **The stack named after the module** - `config.turri.backend.yaml` builds `backend.plain` - with nothing to choose or pass. Name each stack after the module it builds, and a backend and a frontend are each built with their own, side by side - in the chat, as each change is written, and on the command line.
|
|
258
|
-
- **The one chosen in the chat** - each [chat](chats.md) its own - with `/stack` - a list of the project's stacks and none - or `/stack backend`, `/stack none`. The chat's model has a `stack` tool too, and switches the stack when you ask it to. `/stack` alone says which is chosen now. On the command line, with `--stack <name>` on any command - `turri regenerate`, `conform`, `change-plain`, `glimpse`, `release`, `cultivate` - and on `turri --stack backend` for the chat; or with `TURRI_STACK` in the environment.
|
|
265
|
+
Nobody chooses which file builds a module: turri works it out from the module, the same in the chat and on the command line.
|
|
259
266
|
|
|
260
|
-
|
|
267
|
+
1. **`config.turri.yaml`**, by default.
|
|
268
|
+
2. **The module's own file**, `config.turri.<module>.yaml`, laid over it.
|
|
269
|
+
3. **The file of a module it requires**, when it has none of its own - all the way down its `requires` chain. A module is built on the code of those it requires, in one codebase, with their testing scripts: `backend_auth.plain` is built with `config.turri.backend.yaml`, and so is every module built on it that has no file of its own. Only `requires` counts, not `import`.
|
|
270
|
+
4. **An error**, when two modules it requires have a file of their own and it has none: which one builds it cannot be told. `turri parse` says so, and `regenerate` and `conform` refuse it - give the module its own file, or keep one of theirs.
|
|
261
271
|
|
|
262
|
-
How a
|
|
272
|
+
How a module's config is made:
|
|
263
273
|
|
|
264
|
-
- **Laid over `config.turri.yaml`, key by key.** What the
|
|
265
|
-
- **Pinned to
|
|
266
|
-
- **Refused
|
|
267
|
-
- **The project's alone.** `module:`, `harness-model:`, `parallel-jobs:`, `rules-off:`, `compact-at:`, `ledger-keep:`, `debug:` and `cache-keep:` are read only from `config.turri.yaml` - there is one conversation, one module built when none is named, one machine. `agent-env:` and `toolchains:` in a
|
|
274
|
+
- **Laid over `config.turri.yaml`, key by key.** What the module's file gives wins; what it leaves out is the project's. A model it names takes what it leaves out from the project's same model - above, `frontend.plain` regenerates on the project's coding model, thinking `high`.
|
|
275
|
+
- **Pinned to each pulse.** A pulse runs with the config it was planned with - its test runs, the scripts found, its agents - and a pulse waiting for a free slot keeps the one it was queued with. A module is looked at again each time it is asked for or its \*\*\*plain changes: a file added since is used from its next pulse. What `regenerate` says back names the file each module is built with, and so does a pulse's report.
|
|
276
|
+
- **Refused when that cannot build.** In a project where modules have files of their own, a module with none - and none among the modules it requires - is refused before anything is planned when `config.turri.yaml` alone names no unit testing script: every pulse would stop for want of one. The refusal names the modules' files and the script each names. Give the module a file of its own - the chat's `settings` tool writes one, with `module` - or name the script in `config.turri.yaml`.
|
|
277
|
+
- **The project's alone.** `module:`, `harness-model:`, `parallel-jobs:`, `rules-off:`, `compact-at:`, `ledger-keep:`, `debug:` and `cache-keep:` are read only from `config.turri.yaml` - there is one conversation, one module built when none is named, one machine. `agent-env:` and `toolchains:` in a module's file add to the project's.
|
|
268
278
|
|
|
269
|
-
The chat is told each
|
|
279
|
+
The chat is told each module's file and the modules it builds. The skills that write testing scripts put each module's scripts in its own file once a project has two, named after the module at the bottom of its chain.
|
|
270
280
|
|
|
271
281
|
## The old config.yaml
|
|
272
282
|
|
|
273
|
-
turri's settings were once in `config.yaml`, and a
|
|
283
|
+
turri's settings were once in `config.yaml`, and a module's own in `config.<module>.yaml`. A `config.yaml` may be another tool's, so turri never writes one. While a project folder has no `config.turri*.yaml` at all, turri still reads its `config.yaml`, and each `config.<name>.yaml` as the module `<name>`'s own.
|
|
274
284
|
|
|
275
|
-
The first time turri itself writes a setting there with `/
|
|
285
|
+
The first time turri itself writes a setting there with `/settings`, it copies `config.yaml` to `config.turri.yaml` and each `config.<name>.yaml` to `config.turri.<name>.yaml` first, leaves the old files as they are, and from then on reads only the new ones. `turri init-config` copies the modules' files the same way, but writes `config.turri.yaml` as its quick start, taking from `config.yaml` only the keys turri reads too - `unittests-script`, `conformance-tests-script` and `prepare-environment-script`, say - each in its place in the file, and saying which keys it left: `template_dir`, `verbose`, `api`, the other tool's alone. The two models are the vendor's, never taken. To change a setting by hand in such a project, do the same: copy the files to their new names, and edit the copies - never `config.yaml`. Writing a `config.turri.yaml` of your own beside it is the same move: from then on `config.yaml` is not read, its testing scripts with it. For a headless run that only needs conformance tests or another judge, or review, those options leave the files alone: `--conformance-tests`, `--judge-model`, `--review true|false`, and the models' too.
|
|
276
286
|
|
|
277
287
|
Keys turri does not read - another tool's `verbose`, `api-key`, `build-folder`, ... - are ignored without a word, and so is a value of the wrong type. A file that does not parse as YAML is read as empty, so its testing scripts are then looked for by name.
|
package/docs/development.md
CHANGED
|
@@ -38,7 +38,6 @@ The workflow signs in to npm with npm's trusted publishing (OIDC), not a token:
|
|
|
38
38
|
| `src/extension.ts` | the [pi](https://pi.dev) extension: every tool and command the conversation has - and `createTurriCore`, the session it is built into |
|
|
39
39
|
| `src/chats.ts`, `src/chat-scope.ts`, `src/chat-records.ts` | the session's [chats](chats.md): which chat a pulse is told to, each chat's scope - its id and stack - and `.turri/chats.json` |
|
|
40
40
|
| `src/sentinel.ts`, `src/sentinel-chat.ts` | [the sentinel](sentinel.md): its prompt, what it is told of a pulse, its fenced tools, its guidance; notices - their cards, the terminal's dialog, their answers |
|
|
41
|
-
| `src/regenerate/advisor-runs.ts`, `src/regenerate/test-advisor.ts`, `src/regenerate/advisor-records.ts`, `src/advisor-chat.ts` | [the test advisor](test-advisor.md): which functional specs it takes and when, its model calls, its file in `.turri/advisor/`, and how its verdicts reach the chat |
|
|
42
41
|
| `src/chat-terminal.ts`, `src/chat-ui.ts`, `src/chat-commands.ts` | the terminal's chats: [pi](https://pi.dev)'s screen switched between live sessions, a hidden chat's stand-in for it, `/chat` and its keys |
|
|
43
42
|
| `src/host-session.ts` | `createTurri`, the session for a host |
|
|
44
43
|
| `src/skill.ts` | parses `SKILL.md` into steps and gates |
|
|
@@ -46,7 +45,6 @@ The workflow signs in to npm with npm's trusted publishing (OIDC), not a token:
|
|
|
46
45
|
| `src/judge.ts` | runs independent judges, applies the quorum, builds the critique |
|
|
47
46
|
| `src/genome.ts` | `runSkill()` - the one entry point the CLI and the extension share |
|
|
48
47
|
| `src/pi.ts` | [pi](https://pi.dev) session factories for executors, sub-agents and judges |
|
|
49
|
-
| `src/spec-tools.ts` | `change_plain` |
|
|
50
48
|
| `src/loop-tools.ts` | `regenerate`, `drift` and `halt` - one definition each, for the conversation and the skills alike |
|
|
51
49
|
| `src/plain/` | the [\*\*\*plain](https://plainlang.org/docs/) parser - see [parser](parser.md) - and `highlight.ts`, which highlights \*\*\*plain with turri's own grammar, `plain.tmLanguage.json` - started from [plyn](https://github.com/plainlang/plyn)'s at `f9c02b8`, and changed here since: test plain files' sections and keys, the `# <id>` heading |
|
|
52
50
|
| `src/regenerate/conformance.ts` | conformance tests: writing them, and fixing the test or the code until they pass |
|
|
@@ -55,16 +53,17 @@ The workflow signs in to npm with npm's trusted publishing (OIDC), not a token:
|
|
|
55
53
|
| `src/regenerate/chunk-plan.ts`, `src/regenerate/cases.ts` | cutting the work into jobs, and what a job's agents are told by its cases |
|
|
56
54
|
| `src/regenerate/regression.ts` | the whole conformance suite run, and the repair agent that may not touch tests |
|
|
57
55
|
| `src/regenerate/lineage.ts` | module history in `.plaingit` |
|
|
58
|
-
| `src/regenerate/
|
|
56
|
+
| `src/regenerate/launch.ts`, `src/launch-track.ts`, `src/launch-session.ts`, `src/launch-agent.ts`, `src/launch-tools.ts`, `src/launch-cli.ts` | launch: a commit to `dist/<module>`, the launch track, the launch agent and what it starts on the host - see [launch](launch.md) |
|
|
59
57
|
| `src/regenerate/confine.ts`, `src/regenerate/agent-shell.ts`, `src/regenerate/command-check.ts`, `src/regenerate/os-sandbox.ts`, `src/regenerate/audit.ts`, `src/regenerate/agent-env.ts`, `src/regenerate/shell.ts` | the file-tool fence and the walls around every agent command: the check, the OS sandbox, the audit, the module's environment, the host runner - see [sandbox](sandbox.md) |
|
|
60
|
-
| `src/regenerate/
|
|
58
|
+
| `src/regenerate/model-names.ts` | resolving a model named as the person said it - for a call's `model` and the `settings` tool |
|
|
61
59
|
| `src/regenerate/job-panel.ts`, `src/regenerate/transcript-view.ts`, `src/regenerate/diff-view.ts` | the job panel, the side panel's colours, and a \*\*\*plain diff as they show it - highlighted and banded |
|
|
62
60
|
| `src/regenerate/side-panel.ts`, `src/regenerate/panel-dock.ts` | the side panel, and the chat narrowed beside it when it is docked |
|
|
63
61
|
| `src/screen-padding.ts` | the blank row above and below the whole screen and the two columns either side, in both of [pi](https://pi.dev)'s ways of drawing it |
|
|
64
62
|
| `src/regenerate/spec-map.ts`, `src/regenerate/spec-map-view.ts` | regen: each item's mark, from the records, the `.plain` files and the work loop's plan (`mapPlan`), and the map drawn |
|
|
65
63
|
| `src/regenerate/debug-log.ts` | each regenerating agent's whole conversation, streamed to `.turri/debug/` - while its pulse runs, and kept in debug mode |
|
|
66
64
|
| `src/regenerate/pulse-files.ts` | what a pulse writes only for a person - its logs, outputs, temporary files, its chain's installed dependencies - removed as it ends outside debug mode |
|
|
67
|
-
| `src/regenerate/
|
|
65
|
+
| `src/regenerate/failure-reports.ts` | why a pulse that failed or finished without landing did - what `pulses` says of it - kept in `.turri/pulses/<id>.md` whatever the debug setting, for a later session |
|
|
66
|
+
| `src/regenerate/ledger.ts`, `src/regenerate/ledger-view.ts` | the ledger: what turri did, as typed facts, in `.turri/ledger/` - `record()`, read back for `pulses` - see [the ledger](using.md#the-ledger) |
|
|
68
67
|
| `genome/` | what turri knows and can do: `genome/skills/`, the skill library, and `genome/rules/`, the \*\*\*plain authoring rules |
|
|
69
68
|
|
|
70
69
|
## Known edges
|
package/docs/headless.md
CHANGED
|
@@ -27,7 +27,7 @@ turri parse app.plain
|
|
|
27
27
|
turri regenerate app.plain --model anthropic/claude-sonnet-5
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
That builds every functionality in order - code and unit tests, then conformance tests when the module has `***test reqs***`, then every conformance test so far - and advances only when they pass. A module that `requires` others builds them first, bottom up. When it is done it prints `To try it: turri
|
|
30
|
+
That builds every functionality in order - code and unit tests, then conformance tests when the module has `***test reqs***`, then every conformance test so far - and advances only when they pass. A module that `requires` others builds them first, bottom up. When it is done it prints `To try it: turri launch <spec>` - see [launch](launch.md).
|
|
31
31
|
|
|
32
32
|
Keep it running when the terminal closes and the laptop would sleep, and keep the log:
|
|
33
33
|
|
|
@@ -51,7 +51,7 @@ coding-model: # the model every agent runs on, and h
|
|
|
51
51
|
judge-model: anthropic/claude-opus-5-5 # the judge and the test review (default: coding-model)
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
The same file names the [testing scripts](regenerating.md#the-testing-scripts); every key is in [the project config](config.md). `turri regenerate
|
|
54
|
+
The same file names the [testing scripts](regenerating.md#the-testing-scripts); every key is in [the project config](config.md). `turri regenerate` and `conform` take four of its keys on the command line too - `--harness-model`, `--coding-model` (`--model` is the same), `--judge-model` and `--review`. Each is read as if the file had it, in its place: it takes that key's value, and every key keeps its place in the order the config resolves them in - a `models:` entry still wins over `harness-model`, `coding-model` or `judge-model`, the planner runs on the harness model, the judge falls back on the coding model. So a run with the options is the same as one, or a chat, with those keys in `config.turri.yaml` - and a `config.yaml` the project has is left as it is. A project whose parts are on different stacks gives a module its own settings in `config.turri.<module>.yaml` beside it ([a module's own config](config.md#a-modules-own-config)): `turri regenerate backend.plain` builds with `config.turri.backend.yaml`, and so does every module built on `backend.plain` that has no file of its own - with nothing to choose. A module with none, and none below it, is built with `config.turri.yaml` alone.
|
|
55
55
|
|
|
56
56
|
Useful options - `turri regenerate --help` lists all of them:
|
|
57
57
|
|
|
@@ -62,9 +62,9 @@ Useful options - `turri regenerate --help` lists all of them:
|
|
|
62
62
|
| `--judge-model <provider/id>` | `judge-model`: the judge and the test review; not given, the coding model |
|
|
63
63
|
| `--review <true\|false>` | `review`: whether the code and its tests are reviewed once they pass |
|
|
64
64
|
| `--mutation-testing <true\|false>` | `mutation-testing`: whether the coding agent and the reviewer have `can_it_fail` |
|
|
65
|
-
| `--stack <name>` | build with the stack's `config.turri.<name>.yaml` over `config.turri.yaml`; default, `TURRI_STACK`, else none |
|
|
66
65
|
| `--from-scratch` | delete the module's code and conformance tests (its lineage keeps them) and regenerate all of it |
|
|
67
66
|
| `--from-scratch-chain` | the same for every module of its requires chain, the base's included, built again from the bottom |
|
|
67
|
+
| `turri conform --from-scratch` | take out the tests folder at the tip of the module's chain (its lineage keeps it) and write the tests again from a copy of the tests of the module the tip requires, the code untouched; `--from-scratch-chain`, from nothing |
|
|
68
68
|
| `--start-over` | start over, unasked, a codebase built without a module it now requires - without a terminal, a run that needs it and lacks it stops |
|
|
69
69
|
| `--build-dir <dir>` | as the run ends, export the code there - see below |
|
|
70
70
|
| `--report <file.json>` | write [the run report](#the-run-report) there |
|
|
@@ -82,7 +82,8 @@ The command exits `0` only when every module is complete: its code regenerated f
|
|
|
82
82
|
| `plain_modules/<module>/code/` | the code and unit tests |
|
|
83
83
|
| `plain_modules/<module>/tests/` | the conformance tests |
|
|
84
84
|
| `plain_modules/<module>/code/.turri.json` | the marshalled plain tree the code is built from |
|
|
85
|
-
| `.turri/ledger/` | what each pulse did, how it ended and what it cost - `
|
|
85
|
+
| `.turri/ledger/` | what each pulse did, how it ended and what it cost - `pulses` in the chat reads it back |
|
|
86
|
+
| `.turri/pulses/` | why each pulse that failed or finished without landing did - its diagnosis, the last failing test run's output, the last review, the tool calls that failed - kept whatever the debug setting |
|
|
86
87
|
| `.turri/jobs/` | each pulse's log: its agents, its test runs, how it ended - with `--debug` (or `debug: true`) only |
|
|
87
88
|
| `.turri/debug/` | each agent's whole conversation - with `--debug` only |
|
|
88
89
|
|
|
@@ -170,7 +171,7 @@ A module that `requires` others is built in its own codebase on top of theirs: t
|
|
|
170
171
|
|
|
171
172
|
**Pulses.** `landed`: its work is committed. `rolled_back`: it ended without landing - failed, stopped, or did not pass - and everything it wrote was undone. A pulse that failed is tried once more before it counts as failed; both tries are the one pulse.
|
|
172
173
|
|
|
173
|
-
**Time to first regeneration.** `pulses.first_started_seconds` is how long after the run started its first code pulse started - planning the work, and any wait for a free slot, before it - and `first_landed_seconds` how long until the first one landed, when there is first something to try. Both are `null` until it happens.
|
|
174
|
+
**Time to first regeneration.** `pulses.first_started_seconds` is how long after the run started its first code pulse started - planning the work, and any wait for a free slot, before it - and `first_landed_seconds` how long until the first one landed, when there is first something to try. Both are `null` until it happens.
|
|
174
175
|
|
|
175
176
|
**Gaps in \*\*\*plain.** A behaviour \*\*\*plain leaves open that an agent met and decided on its own - reported with `report_spec_gap` (see [regenerating](regenerating.md)). In the chat they are put to you as the pulse ends; a headless run has no one to ask, so they are listed here, in the order the pulses started, and printed under the pulse that met them. `assumption` is what the agent decided meanwhile, also in the codebase's notes' assumptions while its pulse is `landed`; a pulse rolled back takes it out of the notes, but the question still stands. Settle the ones you care about in \*\*\*plain and run again.
|
|
176
177
|
|
|
@@ -225,4 +226,4 @@ turri regenerate app.plain --harness-model amazon-bedrock/eu.anthropic.claude-op
|
|
|
225
226
|
nohup turri -p "Render app.plain as a whole module, with conformance tests" > render.log 2>&1 &
|
|
226
227
|
```
|
|
227
228
|
|
|
228
|
-
It reports what it did at the end, and nothing streams in between, so for long runs `turri regenerate` is the better choice. A skill that interviews needs someone to answer; without one it decides and record their assumptions, and a gate that escalates to a human stops the run.
|
|
229
|
+
It reports what it did at the end, and nothing streams in between, so for long runs `turri regenerate` is the better choice. A tool that waited - `regenerate`, `conform` - comes back with every pulse of the chat that ran while it waited, each with its report or why it did not land, before how each module stands; those pulses' ends start no turn of their own after it, so the answer says each once. A module waiting for a testing script being written beside it - a skill run in the same turn - is waited for too, until its pulse has run. A skill that interviews needs someone to answer; without one it decides and record their assumptions, and a gate that escalates to a human stops the run.
|