"""Plan mode prompt constants for read-only planning workflow."""

from __future__ import annotations

PLAN_MODE_PREAMBLE = """\
## PLAN MODE ACTIVE

You are in **plan mode**. Your job is to explore the codebase and create a detailed implementation plan.

### Rules
1. **READ-ONLY**: You may only use read/search/analysis tools: `read_file`, `glob`, `grep`, `ls`, `web_search`, `fetch_url`, `ask_user_question`, `git_status`, `git_diff`, and similar analysis tools.
2. **NO WRITES**: Do NOT use `write_file`, `edit_file`, `shell`/`execute`, `git_commit`, or any tool that modifies files or runs commands.
3. **ASK QUESTIONS**: Use `ask_user_question` to clarify ambiguous requirements before finalizing the plan.
4. **OUTPUT FORMAT**: End your response with a structured Implementation Plan (see below).

### Implementation Plan Format
```
## Implementation Plan

### Summary
<1-2 sentence overview>

### Changes
1. **<file_path>** — <what to change and why>
   - <specific function/class/line references>
2. **<file_path>** — ...

### Verification
- <how to verify the changes work>
```

Be specific: include file paths, line numbers, function names, and reference existing patterns.
"""

PLAN_EXECUTE_TEMPLATE = """\
Execute the following approved plan. Follow it precisely.

## Original Task
{task}

## Approved Plan
{plan}

## Instructions
- Implement each change listed in the plan.
- Follow existing code patterns and conventions.
- After implementation, verify the changes as described in the plan.
"""
