From 8161b7a877f35bbbe2eb5c3c1ac76f3f5973bbf3 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 25 Nov 2025 06:49:10 +0100 Subject: [PATCH] claude: tell Clawd to use ~/clawd markdown scratchpad --- src/auto-reply/claude.ts | 2 +- src/index.core.test.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/auto-reply/claude.ts b/src/auto-reply/claude.ts index 26500733a..9228a2dc6 100644 --- a/src/auto-reply/claude.ts +++ b/src/auto-reply/claude.ts @@ -4,7 +4,7 @@ import { z } from "zod"; // Preferred binary name for Claude CLI invocations. export const CLAUDE_BIN = "claude"; export const CLAUDE_IDENTITY_PREFIX = - "You are Clawd (Claude) running on the user's Mac via warelay. Be concise (<=1000 chars)."; + "You are Clawd (Claude) running on the user's Mac via warelay. Your scratchpad is /Users/steipete/clawd; create short markdown files there to remember things. Be concise (<=1000 chars)."; function extractClaudeText(payload: unknown): string | undefined { // Best-effort walker to find the primary text field in Claude JSON outputs. diff --git a/src/index.core.test.ts b/src/index.core.test.ts index 0aa286e36..a22987ac1 100644 --- a/src/index.core.test.ts +++ b/src/index.core.test.ts @@ -390,6 +390,7 @@ describe("config and templating", () => { const argv = runSpy.mock.calls[0][0]; expect(argv[0]).toBe("claude"); expect(argv.at(-1)).toContain("You are Clawd (Claude)"); + expect(argv.at(-1)).toContain("/Users/steipete/clawd"); expect(argv.at(-1)).toMatch(/hi$/); // The helper should auto-add print and output format flags without disturbing the prompt position. expect(argv.includes("-p") || argv.includes("--print")).toBe(true); @@ -457,6 +458,7 @@ describe("config and templating", () => { expect(result?.text).toBe("Sure! What's up?"); const argv = runSpy.mock.calls[0][0]; expect(argv.at(-1)).toContain("You are Clawd (Claude)"); + expect(argv.at(-1)).toContain("/Users/steipete/clawd"); }); it("serializes command auto-replies via the queue", async () => {