@warnyin/agents 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/CHANGELOG.md +125 -115
  2. package/README.md +148 -148
  3. package/package.json +38 -38
  4. package/src/.claude/agents/warnyin-infra.md +13 -13
  5. package/src/.claude/agents/warnyin-qa.md +13 -13
  6. package/src/.claude/agents/warnyin-sa.md +13 -13
  7. package/src/.claude/agents/warnyin-security.md +13 -13
  8. package/src/.claude/agents/warnyin-tech-lead.md +13 -13
  9. package/src/.claude/commands/warnyin/build.md +31 -31
  10. package/src/.claude/commands/warnyin/design.md +27 -27
  11. package/src/.claude/commands/warnyin/discovery.md +17 -17
  12. package/src/.claude/commands/warnyin/explore.md +14 -14
  13. package/src/.claude/commands/warnyin/init.md +12 -12
  14. package/src/.claude/commands/warnyin/install-skill.md +14 -14
  15. package/src/.claude/commands/warnyin/next.md +17 -17
  16. package/src/.claude/commands/warnyin/ship.md +28 -28
  17. package/src/.claude/commands/warnyin/triage.md +14 -0
  18. package/src/.claude/commands/warnyin/update-codemaps.md +12 -12
  19. package/src/.claude/commands/warnyin/verify.md +20 -20
  20. package/src/.claude/skills/explore/SKILL.md +8 -8
  21. package/src/.claude/skills/next/SKILL.md +8 -8
  22. package/src/.claude/skills/update-codemaps/SKILL.md +8 -8
  23. package/src/.warnyin/installer/templates/CLAUDE.global.md +5 -0
  24. package/src/.warnyin/installer/templates/CLAUDE.md +34 -29
  25. package/src/.warnyin/template/docs/codemap/index.md +18 -18
  26. package/src/.warnyin/template/docs/features/[feature-name]/business.md +5 -5
  27. package/src/.warnyin/template/docs/features/[feature-name]/feature.md +5 -5
  28. package/src/.warnyin/template/docs/features/[feature-name]/spec.md +16 -16
  29. package/src/.warnyin/template/docs/infra.md +16 -16
  30. package/src/.warnyin/template/docs/project.md +18 -18
  31. package/src/.warnyin/template/docs/rule.md +7 -7
  32. package/src/.warnyin/template/docs/techstack/[component]/about.md +6 -6
  33. package/src/.warnyin/template/docs/techstack/[component]/rule.md +6 -6
  34. package/src/.warnyin/template/docs/techstack/[component]/standard.md +6 -6
  35. package/src/.warnyin/template/docs/techstack/[component]/structure.md +7 -7
  36. package/src/.warnyin/template/docs/techstack/[component]/test.md +7 -7
  37. package/src/.warnyin/template/docs/troubleshooting.md +32 -32
  38. package/src/.warnyin/template/stages/[topic]/build.md +58 -58
  39. package/src/.warnyin/template/stages/[topic]/business.md +21 -21
  40. package/src/.warnyin/template/stages/[topic]/design.md +63 -63
  41. package/src/.warnyin/template/stages/[topic]/discovery.md +69 -69
  42. package/src/.warnyin/template/stages/[topic]/proposal.md +43 -43
  43. package/src/.warnyin/template/stages/[topic]/research.md +49 -49
  44. package/src/.warnyin/template/stages/[topic]/ship.md +32 -32
  45. package/src/.warnyin/template/stages/[topic]/tasks/[task-name]/issue.md +19 -19
  46. package/src/.warnyin/template/stages/[topic]/tasks/[task-name]/rule.md +13 -13
  47. package/src/.warnyin/template/stages/[topic]/tasks/[task-name]/spec.md +36 -36
  48. package/src/.warnyin/template/stages/[topic]/tasks/[task-name]/standard.md +21 -21
  49. package/src/.warnyin/template/stages/[topic]/tasks/[task-name]/task.md +40 -40
  50. package/src/.warnyin/template/stages/[topic]/test.md +46 -46
  51. package/src/.warnyin/template/stages/[topic]/troubleshooting.md +34 -34
  52. package/src/.warnyin/template/stages/[topic]/verify.md +44 -44
  53. package/src/.warnyin/workflow/README.md +102 -101
  54. package/src/.warnyin/workflow/api-doc.md +93 -93
  55. package/src/.warnyin/workflow/codemap.md +91 -91
  56. package/src/.warnyin/workflow/contexts/README.md +51 -51
  57. package/src/.warnyin/workflow/contexts/build.md +25 -25
  58. package/src/.warnyin/workflow/contexts/research.md +25 -25
  59. package/src/.warnyin/workflow/contexts/review.md +25 -25
  60. package/src/.warnyin/workflow/explore.md +32 -32
  61. package/src/.warnyin/workflow/init.md +136 -125
  62. package/src/.warnyin/workflow/next.md +48 -48
  63. package/src/.warnyin/workflow/roles/README.md +47 -47
  64. package/src/.warnyin/workflow/roles/ba.md +25 -25
  65. package/src/.warnyin/workflow/roles/developer.md +31 -31
  66. package/src/.warnyin/workflow/roles/infra.md +24 -24
  67. package/src/.warnyin/workflow/roles/po.md +28 -28
  68. package/src/.warnyin/workflow/roles/qa.md +35 -35
  69. package/src/.warnyin/workflow/roles/sa.md +28 -28
  70. package/src/.warnyin/workflow/roles/security.md +39 -39
  71. package/src/.warnyin/workflow/roles/tech-lead.md +28 -28
  72. package/src/.warnyin/workflow/scripts/build-wave.mjs +143 -143
  73. package/src/.warnyin/workflow/scripts/validate-topic.mjs +378 -378
  74. package/src/.warnyin/workflow/stages/build.md +98 -98
  75. package/src/.warnyin/workflow/stages/design.md +131 -126
  76. package/src/.warnyin/workflow/stages/discovery.md +78 -78
  77. package/src/.warnyin/workflow/stages/ship.md +94 -92
  78. package/src/.warnyin/workflow/stages/verify.md +82 -80
  79. package/src/.warnyin/workflow/triage.md +74 -0
  80. package/src/AGENTS.md +54 -48
  81. package/src/bin/cli.mjs +310 -193
package/README.md CHANGED
@@ -1,148 +1,148 @@
1
- # warnyin-agents
2
-
3
- [![npm](https://img.shields.io/npm/v/%40warnyin%2Fagents)](https://www.npmjs.com/package/@warnyin/agents)
4
-
5
- **Warnyin Standard Workflow** — มาตรฐานกลางของ "วิธีทำงาน" (ways of work) สำหรับทุกโปรเจกต์
6
- ให้ AI agent (Claude Code / Codex / Antigravity / อื่นๆ) เดินงานผ่าน 5 stage ด้วย playbook กลางชุดเดียวกัน:
7
-
8
- ```
9
- Discovery (optional) ──▶ DESIGN ──▶ BUILD ──▶ VERIFY ──▶ SHIP
10
- ตี scope ออกแบบ + fan-out เทสจริง ส่งมอบ +
11
- จนเข้าใจตรงกัน แตก task sub-agent แก้จนผ่าน promote ความรู้
12
- ```
13
-
14
- ทุก stage มี **Gate** — ผ่านเกณฑ์ครบจึงไปต่อได้ และความรู้ที่เกิดระหว่างงานจะถูก SHIP
15
- กลั่นกลับเข้า `docs/` เสมอ → งานถัดไปเริ่มจากความรู้ล่าสุดทุกครั้ง
16
-
17
- ## ติดตั้ง
18
-
19
- ```bash
20
- cd my-project
21
- npx @warnyin/agents # ติดตั้ง (ข้ามไฟล์ที่มีอยู่ ไม่เขียนทับ)
22
- npx @warnyin/agents --dry-run # ดูก่อนว่าจะสร้างอะไร
23
- npx @warnyin/agents --update # อัปเดต playbook กลางเป็นเวอร์ชันล่าสุด
24
- # ทางสำรอง (ดึงตรงจาก main): npx github:warnyin/warnyin-agents
25
- ```
26
-
27
- - โปรเจกต์ที่มี `CLAUDE.md` / `AGENTS.md` อยู่แล้ว → installer **ต่อท้ายเป็น section** ไม่เขียนทับ
28
- - `--update` เขียนทับเฉพาะ core (`.warnyin/workflow/`, `.claude/commands/warnyin/`, template ใน `.warnyin/template/`) — ไม่แตะ `docs/` และงานจริง
29
-
30
- > **อัปเกรดจากรุ่นเก่า?** (`workflow/` หรือ `warnyin/` layout) ดู [Migration guide](CHANGELOG.md#migration-guide) ก่อนรัน installer รอบใหม่
31
-
32
- ## เริ่มใช้งาน
33
-
34
- ```bash
35
- # 1. ติดตั้งแล้วเปิด Claude Code ในโปรเจกต์ → รัน
36
- /warnyin:init # agent วิเคราะห์โปรเจกต์ + เติม docs/ ให้
37
- /warnyin:install-skill # (optional) ติดตั้ง skill เสริมประจำ role
38
- /warnyin:update-codemaps # (รันซ้ำได้เสมอ) สแกน + อัปเดต codemap หลัง refactor/feature ใหญ่
39
-
40
- # 2. เริ่มงานแรก
41
- /warnyin:discovery <topic> # โจทย์กว้าง/กำกวม → ตี scope ก่อน
42
- /warnyin:design <slug> <change> # scope ชัดแล้ว → ออกแบบ + แตก task เลย
43
-
44
- # 3. ไล่ตาม stage จนจบ
45
- /warnyin:build <slug> # fan-out sub-agent implement ตาม dependency
46
- /warnyin:verify <slug> # strategy tester เทสจริงใน local env แก้จนผ่าน
47
- /warnyin:ship <slug> # promote ความรู้ขึ้น docs/ + archive topic
48
- ```
49
-
50
- ## ตัวอย่างจริง (worked example)
51
-
52
- อยากเห็นว่า "output ที่ทำดีแล้ว" หน้าตาเป็นยังไงก่อนเริ่ม topic ของตัวเอง?
53
- [`docs/example-walkthrough.md`](docs/example-walkthrough.md) ไล่ topic จริง (`cli-legacy-warning-fix`)
54
- ครบทั้ง 5 stage — เน้น **เหตุผลการตัดสินใจ** ของแต่ละ stage พร้อมลิงก์ไป artifact จริงใน `docs/stages/achieved/`
55
- (เปิดดูบน GitHub repo)
56
-
57
- ## แนวคิดหลัก: Tool-agnostic, single source of truth
58
-
59
- แก่นของ workflow (กฎ / ขั้นตอน / เกณฑ์ผ่าน) เขียน**ครั้งเดียว**เป็น markdown ใน `.warnyin/workflow/stages/`
60
- AI แต่ละเครื่องมีแค่ adapter บางๆ ชี้กลับมาที่ playbook กลางชุดเดียวกัน
61
-
62
- | AI tool | Adapter | อ่าน playbook จาก |
63
- |---|---|---|
64
- | **Claude Code** | `.claude/commands/warnyin/*` + `CLAUDE.md` | `.warnyin/workflow/stages/*.md` |
65
- | **Codex / Antigravity** | `AGENTS.md` | `.warnyin/workflow/stages/*.md` |
66
- | เครื่องอื่นๆ | ชี้มาที่ `.warnyin/workflow/stages/` ได้ทันที | `.warnyin/workflow/stages/*.md` |
67
-
68
- > แก้กฎที่ `.warnyin/workflow/stages/` ที่เดียว → ทุกเครื่องได้เหมือนกันทันที
69
-
70
- ## โครงสร้างที่ติดตั้งลงโปรเจกต์
71
-
72
- ```
73
- .warnyin/ # ★ ทุกอย่างของ workflow รวมใต้โฟลเดอร์เดียว
74
- workflow/ # playbook กลาง — single source of truth
75
- init.md # INIT: วิเคราะห์โปรเจกต์ + เติม docs/ ครั้งแรก
76
- roles/ # role card: BA · PO · SA · Tech Lead · Developer · QA · Security · Infra
77
- stages/ # discovery / design / build / verify / ship
78
- scripts/ # build-wave.mjs — fan-out sub-agent ต่อ wave (worktree isolation)
79
- template/ # template ทั้งหมด: stages/[topic]/ · docs/ (project/rule/infra/troubleshooting/codemap
80
- # + techstack/[component]/ · features/[feature-name]/)
81
- stages/ # พื้นที่ทำงานจริงราย topic (copy [topic] เป็น <slug>)
82
- achieved/ # archive หลัง SHIP (<YYYY-MM-DD>-<slug>)
83
-
84
- docs/ # ความรู้ถาวรระดับโปรเจกต์ — ของจริงล้วน (seed จาก .warnyin/template/docs ตอนติดตั้ง)
85
- project.md # ★ จุดเริ่มของ Discovery
86
- rule.md infra.md troubleshooting.md
87
- codemap/ features/ techstack/<component>/{about,rule,standard,structure,test}.md
88
-
89
- .claude/commands/warnyin/ # adapter สำหรับ Claude Code (slash commands)
90
- .claude/agents/ # reviewer subagent: warnyin-{sa,tech-lead,qa,security,infra}
91
- AGENTS.md # adapter สำหรับ Codex / Antigravity
92
- CLAUDE.md # adapter สำหรับ Claude Code
93
- ```
94
-
95
- รายละเอียดเต็ม: [`.warnyin/workflow/README.md`](.warnyin/workflow/README.md)
96
-
97
- ## จุดเด่นของแต่ละ stage
98
-
99
- - **Discovery** — สัมภาษณ์ทีละข้อ + เสนอคำตอบแนะนำทุกครั้ง; คำถามที่โค้ดตอบได้ → ไปอ่านโค้ดเอง
100
- - **DESIGN** — vertical slice architecture, task self-contained พร้อมโยน sub-agent, มี **review panel** (optional — SA/Tech Lead/QA/Security/Infra รีวิวขนานก่อนแตก task) และ **dry-run** (optional) สแกนหา blocker/defer ก่อนเข้า BUILD
101
- - **BUILD** — จัด task เป็น wave ตาม dependency (DAG), รัน parallel ใน git worktree แยกกัน, ปิดท้ายด้วย full build + full test gate แก้จนเขียวหมด
102
- - **VERIFY** — เทสตาม "จุดประสงค์ของ topic" ในสภาพแวดล้อมจริง ไม่ใช่แค่ unit test เขียว; FE ตรวจ UX/UI ด้วย
103
- - **SHIP** — จำแนก feature ใหม่/ปรับปรุง, promote rule/standard/test/troubleshooting ขึ้นไฟล์กลาง, อัปเดต code map, archive topic
104
-
105
- ## Role system
106
-
107
- role card กลางที่ `.warnyin/workflow/roles/` — แต่ละใบกำหนด Mission / Lens / Checklist / Output ของหนึ่งบทบาท
108
-
109
- | Role | ใช้ใน | รูปแบบ |
110
- |---|---|---|
111
- | BA + PO | Discovery | lens ของ AI หลักตอนสัมภาษณ์/จัด priority |
112
- | SA + Tech Lead | DESIGN | lens ตอนออกแบบ/แตก task + reviewer ใน panel |
113
- | Developer | BUILD | system prompt ของ build agent ทุกตัว |
114
- | QA | VERIFY + panel | lens ของ strategy tester |
115
- | Security + Infra | DESIGN panel | reviewer (read-only) |
116
-
117
- - Tech Lead/Security ผูกกับ built-in `/code-review` และ `/security-review` ของ Claude Code
118
- - skill เสริมต่อ role ติดตั้งด้วย `/warnyin:install-skill` (รายการกลาง: `.warnyin/workflow/roles/README.md`)
119
-
120
- ## พัฒนา repo นี้ (contributor)
121
-
122
- repo นี้ใช้ **bootstrap / self-hosting**: source ของ workflow v-next อยู่ใน `src/` (committed/publish) ส่วน root ติดตั้ง release เสถียรไว้ dogfood (gitignored) — **clone แล้วต้อง bootstrap ก่อนใช้**:
123
-
124
- ```bash
125
- git clone https://github.com/warnyin/warnyin-agents.git
126
- cd warnyin-agents
127
- npm run setup:dogfood # ติดตั้ง release เสถียรลง root (.warnyin/.claude/CLAUDE.md/AGENTS.md — gitignored)
128
- npm test # black-box test installer (node --test, discover src/tests/)
129
- npm run setup:sandbox # ทดสอบ v-next จาก src/ ลง temp dir (version skew — dogfood ที่ root ไม่โดนแตะ)
130
- ```
131
-
132
- - พัฒนา workflow v-next ที่ `src/` · dogfood ที่ root = release เสถียร (แก้ `src/` ไม่กระทบ session ที่กำลังทำงาน)
133
- - รายละเอียดเต็ม: [`CONTRIBUTING.md`](CONTRIBUTING.md)
134
-
135
- ## Release เวอร์ชันใหม่ (สำหรับผู้ดูแล repo นี้)
136
-
137
- > publish payload มาจาก `src/` (allowlist `package.json files`) — `npm run verify:pack` เป็น gate ก่อน publish (CI ตรวจทุก PR): payload ต้องติด `src/.warnyin/`+`src/.claude/` ครบ ไม่มี tooling/docs รั่ว
138
-
139
- ```bash
140
- npm run verify:pack # ตรวจ payload ก่อน (Windows: npm pack --dry-run --json → checkFiles)
141
- npm version patch # bump เวอร์ชัน + git tag
142
- npm publish # ขึ้น npm registry (มี OTP)
143
- git push --follow-tags
144
- ```
145
-
146
- ## License
147
-
148
- MIT
1
+ # warnyin-agents
2
+
3
+ [![npm](https://img.shields.io/npm/v/%40warnyin%2Fagents)](https://www.npmjs.com/package/@warnyin/agents)
4
+
5
+ **Warnyin Standard Workflow** — มาตรฐานกลางของ "วิธีทำงาน" (ways of work) สำหรับทุกโปรเจกต์
6
+ ให้ AI agent (Claude Code / Codex / Antigravity / อื่นๆ) เดินงานผ่าน 5 stage ด้วย playbook กลางชุดเดียวกัน:
7
+
8
+ ```
9
+ Discovery (optional) ──▶ DESIGN ──▶ BUILD ──▶ VERIFY ──▶ SHIP
10
+ ตี scope ออกแบบ + fan-out เทสจริง ส่งมอบ +
11
+ จนเข้าใจตรงกัน แตก task sub-agent แก้จนผ่าน promote ความรู้
12
+ ```
13
+
14
+ ทุก stage มี **Gate** — ผ่านเกณฑ์ครบจึงไปต่อได้ และความรู้ที่เกิดระหว่างงานจะถูก SHIP
15
+ กลั่นกลับเข้า `docs/` เสมอ → งานถัดไปเริ่มจากความรู้ล่าสุดทุกครั้ง
16
+
17
+ ## ติดตั้ง
18
+
19
+ ```bash
20
+ cd my-project
21
+ npx @warnyin/agents # ติดตั้ง (ข้ามไฟล์ที่มีอยู่ ไม่เขียนทับ)
22
+ npx @warnyin/agents --dry-run # ดูก่อนว่าจะสร้างอะไร
23
+ npx @warnyin/agents --update # อัปเดต playbook กลางเป็นเวอร์ชันล่าสุด
24
+ # ทางสำรอง (ดึงตรงจาก main): npx github:warnyin/warnyin-agents
25
+ ```
26
+
27
+ - โปรเจกต์ที่มี `CLAUDE.md` / `AGENTS.md` อยู่แล้ว → installer **ต่อท้ายเป็น section** ไม่เขียนทับ
28
+ - `--update` เขียนทับเฉพาะ core (`.warnyin/workflow/`, `.claude/commands/warnyin/`, template ใน `.warnyin/template/`) — ไม่แตะ `docs/` และงานจริง
29
+
30
+ > **อัปเกรดจากรุ่นเก่า?** (`workflow/` หรือ `warnyin/` layout) ดู [Migration guide](CHANGELOG.md#migration-guide) ก่อนรัน installer รอบใหม่
31
+
32
+ ## เริ่มใช้งาน
33
+
34
+ ```bash
35
+ # 1. ติดตั้งแล้วเปิด Claude Code ในโปรเจกต์ → รัน
36
+ /warnyin:init # agent วิเคราะห์โปรเจกต์ + เติม docs/ ให้
37
+ /warnyin:install-skill # (optional) ติดตั้ง skill เสริมประจำ role
38
+ /warnyin:update-codemaps # (รันซ้ำได้เสมอ) สแกน + อัปเดต codemap หลัง refactor/feature ใหญ่
39
+
40
+ # 2. เริ่มงานแรก
41
+ /warnyin:discovery <topic> # โจทย์กว้าง/กำกวม → ตี scope ก่อน
42
+ /warnyin:design <slug> <change> # scope ชัดแล้ว → ออกแบบ + แตก task เลย
43
+
44
+ # 3. ไล่ตาม stage จนจบ
45
+ /warnyin:build <slug> # fan-out sub-agent implement ตาม dependency
46
+ /warnyin:verify <slug> # strategy tester เทสจริงใน local env แก้จนผ่าน
47
+ /warnyin:ship <slug> # promote ความรู้ขึ้น docs/ + archive topic
48
+ ```
49
+
50
+ ## ตัวอย่างจริง (worked example)
51
+
52
+ อยากเห็นว่า "output ที่ทำดีแล้ว" หน้าตาเป็นยังไงก่อนเริ่ม topic ของตัวเอง?
53
+ [`docs/example-walkthrough.md`](docs/example-walkthrough.md) ไล่ topic จริง (`cli-legacy-warning-fix`)
54
+ ครบทั้ง 5 stage — เน้น **เหตุผลการตัดสินใจ** ของแต่ละ stage พร้อมลิงก์ไป artifact จริงใน `docs/stages/achieved/`
55
+ (เปิดดูบน GitHub repo)
56
+
57
+ ## แนวคิดหลัก: Tool-agnostic, single source of truth
58
+
59
+ แก่นของ workflow (กฎ / ขั้นตอน / เกณฑ์ผ่าน) เขียน**ครั้งเดียว**เป็น markdown ใน `.warnyin/workflow/stages/`
60
+ AI แต่ละเครื่องมีแค่ adapter บางๆ ชี้กลับมาที่ playbook กลางชุดเดียวกัน
61
+
62
+ | AI tool | Adapter | อ่าน playbook จาก |
63
+ |---|---|---|
64
+ | **Claude Code** | `.claude/commands/warnyin/*` + `CLAUDE.md` | `.warnyin/workflow/stages/*.md` |
65
+ | **Codex / Antigravity** | `AGENTS.md` | `.warnyin/workflow/stages/*.md` |
66
+ | เครื่องอื่นๆ | ชี้มาที่ `.warnyin/workflow/stages/` ได้ทันที | `.warnyin/workflow/stages/*.md` |
67
+
68
+ > แก้กฎที่ `.warnyin/workflow/stages/` ที่เดียว → ทุกเครื่องได้เหมือนกันทันที
69
+
70
+ ## โครงสร้างที่ติดตั้งลงโปรเจกต์
71
+
72
+ ```
73
+ .warnyin/ # ★ ทุกอย่างของ workflow รวมใต้โฟลเดอร์เดียว
74
+ workflow/ # playbook กลาง — single source of truth
75
+ init.md # INIT: วิเคราะห์โปรเจกต์ + เติม docs/ ครั้งแรก
76
+ roles/ # role card: BA · PO · SA · Tech Lead · Developer · QA · Security · Infra
77
+ stages/ # discovery / design / build / verify / ship
78
+ scripts/ # build-wave.mjs — fan-out sub-agent ต่อ wave (worktree isolation)
79
+ template/ # template ทั้งหมด: stages/[topic]/ · docs/ (project/rule/infra/troubleshooting/codemap
80
+ # + techstack/[component]/ · features/[feature-name]/)
81
+ stages/ # พื้นที่ทำงานจริงราย topic (copy [topic] เป็น <slug>)
82
+ achieved/ # archive หลัง SHIP (<YYYY-MM-DD>-<slug>)
83
+
84
+ docs/ # ความรู้ถาวรระดับโปรเจกต์ — ของจริงล้วน (seed จาก .warnyin/template/docs ตอนติดตั้ง)
85
+ project.md # ★ จุดเริ่มของ Discovery
86
+ rule.md infra.md troubleshooting.md
87
+ codemap/ features/ techstack/<component>/{about,rule,standard,structure,test}.md
88
+
89
+ .claude/commands/warnyin/ # adapter สำหรับ Claude Code (slash commands)
90
+ .claude/agents/ # reviewer subagent: warnyin-{sa,tech-lead,qa,security,infra}
91
+ AGENTS.md # adapter สำหรับ Codex / Antigravity
92
+ CLAUDE.md # adapter สำหรับ Claude Code
93
+ ```
94
+
95
+ รายละเอียดเต็ม: [`.warnyin/workflow/README.md`](.warnyin/workflow/README.md)
96
+
97
+ ## จุดเด่นของแต่ละ stage
98
+
99
+ - **Discovery** — สัมภาษณ์ทีละข้อ + เสนอคำตอบแนะนำทุกครั้ง; คำถามที่โค้ดตอบได้ → ไปอ่านโค้ดเอง
100
+ - **DESIGN** — vertical slice architecture, task self-contained พร้อมโยน sub-agent, มี **review panel** (optional — SA/Tech Lead/QA/Security/Infra รีวิวขนานก่อนแตก task) และ **dry-run** (optional) สแกนหา blocker/defer ก่อนเข้า BUILD
101
+ - **BUILD** — จัด task เป็น wave ตาม dependency (DAG), รัน parallel ใน git worktree แยกกัน, ปิดท้ายด้วย full build + full test gate แก้จนเขียวหมด
102
+ - **VERIFY** — เทสตาม "จุดประสงค์ของ topic" ในสภาพแวดล้อมจริง ไม่ใช่แค่ unit test เขียว; FE ตรวจ UX/UI ด้วย
103
+ - **SHIP** — จำแนก feature ใหม่/ปรับปรุง, promote rule/standard/test/troubleshooting ขึ้นไฟล์กลาง, อัปเดต code map, archive topic
104
+
105
+ ## Role system
106
+
107
+ role card กลางที่ `.warnyin/workflow/roles/` — แต่ละใบกำหนด Mission / Lens / Checklist / Output ของหนึ่งบทบาท
108
+
109
+ | Role | ใช้ใน | รูปแบบ |
110
+ |---|---|---|
111
+ | BA + PO | Discovery | lens ของ AI หลักตอนสัมภาษณ์/จัด priority |
112
+ | SA + Tech Lead | DESIGN | lens ตอนออกแบบ/แตก task + reviewer ใน panel |
113
+ | Developer | BUILD | system prompt ของ build agent ทุกตัว |
114
+ | QA | VERIFY + panel | lens ของ strategy tester |
115
+ | Security + Infra | DESIGN panel | reviewer (read-only) |
116
+
117
+ - Tech Lead/Security ผูกกับ built-in `/code-review` และ `/security-review` ของ Claude Code
118
+ - skill เสริมต่อ role ติดตั้งด้วย `/warnyin:install-skill` (รายการกลาง: `.warnyin/workflow/roles/README.md`)
119
+
120
+ ## พัฒนา repo นี้ (contributor)
121
+
122
+ repo นี้ใช้ **bootstrap / self-hosting**: source ของ workflow v-next อยู่ใน `src/` (committed/publish) ส่วน root ติดตั้ง release เสถียรไว้ dogfood (gitignored) — **clone แล้วต้อง bootstrap ก่อนใช้**:
123
+
124
+ ```bash
125
+ git clone https://github.com/warnyin/warnyin-agents.git
126
+ cd warnyin-agents
127
+ npm run setup:dogfood # ติดตั้ง release เสถียรลง root (.warnyin/.claude/CLAUDE.md/AGENTS.md — gitignored)
128
+ npm test # black-box test installer (node --test, discover src/tests/)
129
+ npm run setup:sandbox # ทดสอบ v-next จาก src/ ลง temp dir (version skew — dogfood ที่ root ไม่โดนแตะ)
130
+ ```
131
+
132
+ - พัฒนา workflow v-next ที่ `src/` · dogfood ที่ root = release เสถียร (แก้ `src/` ไม่กระทบ session ที่กำลังทำงาน)
133
+ - รายละเอียดเต็ม: [`CONTRIBUTING.md`](CONTRIBUTING.md)
134
+
135
+ ## Release เวอร์ชันใหม่ (สำหรับผู้ดูแล repo นี้)
136
+
137
+ > publish payload มาจาก `src/` (allowlist `package.json files`) — `npm run verify:pack` เป็น gate ก่อน publish (CI ตรวจทุก PR): payload ต้องติด `src/.warnyin/`+`src/.claude/` ครบ ไม่มี tooling/docs รั่ว
138
+
139
+ ```bash
140
+ npm run verify:pack # ตรวจ payload ก่อน (Windows: npm pack --dry-run --json → checkFiles)
141
+ npm version patch # bump เวอร์ชัน + git tag
142
+ npm publish # ขึ้น npm registry (มี OTP)
143
+ git push --follow-tags
144
+ ```
145
+
146
+ ## License
147
+
148
+ MIT
package/package.json CHANGED
@@ -1,38 +1,38 @@
1
- {
2
- "name": "@warnyin/agents",
3
- "version": "0.11.0",
4
- "description": "Warnyin Standard Workflow installer — 5-stage ways of work (Discovery/DESIGN/BUILD/VERIFY/SHIP) สำหรับทุกโปรเจกต์",
5
- "type": "module",
6
- "license": "MIT",
7
- "publishConfig": {
8
- "access": "public"
9
- },
10
- "bin": {
11
- "warnyin-agents": "src/bin/cli.mjs"
12
- },
13
- "scripts": {
14
- "test": "node --test",
15
- "lint:md": "node src/scripts/lint-md.mjs",
16
- "verify:pack": "node src/scripts/verify-pack.mjs",
17
- "setup:dogfood": "node src/scripts/setup-dogfood.mjs",
18
- "setup:sandbox": "node src/scripts/setup-sandbox.mjs"
19
- },
20
- "files": [
21
- "src/bin",
22
- "src/.warnyin",
23
- "src/.claude/commands",
24
- "src/.claude/agents",
25
- "src/.claude/skills",
26
- "src/AGENTS.md",
27
- "README.md",
28
- "CHANGELOG.md",
29
- "LICENSE"
30
- ],
31
- "engines": {
32
- "node": ">=20"
33
- },
34
- "repository": {
35
- "type": "git",
36
- "url": "git+https://github.com/warnyin/warnyin-agents.git"
37
- }
38
- }
1
+ {
2
+ "name": "@warnyin/agents",
3
+ "version": "0.13.0",
4
+ "description": "Warnyin Standard Workflow installer — 5-stage ways of work (Discovery/DESIGN/BUILD/VERIFY/SHIP) สำหรับทุกโปรเจกต์",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "bin": {
11
+ "warnyin-agents": "src/bin/cli.mjs"
12
+ },
13
+ "scripts": {
14
+ "test": "node --test",
15
+ "lint:md": "node src/scripts/lint-md.mjs",
16
+ "verify:pack": "node src/scripts/verify-pack.mjs",
17
+ "setup:dogfood": "node src/scripts/setup-dogfood.mjs",
18
+ "setup:sandbox": "node src/scripts/setup-sandbox.mjs"
19
+ },
20
+ "files": [
21
+ "src/bin",
22
+ "src/.warnyin",
23
+ "src/.claude/commands",
24
+ "src/.claude/agents",
25
+ "src/.claude/skills",
26
+ "src/AGENTS.md",
27
+ "README.md",
28
+ "CHANGELOG.md",
29
+ "LICENSE"
30
+ ],
31
+ "engines": {
32
+ "node": ">=20"
33
+ },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/warnyin/warnyin-agents.git"
37
+ }
38
+ }
@@ -1,13 +1,13 @@
1
- ---
2
- name: warnyin-infra
3
- description: Reviewer มุม Infra สำหรับ review panel ของ DESIGN stage — รีวิวผลกระทบ env/service/config/migration/observability (read-only)
4
- tools: Read, Grep, Glob
5
- ---
6
-
7
- คุณคือ reviewer สวม role **Infra** ตาม role card กลางของ Warnyin Standard Workflow
8
-
9
- 1. อ่าน `.warnyin/workflow/roles/infra.md` ให้ครบก่อน แล้วใช้ Lens + Checklist ในนั้นอย่างเคร่งครัด
10
- 2. อ่าน artifact ที่ได้รับมอบ (proposal.md, design.md, tasks ถ้ามี) + `docs/infra.md` + config จริง (docker/compose, env, scripts) — **read-only ห้ามแก้ไฟล์ใดๆ**
11
- 3. ให้ความเห็นแบ่งสองระดับ: **blocker** / **suggestion** — ทุกข้อมีเหตุผล + จุดอ้างอิง + สิ่งที่ต้องเพิ่มใน `docs/infra.md` (ถ้ามี)
12
- 4. ไม่มีประเด็น → ตอบว่าผ่านมุม Infra พร้อมสรุปสั้นๆ ว่าตรวจอะไรไปบ้าง
13
- 5. ตอบเป็นข้อมูลกระชับสำหรับ main loop นำไปรวม ไม่ต้องเกริ่นนำ
1
+ ---
2
+ name: warnyin-infra
3
+ description: Reviewer มุม Infra สำหรับ review panel ของ DESIGN stage — รีวิวผลกระทบ env/service/config/migration/observability (read-only)
4
+ tools: Read, Grep, Glob
5
+ ---
6
+
7
+ คุณคือ reviewer สวม role **Infra** ตาม role card กลางของ Warnyin Standard Workflow
8
+
9
+ 1. อ่าน `.warnyin/workflow/roles/infra.md` ให้ครบก่อน แล้วใช้ Lens + Checklist ในนั้นอย่างเคร่งครัด
10
+ 2. อ่าน artifact ที่ได้รับมอบ (proposal.md, design.md, tasks ถ้ามี) + `docs/infra.md` + config จริง (docker/compose, env, scripts) — **read-only ห้ามแก้ไฟล์ใดๆ**
11
+ 3. ให้ความเห็นแบ่งสองระดับ: **blocker** / **suggestion** — ทุกข้อมีเหตุผล + จุดอ้างอิง + สิ่งที่ต้องเพิ่มใน `docs/infra.md` (ถ้ามี)
12
+ 4. ไม่มีประเด็น → ตอบว่าผ่านมุม Infra พร้อมสรุปสั้นๆ ว่าตรวจอะไรไปบ้าง
13
+ 5. ตอบเป็นข้อมูลกระชับสำหรับ main loop นำไปรวม ไม่ต้องเกริ่นนำ
@@ -1,13 +1,13 @@
1
- ---
2
- name: warnyin-qa
3
- description: Reviewer มุม QA สำหรับ review panel ของ DESIGN stage — รีวิว testability, acceptance, edge case ของ design (read-only)
4
- tools: Read, Grep, Glob
5
- ---
6
-
7
- คุณคือ reviewer สวม role **QA** ตาม role card กลางของ Warnyin Standard Workflow
8
-
9
- 1. อ่าน `.warnyin/workflow/roles/qa.md` ให้ครบก่อน แล้วใช้ Lens + Checklist ในนั้น (รวม checklist เพิ่มสำหรับรีวิว design ใน panel) อย่างเคร่งครัด
10
- 2. อ่าน artifact ที่ได้รับมอบ (proposal.md, design.md, tasks ถ้ามี) + `docs/techstack/*/test.md` + โค้ด/เทสจริงที่เกี่ยวข้อง — **read-only ห้ามแก้ไฟล์ใดๆ**
11
- 3. ให้ความเห็นแบ่งสองระดับ: **blocker** (เทสไม่ได้/acceptance วัดไม่ได้) / **suggestion** — ทุกข้อมีเหตุผล + จุดอ้างอิง
12
- 4. ไม่มีประเด็น → ตอบว่าผ่านมุม QA พร้อมสรุปสั้นๆ ว่าตรวจอะไรไปบ้าง
13
- 5. ตอบเป็นข้อมูลกระชับสำหรับ main loop นำไปรวม ไม่ต้องเกริ่นนำ
1
+ ---
2
+ name: warnyin-qa
3
+ description: Reviewer มุม QA สำหรับ review panel ของ DESIGN stage — รีวิว testability, acceptance, edge case ของ design (read-only)
4
+ tools: Read, Grep, Glob
5
+ ---
6
+
7
+ คุณคือ reviewer สวม role **QA** ตาม role card กลางของ Warnyin Standard Workflow
8
+
9
+ 1. อ่าน `.warnyin/workflow/roles/qa.md` ให้ครบก่อน แล้วใช้ Lens + Checklist ในนั้น (รวม checklist เพิ่มสำหรับรีวิว design ใน panel) อย่างเคร่งครัด
10
+ 2. อ่าน artifact ที่ได้รับมอบ (proposal.md, design.md, tasks ถ้ามี) + `docs/techstack/*/test.md` + โค้ด/เทสจริงที่เกี่ยวข้อง — **read-only ห้ามแก้ไฟล์ใดๆ**
11
+ 3. ให้ความเห็นแบ่งสองระดับ: **blocker** (เทสไม่ได้/acceptance วัดไม่ได้) / **suggestion** — ทุกข้อมีเหตุผล + จุดอ้างอิง
12
+ 4. ไม่มีประเด็น → ตอบว่าผ่านมุม QA พร้อมสรุปสั้นๆ ว่าตรวจอะไรไปบ้าง
13
+ 5. ตอบเป็นข้อมูลกระชับสำหรับ main loop นำไปรวม ไม่ต้องเกริ่นนำ
@@ -1,13 +1,13 @@
1
- ---
2
- name: warnyin-sa
3
- description: Reviewer มุม Solution Architect สำหรับ review panel ของ DESIGN stage — รีวิว design เรื่อง architecture, data model, contract, vertical slice (read-only)
4
- tools: Read, Grep, Glob
5
- ---
6
-
7
- คุณคือ reviewer สวม role **SA (Solution Architect)** ตาม role card กลางของ Warnyin Standard Workflow
8
-
9
- 1. อ่าน `.warnyin/workflow/roles/sa.md` ให้ครบก่อน แล้วใช้ Lens + Checklist ในนั้นอย่างเคร่งครัด
10
- 2. อ่าน artifact ที่ได้รับมอบ (proposal.md, design.md, tasks ถ้ามี) + โค้ดจริง/`docs/techstack/`/`docs/codemap/` ที่เกี่ยวข้อง — **read-only ห้ามแก้ไฟล์ใดๆ**
11
- 3. ให้ความเห็นแบ่งสองระดับ: **blocker** (ต้องแก้ก่อนไปต่อ) / **suggestion** (ควรปรับ) — ทุกข้อมีเหตุผล + จุดอ้างอิง (ไฟล์/section/บรรทัด) ห้ามวิจารณ์ลอยๆ ห้ามเดา
12
- 4. ไม่มีประเด็น → ตอบว่าผ่านมุม SA พร้อมสรุปสั้นๆ ว่าตรวจอะไรไปบ้าง
13
- 5. ตอบเป็นข้อมูลกระชับสำหรับ main loop นำไปรวม ไม่ต้องเกริ่นนำ
1
+ ---
2
+ name: warnyin-sa
3
+ description: Reviewer มุม Solution Architect สำหรับ review panel ของ DESIGN stage — รีวิว design เรื่อง architecture, data model, contract, vertical slice (read-only)
4
+ tools: Read, Grep, Glob
5
+ ---
6
+
7
+ คุณคือ reviewer สวม role **SA (Solution Architect)** ตาม role card กลางของ Warnyin Standard Workflow
8
+
9
+ 1. อ่าน `.warnyin/workflow/roles/sa.md` ให้ครบก่อน แล้วใช้ Lens + Checklist ในนั้นอย่างเคร่งครัด
10
+ 2. อ่าน artifact ที่ได้รับมอบ (proposal.md, design.md, tasks ถ้ามี) + โค้ดจริง/`docs/techstack/`/`docs/codemap/` ที่เกี่ยวข้อง — **read-only ห้ามแก้ไฟล์ใดๆ**
11
+ 3. ให้ความเห็นแบ่งสองระดับ: **blocker** (ต้องแก้ก่อนไปต่อ) / **suggestion** (ควรปรับ) — ทุกข้อมีเหตุผล + จุดอ้างอิง (ไฟล์/section/บรรทัด) ห้ามวิจารณ์ลอยๆ ห้ามเดา
12
+ 4. ไม่มีประเด็น → ตอบว่าผ่านมุม SA พร้อมสรุปสั้นๆ ว่าตรวจอะไรไปบ้าง
13
+ 5. ตอบเป็นข้อมูลกระชับสำหรับ main loop นำไปรวม ไม่ต้องเกริ่นนำ
@@ -1,13 +1,13 @@
1
- ---
2
- name: warnyin-security
3
- description: Reviewer มุม Security/DevSecOps สำหรับ review panel ของ DESIGN stage — หาช่องโหว่ระดับ design เช่น input validation, authz, ข้อมูลอ่อนไหว, secret, dependency (read-only)
4
- tools: Read, Grep, Glob
5
- ---
6
-
7
- คุณคือ reviewer สวม role **Security (DevSecOps)** ตาม role card กลางของ Warnyin Standard Workflow
8
-
9
- 1. อ่าน `.warnyin/workflow/roles/security.md` ให้ครบก่อน แล้วใช้ Lens + Checklist ในนั้นอย่างเคร่งครัด
10
- 2. อ่าน artifact ที่ได้รับมอบ (proposal.md, design.md, tasks ถ้ามี) + โค้ด/config จริงที่เกี่ยวข้อง — **read-only ห้ามแก้ไฟล์ใดๆ**
11
- 3. ให้ความเห็นแบ่งสองระดับ: **blocker** (ช่องโหว่จริงต้องแก้ก่อน BUILD) / **suggestion** (hardening) — ทุกข้อระบุ จุดที่พบ + ความเสี่ยง + แนวทางแก้ ห้ามรายงานความเสี่ยงลอยๆ ที่ไม่เกี่ยวกับ change นี้
12
- 4. ไม่มีประเด็น → ตอบว่าผ่านมุม Security พร้อมสรุปสั้นๆ ว่าตรวจอะไรไปบ้าง
13
- 5. ตอบเป็นข้อมูลกระชับสำหรับ main loop นำไปรวม ไม่ต้องเกริ่นนำ
1
+ ---
2
+ name: warnyin-security
3
+ description: Reviewer มุม Security/DevSecOps สำหรับ review panel ของ DESIGN stage — หาช่องโหว่ระดับ design เช่น input validation, authz, ข้อมูลอ่อนไหว, secret, dependency (read-only)
4
+ tools: Read, Grep, Glob
5
+ ---
6
+
7
+ คุณคือ reviewer สวม role **Security (DevSecOps)** ตาม role card กลางของ Warnyin Standard Workflow
8
+
9
+ 1. อ่าน `.warnyin/workflow/roles/security.md` ให้ครบก่อน แล้วใช้ Lens + Checklist ในนั้นอย่างเคร่งครัด
10
+ 2. อ่าน artifact ที่ได้รับมอบ (proposal.md, design.md, tasks ถ้ามี) + โค้ด/config จริงที่เกี่ยวข้อง — **read-only ห้ามแก้ไฟล์ใดๆ**
11
+ 3. ให้ความเห็นแบ่งสองระดับ: **blocker** (ช่องโหว่จริงต้องแก้ก่อน BUILD) / **suggestion** (hardening) — ทุกข้อระบุ จุดที่พบ + ความเสี่ยง + แนวทางแก้ ห้ามรายงานความเสี่ยงลอยๆ ที่ไม่เกี่ยวกับ change นี้
12
+ 4. ไม่มีประเด็น → ตอบว่าผ่านมุม Security พร้อมสรุปสั้นๆ ว่าตรวจอะไรไปบ้าง
13
+ 5. ตอบเป็นข้อมูลกระชับสำหรับ main loop นำไปรวม ไม่ต้องเกริ่นนำ
@@ -1,13 +1,13 @@
1
- ---
2
- name: warnyin-tech-lead
3
- description: Reviewer มุม Tech Lead สำหรับ review panel ของ DESIGN stage — รีวิว feasibility, ขนาด task, dependency graph, ความเสี่ยง technical (read-only)
4
- tools: Read, Grep, Glob
5
- ---
6
-
7
- คุณคือ reviewer สวม role **Tech Lead** ตาม role card กลางของ Warnyin Standard Workflow
8
-
9
- 1. อ่าน `.warnyin/workflow/roles/tech-lead.md` ให้ครบก่อน แล้วใช้ Lens + Checklist ในนั้นอย่างเคร่งครัด
10
- 2. อ่าน artifact ที่ได้รับมอบ (proposal.md, design.md, tasks ถ้ามี) + โค้ดจริงที่เกี่ยวข้อง — **read-only ห้ามแก้ไฟล์ใดๆ**
11
- 3. ให้ความเห็นแบ่งสองระดับ: **blocker** / **suggestion** — ทุกข้อมีเหตุผล + จุดอ้างอิง; dependency/ขนาด task ไม่เหมาะ → เสนอวิธีแตกใหม่ให้ชัด
12
- 4. ไม่มีประเด็น → ตอบว่าผ่านมุม Tech Lead พร้อมสรุปสั้นๆ ว่าตรวจอะไรไปบ้าง
13
- 5. ตอบเป็นข้อมูลกระชับสำหรับ main loop นำไปรวม ไม่ต้องเกริ่นนำ
1
+ ---
2
+ name: warnyin-tech-lead
3
+ description: Reviewer มุม Tech Lead สำหรับ review panel ของ DESIGN stage — รีวิว feasibility, ขนาด task, dependency graph, ความเสี่ยง technical (read-only)
4
+ tools: Read, Grep, Glob
5
+ ---
6
+
7
+ คุณคือ reviewer สวม role **Tech Lead** ตาม role card กลางของ Warnyin Standard Workflow
8
+
9
+ 1. อ่าน `.warnyin/workflow/roles/tech-lead.md` ให้ครบก่อน แล้วใช้ Lens + Checklist ในนั้นอย่างเคร่งครัด
10
+ 2. อ่าน artifact ที่ได้รับมอบ (proposal.md, design.md, tasks ถ้ามี) + โค้ดจริงที่เกี่ยวข้อง — **read-only ห้ามแก้ไฟล์ใดๆ**
11
+ 3. ให้ความเห็นแบ่งสองระดับ: **blocker** / **suggestion** — ทุกข้อมีเหตุผล + จุดอ้างอิง; dependency/ขนาด task ไม่เหมาะ → เสนอวิธีแตกใหม่ให้ชัด
12
+ 4. ไม่มีประเด็น → ตอบว่าผ่านมุม Tech Lead พร้อมสรุปสั้นๆ ว่าตรวจอะไรไปบ้าง
13
+ 5. ตอบเป็นข้อมูลกระชับสำหรับ main loop นำไปรวม ไม่ต้องเกริ่นนำ