पाठ 24 / 25

केस स्टडी: एक Feature जोड़ना

Assistant के साथ "reminders" feature जोड़ने की प्रक्रिया अनुरोध से merge तक देखें।

Workflow

आप branch बनाते हैं, संबंधित files और project guide साझा करते हैं, और acceptance tests लिखते हैं (या assistant के बनाए tests की समीक्षा करते हैं)। फिर आप छोटे steps में implementation माँगते हैं, हर के बाद tests चलाते हैं। Merge से पहले आप checklist से पूरा diff पढ़ते हैं: क्या सब नए functions मौजूद हैं, क्या edge cases ढके हैं, क्या strings से बनी queries या leak हुए secrets हैं, और क्या कुछ असंबद्ध बदला? अंत में आप commit message ख़ुद लिखते हैं या मसौदा संपादित करते हैं, और pull request की सामान्य इंसानी समीक्षा होती है।

पूरी सहायता वाली feature

अनुशासित workflow संदर्भ, tests, छोटे steps और सावधान review को जोड़ता है।

चार चरण: योजना, test, निर्माण, समीक्षा।
चित्र 8.1 — योजना, test, निर्माण और समीक्षा।

एक पन्ने पर workflow

हर पंक्ति इस कोर्स के एक खंड से जुड़ती है।

1 git switch -c ai/add-reminders                      (Sec 6: isolate)
2 share files + project guide; state constraints         (Sec 2: context)
3 write / review tests first                             (Sec 2, 4: tests)
4 implement in small steps, run tests each time          (Sec 2, 3: steps)
5 review full diff with the checklist                    (Sec 5: review)
6 secrets / licence / policy check                       (Sec 6)
7 human PR review, then merge                            (Sec 7: teams)

त्वरित जाँच: केस स्टडी में tests कब लिखे जाते हैं?

  • Merge के बाद
  • कभी नहीं
  • Implementation से पहले, ताकि सफलता जाँची जा सके
  • सिर्फ़ build विफल हो तो
Answer

Implementation से पहले, ताकि सफलता जाँची जा सके — पहले सफलता परिभाषित करना आपको और agent को जाँचने का साफ़ लक्ष्य देता है।