Goal၊ Context၊ Constraints နဲ့ Output format ပါသော coding prompt တစ်ခု တည်ဆောက်မည်။
ခဏလေး ဒီလိုပဲ စဉ်းစားကြည့်
ကောင်းတဲ့ coding prompt မှာ အပိုင်းလေးခုရှိပါတယ်။ Goal — ဘာဖြစ်ရမလဲ။ Context — ဘယ် stack၊ ဘယ် file၊ ဘယ်ပုံစံလိုက်ရမလဲ။ Constraints — မသုံးရတဲ့ library၊ မဖျက်ရတဲ့ API၊ accessibility။ Output — ဘယ် file ပြင်၊ ဘာပြန်ရှင်းပြ။ “ရေးပေး” တစ်လုံးတည်းက AI ကို မှန်းခိုင်းပါတယ်။ မှန်းတာများလေ ပြင်ရတာများလေပါ။
နေ့စဉ်ဘဝနဲ့ ချိတ်ကြည့်မယ်
မကောင်းတဲ့ prompt: “Navbar လုပ်ပါ”။ ကောင်းတဲ့ prompt: “Next.js App Router၊ Tailwind၊ mobile မှာ hamburger၊ desktop မှာ Tutorials/Search links၊ 44px touch target၊ existing Header.tsx ကိုသာပြင်၊ အသစ် library မထည့်။ ပြီးရင် ဘာပြင်သလဲ စာကြောင်း ၃ ကြောင်းရှင်းပြ။” ဒီလိုရေးရင် AI က ဖိုင်မှားမဖွင့်တတ်၊ design system ကို မချိုးတတ်အောင် ပိုနီးစပ်ပါတယ်။
အတူတူ လက်တွေ့စမ်းမယ်
Goal: Add a lesson complete checkbox that persists in localStorage.
Context: React client component, key = tutorialSlug/lessonSlug.
Constraints: no new dependencies, 44px target, no cookies.
Output: edit LessonCompleteToggle.tsx only + say how to test it.ကူးယူအသုံးပြုနိုင်သော coding prompt ပုံစံတစ်ခု ရေးနိုင်မည်။၅ မိနစ် စမ်းကြည့်
ကိုယ်လုပ်မည့် feature တစ်ခုအတွက် Goal / Context / Constraints / Output ပါအောင် prompt ရေးပါ။ မကောင်းတဲ့ဗားရှင်းနဲ့ ယှဉ်ပြပါ။
သတိလေးတစ်ချက်
AI output ကို အပြီးသတ်အမှန်လို့မယူပါနှင့်။ Code၊ secret နှင့် user data ကို လူကပြန်ဖတ်၊ စမ်းပြီးမှ သုံးပါ။