Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/agent/src/adapters/claude/session/instructions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const BRANCH_NAMING = `
# Branch Naming

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.

When creating a new branch, prefix it with \`posthog-code/\` (e.g. \`posthog-code/fix-login-redirect\`).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Instruction duplicated, not moved

The PR description says this is a move, but the identical posthog-code/ prefix instruction still exists in agent-server.ts:1621 (the auto-PR branch). Now both prompts carry it, violating OnceAndOnlyOnce. The line in agent-server.ts that reads 1. Create a new branch prefixed with \posthog-code/` (e.g. `posthog-code/fix-login-redirect`) based on the work doneshould be simplified to remove the redundant prefix hint and just say e.g.1. Create a new branch based on the work done` (relying on the global instruction for the naming convention).

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/agent/src/adapters/claude/session/instructions.ts
Line: 6

Comment:
**Instruction duplicated, not moved**

The PR description says this is a *move*, but the identical `posthog-code/` prefix instruction still exists in `agent-server.ts:1621` (the auto-PR branch). Now both prompts carry it, violating OnceAndOnlyOnce. The line in `agent-server.ts` that reads `1. Create a new branch prefixed with \`posthog-code/\` (e.g. \`posthog-code/fix-login-redirect\`) based on the work done` should be simplified to remove the redundant prefix hint and just say e.g. `1. Create a new branch based on the work done` (relying on the global instruction for the naming convention).

How can I resolve this? If you propose a fix, please make it concise.

`;

const PLAN_MODE = `
Expand Down
Loading