260322:1648 Correct Coresspondence / Doing RFA / Correct CI
CI Pipeline / build (push) Failing after 12m41s
Build and Deploy / deploy (push) Failing after 2m44s

This commit is contained in:
admin
2026-03-22 16:48:12 +07:00
parent e5deedb42e
commit 11984bfa29
683 changed files with 105251 additions and 29068 deletions
+102 -3
View File
@@ -1,11 +1,14 @@
# 🚀 Ultimate Prompt Library for Software Engineering
AI Prompt Library สำหรับการพัฒนา Software แบบครบวงจร ตั้งแต่การวางแผนโปรเจกต์ การออกแบบ UX/UI การพัฒนาระบบ ไปจนถึงการ Deploy และ Optimize ใน Production
[ชื่อโปรเจกต์] = LCBP3-DMS (Laem Chabang Port Phase 3 - Document Management System)
---
## 🧭 1. Strategy & Product Planning
### 🟡 Product Owner 🟢 Basic
วิเคราะห์เป้าหมายธุรกิจและกำหนด MVP
**Prompt**
@@ -13,12 +16,14 @@ AI Prompt Library สำหรับการพัฒนา Software แบบ
ให้คุณรับบทเป็น Product Owner สำหรับโปรเจกต์ **[ชื่อโปรเจกต์]**
ช่วยวิเคราะห์:
- เป้าหมายธุรกิจ
- กลุ่มผู้ใช้งานหลัก
- ปัญหาที่ผู้ใช้เจอ
- โอกาสทางตลาด
Output format (ตอบเป็น Markdown):
1. System goals
2. Target users
3. User pain points
@@ -30,6 +35,7 @@ Output format (ตอบเป็น Markdown):
---
### 🔵 Business Analyst 🟡 Intermediate
แตก Requirement อย่างละเอียด
**Prompt**
@@ -41,6 +47,7 @@ Context จาก Product Owner:
[วาง Output จาก Product Owner Prompt ที่นี่]
วิเคราะห์:
- Functional requirements
- Non-functional requirements (Performance / Security / Scalability)
- User roles และ permission matrix
@@ -50,11 +57,13 @@ Context จาก Product Owner:
- Assumptions / Open questions
Constraints:
- ตอบเป็น Markdown
- ใช้ภาษาที่ Developer เข้าใจได้ทันที
- ระบุ priority (P0/P1/P2) ทุก requirement
Output:
- Feature list พร้อม priority
- MVP scope
- Roadmap
@@ -70,6 +79,7 @@ Output:
ให้คุณรับบทเป็น AI Project Manager
Context:
- โปรเจกต์: [ชื่อโปรเจกต์]
- ทีม: [Frontend / Backend / DevOps / QA จำนวนคนแต่ละฝ่าย]
- Timeline รวม: [กี่สัปดาห์/เดือน]
@@ -83,9 +93,11 @@ Output (ตอบเป็น Markdown table):
| Phase | Description | Deliverables | Dependency | Duration | Definition of Done |
พร้อมสร้าง:
- Risk register (Top 5 risks + mitigation)
- Sprint breakdown (ถ้าใช้ Scrum)
- Milestone checklist
---
## 🎨 2. UX / UI & Information Architecture
@@ -106,11 +118,13 @@ Context โปรเจกต์:
[วาง Product Owner Output ที่นี่]
Output (ตอบเป็น Markdown):
- User personas (3 แบบ พร้อม quote จำลอง)
- User journey map (ตาม persona หลัก)
- Pain points แยกตาม journey stage
- UX opportunities พร้อม priority
- Accessibility considerations (WCAG 2.1)
---
### 🟢 Information Architect 🟢 Basic
@@ -126,6 +140,7 @@ User personas:
[วาง UX Researcher Output ที่นี่]
Output (ตอบเป็น Markdown):
- Primary navigation (max 7 items)
- Secondary navigation
- Sitemap (แบบ tree structure)
@@ -136,6 +151,7 @@ Output (ตอบเป็น Markdown):
---
### 🔴 UX/UI Designer 🟡 Intermediate
ออกแบบหน้าเว็บ
**Prompt**
@@ -152,6 +168,7 @@ Sitemap context:
[วาง IA Output ที่นี่]
Output (ตอบเป็น Markdown):
- Page structure และ section order พร้อมเหตุผล
- UI components list (แต่ละ section)
- Color palette (Hex code) + Typography guideline
@@ -181,6 +198,7 @@ Constraints:
Team skill: [Tech stack ที่ทีมถนัด]
Requirements:
- รองรับผู้ใช้ [จำนวน] concurrent users
- Expected growth: [x เท่าใน y ปี]
- Budget: [Cloud budget/month]
@@ -191,6 +209,7 @@ Thought Process Requirement:
ก่อนสรุปผล ให้คุณทำ Trade-off Analysis โดยเปรียบเทียบแนวทางที่เป็นไปได้ 2-3 แนวทาง (เช่น Monolith vs Microservices หรือ RDBMS vs NoSQL) วิเคราะห์ข้อดี-ข้อเสียในมุมของ Latency, Cost และ Maintenance พร้อมระบุเหตุผลที่คุณเลือกแนวทางสุดท้าย
Output (ตอบเป็น Markdown):
- System architecture overview
- Component diagram (text-based)
- Decision Log: เหตุผลเบื้องหลังการเลือก Tech stack
@@ -213,6 +232,7 @@ Output (ตอบเป็น Markdown):
ออกแบบ Integration สำหรับระบบ [ชื่อระบบ]
ระบบที่ต้องเชื่อมต่อ:
- [ระบบ A: เช่น Payment Gateway]
- [ระบบ B: เช่น CRM]
- [ระบบ C: เช่น ERP]
@@ -221,6 +241,7 @@ Solution Architecture:
[วาง Architect Output ที่นี่]
Output (ตอบเป็น Markdown):
- Integration pattern ที่เลือก (Sync / Async / Event-driven) พร้อมเหตุผล
- API strategy (REST / GraphQL / gRPC)
- Webhook design
@@ -245,6 +266,7 @@ Integration context:
[วาง Integration Architect Output ที่นี่]
Output (ตอบเป็น Markdown):
- Endpoint list (Method / Path / Description / Auth required)
- Request/Response schema (JSON format พร้อม example)
- Authentication strategy (JWT / OAuth2 / API Key)
@@ -270,6 +292,7 @@ Tech stack: [ระบุ เช่น Next.js / Node.js / PostgreSQL / Redis]
Architecture context: [วาง Solution Architect Output]
Constraints:
- ใช้ TypeScript เท่านั้น
- ต้องมี error handling ทุก layer
- Reasoning: อธิบายเหตุผลในการวาง Folder Structure และการเลือก Library เสริม
@@ -277,6 +300,7 @@ Constraints:
- ห้าม hardcode credentials ทุกกรณี
Output (ตอบเป็น Markdown):
- System architecture
- Folder structure (monorepo / polyrepo)
- Database schema & Migration guide
@@ -285,9 +309,11 @@ Output (ตอบเป็น Markdown):
- Development steps (เรียงตาม dependency)
- Environment variables list
- Getting started guide
---
### ♻️ Refactoring & Modernization 🔴 Advanced (New!)
ปรับปรุงคุณภาพโค้ดเก่าให้เป็น Modern Code
**Prompt**
@@ -301,10 +327,12 @@ Context:
เป้าหมาย: [เช่น เปลี่ยนจาก JS เป็น TS / ลด Complexity / เพิ่ม Performance]
Output:
- Code Smells Identification: ระบุจุดที่เป็นปัญหาและ Technical Debt
- Refactoring Strategy: อธิบายขั้นตอนการแก้ไขทีละ Step
- Refactored Code: โค้ดเวอร์ชันใหม่ที่ Clean, Readable และมี Type Safety
- Verification Plan: วิธีการ Test เพื่อยืนยันว่าระบบยังทำงานได้ถูกต้อง 100%
---
### 🔹 Frontend Developer 🟡 Intermediate
@@ -322,6 +350,7 @@ API context:
[วาง API Architect Output ที่นี่]
Constraints:
- Responsive: mobile-first (breakpoint: sm/md/lg/xl)
- Accessibility: WCAG 2.1 AA (aria-label, keyboard nav, color contrast)
- State management: [Zustand / Redux / Context API]
@@ -331,11 +360,13 @@ Constraints:
- ใช้ TypeScript พร้อม strict mode
Output (ตอบเป็น Markdown + Code):
- Component tree diagram
- Props interface (TypeScript)
- โค้ดทุก component พร้อม comment อธิบาย logic
- Custom hooks ที่ใช้
- Unit test เบื้องต้น (React Testing Library)
---
### 🔸 Backend Developer 🟡 Intermediate
@@ -353,6 +384,7 @@ API & Schema context:
[วาง API Architect + Database Designer Output ที่นี่]
Constraints:
- ใช้ TypeScript / typed language
- Input validation ทุก endpoint (Zod / Joi / Pydantic)
- Error handling แบบ centralized
@@ -360,14 +392,17 @@ Constraints:
- ห้าม SQL injection (ใช้ ORM หรือ parameterized query)
Output (ตอบเป็น Markdown + Code):
- API design (Method / Path / Auth / Validation rules)
- Middleware list
- Auth system (JWT flow diagram)
- Database schema (SQL หรือ ORM model)
- โค้ด service layer พร้อม error handling
---
### 🔍 Code Reviewer 🟡 Intermediate
ตรวจสอบคุณภาพโค้ด
**Prompt**
ให้คุณรับบทเป็น Senior Code Reviewer
@@ -377,6 +412,7 @@ Review โค้ดด้านล่างนี้อย่างละเอ
[วางโค้ดที่ต้องการ review]
วิเคราะห์ตาม:
- Clean Code (naming / function size / complexity)
- SOLID Principles
- Security vulnerabilities (OWASP Top 10)
@@ -389,9 +425,11 @@ Output format (ตอบเป็น Markdown table):
| # | Issue | Severity (Critical/High/Medium/Low) | Location | Suggested Fix |
พร้อม:
- Overall score (1-10)
- Top 3 สิ่งที่ต้องแก้ทันที
- Refactored code snippet (เฉพาะส่วนที่มีปัญหาหนัก)
---
## 🧠 5. AI & Automation
@@ -414,6 +452,7 @@ Latency requirement: [เช่น < 2 วินาที]
Data sensitivity: [มี PII หรือไม่]
Output (ตอบเป็น Markdown):
- AI use cases พร้อม ROI estimation
- Model selection (OpenAI / Claude / Gemini / Open-source) พร้อมเหตุผล
- Build vs Buy analysis
@@ -442,6 +481,7 @@ Context:
Model: [เช่น GPT-4o / Claude 3.5 / Gemini 2.0]
Output (ตอบเป็น Markdown):
- Prompt template (พร้อม placeholder)
- Few-shot examples (3-5 ตัวอย่าง)
- System instruction
@@ -449,6 +489,7 @@ Output (ตอบเป็น Markdown):
- Guardrails และ safety instructions
- Testing strategy สำหรับ prompt
- Version history และ optimization notes
---
##🧪 RAG System Designer 🔴 Advanced
@@ -459,16 +500,19 @@ Output (ตอบเป็น Markdown):
ออกแบบ RAG pipeline สำหรับ [use case เช่น Document QA / Customer Support Bot]
Data sources:
- [เช่น PDF documents / Database / Web pages]
- ปริมาณ: [จำนวน documents / ขนาด]
- Update frequency: [Real-time / Daily / Static]
Requirements:
- ภาษา: [Thai / English / Both]
- Latency: [< x วินาที]
- Accuracy requirement: [เช่น ห้าม hallucinate fact สำคัญ]
Output (ตอบเป็น Markdown):
- RAG architecture diagram (text-based)
- Chunking strategy (size / overlap / method)
- Embedding model selection พร้อมเหตุผล
@@ -478,9 +522,11 @@ Output (ตอบเป็น Markdown):
- Prompt template สำหรับ generation
- Evaluation metrics (Faithfulness / Relevance / Groundedness)
- Cost estimation
---
### 🎯 AI Evaluation Engineer 🔴 Advanced
วัดและปรับปรุงคุณภาพ AI
**Prompt**
ให้คุณรับบทเป็น AI Evaluation Engineer
@@ -492,6 +538,7 @@ Model ที่ใช้: [GPT-4 / Claude / etc.]
Output format: [Text / JSON / Classification]
Output (ตอบเป็น Markdown):
- Evaluation metrics ที่เหมาะสม (Accuracy / F1 / BLEU / custom)
- Test dataset design (จำนวน / distribution / edge cases)
- Hallucination detection strategy
@@ -500,9 +547,11 @@ Output (ตอบเป็น Markdown):
- Monitoring dashboard metrics
- Threshold สำหรับ alert เมื่อ quality ตก
- Human-in-the-loop strategy
---
### 🔄 Automation Engineer 🟡 Intermediate
ออกแบบ Workflow Automation
**Prompt**
ให้คุณรับบทเป็น Automation Engineer
@@ -514,6 +563,7 @@ Trigger events: [อธิบาย]
Integration context: [วาง Integration Architect Output]
Output (ตอบเป็น Markdown):
- Workflow diagram (text-based step flow)
- Trigger events และ conditions
- Data transformation logic
@@ -521,9 +571,11 @@ Output (ตอบเป็น Markdown):
- Dead letter queue strategy
- Monitoring และ alerting
- Estimated execution time per workflow
---
### 🧪 RAG System Designer 🔴 Advanced
ออกแบบระบบ Retrieval-Augmented Generation อย่างแม่นยำ
**Prompt**
@@ -532,14 +584,17 @@ Output (ตอบเป็น Markdown):
Data sources: [ระบุแหล่งข้อมูล]
Zero-Hallucination Guardrails:
- ออกแบบกลไกการตรวจสอบ Source Citation
- กำหนดเกณฑ์ Confidence Score สำหรับคำตอบ
Output:
- Chunking strategy (size / overlap)
- Embedding & Vector DB selection
- Retrieval strategy (Semantic / Hybrid / Re-ranking)
- Hallucination Mitigation Plan: วิธีการลดการมโนของ AI
---
## 🗄️ 6. Data & Database
@@ -554,6 +609,7 @@ Output:
ออกแบบฐานข้อมูลสำหรับระบบ [ชื่อระบบ]
Requirements:
- Database type: [Relational / NoSQL / Both]
- Expected data volume: [rows/documents]
- Query patterns: [อธิบาย query ที่ใช้บ่อย]
@@ -563,6 +619,7 @@ Business requirements:
[วาง BA Output ที่นี่]
Output (ตอบเป็น Markdown):
- Entity Relationship Diagram (text-based)
- Tables / Collections พร้อม fields ครบ
- Primary key / Foreign key / Indexes
@@ -591,6 +648,7 @@ Analytics needs: [Real-time / Batch / Both]
Team: [Data Engineer / Analyst มีหรือไม่]
Output (ตอบเป็น Markdown):
- Data architecture diagram (Lambda / Kappa / Data Lakehouse)
- Data pipeline design
- Data warehouse / Data lake design
@@ -599,6 +657,7 @@ Output (ตอบเป็น Markdown):
- Data governance basics (ownership / lineage)
- Tool recommendations พร้อมเหตุผล
- Cost estimation
---
## ☁️ 7. DevOps & Infrastructure
@@ -618,6 +677,7 @@ Architecture context: [วาง Solution Architect Output]
Team size: [จำนวน developer]
Output (ตอบเป็น Markdown + Config):
- Infrastructure as Code (Terraform / Pulumi outline)
- Docker setup (Dockerfile + docker-compose.yml)
- CI/CD pipeline (GitHub Actions / GitLab CI)
@@ -627,6 +687,7 @@ Output (ตอบเป็น Markdown + Config):
- Environment variable management (Vault / AWS Secrets Manager)
- Backup strategy (frequency / retention / restore procedure)
- Zero-downtime deployment strategy
---
### ⚙️ Site Reliability Engineer 🔴 Advanced
@@ -644,6 +705,7 @@ Architecture context:
SLA requirement: [เช่น 99.9% uptime]
วิเคราะห์:
- Scalability (Load test scenarios)
- Single points of failure
- Monitoring & Observability (Metrics / Logs / Traces)
@@ -652,7 +714,8 @@ SLA requirement: [เช่น 99.9% uptime]
- Disaster recovery plan (RTO / RPO targets)
- Chaos engineering recommendations
- On-call rotation suggestion
Output: Production Readiness Checklist (ตอบเป็น Markdown checkbox)
Output: Production Readiness Checklist (ตอบเป็น Markdown checkbox)
---
## 🛡️ 8. Security & QA
@@ -676,6 +739,7 @@ Test Cases Table:
| # | Test Case | Scenario | Steps | Expected Result | Priority |
พร้อม:
- Boundary value test cases
- Negative test cases
- Edge cases
@@ -701,6 +765,7 @@ Architecture context:
Compliance requirement: [PDPA / GDPR / PCI-DSS ถ้ามี]
ตรวจสอบตาม:
- OWASP Top 10 (2021)
- Authentication & Authorization flaws
- Input validation & Injection attacks
@@ -715,9 +780,11 @@ Output (ตอบเป็น Markdown):
| Risk | OWASP Category | Severity | Likelihood | Mitigation |
พร้อม:
- Security checklist ก่อน go-live
- Penetration testing scope
- Security monitoring recommendations
---
## 🚨 9. Incident Response
@@ -732,6 +799,7 @@ Output (ตอบเป็น Markdown):
จัดการ Incident สำหรับระบบ [ชื่อระบบ]
Incident description:
- อาการ: [อธิบายอาการที่พบ]
- เวลาเริ่มต้น: [timestamp]
- Impact: [กี่ user ได้รับผลกระทบ]
@@ -743,26 +811,30 @@ System context:
Output (ตอบเป็น Markdown):
**Immediate Actions (0-15 นาที):**
- [ ] ...
**Investigation Steps:**
- Root cause analysis checklist
- Log queries ที่ควร run
- Metrics ที่ควรดู
**Post-mortem Template:**
- Timeline of events
- Root cause
- Contributing factors
- Impact summary
- Action items (What / Who / When)
- Prevention measures
---
## 📈 10. Optimization
### ⚡ Performance Engineer 🟡 Intermediate
เพิ่มประสิทธิภาพระบบ
**Prompt**
ให้คุณรับบทเป็น Performance Engineer
@@ -770,6 +842,7 @@ Output (ตอบเป็น Markdown):
วิเคราะห์และปรับปรุง Performance ของระบบ [ชื่อระบบ]
Current metrics:
- Response time: [ms]
- Throughput: [req/s]
- Error rate: [%]
@@ -779,6 +852,7 @@ Architecture context:
[วาง Solution Architect Output]
Output (ตอบเป็น Markdown):
- Bottleneck analysis (Frontend / Backend / Database / Network)
- Caching strategy (Redis / CDN / Browser cache)
- Database query optimization
@@ -787,9 +861,11 @@ Output (ตอบเป็น Markdown):
- Load testing plan (k6 / JMeter scenarios)
- Performance budget targets
- Quick wins vs Long-term improvements
---
### 💰 Cloud Cost Optimizer 🟡 Intermediate
ลด Cloud Cost
**Prompt**
ให้คุณรับบทเป็น Cloud Cost Optimization Specialist
@@ -797,12 +873,14 @@ Output (ตอบเป็น Markdown):
วิเคราะห์และลด Cloud cost สำหรับระบบ [ชื่อระบบ]
Current setup:
- Cloud provider: [AWS / GCP / Azure]
- Current monthly cost: [$x]
- Services ที่ใช้: [List]
- Traffic pattern: [เช่น Peak hours / 24/7]
Output (ตอบเป็น Markdown):
- Cost breakdown analysis (service by service)
- Right-sizing recommendations
- Reserved vs On-demand vs Spot instance strategy
@@ -812,6 +890,7 @@ Output (ตอบเป็น Markdown):
- Storage tier strategy (Hot / Warm / Cold)
- Estimated savings หลังปรับปรุง
- Implementation priority (Quick wins ก่อน)
---
### 🔎 SEO Specialist 🟢 Basic
@@ -831,6 +910,7 @@ Primary market: [ประเทศ / ภาษา]
Competitors: [ระบุถ้ามี]
Output (ตอบเป็น Markdown):
- Keyword clusters (Primary / Secondary / Long-tail)
- Content structure recommendations
- Technical SEO checklist
@@ -840,10 +920,13 @@ Output (ตอบเป็น Markdown):
- Core Web Vitals targets
- Internal linking strategy
- Content calendar outline (3 เดือนแรก)
---
## 📖 11. Documentation
### 📝 Technical Writer 🟢 Basic
สร้างเอกสารที่อ่านง่ายและใช้งานได้จริง
**Prompt**
@@ -856,6 +939,7 @@ Target audience: [Developer / End User / Both]
Format: [Markdown / Confluence / Notion]
Output (ตอบเป็น Markdown):
- Project overview : อธิบายคุณค่าของโปรเจกต์ใน 1 ย่อหน้า
- Architecture summary
- Prerequisites
@@ -866,6 +950,7 @@ Output (ตอบเป็น Markdown):
- Troubleshooting Guide: รวบรวม Top 5 common issues และวิธีแก้ไข
- Contributing guide
- Changelog template
---
## ⭐ Master Prompt (AI Dev Team)
@@ -875,6 +960,7 @@ Output (ตอบเป็น Markdown):
**Prompt**
ให้คุณรับบทเป็นทีม Software Development (PO, Architect, Developer, SRE, Security) ทำงานแบบ Chain of Thought โดยแต่ละ Role จะต้องส่งต่อ Decision Log (เหตุผลการตัดสินใจ) ให้ Role ถัดไป
ประกอบด้วย:
- Product Owner (วิเคราะห์ Business)
- Solution Architect (ออกแบบระบบ)
- Senior Developer (พัฒนา Frontend + Backend)
@@ -885,6 +971,7 @@ Output (ตอบเป็น Markdown):
**โปรเจกต์:** [ชื่อระบบ]
**Context:**
- อุตสาหกรรม: [ระบุ]
- ขนาดทีมจริง: [จำนวนคน]
- Timeline: [ระบุ]
@@ -896,32 +983,44 @@ Output (ตอบเป็น Markdown):
ระบุชัดเจนว่าแต่ละ Role กำลัง "รับ" อะไรและ "ส่งต่อ" อะไร
**Output ที่ต้องการ (ตอบเป็น Markdown พร้อม section header ชัดเจน):**
- ทุก Role ต้องวิเคราะห์ Trade-offs ก่อนสรุปผล
- ห้าม Hallucinate หากข้อมูลไม่พอให้ถามกลับ
- เน้นความปลอดภัย (Security-first) และการบำรุงรักษา (Maintainability)
### 1. [Product Owner] System Overview
- Goals / Users / Pain points / MVP scope
### 2. [Architect] Architecture Design
- Tech stack / Component diagram / Data flow
### 3. [Architect] Database Design
- Schema / Relationships / Indexes
### 4. [Architect] API Design
- Endpoints / Auth / Error handling
### 5. [Developer] Development Roadmap
- Phase / Sprint breakdown / Definition of Done
### 6. [QA] Testing Plan
- Test strategy / Test cases สำคัญ / Automation plan
### 7. [DevOps] Deployment Plan
- CI/CD / Infrastructure / Monitoring
### 8. [Security] Security Review
- Top risks / Mitigation / Pre-launch checklist
```
---
```