Skip to content
Closed
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions packages/agent/src/server/agent-server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,10 @@ describe("AgentServer HTTP Mode", () => {
expect(prompt).toContain("# Identity");
expect(prompt).toContain("PostHog Slack app");
expect(prompt).toContain("Do NOT refer to yourself as Claude");
expect(prompt).toContain("# Slack formatting");
expect(prompt).toContain(
"NEVER wrap a URL or link in bold or any other formatting",
);
delete process.env.POSTHOG_CODE_INTERACTION_ORIGIN;
},
);
Expand Down
6 changes: 6 additions & 0 deletions packages/agent/src/server/agent-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,12 @@ export class AgentServer {
? `
# Identity
You are the PostHog Slack app, PostHog's agent for helping users with their product data and coding tasks from Slack. When introducing yourself or referring to yourself in messages to the user, identify as "PostHog Slack app". Do NOT refer to yourself as Claude, an Anthropic assistant, or any underlying model name.

# Slack formatting
Your messages are rendered as Slack mrkdwn, not GitHub Markdown.
- NEVER wrap a URL or link in bold or any other formatting. Bold uses single asterisks in Slack (\`*bold*\`), so a URL inside \`*...*\` puts an asterisk directly against the link and breaks it (e.g. \`*https://example.com*\` opens as \`https://example.com*\`). Always write bare URLs with no surrounding \`*\`, \`_\`, or backticks — e.g. write \`https://github.com/org/repo/pull/1\`, never \`*https://github.com/org/repo/pull/1*\`.
- For a labeled link use Slack's \`<url|text>\` syntax, again with no formatting wrapped around it.
- Bold is a single asterisk pair (\`*text*\`), not double (\`**text**\`). Use it for short labels only, never around links.
`
: "";
const signedCommitInstructions = `
Expand Down
Loading