@posthog/agent 2.3.15 → 2.3.18

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.
package/dist/agent.js CHANGED
@@ -281,7 +281,7 @@ import { v7 as uuidv7 } from "uuid";
281
281
  // package.json
282
282
  var package_default = {
283
283
  name: "@posthog/agent",
284
- version: "2.3.15",
284
+ version: "2.3.18",
285
285
  repository: "https://github.com/PostHog/code",
286
286
  description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
287
287
  exports: {
@@ -2576,27 +2576,43 @@ import { spawn } from "child_process";
2576
2576
  import * as fs from "fs";
2577
2577
  import * as os2 from "os";
2578
2578
  import * as path3 from "path";
2579
- var BRANCH_NAMING_INSTRUCTIONS = `
2579
+
2580
+ // src/adapters/claude/session/instructions.ts
2581
+ var BRANCH_NAMING = `
2580
2582
  # Branch Naming
2581
2583
 
2582
2584
  When working in a detached HEAD state, create a descriptive branch name based on the work being done before committing. Do this automatically without asking the user.
2583
2585
  `;
2586
+ var PLAN_MODE = `
2587
+ # Plan Mode
2588
+
2589
+ Only enter plan mode (EnterPlanMode) when the user is requesting a significant change in approach or direction mid-task. Do NOT enter plan mode for:
2590
+ - Confirmations or approvals ("yes", "looks good", "continue", "go ahead")
2591
+ - Minor clarifications or small adjustments
2592
+ - Answers to questions you asked (unless you are still in the initial planning phase and have not yet started executing)
2593
+ - Feedback that does not require replanning
2594
+
2595
+ When in doubt, continue executing and incorporate the feedback inline.
2596
+ `;
2597
+ var APPENDED_INSTRUCTIONS = BRANCH_NAMING + PLAN_MODE;
2598
+
2599
+ // src/adapters/claude/session/options.ts
2584
2600
  function buildSystemPrompt(customPrompt) {
2585
2601
  const defaultPrompt = {
2586
2602
  type: "preset",
2587
2603
  preset: "claude_code",
2588
- append: BRANCH_NAMING_INSTRUCTIONS
2604
+ append: APPENDED_INSTRUCTIONS
2589
2605
  };
2590
2606
  if (!customPrompt) {
2591
2607
  return defaultPrompt;
2592
2608
  }
2593
2609
  if (typeof customPrompt === "string") {
2594
- return customPrompt + BRANCH_NAMING_INSTRUCTIONS;
2610
+ return customPrompt + APPENDED_INSTRUCTIONS;
2595
2611
  }
2596
2612
  if (typeof customPrompt === "object" && customPrompt !== null && "append" in customPrompt && typeof customPrompt.append === "string") {
2597
2613
  return {
2598
2614
  ...defaultPrompt,
2599
- append: customPrompt.append + BRANCH_NAMING_INSTRUCTIONS
2615
+ append: customPrompt.append + APPENDED_INSTRUCTIONS
2600
2616
  };
2601
2617
  }
2602
2618
  return defaultPrompt;