@turri-dev/cli 0.1.3 → 0.1.4-next.172be6f
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 +22 -1
- package/dist/ask.js +34 -15
- package/dist/cli-options.js +12 -6
- package/dist/config-edit.js +1 -0
- package/dist/config.js +5 -2
- package/dist/extension.js +45 -14
- package/dist/genome.js +1 -1
- package/dist/init-config.js +5 -0
- package/dist/loop-cli.js +13 -1
- package/dist/loop-tools.js +31 -12
- package/dist/pi.js +48 -19
- package/dist/question-dialog.js +1 -0
- package/dist/regenerate/activity.js +12 -0
- package/dist/regenerate/list-arguments.js +121 -0
- package/dist/regenerate/loop.js +115 -14
- package/dist/regenerate/regenerate.js +4 -2
- package/dist/regenerate/self-check.js +13 -6
- package/dist/regenerate/test-scripts.js +54 -10
- package/dist/regenerate/unit-review.js +1 -1
- package/dist/regenerate-cli.js +11 -5
- package/dist/release-tools.js +1 -1
- package/dist/review/live.js +2 -1
- package/dist/run-report.js +34 -1
- package/dist/spec-tools.js +2 -1
- package/docs/config.md +3 -2
- package/docs/headless.md +30 -3
- package/docs/installation.md +3 -0
- package/docs/regenerating.md +43 -8
- package/docs/skills-and-gates.md +3 -1
- package/docs/using.md +20 -9
- package/genome/skills/refactor-module/SKILL.md +24 -2
- package/package.json +1 -1
|
@@ -297,6 +297,10 @@ export function setScriptTimeoutForTests(ms) {
|
|
|
297
297
|
* own paths start - and whether they run on the code in place (the default), rather than on a fresh copy
|
|
298
298
|
* (`testing-scripts-run-on: copy`).
|
|
299
299
|
*/
|
|
300
|
+
/** Whether the testing scripts run on the code in `buildDir` itself, not on a copy of it. */
|
|
301
|
+
export function scriptsRunInPlace(buildDir) {
|
|
302
|
+
return projectOfBuild(buildDir).inPlace;
|
|
303
|
+
}
|
|
300
304
|
function projectOfBuild(buildDir) {
|
|
301
305
|
const parts = resolve(buildDir).split(sep);
|
|
302
306
|
const index = parts.lastIndexOf("plain_modules");
|
|
@@ -401,30 +405,70 @@ const lastPassing = new Map();
|
|
|
401
405
|
export function lastPassingMs(buildDir, script) {
|
|
402
406
|
return lastPassing.get(`${resolve(buildDir)}\n${script}`);
|
|
403
407
|
}
|
|
408
|
+
/** Files changed in place for a run under way, and what each held: put back however the run ends - the process exiting too. */
|
|
409
|
+
const changedInPlace = new Map();
|
|
410
|
+
let restoreOnExit = false;
|
|
411
|
+
function putBack(path) {
|
|
412
|
+
const original = changedInPlace.get(path);
|
|
413
|
+
if (original === undefined)
|
|
414
|
+
return;
|
|
415
|
+
writeFileSync(path, original);
|
|
416
|
+
changedInPlace.delete(path);
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* `run` with `change` made to the code itself, and undone once it ends - passed, failed, timed out, thrown, or the process
|
|
420
|
+
* exiting. Killed outright, the change is left: the next unit of work starts from the last commit (lineage.ts startWork).
|
|
421
|
+
*/
|
|
422
|
+
async function withChangeInPlace(buildDir, change, run) {
|
|
423
|
+
const path = resolve(buildDir, change.file);
|
|
424
|
+
if (changedInPlace.has(path))
|
|
425
|
+
throw new Error(`${change.file} is being changed for another run already.`);
|
|
426
|
+
if (!restoreOnExit) {
|
|
427
|
+
restoreOnExit = true;
|
|
428
|
+
process.once("exit", () => {
|
|
429
|
+
for (const changed of [...changedInPlace.keys()])
|
|
430
|
+
putBack(changed);
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
changedInPlace.set(path, readFileSync(path));
|
|
434
|
+
try {
|
|
435
|
+
writeFileSync(path, change.text);
|
|
436
|
+
return await run();
|
|
437
|
+
}
|
|
438
|
+
finally {
|
|
439
|
+
putBack(path);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
404
442
|
/**
|
|
405
|
-
* A script that takes the code folder - the unit testing script - run where the testing scripts
|
|
406
|
-
*
|
|
443
|
+
* A script that takes the code folder - the unit testing script - run where the testing scripts run. `change`: one file
|
|
444
|
+
* as it is for this run - made to the fresh copy, or, in place, to the code itself and undone once the run ends.
|
|
407
445
|
*/
|
|
408
446
|
export async function runOnCode(buildDir, script, what, change,
|
|
409
447
|
/** A time limit of its own, in place of a test run's. */
|
|
410
448
|
limitMs) {
|
|
411
449
|
const project = projectOfBuild(buildDir);
|
|
450
|
+
const passed = (run, started) => {
|
|
451
|
+
if (change === undefined && run.exitCode === 0)
|
|
452
|
+
lastPassing.set(`${resolve(buildDir)}\n${script}`, Date.now() - started);
|
|
453
|
+
return run;
|
|
454
|
+
};
|
|
412
455
|
if (project.inPlace) {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
456
|
+
const inPlace = () => runScript(project.root, script, [resolve(buildDir)], buildDir, limitMs !== undefined ? { limitMs } : {});
|
|
457
|
+
const started = Date.now();
|
|
458
|
+
if (change === undefined)
|
|
459
|
+
return passed(await inPlace(), started);
|
|
460
|
+
reportActivity(` changing ${change.file} in place for the ${what} - put back once it has run`);
|
|
461
|
+
return withChangeInPlace(buildDir, change, inPlace);
|
|
416
462
|
}
|
|
417
463
|
const staging = stagingFor(buildDir);
|
|
418
464
|
rmSync(staging.root, { recursive: true, force: true });
|
|
419
465
|
ensureInModulesScratch(buildDir, staging.root);
|
|
420
466
|
try {
|
|
421
467
|
reportActivity(` copying ${stageBuild(buildDir, staging.build)} files of the code for the ${what}`);
|
|
422
|
-
change
|
|
468
|
+
if (change !== undefined)
|
|
469
|
+
writeFileSync(join(staging.build, change.file), change.text);
|
|
423
470
|
const started = Date.now();
|
|
424
|
-
|
|
425
|
-
if (change === undefined && run.exitCode === 0)
|
|
426
|
-
lastPassing.set(`${resolve(buildDir)}\n${script}`, Date.now() - started);
|
|
427
|
-
return run;
|
|
471
|
+
return passed(await runOnCopy(staging.root, script, [staging.build], buildDir, limitMs), started);
|
|
428
472
|
}
|
|
429
473
|
finally {
|
|
430
474
|
rmSync(staging.root, { recursive: true, force: true });
|
|
@@ -96,7 +96,7 @@ export function unitReviewTask(options) {
|
|
|
96
96
|
" assertion so loose any answer passes, an expected value computed the way the code computes it.",
|
|
97
97
|
...(options.canItFail === true
|
|
98
98
|
? [
|
|
99
|
-
"- A test you doubt can fail, check: can_it_fail puts a bug in
|
|
99
|
+
"- A test you doubt can fail, check: can_it_fail puts a bug in the code for one run - a condition turned round, a",
|
|
100
100
|
" value changed - and runs the unit tests on it. A test that still passes cannot fail: raise it as bad, with the",
|
|
101
101
|
` bug it missed. ${REVIEWER_CAN_IT_FAIL_RUNS} runs a session: spend them on the tests the work rests on.`,
|
|
102
102
|
]
|
package/dist/regenerate-cli.js
CHANGED
|
@@ -19,10 +19,15 @@ its conformance tests too when they are on.
|
|
|
19
19
|
--start-over start over, without asking, a codebase regenerated without a module it now requires -
|
|
20
20
|
with no terminal to ask and without it, the run stops there
|
|
21
21
|
--from-scratch delete the module's code and conformance tests (its lineage keeps them) and regenerate all of it
|
|
22
|
+
--from-scratch-chain the same for every module of its requires chain, built again from the bottom - after
|
|
23
|
+
modules were split or moved
|
|
22
24
|
--harness-model <p/id> config.turri.yaml's harness-model for this run: the planner and the conformance chooser
|
|
23
25
|
--coding-model <p/id> its coding-model, --model too: the agents that build; p/id:level for how hard a model thinks
|
|
24
26
|
--judge-model <p/id> its judge-model: the judge and the test review
|
|
25
27
|
--review <true|false> its review: whether the code and its tests are reviewed once they pass
|
|
28
|
+
--mutation-testing <true|false>
|
|
29
|
+
its mutation-testing: whether the coding agent and the reviewer can put a bug in the code
|
|
30
|
+
for one test run (can_it_fail), to see that a test catches it
|
|
26
31
|
--conformance-tests <all|chosen|module|false>
|
|
27
32
|
its conformance-tests: which conformance tests are written and run
|
|
28
33
|
--build-dir <dir> as the run ends, however it ends, export the code there: the furthest-built codebase's
|
|
@@ -31,7 +36,7 @@ its conformance tests too when they are on.
|
|
|
31
36
|
as it starts, as each pulse ends and as it exits (docs/headless.md)
|
|
32
37
|
|
|
33
38
|
PLAIN_TEMPLATE_DIRS colon-separated template directories`;
|
|
34
|
-
const { positional, options } = parseArgs(process.argv.slice(2), ["--dry-run", "--start-over", "--from-scratch"], USAGE, ["--build-dir", "--report", "--conformance-tests", "--harness-model", "--judge-model", "--review"]);
|
|
39
|
+
const { positional, options } = parseArgs(process.argv.slice(2), ["--dry-run", "--start-over", "--from-scratch", "--from-scratch-chain"], USAGE, ["--build-dir", "--report", "--conformance-tests", "--harness-model", "--judge-model", "--review", "--mutation-testing"]);
|
|
35
40
|
const { report, buildDir } = headlessOptions(options, true);
|
|
36
41
|
const named = positional[0] ?? readProjectConfig(process.cwd()).module;
|
|
37
42
|
// Functional specs named after the file: regenerated again though their spec did not change.
|
|
@@ -40,9 +45,10 @@ if (!named) {
|
|
|
40
45
|
console.error(`${USAGE}\n\nNo file given, and ${CONFIG_FILE} names no module.`);
|
|
41
46
|
process.exit(1);
|
|
42
47
|
}
|
|
48
|
+
const scratch = options["from-scratch-chain"] !== undefined ? "chain" : options["from-scratch"] !== undefined ? "module" : undefined;
|
|
43
49
|
// A dry run starts nothing, and from scratch deletes before it plans: the two do not go together.
|
|
44
|
-
if (
|
|
45
|
-
console.error(
|
|
50
|
+
if (scratch !== undefined && options["dry-run"] !== undefined) {
|
|
51
|
+
console.error(`--from-scratch${scratch === "chain" ? "-chain" : ""} deletes the code before anything is planned: it cannot be a dry run.`);
|
|
46
52
|
process.exit(1);
|
|
47
53
|
}
|
|
48
54
|
runLoop({
|
|
@@ -54,8 +60,8 @@ runLoop({
|
|
|
54
60
|
startOver: options["start-over"] !== undefined,
|
|
55
61
|
ask: (loop) => again.length > 0
|
|
56
62
|
? loop.regenerateAgain(named, again)
|
|
57
|
-
:
|
|
58
|
-
? loop.fromScratch(named)
|
|
63
|
+
: scratch !== undefined
|
|
64
|
+
? loop.fromScratch(named, { chain: scratch === "chain" })
|
|
59
65
|
: loop.bringUp(named),
|
|
60
66
|
}).catch((error) => {
|
|
61
67
|
console.error(error instanceof Error ? error.message : error);
|
package/dist/release-tools.js
CHANGED
|
@@ -142,7 +142,7 @@ export function createDeployTools(options) {
|
|
|
142
142
|
},
|
|
143
143
|
});
|
|
144
144
|
// The one halt: with the pulses in the conversation, and without them for the release agent.
|
|
145
|
-
const stopTool = haltTool(options.jobs !== undefined ? { jobs: options.jobs } : {});
|
|
145
|
+
const stopTool = haltTool(options.jobs !== undefined ? { jobs: options.jobs, ...(options.workLoop !== undefined ? { workLoop: options.workLoop } : {}) } : {});
|
|
146
146
|
return [deploy, startTool, stopTool];
|
|
147
147
|
}
|
|
148
148
|
export const DEPLOY_TOOLS = ["release", "activate", "halt"];
|
package/dist/review/live.js
CHANGED
|
@@ -79,7 +79,8 @@ export function createLiveReviewer(opts) {
|
|
|
79
79
|
pending.push(finding);
|
|
80
80
|
all.push(finding);
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
// No verdict - its turn stopped before it gave one - clears nothing: the scope is looked at again next pass.
|
|
83
|
+
if (captured !== undefined && violations.length === 0) {
|
|
83
84
|
cleared.push(scope);
|
|
84
85
|
}
|
|
85
86
|
else if (captured?.question) {
|
package/dist/run-report.js
CHANGED
|
@@ -22,6 +22,8 @@ const emptyTotals = () => ({
|
|
|
22
22
|
llm_calls: 0,
|
|
23
23
|
agent_turns: 0,
|
|
24
24
|
compactions: 0,
|
|
25
|
+
provider_retries: 0,
|
|
26
|
+
turns_stopped: 0,
|
|
25
27
|
model_seconds: 0,
|
|
26
28
|
});
|
|
27
29
|
function addUsage(totals, usage) {
|
|
@@ -43,8 +45,12 @@ function addEvent(totals, event, tokens) {
|
|
|
43
45
|
}
|
|
44
46
|
else if (event.kind === "turn")
|
|
45
47
|
totals.agent_turns += 1;
|
|
46
|
-
else
|
|
48
|
+
else if (event.kind === "compaction")
|
|
47
49
|
totals.compactions += 1;
|
|
50
|
+
else if (event.kind === "provider_retry")
|
|
51
|
+
totals.provider_retries += 1;
|
|
52
|
+
else
|
|
53
|
+
totals.turns_stopped += 1;
|
|
48
54
|
}
|
|
49
55
|
function sumTotals(a, b) {
|
|
50
56
|
const sum = emptyTotals();
|
|
@@ -181,6 +187,30 @@ export function startRunReport(options) {
|
|
|
181
187
|
list,
|
|
182
188
|
};
|
|
183
189
|
};
|
|
190
|
+
/** The spec gaps the pulses' agents met, in the order the pulses started: questions a person would want to decide. */
|
|
191
|
+
const specGapsOf = (jobs) => jobs.flatMap((job) => {
|
|
192
|
+
const details = job.details;
|
|
193
|
+
return (details?.specGaps ?? []).map((gap) => ({
|
|
194
|
+
module: job.module ?? null,
|
|
195
|
+
pulse: job.pulse ?? null,
|
|
196
|
+
pulse_id: job.id,
|
|
197
|
+
landed: job.status === "succeeded" && details?.landed === true,
|
|
198
|
+
question: gap.question,
|
|
199
|
+
assumption: gap.assumption,
|
|
200
|
+
}));
|
|
201
|
+
});
|
|
202
|
+
/** Each turn the provider failed and turri waited out, and each turn turri ended itself: why, and where. */
|
|
203
|
+
const turnIncidentsOf = () => events
|
|
204
|
+
.filter((event) => event.kind === "provider_retry" || event.kind === "stopped")
|
|
205
|
+
.map((event) => ({
|
|
206
|
+
kind: event.kind,
|
|
207
|
+
pulse_id: event.job ?? null,
|
|
208
|
+
role: event.role ?? null,
|
|
209
|
+
model: event.model ?? null,
|
|
210
|
+
...(event.kind === "stopped"
|
|
211
|
+
? { reason: event.reason ?? null }
|
|
212
|
+
: { error: event.error ?? null, attempt: event.attempt ?? null, of: event.of ?? null, wait_seconds: Math.round((event.waitMs ?? 0) / 100) / 10 }),
|
|
213
|
+
}));
|
|
184
214
|
const functionalitiesOf = (counts) => {
|
|
185
215
|
if (counts === undefined)
|
|
186
216
|
return null;
|
|
@@ -228,6 +258,7 @@ export function startRunReport(options) {
|
|
|
228
258
|
build_dir: options.buildDir !== undefined ? resolve(options.buildDir) : null,
|
|
229
259
|
conformance_tests: options.conformanceTests,
|
|
230
260
|
review: options.review ?? null,
|
|
261
|
+
mutation_testing: options.mutationTesting ?? null,
|
|
231
262
|
models: {
|
|
232
263
|
...Object.fromEntries(Object.entries(options.models).map(([role, choice]) => [role, { model: choice.model ?? null, thinking: choice.thinking ?? null }])),
|
|
233
264
|
observed: Object.fromEntries([...new Set(events.map((event) => event.role ?? "unknown"))].sort().map((role) => [role, [...new Set(events.filter((event) => (event.role ?? "unknown") === role).map((event) => event.model ?? "unknown"))].sort()])),
|
|
@@ -245,6 +276,8 @@ export function startRunReport(options) {
|
|
|
245
276
|
usage: usageOf(jobs),
|
|
246
277
|
pulses: pulsesOf(jobs, now),
|
|
247
278
|
functionalities: functionalitiesOf(attempt(sources.completion)),
|
|
279
|
+
spec_gaps: specGapsOf(jobs),
|
|
280
|
+
turn_incidents: turnIncidentsOf(),
|
|
248
281
|
...(exitParts ?? {}),
|
|
249
282
|
logs: {
|
|
250
283
|
jobs_dir: fromProject(join(projectRoot, ".turri", "jobs")),
|
package/dist/spec-tools.js
CHANGED
|
@@ -88,7 +88,8 @@ export function createSpecDiffTools(options) {
|
|
|
88
88
|
owed = false;
|
|
89
89
|
liveReview?.notice(`${params.plain_file}, after the change to ${touched.join(", ")}`);
|
|
90
90
|
// In the files, the change is work: the loop works out what is left to build and plans it.
|
|
91
|
-
|
|
91
|
+
// A spec change, not a request: a module the person halted stays halted.
|
|
92
|
+
const statuses = await loop.bringUp(params.plain_file, { specChange: true, ...(params.guidance !== undefined ? { guidance: params.guidance } : {}) });
|
|
92
93
|
const lines = [
|
|
93
94
|
result === "applied" ? `Applied the change to ${touched.join(", ")}.` : `The change to ${touched.join(", ")} was already applied.`,
|
|
94
95
|
`Building in the background:\n${describeModules(statuses)}\n`,
|
package/docs/config.md
CHANGED
|
@@ -84,7 +84,7 @@ runs:
|
|
|
84
84
|
| --- | --- |
|
|
85
85
|
| now | `harness-model` and `models.chat` - the conversation switches to it; `parallel-jobs` - a pulse waiting for a slot starts if there is one now; `allow-to-stop-jobs` |
|
|
86
86
|
| your next message | `rules-off` - for the conversation; a skill's agents from the next skill run |
|
|
87
|
-
| the next pulse - one running keeps what it started with | `coding-model`, `judge-model`, every other `models.<role>`, `review`, `turn-limit`, `compact-at`, `agent-env`, `toolchains` |
|
|
87
|
+
| 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` |
|
|
88
88
|
| the next time the work is planned | `conformance-tests`, `conformance-budget`, `max-specs-per-pulse`, `max-lines-per-pulse` |
|
|
89
89
|
| the next test run - the running pulse's too | the testing scripts, `testing-scripts-run-on` |
|
|
90
90
|
| the next pulse that lands - the running one too | `release-after-pulse` |
|
|
@@ -128,6 +128,7 @@ models: # each agent role's model, thinking and tur
|
|
|
128
128
|
| `conformance-tests` | `all` (or `true`): conformance tests for every functional spec of every module with test reqs, written once each module's code is built, before anything is built on it. `chosen`: for the functional specs chosen - every one with acceptance tests, and those the chooser picks as each code pulse ends, from what that pulse regenerated. `module`: the same, but the chooser is asked once, when the whole module is regenerated, and plans the conformance pulses too. Under both, the choice is made inside the pulse, before anything is built on the module, and the pulse's report says what was chosen and why; those the person asks for with `conform` are written too; once chosen, a functional spec keeps them, and they are rewritten when it changes - see [who chooses, and when](regenerating.md#conformance-tests-in-the-work-loop). `false`: none written, and none of the existing ones run - until the conversation asks with `conform` | `false` |
|
|
129
129
|
| `conformance-budget` | under `conformance-tests: chosen` or `module`: how many of a module's functional specs may be chosen for conformance tests, beside those with acceptance tests - a count (`2`) or a share of its functional specs (`30%`, rounded up, at least one). Every choice for the module counts, whenever it was made; the chooser is told what is left, and can choose no more. Your own `conform` is not limited. A stack's `config.turri.<stack>.yaml` can set its own | no limit |
|
|
130
130
|
| `review` | `true` or `false`: whether the code and its unit tests - and the conformance tests - are reviewed once they pass: two reviews at most, the second weighed by the arbiter; off, a job lands once its tests pass - see [regenerating the code](regenerating.md#the-code-and-its-unit-tests-are-reviewed) | `false` |
|
|
131
|
+
| `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` |
|
|
131
132
|
| `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 spec-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 spec is written. The project's alone | none |
|
|
132
133
|
| `allow-to-stop-jobs` | `true` or `false`: whether turri stops a running job the spec has moved on from - a functional spec it regenerates changed, or a file one links was edited - rolls it back and regenerates the spec 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` |
|
|
133
134
|
| `release-after-pulse` | `true` or `false`: whether every pulse that lands code releases it, in the chat, as its last stage - before the module's next pulse starts, whatever the chat is doing: an agent on the coding model looks for the project's release guidance as the chat does (what was passed to `release` this conversation, AGENTS.md, the project's skills) and, when it says to release after a build, does what it says - see [deploy](deploy.md#after-every-pulse). One release a pulse that lands; a release that fails is said in the pulse's report, and what it landed stays | `false` |
|
|
@@ -142,7 +143,7 @@ models: # each agent role's model, thinking and tur
|
|
|
142
143
|
| `toolchains` | folders of this machine an agent's commands may read beside the system's, the `PATH`'s and those the toolchain variables point at - a toolchain installed somewhere unusual (`[/srv/zig]`). A stack's add to the project's. See [the OS sandbox](sandbox.md#the-os-sandbox) | none |
|
|
143
144
|
| `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 |
|
|
144
145
|
| `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` |
|
|
145
|
-
| `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
|
|
146
|
+
| `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` |
|
|
146
147
|
|
|
147
148
|
Keys are written with dashes; underscores are read the same (`conformance_tests`). A key turri
|
|
148
149
|
does not know is ignored - another tool's `config.yaml`, read while it is the old file, may carry several - and so is a value of the
|
package/docs/headless.md
CHANGED
|
@@ -86,7 +86,10 @@ Useful options - `turri regenerate --help` lists all of them:
|
|
|
86
86
|
| `--judge-model <provider/id>` | `judge-model`: the judge and the test review; not given, the coding model |
|
|
87
87
|
| `--conformance-tests <all\|chosen\|module\|false>` | `conformance-tests`, with its values (`true` is `all`) |
|
|
88
88
|
| `--review <true\|false>` | `review`: whether the code and its tests are reviewed once they pass |
|
|
89
|
+
| `--mutation-testing <true\|false>` | `mutation-testing`: whether the coding agent and the reviewer have `can_it_fail` |
|
|
89
90
|
| `--stack <name>` | build with the stack's `config.turri.<name>.yaml` over `config.turri.yaml`; default, `TURRI_STACK`, else none |
|
|
91
|
+
| `--from-scratch` | delete the module's code and conformance tests (its lineage keeps them) and regenerate all of it |
|
|
92
|
+
| `--from-scratch-chain` | the same for every module of its requires chain, the base's included, built again from the bottom |
|
|
90
93
|
| `--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 |
|
|
91
94
|
| `--build-dir <dir>` | as the run ends, export the code there - see below |
|
|
92
95
|
| `--report <file.json>` | write [the run report](#the-run-report) there |
|
|
@@ -104,7 +107,8 @@ Conformance tests follow `conformance-tests:` in `config.turri.yaml`, or `--conf
|
|
|
104
107
|
The command exits `0` only when every module is complete: its code regenerated from the spec as it is
|
|
105
108
|
now, and its conformance tests written for what is built when they are on - no pulse failed, nothing
|
|
106
109
|
halted, nothing waiting for a start over. Anything else exits `1`, and the last lines say which
|
|
107
|
-
module is not complete, and why.
|
|
110
|
+
module is not complete, and why. A behaviour the spec leaves open that an agent had to decide is printed
|
|
111
|
+
as a `spec gap` under its pulse, with what was decided meanwhile. The log says, per functionality, what was built and whether its
|
|
108
112
|
tests passed.
|
|
109
113
|
|
|
110
114
|
| | |
|
|
@@ -150,6 +154,7 @@ changes meaning or goes; new fields may appear in the same version. Paths in `pu
|
|
|
150
154
|
"spec_file": "/work/app.plain", "project_dir": "/work", "build_dir": "/work/out", // build_dir: null without one
|
|
151
155
|
"conformance_tests": "all", // all | chosen | module | false
|
|
152
156
|
"review": false,
|
|
157
|
+
"mutation_testing": true,
|
|
153
158
|
"models": {
|
|
154
159
|
"harness": { "model": "…", "thinking": "medium" }, // the planner, the chooser
|
|
155
160
|
"coding": { "model": "…", "thinking": "low" },
|
|
@@ -165,7 +170,7 @@ changes meaning or goes; new fields may appear in the same version. Paths in `pu
|
|
|
165
170
|
"usage": {
|
|
166
171
|
"total": {
|
|
167
172
|
"input_tokens": 0, "output_tokens": 0, "cache_read_tokens": 0, "cache_write_tokens": 0, "cost_usd": 0,
|
|
168
|
-
"llm_calls": 0, "agent_turns": 0, "compactions": 0, "model_seconds": 0
|
|
173
|
+
"llm_calls": 0, "agent_turns": 0, "compactions": 0, "provider_retries": 0, "turns_stopped": 0, "model_seconds": 0
|
|
169
174
|
},
|
|
170
175
|
"in_pulses": { }, // the pulses' usage added up - the same fields
|
|
171
176
|
"outside_pulses": { }, // the planner, the conformance chooser, a failed pulse's diagnosis
|
|
@@ -191,6 +196,15 @@ changes meaning or goes; new fields may appear in the same version. Paths in `pu
|
|
|
191
196
|
],
|
|
192
197
|
"codebases": ["plain_modules/app/code"]
|
|
193
198
|
},
|
|
199
|
+
"spec_gaps": [{ // [] when no agent met one
|
|
200
|
+
"module": "app", "pulse": 3, "pulse_id": "2a058729", "landed": true,
|
|
201
|
+
"question": "What happens to a contact archived in HubSpot after it was synced?",
|
|
202
|
+
"assumption": "An archived contact is left as synced - asserted in sync.test.ts, archived contacts"
|
|
203
|
+
}],
|
|
204
|
+
"turn_incidents": [ // [] when none
|
|
205
|
+
{ "kind": "provider_retry", "pulse_id": "2a058729", "role": "coding", "model": "…", "error": "…: 529 overloaded", "attempt": 1, "of": 6, "wait_seconds": 15.3 },
|
|
206
|
+
{ "kind": "stopped", "pulse_id": "5c1e0b2f", "role": "conformance explorer", "model": "…", "reason": "10 submit_exploration calls failed in a row" }
|
|
207
|
+
],
|
|
194
208
|
"build_dir_export": { "exported": true, "dir": "/work/out", "module": "app", "commit": "8036b3b", "files": 23 },
|
|
195
209
|
"logs": { "jobs_dir": ".turri/jobs", "debug_dir": ".turri/debug", "sessions_dir": ".turri/sessions" }
|
|
196
210
|
}
|
|
@@ -209,6 +223,19 @@ calls; a role or model turri could not tell is `unknown`.
|
|
|
209
223
|
stopped, or did not pass - and everything it wrote was undone. A pulse that failed is tried once more
|
|
210
224
|
before it counts as failed; both tries are the one pulse.
|
|
211
225
|
|
|
226
|
+
**Spec gaps.** A behaviour the spec leaves open that an agent met and decided on its own - reported with
|
|
227
|
+
`report_spec_gap` (see [regenerating](regenerating.md)). In the chat they are put to you as the pulse ends; a
|
|
228
|
+
headless run has no one to ask, so they are listed here, in the order the pulses started, and printed under the
|
|
229
|
+
pulse that met them. `assumption` is what the agent decided meanwhile, also in the codebase's notes'
|
|
230
|
+
assumptions while its pulse is `landed`; a pulse rolled back takes it out of the notes, but the question still
|
|
231
|
+
stands. Settle the ones you care about in the spec and run again.
|
|
232
|
+
|
|
233
|
+
**Turn incidents.** Each time the model provider failed for a moment and turri waited it out before trying the
|
|
234
|
+
turn again, and each turn turri stopped itself - an agent going round in a circle, its calls failing again and again,
|
|
235
|
+
its time up - after which the run carried on. Both are printed as they happen, in yellow, under the pulse, and
|
|
236
|
+
counted in the usage as `provider_retries` and `turns_stopped`. Many of either point at the model, not the spec: a
|
|
237
|
+
provider at its limits, or a model too small for the role it was given.
|
|
238
|
+
|
|
212
239
|
**Completed functional specs** - the pass rate, the figure to compare runs by.
|
|
213
240
|
A functional spec is completed when the code record of the codebase the run delivers - the
|
|
214
241
|
furthest-built of the chain, the one `--build-dir` exports - as last committed, holds it as the spec has
|
|
@@ -227,7 +254,7 @@ and modules that are complete are skipped, so it picks up where it stopped - aft
|
|
|
227
254
|
provider outage, or a machine that went to sleep anyway. Whatever the stopped run left
|
|
228
255
|
half-written is undone first: each step starts from the module's last commit. A functionality whose spec has changed
|
|
229
256
|
since counts as not built, so editing the spec and re-running rebuilds what changed. `--from-scratch`
|
|
230
|
-
rebuilds
|
|
257
|
+
rebuilds the module; `--from-scratch-chain` rebuilds every module of its chain.
|
|
231
258
|
|
|
232
259
|
## Rebuilding one functionality
|
|
233
260
|
|
package/docs/installation.md
CHANGED
|
@@ -40,6 +40,9 @@ on npm runs JavaScript compiled from them instead (`npm run build`, into `dist/`
|
|
|
40
40
|
before they pack), as Node runs no `.ts` file inside a `node_modules`. `bin/turri.mjs` runs `src/` where there is one,
|
|
41
41
|
and `dist/` otherwise.
|
|
42
42
|
|
|
43
|
+
To update, `git pull` and `npm install` - the second picks up a dependency that changed, pi's say. `npm link` needs
|
|
44
|
+
running only once. A **turri** already running keeps the code it started with: start it again to run what you pulled.
|
|
45
|
+
|
|
43
46
|
## In Docker
|
|
44
47
|
|
|
45
48
|
`docker/Dockerfile` builds an image with Node, git, bash, bubblewrap and **turri** linked; the agents' commands and the
|
package/docs/regenerating.md
CHANGED
|
@@ -123,7 +123,21 @@ An agent that goes round in a circle - the same tool called with the same argume
|
|
|
123
123
|
nothing in between, or a look (read, grep, find, ls) made again with nothing changed since, however
|
|
124
124
|
many other looks came between, so the same answer comes back - is let through three times; the next
|
|
125
125
|
such call is refused with what is happening, and past six its turn is stopped, and the harness goes on
|
|
126
|
-
from there as after any turn. The arguments are compared whatever order they come in.
|
|
126
|
+
from there as after any turn. The arguments are compared whatever order they come in. So too an agent whose
|
|
127
|
+
calls to one tool fail ten times in a row, nothing going through - a call its arguments do not fit never reaches
|
|
128
|
+
any guard on the tools.
|
|
129
|
+
|
|
130
|
+
A turn turri stops itself - for any of these, or for its time, below - ends as any turn ends: what the agent said
|
|
131
|
+
stands, `[the turn was stopped: ...]` after it, and the caller does what it does when the agent handed nothing over
|
|
132
|
+
(the explorer's fallback, a nudge, a failed round). The abort that ended it is never taken for the provider
|
|
133
|
+
failing; an abort turri did not make still is. Each stop is said as it happens - a notification in the chat, a
|
|
134
|
+
line in a headless run - and listed in the run report's `turn_incidents`.
|
|
135
|
+
|
|
136
|
+
A tool argument that is a list of objects - the explorer's `interfaces` and `plan`, a reviewer's `problems` - is
|
|
137
|
+
what small models get wrong most. Before a call's arguments are checked, a list sent as JSON text, entries sent as
|
|
138
|
+
JSON text, one object for the list, or a list written inside another argument's text
|
|
139
|
+
(`...</tests_reach_it><plan>[...]</plan>`) are taken as the list; what still is not one is refused saying which
|
|
140
|
+
argument, what was sent, each entry's fields and an example (`list-arguments.ts`).
|
|
127
141
|
|
|
128
142
|
The agents with one thing to decide have a budget of tool calls: the judge 30, the test review and the
|
|
129
143
|
explorer 40. Past it every tool but the one that hands the decision over refuses, telling it to decide
|
|
@@ -245,12 +259,18 @@ use each:
|
|
|
245
259
|
- **`my_diff`**: the diff of the code folder from the commit the job started from, new files whole - exactly
|
|
246
260
|
what the reviewer is shown. Read before handing the work in: every part of the change in it, and nothing else.
|
|
247
261
|
- **`can_it_fail`**: whether the unit tests catch a bug. The agent gives one change to a code file - a
|
|
248
|
-
condition turned round, a value changed - and the unit testing script runs
|
|
249
|
-
|
|
262
|
+
condition turned round, a value changed - and the unit testing script runs with it. Where the testing scripts
|
|
263
|
+
run on a copy (`testing-scripts-run-on: copy`), the change is made to a fresh copy and the code itself is never
|
|
264
|
+
touched. In place, the default, it is made to the code itself, so a script that finds the code from its own path
|
|
265
|
+
sees it; the file is put back as it was once the run ends - passed, failed, hung, the script failing to start, the
|
|
266
|
+
script rewriting the file, turri exiting. Killed outright, the next unit of work starts from the last commit anyway.
|
|
267
|
+
It never runs beside another call of the agent's, so no edit lands while the bug is in. What the script does
|
|
268
|
+
beyond the code - a package copied into a host codebase - it does with the bug in, until the next test run puts the
|
|
269
|
+
real code there. If every test still passes, no test catches that bug. Six
|
|
250
270
|
runs a job. A bug often makes the code hang instead - a loop that never ends - so a run may take three times
|
|
251
271
|
as long as the last passing run of the unit tests, within 15 and 60 seconds, and one that does not finish is
|
|
252
|
-
reported as a hang, not as a test that caught it.
|
|
253
|
-
|
|
272
|
+
reported as a hang, not as a test that caught it. `mutation-testing: false` in the [config](config.md) - or
|
|
273
|
+
`turri regenerate --mutation-testing false` - takes it away, from the reviewer too.
|
|
254
274
|
- **`start_service`**, **`service_logs`**, **`stop_service`**: a server or a worker it built, started in the
|
|
255
275
|
background on this machine, behind the same walls as its shell - the command check, the module's environment, the
|
|
256
276
|
OS sandbox, the audit while it comes up - to try from outside with `curl` as a client would. Whatever the stack: the
|
|
@@ -380,6 +400,18 @@ halts its codebase: nothing more runs there until the spec changes or the module
|
|
|
380
400
|
the command line, `turri regenerate` runs until nothing more can start, one line as each job starts and
|
|
381
401
|
ends, and exits 1 when any failed.
|
|
382
402
|
|
|
403
|
+
The person halts a module's planned work too: `halt` (and `/halt`) given a planned row - `planned-<module>-2`,
|
|
404
|
+
`planned-<module>-waiting` - or the module's name. A module's pulses are planned again from its spec at every look, so
|
|
405
|
+
one planned pulse cannot be taken out alone: the module is halted - its running pulse stopped and rolled back, none of
|
|
406
|
+
its planned pulses started, the modules built on it waiting for it - and what landed stays. A halt the person asked for
|
|
407
|
+
holds through spec changes - `write_spec_diff` brings the spec in without starting the module - until the module is
|
|
408
|
+
asked for again (`regenerate`, `conform`). To build some of it later, or cut it differently, there is `steer`; to drop
|
|
409
|
+
work, the spec.
|
|
410
|
+
|
|
411
|
+
A module the loop looked after whose `.plain` file is gone is forgotten - no rows, nothing waited for - and a codebase
|
|
412
|
+
left behind, or whose spec no longer parses, shows nothing planned: its plan, and what it waited for, were the spec's
|
|
413
|
+
before.
|
|
414
|
+
|
|
383
415
|
### How the work is cut into jobs
|
|
384
416
|
|
|
385
417
|
A job that renders the whole of a new spec is too big to build well, and a render per functional spec,
|
|
@@ -549,7 +581,8 @@ does not find them:
|
|
|
549
581
|
testing-scripts-run-on: copy
|
|
550
582
|
```
|
|
551
583
|
|
|
552
|
-
`can_it_fail`
|
|
584
|
+
`can_it_fail` works either way: on a copy it changes the copy; in place it changes the code for the one run and puts
|
|
585
|
+
it back.
|
|
553
586
|
|
|
554
587
|
### When the environment lacks something
|
|
555
588
|
|
|
@@ -706,7 +739,7 @@ with no agent and no testing script. Moving specs into a module the code was not
|
|
|
706
739
|
change to the code brings that module's code in, so the codebase stops: it has to be started over - its code
|
|
707
740
|
and conformance tests taken out, committed so its history keeps them, and the chain built again from the
|
|
708
741
|
bottom. That is never done unasked. In the chat the model asks the person, saying why, and calls
|
|
709
|
-
`regenerate` with `from_scratch` once they agree; `turri regenerate` and `spec-diff` ask at the terminal, and
|
|
742
|
+
`regenerate` with `from_scratch: "module"` once they agree; `turri regenerate` and `spec-diff` ask at the terminal, and
|
|
710
743
|
`--start-over` agrees in advance - with no terminal and no flag, the run stops there, exit 1, saying so.
|
|
711
744
|
|
|
712
745
|
## Conformance tests
|
|
@@ -1099,7 +1132,9 @@ are the next agent's, and a gap is yours. An agent reports one with `report_spec
|
|
|
1099
1132
|
and the assumption it made meanwhile; turri writes that assumption into the notes' assumptions, so the code built on
|
|
1100
1133
|
it is known for what it is. The gaps a pulse's agents report are said in its report - "Spec gaps its agents met ... Put
|
|
1101
1134
|
each to the user", each with its assumption - so the conversation asks you, and writes the ones you decide into the
|
|
1102
|
-
spec; the pulse that builds the answer finds the assumption it replaces in the notes, and the tests it names.
|
|
1135
|
+
spec; the pulse that builds the answer finds the assumption it replaces in the notes, and the tests it names.
|
|
1136
|
+
A headless run has no one to ask: it prints each gap under its pulse, and lists them in its run report's
|
|
1137
|
+
`spec_gaps` ([running unattended](headless.md#the-run-report)). However many gaps a pulse's agents report, they
|
|
1103
1138
|
are put to you - never a reason to stop the pulse; the tool is guarded like any other. A notes
|
|
1104
1139
|
file from before keeps no spec gaps section: its lines are dropped as it is read.
|
|
1105
1140
|
|
package/docs/skills-and-gates.md
CHANGED
|
@@ -133,7 +133,9 @@ change the step makes and puts its findings on the executor's next tool result.
|
|
|
133
133
|
- **Interview the user.** `ask_user` puts one question to the person. In the TUI it is a dialog;
|
|
134
134
|
from the CLI the options are numbered. Offering choices is required, not optional - a call with
|
|
135
135
|
neither `options` nor `free_form: true` is refused - and every list carries "Something else…".
|
|
136
|
-
`multi_select: true`
|
|
136
|
+
`multi_select: true` gives every option a box, ticked and unticked as it is chosen - a pick made by mistake is
|
|
137
|
+
undone by choosing it again - until they choose Done; what they type is one more box, ticked. "Something
|
|
138
|
+
else…", "Chat about this" and Done are no boxes. The skill's agent talks in a
|
|
137
139
|
session of its own that the person never sees, so what the person must read to answer - the brief
|
|
138
140
|
to confirm, the plan to approve - it passes as `ask_user`'s `context`, shown above the question in
|
|
139
141
|
the dialog; `brood`, `spawn` and `bud` pass their briefs so. The agents are told to keep it to what can be taken in at
|
package/docs/using.md
CHANGED
|
@@ -50,7 +50,7 @@ where it stopped. A project can have skills of its own, in `.turri/skills/` or `
|
|
|
50
50
|
|
|
51
51
|
| tool | |
|
|
52
52
|
| --- | --- |
|
|
53
|
-
| `regenerate` | regenerate a module and its chain from the spec as it is now - after any change to it, by any means: what is left to regenerate is planned into pulses of one to three functional specs, each with the definitions and reqs it uses, and a pulse regenerating what the spec no longer wants is stopped. With functionalities named, those are regenerated though their spec did not change - rewritten or started over, planned into pulses as any change is; with `from_scratch`, the whole module, its code deleted first - only when you ask, or agree |
|
|
53
|
+
| `regenerate` | regenerate a module and its chain from the spec as it is now - after any change to it, by any means: what is left to regenerate is planned into pulses of one to three functional specs, each with the definitions and reqs it uses, and a pulse regenerating what the spec no longer wants is stopped. With functionalities named, those are regenerated though their spec did not change - rewritten or started over, planned into pulses as any change is; with `from_scratch`, the whole module, its code deleted first - `"chain"` for every module of its requires chain too, built again from the bottom - only when you ask, or agree |
|
|
54
54
|
| `drift` | what is left to regenerate: how far the code and its conformance tests have drifted from the spec, starting nothing |
|
|
55
55
|
| `glimpse` | the pulse a module's codebases would start next, and the whole prompt its coding agent would get - starting nothing |
|
|
56
56
|
| `steer` | say how the work is planned - which functional specs go together, what first - for the project or one module, for the session; the next plan follows it, beside what AGENTS.md says under a heading naming the queue |
|
|
@@ -58,12 +58,12 @@ where it stopped. A project can have skills of its own, in `.turri/skills/` or `
|
|
|
58
58
|
| `validate` | validate a spec, regenerating nothing |
|
|
59
59
|
| `engine` | show or choose the model the code is regenerated on - see [below](#choosing-a-model) |
|
|
60
60
|
| `pulses` | the pulses - running, planned and finished - or one of them |
|
|
61
|
-
| `halt` | halt a pulse, or what `activate` started |
|
|
61
|
+
| `halt` | halt a pulse, a module's planned pulses, or what `activate` started |
|
|
62
62
|
| `diagnose` | why a pulse did not land, from its transcript: how it ended, the stages that went wrong, the last failing test run, the last review, the tool calls that failed |
|
|
63
63
|
| `lineage` | a module's lineage: what each regeneration and conformance run changed in it, and what it was regenerated from |
|
|
64
64
|
| `cultivate` | run a gated skill, its steps and review gates enforced |
|
|
65
65
|
| `release`, `activate` | try what is regenerated: release it to `dist/<module>` and activate it on this machine, installing what it needs - see [deploy](deploy.md) |
|
|
66
|
-
| `ask_user` | put a question to you as a dialog to pick from - several at once, "Something else…" to type, or "Chat about this" to talk it over first; Esc in either goes back to the options |
|
|
66
|
+
| `ask_user` | put a question to you as a dialog to pick from - several at once, each a box you tick and untick, "Something else…" to type, or "Chat about this" to talk it over first; Esc in either goes back to the options |
|
|
67
67
|
| `web_search`, `web_fetch` | search the web and read a page as text - documentation, an API, an error; `curl` and the like run in its `bash` |
|
|
68
68
|
|
|
69
69
|
What each render does, in order, is in [regenerating the code](regenerating.md).
|
|
@@ -238,7 +238,7 @@ come waits for a free slot, and says so.
|
|
|
238
238
|
is laid over `config.turri.yaml` - its testing scripts, toolchains, models - for the session; a pulse already
|
|
239
239
|
running keeps the stack it started with. The chat model switches it too when you ask. See
|
|
240
240
|
[stacks](config.md#stacks).
|
|
241
|
-
- **`/regenerate [module | file.plain] [functionality ...] [from scratch] [how to cut the work]`** regenerates a module from its spec as it is now, as
|
|
241
|
+
- **`/regenerate [module | file.plain] [functionality ...] [from scratch [whole chain]] [how to cut the work]`** regenerates a module from its spec as it is now, as
|
|
242
242
|
the `regenerate` tool does: what is left to regenerate is planned into pulses - one functional spec at a time, a few
|
|
243
243
|
together or the whole module in one, as the planner judges - and the first starts. Words after the module are
|
|
244
244
|
guidance for that plan (`/regenerate app models first`). A module's name typed with spaces for its underscores is
|
|
@@ -246,13 +246,19 @@ come waits for a free slot, and says so.
|
|
|
246
246
|
`config.turri.yaml` names, else the folder's top modules, to pick from. Asked for from scratch - `from scratch`,
|
|
247
247
|
`start over`, `delete the module` - it asks first, then deletes the module's code and conformance tests in every
|
|
248
248
|
codebase where they live, committed so `/lineage` keeps them, and regenerates the whole module from its spec,
|
|
249
|
-
built though nothing in it changed: `/regenerate shorty from scratch`. The
|
|
250
|
-
|
|
249
|
+
built though nothing in it changed: `/regenerate shorty from scratch`. The modules below it keep their code, and
|
|
250
|
+
the module starts again from a copy of the code below it. Asked for its chain too - `/regenerate shorty from scratch,
|
|
251
|
+
the whole chain` - the code of every module of its requires chain is deleted, the base's included, and the whole
|
|
252
|
+
chain is regenerated from the bottom: what to do after modules were split, merged or moved, when the code below was
|
|
253
|
+
laid out for modules that are no more. The chat's `regenerate` does the same with `from_scratch: "module"` or
|
|
254
|
+
`"chain"`, when you ask for it; `turri regenerate --from-scratch` or `--from-scratch-chain` on the command line, not
|
|
255
|
+
with `--dry-run`.
|
|
251
256
|
Functionalities named after the module - `/regenerate shorty 3 5` - are regenerated though their spec did not
|
|
252
257
|
change, on the model chosen for functionalities: as `turri regenerate shorty.plain 3 5` does, and the chat's
|
|
253
258
|
`regenerate` with `functionalities`.
|
|
254
|
-
- **`/halt <id>`** halts a pulse - a queued one never starts -
|
|
255
|
-
|
|
259
|
+
- **`/halt <id>`** halts a pulse - a queued one never starts - **`/halt <module>`** (or a planned row's id) halts a
|
|
260
|
+
module's planned pulses until you ask for it again, a spec change not starting it, and **`/halt activated <name>`**
|
|
261
|
+
halts a server `activate` started; it lists all three when no id is given.
|
|
256
262
|
- **What these commands show you, the chat knows.** What `/regenerate` and `/halt activated` tell you - a spec that
|
|
257
263
|
does not parse, the pulses planned, a server halted - stays in the chat under the command, and since a slash command
|
|
258
264
|
runs outside the conversation, it is put in the conversation as well: say "fix it" next and turri knows what you are
|
|
@@ -389,7 +395,11 @@ To change pi's own default, in `~/.pi/agent/settings.json`:
|
|
|
389
395
|
```
|
|
390
396
|
|
|
391
397
|
A provider failure - no credits, bad key, rate limit - is raised with the provider's own message,
|
|
392
|
-
rather than surfacing as an agent that said nothing.
|
|
398
|
+
rather than surfacing as an agent that said nothing. One that passes - overloaded, rate limited, unreachable,
|
|
399
|
+
timed out - is waited out first, after pi's own retries: six more tries, the wait doubled each time from 15
|
|
400
|
+
seconds up to five minutes (15s, 30s, 1m, 2m, 4m, 5m, a tenth either way so parallel jobs do not all come back
|
|
401
|
+
at once), the agent carrying on where it was. Each wait is shown as it happens - a notification in the chat and
|
|
402
|
+
the job panel's status, a yellow line in a headless run - and listed in the run report's `turn_incidents`.
|
|
393
403
|
|
|
394
404
|
## Module history
|
|
395
405
|
|
|
@@ -452,6 +462,7 @@ turri regenerate <file.plain> # regenerate what the code is not bui
|
|
|
452
462
|
turri glimpse <file.plain> # plan it, and print the first job's prompt - starts nothing
|
|
453
463
|
turri regenerate <file.plain> 2 # regenerate functionality 2 again, changed or not
|
|
454
464
|
turri regenerate <file.plain> --from-scratch # delete the module's code and tests (its lineage keeps them), regenerate all of it
|
|
465
|
+
turri regenerate <file.plain> --from-scratch-chain # the same for every module of its requires chain, from the bottom
|
|
455
466
|
turri spec-diff <file.plain> <diff> # apply a spec diff, and regenerate it
|
|
456
467
|
turri conform <file.plain> 1 # black-box tests for functionality 1
|
|
457
468
|
turri lineage <module> # what each regeneration changed in a module, and when
|