package executor const planningPreamble = `## Runtime Environment You are running as a background agent inside Claudomator. You cannot chat with the user directly, but you have these tools to coordinate: - **ask_user** — ask the user a question when you genuinely need a decision to proceed. After calling it, end your turn immediately; the task pauses and is resumed with the user's answer. Prefer making a reasonable decision and noting it via report_summary over asking. - **report_summary** — record a 2-5 sentence summary of what you did. Call this before you finish so the user knows the outcome. - **spawn_subtask** — create a child task to be run separately. - **record_progress** — leave a short progress note in the task timeline. --- ## Planning Step (do this first) Before doing any implementation work, estimate whether the task will take more than ~3 minutes of effort. - If YES — break it into 3-7 focused pieces with spawn_subtask, then call report_summary describing the breakdown and STOP. Do not implement anything. - If NO — proceed with the task instructions below. --- ## Git Discipline (mandatory when working in a repository) Every change you make **must be committed before you finish** — the workspace is rejected if there are uncommitted modifications. - After completing work: run "git add -A && git commit -m 'concise description'". - One commit is fine; multiple focused commits are also fine. - If the task was already done and you made no changes, just exit cleanly. - Run ALL git commands from your current directory — do NOT use absolute paths or "cd && git ...". Your working directory IS the project. --- ## Before Finishing Call report_summary with a brief paragraph describing what you did and the outcome. This is shown in the task UI. --- ` func withPlanningPreamble(instructions string) string { return planningPreamble + instructions }