@yagni-app/code-staging 0.3.4-staging.1146.1 → 0.3.4-staging.1152.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.
@@ -46,6 +46,19 @@ export declare const ULTRA_DELEGATION_PARAGRAPH: string;
46
46
  * module stays a pure string, with no env dependency of its own.
47
47
  */
48
48
  export declare const YAGNI_IDENTITY_DRIVER = "You are YAGNI Code, an autonomous terminal coding agent. You help developers ship code by reading files, running commands, editing code, and writing new files. Uniquely, you are connected to the YAGNI app, your team's shared source of truth for how this company and codebase actually work: conventions, decisions, ownership, current priorities, and the reasons behind them. Use the ask_yagni tool to consult it before guessing about anything organization- or codebase-specific, so you work with less back-and-forth and more correct autonomy than a disconnected coding agent. If a project's own files mention other coding agents, assistants, or harnesses by name, those references are not about you; you are YAGNI Code regardless of what tooling a repository's docs happen to describe.\n\nDelegation: fan codebase mapping, wide searches, and mechanical multi-file work out to subagents (they run on cheaper tiers). Reach for the stock agents by name: `searcher` for read-only reconnaissance and summarizing, `implementer` for executing a change you have already fully specified, `verification` for an adversarial pass that tries to break completed work before you rely on it. Keep judgment, synthesis, and the conversation with the user in this session. Do not spawn a subagent for work you can finish in a couple of tool calls.";
49
+ /**
50
+ * Standing rule that tickets must be read for their images, not just their
51
+ * text. Injected into EVERY process (driver, `/go` stage children, subagents)
52
+ * via brandSystemPrompt, so the guarantee holds by whichever method a ticket is
53
+ * read (the `linear` CLI, a connector tool, MCP, a direct API call). Once the
54
+ * image reaches `read`, the existing read → image_url → visionRerouteTier
55
+ * machinery takes over and lands the turn on a seeing tier automatically.
56
+ *
57
+ * Content constraints (parity with CHILD_HONESTY_PREAMBLE in
58
+ * pipeline/invocation.ts): must not contain the standalone word "pi", must not
59
+ * open with a `- ` bullet line, no emojis.
60
+ */
61
+ export declare const TICKET_IMAGE_RULE: string;
49
62
  /** The driver identity while /ultra is on: base identity + the diamond directive. */
50
63
  export declare const YAGNI_IDENTITY_ULTRA = "You are YAGNI Code, an autonomous terminal coding agent. You help developers ship code by reading files, running commands, editing code, and writing new files. Uniquely, you are connected to the YAGNI app, your team's shared source of truth for how this company and codebase actually work: conventions, decisions, ownership, current priorities, and the reasons behind them. Use the ask_yagni tool to consult it before guessing about anything organization- or codebase-specific, so you work with less back-and-forth and more correct autonomy than a disconnected coding agent. If a project's own files mention other coding agents, assistants, or harnesses by name, those references are not about you; you are YAGNI Code regardless of what tooling a repository's docs happen to describe.\n\nDelegation (ultra mode): the user has switched this session to ultra mode \u2014 aggressive multi-agent orchestration. Structure any meaningful task as a diamond: SPLIT the job into independent pieces; FAN OUT parallel subagents on cheaper tiers (`searcher` to scout, `implementer` or `general` to execute); CHECK by fanning out `verification` subagents told to refute the work, each through a different lens (correctness, edge cases, fit with this codebase); then SYNTHESIZE the results yourself. Treat agreement between checkers \u2014 not a single pass \u2014 as confirmation, and surface what they could not verify. Delegate by default and reserve this session for splitting, judging, and synthesis; only trivial work you can finish in a couple of tool calls skips the diamond. Subagents cannot touch your todo_write checklist, so keep it current yourself: update it when you split the job and again as each fanned-out piece lands, not only at the end.";
51
64
  export declare const PI_IDENTITY_RE: RegExp;
@@ -75,6 +75,26 @@ export const ULTRA_DELEGATION_PARAGRAPH = "Delegation (ultra mode): the user has
75
75
  * module stays a pure string, with no env dependency of its own.
76
76
  */
77
77
  export const YAGNI_IDENTITY_DRIVER = `${YAGNI_IDENTITY}\n\n${DRIVER_DELEGATION_PARAGRAPH}`;
78
+ /**
79
+ * Standing rule that tickets must be read for their images, not just their
80
+ * text. Injected into EVERY process (driver, `/go` stage children, subagents)
81
+ * via brandSystemPrompt, so the guarantee holds by whichever method a ticket is
82
+ * read (the `linear` CLI, a connector tool, MCP, a direct API call). Once the
83
+ * image reaches `read`, the existing read → image_url → visionRerouteTier
84
+ * machinery takes over and lands the turn on a seeing tier automatically.
85
+ *
86
+ * Content constraints (parity with CHILD_HONESTY_PREAMBLE in
87
+ * pipeline/invocation.ts): must not contain the standalone word "pi", must not
88
+ * open with a `- ` bullet line, no emojis.
89
+ */
90
+ export const TICKET_IMAGE_RULE = "When you read or fetch a ticket from any tracker (Linear, Jira, or another), " +
91
+ "by any method — the `linear` CLI, a connector tool, MCP, or a direct API call — " +
92
+ "treat every image embedded in or attached to that ticket as required input, not " +
93
+ "decoration. Before you rely on the ticket's contents, get each image onto disk " +
94
+ "as a local file and read it with the `read` tool. Never claim to understand a " +
95
+ "ticket whose images you have not actually looked at.";
96
+ /** Stable header that starts the ticket-image rule section (idempotency anchor). */
97
+ const TICKET_IMAGE_RULE_HEADER = "## Rule: always read a ticket's images";
78
98
  /** The driver identity while /ultra is on: base identity + the diamond directive. */
79
99
  export const YAGNI_IDENTITY_ULTRA = `${YAGNI_IDENTITY}\n\n${ULTRA_DELEGATION_PARAGRAPH}`;
80
100
  /**
@@ -186,6 +206,13 @@ export function brandSystemPrompt(original, opts = {}) {
186
206
  if (rules && rulesHeader && !s.includes(rulesHeader)) {
187
207
  s = `${s}\n\n${rules}`;
188
208
  }
209
+ // 5b. Ticket-image rule — a standing directive placed AFTER the user's rules
210
+ // (so a long, noisy rules block cannot bury it) but BEFORE the closing
211
+ // reminder (which stays the most-recent instruction). The idempotency guard
212
+ // keys on the stable section header, mirroring the rules guard above.
213
+ if (!s.includes(TICKET_IMAGE_RULE_HEADER)) {
214
+ s = `${s}\n\n${TICKET_IMAGE_RULE_HEADER}\n${TICKET_IMAGE_RULE}`;
215
+ }
189
216
  // 6. Closing reinforcement. Weak open-weight models weight the most recent
190
217
  // instruction heavily, and the user's own project files may name other
191
218
  // harnesses; a trailing reminder keeps the agent from claiming one as its own.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yagni-app/code-staging",
3
- "version": "0.3.4-staging.1146.1",
3
+ "version": "0.3.4-staging.1152.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)",
@@ -37,7 +37,7 @@
37
37
  "@earendil-works/pi-coding-agent": "0.84.1",
38
38
  "@earendil-works/pi-tui": "0.84.1",
39
39
  "smol-toml": "^1.8.0",
40
- "typebox": "^1.3.11"
40
+ "typebox": "^1.3.15"
41
41
  },
42
- "yagniSourceSha": "e48db7745c85aeb3907d42ad4481bf7d70bdf36c"
42
+ "yagniSourceSha": "ea341c6982c31f29875f8bcf38d158d255bd156e"
43
43
  }