@turri-dev/cli 0.2.4-next.f26a225 → 0.3.0
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/dist/extension.d.ts +13 -2
- package/dist/extension.js +41 -16
- package/dist/regenerate/loop.d.ts +12 -2
- package/dist/regenerate/loop.js +12 -5
- package/docs/using.md +2 -2
- package/package.json +1 -1
package/dist/extension.d.ts
CHANGED
|
@@ -71,14 +71,25 @@ export declare function asksOneByOne(words: string): boolean;
|
|
|
71
71
|
export declare function shownAfterCommand(pi: ExtensionAPI, ctx: ExtensionContext, command: string, text: string, level: NonNullable<CommandOutcome["level"]>,
|
|
72
72
|
/** The command is in the chat already, above it (echoCommand): the text alone. */
|
|
73
73
|
echoed?: boolean, react?: string): void;
|
|
74
|
+
/**
|
|
75
|
+
* What a slash command found for the agent alone - guidance the person need not see: put in the conversation unseen,
|
|
76
|
+
* and the agent started on it - at once when it is idle, else once its turn ends - told what to do with it.
|
|
77
|
+
*/
|
|
78
|
+
export declare function toldAfterCommand(pi: ExtensionAPI, command: string, text: string, react: string): void;
|
|
74
79
|
/**
|
|
75
80
|
* What the agent does once /regenerate or /conform has started pulses: a command's output alone leaves the chat silent,
|
|
76
81
|
* and the person wondering whether to wait. It says what runs, and that they need not - and starts nothing itself.
|
|
77
82
|
*/
|
|
78
83
|
export declare const COMMAND_STARTED_REACTION: string;
|
|
79
84
|
/**
|
|
80
|
-
* What the agent does when /conform
|
|
81
|
-
*
|
|
85
|
+
* What the agent does when /conform found a step of adding tests still to take: takes it at once, asking nothing - the
|
|
86
|
+
* /conform was the person's yes - and says what it writes as the way there, never as a failure: the person saw none.
|
|
87
|
+
*/
|
|
88
|
+
export declare const CONFORM_STEPS_REACTION: string;
|
|
89
|
+
/**
|
|
90
|
+
* What the agent does when /conform started nothing for a reason that is not a step of adding tests - a functional spec
|
|
91
|
+
* named that is not there, words it does not take: answers it at once - why, and what would let it start - rather than
|
|
92
|
+
* leave the person with a refusal and a silent chat.
|
|
82
93
|
*/
|
|
83
94
|
export declare const CONFORM_REFUSED_REACTION: string;
|
|
84
95
|
export declare const COMMAND_OUTCOME = "turri_command_outcome";
|
package/dist/extension.js
CHANGED
|
@@ -40,7 +40,7 @@ import { checkPlainTool } from "./parse-tool.js";
|
|
|
40
40
|
import { changedFiles, projectFiles } from "./plain-files.js";
|
|
41
41
|
import { whyFailed } from "./regenerate/diagnose-job.js";
|
|
42
42
|
import { didNotLand } from "./regenerate/failure-reports.js";
|
|
43
|
-
import { conformanceRefusal, createWorkLoop, describeModules, isUpToDate } from "./regenerate/loop.js";
|
|
43
|
+
import { conformanceRefusal, createWorkLoop, TestingStepsMissing, describeModules, isUpToDate } from "./regenerate/loop.js";
|
|
44
44
|
import { brandNeon, brandPink, plainPaint } from "./regenerate/plain-palette.js";
|
|
45
45
|
import { halfBlocks, JELLYFISH_FRAME_MS, JELLYFISH_REST, JELLYFISH_SEQUENCE, JELLYFISH_TEXT_FRAMES } from "./jellyfish.js";
|
|
46
46
|
import { createJobPanel, didNotPass, keyPressed, PANEL_KEY, spinner } from "./regenerate/job-panel.js";
|
|
@@ -1291,6 +1291,14 @@ echoed = false, react) {
|
|
|
1291
1291
|
else
|
|
1292
1292
|
void pi.sendMessage({ customType: COMMAND_OUTCOME, content, display: false }, { triggerTurn: true, deliverAs: "followUp" });
|
|
1293
1293
|
}
|
|
1294
|
+
/**
|
|
1295
|
+
* What a slash command found for the agent alone - guidance the person need not see: put in the conversation unseen,
|
|
1296
|
+
* and the agent started on it - at once when it is idle, else once its turn ends - told what to do with it.
|
|
1297
|
+
*/
|
|
1298
|
+
export function toldAfterCommand(pi, command, text, react) {
|
|
1299
|
+
const content = `The person ran ${command}. Not shown to them:\n${text}\n\n${react}`;
|
|
1300
|
+
void pi.sendMessage({ customType: COMMAND_OUTCOME, content, display: false }, { triggerTurn: true, deliverAs: "followUp" });
|
|
1301
|
+
}
|
|
1294
1302
|
/**
|
|
1295
1303
|
* What the agent does once /regenerate or /conform has started pulses: a command's output alone leaves the chat silent,
|
|
1296
1304
|
* and the person wondering whether to wait. It says what runs, and that they need not - and starts nothing itself.
|
|
@@ -1299,19 +1307,25 @@ export const COMMAND_STARTED_REACTION = "My pulses are running from the person's
|
|
|
1299
1307
|
"runs and what is planned - and that the two of us can go on with the ***plain, or anything else, meanwhile: they need " +
|
|
1300
1308
|
"not wait for it. Start nothing for it: no regenerate, no check, no launch - its end is told when it comes.";
|
|
1301
1309
|
/**
|
|
1302
|
-
* What the agent does when /conform
|
|
1303
|
-
*
|
|
1310
|
+
* What the agent does when /conform found a step of adding tests still to take: takes it at once, asking nothing - the
|
|
1311
|
+
* /conform was the person's yes - and says what it writes as the way there, never as a failure: the person saw none.
|
|
1312
|
+
*/
|
|
1313
|
+
export const CONFORM_STEPS_REACTION = "That is what conform needs before it can start - the steps of adding tests still to take - not an error: nothing " +
|
|
1314
|
+
"failed, and the person saw none of it. Their /conform is their yes to conformance tests here, so take the steps now, " +
|
|
1315
|
+
"in that order and only what is missing, asking nothing: the test reqs first; then the conformance testing script, " +
|
|
1316
|
+
"started with its skill before anything else - it runs in the background, so the scenarios are written while it does; " +
|
|
1317
|
+
"then the scenarios of the functional specs they named, or, naming none, of each functional spec that needs them by " +
|
|
1318
|
+
"the rules on test plain files. Then call regenerate for the module: the work loop writes and runs their tests once the " +
|
|
1319
|
+
"code is built. Tell the person in a line or two, as the way to their conformance tests and not as a refusal, what you " +
|
|
1320
|
+
"are writing, and for each functional spec why it needs scenarios - or, when none does, that and why.";
|
|
1321
|
+
/**
|
|
1322
|
+
* What the agent does when /conform started nothing for a reason that is not a step of adding tests - a functional spec
|
|
1323
|
+
* named that is not there, words it does not take: answers it at once - why, and what would let it start - rather than
|
|
1324
|
+
* leave the person with a refusal and a silent chat.
|
|
1304
1325
|
*/
|
|
1305
|
-
export const CONFORM_REFUSED_REACTION = "Nothing was started from the person's /conform, for the reason shown
|
|
1306
|
-
"
|
|
1307
|
-
"
|
|
1308
|
-
"script, started with its skill before anything else - it runs in the background, so the scenarios are written while it " +
|
|
1309
|
-
"does; then the scenarios of the functional specs they named, " +
|
|
1310
|
-
"or, naming none, of each functional spec that needs them by the rules on test plain files. Then call regenerate for the " +
|
|
1311
|
-
"module: the work loop writes and runs their tests once the code is built. Say in a line or two what you wrote, and for " +
|
|
1312
|
-
"each functional spec why it needs scenarios - or, when none does, that and why. Where it is not yours to settle - a " +
|
|
1313
|
-
"functional spec they named that is not there, ***plain that would have to change its meaning to be tested - tell them " +
|
|
1314
|
-
"why nothing started and what would let it, and start nothing.";
|
|
1326
|
+
export const CONFORM_REFUSED_REACTION = "Nothing was started from the person's /conform, for the reason shown. Tell them in a line or two why, and what would " +
|
|
1327
|
+
"let it start - a functional spec they named that is not there, ***plain that does not parse or would have to change its " +
|
|
1328
|
+
"meaning to be tested - and offer to do what is yours to do; start nothing.";
|
|
1315
1329
|
export const COMMAND_OUTCOME = "turri_command_outcome";
|
|
1316
1330
|
/** Longer than a frame of the TUI's (16ms): an entry appended before it is drawn by its end. */
|
|
1317
1331
|
const ONE_FRAME_MS = 20;
|
|
@@ -1416,10 +1430,18 @@ function registerBind(pi, cwd, jobs, turnOn) {
|
|
|
1416
1430
|
refusal = whenBuildable(plainFile, () => conformanceRefusal(plainFile, funcIds.length > 0 ? funcIds : undefined));
|
|
1417
1431
|
}
|
|
1418
1432
|
catch (error) {
|
|
1419
|
-
refusal = error instanceof Error ? error.message : String(error);
|
|
1433
|
+
refusal = { text: error instanceof Error ? error.message : String(error), stepsMissing: false };
|
|
1434
|
+
}
|
|
1435
|
+
// A step of adding tests still to take - the test reqs, the script, the scenarios: the chat's to take, so told to it
|
|
1436
|
+
// alone, as what conform needs first. The person sees it take them, and conformance turned on, if it was.
|
|
1437
|
+
if (refusal?.stepsMissing === true) {
|
|
1438
|
+
if (turnedOn !== undefined)
|
|
1439
|
+
shownAfterCommand(pi, ctx, command, turnedOn, "info", true);
|
|
1440
|
+
toldAfterCommand(pi, command, refusal.text, CONFORM_STEPS_REACTION);
|
|
1441
|
+
return;
|
|
1420
1442
|
}
|
|
1421
1443
|
if (refusal !== undefined) {
|
|
1422
|
-
refuse(withTurnedOn(refusal));
|
|
1444
|
+
refuse(withTurnedOn(refusal.text));
|
|
1423
1445
|
return;
|
|
1424
1446
|
}
|
|
1425
1447
|
const module = basename(plainFile).replace(/\.plain$/, "");
|
|
@@ -1445,7 +1467,10 @@ function registerBind(pi, cwd, jobs, turnOn) {
|
|
|
1445
1467
|
shownAfterCommand(pi, ctx, command, text, "info", true, upToDate ? undefined : COMMAND_STARTED_REACTION);
|
|
1446
1468
|
}
|
|
1447
1469
|
catch (error) {
|
|
1448
|
-
|
|
1470
|
+
if (error instanceof TestingStepsMissing)
|
|
1471
|
+
toldAfterCommand(pi, command, error.message, CONFORM_STEPS_REACTION);
|
|
1472
|
+
else
|
|
1473
|
+
refuse(error instanceof Error ? error.message : String(error));
|
|
1449
1474
|
}
|
|
1450
1475
|
})().catch(() => {
|
|
1451
1476
|
// The chat let go meanwhile: there is nobody to say it to.
|
|
@@ -394,11 +394,21 @@ export declare function namesOf(module: string, funcIds: string[]): string;
|
|
|
394
394
|
* a func-id is unique in its module only.
|
|
395
395
|
*/
|
|
396
396
|
export declare function funcIdsNamed(module: string, names: string[]): string[];
|
|
397
|
+
/**
|
|
398
|
+
* Why conform starts nothing when a step of adding tests is still to take - the test reqs, the conformance testing
|
|
399
|
+
* script, the scenarios: not a failure but what conform needs first, each step one the chat takes itself.
|
|
400
|
+
*/
|
|
401
|
+
export declare class TestingStepsMissing extends Error {
|
|
402
|
+
}
|
|
397
403
|
/**
|
|
398
404
|
* Why conform would start nothing for a module, from its ***plain alone (`conformanceAskedIn`): undefined when it would
|
|
399
|
-
* go on. What /conform checks before it says anything.
|
|
405
|
+
* go on. What /conform checks before it says anything. `stepsMissing`: what is missing is a step of adding tests - the
|
|
406
|
+
* test reqs, the conformance testing script, the scenarios - guidance for the chat, not an error for the person.
|
|
400
407
|
*/
|
|
401
|
-
export declare function conformanceRefusal(plainFile: string, funcIds?: string[]):
|
|
408
|
+
export declare function conformanceRefusal(plainFile: string, funcIds?: string[]): {
|
|
409
|
+
text: string;
|
|
410
|
+
stepsMissing: boolean;
|
|
411
|
+
} | undefined;
|
|
402
412
|
/** Nothing runs, is planned or is waiting there, as its code is built from its spec as it is. */
|
|
403
413
|
export declare function isUpToDate(status: ModuleStatus): boolean;
|
|
404
414
|
export declare function describeModules(statuses: ModuleStatus[], options?: {
|
package/dist/regenerate/loop.js
CHANGED
|
@@ -1854,6 +1854,12 @@ export function funcIdsNamed(module, names) {
|
|
|
1854
1854
|
return funcId;
|
|
1855
1855
|
});
|
|
1856
1856
|
}
|
|
1857
|
+
/**
|
|
1858
|
+
* Why conform starts nothing when a step of adding tests is still to take - the test reqs, the conformance testing
|
|
1859
|
+
* script, the scenarios: not a failure but what conform needs first, each step one the chat takes itself.
|
|
1860
|
+
*/
|
|
1861
|
+
export class TestingStepsMissing extends Error {
|
|
1862
|
+
}
|
|
1857
1863
|
/**
|
|
1858
1864
|
* What conform is asked for in a module, checked from its ***plain alone - quick, before anything is said or touched: the
|
|
1859
1865
|
* functional specs named, as func-ids, and the module's spec and those of its functional specs with scenarios. Throws,
|
|
@@ -1869,7 +1875,7 @@ function conformanceAskedIn(own, funcIds) {
|
|
|
1869
1875
|
// No scenarios: the steps still to take, from the first one missing - the test reqs and the script come before them.
|
|
1870
1876
|
const toScenarios = () => stepsToScenarios({ moduleName: self.moduleName, plainFile: self.plainFile, tree: spec, buildDir: self.buildDir });
|
|
1871
1877
|
if (withScenarios.length === 0) {
|
|
1872
|
-
throw new
|
|
1878
|
+
throw new TestingStepsMissing(`No functional spec of ${self.moduleName} has scenarios - none has a test plain file - so there is nothing to test. ${toScenarios()} ` +
|
|
1873
1879
|
"Their tests are written once the code is built. Nothing was started.");
|
|
1874
1880
|
}
|
|
1875
1881
|
if (named !== undefined && named.length > 0) {
|
|
@@ -1879,19 +1885,20 @@ function conformanceAskedIn(own, funcIds) {
|
|
|
1879
1885
|
throw new Error(`${self.moduleName} has no functional spec ${namesOf(self.moduleName, unknown)}. Nothing was started.`);
|
|
1880
1886
|
const untested = named.filter((funcId) => !hasScenarios(items.find((item) => item.id === funcId)));
|
|
1881
1887
|
if (untested.length > 0) {
|
|
1882
|
-
throw new
|
|
1888
|
+
throw new TestingStepsMissing(`${namesOf(self.moduleName, untested)} ${untested.length === 1 ? "has" : "have"} no scenarios - no test plain file - so there is nothing to test. ${toScenarios()} ` +
|
|
1883
1889
|
"Their tests are written once the code is built. Nothing was started.");
|
|
1884
1890
|
}
|
|
1885
1891
|
}
|
|
1886
1892
|
// A step of adding tests skipped - its test reqs, or the conformance testing script: refused, naming it.
|
|
1887
1893
|
const gap = testingGap({ moduleName: self.moduleName, plainFile: self.plainFile, tree: spec, buildDir: self.buildDir });
|
|
1888
1894
|
if (gap !== undefined)
|
|
1889
|
-
throw new
|
|
1895
|
+
throw new TestingStepsMissing(`${gap.text} Nothing was started.`);
|
|
1890
1896
|
return { named, spec, withScenarios };
|
|
1891
1897
|
}
|
|
1892
1898
|
/**
|
|
1893
1899
|
* Why conform would start nothing for a module, from its ***plain alone (`conformanceAskedIn`): undefined when it would
|
|
1894
|
-
* go on. What /conform checks before it says anything.
|
|
1900
|
+
* go on. What /conform checks before it says anything. `stepsMissing`: what is missing is a step of adding tests - the
|
|
1901
|
+
* test reqs, the conformance testing script, the scenarios - guidance for the chat, not an error for the person.
|
|
1895
1902
|
*/
|
|
1896
1903
|
export function conformanceRefusal(plainFile, funcIds) {
|
|
1897
1904
|
try {
|
|
@@ -1899,7 +1906,7 @@ export function conformanceRefusal(plainFile, funcIds) {
|
|
|
1899
1906
|
return undefined;
|
|
1900
1907
|
}
|
|
1901
1908
|
catch (error) {
|
|
1902
|
-
return error instanceof Error ? error.message : String(error);
|
|
1909
|
+
return { text: error instanceof Error ? error.message : String(error), stepsMissing: error instanceof TestingStepsMissing };
|
|
1903
1910
|
}
|
|
1904
1911
|
}
|
|
1905
1912
|
/** What a job does, in a few words: its cases, each functional spec by its func-id - with its module, a module below's. */
|
package/docs/using.md
CHANGED
|
@@ -79,9 +79,9 @@ A regeneration takes minutes, so in the TUI every tool that regenerates starts t
|
|
|
79
79
|
- **`/settings`** changes a setting of the project's `config.turri.yaml` - the models, review, conformance tests, any key - and says when it takes effect: now, at your next message, or at the next pulse; never only after a restart. It takes [pi](https://pi.dev)'s own `/settings` over, pi's menu the last entry of its list. See [changing it from the chat](config.md#changing-it-from-the-chat).
|
|
80
80
|
- **`/sentinel`** says whether the [sentinel](sentinel.md) checks every pulse that finishes: `ask` - you are asked before it first opens in a session - `on`, or `off`; written to `config.turri.yaml`.
|
|
81
81
|
- **`/regenerate [module | file.plain] [module:func-id ...] [from scratch [whole chain]] [how to cut the work]`** regenerates a module from its \*\*\*plain as it is now, as the `regenerate` tool does: what is left to regenerate is planned into pulses - one functional spec at a time, a few together or the whole module in one, as the planner judges - and the first starts. Words after the module are guidance for that plan (`/regenerate app models first`). A module's name typed with spaces for its underscores is that module - `/regenerate d365_function executor` is `d365_function_executor`. With no module named: the one `module:` in `config.turri.yaml` names, else the folder's top modules, to pick from. Asked for from scratch - `from scratch`, `start over`, `delete the module` - it starts at once, with nothing to confirm: it deletes the module's code and conformance tests in every codebase where they live, committed so `/lineage` keeps them, and regenerates the whole module from its \*\*\*plain, built though nothing in it changed: `/regenerate shorty from scratch`. The modules below it keep their code, and the module starts again from a copy of the code below it. Asked for its chain too - `/regenerate shorty from scratch, the whole chain` - the code of every module of its requires chain is deleted, the base's included, and the whole chain is regenerated from the bottom: what to do after modules were split, merged or moved, when the code below was laid out for modules that are no more. The chat's `regenerate` does the same with `from_scratch: "module"` or `"chain"`, when you ask for it; `turri regenerate --from-scratch` or `--from-scratch-chain` on the command line, not with `--dry-run`. Functional specs named after the module, each as `<module>:<func-id>` - `/regenerate shorty shorty:shorten shorty:expand` - are regenerated though their \*\*\*plain did not change, on the coding model: as `turri regenerate shorty.plain shorty:shorten shorty:expand` does, and the chat's `regenerate` with `funcIds`. A bare func-id is refused: the module is always named. Code built before functional specs had func-ids - its record numbers them - is never built on: the module's whole chain has to be regenerated from scratch, and the chat asks you first, as for a start over.
|
|
82
|
-
- **`/conform [module | file.plain] [module:func-id ...] [from scratch [whole chain]] [one by one]`** writes and runs a module's conformance tests now, as the `conform` tool does: those of the functional specs named, each as `<module>:<func-id>` - `/conform shorty shorty:shorten shorty:expand` - or, with none named, of every functional spec with scenarios. A functional spec named whose tests are written has them written again, deleted and written anew from its scenarios; `from scratch` takes out the tests folder where the module's code lives - the tip of its chain, never a module in the middle - its lineage keeping it, and writes the tests again from a copy of the tests of the module the tip requires; `from scratch, whole chain`, from nothing. None of it touches the code ([written again](regenerating.md#conformance-tests-in-the-work-loop)). They go in one pulse, as far as a size guardrail lets; `one by one` (or `separately`, `one at a time`) has a pulse a functional spec. No other words are taken: there is no plan to guide. The module is found as `/regenerate` finds it. Asking for them is asking for them on: with conformance tests off, `/conform` turns them on first - `conformance-tests: true`, written where the module's value comes from - and says so: the one way the chat's work has them turned on, as the `conform` tool is refused while they are off. What would start nothing is found from the \*\*\*plain before anything is said
|
|
82
|
+
- **`/conform [module | file.plain] [module:func-id ...] [from scratch [whole chain]] [one by one]`** writes and runs a module's conformance tests now, as the `conform` tool does: those of the functional specs named, each as `<module>:<func-id>` - `/conform shorty shorty:shorten shorty:expand` - or, with none named, of every functional spec with scenarios. A functional spec named whose tests are written has them written again, deleted and written anew from its scenarios; `from scratch` takes out the tests folder where the module's code lives - the tip of its chain, never a module in the middle - its lineage keeping it, and writes the tests again from a copy of the tests of the module the tip requires; `from scratch, whole chain`, from nothing. None of it touches the code ([written again](regenerating.md#conformance-tests-in-the-work-loop)). They go in one pulse, as far as a size guardrail lets; `one by one` (or `separately`, `one at a time`) has a pulse a functional spec. No other words are taken: there is no plan to guide. The module is found as `/regenerate` finds it. Asking for them is asking for them on: with conformance tests off, `/conform` turns them on first - `conformance-tests: true`, written where the module's value comes from - and says so: the one way the chat's work has them turned on, as the `conform` tool is refused while they are off. What would start nothing is found from the \*\*\*plain before anything is said. A step of adding tests still to take - no test reqs, no conformance testing script, no scenarios - is not an error: it is what `/conform` needs first, told to turri alone, not shown to you, and turri takes it at once - the test reqs, the conformance testing script, the scenarios of the functional specs named, or of each one that needs them - without asking again: your `/conform` was the yes. Then it regenerates the module, and says what it is writing and why. What is yours to settle - a functional spec named that is not there - is shown to you, and turri tells you what would let it start, starting nothing. Its tests come before anything is built on it: a codebase built on the module is stopped and deleted, and regenerated from it once they pass. Tests written already for the scenarios as built are said to be, and nothing starts.
|
|
83
83
|
- **`/halt <id>`** halts a pulse - a queued one never starts - **`/halt <module>`** (or a planned row's id) halts a module's planned pulses until you ask for it again, a \*\*\*plain change not starting it, and **`/halt launched <name>`** halts a server a launch started - **`/halt launched <module>`** the module's launch under way, the one waiting, and what it started; it lists them all when no id is given.
|
|
84
|
-
- **What these commands show you, the chat knows.** What `/regenerate`, `/conform` and `/halt launched` tell you - \*\*\*plain that does not parse, the pulses planned, a server halted - stays in the chat under the command, and since a slash command runs outside the conversation, it is put in the conversation as well: say "fix it" next and turri knows what you are looking at. When `/conform` starts nothing, turri answers it at once -
|
|
84
|
+
- **What these commands show you, the chat knows.** What `/regenerate`, `/conform` and `/halt launched` tell you - \*\*\*plain that does not parse, the pulses planned, a server halted - stays in the chat under the command, and since a slash command runs outside the conversation, it is put in the conversation as well: say "fix it" next and turri knows what you are looking at. When `/conform` starts nothing, turri answers it at once - taking the steps of adding tests still to take, which you are not shown, and saying why for the rest. Once `/regenerate` or `/conform` has started pulses, turri says so in the chat too - what runs and what is planned, and that you need not wait for it - without starting anything more for it; a module already up to date gets the plan's answer alone. A halted pulse reaches it as every pulse's end does.
|
|
85
85
|
- **Nothing is queued.** What is left to build is worked out from what each codebase is built from and \*\*\*plain as it is now - again whenever a pulse ends or \*\*\*plain changes - and the first pulse of it runs; see [a whole module](regenerating.md#a-whole-module). Changes that overlap never pile up: the next pulse builds \*\*\*plain as it is. The pulses planned after the one running are listed behind it, as queued, and so is each module waiting for the one it is built on - "waits for base" - until it can be planned. A change inside what the running pulse regenerates - a functional spec it regenerates reworded or given a sub-bullet, a definition or req it is given, a file they link - steers it: its agent is told, and it lands \*\*\*plain as it is now there, twice a pulse at most. Otherwise a pulse building something \*\*\*plain no longer wants is stopped and rolled back - unless `allow-to-stop-jobs: false` in `config.turri.yaml`, which has it land first and the change regenerated on top. To drop something, take it out of \*\*\*plain - one \*\*\*plain diff. Stopping a pulse leaves its change in \*\*\*plain: the codebase waits until its \*\*\*plain changes or it is asked for again.
|
|
86
86
|
- **A change to a module below** is made in the codebase at the tip of the chain, where its code lives; the codebase below is left as it was, and is brought up to its own \*\*\*plain only when a new module is to start from it. \*\*\*plain moved into a module the code was not built on stops the codebase: no change to its code brings that module in, so it has to be started over - its code and conformance tests taken out, kept in its history, and built again from the bottom of the chain. That is never done unasked: the chat asks you, saying why, and regenerates it from scratch once you agree; on the command line `turri regenerate` asks at the terminal, and `--start-over` agrees in advance.
|
|
87
87
|
- **Conformance tests are a track of their own.** A code pulse lands once its unit tests pass and are reviewed. Then, before the next one builds on it, a conformance pulse writes and runs the tests of what it built - the scenarios of its functional specs, by the test reqs - with the whole suite the module inherits, and, where one fails, fixes the test or the code, whichever is wrong; what they are written for is recorded in `tests/.turri.json`. A functional spec with no test plain file, or an empty one, gets none: to have it tested, ask for conformance tests - or, with them on, the chat writes scenarios itself for a functional spec it judges needs them (when an incorrect implementation could give output that looks right but is wrong, when two reasonable readings of its text answer some input differently, or when a bug would be costly - money, security, data, users' trust) - either way the chat writes its scenarios with its file tools and calls `regenerate`, and the loop tests them once the code is built. `conform` runs them now, for a module or some of its functional specs. A conformance pulse that does not pass is undone whole and halts the conformance tests alone: the code goes on being built.
|