@yagni-app/code-staging 1.1.6-staging.1438.1 → 1.1.6-staging.1439.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.
@@ -45,9 +45,7 @@ export const CHILD_HONESTY_PREAMBLE = "Never fabricate file paths, file contents
45
45
  "rather than presenting a guess as a finding.";
46
46
  /** Fill {ticket}/{previous}; an absent var renders as empty string. */
47
47
  export function renderTemplate(tmpl, vars) {
48
- return tmpl
49
- .replace(/\{ticket\}/g, vars.ticket ?? "")
50
- .replace(/\{previous\}/g, vars.previous ?? "");
48
+ return tmpl.replace(/\{(ticket|previous)\}/g, (_, key) => vars[key] ?? "");
51
49
  }
52
50
  /**
53
51
  * Build the pi passthrough argv for one stage (from `--mode` onward). The
@@ -44,6 +44,10 @@ export const REQUIRED_LENSES = ["correctness"];
44
44
  const READ_TOOLS = ["read", "grep", "find", "ls", "bash"];
45
45
  /** Full write tools for the worker stages. */
46
46
  const WRITE_TOOLS = ["read", "write", "edit", "bash", "grep", "find", "ls"];
47
+ const TICKET_CONTEXT = "Follow the approved plan and its explicit constraints, including approved answers. " +
48
+ "Prior summaries and review findings do not authorize expanding scope or publication " +
49
+ "permissions. Report conflicts requiring a scope change for approval.\n\n" +
50
+ "Ticket context and explicit constraints:\n{ticket}\n\n";
47
51
  export const PIPELINE_V1 = [
48
52
  {
49
53
  id: "map",
@@ -71,7 +75,8 @@ export const PIPELINE_V1 = [
71
75
  agent: "worker",
72
76
  model: "standard",
73
77
  tools: [...WRITE_TOOLS, "ask_yagni", "record_decision"],
74
- taskTemplate: "Implement the plan. Write the code against it, and call record_decision " +
78
+ taskTemplate: TICKET_CONTEXT +
79
+ "Implement the plan. Write the code against it, and call record_decision " +
75
80
  "only for a consequential product-intent or architecture call the plan did " +
76
81
  "not settle (never for taste, naming, or formatting).\n\nPlan:\n{previous}",
77
82
  },
@@ -80,14 +85,16 @@ export const PIPELINE_V1 = [
80
85
  agent: "reviewer",
81
86
  model: "peak",
82
87
  tools: [...READ_TOOLS, "ask_yagni", "review_business_match"],
83
- taskTemplate: "Review the implementation adversarially. Diff/summary of the change:\n{previous}",
88
+ taskTemplate: TICKET_CONTEXT +
89
+ "Review the implementation adversarially. Diff/summary of the change:\n{previous}",
84
90
  },
85
91
  {
86
92
  id: "fix",
87
93
  agent: "worker",
88
94
  model: "standard",
89
95
  tools: [...WRITE_TOOLS, "ask_yagni"],
90
- taskTemplate: "Reconcile ONLY the blocking review findings against the plan. Leave " +
96
+ taskTemplate: TICKET_CONTEXT +
97
+ "Reconcile ONLY the blocking review findings against the plan. Leave " +
91
98
  "non-blocking findings alone.\n\nBlocking findings:\n{previous}",
92
99
  },
93
100
  ];
@@ -197,7 +204,8 @@ export function builderStage(workstream, siblings = []) {
197
204
  model: workstream.tier,
198
205
  workstream: workstream.name,
199
206
  personaClause: builderPersonaClause(workstream, siblings),
200
- taskTemplate: `Implement ONLY your workstream of the plan below: "${workstream.name}".\n\n` +
207
+ taskTemplate: TICKET_CONTEXT +
208
+ `Implement ONLY your workstream of the plan below: "${workstream.name}".\n\n` +
201
209
  `Your workstream: ${workstream.task}\n\n` +
202
210
  "Write the code against the plan, staying inside the files you own, and call " +
203
211
  "record_decision only for a consequential product-intent or architecture call " +
@@ -216,7 +224,8 @@ export function synthesizerStage() {
216
224
  ...implement,
217
225
  agent: "synthesizer",
218
226
  model: "standard",
219
- taskTemplate: "Several builders just finished in parallel in this working tree. Reconcile the " +
227
+ taskTemplate: TICKET_CONTEXT +
228
+ "Several builders just finished in parallel in this working tree. Reconcile the " +
220
229
  "seams between their changes, address the checker findings and any out-of-claim " +
221
230
  "edits below, and write ONE implement summary for the reviewers.\n\n{previous}",
222
231
  };
@@ -236,7 +245,8 @@ export const SYNTHESIZER_CALLER_LABEL = `${IMPLEMENT_CALLER_PREFIX}synthesizer`;
236
245
  export function synthesizerFixStage(findings) {
237
246
  return {
238
247
  ...synthesizerStage(),
239
- taskTemplate: "Verification failed on the merged tree, and these findings do not sit inside any single " +
248
+ taskTemplate: TICKET_CONTEXT +
249
+ "Verification failed on the merged tree, and these findings do not sit inside any single " +
240
250
  "workstream's files, so they are yours. Fix ONLY what is listed, then re-write the implement " +
241
251
  `summary for the reviewers in the same format.\n\nFindings:\n${findings}`,
242
252
  };
@@ -251,7 +261,8 @@ export function fixerStage(workstream, findings, siblings = []) {
251
261
  return {
252
262
  ...base,
253
263
  personaClause: builderPersonaClause(workstream, siblings),
254
- taskTemplate: "Verification failed. Fix ONLY the findings below" +
264
+ taskTemplate: TICKET_CONTEXT +
265
+ "Verification failed. Fix ONLY the findings below" +
255
266
  (workstream ? `, and only inside the files your workstream owns` : "") +
256
267
  ". Do not start a fresh pass over the plan and do not fix anything that is not " +
257
268
  `listed.\n\nFindings:\n${findings}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yagni-app/code-staging",
3
- "version": "1.1.6-staging.1438.1",
3
+ "version": "1.1.6-staging.1439.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": "273d4311096e1a2eec5f56baaa6e267817a2011e"
61
+ "yagniSourceSha": "aef6a54c459365b8fcb575ca230209ca0bd47f38"
62
62
  }