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
Remove the always-on behavioral-guidelines block: it was opinionated, general
coding philosophy hardcoded as an unconfigurable product default, and unproven.
In a codebase built for pluggable, per-user/per-repo guidance (plugins +
customInstructions), a hardcoded system-prompt default is the least-flexible
home for it. Restores instructions.ts to just the operational harness rules.
Generated-By: PostHog Code
Task-Id: 2cfc5453-0307-4c67-a6eb-6456bc96cf1a
Copy file name to clipboardExpand all lines: packages/agent/src/adapters/claude/session/instructions.ts
+1-26Lines changed: 1 addition & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -26,29 +26,4 @@ If an MCP tool call is explicitly denied with a message, relay that denial messa
26
26
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.
27
27
`;
28
28
29
-
// Behavioral guidelines adapted from the Karpathy guidelines
These bias toward caution over speed; for trivial tasks, use judgment.
35
-
36
-
## Think before coding
37
-
38
-
Don't assume, don't hide confusion, surface tradeoffs. Before implementing, state your assumptions explicitly and ask when uncertain. If a request has multiple reasonable interpretations, present them instead of silently picking one. If a simpler approach exists, say so and push back when warranted. If something is unclear, stop and name what is confusing.
39
-
40
-
## Keep it simple
41
-
42
-
Write the minimum code that solves the problem; nothing speculative. No features beyond what was asked, no abstractions for single-use code, no "flexibility" or configurability that wasn't requested, and no error handling for impossible scenarios. If you write 200 lines and it could be 50, rewrite it. Ask yourself whether a senior engineer would call this overcomplicated — if so, simplify.
43
-
44
-
## Make surgical changes
45
-
46
-
Touch only what you must; clean up only your own mess. When editing existing code, don't "improve" adjacent code, comments, or formatting, and don't refactor things that aren't broken. Match the existing style even if you would do it differently. If you notice unrelated dead code, mention it — don't delete it. Remove only the imports, variables, and functions that YOUR changes made unused; leave pre-existing dead code unless asked. Every changed line should trace directly to the request.
47
-
48
-
## Drive to verifiable goals
49
-
50
-
Turn tasks into verifiable success criteria and loop until they are met: "add validation" becomes "write tests for invalid inputs, then make them pass"; "fix the bug" becomes "write a test that reproduces it, then make it pass." For a multi-step task, state a brief plan with a verification check for each step. Strong success criteria let you work independently; weak ones ("make it work") force constant clarification.
0 commit comments