@llm4ts/shell 2.22.0 → 2.22.1
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.
|
@@ -831,7 +831,7 @@ const subBar = (scored, story) => ReviewResult.make({
|
|
|
831
831
|
* importing `paymentsDomain` from `payments.fake.ts`, exactly where the
|
|
832
832
|
* payments contract story declared it.
|
|
833
833
|
*/
|
|
834
|
-
export const storyJudgeQuery = (story, plan) => {
|
|
834
|
+
export const storyJudgeQuery = (story, plan, subject = "diff") => {
|
|
835
835
|
const dependencies = plan === undefined
|
|
836
836
|
? []
|
|
837
837
|
: dependenciesOf(plan, story.id).flatMap((id) => {
|
|
@@ -855,13 +855,21 @@ export const storyJudgeQuery = (story, plan) => {
|
|
|
855
855
|
...dependencies,
|
|
856
856
|
"Using these exactly as declared (the same module, the same export) is correct and is",
|
|
857
857
|
"never a house-style or scope problem, even where the module is a fake transport."
|
|
858
|
-
])
|
|
858
|
+
]),
|
|
859
|
+
...(subject === "code"
|
|
860
|
+
? [
|
|
861
|
+
"",
|
|
862
|
+
"The story's branch has no changes. Below is the current code of its owned paths on",
|
|
863
|
+
"the epic branch, shown as additions: judge whether the story is already in place —",
|
|
864
|
+
"everything it provides exists and is tested — not the diff's size or novelty."
|
|
865
|
+
]
|
|
866
|
+
: [])
|
|
859
867
|
].join("\n");
|
|
860
868
|
};
|
|
861
869
|
/** The story-level judge over the branch diff, bounded by the character budget. */
|
|
862
|
-
export const judgeStory = (reasoning, story, diff, budget, plan) => judge(reasoning, storyDimensions)
|
|
870
|
+
export const judgeStory = (reasoning, story, diff, budget, plan, subject = "diff") => judge(reasoning, storyDimensions)
|
|
863
871
|
.evaluate(Sample.make({
|
|
864
|
-
query: storyJudgeQuery(story, plan),
|
|
872
|
+
query: storyJudgeQuery(story, plan, subject),
|
|
865
873
|
response: cap(diff, budget).text
|
|
866
874
|
}))
|
|
867
875
|
.pipe(Effect.mapError(FlowLlmError.from), Effect.map((scored) => StoryVerdict.make({
|
|
@@ -995,7 +1003,7 @@ export const gatesIn = (process, events, commands) => (workDir, laneEvents) => E
|
|
|
995
1003
|
return mergeReviewResults(results);
|
|
996
1004
|
});
|
|
997
1005
|
/** Today's story judge: the rubric judge over the four dimensions. */
|
|
998
|
-
export const rubricStoryJudge = (context) => (story, diff, seats) => judgeStory(seats.context.roster?.forRole("judge") ?? context.reasoning, story, diff, context.budget, context.plan);
|
|
1006
|
+
export const rubricStoryJudge = (context) => (story, diff, seats, subject) => judgeStory(seats.context.roster?.forRole("judge") ?? context.reasoning, story, diff, context.budget, context.plan, subject);
|
|
999
1007
|
/** The runner options the two flags above add; empty when neither is set. */
|
|
1000
1008
|
export const epicRunnerOptions = Effect.fn("epic-stories.runnerOptions")(function* (options, environment) {
|
|
1001
1009
|
const judgment = options.judgmentFromEnvironment === true
|
package/flows/lib/story-board.js
CHANGED
|
@@ -175,10 +175,13 @@ const unscored = (story, error) => {
|
|
|
175
175
|
}));
|
|
176
176
|
};
|
|
177
177
|
/** The seam implementation: the ruleset built once, run per judge round. */
|
|
178
|
-
export const boardStoryJudge = (context) => Effect.map(makeStoryBoard(context.policy).pipe(Effect.mapError(runErrorToFlowError)), (board) => (story, diff, seats) => Effect.gen(function* () {
|
|
178
|
+
export const boardStoryJudge = (context) => Effect.map(makeStoryBoard(context.policy).pipe(Effect.mapError(runErrorToFlowError)), (board) => (story, diff, seats, subject) => Effect.gen(function* () {
|
|
179
179
|
const judgment = seats.context.judgment ?? context.judgment;
|
|
180
180
|
const brief = storyBriefOf(story, context.plan);
|
|
181
|
-
|
|
181
|
+
// A branch with no changes is judged on its owned code, said so up front.
|
|
182
|
+
const capped = `${subject === "code"
|
|
183
|
+
? "The story's branch has no changes; this is the current code of its owned paths on the epic branch.\n"
|
|
184
|
+
: ""}${cap(diff, context.budget).text}`;
|
|
182
185
|
const result = yield* runRuleset(board, [
|
|
183
186
|
storyBrief.of(brief),
|
|
184
187
|
storyDiff.of(capped),
|
|
@@ -229,4 +232,4 @@ const observe = (context, judgment, dimension, state, result, isMergeable, key)
|
|
|
229
232
|
* the default policy. Validating six rules is microseconds, so the ruleset
|
|
230
233
|
* is built per call and the factory keeps the plain StoryJudge type.
|
|
231
234
|
*/
|
|
232
|
-
export const boardJudgeFactory = (context) => (story, diff, seats) => Effect.flatMap(boardStoryJudge({ ...context, judgment: judgmentOf(seats.context) }), (judge) => judge(story, diff, seats));
|
|
235
|
+
export const boardJudgeFactory = (context) => (story, diff, seats, subject) => Effect.flatMap(boardStoryJudge({ ...context, judgment: judgmentOf(seats.context) }), (judge) => judge(story, diff, seats, subject));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llm4ts/shell",
|
|
3
|
-
"version": "2.22.
|
|
3
|
+
"version": "2.22.1",
|
|
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",
|
|
54
54
|
"@effect/platform-node-shared": "4.0.0",
|
|
55
|
-
"@llm4ts/core": "2.22.
|
|
56
|
-
"@llm4ts/runner": "2.22.
|
|
57
|
-
"@llm4ts/flow": "2.22.
|
|
55
|
+
"@llm4ts/core": "2.22.1",
|
|
56
|
+
"@llm4ts/runner": "2.22.1",
|
|
57
|
+
"@llm4ts/flow": "2.22.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"effect": "4.0.0"
|