@turri-dev/cli 0.1.3-next.79e2ad0 → 0.1.3-next.e5599c1
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 +1 -1
- package/dist/environment.js +19 -0
- package/dist/extension.js +131 -50
- package/dist/identity.js +1 -1
- package/dist/loop-tools.js +1 -1
- package/dist/pi-launch.js +13 -4
- package/dist/picture-row.js +21 -0
- package/dist/regenerate/confine.js +1 -0
- package/dist/regenerate/conformance-agents.js +162 -7
- package/dist/regenerate/conformance.js +58 -11
- package/dist/regenerate/environment-error.js +46 -9
- package/dist/regenerate/panel-dock.js +86 -0
- package/dist/regenerate/side-panel.js +14 -4
- package/dist/regenerate/stop-report.js +13 -0
- package/dist/regenerate/test-scripts.js +23 -8
- package/dist/run-report.js +2 -22
- package/docs/development.md +7 -0
- package/docs/regenerating.md +39 -7
- package/docs/using.md +16 -5
- package/package.json +1 -1
|
@@ -12,6 +12,12 @@ export function createSidePanel(options) {
|
|
|
12
12
|
let drawnTree = { rows: [], rowStarts: [], lineCount: 0 };
|
|
13
13
|
let drawnMap = { rows: [], rowStarts: [], lineCount: 0 };
|
|
14
14
|
let pages = [];
|
|
15
|
+
/** The keys back to the chat - and `s`, from over the screen to beside the chat and back. */
|
|
16
|
+
const backKeys = () => {
|
|
17
|
+
if (options.dock === undefined)
|
|
18
|
+
return [`esc or ${options.key} back to the chat`];
|
|
19
|
+
return options.dock.docked() ? ["s full screen", "esc or ⌥⌘← to the chat", `${options.key} close`] : ["s beside the chat", `esc or ${options.key} back to the chat`];
|
|
20
|
+
};
|
|
15
21
|
const waitingNote = () =>
|
|
16
22
|
// A question asked while it showed waits in the chat, unanswered: the person is told it is there.
|
|
17
23
|
options.waiting?.() === true ? ` ${style.warning?.("your question is waiting") ?? style.accent("your question is waiting")} - ${options.key} or esc to answer it, as you left it` : "";
|
|
@@ -59,7 +65,7 @@ export function createSidePanel(options) {
|
|
|
59
65
|
/** The rule under the top. */
|
|
60
66
|
const rule = (width) => style.muted("─".repeat(Math.max(1, width)));
|
|
61
67
|
const renderPulses = (width, rows) => {
|
|
62
|
-
const keys = ["↑↓ move", "enter open/close", "←→", "o/c all", "pgup pgdn scroll", ...(options.map !== undefined ? ["p regen"] : []),
|
|
68
|
+
const keys = ["↑↓ move", "enter open/close", "←→", "o/c all", "pgup pgdn scroll", ...(options.map !== undefined ? ["p regen"] : []), ...backKeys()];
|
|
63
69
|
const top = topBlock([`${style.heading("pulses")}${waitingNote()}`], keys, width);
|
|
64
70
|
// Under the top: the rule, and a line of space - as the map has.
|
|
65
71
|
const bodyHeight = Math.max(3, rows - top.length - 2);
|
|
@@ -77,7 +83,7 @@ export function createSidePanel(options) {
|
|
|
77
83
|
pages = options.map();
|
|
78
84
|
const now = Date.now();
|
|
79
85
|
if (pages.length === 0) {
|
|
80
|
-
const top = topBlock([`${style.heading("regen")}${waitingNote()}`], ["p pulses",
|
|
86
|
+
const top = topBlock([`${style.heading("regen")}${waitingNote()}`], ["p pulses", ...backKeys()], width);
|
|
81
87
|
lastBodyHeight = Math.max(3, rows - top.length - 1);
|
|
82
88
|
drawnMap = { rows: [], rowStarts: [], lineCount: 0 };
|
|
83
89
|
const body = [style.muted(" No .plain file to map: name one to regenerate, or set module: in config.turri.yaml."), ...new Array(Math.max(0, lastBodyHeight - 1)).fill("")];
|
|
@@ -87,7 +93,7 @@ export function createSidePanel(options) {
|
|
|
87
93
|
const tabbed = pages.length > 1;
|
|
88
94
|
const page = shownPage(pages, map);
|
|
89
95
|
const discuss = page.stuck && options.discuss !== undefined ? [`${DISCUSS_KEY} talk it through in the chat`] : [];
|
|
90
|
-
const keys = [...discuss, "↑↓ move", "enter open/close", ...(tabbed ? ["←→ module"] : []), "o/c all", "pgup pgdn", "p pulses",
|
|
96
|
+
const keys = [...discuss, "↑↓ move", "enter open/close", ...(tabbed ? ["←→ module"] : []), "o/c all", "pgup pgdn", "p pulses", ...backKeys()];
|
|
91
97
|
// The legend's box in the upper right corner, over what is under it; too narrow a panel has none.
|
|
92
98
|
const box = width >= 60 ? legendBox(legendLines(page, style)) : [];
|
|
93
99
|
const room = box.length > 0 ? width - visibleWidth(box[0]) - 1 : width;
|
|
@@ -210,7 +216,7 @@ export function createSidePanel(options) {
|
|
|
210
216
|
}
|
|
211
217
|
catch (error) {
|
|
212
218
|
// A frame that throws is never drawn - nor is anything after it: the screen would freeze. What failed is shown instead.
|
|
213
|
-
const top = topBlock([`${style.heading(map.view === "map" ? "regen" : "pulses")}${waitingNote()}`], [...(options.map !== undefined ? ["p the other view"] : []),
|
|
219
|
+
const top = topBlock([`${style.heading(map.view === "map" ? "regen" : "pulses")}${waitingNote()}`], [...(options.map !== undefined ? ["p the other view"] : []), ...backKeys()], width);
|
|
214
220
|
const lines = (error instanceof Error ? (error.stack ?? error.message) : String(error)).split("\n").slice(0, Math.max(1, rows - top.length - 1));
|
|
215
221
|
return [
|
|
216
222
|
...top,
|
|
@@ -225,6 +231,10 @@ export function createSidePanel(options) {
|
|
|
225
231
|
options.back();
|
|
226
232
|
return;
|
|
227
233
|
}
|
|
234
|
+
if (options.dock !== undefined && data === "s") {
|
|
235
|
+
options.dock.toggle();
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
228
238
|
if (options.map !== undefined && data === "p") {
|
|
229
239
|
if (map.view === "map")
|
|
230
240
|
toPulses();
|
|
@@ -89,6 +89,19 @@ export function describeStop(facts) {
|
|
|
89
89
|
`though they were sent back for it again and again. Still missing:\n${facts.conformance.unlabelled.map((line) => ` - ${line}`).join("\n")}`;
|
|
90
90
|
todo = ["If the test reqs leave open where the tests go or how they are built, say so exactly - the folder, the files, the build."];
|
|
91
91
|
}
|
|
92
|
+
else if (facts.at === "conformance" && facts.conformance?.escalation !== undefined) {
|
|
93
|
+
const { error, reason, evidence, changedNothing } = facts.conformance.escalation;
|
|
94
|
+
why =
|
|
95
|
+
`its conformance tests kept failing with ${error}. The conformance agent's fix of the tests did not make it go away, so ` +
|
|
96
|
+
`a judge looked again and found it the code's; the coding agent ${changedNothing === true ? "changed nothing for it" : "fixed the code, and the run still failed the same way"}. ` +
|
|
97
|
+
`Why the judge found it the code's:\n${reason.trim().split("\n").map((line) => ` ${line}`).join("\n")}` +
|
|
98
|
+
(evidence.length > 0 ? `\n On the evidence:\n${evidence.map((item) => ` - ${item.source.trim()}: ${item.shows.trim().replace(/\s+/g, " ")}`).join("\n")}` : "");
|
|
99
|
+
todo = [
|
|
100
|
+
"If the code has to produce something the spec leaves open - a build output, an entry point, a module the conformance testing " +
|
|
101
|
+
"script runs or checks for - say exactly what in the implementation reqs: its path and how it is built.",
|
|
102
|
+
"If the conformance testing script expects something the spec does not ask for, change the script or the test reqs so the two agree.",
|
|
103
|
+
];
|
|
104
|
+
}
|
|
92
105
|
else if (facts.at === "conformance" && facts.conformance?.stuck !== undefined) {
|
|
93
106
|
const { error, times, rounds, changedNothing } = facts.conformance.stuck;
|
|
94
107
|
why =
|
|
@@ -609,19 +609,34 @@ function timedOutFailure(run, what) {
|
|
|
609
609
|
`the same ${limit} seconds, and a skipped or deleted test does not count as a fix.`,
|
|
610
610
|
].join("\n");
|
|
611
611
|
}
|
|
612
|
+
/** A command `timeout` could not start, or a shell could not find - on a line of its own. */
|
|
613
|
+
const COULD_NOT_RUN = /^(?:[^:]*: )?failed to run command [‘'`"]?([\w.+-]+)[’'`"]?: No such file or directory$/;
|
|
614
|
+
const NOT_FOUND = /^(?:[^:]*: )?(?:line \d+: )?([\w.+-]+): command not found$/;
|
|
612
615
|
/**
|
|
613
616
|
* What a failed run says is not installed where it ran - the command, when its output names it - or undefined when
|
|
614
|
-
* the run failed for another reason.
|
|
615
|
-
* or a shell or `timeout`
|
|
617
|
+
* the run failed for another reason. A missing command is the cause only on evidence that it ended the run: exit 69,
|
|
618
|
+
* the testing scripts' own way to say a toolchain is missing, or 127, what a shell or `timeout` gives for a command it
|
|
619
|
+
* could not find - else a command not found on the last line the run printed, nothing having run after it. Earlier in
|
|
620
|
+
* the output it is a warning, not the failure: a shell profile's, an optional tool probed for, a fallback taken - and a
|
|
621
|
+
* run that failed for its own reasons is the agent's to fix, not a stop for the person.
|
|
616
622
|
*/
|
|
617
623
|
export function missingToolchain(run) {
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
if (run.exitCode === 69 || run.exitCode === 127)
|
|
624
|
+
if (run.exitCode === 0)
|
|
625
|
+
return undefined;
|
|
626
|
+
const lines = run.output.split("\n").map((line) => line.trim()).filter((line) => line !== "");
|
|
627
|
+
const named = (line) => COULD_NOT_RUN.exec(line)?.[1] ?? NOT_FOUND.exec(line)?.[1];
|
|
628
|
+
if (run.exitCode === 69 || run.exitCode === 127) {
|
|
629
|
+
// The command is the last one named: the one the run stopped on.
|
|
630
|
+
for (let at = lines.length - 1; at >= 0; at -= 1) {
|
|
631
|
+
const command = named(lines[at]);
|
|
632
|
+
if (command !== undefined)
|
|
633
|
+
return { command };
|
|
634
|
+
}
|
|
623
635
|
return {};
|
|
624
|
-
|
|
636
|
+
}
|
|
637
|
+
const last = lines.at(-1);
|
|
638
|
+
const command = last !== undefined ? named(last) : undefined;
|
|
639
|
+
return command !== undefined ? { command } : undefined;
|
|
625
640
|
}
|
|
626
641
|
/** Where `command` is on this machine's PATH, or undefined when it is not there. */
|
|
627
642
|
export function onThisMachine(command) {
|
package/dist/run-report.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
1
|
+
import { mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
3
2
|
import { basename, dirname, join, relative, resolve } from "node:path";
|
|
4
|
-
import {
|
|
3
|
+
import { turriIdentity } from "./environment.js";
|
|
5
4
|
import { onModelEvent } from "./regenerate/activity.js";
|
|
6
5
|
/**
|
|
7
6
|
* A headless run's report: one JSON file, `turri regenerate --report <file>`, saying what the run did - how it ended,
|
|
@@ -57,25 +56,6 @@ function sumTotals(a, b) {
|
|
|
57
56
|
function rounded(totals) {
|
|
58
57
|
return { ...totals, cost_usd: Math.round(totals.cost_usd * 1e6) / 1e6, model_seconds: Math.round(totals.model_seconds * 10) / 10 };
|
|
59
58
|
}
|
|
60
|
-
/** turri's version, and the commit when it runs from a clone. */
|
|
61
|
-
function turriIdentity() {
|
|
62
|
-
let version = null;
|
|
63
|
-
try {
|
|
64
|
-
version = JSON.parse(readFileSync(join(PACKAGE_ROOT, "package.json"), "utf8")).version ?? null;
|
|
65
|
-
}
|
|
66
|
-
catch {
|
|
67
|
-
/* no package.json: left out */
|
|
68
|
-
}
|
|
69
|
-
if (!existsSync(join(PACKAGE_ROOT, ".git")))
|
|
70
|
-
return { version, git_commit: null, git_dirty: null };
|
|
71
|
-
const commit = spawnSync("git", ["-C", PACKAGE_ROOT, "rev-parse", "HEAD"], { encoding: "utf8" });
|
|
72
|
-
const status = spawnSync("git", ["-C", PACKAGE_ROOT, "status", "--porcelain", "--untracked-files=no"], { encoding: "utf8" });
|
|
73
|
-
return {
|
|
74
|
-
version,
|
|
75
|
-
git_commit: commit.status === 0 ? commit.stdout.trim() : null,
|
|
76
|
-
git_dirty: status.status === 0 ? status.stdout.trim() !== "" : null,
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
59
|
const pulseKind = (job) => (job.kind === "regenerate" ? "code" : job.kind);
|
|
80
60
|
const firstLines = (text) => {
|
|
81
61
|
const trimmed = text?.trim();
|
package/docs/development.md
CHANGED
|
@@ -18,6 +18,12 @@ which tests reach which mutant (`vitest.stryker.config.ts`, the suite without th
|
|
|
18
18
|
mutant against those tests. `scripts/mutation.mjs` sets two things in Stryker's vitest runner the suite needs - forked
|
|
19
19
|
workers, and a test-name filter that matches vitest 5's names - again after every `npm install`.
|
|
20
20
|
|
|
21
|
+
The `mutation` workflow (`.github/workflows/mutation.yml`) runs it on GitHub, started by hand: Actions, mutation, Run
|
|
22
|
+
workflow. It takes the parts to run, space-separated (empty for every part), each a job of its own side by side, on
|
|
23
|
+
four cores (`TURRI_MUTATION_CONCURRENCY`; six here). Each part's `mutation.html` and `mutation.json` are uploaded as an
|
|
24
|
+
artifact, `mutation-<part>`, and summed up on the run's page. Stryker's incremental file is cached from run to run, so
|
|
25
|
+
a run tests again only the mutants whose code or tests changed; tick `fresh` to test every one again.
|
|
26
|
+
|
|
21
27
|
Working on turri itself, `npm link` points the global `turri` at this clone, so edits
|
|
22
28
|
take effect immediately. `npm run chat` starts pi with the extension loaded from `src/`.
|
|
23
29
|
|
|
@@ -69,6 +75,7 @@ trust `turri-oss/turri`, the workflow `publish.yml` and the environment `npm`. R
|
|
|
69
75
|
| `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) |
|
|
70
76
|
| `src/regenerate/engine.ts` | choosing and resolving render models |
|
|
71
77
|
| `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 spec diff as they show it - highlighted and banded |
|
|
78
|
+
| `src/regenerate/side-panel.ts`, `src/regenerate/panel-dock.ts` | the side panel, and the chat narrowed beside it when it is docked |
|
|
72
79
|
| `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 |
|
|
73
80
|
| `src/regenerate/debug-log.ts` | each render agent's whole conversation, always streamed to `.turri/debug/` |
|
|
74
81
|
| `genome/` | what turri knows and can do: `genome/skills/`, the skill library, and `genome/rules/`, the \*\*\*plain authoring rules |
|
package/docs/regenerating.md
CHANGED
|
@@ -218,7 +218,7 @@ and the `implement-unit-testing-script` and `implement-conformance-testing-scrip
|
|
|
218
218
|
- **The formatting is the agents'.** The harness formats nothing: the scripts check, and leave their inputs as they
|
|
219
219
|
found them. Every agent that writes code or tests is told to run, in its shell, the formatter its script checks with,
|
|
220
220
|
on the files it changes, before the final run.
|
|
221
|
-
- **A toolchain missing** where the checks run - exit 69, 127, `command not found` - stops the pulse as it does for the
|
|
221
|
+
- **A toolchain missing** where the checks run - exit 69, 127, a `command not found` the run ended on - stops the pulse as it does for the
|
|
222
222
|
tests: the person installs it, the agents install nothing.
|
|
223
223
|
|
|
224
224
|
### Checking its own work
|
|
@@ -507,8 +507,10 @@ your own environment with this machine's toolchains, turri's model providers' AP
|
|
|
507
507
|
and whatever they do is your doing. That is the only way the two scripts are ever run: the harness's own runs, and the
|
|
508
508
|
agents' `run_unit_tests` and `run_conformance_tests`, which run them exactly as the harness does - through the host
|
|
509
509
|
runner, in a process group of their own, so the time limit and a stopped job end the script and all it started. A
|
|
510
|
-
toolchain the script needs and this machine lacks - exit 69, exit 127, or a `command not found` /
|
|
511
|
-
|
|
510
|
+
toolchain the script needs and this machine lacks - exit 69, exit 127, or a run that ended on a `command not found` /
|
|
511
|
+
`failed to run command`, the last line it printed (`missingToolchain`) - is yours to install. Only on that evidence: a
|
|
512
|
+
`command not found` earlier in the output, the run going on after it and failing for its own reasons, is a warning -
|
|
513
|
+
a shell profile's, an optional tool probed for - and the failure is the agent's to fix. A missing toolchain is yours to install, never the agent's: the agent is told to report it
|
|
512
514
|
with `report_environment_error` rather than work around it, and the pulse stops at the harness's first run of either
|
|
513
515
|
script - unit or conformance - that cannot find it, rolled back, saying what to install (see
|
|
514
516
|
[when the environment lacks something](#when-the-environment-lacks-something)). The code and the tests an agent wrote run unfenced inside the script too: what an agent runs with its own
|
|
@@ -562,7 +564,7 @@ It is raised two ways:
|
|
|
562
564
|
is shown its output once, and a report made again after that stands. A report that stands ends its turn, the pulse
|
|
563
565
|
stops, and what it said goes to you as it is;
|
|
564
566
|
- **by the harness itself**: a testing script - the unit or the conformance one, in a code pulse, a conformance pulse or
|
|
565
|
-
the whole-suite run - that cannot find its toolchain (exit 69 or 127, `command not found`), or
|
|
567
|
+
the whole-suite run - that cannot find its toolchain (exit 69 or 127, a `command not found` the run ended on), or
|
|
566
568
|
a credential `agent-env:` names that is not there when the pulse starts - before any agent does. What the harness
|
|
567
569
|
found it works out at once - the diagnosis, not after a second failure - to say how to fix it on this machine.
|
|
568
570
|
|
|
@@ -575,10 +577,20 @@ not an install:
|
|
|
575
577
|
> **lunch stopped: turri's sandbox kept its agents from reading `…/mise/installs/node/24.16.0/lib/node_modules/npm/bin/npm-cli.js` - it is on this machine; nothing is missing.**
|
|
576
578
|
> To fix: let the agents read that toolchain - add its folder to `toolchains:` in config.turri.yaml, keeping what is there: `toolchains: [/Users/…/mise/installs/node/24.16.0]`. Nothing needs installing.
|
|
577
579
|
|
|
580
|
+
A write the sandbox refused is told apart from a read - a report naming a lock file (`*.lock`, `*.lck`, `lockfile`, even
|
|
581
|
+
one never made), or saying a write, a create or a lock not taken. No setting lets the agents write outside their
|
|
582
|
+
module's folders, their own home and temporary folder and the package caches, and `toolchains:` only lets them read; so
|
|
583
|
+
the stop names the lock and what fixes it instead. In your home - a tool that found it without `$HOME`, as a JVM does for
|
|
584
|
+
`user.home` - it is having the tool use `$HOME` (`-Duser.home=$HOME` where the build starts its JVM); in a toolchain's own
|
|
585
|
+
install, it is a setting of the tool's that keeps the write elsewhere, or a copy of the toolchain that keeps its writes in
|
|
586
|
+
its cache. The agents are told such a refusal is the sandbox's, to report at once - not to work around it for half an
|
|
587
|
+
hour.
|
|
588
|
+
|
|
578
589
|
**The conversation heals it.** Told of the stop, it never regenerates the module again before the cause is fixed - a pulse
|
|
579
590
|
stopped on its environment stops the same way again - and fixes what it can:
|
|
580
591
|
|
|
581
|
-
- **hidden by the sandbox**: it adds the folder to `toolchains:` itself, says so in a line, and resumes
|
|
592
|
+
- **hidden by the sandbox**: it adds the folder to `toolchains:` itself, says so in a line, and resumes - a refused
|
|
593
|
+
write, which no setting fixes, it fixes in the project's own files when it can, and otherwise tells you what to do;
|
|
582
594
|
- **a toolchain or a tool missing** - a JDK, Maven, Go, uv: it looks first for one installed off the PATH - Homebrew's opt
|
|
583
595
|
folders, `/Library/Java/JavaVirtualMachines`, mise, asdf, sdkman, nvm - then asks you, with the exact command for this
|
|
584
596
|
machine (`brew install openjdk@21`, `mise use -g java@21`), and on your yes runs it in its shell, checks the command is
|
|
@@ -894,10 +906,16 @@ agent is told that a failure of the software itself - it does not build or start
|
|
|
894
906
|
spec says it must not - is not the tests' to work around. When it fails, a judge - an agent that reads
|
|
895
907
|
the code and the tests, changes neither, and holds both to the spec - decides which is wrong. It has the
|
|
896
908
|
file tools and the web (`web_search`, `web_fetch`), to look up what a service the code calls answers - no shell: it
|
|
897
|
-
judges from the code, the tests, the spec and the failing run's output,
|
|
909
|
+
judges from the code, the tests, the spec, the conformance testing script word for word and the failing run's output,
|
|
910
|
+
and its file tools write nothing. The explorer's account of how the code is invoked is in its prompt too, marked as
|
|
911
|
+
written before the run and possibly wrong: the judge checks what it uses of it against the script and the files, and
|
|
912
|
+
gives in `evidence` what it found itself. The script is fixed - neither agent can change it - so it is never the
|
|
913
|
+
culprit: what it does with the tests, the tests fit; what it needs of the build, the code provides.
|
|
898
914
|
|
|
899
915
|
- **the code:** the coding agent - in the code's folder, reading the tests but never changing them - fixes it,
|
|
900
|
-
and keeps its unit tests passing
|
|
916
|
+
and keeps its unit tests passing. The judge quotes the spec's own words the code does not meet, or the testing
|
|
917
|
+
script's for what it needs of the build (`script_needs`: a build output, an entry point, a module) - each checked
|
|
918
|
+
by the harness against the text it quotes;
|
|
901
919
|
- **the tests:** the conformance agent corrects them to what the spec says;
|
|
902
920
|
- **the spec:** two functional specs cannot both hold, whatever the code does;
|
|
903
921
|
- **the environment:** neither the code nor the tests can fix it - only the person can, in what the run is given:
|
|
@@ -941,6 +959,20 @@ response, a UUID or a correlation id. Nothing changes either when the agent sent
|
|
|
941
959
|
changes no file: two such fixes in a row, and the run stops. The conformance agent has the testing script in its prompt,
|
|
942
960
|
and is told to fit the tests' own build to it.
|
|
943
961
|
|
|
962
|
+
**Escalation.** A failure judged the tests' goes to the conformance agent first: it owns the tests. When the run then
|
|
963
|
+
fails the same way - the fix changed nothing, or nothing that mattered - the judge is asked again, now whether the
|
|
964
|
+
failure belongs to the code rather than the tests: the run failing on something the code is meant to produce (a build
|
|
965
|
+
output, an entry point, a module the testing script needs), or the tests running and the behaviour itself being
|
|
966
|
+
wrong. Its verdict, either way, has to rest on evidence it gathered: each piece from a file it opened (the harness
|
|
967
|
+
keeps track of what it read, listed and searched), the testing script or the failing run - and not the run alone.
|
|
968
|
+
A verdict without it is sent back; a verdict of code still without it is taken as the tests'. Judged the tests'
|
|
969
|
+
again, the failure stays with the conformance agent, and a fix that changes nothing counts towards stopping as
|
|
970
|
+
before. Judged the code's, it is escalated to the coding agent, handed the script's error, the conformance tests as
|
|
971
|
+
they stand and the judge's reason and evidence (`the script runs dist/cli.js; the build emits dist/src/cli.js`). Its
|
|
972
|
+
fix has to build and pass the unit tests, then the suite runs again. Should the run still fail the same way - or the
|
|
973
|
+
fix change nothing - the run stops there, with the judge's reasoning and evidence in what the person is told. Each of
|
|
974
|
+
these runs is one of the run's 20 attempts, so a failure neither agent can fix stops in three of them.
|
|
975
|
+
|
|
944
976
|
Every attempt is written into the working notes' pitfalls by the harness as cause and effect - what
|
|
945
977
|
the run failed with, how it was judged, and which files the agent sent to fix it changed; the next
|
|
946
978
|
attempt's line says what came of it - and each judge reads them first, so it does not send a
|
package/docs/using.md
CHANGED
|
@@ -13,8 +13,10 @@ banner - the jellyfish it is named after, swimming until the conversation fills
|
|
|
13
13
|
terminal that shows images (Kitty, Ghostty, WezTerm, Warp, iTerm2), and drawn in text in any other, tmux
|
|
14
14
|
included - swimming a stroke a loop, its tentacles following its bell, frames `scripts/jellyfish-frames.mjs`
|
|
15
15
|
writes -
|
|
16
|
-
|
|
17
|
-
and resource list; `turri --verbose` shows
|
|
16
|
+
turri's version (and, run from a clone, the commit it is on, and whether the clone has changes), where commands
|
|
17
|
+
will run, the rules and skills loaded - rather than pi's startup header and resource list; `turri --verbose` shows
|
|
18
|
+
those too. pi's "Update Available" notice is left out - turri's pi is a pinned dependency `pi update` never
|
|
19
|
+
touches - and the terminal's tab reads `🪼 turri - <folder>`, not pi's `π`. Talk to it: ask it to start a
|
|
18
20
|
project, add a feature, render a module, fix a spec. It decides which skill or tool applies - but
|
|
19
21
|
not *how* a skill runs: `cultivate` hands the work to the gated runner, which owns the steps, the
|
|
20
22
|
gates and the judges (see [skills and gates](skills-and-gates.md)).
|
|
@@ -125,10 +127,13 @@ come waits for a free slot, and says so.
|
|
|
125
127
|
as GitHub names a hunk's function: each section is named once.
|
|
126
128
|
- **The side panel** (`ctrl+h`, as it was left - but on the pulse that last failed, stopped or did not pass, when one has
|
|
127
129
|
since it was last opened: the live panel that showed it is gone with the last pulse, and its announcement in the chat
|
|
128
|
-
says `ctrl+h shows this pulse`; **`/
|
|
130
|
+
says `ctrl+h shows this pulse`; **`/pulses`** on the pulses; not `ctrl+j`, which a terminal without the Kitty
|
|
129
131
|
keyboard protocol sends as a line feed, the same as `shift+enter`, and which a dialog takes for
|
|
130
132
|
`enter`; both stay pi's new-line keys. `ctrl+h` is the byte old terminals sent for backspace; a
|
|
131
|
-
terminal set to send `^H` for its Backspace key would open the panel on it) takes the whole screen - the panel or the chat, one at a time
|
|
133
|
+
terminal set to send `^H` for its Backspace key would open the panel on it) takes the whole screen - the panel or the chat, one at a time -
|
|
134
|
+
or, `s`, sits beside the chat: the chat on the left, the panel in the right half of the screen, and `s` again
|
|
135
|
+
over the whole screen. It opens as it was last left, for the conversation; a terminal under 100 columns has
|
|
136
|
+
no room for both and shows the panel over the whole screen.
|
|
132
137
|
It opens on **regen**: the spec itself, in full, with how much of it the code has been regenerated from drawn
|
|
133
138
|
onto it.
|
|
134
139
|
|
|
@@ -212,7 +217,13 @@ come waits for a free slot, and says so.
|
|
|
212
217
|
closes when it moves to another section. What is open is kept while the panel is closed. What the agents
|
|
213
218
|
said and did is not shown - it is in each pulse's log (see [Agent logs](#agent-logs)).
|
|
214
219
|
|
|
215
|
-
`ctrl+h` again, or `esc`, closes it and goes back to the chat.
|
|
220
|
+
`ctrl+h` again, or `esc`, closes it and goes back to the chat. Beside the chat, a click decides which side has
|
|
221
|
+
the keys - the chat or the panel, the one clicked, or the one `⌥⌘←` / `⌥⌘→` points at (on a
|
|
222
|
+
terminal that passes ⌘ on, over the Kitty keyboard protocol - Ghostty, kitty, WezTerm, iTerm2; not Apple's Terminal);
|
|
223
|
+
the other is drawn faint - and `esc` gives the chat the keys too, the panel staying and
|
|
224
|
+
following the pulses; `ctrl+h` gives the panel the keys again, and from the panel closes it. (pi's regular screen,
|
|
225
|
+
`--tui-mode regular`, reads no mouse: there it is the keys alone.)
|
|
226
|
+
While the panel has the keys, every key is the panel's,
|
|
216
227
|
whatever else happens: a question the chat model asks in the background (`ask_user`) waits in the chat,
|
|
217
228
|
unanswered - an `enter` in the panel never answers it - and the panel's top line says "the chat is waiting
|
|
218
229
|
for your answer". Back in the chat, the question is there, with the keys.
|