package executor import ( "strings" "testing" ) func TestPlanningPreamble_ReferencesMCPTools(t *testing.T) { for _, tool := range []string{"ask_user", "report_summary", "spawn_subtask", "record_progress"} { if !strings.Contains(planningPreamble, tool) { t.Errorf("planningPreamble should mention the %q tool", tool) } } } func TestPlanningPreamble_NoFileEscapeHatches(t *testing.T) { for _, marker := range []string{"CLAUDOMATOR_SUMMARY_FILE", "CLAUDOMATOR_QUESTION_FILE"} { if strings.Contains(planningPreamble, marker) { t.Errorf("planningPreamble should no longer reference %s", marker) } } } func TestPlanningPreamble_AskUserEndsTurn(t *testing.T) { if !strings.Contains(planningPreamble, "end your turn") { t.Error("planningPreamble should instruct the agent to end its turn after ask_user") } } func TestPlanningPreamble_GitDiscipline_ForbidsAbsolutePaths(t *testing.T) { if !strings.Contains(planningPreamble, "do NOT use absolute paths") { t.Error("planningPreamble should warn agents not to use absolute paths in git commands") } } func TestWithPlanningPreamble_PrependsToInstructions(t *testing.T) { got := withPlanningPreamble("DO THE THING") if !strings.HasPrefix(got, planningPreamble) || !strings.HasSuffix(got, "DO THE THING") { t.Error("withPlanningPreamble should prepend the preamble to the instructions") } }