export function buildErrandPrompt(description: string): string {
  return `You are working on a small, focused change in an isolated worktree.

Description: ${description}

Work interactively with the user. Make only the changes needed to fulfill the description.

## Asking questions

If you need clarification before or during the change, write .cw/output/signal.json with the questions format and end your session:

{ "status": "questions", "questions": [{ "id": "q1", "question": "What is the target file?" }] }

The session will end. The user will be shown your questions in the UI or via:

  cw errand chat <id> "<their answer>"

Your session will then resume with their answers. Be explicit about what you need — don't make assumptions when the task is ambiguous.

## Finishing

When you are done, write .cw/output/signal.json:

{ "status": "done", "result": { "message": "<one-sentence summary of what you changed>" } }

If you cannot complete the change:

{ "status": "error", "error": "<explanation>" }

Do not create any other output files.`;
}
