ให้ AI แจกแจงขอบเขตผลกระทบก่อนแก้โค้ด
A ready-to-use “การเขียนโปรแกรม” AI prompt template, designed and tested with Zed. Replace the (bracketed) parts below with your own needs.
Prompt template
ฉันต้องการแก้โค้ดนี้: (วางโค้ด หรือ path ไฟล์และข้อกำหนด) ก่อนที่คุณจะแตะอะไร ทำแค่สิ่งเดียว — แจกแจงขอบเขตผลกระทบ: 1) การแก้นี้แตะไฟล์และฟังก์ชันใดบ้าง 2) มีที่ไหนที่เรียกใช้มันซึ่งอาจพังหลังแก้ 3) เทสต์ครอบคลุมตรรกะนี้หรือไม่ ถ้าไม่ ควรเพิ่มกรณีใด 4) มีแนวทางทางเลือกที่เล็กกว่าและเสี่ยงน้อยกว่าหรือไม่ **อย่าเพิ่งเขียนโค้ดใด ๆ** — รอจนฉันยืนยันขอบเขต หากต้องเห็นไฟล์บางไฟล์เพื่อตัดสิน ให้บอกว่าไฟล์ไหน — อย่าเดา ตอบเป็นภาษาไทยแบบที่คนไทยใช้
How to use this prompt
- Copy the whole prompt above and paste it into Zed or ChatGPT / Claude / Gemini.
- Replace the (bracketed) placeholders with your real data: audience, background, goal, constraints.
- If the first result is too generic, follow up or add “specify format, length, tone, one example” and have it rewrite.
Recommended tool: Zed — High-performance, AI-powered code editor.