@llm4ts/shell 2.9.1 → 2.9.2
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/flows/epic-stories.js +1 -1
- package/flows/lib/epic-stories.js +34 -7
- package/package.json +4 -4
package/flows/epic-stories.js
CHANGED
|
@@ -116,7 +116,7 @@ const program = Effect.gen(function* () {
|
|
|
116
116
|
gates,
|
|
117
117
|
// With a roster, the judge and the verifier are leased per story,
|
|
118
118
|
// away from the executor coding it (ADR 0019).
|
|
119
|
-
judge: (story, diff, seats) => judgeStory(seats.context.roster?.forRole("judge") ?? reasoningMeter.service, story, diff, contextBudget),
|
|
119
|
+
judge: (story, diff, seats) => judgeStory(seats.context.roster?.forRole("judge") ?? reasoningMeter.service, story, diff, contextBudget, plan),
|
|
120
120
|
verifyBlocked: (story, need, workDir, seats) => verifyBlockedOn(seats.context.roster?.forRole("verifier") ?? reasoningMeter.service, events, files, plan)(story, need, workDir),
|
|
121
121
|
// A roster waits for its own executors (the story's next lease
|
|
122
122
|
// does); without one, poll the single coder's engine.
|
|
@@ -13,7 +13,7 @@ import { Info } from "@llm4ts/flow/FlowEvents";
|
|
|
13
13
|
import { BlockedVerdict } from "@llm4ts/flow/Stories";
|
|
14
14
|
import { stableHash } from "@llm4ts/flow/Plan";
|
|
15
15
|
import { ReviewIssue } from "@llm4ts/flow/Review";
|
|
16
|
-
import { StoryPlan, pathsNamedIn } from "@llm4ts/flow/StoryPlan";
|
|
16
|
+
import { StoryPlan, dependenciesOf, pathsNamedIn } from "@llm4ts/flow/StoryPlan";
|
|
17
17
|
import { claude, coderIds, pi } from "@llm4ts/runner/Connectors";
|
|
18
18
|
import { FlowAborted, FlowLlmError, ReviewResult, ScriptUsage, coderFor, lintCommand, mergeReviewResults } from "@llm4ts/runner";
|
|
19
19
|
export const epicUsage = [
|
|
@@ -380,17 +380,44 @@ const subBar = (scored, story) => ReviewResult.make({
|
|
|
380
380
|
})),
|
|
381
381
|
summary: `judge:${story.id}`
|
|
382
382
|
});
|
|
383
|
-
/**
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
383
|
+
/**
|
|
384
|
+
* What the story judge reads beside the diff: the story, and what every
|
|
385
|
+
* story it depends on provides. Without the dependencies the judge cannot
|
|
386
|
+
* tell the house pattern from a mistake — it once failed a screen for
|
|
387
|
+
* importing `paymentsDomain` from `payments.fake.ts`, exactly where the
|
|
388
|
+
* payments contract story declared it.
|
|
389
|
+
*/
|
|
390
|
+
export const storyJudgeQuery = (story, plan) => {
|
|
391
|
+
const dependencies = plan === undefined
|
|
392
|
+
? []
|
|
393
|
+
: dependenciesOf(plan, story.id).flatMap((id) => {
|
|
394
|
+
const dependency = plan.story(id);
|
|
395
|
+
return dependency === undefined
|
|
396
|
+
? []
|
|
397
|
+
: [`- ${dependency.id}: ${dependency.provides.join("; ") || "(nothing declared)"}`];
|
|
398
|
+
});
|
|
399
|
+
return [
|
|
387
400
|
`Story: ${story.title}`,
|
|
388
401
|
story.description,
|
|
389
402
|
"",
|
|
390
403
|
`Provides: ${story.provides.join(", ") || "(none)"}`,
|
|
391
404
|
`Owned paths: ${story.owned.join(", ")}`,
|
|
392
|
-
`Shared read-only: ${story.sharedReadOnly.join(", ") || "(none)"}
|
|
393
|
-
|
|
405
|
+
`Shared read-only: ${story.sharedReadOnly.join(", ") || "(none)"}`,
|
|
406
|
+
...(dependencies.length === 0
|
|
407
|
+
? []
|
|
408
|
+
: [
|
|
409
|
+
"",
|
|
410
|
+
"Already merged, from the stories this one depends on (their declared interface):",
|
|
411
|
+
...dependencies,
|
|
412
|
+
"Using these exactly as declared (the same module, the same export) is correct and is",
|
|
413
|
+
"never a house-style or scope problem, even where the module is a fake transport."
|
|
414
|
+
])
|
|
415
|
+
].join("\n");
|
|
416
|
+
};
|
|
417
|
+
/** The story-level judge over the branch diff, bounded by the character budget. */
|
|
418
|
+
export const judgeStory = (reasoning, story, diff, budget, plan) => judge(reasoning, storyDimensions)
|
|
419
|
+
.evaluate(Sample.make({
|
|
420
|
+
query: storyJudgeQuery(story, plan),
|
|
394
421
|
response: cap(diff, budget).text
|
|
395
422
|
}))
|
|
396
423
|
.pipe(Effect.mapError(FlowLlmError.from), Effect.map((scored) => subBar(scored, story)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llm4ts/shell",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
4
4
|
"description": "Interactive shell and CLI for llm4ts: flow discovery, run-a-flow, and view",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@effect/platform-node": "4.0.0-rc.115",
|
|
54
54
|
"@effect/platform-node-shared": "4.0.0-rc.115",
|
|
55
|
-
"@llm4ts/
|
|
56
|
-
"@llm4ts/runner": "2.9.
|
|
57
|
-
"@llm4ts/
|
|
55
|
+
"@llm4ts/flow": "2.9.2",
|
|
56
|
+
"@llm4ts/runner": "2.9.2",
|
|
57
|
+
"@llm4ts/core": "2.9.2"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"effect": "4.0.0-rc.115"
|