From f60becaf06ec958d797d07805c8d54b7142d47c8 Mon Sep 17 00:00:00 2001 From: mika kuns Date: Thu, 4 Jun 2026 16:10:39 +0200 Subject: [PATCH] feat(prompt): instruct agents to offload out-of-scope work via SuggestImprovement --- src/ClaudeDo.Data/PromptFiles.cs | 5 +++++ tests/ClaudeDo.Data.Tests/SystemPromptTests.cs | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/ClaudeDo.Data.Tests/SystemPromptTests.cs diff --git a/src/ClaudeDo.Data/PromptFiles.cs b/src/ClaudeDo.Data/PromptFiles.cs index 4d8d113..005de07 100644 --- a/src/ClaudeDo.Data/PromptFiles.cs +++ b/src/ClaudeDo.Data/PromptFiles.cs @@ -75,6 +75,11 @@ public static class PromptFiles - Prefer three similar lines over a premature abstraction. Don't build for hypothetical future needs. + ## Out-of-scope improvements + If you notice worthwhile work that is genuinely outside this task's scope + (a refactor, a follow-up, tech debt), do NOT do it here. File it with + SuggestImprovement(title, description) and stay focused on the task at hand. + ## Working in the repo - Read a file before editing it. Match the conventions already in this codebase — they override generic defaults. diff --git a/tests/ClaudeDo.Data.Tests/SystemPromptTests.cs b/tests/ClaudeDo.Data.Tests/SystemPromptTests.cs new file mode 100644 index 0000000..32cad1d --- /dev/null +++ b/tests/ClaudeDo.Data.Tests/SystemPromptTests.cs @@ -0,0 +1,15 @@ +using ClaudeDo.Data; +using Xunit; + +namespace ClaudeDo.Data.Tests; + +public class SystemPromptTests +{ + [Fact] + public void SystemDefault_mentions_SuggestImprovement_offload() + { + var prompt = PromptFiles.DefaultFor(PromptKind.System); + Assert.Contains("Out-of-scope improvements", prompt); + Assert.Contains("SuggestImprovement", prompt); + } +}