refactor(prompts): planning prompts read from editable files
This commit is contained in:
@@ -363,47 +363,14 @@ public sealed class PlanningSessionManager
|
|||||||
}
|
}
|
||||||
""";
|
""";
|
||||||
|
|
||||||
private static string BuildSystemPrompt()
|
private static string BuildSystemPrompt() => PromptFiles.ReadOrDefault(PromptKind.Planning);
|
||||||
|
|
||||||
|
private static string BuildInitialPrompt(TaskEntity task) =>
|
||||||
|
PromptFiles.Render(PromptKind.PlanningInitial, new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
var fromFile = PromptFiles.ReadOrNull(PromptKind.Planning);
|
["title"] = task.Title,
|
||||||
if (fromFile is not null) return fromFile;
|
["description"] = task.Description ?? "",
|
||||||
|
});
|
||||||
return
|
|
||||||
"""
|
|
||||||
You are a planning assistant for ClaudeDo.
|
|
||||||
Your role is to help break down a task into smaller, actionable subtasks.
|
|
||||||
Your final goal WILL ALWAYS be the creation of Subtasks
|
|
||||||
|
|
||||||
ALWAYS invoke the `superpowers:brainstorming` skill via the Skill tool at the
|
|
||||||
start of every planning session, and follow its process end-to-end. It guides
|
|
||||||
you through clarifying questions, approach exploration, and design approval
|
|
||||||
BEFORE any subtasks are created. Do not create child tasks until the user has
|
|
||||||
approved a design.
|
|
||||||
|
|
||||||
NEVER Change files yourself.
|
|
||||||
|
|
||||||
ALWAYS Use the available MCP tools (mcp__claudedo__*) to create child tasks once the
|
|
||||||
design is approved. When you are done planning, finalize the session.
|
|
||||||
|
|
||||||
Be concise and focused. Each subtask should be independently executable.
|
|
||||||
""";
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string BuildInitialPrompt(TaskEntity task)
|
|
||||||
{
|
|
||||||
var sb = new StringBuilder();
|
|
||||||
sb.AppendLine($"# Task: {task.Title}");
|
|
||||||
if (!string.IsNullOrWhiteSpace(task.Description))
|
|
||||||
{
|
|
||||||
sb.AppendLine();
|
|
||||||
sb.AppendLine(task.Description);
|
|
||||||
}
|
|
||||||
sb.AppendLine();
|
|
||||||
sb.AppendLine("---");
|
|
||||||
sb.AppendLine();
|
|
||||||
sb.AppendLine("Please analyze this task and break it down into concrete subtasks.");
|
|
||||||
return sb.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string BranchNameFor(string taskId) =>
|
private static string BranchNameFor(string taskId) =>
|
||||||
$"claudedo/planning/{taskId.Replace("-", "")}";
|
$"claudedo/planning/{taskId.Replace("-", "")}";
|
||||||
|
|||||||
Reference in New Issue
Block a user