@yagni-app/code-staging 1.2.14-staging.2473.1 → 1.2.14-staging.2477.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.
@@ -42,6 +42,14 @@ export declare const MAX_ASK_LINES = 8;
42
42
  export declare function parseAttemptAsk(value: unknown): AttemptAsk | null;
43
43
  /** The ask as the file holds it, or null when the file is missing, does not read or asks nothing. */
44
44
  export declare function readNeedsPerson(text: string | null): AttemptAsk | null;
45
+ /**
46
+ * Who reads an ask, and so how it is written (YAG-1389): the customer's
47
+ * engineer, often from a notification, who sees neither the plan nor the
48
+ * review. The host's cleaner (`plainAskWords` in the backend) catches a
49
+ * review id or an em-dash that gets through; only this rule covers a
50
+ * numbered plan step.
51
+ */
52
+ export declare const ASK_READER_RULE = "The ask is read by the customer's engineer on the yak card, often from a notification, who must be able to choose from it alone, without opening the plan or the review. So the question and the options use no ids (review thread, finding, run or plan ids) and no numbered plan steps, criteria or questions: quote or describe them in plain words instead (for example \"the ticket says no behavior change\"). Name a review comment by who asked and what they asked, never by its id or a link. The evidence stays checkable (file:line, commits and commands), with no review ids or plan numbers either. No internal labels such as needs_person, and no em-dashes.";
45
53
  /**
46
54
  * The build rule that says when the session stops for a person, and how. A
47
55
  * person answers it and the session resumes with their answer.
@@ -86,13 +86,21 @@ export function readNeedsPerson(text) {
86
86
  return null;
87
87
  }
88
88
  }
89
+ /**
90
+ * Who reads an ask, and so how it is written (YAG-1389): the customer's
91
+ * engineer, often from a notification, who sees neither the plan nor the
92
+ * review. The host's cleaner (`plainAskWords` in the backend) catches a
93
+ * review id or an em-dash that gets through; only this rule covers a
94
+ * numbered plan step.
95
+ */
96
+ export const ASK_READER_RULE = 'The ask is read by the customer\'s engineer on the yak card, often from a notification, who must be able to choose from it alone, without opening the plan or the review. So the question and the options use no ids (review thread, finding, run or plan ids) and no numbered plan steps, criteria or questions: quote or describe them in plain words instead (for example "the ticket says no behavior change"). Name a review comment by who asked and what they asked, never by its id or a link. The evidence stays checkable (file:line, commits and commands), with no review ids or plan numbers either. No internal labels such as needs_person, and no em-dashes.';
89
97
  /**
90
98
  * The build rule that says when the session stops for a person, and how. A
91
99
  * person answers it and the session resumes with their answer.
92
100
  */
93
101
  export const NEEDS_PERSON_RULE = (outDir) => `Stop and ask a person only for a change of direction: the plan or the ticket is wrong about the code, or the right change is far larger than the ticket, or a choice that cannot be undone that neither settles. Never for what a check, a read or a decision record answers. Then write ${join(outDir, NEEDS_PERSON_FILE_NAME)} as JSON: ` +
94
- '{"question": "<one question a person can answer>", "evidence": ["<file:line, command or query, and what it showed>"], "options": ["<your recommendation first>", "<each other way on>"]}, ' +
95
- "commit what is done so far, write the report, and end your turn: YAGNI hands the ticket to a person with your ask, and you resume with their answer.";
102
+ '{"question": "<one question a person can answer>", "evidence": ["<file:line, command or query, and what it showed>"], "options": ["<your recommendation first>", "<each other way on>"]}. ' +
103
+ `${ASK_READER_RULE} Then commit what is done so far, write the report, and end your turn: YAGNI hands the ticket to a person with your ask, and you resume with their answer.`;
96
104
  /**
97
105
  * A writing turn's result with the session's ask folded in: a turn that
98
106
  * ended on its own (`clean`, or `no_changes`) with an ask stops
@@ -140,10 +148,10 @@ export function sessionWorkingStyleOf(text) {
140
148
  }
141
149
  /** How a yak's ask is written and what follows it: the same shape as {@link NEEDS_PERSON_RULE}'s, with its reason. */
142
150
  const ASK_SHAPE = (outDir) => `write ${join(outDir, NEEDS_PERSON_FILE_NAME)} as JSON: ` +
143
- '{"question": "<one question a person can answer>", "reason": "<the reason\'s key>", "evidence": ["<file:line, command or query, and what it showed>"], "options": ["<your recommendation first>", "<each other way on>"]}, ' +
144
- "commit what is done so far, write the report, and end your turn: YAGNI hands the ticket to a person with your ask, and you resume with their answer. No evidence, no stop.";
151
+ '{"question": "<one question a person can answer>", "reason": "<the reason\'s key>", "evidence": ["<file:line, command or query, and what it showed>"], "options": ["<your recommendation first>", "<each other way on>"]}. ' +
152
+ `${ASK_READER_RULE} Then commit what is done so far, write the report, and end your turn: YAGNI hands the ticket to a person with your ask, and you resume with their answer. No evidence, no stop.`;
145
153
  /** A reviewer's item that changes the product beyond the plan, on either style. */
146
- const REVIEW_ASK_RULE = "A review item from a reviewer (Proctor, or any other app) that would change the product beyond the plan, not only the code, is a person's call: stop and ask about it, with reason \"product_change\" and as evidence the item's id and what it would change, instead of marking it needs_person in the outcomes file. An item a person on the Team wrote themselves is their instruction: act on it, and never ask about it.";
154
+ const REVIEW_ASK_RULE = 'A review item from a reviewer (Proctor, or any other app) that would change the product beyond the plan, not only the code, is a person\'s call: stop and ask about it, with reason "product_change" and as evidence who asked for it and what it would change, instead of marking it needs_person in the outcomes file. An item a person on the Team wrote themselves is their instruction: act on it, and never ask about it.';
147
155
  /**
148
156
  * A yak's build, fix or verify turn: when it may stop for a person, by the
149
157
  * ticket's working style. Check with me stops for a change of direction, as
@@ -229,7 +229,8 @@ export function systemRepositoriesOf(text, cwd) {
229
229
  }
230
230
  const SHA = /^[0-9a-f]{40}([0-9a-f]{24})?$/;
231
231
  const REPORT_CONTRACT = (outDir) => `Last, write ${join(outDir, SESSION_REPORT_FILE_NAME)} as JSON, honestly: ` +
232
- '{"summary": "<what you changed, in two or three sentences>", ' +
232
+ // A yak's thread shows the summary as its "Where we are" note (YAG-1389).
233
+ '{"summary": "<what you changed, in two or three sentences, for the customer\'s engineer who reads it on the yak card: plain words, no review, finding, run or plan ids, no numbered plan steps, criteria or questions, no outcome labels such as needs_person, and no em-dashes>", ' +
233
234
  '"checks": [{"name": "lint", "command": "pnpm lint", "cwd": ".", "exitCode": 0, "durationMs": 41000, ' +
234
235
  '"baseline": "runnable | fails_on_base | cannot_run"}], ' +
235
236
  '"notVerified": ["<what you could not verify, and why>"], ' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yagni-app/code-staging",
3
- "version": "1.2.14-staging.2473.1",
3
+ "version": "1.2.14-staging.2477.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": "60735b89da0d1e5ab9a2bcabf85ffe158e82c00f"
61
+ "yagniSourceSha": "5c78e3655678cde867260226373cdcf7834906f6"
62
62
  }