feat(prompt): focused custom prompt for improvement children so they stay narrow

This commit is contained in:
mika kuns
2026-06-04 16:53:41 +02:00
parent 5d34f95fe0
commit 176b9855bf
3 changed files with 33 additions and 2 deletions

View File

@@ -459,8 +459,13 @@ public sealed class TaskRunner
var systemFile = PromptFiles.ReadOrDefault(PromptKind.System);
// Improvement children (filed via SuggestImprovement; CreatedBy == ParentTaskId) get a
// narrow follow-up prompt so they stay tightly scoped instead of doing "too much".
var isImprovementChild = task.ParentTaskId is not null && task.CreatedBy == task.ParentTaskId;
var improvementPrompt = isImprovementChild ? PromptFiles.ReadOrDefault(PromptKind.ImprovementChild) : null;
var instructions = MergeInstructions(
systemFile, global.DefaultClaudeInstructions, listConfig?.SystemPrompt, task.SystemPrompt);
systemFile, improvementPrompt, global.DefaultClaudeInstructions, listConfig?.SystemPrompt, task.SystemPrompt);
return new ClaudeRunConfig(
Model: task.Model ?? listConfig?.Model ?? global.DefaultModel,