بنقرة واحدة
agent-orchestration
กำหนด Auto Plan Mode, Research Agent workflow และโครงสร้าง multi-agent team สำหรับงานขนาดใหญ่
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
กำหนด Auto Plan Mode, Research Agent workflow และโครงสร้าง multi-agent team สำหรับงานขนาดใหญ่
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Pre/Post execution validation + Phase Gate enforcement — ป้องกันการข้าม step, auto-validate output, ให้คะแนน quality score
สแกน code ใน Scaffold/ ด้วย 53 security rules (6 หมวด) — secrets, permissions, injection, AI-specific, config, dependencies — ก่อน deploy หรือหลัง Dev report
Coordinate PM/Dev/QA agents แบบ Pipeline Pattern — auto-route งานตาม role, ส่งต่ออัตโนมัติเมื่อ status เปลี่ยน, track progress ทุก handoff
Create color-coded teaching scripts / presenter talking-point documents (.md) that serve as a "live reading book" for speakers. The output is a markdown file where each color tells the presenter what to do: blue = speak this line, red = pronunciation guide, dark blue = slide header, black = stage direction & audience engagement, yellow box = terminology. Use this skill whenever the user mentions: teaching script, talking points, presenter script, key talking point, speaker notes, lecture script, training script, presentation script, สคริปต์การสอน, สคริปต์วิทยากร, คำพูดที่ต้องอ่าน, หนังสือสำหรับพูด, or any request to create a document that guides a speaker through a slide deck with exact words to say, pronunciation help, and stage directions. Also trigger when the user uploads a PowerPoint (.pptx) and asks to write a script, narration, or talking points for it.
Use for QA evidence, release readiness, rollback review, and close-out decisions.
Use for build completion evidence, code review readiness, and ready-for-QA checks.
| name | Agent Orchestration |
| description | กำหนด Auto Plan Mode, Research Agent workflow และโครงสร้าง multi-agent team สำหรับงานขนาดใหญ่ |
Related Skills: None (self-contained).
This skill covers Auto Plan Mode, Research Agent, and Agent Team structure for Claude Code PMO workflows.
Every task that requires planning or creating output - Claude must enter Plan Mode automatically without waiting for the user to ask.
| Task Type | Examples |
|---|---|
| Create new Diagram | Activity Diagram, Use Case Diagram |
| Create new Task Breakdown | Task Breakdown, Gantt Chart |
| Modify existing Diagram/Task | Update flow, add cases, change timeline |
| Analyze MOM/REQ to create output | Read MOM then create diagram or task breakdown |
| Multi-file impact tasks | New feature requiring diagram + use case + task breakdown updates |
| Task Type | Examples |
|---|---|
| Simple Q&A | Explain syntax, answer format questions |
| Read and summarize | Read MOM and summarize (no output created) |
| Minor edits | Fix typo, change color, fix syntax error |
EnterPlanMode immediately, announce: "Entering Plan Mode to plan before starting"When unsure about requirement, business logic, terminology, or any information - send a Sub-agent to research from internet, but always let the user verify before using the data.
| Situation | Examples |
|---|---|
| Uncertain terminology | Business terms, industry standards, unfamiliar abbreviations |
| Business logic needs reference | Related laws, compliance standards (PDPA, PCI-DSS), industry best practices |
| Technical validation | 3rd party API specs, standard formats (ISO date, currency code) |
| Process reference | Standard processes of similar systems, industry flows (KYC, payment) |
| MOM/REQ unclear | Requirement too broad, need reference to propose approach |
Prohibition: Never automatically include internet data in output - must wait for user confirmation every time.
For tasks requiring comprehensive work, create a team of related Agents and assign Sub-agents to write or research in parallel - 1 team has 1-10 members with PMO Lead (main Claude) as team leader. ทุก Sub-agent ต้องได้รับ Persona prompt — ดูไฟล์ใน
personas/folder
ลีด (Lead) — Main Claude, Team Leader
+-- อันนาลิส (Analyst) -> ขุด MOM/REQ, หา gap, cross-check Transcription
+-- อาร์คิเทค (Architect) -> ออกแบบ workflow, วาง flow structure
+-- ไรท์เตอร์ (Writer) -> เขียน diagram, wireframe, task breakdown
+-- รีวิว (Reviewer) -> ตรวจ output ด้วย checklist ครบทุกข้อ
+-- ซีเคียว (Security) -> ตรวจ fraud, compliance, business logic risk
| Persona | Role | Persona File | subagent_type |
|---|---|---|---|
| ลีด (Lead) | Team Leader — วางแผน, แบ่งงาน, review, merge | personas/lead.md | Main Claude (ไม่ spawn) |
| อันนาลิส (Analyst) | MOM/REQ Analyst — อ่าน source, หา gap/conflict | personas/analyst.md | general-purpose |
| อาร์คิเทค (Architect) | Workflow Architect — ออกแบบ flow structure | personas/architect.md | general-purpose |
| ไรท์เตอร์ (Writer) | Diagram/Wireframe Writer — สร้าง output | personas/writer.md | general-purpose |
| รีวิว (Reviewer) | Quality Reviewer — ตรวจ checklist 20+7+7 | personas/reviewer.md | general-purpose |
| ซีเคียว (Security) | Security Reviewer — ตรวจ fraud/compliance | personas/security.md | general-purpose |
Researcher ไม่มี persona แยก — ใช้ persona ใดก็ได้ที่เหมาะกับงาน (เช่น อันนาลิส research MOM, อาร์คิเทค research workflow pattern) Code Explorer ใช้ subagent_type
Explore— persona ตาม context
เมื่อ spawn sub-agent ต้องใส่ persona context ใน prompt:
คุณคือ {ชื่อ} ({Role}) ในทีม PMO
{เนื้อหาจาก personas/{name}.md — บุคลิก + ความรับผิดชอบ + สิ่งที่ห้ามทำ}
## งานที่ได้รับ
{Task description จาก Lead}
## Context
{MOM/REQ data, findings จาก agent ก่อนหน้า, constraints}
## Expected Output
{รูปแบบ output ที่ต้องการ}
## Handoff Format
เมื่อทำเสร็จ ให้ส่งผลในรูปแบบ Handoff Report (ดูด้านล่าง)
ทุก sub-agent ต้อง return ผลในรูปแบบ Handoff Report เพื่อให้ Lead ส่งต่อให้ agent ถัดไปได้
## Handoff Report
- **จาก:** {ชื่อ persona} ({Role})
- **ถึง:** ลีด (Lead) → ส่งต่อให้ {ชื่อ persona ถัดไป}
- **งาน:** {สรุปสิ่งที่ทำ}
- **ผลลัพธ์:** {output / findings / ไฟล์ที่สร้าง}
- **REQ ที่เกี่ยว:** {REQ-XXX, REQ-XXX}
- **MOM# ที่อ้างอิง:** {MOM#X, MOM#X}
- **ข้อควรระวัง:** {conflicts, gaps, risks ที่เจอ — ถ้าไม่มีใส่ "ไม่มี"}
- **สถานะ:** {Done / Needs Clarification / Blocked}
Lead ต้องทำเมื่อได้รับ Handoff:
Task: Create Activity Diagram + Use Case Diagram + Task Breakdown for new Module
ลีด (Lead)
+-- อันนาลิส (Analyst) -> อ่าน MOM + REQ + Transcription ของ Module นี้
+-- อาร์คิเทค (Architect) -> ออกแบบ workflow spec จาก findings ของอันนาลิส
+-- ไรท์เตอร์ (Writer) x2 -> เขียน SystemFlow + UseCase จาก spec ของอาร์คิเทค
+-- รีวิว (Reviewer) -> ตรวจ output ทั้งหมดด้วย checklist 20+7+7
+-- ซีเคียว (Security) -> ตรวจ business logic risk ของ Module นี้
Handoff Chain:
อันนาลิส → ลีด(review) → อาร์คิเทค → ลีด(review) → ไรท์เตอร์ → ลีด(review) → รีวิว + ซีเคียว → ลีด(merge) → User
อ้างอิง OMC critic agent — เพิ่มการตรวจสอบจาก "มุมมองที่ท้าทาย" ก่อน finalize output สำคัญ ใช้กับ: project ที่มี stakeholders หลายฝ่าย, complex business logic, หรือก่อน Dev Handoff
| สถานการณ์ | ใช้ Critic? |
|---|---|
| สร้าง diagram ปกติ | ไม่ (ใช้ Reviewer ตามปกติ) |
| Diagram ที่เกี่ยวกับ Payment/KYC/Compliance | ใช่ |
| ก่อน Dev Handoff ของ project ซับซ้อน | ใช่ |
| Stakeholders > 3 ฝ่ายที่อาจขัดแย้ง | ใช่ |
| Plan ที่กระทบ > 5 modules | ใช่ |
| PM ขอ "review ให้ละเอียดหน่อย" | ใช่ |
Critic ต้องตรวจ 5 มุมมอง:
| # | มุมมอง | คำถามที่ต้องตอบ |
|---|---|---|
| 1 | Executor View | "ถ้าเป็น Dev ที่ได้ spec นี้ จะเขียน code ได้เลยไหม? มีอะไรคลุมเครือ?" |
| 2 | Stakeholder View | "ลูกค้า/PM/QA จะมีข้อโต้แย้งอะไรกับ output นี้?" |
| 3 | Skeptic View | "อะไรอาจผิดพลาดได้? มี assumption ที่อาจไม่จริง?" |
| 4 | Completeness View | "มี requirement ไหนที่ขาดไป? มี edge case ที่ไม่ได้คิด?" |
| 5 | Consistency View | "output นี้ขัดแย้งกับ output อื่นใน project ไหม?" |
Critic ต้องคิด failure scenarios ก่อน finalize:
## Pre-mortem Analysis
**Module:** {Module Name} | **Critic:** AI
| # | Failure Scenario | Likelihood | Impact | ป้องกันอย่างไร | มีใน flow แล้ว? |
|---|-----------------|:---:|:---:|-------------|:---:|
| 1 | User กรอกข้อมูลไม่ครบแล้วกด submit | H | M | Frontend validation + Backend validation | Y/N |
| 2 | Server timeout ระหว่าง payment processing | M | H | Idempotency key + retry mechanism | Y/N |
| 3 | Admin approve ซ้ำ 2 ครั้ง (race condition) | L | H | Optimistic locking | Y/N |
Critic Verdict:
| Verdict | ความหมาย | Action |
|---|---|---|
| ACCEPT | Output ดี ไม่มีปัญหาสำคัญ | Proceed to finalize |
| ACCEPT-WITH-RESERVATIONS | OK แต่มีจุดที่ควรระวัง | Proceed + log reservations |
| REVISE | มีจุดที่ต้องแก้ก่อน finalize | แก้แล้ว run Critic อีกรอบ |
| REJECT | ปัญหาร้ายแรง ต้อง rethink approach | กลับไป plan ใหม่ |
Spawn Critic เป็น sub-agent (Opus model):
คุณคือ Critic ในทีม PMO — หน้าที่คือท้าทายและตรวจสอบ output ก่อน finalize
ห้ามให้ feedback แบบอ่อน ต้อง critical challenge:
- ตรวจ 5 มุมมอง (Executor/Stakeholder/Skeptic/Completeness/Consistency)
- ทำ Pre-mortem Analysis (3-7 scenarios)
- ให้ Verdict (ACCEPT/ACCEPT-WITH-RESERVATIONS/REVISE/REJECT)
Output ที่ต้อง review:
{แนบ output ที่ต้อง review}
Context:
{MOM/REQ references, SystemFlow ที่เกี่ยวข้อง}
อ้างอิง OMC ralplan skill — iterative planning loop สำหรับ decisions ที่มีผลกระทบสูง ใช้กับ: architectural decisions, flow structure ที่กระทบหลาย modules, ก่อนเริ่ม project ใหม่ที่ซับซ้อน
| สถานการณ์ | Planning แบบปกติ | Ralplan |
|---|---|---|
| สร้าง diagram ใหม่ 1 module | Y | - |
| สร้าง diagram ที่กระทบ > 5 modules | - | Y |
| เลือก architecture pattern | - | Y |
| เปลี่ยน flow structure ที่มีอยู่ | - | Y |
| Project ใหม่ที่ซับซ้อน (> 10 modules) | - | Y |
| PM พูดว่า "วางแผนให้ละเอียดหน่อย" | - | Y |
อันนาลิส (ดู MOM/REQ)
↓
อาร์คิเทค (สร้าง Plan + ADR)
↓
Critic (ท้าทาย + Pre-mortem)
↓
[ผ่าน?] → YES → Present to User → Execute
↓ NO
อาร์คิเทค (ปรับ Plan ตาม Critic feedback)
↓
Critic (review อีกรอบ)
↓
... (loop max 3 รอบ ถ้ายัง REJECT → escalate ให้ PM ตัดสินใจ)
เมื่อ consensus สำเร็จ สร้าง Decision Record:
## Ralplan Decision — {Topic}
**Date:** YYYY-MM-DD | **Consensus Rounds:** {N}/3
### Principles (สิ่งที่ยึด)
1. {หลักการ 1 — เช่น "source-driven, ห้าม Gold Plate"}
2. {หลักการ 2 — เช่น "minimal impact ต่อ modules ที่ finalize แล้ว"}
3. {หลักการ 3}
### Decision Drivers (ปัจจัยตัดสินใจ)
1. {ปัจจัย 1 — เช่น "Timeline 2.5 เดือน"}
2. {ปัจจัย 2 — เช่น "ลูกค้า confirm 3 phase"}
3. {ปัจจัย 3}
### Options Considered
| # | Option | Pros | Cons | Effort |
|---|--------|------|------|:---:|
| 1 | {ทางเลือก A} | {ข้อดี} | {ข้อเสีย} | S/M/L |
| 2 | {ทางเลือก B} | {ข้อดี} | {ข้อเสีย} | S/M/L |
### Decision
{สิ่งที่เลือก + เหตุผล}
### Critic Findings
{สิ่งที่ Critic ท้าทาย + วิธีที่ตอบ}
### Follow-up Actions
1. {Action 1}
2. {Action 2}
กฎ: Ralplan Decision ต้อง log ใน Decision Log (Traceability Matrix) ด้วย โดยใส่ ADR Note แนบ
อ้างอิง OMC team skill — staged pipeline สำหรับงานขนาดใหญ่ที่ต้องการ formal handoff ระหว่าง stage ใช้กับ: สร้าง diagrams ทั้ง project, Dev Handoff Package, multi-module review
Stage 1: PLAN → อันนาลิส + อาร์คิเทค สร้าง plan
↓ [Handoff: plan-handoff.md]
Stage 2: SPEC → อันนาลิส สร้าง requirement spec
↓ [Handoff: spec-handoff.md]
Stage 3: EXECUTE → ไรท์เตอร์ สร้าง output (diagrams/wireframes/handoff)
↓ [Handoff: exec-handoff.md]
Stage 4: VERIFY → รีวิว + ซีเคียว ตรวจ output (Verification Tiers)
↓ [Handoff: verify-handoff.md]
Stage 5: FIX → ไรท์เตอร์ แก้ไขตาม feedback (loop กับ Stage 4)
↓ [max 3 fix loops]
→ Present to User
ทุก stage transition ต้องสร้าง Handoff Document:
## Stage Handoff: {Stage Name}
**Date:** YYYY-MM-DD | **From:** {Persona} | **To:** {Next Persona}
### Decided
- {สิ่งที่ตัดสินใจแล้วใน stage นี้}
### Rejected
- {สิ่งที่พิจารณาแล้วตัดออก + เหตุผล}
### Risks
- {ความเสี่ยงที่เจอ + mitigation}
### Files Created/Modified
| File | Action | Status |
|------|--------|--------|
| {filename} | Created/Updated | Draft/Final |
### Remaining Work
- {สิ่งที่ stage ถัดไปต้องทำ}
### Blockers (ถ้ามี)
- {สิ่งที่ block ต้องรอ user/ลูกค้า}
| รอบ | Action |
|---|---|
| Fix 1 | แก้ตาม Reviewer feedback ทั้งหมด |
| Fix 2 | แก้ issues ที่เหลือ + Critic review |
| Fix 3 | แก้ครั้งสุดท้าย — ถ้ายัง FAIL → escalate ให้ PM ตัดสินใจ |
ห้าม loop เกิน 3 รอบ — ถ้าแก้ 3 รอบแล้วยังไม่ผ่าน แสดงว่า plan มีปัญหา ต้องกลับไป Stage 1
| งาน | วิธี |
|---|---|
| สร้าง 1 diagram | ทำปกติ (ไม่ต้อง pipeline) |
| สร้าง 2-3 diagrams ใน module เดียว | ทำปกติ + review |
| สร้าง diagrams ทั้ง project (> 5 modules) | Team Pipeline |
| Dev Handoff Package | Team Pipeline |
| Impact Analysis จาก MOM ใหม่ที่กระทบ > 5 modules | Team Pipeline |
| PM ขอ "ทำให้ครบทั้ง project" | Team Pipeline |
Lead ต้อง track state ของ pipeline:
## Pipeline Status — P{XX}-{CODE}
| Stage | Status | Persona | Started | Completed | Handoff |
|-------|:---:|---------|---------|-----------|---------|
| PLAN | Done | อาร์คิเทค | HH:MM | HH:MM | plan-handoff.md |
| SPEC | Done | อันนาลิส | HH:MM | HH:MM | spec-handoff.md |
| EXECUTE | In Progress | ไรท์เตอร์ | HH:MM | — | — |
| VERIFY | Pending | รีวิว | — | — | — |
| FIX | Pending | ไรท์เตอร์ | — | — | — |
Pipeline state ไม่ต้อง persist ข้าม session — ใช้ activity log ใน Traceability Matrix ดูย้อนหลังได้