{%- set pe = prompt_engineering if prompt_engineering else {} -%}
{%- set role_list = roles if roles is iterable and roles is not mapping else [] -%}
{%- set role_templates = pe.get('role_templates', {}) -%}
# Prompt Engineering Best Practices

## Effective Prompt Templates

{% for role in role_list[:4] -%}
{%- set code = role.get('code', '') -%}
{%- set name = role.get('name', '') -%}
{%- set tmpl = role_templates.get(code, '[' ~ code ~ '] Please help me with {task description}') -%}
### {{ name }} Discussion
```
{{ tmpl }}
```

{% endfor -%}

### Issue Diagnosis
```
[QA] Encountered issue: {issue description}
Reproduction steps: {steps}
Expected behavior: {expected}
Actual behavior: {actual}
```

## High-Value Prompt Phrases

| Scenario | Prompt Phrase |
|----------|-------------|
| Deep analysis | "Please analyze from the {role} perspective", "What have I not considered?" |
| Solution comparison | "Provide 2-3 solutions and compare pros and cons" |
| Risk assessment | "What is the biggest risk of this approach?" |
| Simplification | "What is the minimum needed for an MVP version?" |
| Future thinking | "If we need to support {X} in the future, what should we prepare now?" |
| Vibe alignment | "Do you understand my intent?", "Let's align our understanding first" |

## Vibe Development Communication Tips

### Avoid saying
- "Write me an XXX" (too direct, skips thinking)
- "Just give me the code" (skips design discussion)

### Recommended
- "I'd like to discuss the design of XXX with you"
- "What issues do you see with this approach?"
- "Let's align our understanding before we start"
- "What's your take on this decision?"
- "Walk me through your thought process"

---
