You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/agent/src/adapters/claude/session/instructions.ts
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -32,5 +32,16 @@ If an MCP tool call is explicitly denied with a message, relay that denial messa
32
32
If an MCP tool call returns an error, treat it as a normal tool error — troubleshoot, retry, or inform the user about the specific error. Do NOT assume it is a permissions issue and do NOT direct the user to any settings page.
33
33
`;
34
34
35
+
constSHELL_EFFICIENCY=`
36
+
# Shell Efficiency
37
+
38
+
Optimize for the fewest shell round trips.
39
+
40
+
- Batch related commands into one Bash invocation using \`&&\` (e.g. \`npm run typecheck && npm run lint && npm test\`).
41
+
- Emit all independent tool calls in the same response.
42
+
- Read multiple files at once.
43
+
- Never rerun a command solely to reproduce output you already have.
Copy file name to clipboardExpand all lines: packages/agent/src/server/agent-server.ts
+13-5Lines changed: 13 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2665,6 +2665,14 @@ When you mention a pull request in any reply or summary, always hyperlink it to
2665
2665
(e.g. a Markdown link like [#123](https://github.com/org/repo/pull/123)) rather than plain
2666
2666
text, so readers can open it directly.`;
2667
2667
2668
+
constshellEfficiencyInstructions=`
2669
+
## Shell efficiency
2670
+
Optimize for the fewest shell round trips.
2671
+
- Batch related commands into one Bash invocation using \`&&\` (e.g. \`npm run typecheck && npm run lint && npm test\`).
2672
+
- Emit all independent tool calls in the same response.
2673
+
- Read multiple files at once.
2674
+
- Never rerun a command solely to reproduce output you already have.`;
2675
+
2668
2676
constwhyContextInstruction=` - Add a brief **Why** to the body — one or two sentences capturing the reason the user asked for this change (the motivation, not a restatement of the diff). Keep it short.`;
2669
2677
constpublicRepoSafetyInstruction=` - **Public-repo safety.** Treat the target repository as public-readable unless you have verified otherwise. The PR title, description, and commit messages must not contain private operational scale (exact event counts, internal row volumes, customer-usage percentages), customer names / emails / companies, references to internal tickets or incidents, the contents of Slack threads (do not quote or paraphrase what was said), or unreleased roadmap details. Linking to the originating Slack thread is fine and encouraged — Slack links are auth-gated and useful as context — as are channel references like "raised in #team-foo". Describe findings qualitatively ("present on nearly all X events, absent from Y") rather than with quantitative figures pulled from analytics queries — the reasoning that uses those numbers can stay in the thread; the PR copy cannot.`;
2670
2678
// Slack- and inbox-originated PRs are attributed to PostHog, not the
@@ -2691,7 +2699,7 @@ Do the requested work, but stop with local changes ready for review.
2691
2699
Important:
2692
2700
- Do NOT create new commits, push to the branch, or update the pull request unless the user explicitly asks.
2693
2701
- Do NOT create a new branch or a new pull request.
Copy file name to clipboardExpand all lines: packages/workspace-server/src/services/agent/agent.ts
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -605,7 +605,14 @@ When creating pull requests, add the following footer at the end of the PR descr
605
605
*Created with [PostHog Code](https://posthog.com/code?ref=pr)*
606
606
\`\`\`
607
607
608
-
When you mention a pull request in any reply or summary, always hyperlink it to its full URL (e.g. a Markdown link like [#123](https://github.com/org/repo/pull/123)) rather than plain text, so readers can open it directly.`;
608
+
When you mention a pull request in any reply or summary, always hyperlink it to its full URL (e.g. a Markdown link like [#123](https://github.com/org/repo/pull/123)) rather than plain text, so readers can open it directly.
609
+
610
+
## Shell efficiency
611
+
Optimize for the fewest shell round trips.
612
+
- Batch related commands into one Bash invocation using \`&&\` (e.g. \`npm run typecheck && npm run lint && npm test\`).
613
+
- Emit all independent tool calls in the same response.
614
+
- Read multiple files at once.
615
+
- Never rerun a command solely to reproduce output you already have.`;
0 commit comments