> ## Documentation Index
> Fetch the complete documentation index at: https://docs.embedder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# बेस्ट प्रैक्टिसेस

यह पेज Embedder से लगातार बेहतर परिणाम पाने के लिए practical guidelines देता है।

सबसे बड़ा फैक्टर है **session length**। बहुत लंबा सेशन होने पर context noise बढ़ता है और accuracy गिर सकती है। इसलिए session को focused रखें।

## 1) Verifiable prompts लिखें

<Tip>
  Prompt में expected output, test command, और success criteria दें।
</Tip>

अच्छे prompts में ये चीज़ें हों:

* क्या बदलना है
* कौन-सी फाइलें बदलनी हैं
* किस तरह verify करना है
* failure होने पर root cause fix करना है

उदाहरण:

| तरीका        | कमजोर prompt                | बेहतर prompt                                                                     |
| ------------ | --------------------------- | -------------------------------------------------------------------------------- |
| Verification | "sensor read function बनाओ" | "`read_temperature()` बनाओ; `0x0190` पर `25.0°C` लौटना चाहिए; unit tests जोड़ो।" |
| Root cause   | "build फेल हो रहा है"       | "यह error है: \[paste]. root cause ठीक करो, error suppress मत करो।"              |

## 2) पहले Plan, फिर Act

<Tip>
  जटिल बदलावों में Plan mode से analysis करके Act mode में implementation करें।
</Tip>

<Steps>
  <Step title="Explore">
    संबंधित फाइलें और architecture समझें।
  </Step>

  <Step title="Plan">
    step-by-step plan और test strategy बनवाएँ।
  </Step>

  <Step title="Implement">
    Plan के अनुसार बदलाव करें और build/test चलाएँ।
  </Step>

  <Step title="Commit">
    स्पष्ट commit message और PR बनवाएँ।
  </Step>
</Steps>

## 3) Context को specific रखें

* `@` से फाइलें reference करें
* constraints साफ लिखें
* existing patterns बताएं
* scope सीमित रखें

## 4) `EMBEDDER.md` को lean रखें

<Tip>
  `/init` से शुरुआत करें, फिर file को छोटा और relevant रखें।
</Tip>

`EMBEDDER.md` में केवल project-specific बातें रखें:

* build/test commands
* coding rules
* environment quirks
* common pitfalls

बहुत लंबी `EMBEDDER.md` से जरूरी rules दब जाते हैं।

## 5) Session hygiene

* unrelated tasks के बीच `/clear`
* लंबे सेशन में `/compress`
* previous work उठाने के लिए `/history`
* गलत दिशा पर `/undo` या `/rewind`

## 6) Subagents का उपयोग

<Tip>
  बड़े investigation काम subagents से करवाएँ ताकि main context साफ रहे।
</Tip>

```txt theme={"system"}
Use subagents to investigate CAN initialization, TX/RX interrupts,
and reusable CAN drivers in this project.
```

## 7) Common pitfalls

* vague prompts
* no acceptance criteria
* context साफ न करना
* बहुत broad exploration

<Tip>
  Scope + constraints + verification, यही best results का सबसे reliable combo है।
</Tip>
