@yagni-app/code-staging 1.1.2-staging.1365.1 → 1.1.2-staging.1368.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.
@@ -15,6 +15,17 @@ export declare const DECISION_KIND_DESCRIPTION: string;
15
15
  export declare const RECORD_WHEN: string;
16
16
  /** When not to: the negative half, one sentence. */
17
17
  export declare const RECORD_NEVER: string;
18
- /** The rubric as one paragraph for persona bodies and task templates. */
19
- export declare const RECORD_DECISION_RUBRIC = "Record a decision only when it is consequential: a product-intent, architecture, or team-convention call that another engineer would need to know and that is not already written down, especially one a human just settled by answering a question or correcting you. Never record taste, styling, naming of a local variable, formatting, a workaround, a restatement of the code change, or anything the user is still experimenting with; when in doubt, do not record it.";
18
+ /**
19
+ * How the decision text itself must read. The ledger shows the decision as
20
+ * the headline and the question beneath it, so an answer-shaped decision
21
+ * ("No. Surface the decline.") reads as a fragment on every surface that
22
+ * renders it.
23
+ */
24
+ export declare const DECISION_STATEMENT: string;
25
+ /**
26
+ * The rubric as one paragraph for persona bodies and task templates: when,
27
+ * never, and how the decision text must read, so every surface that records
28
+ * a decision produces one the headline-first ledger can render whole.
29
+ */
30
+ export declare const RECORD_DECISION_RUBRIC = "Record a decision only when it is consequential: a product-intent, architecture, or team-convention call that another engineer would need to know and that is not already written down, especially one a human just settled by answering a question or correcting you. Never record taste, styling, naming of a local variable, formatting, a workaround, a restatement of the code change, or anything the user is still experimenting with; when in doubt, do not record it. Write the decision as a standalone statement that reads without the question: name the subject and what was chosen (\"Checkout surfaces a declined card to the customer instead of retrying it\"), never a bare yes or no or an answer that only makes sense under the question.";
20
31
  //# sourceMappingURL=decisionRubric.d.ts.map
@@ -21,6 +21,20 @@ export const RECORD_WHEN = "Record a decision only when it is consequential: a p
21
21
  export const RECORD_NEVER = "Never record taste, styling, naming of a local variable, formatting, a workaround, " +
22
22
  "a restatement of the code change, or anything the user is still experimenting with; " +
23
23
  "when in doubt, do not record it.";
24
- /** The rubric as one paragraph for persona bodies and task templates. */
25
- export const RECORD_DECISION_RUBRIC = `${RECORD_WHEN} ${RECORD_NEVER}`;
24
+ /**
25
+ * How the decision text itself must read. The ledger shows the decision as
26
+ * the headline and the question beneath it, so an answer-shaped decision
27
+ * ("No. Surface the decline.") reads as a fragment on every surface that
28
+ * renders it.
29
+ */
30
+ export const DECISION_STATEMENT = "Write the decision as a standalone statement that reads without the question: name " +
31
+ "the subject and what was chosen (\"Checkout surfaces a declined card to the customer " +
32
+ "instead of retrying it\"), never a bare yes or no or an answer that only makes sense " +
33
+ "under the question.";
34
+ /**
35
+ * The rubric as one paragraph for persona bodies and task templates: when,
36
+ * never, and how the decision text must read, so every surface that records
37
+ * a decision produces one the headline-first ledger can render whole.
38
+ */
39
+ export const RECORD_DECISION_RUBRIC = `${RECORD_WHEN} ${RECORD_NEVER} ${DECISION_STATEMENT}`;
26
40
  //# sourceMappingURL=decisionRubric.js.map
@@ -1,6 +1,6 @@
1
1
  import { randomUUID } from "node:crypto";
2
2
  import { Type } from "typebox";
3
- import { DECISION_KIND_DESCRIPTION, RECORD_NEVER, RECORD_WHEN, } from "./decisionRubric.js";
3
+ import { DECISION_KIND_DESCRIPTION, DECISION_STATEMENT, RECORD_NEVER, RECORD_WHEN, } from "./decisionRubric.js";
4
4
  import { consumeFlywheelAttribution } from "./flywheel.js";
5
5
  import { sendOrSpool } from "./spool.js";
6
6
  /**
@@ -31,7 +31,7 @@ export async function recordDecision(opts, params, signal) {
31
31
  }
32
32
  const parameters = Type.Object({
33
33
  question: Type.String({ description: "The question that was decided, as another engineer would ask it." }),
34
- decision: Type.String({ description: "The answer or direction taken." }),
34
+ decision: Type.String({ description: `The direction taken. ${DECISION_STATEMENT}` }),
35
35
  kind: Type.Union([Type.Literal("product"), Type.Literal("architecture"), Type.Literal("convention")], { description: `What sort of call this is: ${DECISION_KIND_DESCRIPTION}.` }),
36
36
  rationale: Type.String({ description: "Why: the durable reasoning a teammate would want six months later." }),
37
37
  repo: Type.Optional(Type.String()),
@@ -60,6 +60,7 @@ export function makeRecordDecisionTool(opts) {
60
60
  RECORD_WHEN,
61
61
  RECORD_NEVER,
62
62
  "Record the durable decision and its 'why', not a restatement of the code change; name its kind honestly.",
63
+ DECISION_STATEMENT,
63
64
  ],
64
65
  parameters,
65
66
  async execute(_toolCallId, params, signal, onUpdate, _ctx) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yagni-app/code-staging",
3
- "version": "1.1.2-staging.1365.1",
3
+ "version": "1.1.2-staging.1368.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": "696c88e118688cb45dca88c0b821ff90e1db2c4c"
61
+ "yagniSourceSha": "a5f338426410c8549a0b85f6e0ac39fd3fdd3e78"
62
62
  }