@warnyin/agents 0.1.0 → 0.4.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 (87) hide show
  1. package/.claude/agents/warnyin-infra.md +13 -0
  2. package/.claude/agents/warnyin-qa.md +13 -0
  3. package/.claude/agents/warnyin-sa.md +13 -0
  4. package/.claude/agents/warnyin-security.md +13 -0
  5. package/.claude/agents/warnyin-tech-lead.md +13 -0
  6. package/.claude/commands/warnyin/build.md +9 -9
  7. package/.claude/commands/warnyin/design.md +5 -4
  8. package/.claude/commands/warnyin/discovery.md +3 -3
  9. package/.claude/commands/warnyin/init.md +1 -1
  10. package/.claude/commands/warnyin/install-skill.md +14 -0
  11. package/.claude/commands/warnyin/ship.md +5 -5
  12. package/.claude/commands/warnyin/update-codemaps.md +12 -0
  13. package/.claude/commands/warnyin/verify.md +5 -5
  14. package/AGENTS.md +12 -12
  15. package/CLAUDE.md +16 -13
  16. package/README.md +121 -0
  17. package/bin/cli.mjs +51 -9
  18. package/package.json +5 -7
  19. package/{installer → warnyin/installer}/templates/CLAUDE.md +13 -11
  20. package/warnyin/template/docs/codemap/index.md +18 -0
  21. package/warnyin/template/docs/features/[feature-name]/business.md +5 -0
  22. package/warnyin/template/docs/features/[feature-name]/feature.md +5 -0
  23. package/warnyin/template/docs/infra.md +16 -0
  24. package/warnyin/template/docs/project.md +18 -0
  25. package/warnyin/template/docs/rule.md +7 -0
  26. package/warnyin/template/docs/techstack/[component]/about.md +6 -0
  27. package/warnyin/template/docs/techstack/[component]/rule.md +6 -0
  28. package/warnyin/template/docs/techstack/[component]/standard.md +6 -0
  29. package/warnyin/template/docs/techstack/[component]/structure.md +7 -0
  30. package/warnyin/template/docs/techstack/[component]/test.md +7 -0
  31. package/{docs → warnyin/template/docs}/troubleshooting.md +32 -39
  32. package/{warnyin-stages → warnyin/template/stages}/[topic]/build.md +2 -2
  33. package/{warnyin-stages → warnyin/template/stages}/[topic]/business.md +1 -1
  34. package/{warnyin-stages → warnyin/template/stages}/[topic]/design.md +1 -1
  35. package/{warnyin-stages → warnyin/template/stages}/[topic]/discovery.md +2 -2
  36. package/{warnyin-stages → warnyin/template/stages}/[topic]/proposal.md +1 -1
  37. package/{warnyin-stages → warnyin/template/stages}/[topic]/research.md +1 -1
  38. package/{warnyin-stages → warnyin/template/stages}/[topic]/ship.md +3 -3
  39. package/{warnyin-stages → warnyin/template/stages}/[topic]/tasks/[task-name]/issue.md +1 -1
  40. package/{warnyin-stages → warnyin/template/stages}/[topic]/tasks/[task-name]/rule.md +1 -1
  41. package/{warnyin-stages → warnyin/template/stages}/[topic]/tasks/[task-name]/spec.md +1 -1
  42. package/{warnyin-stages → warnyin/template/stages}/[topic]/tasks/[task-name]/standard.md +1 -1
  43. package/{warnyin-stages → warnyin/template/stages}/[topic]/tasks/[task-name]/task.md +1 -1
  44. package/{warnyin-stages → warnyin/template/stages}/[topic]/test.md +1 -1
  45. package/{warnyin-stages → warnyin/template/stages}/[topic]/verify.md +2 -2
  46. package/warnyin/workflow/README.md +92 -0
  47. package/warnyin/workflow/codemap.md +91 -0
  48. package/{workflow → warnyin/workflow}/init.md +3 -1
  49. package/warnyin/workflow/roles/README.md +46 -0
  50. package/warnyin/workflow/roles/ba.md +25 -0
  51. package/warnyin/workflow/roles/developer.md +28 -0
  52. package/warnyin/workflow/roles/infra.md +24 -0
  53. package/warnyin/workflow/roles/po.md +28 -0
  54. package/warnyin/workflow/roles/qa.md +33 -0
  55. package/warnyin/workflow/roles/sa.md +28 -0
  56. package/warnyin/workflow/roles/security.md +29 -0
  57. package/warnyin/workflow/roles/tech-lead.md +28 -0
  58. package/{workflow → warnyin/workflow}/scripts/build-wave.mjs +5 -4
  59. package/{workflow → warnyin/workflow}/stages/build.md +10 -9
  60. package/{workflow → warnyin/workflow}/stages/design.md +28 -19
  61. package/{workflow → warnyin/workflow}/stages/discovery.md +7 -6
  62. package/{workflow → warnyin/workflow}/stages/ship.md +8 -8
  63. package/{workflow → warnyin/workflow}/stages/verify.md +5 -4
  64. package/docs/features/[feature-name]/business.md +0 -0
  65. package/docs/features/[feature-name]/feature.md +0 -0
  66. package/docs/infra.md +0 -0
  67. package/docs/project.md +0 -0
  68. package/docs/rule.md +0 -0
  69. package/docs/techstack/admin-console/about.md +0 -0
  70. package/docs/techstack/admin-console/rule.md +0 -0
  71. package/docs/techstack/admin-console/standard.md +0 -0
  72. package/docs/techstack/admin-console/structure.md +0 -0
  73. package/docs/techstack/admin-console/test.md +0 -0
  74. package/docs/techstack/api-service/about.md +0 -0
  75. package/docs/techstack/api-service/rule.md +0 -0
  76. package/docs/techstack/api-service/standard.md +0 -0
  77. package/docs/techstack/api-service/structure.md +0 -0
  78. package/docs/techstack/api-service/test.md +0 -0
  79. package/warnyin-stages/achieved/[YYYY-MM-DD-topic]/business.md +0 -0
  80. package/warnyin-stages/achieved/[YYYY-MM-DD-topic]/design.md +0 -0
  81. package/warnyin-stages/achieved/[YYYY-MM-DD-topic]/discovery.md +0 -0
  82. package/warnyin-stages/achieved/[YYYY-MM-DD-topic]/proposal.md +0 -0
  83. package/warnyin-stages/achieved/[YYYY-MM-DD-topic]/research.md +0 -0
  84. package/workflow/README.md +0 -90
  85. /package/{docs/codemap/index.md → warnyin/stages/achieved/.gitkeep} +0 -0
  86. /package/{warnyin-stages → warnyin/stages}/context.md +0 -0
  87. /package/{warnyin-stages → warnyin/template/stages}/[topic]/troubleshooting.md +0 -0
package/bin/cli.mjs CHANGED
@@ -24,8 +24,8 @@ if (args.has('--help') || args.has('-h')) {
24
24
  ใช้งาน:
25
25
  npx @warnyin/agents ติดตั้ง (ข้ามไฟล์ที่มีอยู่แล้ว ไม่เขียนทับ)
26
26
  npx @warnyin/agents --update อัปเดต playbook กลางเป็นเวอร์ชันล่าสุด
27
- (เขียนทับเฉพาะ workflow/, .claude/commands/warnyin/,
28
- template warnyin-stages/[topic] — ไม่แตะ docs/ และงานจริง)
27
+ (เขียนทับเฉพาะ warnyin/workflow/, .claude/commands/warnyin/,
28
+ template warnyin/template/stages/[topic] — ไม่แตะ docs/ และงานจริง)
29
29
  npx @warnyin/agents --dry-run แสดงรายการไฟล์ที่จะสร้าง/อัปเดต โดยไม่เขียนจริง
30
30
 
31
31
  หลังติดตั้ง: เปิด Claude Code ในโปรเจกต์ แล้วรัน /warnyin:init ให้ agent วิเคราะห์โปรเจกต์ + เติม docs/`)
@@ -37,14 +37,28 @@ if (path.resolve(pkgRoot) === path.resolve(target)) {
37
37
  process.exit(1)
38
38
  }
39
39
 
40
- // core = playbook กลาง + command + template หน่วยงาน เขียนทับได้เมื่อ --update
40
+ // โครงเก่า (≤0.2.x): workflow/ + warnyin-stages/ ที่ rootเตือนให้ย้ายเอง ไม่แตะงานจริงของ user
41
+ const legacy = ['workflow', 'warnyin-stages'].filter((d) => fs.existsSync(path.join(target, d)))
42
+ if (legacy.length) {
43
+ console.warn(`⚠ พบโครงเลย์เอาต์เก่า (≤0.2.x): ${legacy.join(', ')}
44
+ เวอร์ชันนี้ย้ายทุกอย่างไปใต้ warnyin/ — แนะนำย้ายด้วยตัวเองก่อน:
45
+ 1. git mv warnyin-stages warnyin/stages # งานจริงของคุณ (ปลอดภัย ไม่ถูกแตะโดย installer)
46
+ 2. git rm -r workflow # playbook เก่า (เวอร์ชันใหม่จะอยู่ที่ warnyin/workflow)
47
+ 3. ลบ template เก่าถ้ามี: "warnyin/stages/[topic]", "docs/techstack/[component]", "docs/features/[feature-name]"
48
+ (ย้ายไปรวมที่ warnyin/template/ แล้ว)
49
+ แล้วรันคำสั่งนี้อีกครั้ง\n`)
50
+ }
51
+
52
+ // core = playbook กลาง + command + agent + template — เขียนทับได้เมื่อ --update
41
53
  const CORE = [
42
- 'workflow',
54
+ path.join('warnyin', 'workflow'),
55
+ path.join('warnyin', 'template'),
43
56
  path.join('.claude', 'commands', 'warnyin'),
44
- path.join('warnyin-stages', '[topic]'),
57
+ path.join('.claude', 'agents'),
45
58
  ]
46
- // scaffold = โครง docs/ + พื้นที่ทำงาน — เป็นข้อมูลของโปรเจกต์ ไม่เขียนทับเด็ดขาด
47
- const SCAFFOLD = ['docs', 'warnyin-stages']
59
+ // scaffold = พื้นที่ทำงาน — เป็นข้อมูลของโปรเจกต์ ไม่เขียนทับเด็ดขาด
60
+ // (เจาะจง warnyin/stages warnyin/workflow + warnyin/template อยู่ใน CORE แล้ว ส่วน warnyin/installer เป็นของ installer ไม่ copy ไป target)
61
+ const SCAFFOLD = [path.join('warnyin', 'stages')]
48
62
 
49
63
  const stats = { created: 0, updated: 0, skipped: 0 }
50
64
 
@@ -77,6 +91,33 @@ function copyTree(relDir, { overwrite }) {
77
91
  }
78
92
  }
79
93
 
94
+ /** seed docs/ ของโปรเจกต์จาก warnyin/template/docs — ข้ามโฟลเดอร์ template `[...]` (ไว้ให้ /warnyin:init copy เป็นชื่อจริง) และไม่ทับไฟล์ที่มีอยู่ */
95
+ const TEMPLATE_DOCS = path.join('warnyin', 'template', 'docs')
96
+ function seedDocs(relDir = TEMPLATE_DOCS) {
97
+ const srcDir = path.join(pkgRoot, relDir)
98
+ if (!fs.existsSync(srcDir)) return
99
+ for (const entry of fs.readdirSync(srcDir, { withFileTypes: true })) {
100
+ if (entry.name.startsWith('[')) continue
101
+ const rel = path.join(relDir, entry.name)
102
+ if (entry.isDirectory()) {
103
+ seedDocs(rel)
104
+ continue
105
+ }
106
+ const destRel = path.join('docs', path.relative(TEMPLATE_DOCS, rel))
107
+ const dest = path.join(target, destRel)
108
+ if (fs.existsSync(dest)) {
109
+ stats.skipped++
110
+ continue
111
+ }
112
+ if (!DRY) {
113
+ fs.mkdirSync(path.dirname(dest), { recursive: true })
114
+ fs.copyFileSync(path.join(pkgRoot, rel), dest)
115
+ }
116
+ stats.created++
117
+ console.log(` + ${destRel}`)
118
+ }
119
+ }
120
+
80
121
  /** CLAUDE.md / AGENTS.md: ไม่มี → สร้างจาก template; มีอยู่แล้วแต่ยังไม่มี workflow → ต่อท้ายเป็น section */
81
122
  function installRootDoc(name, srcPath) {
82
123
  const dest = path.join(target, name)
@@ -88,7 +129,7 @@ function installRootDoc(name, srcPath) {
88
129
  return
89
130
  }
90
131
  const existing = fs.readFileSync(dest, 'utf8')
91
- if (existing.includes('workflow/stages/')) {
132
+ if (existing.includes('warnyin/workflow/stages/')) {
92
133
  stats.skipped++
93
134
  return
94
135
  }
@@ -102,7 +143,8 @@ console.log(`Warnyin Standard Workflow → ${target}${DRY ? ' (dry-run)' : ''}\
102
143
 
103
144
  for (const dir of CORE) copyTree(dir, { overwrite: UPDATE })
104
145
  for (const dir of SCAFFOLD) copyTree(dir, { overwrite: false })
105
- installRootDoc('CLAUDE.md', path.join(pkgRoot, 'installer', 'templates', 'CLAUDE.md'))
146
+ seedDocs()
147
+ installRootDoc('CLAUDE.md', path.join(pkgRoot, 'warnyin', 'installer', 'templates', 'CLAUDE.md'))
106
148
  installRootDoc('AGENTS.md', path.join(pkgRoot, 'AGENTS.md'))
107
149
 
108
150
  console.log(`\nสรุป: สร้างใหม่ ${stats.created} · อัปเดต ${stats.updated} · ข้าม (มีอยู่แล้ว) ${stats.skipped}`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warnyin/agents",
3
- "version": "0.1.0",
3
+ "version": "0.4.0",
4
4
  "description": "Warnyin Standard Workflow installer — 5-stage ways of work (Discovery/DESIGN/BUILD/VERIFY/SHIP) สำหรับทุกโปรเจกต์",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -12,11 +12,9 @@
12
12
  },
13
13
  "files": [
14
14
  "bin",
15
- "installer",
16
- "workflow",
17
- "docs",
18
- "warnyin-stages",
19
- ".claude",
15
+ "warnyin",
16
+ ".claude/commands",
17
+ ".claude/agents",
20
18
  "CLAUDE.md",
21
19
  "AGENTS.md"
22
20
  ],
@@ -25,6 +23,6 @@
25
23
  },
26
24
  "repository": {
27
25
  "type": "git",
28
- "url": "https://github.com/warnyin/warnyin-agents.git"
26
+ "url": "git+https://github.com/warnyin/warnyin-agents.git"
29
27
  }
30
28
  }
@@ -4,22 +4,24 @@
4
4
  `Discovery (optional) ▶ DESIGN ▶ BUILD ▶ VERIFY ▶ SHIP`
5
5
 
6
6
  ## กฎหลัก
7
- - แก่นของแต่ละ stage เป็น single source of truth ที่ `workflow/stages/` — **ทำตาม playbook นั้นเสมอ** ก่อนเริ่มงานใน stage
8
- - อย่า duplicate logic ของ workflow ลงที่อื่น ถ้าต้องแก้พฤติกรรมให้แก้ที่ `workflow/stages/`
9
- - output ของงานจริงเก็บใน `warnyin-stages/<slug>/` (copy จาก template `warnyin-stages/[topic]/`)
7
+ - แก่นของแต่ละ stage เป็น single source of truth ที่ `warnyin/workflow/stages/` — **ทำตาม playbook นั้นเสมอ** ก่อนเริ่มงานใน stage
8
+ - อย่า duplicate logic ของ workflow ลงที่อื่น ถ้าต้องแก้พฤติกรรมให้แก้ที่ `warnyin/workflow/stages/`
9
+ - output ของงานจริงเก็บใน `warnyin/stages/<slug>/` (copy จาก template `warnyin/template/stages/[topic]/`)
10
10
  - ความรู้ถาวรระดับโปรเจกต์อยู่ใน `docs/` — เริ่มอ่าน `docs/project.md` เสมอใน Discovery
11
11
 
12
12
  ## Slash commands (namespace `warnyin:`)
13
- - `/warnyin:init` → วิเคราะห์โปรเจกต์ + เติม `docs/` ครั้งแรกหลังติดตั้ง (`workflow/init.md`)
14
- - `/warnyin:discovery [topic]` → Discovery stage (`workflow/stages/discovery.md`)
15
- - `/warnyin:design [slug] [change]` → DESIGN stage (`workflow/stages/design.md`)
16
- - `/warnyin:build [slug]` → BUILD stage — fan-out sub-agent ตาม dependency (`workflow/stages/build.md` + `workflow/scripts/build-wave.mjs`)
17
- - `/warnyin:verify [slug]` → VERIFY stage — strategy tester เทส local env + UXUI แก้จนผ่าน (`workflow/stages/verify.md`)
18
- - `/warnyin:ship [slug]` → SHIP stage — ส่งมอบ: promote ความรู้ขึ้น `docs/` + archive topic (`workflow/stages/ship.md`)
13
+ - `/warnyin:init` → วิเคราะห์โปรเจกต์ + เติม `docs/` ครั้งแรกหลังติดตั้ง (`warnyin/workflow/init.md`)
14
+ - `/warnyin:install-skill [role]` → ติดตั้ง skill เสริมประจำ role (รายการ: `warnyin/workflow/roles/README.md`)
15
+ - `/warnyin:update-codemaps` → สแกนโครงสร้าง + สร้าง/อัปเดต codemap แบบ token-lean (`warnyin/workflow/codemap.md`)
16
+ - `/warnyin:discovery [topic]` → Discovery stage (`warnyin/workflow/stages/discovery.md`)
17
+ - `/warnyin:design [slug] [change]` → DESIGN stage (`warnyin/workflow/stages/design.md`)
18
+ - `/warnyin:build [slug]` → BUILD stage — fan-out sub-agent ตาม dependency (`warnyin/workflow/stages/build.md` + `warnyin/workflow/scripts/build-wave.mjs`)
19
+ - `/warnyin:verify [slug]` → VERIFY stage — strategy tester เทส local env + UXUI แก้จนผ่าน (`warnyin/workflow/stages/verify.md`)
20
+ - `/warnyin:ship [slug]` → SHIP stage — ส่งมอบ: promote ความรู้ขึ้น `docs/` + archive topic (`warnyin/workflow/stages/ship.md`)
19
21
 
20
22
  ## รองรับหลาย AI
21
23
  Claude Code อ่าน `.claude/` + ไฟล์นี้, ส่วน Codex/Antigravity อ่าน `AGENTS.md`
22
- ทุกเครื่องชี้กลับมาที่ playbook กลางชุดเดียวกันใน `workflow/stages/` — ดูภาพรวมที่ `workflow/README.md`
24
+ ทุกเครื่องชี้กลับมาที่ playbook กลางชุดเดียวกันใน `warnyin/workflow/stages/` — ดูภาพรวมที่ `warnyin/workflow/README.md`
23
25
 
24
26
  ## อัปเดต workflow
25
- `npx @warnyin/agents --update` — เขียนทับเฉพาะ playbook กลาง (`workflow/`, `.claude/commands/warnyin/`, template `warnyin-stages/[topic]/`) ไม่แตะ `docs/` และงานจริงใน `warnyin-stages/`
27
+ `npx @warnyin/agents --update` — เขียนทับเฉพาะ playbook กลาง (`warnyin/workflow/`, `.claude/commands/warnyin/`, template `warnyin/template/stages/[topic]/`) ไม่แตะ `docs/` และงานจริงใน `warnyin/stages/`
@@ -0,0 +1,18 @@
1
+ # Code Map — Index
2
+
3
+ > สารบัญ codemap ทั้งชุด — สร้าง/อัปเดตด้วย `/warnyin:update-codemaps` (playbook: `warnyin/workflow/codemap.md`)
4
+ > ทุกไฟล์ต้อง token-lean (< 1000 tokens) + freshness header + ตรงโค้ดจริงเสมอ
5
+
6
+ ## Codemap files
7
+ <!-- ลิงก์เฉพาะไฟล์ที่ relevant กับโปรเจกต์ -->
8
+ - [architecture.md](architecture.md) — system diagram, service boundary, data flow
9
+ - [backend.md](backend.md) — routes, middleware, service → repo mapping
10
+ - [frontend.md](frontend.md) — page tree, component hierarchy, state
11
+ - [data.md](data.md) — ตาราง DB, relationship, migrations
12
+ - [dependencies.md](dependencies.md) — external service, third-party, shared lib
13
+
14
+ ## Component ทั้งหมด
15
+ <!-- ชื่อ + หน้าที่ + path — รายละเอียดต่อ component ดู docs/techstack/<component>/structure.md -->
16
+
17
+ ## จุดเข้า (entry points)
18
+ <!-- main/server/cli/cron — ไฟล์ไหนคือประตูเข้าแต่ละทาง -->
@@ -0,0 +1,5 @@
1
+ # Business — <ชื่อ feature>
2
+
3
+ > what & why เชิงธุรกิจของ feature — SHIP ยกมาจาก `business.md`/`proposal.md` ของ topic
4
+
5
+ <!-- goal · persona/ใครได้ประโยชน์ · คุณค่า/success metric · scope ที่จงใจไม่ทำ -->
@@ -0,0 +1,5 @@
1
+ # Feature — <ชื่อ feature>
2
+
3
+ > template — copy ทั้งโฟลเดอร์ `[feature-name]/` เป็นชื่อ feature จริง · SHIP เป็นคนสร้าง/อัปเดตจาก business/proposal/design ของ topic
4
+
5
+ <!-- feature นี้ทำอะไร · flow หลัก · component ที่เกี่ยว · จุดเข้าในโค้ด -->
@@ -0,0 +1,16 @@
1
+ # Infra / Local Environment
2
+
3
+ > service ที่ต้องรันสำหรับ dev/เทส + วิธีรัน + env vars — VERIFY ใช้เตรียม local env · เติมครั้งแรกด้วย `/warnyin:init`
4
+
5
+ ## Service ที่ต้องรัน (local dev)
6
+ <!-- DB, queue, cache, external mock ฯลฯ + มาจาก docker-compose/script ไหน -->
7
+
8
+ ## วิธีรัน local
9
+ ```bash
10
+ ```
11
+
12
+ ## Env vars สำคัญ
13
+ <!-- ชื่อ + ความหมาย + default (ห้ามใส่ค่า secret จริง) -->
14
+
15
+ ## Environment อื่น (staging/prod)
16
+ <!-- เท่าที่เกี่ยวกับการพัฒนา/เทส -->
@@ -0,0 +1,18 @@
1
+ # Project — <ชื่อโปรเจกต์>
2
+
3
+ > ★ จุดเริ่มของ Discovery — AI อ่านไฟล์นี้ก่อนเสมอ · เติมครั้งแรกด้วย `/warnyin:init` (สัมภาษณ์ user + วิเคราะห์โค้ด)
4
+
5
+ ## โปรเจกต์นี้คืออะไร
6
+ <!-- ทำอะไร เพื่อใคร แก้ปัญหาอะไร — 2-4 บรรทัด -->
7
+
8
+ ## เป้าหมาย / success metric
9
+ <!-- วัดผลได้ ไม่ใช่ "น่าจะดี" -->
10
+
11
+ ## ลูกค้า / ผู้ใช้หลัก (persona)
12
+
13
+ ## ขอบเขต
14
+ - **in:**
15
+ - **out (จงใจไม่ทำ):**
16
+
17
+ ## ข้อจำกัด / บริบทสำคัญ
18
+ <!-- กฎหมาย/นโยบาย/ระบบเดิม/ระบบภายนอก -->
@@ -0,0 +1,7 @@
1
+ # Global Rules
2
+
3
+ > กฎระดับโปรเจกต์ที่ **ทุก component** ต้อง follow — กฎเฉพาะ component อยู่ที่ `docs/techstack/<component>/rule.md`
4
+ > SHIP เป็นคน promote กฎใหม่เข้ามา (จาก note "รอ SHIP" ใน tasks) — ระหว่างงานห้ามแก้ไฟล์นี้ตรงๆ
5
+
6
+ <!-- ตัวอย่าง: ทุก commit ต้องผ่าน lint, ห้าม hardcode secret, error message ห้าม leak ข้อมูลภายใน -->
7
+ -
@@ -0,0 +1,6 @@
1
+ # About — <ชื่อ component>
2
+
3
+ > template — copy ทั้งโฟลเดอร์ `[component]/` เป็นชื่อ component จริง (เช่น `api-service/`, `web-frontend/`)
4
+ > ปกติ `/warnyin:init` สร้างให้อัตโนมัติจากการวิเคราะห์โปรเจกต์
5
+
6
+ <!-- component นี้คืออะไร ทำหน้าที่อะไร · ภาษา/framework/runtime · ขอบเขตความรับผิดชอบ -->
@@ -0,0 +1,6 @@
1
+ # Rule — <ชื่อ component>
2
+
3
+ > กฎที่ "ต้อง" follow ของ component นี้ — DESIGN ดึงไปใส่ `tasks/<task>/rule.md`, SHIP เป็นคน promote กฎใหม่เข้ามา
4
+
5
+ <!-- กฎที่บังคับ เช่น: ห้าม query ตรงจาก controller, ทุก endpoint ต้องมี auth middleware, ... -->
6
+ -
@@ -0,0 +1,6 @@
1
+ # Standard — <ชื่อ component>
2
+
3
+ > pattern/convention การเขียนโค้ด + shared component ที่ต้อง reuse — DESIGN ดึงไปใส่ `tasks/<task>/standard.md`
4
+
5
+ <!-- เช่น: โครงสร้าง module, naming, error handling pattern, รายการ shared component ที่ห้ามเขียนซ้ำ -->
6
+ -
@@ -0,0 +1,7 @@
1
+ # Structure — <ชื่อ component>
2
+
3
+ > โครงสร้างโฟลเดอร์/โมดูลจริงของ component — SHIP อัปเดตเมื่อโครงสร้างเปลี่ยน
4
+
5
+ <!-- tree โฟลเดอร์สำคัญ + ไฟล์/โมดูลไหนรับผิดชอบอะไร + จุดเข้า (entry point) -->
6
+ ```
7
+ ```
@@ -0,0 +1,7 @@
1
+ # Test — <ชื่อ component>
2
+
3
+ > guideline ว่า component นี้เทสยังไง — VERIFY ใช้เป็นแผนตั้งต้น, SHIP merge แผนเทสใหม่จาก topic เข้ามา
4
+
5
+ <!-- framework + คำสั่งรัน unit/integration · e2e ใช้อะไร (เช่น FE: e2e smoke ผ่าน playwright-cli) · วิธี seed ข้อมูลทดสอบ -->
6
+ - unit:
7
+ - e2e:
@@ -1,39 +1,32 @@
1
- # Troubleshooting KB (กลาง)
2
-
3
- > คลังความรู้ปัญหา-วิธีแก้ของทั้งโปรเจกต์ — สะสมจากทุก topic
4
- > **อ่านไฟล์นี้ก่อนเสมอเมื่อเจอ build error / ปัญหาระหว่างทำงาน** เผื่อเคยแก้แล้ว
5
- > ป้อนเข้ามาตอน **SHIP**: ยก entry ที่มีค่าจาก `warnyin-stages/<topic>/troubleshooting.md` มารวมที่นี่ (ลบของซ้ำ/รวมที่คล้ายกัน)
6
-
7
- ---
8
-
9
- ## วิธีค้น
10
- ค้นด้วย error message, component, หรือ keyword อาการ — entry เรียงตาม component แล้วตามความถี่
11
-
12
- ## สารบัญตาม component
13
- - [api-service](#api-service)
14
- - [admin-console](#admin-console)
15
- - [ทั่วไป / cross-cutting](#ทั่วไป--cross-cutting)
16
-
17
- ---
18
-
19
- ## api-service
20
- <!-- ยังไม่มี entry — เพิ่มตอน SHIP จาก topic troubleshooting.md -->
21
-
22
- ## admin-console
23
- <!-- ยังไม่มี entry -->
24
-
25
- ## ทั่วไป / cross-cutting
26
- <!-- ยังไม่มี entry -->
27
-
28
- ---
29
-
30
- ## รูปแบบ entry (ใช้ตอนเพิ่มจาก SHIP)
31
- ```markdown
32
- ### <ชื่อปัญหา> · เจอ N ครั้ง · อัปเดต YYYY-MM-DD
33
- - **อาการ/error:** ...
34
- - **trigger:** ...
35
- - **root cause:** ...
36
- - **วิธีแก้:** ...
37
- - **ป้องกันซ้ำ:** ...
38
- - **มาจาก topic:** <slug>
39
- ```
1
+ # Troubleshooting KB (กลาง)
2
+
3
+ > คลังความรู้ปัญหา-วิธีแก้ของทั้งโปรเจกต์ — สะสมจากทุก topic
4
+ > **อ่านไฟล์นี้ก่อนเสมอเมื่อเจอ build error / ปัญหาระหว่างทำงาน** เผื่อเคยแก้แล้ว
5
+ > ป้อนเข้ามาตอน **SHIP**: ยก entry ที่มีค่าจาก `warnyin/stages/<topic>/troubleshooting.md` มารวมที่นี่ (ลบของซ้ำ/รวมที่คล้ายกัน)
6
+
7
+ ---
8
+
9
+ ## วิธีค้น
10
+ ค้นด้วย error message, component, หรือ keyword อาการ — entry เรียงตาม component แล้วตามความถี่
11
+
12
+ ## สารบัญตาม component
13
+ <!-- เพิ่ม section ต่อ component เมื่อมี entry แรก เช่น - [api-service](#api-service) -->
14
+ - [ทั่วไป / cross-cutting](#ทั่วไป--cross-cutting)
15
+
16
+ ---
17
+
18
+ ## ทั่วไป / cross-cutting
19
+ <!-- ยังไม่มี entry — เพิ่มตอน SHIP จาก topic troubleshooting.md -->
20
+
21
+ ---
22
+
23
+ ## รูปแบบ entry (ใช้ตอนเพิ่มจาก SHIP)
24
+ ```markdown
25
+ ### <ชื่อปัญหา> · เจอ N ครั้ง · อัปเดต YYYY-MM-DD
26
+ - **อาการ/error:** ...
27
+ - **trigger:** ...
28
+ - **root cause:** ...
29
+ - **วิธีแก้:** ...
30
+ - **ป้องกันซ้ำ:** ...
31
+ - **มาจาก topic:** <slug>
32
+ ```
@@ -1,6 +1,6 @@
1
1
  # Build Report — <ชื่อ change>
2
2
 
3
- > Output ของ BUILD stage · playbook: `workflow/stages/build.md`
3
+ > Output ของ BUILD stage · playbook: `warnyin/workflow/stages/build.md`
4
4
  > รายงานผลการ implement ต่อ task + การ integrate
5
5
 
6
6
  | | |
@@ -48,7 +48,7 @@ wave 3: task-d (ขึ้นกับ task-b, task-c)
48
48
  > บันทึกละเอียดที่ `./troubleshooting.md` (SHIP ยกขึ้น `docs/troubleshooting.md`)
49
49
  - ดู `./troubleshooting.md`
50
50
 
51
- ## ✅ Gate → VERIFY (ดู `workflow/stages/build.md` ข้อ 7)
51
+ ## ✅ Gate → VERIFY (ดู `warnyin/workflow/stages/build.md` ข้อ 7)
52
52
  - [ ] ทุก task implement + merge เข้า build branch แล้ว
53
53
  - [ ] ทุก task `passed` (test/build เขียว) ไม่มี `failed` ค้าง
54
54
  - [ ] ไม่มี merge conflict ค้าง
@@ -1,6 +1,6 @@
1
1
  # Business — <ชื่อ change>
2
2
 
3
- > Output ของ DESIGN stage · playbook: `workflow/stages/design.md`
3
+ > Output ของ DESIGN stage · playbook: `warnyin/workflow/stages/design.md`
4
4
  > **optional** — ข้ามได้ถ้า change เล็ก (เช่น fix bug นิดหน่อย)
5
5
 
6
6
  ## 1. เป้าหมายเชิงธุรกิจ (what & why)
@@ -1,6 +1,6 @@
1
1
  # Design (How) — <ชื่อ change>
2
2
 
3
- > Output ของ DESIGN stage · playbook: `workflow/stages/design.md`
3
+ > Output ของ DESIGN stage · playbook: `warnyin/workflow/stages/design.md`
4
4
  > ออกแบบเชิงเทคนิคแบบ **vertical slice architecture** — แต่ละ slice ตัดผ่านทุก layer ทำงาน end-to-end
5
5
 
6
6
  ## 1. ภาพรวมสถาปัตยกรรม
@@ -1,6 +1,6 @@
1
1
  # Discovery — <ชื่อหัวข้องาน>
2
2
 
3
- > Output ของ Discovery stage · playbook: `workflow/stages/discovery.md`
3
+ > Output ของ Discovery stage · playbook: `warnyin/workflow/stages/discovery.md`
4
4
 
5
5
  | | |
6
6
  |---|---|
@@ -60,7 +60,7 @@
60
60
 
61
61
  ---
62
62
 
63
- ## ✅ Gate → DESIGN (ดู `workflow/stages/discovery.md` ข้อ 6)
63
+ ## ✅ Gate → DESIGN (ดู `warnyin/workflow/stages/discovery.md` ข้อ 6)
64
64
  - [ ] Problem / why-now ชัด ผูกกับ project.md
65
65
  - [ ] Scope in/out ชัด
66
66
  - [ ] Decision log ปิดทุกประเด็นสำคัญ ไม่มี open question ที่ block
@@ -1,6 +1,6 @@
1
1
  # Proposal — <ชื่อ change>
2
2
 
3
- > Output ของ DESIGN stage · playbook: `workflow/stages/design.md`
3
+ > Output ของ DESIGN stage · playbook: `warnyin/workflow/stages/design.md`
4
4
  > **what & why** ของ change นี้
5
5
 
6
6
  | | |
@@ -1,6 +1,6 @@
1
1
  # Research — <ชื่อหัวข้องาน>
2
2
 
3
- > Output ของ Discovery stage · playbook: `workflow/stages/discovery.md`
3
+ > Output ของ Discovery stage · playbook: `warnyin/workflow/stages/discovery.md`
4
4
  > ที่เก็บ "ข้อมูลที่ค้นมา + หลักฐาน" สนับสนุนการตัดสินใจใน `discovery.md`
5
5
 
6
6
  | | |
@@ -1,7 +1,7 @@
1
1
  # Ship — <ชื่อ topic>
2
2
 
3
- > Output ของ SHIP stage · playbook: `workflow/stages/ship.md`
4
- > สรุปการส่งมอบ — เขียนหลังย้าย topic เข้า `warnyin-stages/achieved/<YYYY-MM-DD>-<slug>/` แล้ว
3
+ > Output ของ SHIP stage · playbook: `warnyin/workflow/stages/ship.md`
4
+ > สรุปการส่งมอบ — เขียนหลังย้าย topic เข้า `warnyin/stages/achieved/<YYYY-MM-DD>-<slug>/` แล้ว
5
5
 
6
6
  ## 1. สรุป topic
7
7
  - ทำอะไร: <!-- หนึ่งย่อหน้า: topic นี้ทำอะไร ทำอย่างไร -->
@@ -26,4 +26,4 @@
26
26
  | | |
27
27
 
28
28
  ## 4. Archive
29
- - ย้ายจาก `warnyin-stages/<slug>/` → `warnyin-stages/achieved/<YYYY-MM-DD>-<slug>/` เมื่อ <YYYY-MM-DD>
29
+ - ย้ายจาก `warnyin/stages/<slug>/` → `warnyin/stages/achieved/<YYYY-MM-DD>-<slug>/` เมื่อ <YYYY-MM-DD>
@@ -1,6 +1,6 @@
1
1
  # Issue — <ชื่อ task>
2
2
 
3
- > Output ของ DESIGN dry-run · playbook: `workflow/stages/design.md` (ข้อ 4.9)
3
+ > Output ของ DESIGN dry-run · playbook: `warnyin/workflow/stages/design.md` (ข้อ 4.9)
4
4
  > ผลสแกนหา defer/blocker ของ task นี้ก่อนเข้า BUILD — **สร้างเฉพาะเมื่อพบ issue**
5
5
 
6
6
  ## 1. สรุป
@@ -1,6 +1,6 @@
1
1
  # Rule — <ชื่อ task>
2
2
 
3
- > Output ของ DESIGN stage · playbook: `workflow/stages/design.md`
3
+ > Output ของ DESIGN stage · playbook: `warnyin/workflow/stages/design.md`
4
4
  > rule ที่ task นี้ต้อง **focus/follow** + rule ใหม่ที่อยากเสนอเพิ่ม
5
5
 
6
6
  ## 1. Rule ที่ต้อง follow (จาก techstack)
@@ -1,6 +1,6 @@
1
1
  # Spec — <ชื่อ task>
2
2
 
3
- > Output ของ DESIGN stage · playbook: `workflow/stages/design.md`
3
+ > Output ของ DESIGN stage · playbook: `warnyin/workflow/stages/design.md`
4
4
  > spec เฉพาะของ task นี้ — **ใส่เฉพาะหัวข้อที่เกี่ยวข้องกับชนิดของ task**
5
5
 
6
6
  ## 1. ชนิดของ task
@@ -1,6 +1,6 @@
1
1
  # Standard — <ชื่อ task>
2
2
 
3
- > Output ของ DESIGN stage · playbook: `workflow/stages/design.md`
3
+ > Output ของ DESIGN stage · playbook: `warnyin/workflow/stages/design.md`
4
4
  > pattern การเขียนโค้ด / shared component ที่ task นี้ต้องยึด
5
5
  > **อิงจาก** `docs/techstack/<component>/standard.md` — เพิ่มเติมเฉพาะ task ได้
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Task — <ชื่อ task>
2
2
 
3
- > Output ของ DESIGN stage · playbook: `workflow/stages/design.md`
3
+ > Output ของ DESIGN stage · playbook: `warnyin/workflow/stages/design.md`
4
4
  > หน่วยที่ **โยนให้ sub-agent ทำใน BUILD ได้** — self-contained แต่เชื่อมกับ task อื่นผ่าน dependency
5
5
 
6
6
  | | |
@@ -1,6 +1,6 @@
1
1
  # Test Plan — <ชื่อ change>
2
2
 
3
- > Output ของ VERIFY stage · playbook: `workflow/stages/verify.md`
3
+ > Output ของ VERIFY stage · playbook: `warnyin/workflow/stages/verify.md`
4
4
  > แผน/วิธีเทสของ topic นี้ — ตอน **SHIP** จะ merge เข้า `docs/techstack/<component>/test.md`
5
5
  > อิง guideline จาก `docs/techstack/<component>/test.md` (ถ้าไม่มี = เสนอวิธีใหม่ที่นี่)
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Verify Report — <ชื่อ change>
2
2
 
3
- > Output ของ VERIFY stage · playbook: `workflow/stages/verify.md`
3
+ > Output ของ VERIFY stage · playbook: `warnyin/workflow/stages/verify.md`
4
4
  > สรุปผลการ verify ตามจุดประสงค์ของ topic + การแก้ไขที่เกิดขึ้น
5
5
 
6
6
  | | |
@@ -36,7 +36,7 @@
36
36
  > กรณีวนแก้นาน/หลายรอบ แล้วถาม user — สรุปคำถาม/คำตอบ/การตัดสินใจ
37
37
  -
38
38
 
39
- ## ✅ Gate → SHIP (ดู `workflow/stages/verify.md` ข้อ 6)
39
+ ## ✅ Gate → SHIP (ดู `warnyin/workflow/stages/verify.md` ข้อ 6)
40
40
  - [ ] เทสตามจุดประสงค์ครบ (functional)
41
41
  - [ ] FE: UX/UI verify ผ่าน
42
42
  - [ ] ทุกข้อที่ไม่ผ่านถูกแก้จนผ่าน