@yagni-app/code-staging 1.2.13-staging.2173.1 → 1.2.13-staging.2190.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.
@@ -979,7 +979,11 @@ export async function runPipeline(ticket, deps) {
979
979
  reviewInput: written.finalOutput,
980
980
  usage: currentUsage(),
981
981
  }));
982
- return done(open.length > 0 ? "round_cap" : "clean", open);
982
+ // The review loop's own rule (`shouldStop`): a cap is spent only on a
983
+ // finding that blocks. Advisory findings left when the fix turns ran out
984
+ // travel with the result for the pull request to name, never a stop
985
+ // (ENG-3028, YAG-1073).
986
+ return done(open.some(isBlockingFinding) ? "round_cap" : "clean", open);
983
987
  };
984
988
  const fixRound = !resume && deps.fixRound && !deps.fixRound.replan ? deps.fixRound : undefined;
985
989
  if (deps.fixRound?.replan)
@@ -9,6 +9,15 @@
9
9
  * functions it runs on its own plan (`groundSessionPlan` in the backend's
10
10
  * builder/planQuestions.ts), so there is one normalizer, on the host.
11
11
  */
12
+ /**
13
+ * A plan's size (YAG-1083's first half, shadow mode): the plan turn's own
14
+ * judgment of how big the build will be. The vocabulary is local because this
15
+ * package cannot depend on `@yagni/shared`; the runtime copy the host reads
16
+ * and stores lives in `packages/backend/src/observability/planSize.ts`. A size
17
+ * outside this set is dropped, never the plan.
18
+ */
19
+ declare const PLAN_SIZES: readonly ["small", "standard", "complex"];
20
+ type PlanSize = (typeof PLAN_SIZES)[number];
12
21
  /** `plan.json`, version 1, as the host reads it. */
13
22
  export interface PlanFile {
14
23
  version: 1;
@@ -55,6 +64,15 @@ export interface PlanFile {
55
64
  why: string;
56
65
  repository?: string;
57
66
  }>;
67
+ /**
68
+ * The plan turn's own judgment of how big the build will be
69
+ * (`small | standard | complex`), absent when the plan wrote none or one
70
+ * outside the vocabulary. Recorded only (YAG-1083's first half): nothing
71
+ * reads it back yet.
72
+ */
73
+ size?: PlanSize;
74
+ /** One line on why the size, clipped; absent when the plan wrote none. */
75
+ sizeReason?: string;
58
76
  }
59
77
  /** The plan's `wrongRepository`, or null when it names no `owner/name`. Confidence is high only when said. */
60
78
  export declare function readWrongRepository(value: unknown): PlanFile["wrongRepository"] | null;
@@ -87,4 +105,5 @@ export declare function buildPlanFile(planText: string, fallbackPaths: () => str
87
105
  file: PlanFile;
88
106
  found: boolean;
89
107
  };
108
+ export {};
90
109
  //# sourceMappingURL=planOutput.d.ts.map
@@ -19,6 +19,14 @@ const MAX_TEXT = 500;
19
19
  * same number as `MAX_SPLIT_CHILDREN` in @yagni/shared, kept here because this package
20
20
  * does not depend on it. */
21
21
  const MAX_REPOSITORIES_NEEDED = 12;
22
+ /**
23
+ * A plan's size (YAG-1083's first half, shadow mode): the plan turn's own
24
+ * judgment of how big the build will be. The vocabulary is local because this
25
+ * package cannot depend on `@yagni/shared`; the runtime copy the host reads
26
+ * and stores lives in `packages/backend/src/observability/planSize.ts`. A size
27
+ * outside this set is dropped, never the plan.
28
+ */
29
+ const PLAN_SIZES = ["small", "standard", "complex"];
22
30
  /** The plan's `wrongRepository`, or null when it names no `owner/name`. Confidence is high only when said. */
23
31
  export function readWrongRepository(value) {
24
32
  if (!isRecord(value))
@@ -176,6 +184,8 @@ export function buildPlanFile(planText, fallbackPaths) {
176
184
  const paths = [...new Set(named.length > 0 ? named : fallbackPaths())].slice(0, MAX_LIST);
177
185
  const repositoriesNeeded = readRepositoriesNeeded(block?.repositoriesNeeded);
178
186
  const wrongRepository = readWrongRepository(block?.wrongRepository);
187
+ const size = PLAN_SIZES.find((known) => known === block?.size);
188
+ const sizeReason = size && typeof block?.sizeReason === "string" ? text(block.sizeReason, 200) : null;
179
189
  return {
180
190
  file: {
181
191
  version: 1,
@@ -187,6 +197,8 @@ export function buildPlanFile(planText, fallbackPaths) {
187
197
  ...(wrongRepository ? { wrongRepository } : {}),
188
198
  dependsOn: readDependsOn(block?.dependsOn),
189
199
  followUps: readFollowUps(block?.followUps),
200
+ ...(size ? { size } : {}),
201
+ ...(size && sizeReason ? { sizeReason } : {}),
190
202
  },
191
203
  found: block !== null,
192
204
  };
@@ -50,8 +50,14 @@ export declare function reviewStage(): PipelineStage;
50
50
  export declare function selectStages(_lane?: "full"): PipelineStage[];
51
51
  /** Interactive /go and mission builds: the diamond, three lenses, two rounds. */
52
52
  export declare const FULL_LANE: PipelineLane;
53
- /** The cloud lane's cap: one reviewer per round, so more rounds than the full lane. */
54
- export declare const CLOUD_MAX_REVIEW_ROUNDS = 4;
53
+ /**
54
+ * The cloud lane's cap: one reviewer per round, so more rounds than the full
55
+ * lane. Five since YAG-1106 (promised to GPX on 2026-10-30): a cap never
56
+ * ends a build without its pull request, so the rounds past the fourth buy
57
+ * one more fix at a blocking finding before the pull request names what is
58
+ * still open. Never uncapped: each round is peak-tier output tokens.
59
+ */
60
+ export declare const CLOUD_MAX_REVIEW_ROUNDS = 5;
55
61
  /** The tool every cloud plan stage calls for the decisions a person already made on this repository. */
56
62
  export declare const DECISIONS_READ_TOOL = "yagni_decisions_read_for_repository";
57
63
  /**
@@ -134,8 +134,14 @@ export const FULL_LANE = {
134
134
  stopAfterPlan: false,
135
135
  skillsEveryStage: false,
136
136
  };
137
- /** The cloud lane's cap: one reviewer per round, so more rounds than the full lane. */
138
- export const CLOUD_MAX_REVIEW_ROUNDS = 4;
137
+ /**
138
+ * The cloud lane's cap: one reviewer per round, so more rounds than the full
139
+ * lane. Five since YAG-1106 (promised to GPX on 2026-10-30): a cap never
140
+ * ends a build without its pull request, so the rounds past the fourth buy
141
+ * one more fix at a blocking finding before the pull request names what is
142
+ * still open. Never uncapped: each round is peak-tier output tokens.
143
+ */
144
+ export const CLOUD_MAX_REVIEW_ROUNDS = 5;
139
145
  /** The tool every cloud plan stage calls for the decisions a person already made on this repository. */
140
146
  export const DECISIONS_READ_TOOL = "yagni_decisions_read_for_repository";
141
147
  /**
@@ -196,6 +202,8 @@ export const PLAN_JSON_CONTRACT = "End your answer with a fenced ```plan-json bl
196
202
  ' "repositoriesNeeded": [{"repository": "owner/name", "summary": "one line on what changes there"}],\n' +
197
203
  ' "wrongRepository": {"repository": "owner/name", "why": "one line", "confidence": "high|low"},\n' +
198
204
  ' "dependsOn": [{"repository": "owner/name", "what": "one line on what it needs there"}],\n' +
205
+ ' "size": "small|standard|complex",\n' +
206
+ ' "sizeReason": "one line on why the size",\n' +
199
207
  ' "followUps": [{"title": "...", "why": "one line", "repository": "owner/name"}]\n' +
200
208
  "}\n" +
201
209
  "```\n" +
@@ -208,6 +216,7 @@ export const PLAN_JSON_CONTRACT = "End your answer with a fenced ```plan-json bl
208
216
  "- At most two alternatives per question. A planChange only adds or rewords; it never removes.\n" +
209
217
  '- "checks" are the commands that prove the change, each run from "cwd" (repo-relative, "." for the root). ' +
210
218
  '"paths" are the package folders the plan touches.\n' +
219
+ '- "size" is your own judgment of how big the build will be (small: a one-file or config fix; standard: a change across one or two packages; complex: a cross-package or schema/contract change), with one line as "sizeReason". A plan that omits them, or writes a size outside the vocabulary, still produces a plan: the value is dropped, never the plan.\n' +
211
220
  '- "decisionsCited" lists only decisions the read returned that the plan relies on. Omit what you do not use.\n' +
212
221
  '- "repositoriesNeeded" is for a change that needs writes in more than one repository: list every ' +
213
222
  "repository the change writes to, in the order they must be built and merged, this one included, each " +
@@ -551,13 +551,17 @@ export type PipelineProgress = {
551
551
  * - Review rounds are peak-tier output tokens, the most expensive tokens a
552
552
  * build buys, and the in-sandbox review is not the last reviewer: Proctor
553
553
  * reviews the pull request and its fix rounds act on what it finds.
554
- * - A third round never helped: every build that reached it ended with as many
555
- * findings or more, and hit the cap anyway.
556
- * - Round two runs only when round one found a blocker (`shouldStop`); what is
557
- * still open after the cap is written into the pull request body under
558
- * "Left for review" for Proctor, never a third round.
559
- * This is the `full` lane's cap. The cloud lane carries its own
560
- * (`PipelineLane.maxReviewRounds`): one reviewer per round, so four rounds.
554
+ * - The cap is a bound on spend, never a verdict: a build that hits it still
555
+ * opens its pull request, with what its own review left open named under
556
+ * "Left for review" for Proctor and the person reviewing (YAG-1106). A cap
557
+ * that ended a build with no pull request was the worst outcome a ticket
558
+ * could have (ENG-3028).
559
+ * - A round past the first runs only while a blocking finding is open
560
+ * (`shouldStop`, and the fix-mode path alike); nits, needs-person and
561
+ * advisory findings never spend a round and never stop a build.
562
+ * This is the `full` lane's cap, two rounds. The cloud lane carries its own
563
+ * (`PipelineLane.maxReviewRounds`): one reviewer per round, so five rounds
564
+ * (`CLOUD_MAX_REVIEW_ROUNDS`), never uncapped.
561
565
  */
562
566
  export declare const MAX_REVIEW_ROUNDS = 2;
563
567
  /**
@@ -12,13 +12,17 @@
12
12
  * - Review rounds are peak-tier output tokens, the most expensive tokens a
13
13
  * build buys, and the in-sandbox review is not the last reviewer: Proctor
14
14
  * reviews the pull request and its fix rounds act on what it finds.
15
- * - A third round never helped: every build that reached it ended with as many
16
- * findings or more, and hit the cap anyway.
17
- * - Round two runs only when round one found a blocker (`shouldStop`); what is
18
- * still open after the cap is written into the pull request body under
19
- * "Left for review" for Proctor, never a third round.
20
- * This is the `full` lane's cap. The cloud lane carries its own
21
- * (`PipelineLane.maxReviewRounds`): one reviewer per round, so four rounds.
15
+ * - The cap is a bound on spend, never a verdict: a build that hits it still
16
+ * opens its pull request, with what its own review left open named under
17
+ * "Left for review" for Proctor and the person reviewing (YAG-1106). A cap
18
+ * that ended a build with no pull request was the worst outcome a ticket
19
+ * could have (ENG-3028).
20
+ * - A round past the first runs only while a blocking finding is open
21
+ * (`shouldStop`, and the fix-mode path alike); nits, needs-person and
22
+ * advisory findings never spend a round and never stop a build.
23
+ * This is the `full` lane's cap, two rounds. The cloud lane carries its own
24
+ * (`PipelineLane.maxReviewRounds`): one reviewer per round, so five rounds
25
+ * (`CLOUD_MAX_REVIEW_ROUNDS`), never uncapped.
22
26
  */
23
27
  export const MAX_REVIEW_ROUNDS = 2;
24
28
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yagni-app/code-staging",
3
- "version": "1.2.13-staging.2173.1",
3
+ "version": "1.2.13-staging.2190.1",
4
4
  "description": "YAGNI Code: a terminal coding agent that already knows your company. One YAGNI login routes the model and grounds the agent in your team's context.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "YAGNI, Inc. <jack@yagni.app> (https://yagni.app)",
@@ -58,5 +58,5 @@
58
58
  "turndown": "^7.2.4",
59
59
  "typebox": "^1.3.15"
60
60
  },
61
- "yagniSourceSha": "d6206a240e12cff30f8e2e5e8975adfe67e52e83"
61
+ "yagniSourceSha": "515314459213f3e3acff697e5807da8ae3c5ce4a"
62
62
  }