ข้ามไปยังเนื้อหา

เทมเพลต 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 หรือไม่]

[อธิบายว่าข้อมูลไหลอย่างไร ตั้งแต่ user input ไปจนถึง database]

  1. User → [Component A] → [API] → [Database]
  2. [Database] → [API] → [Component B] → UI
  • [รายละเอียด sub-task 1]
  • [รายละเอียด sub-task 2]
  • ผู้รับผิดชอบ: Dev / Intern
  • [รายละเอียด sub-task 1]
  • [รายละเอียด sub-task 2]
  • ผู้รับผิดชอบ: Dev / Intern
  • [รายละเอียด sub-task 1]
  • [รายละเอียด sub-task 2]
  • ผู้รับผิดชอบ: Dev / Intern
IDDescriptionStepsExpected ResultPriority
TC-001[ชื่อ test case]1. [step] 2. [step][ผลที่คาดหวัง]สูง
TC-002[ชื่อ test case]1. [step] 2. [step][ผลที่คาดหวัง]สูง
TC-003[ชื่อ test case]1. [step] 2. [step][ผลที่คาดหวัง]กลาง
IDDescriptionStepsExpected ResultPriority
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 ในการวิเคราะห์โครงสร้าง
:::