เทมเพลต plan.md
วิธีใช้
หัวข้อที่มีชื่อว่า “วิธีใช้”Copy เทมเพลตด้านล่างไปวางที่ root ของโปรเจคเป็นไฟล์ plan.md แล้วใช้ AI ช่วยเติมรายละเอียด
เทมเพลต
หัวข้อที่มีชื่อว่า “เทมเพลต”# Plan: [ชื่อโปรเจค]
## ภาพรวม (Overview)- **เป้าหมาย:** [อธิบายเป้าหมายของโปรเจค]- **Tech Stack:** [เช่น Next.js 15, TailwindCSS, Prisma, PostgreSQL]- **Target:** [web/mobile/desktop]- **Deadline:** [วันที่]
## โครงสร้างโปรเจค (Project Structure)
project-root/├── src/│ ├── app/ # Routes / Pages│ ├── components/ # Reusable Components│ ├── lib/ # Utilities / Helpers│ ├── hooks/ # Custom Hooks│ ├── types/ # TypeScript Types│ └── styles/ # Global Styles├── tests/│ ├── testcases.md # ไฟล์ Test Case กลาง│ └── unit/ # Unit Tests├── public/ # Static Assets└── plan.md # ไฟล์นี้
## Components
### Component: [ชื่อ Component 1]- **หน้าที่:** [อธิบาย]- **ไฟล์:** `src/components/[ชื่อ].tsx`- **Props/Input:** [รายละเอียด]- **Output:** [รายละเอียด]- **Dependencies:** [component อื่นที่ต้องใช้]
### Component: [ชื่อ Component 2]- **หน้าที่:** [อธิบาย]- **ไฟล์:** `src/components/[ชื่อ].tsx`- **Props/Input:** [รายละเอียด]- **Output:** [รายละเอียด]- **Dependencies:** [component อื่นที่ต้องใช้]
## API Endpoints
### [GET/POST/PUT/DELETE] /api/[endpoint]- **หน้าที่:** [อธิบาย]- **Request Body:** (ถ้ามี) ```json { "field": "type" }- Response:
{ "field": "type" }
- Auth: [ต้อง login หรือไม่]
Data Flow
หัวข้อที่มีชื่อว่า “Data Flow”[อธิบายว่าข้อมูลไหลอย่างไร ตั้งแต่ user input ไปจนถึง database]
- User → [Component A] → [API] → [Database]
- [Database] → [API] → [Component B] → UI
ลำดับการพัฒนา (Implementation Order)
หัวข้อที่มีชื่อว่า “ลำดับการพัฒนา (Implementation Order)”Step 1: [ชื่อ task]
หัวข้อที่มีชื่อว่า “Step 1: [ชื่อ task]”- [รายละเอียด sub-task 1]
- [รายละเอียด sub-task 2]
- ผู้รับผิดชอบ: Dev / Intern
Step 2: [ชื่อ task]
หัวข้อที่มีชื่อว่า “Step 2: [ชื่อ task]”- [รายละเอียด sub-task 1]
- [รายละเอียด sub-task 2]
- ผู้รับผิดชอบ: Dev / Intern
Step 3: [ชื่อ task]
หัวข้อที่มีชื่อว่า “Step 3: [ชื่อ task]”- [รายละเอียด sub-task 1]
- [รายละเอียด sub-task 2]
- ผู้รับผิดชอบ: Dev / Intern
Test Cases เบื้องต้น
หัวข้อที่มีชื่อว่า “Test Cases เบื้องต้น”Feature: [ชื่อฟีเจอร์ 1]
หัวข้อที่มีชื่อว่า “Feature: [ชื่อฟีเจอร์ 1]”| ID | Description | Steps | Expected Result | Priority |
|---|---|---|---|---|
| TC-001 | [ชื่อ test case] | 1. [step] 2. [step] | [ผลที่คาดหวัง] | สูง |
| TC-002 | [ชื่อ test case] | 1. [step] 2. [step] | [ผลที่คาดหวัง] | สูง |
| TC-003 | [ชื่อ test case] | 1. [step] 2. [step] | [ผลที่คาดหวัง] | กลาง |
Feature: [ชื่อฟีเจอร์ 2]
หัวข้อที่มีชื่อว่า “Feature: [ชื่อฟีเจอร์ 2]”| ID | Description | Steps | Expected Result | Priority |
|---|---|---|---|---|
| TC-004 | [ชื่อ test case] | 1. [step] 2. [step] | [ผลที่คาดหวัง] | สูง |
| TC-005 | [ชื่อ test case] | 1. [step] 2. [step] | [ผลที่คาดหวัง] | กลาง |
หมายเหตุ
หัวข้อที่มีชื่อว่า “หมายเหตุ”- [ข้อจำกัด, สิ่งที่ต้องระวัง, technical decisions]
---
## สิ่งที่ plan.md ต้องมีครบ
:::danger[เช็คลิสต์ก่อนส่ง plan.md ให้ PM review]- [ ] ภาพรวมโปรเจค (เป้าหมาย, tech stack)- [ ] โครงสร้างโฟลเดอร์- [ ] รายละเอียด components ทั้งหมด- [ ] API endpoints ทั้งหมด- [ ] Data flow- [ ] ลำดับการพัฒนา พร้อมผู้รับผิดชอบ- [ ] Test cases เบื้องต้น (อย่างน้อย 3 ต่อฟีเจอร์):::
:::tip[เคล็ดลับ]ใช้ Opus 4.6 สร้าง plan.md จะได้ผลลัพธ์ที่ดีกว่า Auto mode เพราะต้องการ reasoning ในการวิเคราะห์โครงสร้าง:::