diff --git a/packages/coding-agent/src/prompts/system/project-prompt.md b/packages/coding-agent/src/prompts/system/project-prompt.md index a08d45783..f5033d137 100644 --- a/packages/coding-agent/src/prompts/system/project-prompt.md +++ b/packages/coding-agent/src/prompts/system/project-prompt.md @@ -7,14 +7,14 @@ PROJECT {{#if contextFiles.length}} - + You MUST follow the context files below for all tasks: {{#each contextFiles}} {{content}} {{/each}} - + {{/if}} {{#if agentsMdSearch.files.length}} diff --git a/packages/coding-agent/src/session/snapcompact-inline.ts b/packages/coding-agent/src/session/snapcompact-inline.ts index 7345053c1..0ecac2a60 100644 --- a/packages/coding-agent/src/session/snapcompact-inline.ts +++ b/packages/coding-agent/src/session/snapcompact-inline.ts @@ -85,7 +85,7 @@ interface SystemPromptImageTarget { } const CONTEXT_SECTION_PATTERNS = [ - /\n[\s\S]*?\n<\/context>/g, + /\n[\s\S]*?\n<\/repo-rules>/g, /## Context\n\n[\s\S]*?\n<\/instructions>/g, ] as const; diff --git a/packages/coding-agent/test/snapcompact-inline.test.ts b/packages/coding-agent/test/snapcompact-inline.test.ts index 0a30d61d4..c6ed34c3e 100644 --- a/packages/coding-agent/test/snapcompact-inline.test.ts +++ b/packages/coding-agent/test/snapcompact-inline.test.ts @@ -273,7 +273,7 @@ describe("SnapcompactInlineTransformer", () => { const longContext = denseText(3000); const context: Context = { systemPrompt: [ - `Core instructions.\n\n\nYou MUST follow the context files below for all tasks:\n\n${longContext}\n\n\n\nToday is 2026-06-12.`, + `Core instructions.\n\n\nYou MUST follow the context files below for all tasks:\n\n${longContext}\n\n\n\nToday is 2026-06-12.`, "Final system block.", ], messages: [userMessage("do the thing")],