From 34c1bc33f9da536c41f757e388539cf45f35ec5c Mon Sep 17 00:00:00 2001 From: ganesh47 <22994026+ganesh47@users.noreply.github.com> Date: Thu, 23 Apr 2026 10:19:16 +0530 Subject: [PATCH] Harden prompt context by excluding README and AGENTS --- src/prompt.ts | 4 +--- test/prompt.test.ts | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/prompt.ts b/src/prompt.ts index 52c6a98..8c2493a 100644 --- a/src/prompt.ts +++ b/src/prompt.ts @@ -32,9 +32,7 @@ const REPOSITORY_CONTEXT_CANDIDATES = [ "specs/001-plan-alignment/spec.md", "specs/001-plan-alignment/research.md", "sqlite-metadata-system.md", - "docs/project-readme.md", - "AGENTS.md", - "README.md" + "docs/project-readme.md" ]; async function readPromptReferenceFiles(cwd: string, limit = 4): Promise { diff --git a/test/prompt.test.ts b/test/prompt.test.ts index ba2a0da..ec40334 100644 --- a/test/prompt.test.ts +++ b/test/prompt.test.ts @@ -49,6 +49,8 @@ describe("buildBuildPrompt", () => { expect(prompt).toContain("### Patch resilience"); expect(prompt).toContain("If `apply_patch` fails once, do not retry the same hunk unchanged"); expect(prompt).toContain("If the file has mixed line endings, normalize them once before editing"); + expect(prompt).not.toContain("### README.md"); expect(context).toContain("Retry failure hints:"); + expect(context).toContain("Reference files: none"); }); });