@yagni-app/code-staging 1.2.13-staging.2173.1 → 1.2.13-staging.2176.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.
|
@@ -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
|
};
|
|
@@ -196,6 +196,8 @@ export const PLAN_JSON_CONTRACT = "End your answer with a fenced ```plan-json bl
|
|
|
196
196
|
' "repositoriesNeeded": [{"repository": "owner/name", "summary": "one line on what changes there"}],\n' +
|
|
197
197
|
' "wrongRepository": {"repository": "owner/name", "why": "one line", "confidence": "high|low"},\n' +
|
|
198
198
|
' "dependsOn": [{"repository": "owner/name", "what": "one line on what it needs there"}],\n' +
|
|
199
|
+
' "size": "small|standard|complex",\n' +
|
|
200
|
+
' "sizeReason": "one line on why the size",\n' +
|
|
199
201
|
' "followUps": [{"title": "...", "why": "one line", "repository": "owner/name"}]\n' +
|
|
200
202
|
"}\n" +
|
|
201
203
|
"```\n" +
|
|
@@ -208,6 +210,7 @@ export const PLAN_JSON_CONTRACT = "End your answer with a fenced ```plan-json bl
|
|
|
208
210
|
"- At most two alternatives per question. A planChange only adds or rewords; it never removes.\n" +
|
|
209
211
|
'- "checks" are the commands that prove the change, each run from "cwd" (repo-relative, "." for the root). ' +
|
|
210
212
|
'"paths" are the package folders the plan touches.\n' +
|
|
213
|
+
'- "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
214
|
'- "decisionsCited" lists only decisions the read returned that the plan relies on. Omit what you do not use.\n' +
|
|
212
215
|
'- "repositoriesNeeded" is for a change that needs writes in more than one repository: list every ' +
|
|
213
216
|
"repository the change writes to, in the order they must be built and merged, this one included, each " +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yagni-app/code-staging",
|
|
3
|
-
"version": "1.2.13-staging.
|
|
3
|
+
"version": "1.2.13-staging.2176.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": "
|
|
61
|
+
"yagniSourceSha": "aae5dcff2b6e88c794f1213893df2c24ec7be19e"
|
|
62
62
|
}
|