idea-merge
สร้างไอเดีย merge หรือ consolidate สิ่งทีซ้ำซ้อนตาม context
SKILL.mdidea-merge/SKILL.md
GitHubGoal
สร้างไอเดียการ merge หรือ consolidate สิ่งทีซ้ำซ้อนให้เป็นหน่วยเดียว โดย context-aware และ continuous numbering
Scope
ใช้เมื่อต้องการวิเคราะห์ว่าควร merge อะไรเข้าด้วยกัน:
- files, skills, folders, workflows, configs
- code modules, libraries, services
- หรือ repository artifacts ใด ๆ ทีซ้ำซ้อน
ไม่ลงมือ execute merge — ส่งต่อ /merge ต่อเมื่อได้ไอเดียและ user confirm
Execute
1. Analyze Context
Goal: รวบรวม context ก่อนสร้างไอเดีย merge
- ระบุ target จาก argument หรือ context ปัจจุบัน
- ถ้า target เป็น repo/โฟลเดอร → ทำ
/scan-codebase - ถ้า target เป็น skills → ทำ
/review-devin-global-harnessหรือ/review-devin-global-harness - อ่านไฟล์/artifacts ของแต่ละ candidate เพื่อเปรียบเทียบ Goal, Scope, Execute
- ตรวจสอบ line counts, references, และ section overlap
2. Identify Merge Candidates
Goal: ระบุคู่หรือกลุ่มทีควร merge
- ระบุสิ่งทีมี description, purpose, หรือ behavior ทับซ้อน
- ระบุสิ่งทีอยู่ในกลุ่มเดียวกันและถูกเรียกใช้คู่กันบ่อย
- ระบุสิ่งทีอ้างถึงกันอย่างหนาแน่น (references, imports, calls)
- ระบุสิ่งทีมี line count น้อยและเป็นส่วนย่อยของสิ่งทีใหญ่กว่า
- ระบุ spelling inconsistencies หรือชื่อทีควร rename พร้อม merge
3. Evaluate Merge Options
Goal: ประเมินวิธีทีเหมาะสม
- ประเมินแต่ละ opportunity ตามเงื่อนไข:
merge— ถ้าซ้ำซ้อนหรือ changes togetherrename— ถ้าชื่อผิดหรือไม่สื่อความหมายkeep— ถ้า cohesion สูงและไม่มี benefit ชัดเจน
- ทำ
/dont-over-engineerเพื่อกรองไอเดียทีซับซ้อนเกินไป - พิจารณา target (ตัวรับ) และ source(s) (ตัวทีจะลบ/ยุบ)
- ตรวจสอบว่า merged output จะไม่เกิน 250 บรรทัด/จำกัดทีกำหนด
4. Plan Merge Strategy
Goal: วางแผนการ merge สำหรับแต่ละคู่/กลุ่ม
- ระบุ target และ source(s) ชัดเจน
- ระบุ sections, files, หรือ config ทีจะย้าย
- ระบุ references, imports, links ทีต้องอัปเดต
- วางแผนการลบ source หลัง merge เสร็จ
- ระบุลำดับการ merge ถ้ามีหลายคู่
5. Generate Ideas
Goal: สร้างไอเดีย merge แบบ actionable
- สร้างไอเดียสำหรับแต่ละ opportunity
- ใช้ continuous numbering ต่อจากไอเดียเดิมถ้ามี
- ระบุ scope:
quick win,short-term,long-term - ระบุ impact, effort และ action:
merge,rename,keep - ระบุ target, source(s), และสิ่งทีจะย้าย
6. Report
Goal: รายงานไอเดียและ next action
- ทำ
/report table - คอลัมน์: No., Source(s), Target, Issue, Idea, Action, Scope, Impact, Effort
- จัดลำดับตาม impact/effort ratio
- ถ้ามี action ต่อเนื่องจาก idea ก่อนหน้า → ใช้
/follow-your-suggestion - ทำ
/suggest-next-action - ถ้าพร้อม execute → แนะนำให้ทำ
/mergeหรือ/rename
Rules
1. Context-Aware
- ไม่จำกัดเฉพาะ files หรือ skills — รองรับทุก artifact ตาม context
- ระบุประเภทของ target และ source ในแต่ละไอเดีย
- ใช้
/ask-meถ้า target ไม่ชัด - ใช้
/follow-single-of-sourceถ้าจำเป็น
2. Evidence-Based
- ทุกไอเดียต้องมาจาก analysis จริง
- ระบุ file path, skill name, section overlap, หรือ references ทีเกี่ยวข้อง
- อ้างอิง line counts, duplicates, หรือ description overlap
3. Actionable And Numbered
- ใช้ continuous numbering
- ระบุ action ชัดเจน:
merge,rename,keep - ระบุ target, source(s), และเนื้อหาทีจะย้าย
4. No Over-Engineering
- ไม่เสนอ merge ทีไม่มี benefit ชัดเจน
- ไม่ merge เพื่อลดจำนวนอย่างเดียว
- ทำ
/dont-over-engineer
5. Line Count Safety
- ตรวจสอบว่า merged output จะไม่เกิน 250 บรรทัด
- ถ้าเกิน → แนะนำ trim หรือ split ก่อน merge
- ระบุ estimated line count หลัง merge
Expected Outcome
- รายการไอเดีย merge แบบ continuous numbering
- ทุกไอเดียมี source(s), target, action, scope, impact, effort
- ตาราง
/reportพร้อม next action - ไอเดียพร้อม execute ด้วย
/merge