@turri-dev/cli 0.4.2 → 0.4.3-next.3fc888b
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 -0
- package/dist/background-skills.d.ts +4 -1
- package/dist/background-skills.js +9 -1
- package/dist/capture/agents.d.ts +391 -0
- package/dist/capture/agents.js +338 -0
- package/dist/capture/area.d.ts +58 -0
- package/dist/capture/area.js +197 -0
- package/dist/capture/assemble.d.ts +122 -0
- package/dist/capture/assemble.js +452 -0
- package/dist/capture/capture.d.ts +116 -0
- package/dist/capture/capture.js +1281 -0
- package/dist/capture/chat.d.ts +29 -0
- package/dist/capture/chat.js +94 -0
- package/dist/capture/checks.d.ts +142 -0
- package/dist/capture/checks.js +643 -0
- package/dist/capture/config.d.ts +13 -0
- package/dist/capture/config.js +60 -0
- package/dist/capture/interface.d.ts +71 -0
- package/dist/capture/interface.js +199 -0
- package/dist/capture/map.d.ts +58 -0
- package/dist/capture/map.js +530 -0
- package/dist/capture/plan.d.ts +8 -0
- package/dist/capture/plan.js +13 -0
- package/dist/capture/progress.d.ts +109 -0
- package/dist/capture/progress.js +240 -0
- package/dist/capture/report.d.ts +75 -0
- package/dist/capture/report.js +268 -0
- package/dist/capture/scripts.d.ts +26 -0
- package/dist/capture/scripts.js +33 -0
- package/dist/capture/state.d.ts +299 -0
- package/dist/capture/state.js +43 -0
- package/dist/capture/trial.d.ts +34 -0
- package/dist/capture/trial.js +89 -0
- package/dist/capture-cli.d.ts +1 -0
- package/dist/capture-cli.js +77 -0
- package/dist/chat-commands.d.ts +2 -10
- package/dist/chat-commands.js +3 -57
- package/dist/chat-tab-header.d.ts +15 -0
- package/dist/chat-tab-header.js +78 -0
- package/dist/chat-tabs.d.ts +26 -0
- package/dist/chat-tabs.js +100 -0
- package/dist/chat-terminal.js +57 -8
- package/dist/chat-waiting.d.ts +4 -1
- package/dist/chat-waiting.js +7 -4
- package/dist/chats.d.ts +11 -6
- package/dist/chats.js +34 -20
- package/dist/cli.js +32 -14
- package/dist/config-edit.js +4 -2
- package/dist/config.d.ts +15 -2
- package/dist/config.js +62 -4
- package/dist/extension.d.ts +1 -0
- package/dist/extension.js +199 -55
- package/dist/identity.js +2 -1
- package/dist/init-config.js +2 -0
- package/dist/loop-cli.js +5 -1
- package/dist/loop-tools.js +5 -1
- package/dist/new-project.d.ts +5 -0
- package/dist/new-project.js +11 -0
- package/dist/pi-launch.js +2 -0
- package/dist/pi-themes.d.ts +3 -0
- package/dist/pi-themes.js +21 -0
- package/dist/pi.js +2 -2
- package/dist/plain-code-blocks.d.ts +14 -0
- package/dist/plain-code-blocks.js +56 -0
- package/dist/pointer-hover.d.ts +12 -0
- package/dist/pointer-hover.js +48 -0
- package/dist/question-dialog.d.ts +5 -0
- package/dist/question-dialog.js +20 -1
- package/dist/regenerate/command-check.js +80 -11
- package/dist/regenerate/job-panel.d.ts +5 -107
- package/dist/regenerate/job-panel.js +4 -289
- package/dist/regenerate/jobs-tree.d.ts +1 -0
- package/dist/regenerate/jobs-tree.js +5 -1
- package/dist/regenerate/loop.js +9 -1
- package/dist/regenerate/side-panel.d.ts +6 -1
- package/dist/regenerate/side-panel.js +158 -22
- package/dist/regenerate/spec-map-view.d.ts +11 -3
- package/dist/regenerate/spec-map-view.js +22 -2
- package/dist/regenerate/test-scripts.d.ts +5 -0
- package/dist/regenerate/test-scripts.js +4 -0
- package/dist/reopen.d.ts +29 -0
- package/dist/reopen.js +47 -0
- package/dist/resume-line.d.ts +4 -1
- package/dist/resume-line.js +5 -2
- package/dist/sentinel-chat.js +7 -2
- package/dist/sentinel.d.ts +1 -1
- package/dist/sentinel.js +3 -1
- package/dist/setup.js +9 -1
- package/dist/terminal-notifications.d.ts +31 -0
- package/dist/terminal-notifications.js +134 -0
- package/docs/README.md +2 -0
- package/docs/capture.md +207 -0
- package/docs/chats.md +8 -6
- package/docs/config.md +16 -3
- package/docs/development.md +4 -1
- package/docs/hosting.md +2 -2
- package/docs/launch.md +2 -2
- package/docs/regenerating.md +1 -1
- package/docs/sandbox.md +2 -2
- package/docs/sentinel.md +11 -11
- package/docs/theming.md +3 -3
- package/docs/using.md +10 -2
- package/genome/capture/capture.md +26 -0
- package/genome/capture/check-conventions.md +5 -0
- package/genome/capture/check-reference.md +11 -0
- package/genome/capture/compact.md +7 -0
- package/genome/capture/concepts.md +3 -0
- package/genome/capture/divide.md +9 -0
- package/genome/capture/feature.md +45 -0
- package/genome/capture/interface.md +9 -0
- package/genome/capture/modules.md +23 -0
- package/genome/capture/outline.md +11 -0
- package/genome/capture/readability.md +12 -0
- package/genome/capture/reference.md +10 -0
- package/genome/capture/split.md +9 -0
- package/genome/capture/survey.md +37 -0
- package/genome/capture/trial.md +18 -0
- package/genome/capture/verify.md +7 -0
- package/genome/rules/turri-regeneration.md +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { Container, SelectList, Text } from "@earendil-works/pi-tui";
|
|
2
|
+
import { QuestionDialog } from "./question-dialog.js";
|
|
3
|
+
export class TerminalNotifications {
|
|
4
|
+
items = [];
|
|
5
|
+
reviews = new Map();
|
|
6
|
+
get count() {
|
|
7
|
+
return this.items.filter((item) => !item.seen || this.needsAnswer(item)).length;
|
|
8
|
+
}
|
|
9
|
+
needsAnswer(item) {
|
|
10
|
+
return item.notice?.state === "open" && item.notice.kind !== "fixed";
|
|
11
|
+
}
|
|
12
|
+
add(title, detail, notice) {
|
|
13
|
+
this.items.unshift({ title, detail, seen: false, notice });
|
|
14
|
+
}
|
|
15
|
+
/** Only the sentinel's review shares a row. The pulse result and the question whether to start it are independent. */
|
|
16
|
+
review(about, title) {
|
|
17
|
+
const key = about.check ? `check:${about.check}` : about.job ? `pulse:${about.job}` : undefined;
|
|
18
|
+
const known = key && this.reviews.get(key);
|
|
19
|
+
if (known)
|
|
20
|
+
return known;
|
|
21
|
+
const item = { title, detail: "", seen: false };
|
|
22
|
+
this.items.unshift(item);
|
|
23
|
+
if (key)
|
|
24
|
+
this.reviews.set(key, item);
|
|
25
|
+
return item;
|
|
26
|
+
}
|
|
27
|
+
put(notice, work) {
|
|
28
|
+
const about = [notice.module, notice.pulse !== undefined ? `pulse ${notice.pulse}` : undefined].filter(Boolean).join(" · ");
|
|
29
|
+
const heading = notice.kind === "fixed" ? "Fixed" : "Sentinel";
|
|
30
|
+
const title = [heading, about, notice.summary].filter(Boolean).join(" · ");
|
|
31
|
+
const detail = notice.evidence.join("\n\n");
|
|
32
|
+
if (notice.kind === "sentinel-start")
|
|
33
|
+
return this.add(title, detail, notice);
|
|
34
|
+
const item = this.review(work ?? notice, title);
|
|
35
|
+
Object.assign(item, { title, detail, notice, seen: false });
|
|
36
|
+
}
|
|
37
|
+
concluded(result) {
|
|
38
|
+
const what = result.pulse !== undefined ? `pulse ${result.pulse}` : result.job ?? result.check;
|
|
39
|
+
const verdict = result.verdict === "holds" ? "it holds" : result.verdict === "wrong" ? "found something wrong" : "not checked";
|
|
40
|
+
const item = this.review(result, ["Sentinel", result.module, what, verdict].filter(Boolean).join(" · "));
|
|
41
|
+
item.conclusion = `${verdict}: ${result.summary}`;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/** The notifications tab. Opening or leaving a detail never answers its notice. Only an explicit choice does. */
|
|
45
|
+
export function notificationView(session, style, leave) {
|
|
46
|
+
const inbox = session.notifications;
|
|
47
|
+
const { accent, muted } = style;
|
|
48
|
+
const listBox = new Container();
|
|
49
|
+
let list;
|
|
50
|
+
let rows = [];
|
|
51
|
+
let labels = [];
|
|
52
|
+
let visible = 0;
|
|
53
|
+
let detail;
|
|
54
|
+
let selectedNotice;
|
|
55
|
+
let detailState;
|
|
56
|
+
let height = 20;
|
|
57
|
+
const back = () => { detail = undefined; selectedNotice = undefined; };
|
|
58
|
+
const show = (item, steering = false) => {
|
|
59
|
+
item.seen = true;
|
|
60
|
+
const notice = item.notice;
|
|
61
|
+
selectedNotice = notice;
|
|
62
|
+
detailState = notice?.state;
|
|
63
|
+
const open = notice?.state === "open";
|
|
64
|
+
const actions = open && notice.kind !== "fixed" ? notice.actions.map((action, index) => `${index + 1}. ${action.label}`) : [];
|
|
65
|
+
const steer = "Say what to do instead…";
|
|
66
|
+
const ignore = "Ignore - leave it as the build has it";
|
|
67
|
+
const options = [...actions, ...(open && notice.ignorable ? [ignore] : []), ...(open && notice.kind === undefined ? [steer] : []), ...(open ? ["Dismiss"] : []), "Back"];
|
|
68
|
+
const target = notice && session.chats().find((chat) => chat.id === notice.chat);
|
|
69
|
+
detail = new QuestionDialog({
|
|
70
|
+
question: steering ? "What should be done about it?" : "Notifications",
|
|
71
|
+
context: [item.title, item.detail, item.conclusion, ...(open && notice.kind === undefined && target ? [`Accepted work goes to ${target.title}.`] : [])].filter(Boolean).join("\n\n"),
|
|
72
|
+
...(steering ? {} : { options, clickable: true }), rows: () => height,
|
|
73
|
+
style, requestRender: () => { },
|
|
74
|
+
done(answer) {
|
|
75
|
+
if (!answer || !notice || notice.state !== "open" || (!steering && answer === "Back"))
|
|
76
|
+
return back();
|
|
77
|
+
if (!steering && answer === steer)
|
|
78
|
+
return show(item, true);
|
|
79
|
+
if (steering)
|
|
80
|
+
session.answer(notice.id, { steer: answer });
|
|
81
|
+
else if (answer === "Dismiss")
|
|
82
|
+
session.answer(notice.id, { dismiss: true });
|
|
83
|
+
else if (answer === ignore)
|
|
84
|
+
session.answer(notice.id, { ignore: true });
|
|
85
|
+
else
|
|
86
|
+
session.answer(notice.id, { action: actions.indexOf(answer) });
|
|
87
|
+
back();
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
session.changed();
|
|
91
|
+
};
|
|
92
|
+
return {
|
|
93
|
+
count: () => inbox.count,
|
|
94
|
+
inDetail: () => detail !== undefined,
|
|
95
|
+
render(width, available) {
|
|
96
|
+
height = available;
|
|
97
|
+
if (selectedNotice && selectedNotice.state !== detailState)
|
|
98
|
+
back();
|
|
99
|
+
if (detail)
|
|
100
|
+
return detail.render(width);
|
|
101
|
+
const next = inbox.items;
|
|
102
|
+
const lines = next.map((item) => `${inbox.needsAnswer(item) ? "? " : item.seen ? " " : "• "}${item.notice && item.notice.state !== "open" ? `[${item.notice.state}] ` : ""}${item.title.replace(/\s+/g, " ")}`);
|
|
103
|
+
const room = Math.max(1, available - 4);
|
|
104
|
+
if (!list || room !== visible || next.length !== rows.length || next.some((item, i) => item !== rows[i] || lines[i] !== labels[i])) {
|
|
105
|
+
// Keep the same item selected when a pulse finishes while the person is reading the list.
|
|
106
|
+
const selected = rows[Number(list?.getSelectedItem()?.value)];
|
|
107
|
+
rows = next.slice();
|
|
108
|
+
labels = lines;
|
|
109
|
+
visible = room;
|
|
110
|
+
list = new SelectList(rows.map((_item, i) => ({ value: String(i), label: labels[i] })), room, { selectedPrefix: accent, selectedText: accent, description: muted, scrollInfo: muted, noMatch: muted });
|
|
111
|
+
list.setSelectedIndex(selected ? rows.indexOf(selected) : 0);
|
|
112
|
+
list.onSelect = ({ value }) => show(rows[Number(value)]);
|
|
113
|
+
list.onCancel = leave;
|
|
114
|
+
listBox.clear();
|
|
115
|
+
listBox.addChild(new Text(style.bold(accent("Notifications")), 0, 0));
|
|
116
|
+
listBox.addChild(rows.length ? list : new Text("No notifications this session.", 0, 0));
|
|
117
|
+
listBox.addChild(new Text(muted(rows.length ? "↑↓ select · enter open · r mark all read · esc back" : "esc back"), 0, 0));
|
|
118
|
+
}
|
|
119
|
+
return listBox.render(width);
|
|
120
|
+
},
|
|
121
|
+
handleInput(data) {
|
|
122
|
+
if (detail)
|
|
123
|
+
detail.handleInput(data);
|
|
124
|
+
else if (data === "r") {
|
|
125
|
+
for (const item of inbox.items)
|
|
126
|
+
item.seen = true;
|
|
127
|
+
session.changed();
|
|
128
|
+
}
|
|
129
|
+
else
|
|
130
|
+
list?.handleInput(data);
|
|
131
|
+
},
|
|
132
|
+
handleMouse: (event) => detail ? detail.handleMouse(event) : listBox.handleMouse(event),
|
|
133
|
+
};
|
|
134
|
+
}
|
package/docs/README.md
CHANGED
|
@@ -16,6 +16,7 @@ turri is the first coding agent with the power of regenerative software: [\*\*\*
|
|
|
16
16
|
| what my machine needs, and why a check failed | [installation](installation.md) |
|
|
17
17
|
| what turri needs of this machine, and what `turri doctor` checks | [installation](installation.md#what-turri-doctor-checks) |
|
|
18
18
|
| how to start a project, or add a feature, in a conversation | [using](using.md#in-a-conversation) |
|
|
19
|
+
| how to bring an existing codebase under \*\*\*plain | [capture](capture.md) |
|
|
19
20
|
| how to have several chats open at once, and reopen them | [chats](chats.md) |
|
|
20
21
|
| what checks each pulse as it finishes, and tells me what needs me | [the sentinel](sentinel.md) |
|
|
21
22
|
| which model codes, and how to change it | [using](using.md#choosing-a-model), [the project config](config.md#models) |
|
|
@@ -48,6 +49,7 @@ turri is the first coding agent with the power of regenerative software: [\*\*\*
|
|
|
48
49
|
| [A Claude subscription](claude-subscription.md) | running every agent on a Claude Pro, Max or Team subscription through Claude Code: setting it up, its models, checking it yourself, in turri-desktop, its limits, when it does not work |
|
|
49
50
|
| [The project config](config.md) | `config.turri.yaml` and a module's own `config.turri.<module>.yaml`: where they are read from, every key, models and their inheritance, conformance, the testing scripts, which file builds a module, the old `config.yaml` |
|
|
50
51
|
| [Launch](launch.md) | trying what is built: the launch track, a commit in dist/<module>, starting it on your machine, after every pulse, `turri launch` |
|
|
52
|
+
| [Capture](capture.md) | an existing codebase captured into \*\*\*plain, offline: what it aims for, how it scales, what it writes, the report, resuming |
|
|
51
53
|
| [Running unattended](headless.md) | regenerating overnight or in CI: before you leave it, the command, the results, resuming, rebuilding one functionality |
|
|
52
54
|
| [Authoring \*\*\*plain](authoring-plain.md) | a \*\*\*plain project, what \*\*\*plain is made of, the rules, writing \*\*\*plain with the agent, the skills, checking \*\*\*plain |
|
|
53
55
|
| [Regenerating](regenerating.md) | where things go, one job, a whole module and how its work is cut into jobs, each job's cases, \*\*\*plain changes, conformance tests, the two records of what is built |
|
package/docs/capture.md
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Capture
|
|
2
|
+
|
|
3
|
+
Capture takes an existing codebase and captures what it does into \*\*\*plain. From then on you work on the \*\*\*plain: the code is regenerated from it, and the original codebase is abandoned.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
cd ~/my-app
|
|
7
|
+
turri capture # this folder, into ./plain
|
|
8
|
+
turri capture ../other-app --harness-model anthropic/claude-opus-4-5 --coding-model anthropic/claude-sonnet-4-5
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
In the chat, `/capture [path]` does the same in the background. Only you start it: the chat can tell you about it, but cannot run it, since a capture turns conformance tests on in the project it writes (`src/capture/`).
|
|
12
|
+
|
|
13
|
+
While it runs, the lines above the input show how far it is and what is left (`src/capture/progress.ts`):
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
capture shorty ✓ survey ━ ✓ outline ━ ⠋ features ─ ○ concepts ─ ○ readability ─ ○ interface ─ ○ trial ─ ○ scripts phase 3 of 8
|
|
17
|
+
██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 1 of 3 features captured, 2 at work · 2m 10s · $0.84
|
|
18
|
+
feature shorty#shorten-link 40s ○ read app/api/links.py · thinking
|
|
19
|
+
feature shorty#follow-link 15s ○ read app/repositories/sqlite.py · waiting for the model
|
|
20
|
+
captured shorty#service-info: 1 functional spec
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- **The phases** of the selected pipeline: those done ticked, the current one spinning and those to come. Compact captures have five; staged captures have eight.
|
|
24
|
+
- **Under them, the phase's own work,** where it is counted, as the regen panel draws functional specs: done in green, at work in the accent colour, waiting `▓`. Then that work in words - while outlining, the features outlined so far and the areas still to outline; then the features captured of those to capture - how long the capture has taken, and what its models have cost.
|
|
25
|
+
- **A line for each agent at work:** what it captures, for how long, the last file it read or searched, and what it is doing now.
|
|
26
|
+
- **The last line:** what the capture said last.
|
|
27
|
+
|
|
28
|
+
`turri capture` prints a line as each step ends.
|
|
29
|
+
|
|
30
|
+
When it ends, turri asks whether to open the captured project. A chat works on the project of the folder it was opened in, and `plain/` is a project of its own. So on yes, the chat closes and `turri` starts it again in `plain/`, as it started the first - turri's theme, its screen, that folder's config - on the chat's model and thinking (`src/reopen.ts`). There, `ctrl+h` shows its \*\*\*plain, `/regenerate` builds it, and the chat tells you its report. On no, the chat tells you the report where you are, and `cd plain && turri` opens it later. A host - a desktop app - opens projects itself, so it is not asked.
|
|
31
|
+
|
|
32
|
+
## What it aims for
|
|
33
|
+
|
|
34
|
+
**The interface, whole and exact.** What a user, a client or a script calls is the contract the regenerated software must keep, call for call: every command and subcommand; every option with each name it has, its value, choices and default; every route with its method, path, parameters, fields and status codes; every environment variable and configuration key; every message, output format and exit code a script sees. It is never guessed, never left out as obvious or as the stack's - a stack says how errors are shaped, never which options exist - and never cut for readability. So it is not left to prose at all. It is taken from the code as data - each entry checked against the code it cites - into each part's **interface reference**, a linked resource beside the \*\*\*plain (`resources/interface/<part>.md`) that every functional spec about it carries, through the part's interface concept (`:HttpieInterface:`), to every agent that regenerates or tests the code: the details exact there, the prose free to name them and say what each does. Then capture holds the \*\*\*plain to it: the conventions every feature follows are checked against the code before any feature is written; each writer works from the reference's entries in its feature's files; what no functional spec names goes to a writer of its own; and each module's \*\*\*plain is checked against the reference and the code at the end (steps 3, 4, 8, 9 and 13 below).
|
|
35
|
+
|
|
36
|
+
**Scenarios that hold on the original.** The scenarios are what the regenerated code's conformance tests check, so one the original itself fails is wrong twice: a coding agent builds to it, or its module's tests fail for good. They are written by agents that read the original and never run it, so before the \*\*\*plain is written each is run against a copy of the original, as its conformance test will run it, and corrected to what the original does (step 14). And each module is a concern of its own, never one that holds everything, put in the order its behaviour is built in, so its scenarios need only the modules before it (step 10).
|
|
37
|
+
|
|
38
|
+
**Readable \*\*\*plain, not a transcript of the code** - about everything else. An agent that reads code tends to write every detail down, and \*\*\*plain nobody can read is \*\*\*plain nobody reviews. Every capture agent is told (`genome/capture/capture.md`):
|
|
39
|
+
|
|
40
|
+
- **What someone sees, not what the code does.** A line stays when a user or client would notice the difference and care. Function names, file layout, helpers and internal data shapes are left out.
|
|
41
|
+
- **Only where the code departs from the default.** The default is the stack's conventions, the domain's conventions, and the functional specs before this one. An odd rule is written exactly; cookie-cutter behaviour takes a line or none.
|
|
42
|
+
- **Exact where exactness is the contract.** Endpoints, fields, status codes, flags and formats are captured exactly.
|
|
43
|
+
- **Edge cases go in scenarios.** A functional spec states the rule - `the url is an absolute http or https URL` - and its scenarios pin the edges with concrete values. An example, or what one wrong input answers (`nope` answers 422 `validation_error`), is a scenario's, never said again in the functional spec. How a wrong input is answered is the stack's, unless the original answers otherwise.
|
|
44
|
+
|
|
45
|
+
**About 80% right.** Capture tries its scenarios on the original, but does not regenerate and compare. You close the gap afterwards: regenerate, run the original's tests (or the conformance tests written from the scenarios) against the result, and capture what is missing as ordinary \*\*\*plain changes.
|
|
46
|
+
|
|
47
|
+
**Offline.** No capture agent can ask anything. Whatever the code leaves open, each agent decides itself, and says so. The [report](#the-report) collects every such decision.
|
|
48
|
+
|
|
49
|
+
## How capture scales
|
|
50
|
+
|
|
51
|
+
Capture chooses a pipeline automatically, before the first model call. The CLI says which it chose and why; the report records the choice. It uses the map rather than asking an agent to estimate the work.
|
|
52
|
+
|
|
53
|
+
- **Compact:** at most 12 source, test and contract files, **800 lines and 64 KiB combined**, and at most **12 mapped interface entries** outside tests. A lower `TURRI_CAPTURE_LEAF_LINES` also bounds the line count. Assets, docs and dependency lock files do not count. After the survey and interface reference, **one writer** reads the program and its tests and writes one module directly. There is no separate feature outline, writer per feature, module planner, concept reconciliation or readability pass. The conventions and reference still get checked, a fresh agent verifies the module against the code, and the scenarios are still tried on the original. Testing scripts and the parser check are the same on both paths.
|
|
54
|
+
- **Staged:** larger or interface-heavy inputs are outlined by area, written by feature and checked by module. Areas split only when too large for one outliner; division runs only across multiple leaves, reconciliation only for conflicting definitions. Reference and trial work is batched and independent writers run up to `--parallel` at a time.
|
|
55
|
+
|
|
56
|
+
A short program need not be simple. A compact capture switches to staged if the survey finds multiple parts, the extracted interface exceeds the budget, or the writer cannot fit the behaviour and scenarios into one module of up to eight functional specs. A writer can ask to expand rather than omit behaviour; an invalid draft that still fails the normal checks after retries also expands. Capture reuses the survey, conventions and reference. The choice is saved with its checkpoints; captures started before compact mode resume on the staged path.
|
|
57
|
+
|
|
58
|
+
## How it works
|
|
59
|
+
|
|
60
|
+
Both pipelines share the map, survey, interface reference and final checks. The numbered steps below describe the staged pipeline in full.
|
|
61
|
+
|
|
62
|
+
1. **The map** (`src/capture/map.ts`), with no model. Every file the codebase holds, read through git when it is a repo, so what git ignores is left out. Also left out: dependencies, caches, capture's own output folder, and any turri project inside the codebase (a folder with a `config.turri.yaml`, an earlier capture's among them), since its \*\*\*plain is not the code. Each file gets:
|
|
63
|
+
- its kind: source, test, doc, asset, contract, manifest
|
|
64
|
+
- its lines
|
|
65
|
+
- the surfaces patterns find in it: routes, commands, options with every name each has (`-v, --verbose`), screens, the environment variables it reads, tables and models, test names, exports. A file keeps its whole interface - seventy options are seventy - and a sample of the rest.
|
|
66
|
+
- the codebase's own files it imports
|
|
67
|
+
|
|
68
|
+
The patterns cover common frameworks:
|
|
69
|
+
- **Python:** Flask, FastAPI, Django, click, typer, argparse
|
|
70
|
+
- **JavaScript and TypeScript:** Express, Fastify, NestJS, React Router, Vue Router, file-routed Next.js and SvelteKit, commander
|
|
71
|
+
- **Go:** net/http, gin, echo, chi, cobra
|
|
72
|
+
- **Java:** Spring, picocli
|
|
73
|
+
- **Rust:** axum, actix, clap
|
|
74
|
+
- **Ruby:** Rails
|
|
75
|
+
- **SQL:** tables in schema and migration files
|
|
76
|
+
|
|
77
|
+
A file no pattern fits is still on the map, by its size.
|
|
78
|
+
2. **The survey.** One agent is shown the map of the whole codebase, folded to its budget, with the manifests, the README and the standard library's catalogue. It names the parts: software on one stack each, like a backend and a frontend. For each part it gives:
|
|
79
|
+
- the stack - a `stdlib/` template only when the original agrees with it, otherwise written out as implementation reqs
|
|
80
|
+
- its conventions: what every feature does the same way and a user or a script relies on - how an error is written, the exit code or status of each kind of failure, what changes without a terminal. For software that talks to other software, also what reaches the other side on every call, whichever feature makes it: the headers it adds of its own, how bodies and header values are encoded - JSON's separators, non-ASCII escaped or not, the charset - and when a body is sent or read whole, streamed, or not read at all. No feature's writer looks at the wire. Each is settled from the code that does it, never from a declaration or a framework's default, and names the files that decide it. They go into the part's import module as implementation reqs, and every feature's agent is handed them as settled, so no two features decide an exit code differently.
|
|
81
|
+
- how its black-box tests run, from the original's own tests and the harness they run under: what standard input is, the environment, the servers they start - a conformance test run otherwise tests another program. Then what every test sets up so the software acts the same on every run and machine: what it fetches or checks on its own (an update check, telemetry) off or pointed at a local stand-in; a home and a configuration folder of the test's own; the terminal width fixed (`COLUMNS`) where its output wraps; a pseudo-terminal where it prompts on one; local servers, never the internet
|
|
82
|
+
- its core concepts
|
|
83
|
+
|
|
84
|
+
It also names what is not the software (vendored, generated, tooling). It may never leave out the original's tests, which are the evidence of what the software does.
|
|
85
|
+
3. **The conventions checked.** Before any writer is given them, an agent per part checks each convention against the code it names - the entry point, where errors are caught, written and exited, where a request is built and sent or a response written - and corrects what does not hold, saying why. Every feature follows them, so one that is wrong is wrong everywhere. A check that never holds leaves them as surveyed, and the report says so.
|
|
86
|
+
4. **The interface reference.** The interface is taken from the code as data, before any feature is outlined (`src/capture/interface.ts`, `genome/capture/reference.md`). The files where the map found it are given to agents, up to 4000 lines and 12 files each, and each agent lists every command, argument, option, route and environment variable they define - and any the map missed - as entries: the name exactly as the code has it, every other name, the command it belongs to, what it takes, its choices, its default, whether it repeats, is required or is hidden, its help word for word, a route's parameters, fields and statuses, and where it is defined. The harness checks each entry against the code with no model (`referenceProblems`): its `where` is a line of a file of the map, and every literal it gives - each name, alias, choice, default and the start of its help - is in that file or in the files it names as where one is worked out. A literal the code does not have sends the entry back, and so does any surface the map found in the files that is neither listed nor excluded with why. Then a fresh agent checks it against the code, as the conventions are - what checking literals cannot see: a help text cut to its first line, choices left out or worked out when the program runs, an environment variable read through a constant - and corrects or adds each, citing the line that shows it, its answer checked again as the first was; what it changed is in the report, to read first: a checker can be wrong too. The entries become the part's interface reference, `resources/interface/<part>.md`, linked from the part's interface concept, defined in what every module of the part imports: every functional spec that uses it carries the reference, whole, to its coding and conformance agents. A part none of whose entries held has no reference, and its writers work from the map, as do those of files whose agent never held.
|
|
87
|
+
5. **The split.** An area of more than 6000 lines (`TURRI_CAPTURE_LEAF_LINES`) goes to an agent that splits it into smaller areas by what they do. Each smaller area that is still too large is split again, so depth grows only slowly with size. The harness puts the areas in the order of their code: an area whose files import another's comes after it. The modules are gathered by concern and put in the order their behaviour is built in once the features are written (step 10).
|
|
88
|
+
6. **The outline.** An area that fits is outlined by one agent into features, in build order. Each feature is something a user can do, with the files where it is built. The agent sees the stack's templates too: infrastructure they settle - settings, logging, error bodies, middleware - is no feature, and is left out as settled by the stack, unless a user would notice the original does it differently.
|
|
89
|
+
7. **The features divided.** Once every area of a part is outlined, one agent sees all its features, area by area, with what each is about and where it is built, and gives each behaviour to one feature. The outlines are made area by area from each area's own files, so the same behaviour can be outlined twice - an option parsed in one area and acted on in another, a message printed in a third - and written twice it reads twice, in different words, and contradicts itself. Each feature that stays gets a line of what it alone owns; a feature that is a slice of another's behaviour is merged into it, its files the other's, and not written. A part outlined as one area is not divided: one agent saw all of it. A division that never holds leaves each feature owning what it was outlined for.
|
|
90
|
+
8. **The features, side by side.** One agent per feature, up to `--parallel` (4) at once. Each is given the full text of the `stdlib/` templates its part is built on - the stack, its kind's `common`, its language's - as the default it never restates, the part's conventions, every feature of the part with what it owns, and the reference's entries in its feature's files, with what the map found there that the reference does not list: it captures what each piece its feature owns does, by its exact name, using the part's interface concept - what one takes, its choices, its default and its help left to the reference, said only where a behaviour turns on them and never otherwise - and never another feature's behaviour, even where its code or tests touch it. Each follows the feature's surfaces through the code, reads the original's tests of it, then writes:
|
|
91
|
+
- at most 8 functional specs
|
|
92
|
+
- the concepts they need beyond the part's
|
|
93
|
+
- its scenarios, mimicking the original's black-box tests - a test that runs the software through its interface, in its own process or the test's - and spent where those are densest: a functional spec the original tests twenty ways gets several, error cases no larger share than the original gives them. Where the original has no test of a spec, it gets scenarios only when it can fail silently, can be read two ways, or is costly when wrong. A feature may have 8 scenarios, and one more for every 50 lines of the original's tests in its files, up to 30; its agent is shown those test files, their lines and their tests' names. Each scenario expects what the original does under the test reqs: output that is not a terminal unless they give one, a local server rather than the internet - never a unit test that mocks a library, recast.
|
|
94
|
+
9. **The interface no feature captured.** Once every feature is written, the harness matches the interface - the reference's entries, and what the map found in the parts' files that the reference neither lists nor excludes - against the \*\*\*plain: an option, command or variable as a word of its own, a route by its path under any prefix, its parameters written any way. What no feature names goes to a writer of its own, as a feature added to the area whose files define it, up to 30 surfaces a writer. It captures each exactly - or, for one that is not the software's interface, such as a development script's option, names it in `dropped` with why - and is sent back until every one is settled. A capture leaves no interface out by accident.
|
|
95
|
+
10. **The modules, by concern and in build order** (`genome/capture/modules.md`). A module is a concern of its own - what a person looks for in one file: request sending, output formatting, sessions, downloads. One module that holds everything is as hard to read as the code, and every change to it regenerates all of it. The code's areas are gathered into modules by size alone (see [modules](#what-it-writes)), so a small codebase's every concern can land in one. And a module is built on the code of the modules before it, its scenarios run as soon as it is built, with nothing after it there - yet the areas are in the order of their code's imports, which is not the order behaviour is built in: the code that runs everything imports everything - httpie's request sending imports its output formatting and its sessions - so output formatting's scenarios, which send a request and print the answer, could not pass before it. So for each part of more than one feature, an agent is shown every feature, area by area, with what it owns, its functional specs and scenarios, and the modules as the areas make them, and gathers the features into modules by concern - a feature with another only when it is part of that concern, a concern past about 40 functional specs two modules - and puts them in the order they are built, naming for each the modules before it that its functional specs build on and its scenarios run. A scenario that needs a module after its own whatever the order - two modules each needing the other - is rewritten to check the same with only those before it, never merged away. The harness checks that every feature is in one module, that one module never holds a part larger than a module, that none holds more than twice that, and that each module needs only those before it. It runs once, before anything is done module by module; an answer that never holds leaves the modules as the areas make them, in the order of their code, and the report says so.
|
|
96
|
+
11. **Concepts reconciled.** A concept two features defined in different words is given one definition by an agent that sees the definitions and the specs that use it.
|
|
97
|
+
12. **The readability pass.** For each module, an agent reads its \*\*\*plain - each functional spec with its scenarios - and the stack's templates, never the code. It rewrites the functional specs that read as code, or restate the stack, an earlier spec, or a case one of their scenarios pins. It must keep every fact the stack and the scenarios do not keep - every interface fact, however obvious - and may never make a spec longer. Like the unit review, it improves; it is not a gate.
|
|
98
|
+
13. **The interface checked against the code.** For each module, an agent is given its \*\*\*plain - functional specs with their scenarios - the reference's entries in its features' files, and the options the \*\*\*plain names that the reference does not have, found mechanically, and checks every interface fact against the reference and the code that decides it: each option's names, value, choices and default; each route's method, path, fields and status codes; each message, format and exit code. It corrects what is wrong or left out, a functional spec's text or a scenario's, citing the code - over the readability pass, which never sees the code. A correction that never holds is not made.
|
|
99
|
+
14. **The scenarios tried on the original** (`src/capture/trial.ts`, `genome/capture/trial.md`). Every agent before this one read the original and never ran it, so a scenario can expect a terminal its test will not give, a site on the internet, output wrapped at a width nobody set, or a message the original never prints. For each module, a copy of the original - the files the map has, so none of its installed dependencies, nor turri's own config files, and the lock files beside its manifests, so it installs what the original pins - is made under `.turri/capture/trial/<module>/`, and agents with a shell on it, 20 scenarios each, one after another, install the original there and run each scenario as its conformance test will: from outside, through its interface, under the part's test reqs and its stack's conformance template. Their shell is a coding agent's - the command check, a home, temporary folder and package caches of its own, the OS sandbox and the audit - fenced to the copy. Each scenario comes back `held`, with what was run and what the original answered; `corrected` to what the original does, keeping what it checks - a local server for a site on the internet, the option that forces colour where the test's output is no terminal; `removed`, when nothing outside can check it; or `untried`, with why, when the original would not run here - kept as written. A functional spec the original contradicts is corrected with its scenario, and what every test must set up for the original to act as the scenarios say - `COLUMNS`, a configuration folder of its own, an update check off - joins the part's test reqs. What only some scenarios need - a file one sends, a server answering one exact body, a pseudo-terminal for one prompt - is never a test req, which every conformance test of every module is written under: those scenarios are corrected to say it themselves, and a test req that names a scenario or a functional spec is sent back. The harness checks that every scenario has one result and that each held or corrected one says what was run. The copy is removed once the module's agents are done. An agent that never holds leaves its scenarios as written, and the report says so.
|
|
100
|
+
15. **The files.** The modules, their scenarios, the interface references and the config are written, once.
|
|
101
|
+
16. **The testing scripts.** turri's own skills write each part's unit and conformance testing scripts for the \*\*\*plain just written - `implement-unit-testing-script` and `implement-conformance-testing-script` (`src/capture/scripts.ts`), side by side, on the coding model with its configured thinking. They run as the chat runs them in the background: nobody is asked, and a review gate that cannot be satisfied stands. So the captured project can be regenerated at once. A script that is not written does not stop the capture: the report says why, and which skill to ask for.
|
|
102
|
+
17. **The check and the report.** The parser checks every module.
|
|
103
|
+
|
|
104
|
+
The harness checks every answer before keeping it, and sends it back with what is wrong, twice at most (`src/capture/checks.ts`). It checks:
|
|
105
|
+
- paths that are not in the codebase
|
|
106
|
+
- a convention that names no file deciding it
|
|
107
|
+
- ids that are not kebab-case
|
|
108
|
+
- concepts used and never defined
|
|
109
|
+
- a feature over its budget: functional specs, and scenarios past what the original's tests give it
|
|
110
|
+
- a line the parser would read as a heading
|
|
111
|
+
- a link, such as `<https://...>`: the parser refuses any link but one to a file of the project, so a URL is written as code
|
|
112
|
+
- a split that leaves files nowhere
|
|
113
|
+
- a division that leaves a feature with no owner, or merges one into itself, into nothing or into one merged too
|
|
114
|
+
- an entry of the interface reference with a literal the code it cites does not have, or a surface of the map neither listed nor excluded
|
|
115
|
+
- a writer of the interface no feature captured that leaves a surface neither captured nor dropped with why
|
|
116
|
+
- modules that leave a feature out or hold it twice, one module holding a part too large for one, or a module before one it needs
|
|
117
|
+
- a correction to a functional spec or scenario that is not there, or with no why
|
|
118
|
+
- a trial that leaves a scenario it was given with no result, says a scenario held or is corrected without saying what it ran against the original, or adds a test req that names a scenario or a functional spec - one scenario's setup, which its own text says
|
|
119
|
+
|
|
120
|
+
An answer that never holds does not stop the capture:
|
|
121
|
+
- **A split** falls back to an outline of the whole area.
|
|
122
|
+
- **A division** leaves each feature owning what it was outlined for.
|
|
123
|
+
- **An outline or a feature** is left uncaptured, and the report says so - a writer of the interface too, its surfaces then counted in the summary.
|
|
124
|
+
- **The modules by concern** stay as the code's areas make them, in the order of their code.
|
|
125
|
+
- **The conventions check, an interface correction or a trial** leaves what was there.
|
|
126
|
+
|
|
127
|
+
Only a survey that never holds stops the capture, before anything is written.
|
|
128
|
+
|
|
129
|
+
## What it writes
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
my-app/
|
|
133
|
+
... the original - read only, never written
|
|
134
|
+
plain/
|
|
135
|
+
config.turri.yaml the config in use where the capture was started, conformance-tests: true, base-folder: assets
|
|
136
|
+
config.turri.<m>.yaml one per part, when there are several - where its testing scripts go
|
|
137
|
+
template/<part>-shared.plain what a part's modules share: the stack, test reqs, concepts used across modules
|
|
138
|
+
<module>.plain ... the modules, a concern each, in the order they are built, each requiring the one before it
|
|
139
|
+
tests/<module>/<func-id>.plain the scenarios of each functional spec that has them
|
|
140
|
+
test_scripts/ the unit and conformance testing scripts, written by turri's skills
|
|
141
|
+
resources/interface/<part>.md each part's interface reference, linked by its interface concept
|
|
142
|
+
assets/ the original's images, fonts and media, copied - the base folder
|
|
143
|
+
.gitignore keeps the regenerated code's histories out of the repo
|
|
144
|
+
.turri/capture/ state.json - what each agent answered - and report.md
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
- **Modules.** Splitting decides what each agent sees; a module is a concern, what a person reads in one file. The code's areas make the modules an agent starts from: an area whose leaves hold 40 functional specs or fewer (`MODULE_SPECS`) is one module, named after the area, with its leaves' features in build order, and a larger area is its areas' modules, each worked out the same way. That is by size alone, so an agent then gathers the features into modules by concern and puts them in the order they are built (step 10): each module a concern, named for it, never one holding everything. Where its answer never holds, the modules stay as the areas make them.
|
|
148
|
+
- **Feature groups.** Each module's functional specs are grouped by feature, one feature's after another's, with no comment line between them.
|
|
149
|
+
- **Concepts.** A concept stays in the module that defines it when only that module uses it. A concept used across modules goes to the part's import module, along with every concept its definition uses.
|
|
150
|
+
- **The codebase is never written to.** Capture's agents only read it - read, grep, find, ls, and no shell - but for those that try the scenarios, which run the original in a copy of it, removed once they are done.
|
|
151
|
+
- **Assets.** The assets are copied rather than linked, so the original can be deleted without breaking anything. `base-folder: assets` puts them in the first module's code before its first pulse, at the paths they had.
|
|
152
|
+
- **The config.** The captured project's `config.turri.yaml` starts as the config in use where the capture was started - the chat's folder's, or the folder `turri capture` runs in (the nearest upwards that is a project's) - so the person's models, thinking, reviews, limits and every other setting they chose carry over (`src/capture/config.ts`). It is written as the capture starts and its agents use [these models](#models). What belonged to the original project alone is left out - `module`, the testing scripts, `base-folder`, `test-dir` - since the capture writes its own; then `conformance-tests: true`, and the models given for it where they differ: in the chat, its model and thinking of the moment, and the coding model turri was started with; on the command line, `--harness-model` and `--coding-model`. With no config in use, it holds those alone. A config in use that does not parse refuses the capture, and nothing is written ([a config that does not parse](config.md#a-config-that-does-not-parse)).
|
|
153
|
+
|
|
154
|
+
## The report
|
|
155
|
+
|
|
156
|
+
`plain/.turri/capture/report.md` replaces the questions a capture never asks. It lists:
|
|
157
|
+
|
|
158
|
+
- what was written
|
|
159
|
+
- the conventions every feature follows, with the files that decide each: wrong there, wrong everywhere - and what the check against the code changed
|
|
160
|
+
- what the check of each module's interface against the code corrected, and why
|
|
161
|
+
- the scenarios tried on the original: each one corrected to what the original does, removed or not tried, with why; the functional specs corrected with them; what was added to the test reqs. The summary says how many held as written.
|
|
162
|
+
- each part's modules by concern, in the order they are built, what each needs of those before it, and the scenarios rewritten to need only those before their own
|
|
163
|
+
- the features merged into others, and why
|
|
164
|
+
- the testing scripts: where each is, or why it was not written and which skill to ask for
|
|
165
|
+
- the parser's check
|
|
166
|
+
- what could not be captured
|
|
167
|
+
- features the original's tests cover that were captured with no scenario
|
|
168
|
+
- each part's interface reference: where it is, what it holds, what was left out of it and why, and what could not be taken
|
|
169
|
+
- the interface its \*\*\*plain still names nowhere - options, commands, routes, screens, environment variables - each with why its writer dropped it, or with none when no writer settled it. Those with no why are counted in the summary: a user could call them in the original and will not find them in what is regenerated.
|
|
170
|
+
- what was left out and why
|
|
171
|
+
- every assumption
|
|
172
|
+
- what the agents were unsure of
|
|
173
|
+
- what they dropped as incidental
|
|
174
|
+
- what to do next
|
|
175
|
+
|
|
176
|
+
Its first lines are the summary the command line and the chat show. In the chat, the report comes back once the capture ends, and the chat's agent passes it on.
|
|
177
|
+
|
|
178
|
+
## Stopped, finished, run again
|
|
179
|
+
|
|
180
|
+
- **Stopped part-way.** Every answer is saved in `state.json` as it comes. Running the capture again goes on from where it was and asks no agent twice. This covers a quit, a crash, or a provider down for good.
|
|
181
|
+
- **Finished.** A finished capture is never run over. To capture again, move `plain/` out of the way.
|
|
182
|
+
- **A folder that is not a capture.** Capture refuses a `plain/` that holds anything but its own state, and `--into <folder>` names another folder.
|
|
183
|
+
|
|
184
|
+
## Models
|
|
185
|
+
|
|
186
|
+
| Role | Work | Default |
|
|
187
|
+
| --- | --- | --- |
|
|
188
|
+
| `capture-analysis` | Extract and check the interface reference; split areas, outline features and divide ownership on the staged path. | The coding model (`--coding-model` on the CLI), thinking **low**, even if coding itself uses high thinking. Without a separate coding model, the harness model thinks low. |
|
|
189
|
+
| `capture` | Write or correct \*\*\*plain. This includes the survey, conventions, compact or feature writers, module gathering, verification and scenario trials, which can correct a spec or scenario. | The chat's model, or `--harness-model` / the project's harness model on the CLI; pi's choice when none is set. Thinking is **medium** unless a level is named. |
|
|
190
|
+
|
|
191
|
+
For example, to use Sonnet for analysis without changing chat, coding or testing-script models, set this in `config.turri.yaml`:
|
|
192
|
+
|
|
193
|
+
```yaml
|
|
194
|
+
models:
|
|
195
|
+
capture-analysis: anthropic/claude-sonnet-5-5:low
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
An explicit `models.capture` setting still applies to both roles. Each model, thinking or turn-limit field set under `models.capture-analysis` overrides that field for analysis only. Capture turns have ten minutes unless a role, `models.default` or `turn-limit` sets a limit; scenario trials get at least thirty minutes unless the limit is off.
|
|
199
|
+
|
|
200
|
+
`--harness-model` and `--coding-model` are also written into the new project's config, for the chat and the regeneration that follow.
|
|
201
|
+
|
|
202
|
+
## After a capture
|
|
203
|
+
|
|
204
|
+
1. **Read the \*\*\*plain and the report,** in turri opened in `plain/`. From now on the \*\*\*plain is the source of truth.
|
|
205
|
+
2. **Regenerate,** first module first: `/regenerate`. Its testing scripts are written already. Any the report says were not, ask turri for first (`implement-unit-testing-script`, `implement-conformance-testing-script`).
|
|
206
|
+
3. **Compare with the original** by hand: its own tests, the scenarios' conformance tests, a look at what is launched. Each difference becomes a \*\*\*plain change.
|
|
207
|
+
4. **Abandon the original** once you are satisfied.
|
package/docs/chats.md
CHANGED
|
@@ -19,28 +19,30 @@ The session's, shared by every chat:
|
|
|
19
19
|
- **what launches started** - it runs until turri ends or `/halt launched <name>`, whatever chats are opened or closed - and the launch track;
|
|
20
20
|
- **the ledger** - one run, each event with the id of the chat its work was asked for in (`chat`), and `chat.opened` and `chat.closed` as they happen.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Each finished pulse appears in the session's notifications. When the [sentinel](sentinel.md) is on, it checks the pulse in the background and puts its findings and conclusion there too. Your conversation stays on what you asked; accepting a notice's action starts work in the chat it names. Closing a chat stops its turn, never its pulses.
|
|
23
23
|
|
|
24
24
|
## In the terminal
|
|
25
25
|
|
|
26
26
|
| | |
|
|
27
27
|
| --- | --- |
|
|
28
|
-
| `/chat new`, `alt+n` | a fresh chat, with the session's settings and an empty history, shown at once |
|
|
29
|
-
| `/chat 2`, `alt+2` | chat 2, shown - `alt+1` … `alt+9` |
|
|
30
|
-
| `/chat close
|
|
28
|
+
| Click `+`, `/chat new`, `alt+n` | a fresh chat, with the session's settings and an empty history, shown at once |
|
|
29
|
+
| Click tab 2, `/chat 2`, `alt+2` | chat 2, shown - `alt+1` … `alt+9` |
|
|
30
|
+
| Click a tab's `×`, `/chat close 3` | close that chat; closing a background chat leaves the one shown in place |
|
|
31
|
+
| `/chat close`, `alt+w` | close the chat shown and switch to the next one |
|
|
31
32
|
| `/chat` | a list of the chats, to pick one - or a new one |
|
|
33
|
+
| `***plain ›` → `notifications`, `/notifications` | finished pulses and sentinel findings across this session; open a notice to read its evidence and answer it |
|
|
32
34
|
| `/new` | the same as `/chat new` |
|
|
33
35
|
| `/resume` | a saved chat, opened as a chat of its own beside the others - or shown, when it is open |
|
|
34
36
|
| `ctrl+c` | what the chat shown is doing, stopped - its turn, a skill or a tool in it, a `!` command, a compaction; in a chat doing nothing, a draft in the editor cleared, else turri left, every chat with it |
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
The chat tabs sit just below the banner's horizontal rule. When the banner scrolls away, the tabs stay at the top of the fullscreen terminal. A fresh session starts with one tab and a `+` button. Click `+` to open a chat, a tab's title to switch to it, or its `×` to close it. The active tab has the accent fill and a `▸` marker when there is room. Moving the pointer over a control highlights and underlines that target, including the close button independently of its tab. Each tab shows its number and title - "new chat" until the first message, unless `/name` gives it a name - and a spinner while it works, `?` while a question waits, or `•` when it said something since you last looked. In `--tui-mode regular` the tabs scroll with the terminal; use the commands or keys to switch.
|
|
37
39
|
|
|
38
40
|
A message you send while a chat's agent works is shown under the chat at once, shaded and marked `not read yet`, and stays under what the agent writes and the tools it calls until the agent reads it - at the end of its current step - when it goes into the chat as a normal message, where it was read. `alt+up` takes the messages waiting back into the editor (`src/chat-waiting.ts`). While a skill runs in the chat its own agent is the one at work, and the chat's waits for the whole run: what you type then goes to the skill's agent, shown waiting until it reads it, at the end of its current step - and is in the chat from then, where it was read. The chat's agent is told what you said to the skill when the run ends. A message the skill's agent has not read when the run ends goes to the chat's agent instead.
|
|
39
41
|
|
|
40
42
|
On macOS, `alt` is Option (⌥), and reaches turri only when the terminal sends Option as Meta - otherwise ⌥N is the dead key for ñ and ⌥1 types `¡`, and nothing reaches turri. turri says so as a session's second chat opens. To turn it on: Ghostty, `macos-option-as-alt = true` in its config; iTerm2, Profiles → Keys → Left Option key: Esc+; Terminal.app, Profiles → Keyboard → Use Option as Meta key; Kitty, `macos_option_as_alt yes`; WezTerm, `send_composed_key_when_left_alt_is_pressed = false`. `/chat` works without it.
|
|
41
43
|
|
|
42
44
|
- **A hidden chat's questions** wait until you show it, then come up one after another. What it says in passing is said as you show it; what it keeps on the screen - a skill's progress, the job panel - is put back each time; what you had typed in its editor and not sent is still there.
|
|
43
|
-
- **The side panel**
|
|
45
|
+
- **The side panel** belongs to the session and stays open when you switch chats. Click `***plain ›` at the right end of the chat tabs to open it; click `***plain ‹` to close it. The button turns pink and spins while turri plans or runs pulses. Its tabs are `***plain`, `pulses` and `notifications`; `× close` also closes it. From the keyboard, `ctrl+h` opens the panel, `p` switches between the map and pulses, and `n` opens notifications. A terminal under 104 columns shows the panel full screen.
|
|
44
46
|
- **A long command** - `/regenerate`, planning a module from scratch - does its work in the background once it is under way: the chat, and switching to another, stay free while the planner plans.
|
|
45
47
|
- **`ctrl+c`** reaches the chat shown and nothing else: another chat's turn and skill go on, and so do the pulses - `/halt` stops one. A skill stopped keeps its run, for the model to continue with `resume`. At a question - the chat's `ask_user`, a skill's interview - `ctrl+c` declines it, and the asker is told so and goes on - each question it is pressed at, however many in a row. A skill is stopped by `ctrl+c` with no question open. A second press straight after one that stopped something does nothing, so pressing twice to be sure does not leave turri; once the chat is doing nothing, the next one does - with what every other chat is doing. A host has the same as `interrupt(id)`, and `decline(id)` for a question ([hosting](hosting.md)).
|
|
46
48
|
- **The sentinel** is a chat in the strip like the others, `sentinel`, and never shown by itself: it closes like any chat, and the next pulse that finishes opens it again. Each pulse it checks in a fresh conversation, replacing the one in its tab. With it on, you open up to eight chats - the ninth slot is its. See [the sentinel](sentinel.md).
|
package/docs/config.md
CHANGED
|
@@ -107,7 +107,7 @@ models: # each agent role's model, thinking and tur
|
|
|
107
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 |
|
|
108
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` |
|
|
109
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
|
|
110
|
+
| `sentinel` | `ask`, `true` or `false`: whether the sentinel checks each finished pulse, tests what was launched under `launch-after-pulse`, and reports findings in notifications. `ask`: answer the start question in notifications 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
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
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
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 |
|
|
@@ -139,6 +139,8 @@ Keys are written with dashes; underscores are read the same (`mutation_testing`)
|
|
|
139
139
|
| `chat` | `turri`'s model - the same as `harness-model`, which it wins over |
|
|
140
140
|
| `sentinel` | [the sentinel](sentinel.md): checks every finished pulse, and tests what was launched. Unnamed, the chat's model |
|
|
141
141
|
| `planner` | the conversation's side: the planner's agents. Unnamed, the chat's model |
|
|
142
|
+
| `capture` | the agents of [a capture](capture.md): they write \*\*\*plain from an existing codebase. Unnamed, the chat's model - `--harness-model` under `turri capture`. A turn may take ten minutes unless its entry, `default`'s or `turn-limit:` says otherwise - one trying the scenarios on the original at least thirty, unless the limit is off |
|
|
143
|
+
| `capture-analysis` | extracts and checks a capture's interface reference, splits areas, outlines features and divides ownership. Takes any fields explicitly set in `models.capture` unless overridden here; otherwise uses the coding model with low thinking and the same turn limit as capture |
|
|
142
144
|
| `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 |
|
|
143
145
|
| `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
146
|
| `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 |
|
|
@@ -152,7 +154,7 @@ Keys are written with dashes; underscores are read the same (`mutation_testing`)
|
|
|
152
154
|
|
|
153
155
|
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.
|
|
154
156
|
|
|
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
|
|
157
|
+
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 `coding`, `conformance`, `explorer`, `launch` and `capture-analysis`, and **medium** for `reviewer`, `test-reviewer`, `judge`, `arbiter`, `debugger`, `planner`, `capture` and `diagnosis`. Capture analysis and a judging role that falls back on the coding model take its model alone, not its thinking. The conversation keeps its own level, as [pi](https://pi.dev) sets it.
|
|
156
158
|
|
|
157
159
|
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.
|
|
158
160
|
|
|
@@ -286,4 +288,15 @@ turri's settings were once in `config.yaml`, and a module's own in `config.<modu
|
|
|
286
288
|
|
|
287
289
|
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.
|
|
288
290
|
|
|
289
|
-
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.
|
|
291
|
+
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.
|
|
292
|
+
|
|
293
|
+
## A config that does not parse
|
|
294
|
+
|
|
295
|
+
A `config.turri.yaml` - or a module's own file, or a `config.yaml` turri still reads - that is not valid YAML is read as empty: none of it applies, and turri would run on its defaults and [pi](https://pi.dev)'s, the models among them - pi's own default model, which may not be one your credentials reach. A key set twice is the usual way in: a second config pasted under the first. So turri says it, never silently (`configProblems` in `src/config.ts`), naming the file, the line and what is wrong - `config.turri.yaml, line 13: conformance-tests is set twice`:
|
|
296
|
+
|
|
297
|
+
- **The chat** says it under the banner, in the error colour, as it starts.
|
|
298
|
+
- **Nothing is regenerated with it.** `regenerate`, `conform`, `/regenerate`, `/conform` and `turri regenerate` refuse to start a pulse until it parses, saying why - as they refuse a module that cannot be built with its config.
|
|
299
|
+
- **A capture** started where it is in use refuses to start, since the captured project starts as that config ([capture](capture.md)).
|
|
300
|
+
- **`turri doctor`** lists it first among the project's checks.
|
|
301
|
+
|
|
302
|
+
Fix it - each key set once - and ask again.
|
package/docs/development.md
CHANGED
|
@@ -64,7 +64,10 @@ The workflow signs in to npm with npm's trusted publishing (OIDC), not a token:
|
|
|
64
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 |
|
|
65
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
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) |
|
|
67
|
-
| `
|
|
67
|
+
| `src/capture/`, `src/capture-cli.ts` | [capture](capture.md): the map, areas folded to a budget, the agents and the checks of what they hand over, assembling the modules, the testing scripts, the report, resuming, its status while it runs - and `turri capture` |
|
|
68
|
+
| `src/reopen.ts` | a chat opened again in another folder by `turri` once it quits - into the project a capture wrote |
|
|
69
|
+
| `src/plain-code-blocks.ts` | \*\*\*plain fenced as ` ```plain ` in the chat, highlighted by turri's grammar - pi-tui's Markdown patched |
|
|
70
|
+
| `genome/` | what turri knows and can do: `genome/skills/`, the skill library, `genome/rules/`, the \*\*\*plain authoring rules, and `genome/capture/`, capture's prompts |
|
|
68
71
|
|
|
69
72
|
## Known edges
|
|
70
73
|
|
package/docs/hosting.md
CHANGED
|
@@ -171,11 +171,11 @@ The [sentinel](sentinel.md) is one of the host's chats: turri opens it with the
|
|
|
171
171
|
- **A conversation a pulse.** The sentinel checks each pulse from scratch, in a conversation of its own - one pulse at a time, the others waiting their turn. The chat keeps its id; its session is replaced. As it starts on a pulse, the session it had is stopped and let go (`abort`, `dispose`), a new one is made in its place, and `onChatSession(chat, session)` comes with it - before the pulse is put to it - then `onChats`; `session(id)` returns the new one from then on. A host that follows the sentinel's chat subscribes to that session in place of the old - an `onChats` listener that follows only the ids it has not seen would hear nothing more of it. The first pulse goes to the session the chat was opened with: there is no `onChatSession` for it. Each conversation's first message is the hidden brief of its pulse - `customType: "turri_sentinel_pulse"`, `details.jobId` - so a host that splits the sentinel's work by pulse on it still can; the conversations before are not in the new session, and what the host showed of them is its own to keep.
|
|
172
172
|
|
|
173
173
|
- **Notices.** What it finds wrong comes as `onNotice(notice)`: `{ id, chat, severity: "error" | "warning" | "info", summary, evidence: string[], actions: [{ label, task }], module?, pulse?, job?, ignorable?, state: "open" }`. Draw it in the chat `chat` names - the one `focus` last named, or, while that is the sentinel, the chat that asked for the pulse. It is drawn there as a card in the transcript too. A host given `onNotice` answers it itself - the terminal's dialog is not opened - with `answer(id, …)`: `{ action: index | label }` starts that chat's agent on the action's task, `{ steer: text }` on the person's words, `{ dismiss: true }` on nothing, this once. A notice with `ignorable: true` - a gap in the \*\*\*plain the build settled with an assumption, which the person may leave as it is - takes `{ ignore: true }` too: offer it as its own button beside the actions. Nothing is done in the chat, the notice ends `state: "ignored"` (`"ignored"`), and turri writes it to the sentinel's guidance, so it is not raised again in this session or the next; on a notice without `ignorable`, `{ ignore: true }` is `"refused"` and the notice stays open. `onNoticeOver(notice)` comes as it is answered - and when a newer notice about its module supersedes it (`state: "superseded"`) - for the host to take the card down. `notices()` lists the open ones.
|
|
174
|
-
- **Fixes it made.** The sentinel fixes the project's testing scripts and their config itself ([what it may do](sentinel.md#what-it-may-do)), and says so as a notice with `kind: "fixed"`, `severity: "info"`, no actions, the lines before and after in `evidence`: a note, with nothing to answer. Draw it as one - its card with a way to put it away (`answer(id, { dismiss: true })`), no "say what to do instead". It never supersedes a notice about its module. The terminal
|
|
174
|
+
- **Fixes it made.** The sentinel fixes the project's testing scripts and their config itself ([what it may do](sentinel.md#what-it-may-do)), and says so as a notice with `kind: "fixed"`, `severity: "info"`, no actions, the lines before and after in `evidence`: a note, with nothing to answer. Draw it as one - its card with a way to put it away (`answer(id, { dismiss: true })`), no "say what to do instead". It never supersedes a notice about its module. The terminal puts it in notifications.
|
|
175
175
|
- **The machine is the person's.** turri installs nothing and changes no setting of the machine's or the person's shell, in any chat, the sentinel's included - and through a host's tools as through its own: a tool call whose input has a `command` string - a host's `terminal_run` - is refused when the command would (`machineChange`), with what to do instead (`machineChangeReason`), as turri's own `bash` is; and the sentinel's, also when it writes a `.plain` file, or starts or runs the code in `plain_modules` - what nobody launched: it tests what is launched. A tool that types into what already runs - a terminal's `terminal_type` at a shell prompt - is the host's to check: `machineChange(text)` says whether a line would change the machine, and why.
|
|
176
176
|
- **Starting it.** Under `sentinel: ask` - as it is unset - the person is asked before it first opens in the session: a notice with `kind: "sentinel-start"`, `severity: "info"`, in the chat `chat` names, its `summary` the question in one sentence, no `evidence`, and its actions the answers - `Start the sentinel`, `Start it, and don't ask again`, `Not this session`, `Turn it off for this project`. Draw it as a question rather than as something wrong. `answer(id, { action })` answers it, by index or label - `"done"` - and `{ dismiss: true }` is not this session; turri writes `sentinel:` itself for the two that choose for the project. Until it is answered, the pulses that finish are held: neither the sentinel nor the chat hears of them. A host that offers the setting too writes it as `/settings` does - `ask`, `true` or `false` (see `configSettings`).
|
|
177
177
|
- **Conclusions.** As the sentinel is done with each pulse - all well or not - `onConcluded({ job, verdict: "holds" | "wrong", summary, module, pulse, chat })` comes, and the chat `chat` names - the one `focus` last named, as for a notice - shows it and its agent says so in a line. A pulse turri cannot brief it on - what runs cannot hold the pulse's commit, turri's own error - ends `verdict: "unchecked"`, with an error shown in that chat as well.
|
|
178
|
-
- **A host that shows them itself.** With the sentinel on, the
|
|
178
|
+
- **A host that shows them itself.** With the sentinel on, the default host has the chat report each landed pulse and each conclusion in a turn of its own. A host with a notification centre passes `pulseEndsShown: true` and presents them from `onJobChange` and `onConcluded`. Both still reach the chat - `customType: "turri_job_landed"` and `"turri_sentinel_concluded"`, hidden and starting no turn - so it can answer when asked. The terminal uses this quiet delivery with its own notifications tab. Host notice actions, the sentinel's briefs and checks, and delivery with the sentinel off are unchanged.
|
|
179
179
|
- **Checks.** `check({ module, funcIds })` asks the sentinel to test functional specs of one module - the person picked them on a list of its built ones, say - in the background, on its own judgement, reported as a pulse is. `module` is the module whose launch is checked, by name; `funcIds` the functional specs to test, each `module:func-id` - of that module, or of any module its requires chain builds on, whose code its codebase holds: `check({ module: "predators", funcIds: ["depths:gene-fragments"] })`. A bare func-id is the module's own. The check and its brief name each as `module:func-id`. It returns `{ check: id }` at once, or `{ refused: why }`, saying which: the sentinel off (`sentinel: false`), or not started this session; a module not in the project's folder, an import module, one that does not parse; a name outside its chain - `Not in predators' codebase: arena:waves - arena is not predators or a module its requires chain builds on (depths, ocean).`; a func-id its module does not have; one not built in the module's own codebase as its \*\*\*plain has it now - with where the module's code is built on instead, when it is. What is tested is what is launched of the module - its own codebase's code, which holds the code of every module its requires chain builds on - never what a pulse is writing, and never another module's: turri does not choose one for it. Under `sentinel: ask`, a check asked before the sentinel was started puts the start question first, as a pulse does - `check` set on the notice - and waits for the answer.
|
|
180
180
|
- **Queued with the pulses.** It waits its turn behind the sentinel's work, and is taken in a conversation of its own: `onChatSession`, then the conversation's first message, the hidden brief of the check - `customType: "turri_sentinel_check"`, `details: { checkId, module, funcIds }`. A pulse of its module that lands meanwhile waits for it, rather than stopping it.
|
|
181
181
|
- **In what is launched.** The sentinel launches nothing. Once the module's launches are settled - nothing launching, nothing waiting to - it is told what runs and where, as for a pulse, and each functional spec's text and scenarios, as turri reads them, to test those and not the module's others. With nothing of the module launched - never, or halted - the check ends unchecked, its summary saying so in the person's words - `Not checked: nothing of app is launched to test it in - ask the chat to try it first, which launches it.` - and with no notice: it is an answer, not an error. When the module's last launch did not come up, the sentinel is told why, and that is its finding.
|
package/docs/launch.md
CHANGED
|
@@ -73,8 +73,8 @@ With `launch-after-pulse: true` in `config.turri.yaml`, turri launches what each
|
|
|
73
73
|
|
|
74
74
|
The launch agent finds the guidance as for any launch: what the chat passed to `launch` earlier for the codebase, the project's AGENTS.md and its skills. The setting is the word to launch; the guidance says only how - without any, the code goes to `dist/<module>` and is started from there.
|
|
75
75
|
|
|
76
|
-
- **With the [sentinel](sentinel.md) on
|
|
77
|
-
- **With `sentinel: false`**,
|
|
76
|
+
- **With the [sentinel](sentinel.md) on**, the terminal puts the finished pulse in notifications. Once the launch holds its commit, the sentinel tests it and adds its conclusion there. A launch that did not come up is a finding like any other. A host hears every launch as it is asked for, starts and ends (`onLaunch`) - one out already once, as launched.
|
|
77
|
+
- **With `sentinel: false`**, finished pulses still appear in the terminal's notifications. The chat that asked for the pulse hears when the launch ends: where it runs, or why it did not come up - unless a newer launch replaced it, whose end is told instead. It then does what it was told to do once something is launched - a host such as a desktop app tells it, in its `surface`, to open it where the person can watch and say what to test.
|
|
78
78
|
|
|
79
79
|
Off without the key: launching after a pulse is then the chat's, when its guidance says so. `turri init-config` writes `launch-after-pulse: true`.
|
|
80
80
|
|
package/docs/regenerating.md
CHANGED
|
@@ -365,7 +365,7 @@ A conformance job is a \*\*\*plain diff's conformance run: the tests of its chan
|
|
|
365
365
|
|
|
366
366
|
A functional spec with no scenarios is not listed: `parse` shows it as "no scenarios - not tested".
|
|
367
367
|
|
|
368
|
-
While a codebase's work is being planned into jobs, with nothing running there, what is planned says so - the conformance tests being planned, or the work - rather than showing nothing until the plan is made. A module asked for - `regenerate`, from scratch, functionalities again - shows its work as being planned from that moment, before its code is deleted and what is left is worked out, not only once the planner runs: in the loop's status, which a host draws its plan from, and in the job panel - a module the loop holds nothing of yet, as when turri was just opened, too. A \*\*\*plain change is looked at quietly.
|
|
368
|
+
While a codebase's work is being planned into jobs, with nothing running there, what is planned says so - the conformance tests being planned, or the work - rather than showing nothing until the plan is made. A module asked for - `regenerate`, from scratch, functionalities again - shows its work as being planned from that moment, before its code is deleted and what is left is worked out, not only once the planner runs: in the loop's status, which a host draws its plan from, and in the job panel - a module the loop holds nothing of yet, as when turri was just opened, too. One whose chain has a module below it not built at all is shown waiting for that module instead, from the moment its codebase is tracked - `top.plain - waits for base` - never as being planned while the codebases below it are looked at first, each taking the planner's time: nothing plans it until the one below is built. A \*\*\*plain change is looked at quietly.
|
|
369
369
|
|
|
370
370
|
**What a conformance job tests is built.** As a conformance job starts, the harness reads the code record, `code/.turri.json`, and checks that it has every functional spec the job adds or changes tests for, as the job has it. One it does not have stops the job before any agent runs: its report says which are not built, the conformance tests halt, and the chat model tells the person. They are tried again once the code or \*\*\*plain changes. Code jobs and conformance jobs are planned apart, each track on its own: a job is one or the other. A module built on another starts with the tests record below it, as what it inherits: none of its own tests is written yet.
|
|
371
371
|
|