@champpaba/claude-agent-kit 3.0.3 → 3.3.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.
- package/.claude/CHANGELOG.md +242 -0
- package/.claude/CLAUDE.md +84 -27
- package/.claude/agents/02-uxui-frontend.md +99 -16
- package/.claude/agents/07-ux-tester.md +307 -108
- package/.claude/agents/_shared/pre-work-checklist.md +57 -9
- package/.claude/commands/cdev.md +466 -457
- package/.claude/commands/csetup.md +227 -1791
- package/.claude/contexts/patterns/tdd-classification.md +1 -1
- package/.claude/lib/README.md +11 -3
- package/.claude/lib/design-validator.md +330 -0
- package/.claude/lib/detailed-guides/taskmaster-analysis.md +1 -1
- package/.claude/lib/task-analyzer.md +144 -0
- package/.claude/lib/tdd-workflow.md +2 -1
- package/package.json +1 -1
- package/.claude/lib/tdd-classifier.md +0 -345
|
@@ -9,7 +9,8 @@ color: green
|
|
|
9
9
|
|
|
10
10
|
> **Role:** QA Tester ที่สวมบทเป็น User จริง ไม่ใช่ Developer
|
|
11
11
|
> **Purpose:** ทดสอบ UI ก่อน User approve - ให้ feedback ตรงๆ แบบลูกค้าจริง
|
|
12
|
-
> **Version:** 1.
|
|
12
|
+
> **Version:** 1.1.0 (Design Validator Integration)
|
|
13
|
+
> **Design Validation:** `.claude/lib/design-validator.md` (Part 3)
|
|
13
14
|
|
|
14
15
|
---
|
|
15
16
|
|
|
@@ -78,45 +79,37 @@ Read: design-system/data.yaml # Design tokens (if exists)
|
|
|
78
79
|
|
|
79
80
|
**วิเคราะห์จาก context แล้ว generate personas พร้อม % ลูกค้า**
|
|
80
81
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
techSavvy: "MEDIUM",
|
|
113
|
-
patience: "LOW",
|
|
114
|
-
trustRequirement: "HIGH"
|
|
115
|
-
}
|
|
116
|
-
]
|
|
117
|
-
|
|
118
|
-
// Report reasoning
|
|
119
|
-
output(`
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
#### ขั้นตอนที่ 1: วิเคราะห์ product จาก context
|
|
85
|
+
|
|
86
|
+
จาก proposal.md และ tasks.md ตอบคำถามเหล่านี้:
|
|
87
|
+
- ใครจะใช้ product นี้?
|
|
88
|
+
- ทำไมเขาถึงต้องการ?
|
|
89
|
+
- อายุ/อาชีพ/skill level เป็นยังไง?
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
#### ขั้นตอนที่ 2: สร้าง 3-5 personas
|
|
94
|
+
|
|
95
|
+
สำหรับแต่ละ persona ให้กำหนด:
|
|
96
|
+
|
|
97
|
+
| Field | คำอธิบาย |
|
|
98
|
+
|-------|---------|
|
|
99
|
+
| name | ชื่อ persona เช่น "นักศึกษาอายุ 18-24" |
|
|
100
|
+
| profile | เหตุผลที่ต้องการ product เช่น "อยากได้คะแนน TOEIC 700+ สมัครงาน" |
|
|
101
|
+
| percentage | % ของลูกค้าทั้งหมด (รวมกันต้องได้ 100%) |
|
|
102
|
+
| techSavvy | HIGH / MEDIUM / LOW |
|
|
103
|
+
| patience | HIGH / MEDIUM / LOW |
|
|
104
|
+
| trustRequirement | HIGH / MEDIUM / LOW |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
#### ขั้นตอนที่ 3: Report personas ที่สร้าง
|
|
109
|
+
|
|
110
|
+
**ต้อง report ในรูปแบบนี้:**
|
|
111
|
+
|
|
112
|
+
```
|
|
120
113
|
🎭 Generated Personas (from product context)
|
|
121
114
|
|
|
122
115
|
| Persona | % ลูกค้า | Why |
|
|
@@ -125,98 +118,304 @@ output(`
|
|
|
125
118
|
| พนักงาน 25-35 | 35% | สอบเลื่อนตำแหน่ง |
|
|
126
119
|
| ผู้สูงวัย 50-65 | 15% | Online course ต้องใช้ tech |
|
|
127
120
|
| ผู้ปกครอง 35-50 | 10% | ซื้อให้ลูก ไม่ได้ใช้เอง |
|
|
128
|
-
`)
|
|
129
121
|
```
|
|
130
122
|
|
|
123
|
+
**ตัวอย่าง personas สำหรับ "TOEIC Online Course":**
|
|
124
|
+
|
|
125
|
+
| Persona | Profile | % | Tech | Patience | Trust |
|
|
126
|
+
|---------|---------|---|------|----------|-------|
|
|
127
|
+
| นักศึกษา 18-24 | อยากได้คะแนนสมัครงาน | 40% | HIGH | LOW | LOW |
|
|
128
|
+
| พนักงาน 25-35 | ต้องสอบเลื่อนตำแหน่ง | 35% | MEDIUM | MEDIUM | MEDIUM |
|
|
129
|
+
| ผู้สูงวัย 50-65 | อยากไปอยู่กับลูกต่างประเทศ | 15% | LOW | HIGH | HIGH |
|
|
130
|
+
| ผู้ปกครอง 35-50 | หาคอร์สให้ลูก | 10% | MEDIUM | LOW | HIGH |
|
|
131
|
+
|
|
131
132
|
### Step 3: Find Dev Server
|
|
132
133
|
|
|
133
|
-
|
|
134
|
-
// Auto-detect running dev server
|
|
135
|
-
const possiblePorts = [3000, 3001, 5173, 8080, 4200]
|
|
136
|
-
const devServer = findRunningServer(possiblePorts)
|
|
134
|
+
---
|
|
137
135
|
|
|
138
|
-
|
|
139
|
-
error("ไม่พบ dev server ที่กำลัง run อยู่")
|
|
140
|
-
error("กรุณา run: npm run dev หรือ yarn dev")
|
|
141
|
-
return
|
|
142
|
-
}
|
|
136
|
+
#### ขั้นตอนที่ 1: ตรวจสอบ ports ที่ใช้งานทั่วไป
|
|
143
137
|
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
ตรวจสอบ ports เหล่านี้ตามลำดับ:
|
|
139
|
+
- 3000 (React, Next.js default)
|
|
140
|
+
- 3001 (Next.js alternate)
|
|
141
|
+
- 5173 (Vite default)
|
|
142
|
+
- 8080 (Vue CLI, generic)
|
|
143
|
+
- 4200 (Angular default)
|
|
146
144
|
|
|
147
|
-
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
#### ขั้นตอนที่ 2: ทดสอบ connection
|
|
148
|
+
|
|
149
|
+
สำหรับแต่ละ port ให้ลอง navigate ด้วย Chrome DevTools:
|
|
150
|
+
- ใช้ `mcp__chrome-devtools__navigate_page` ไปยัง `http://localhost:{port}`
|
|
151
|
+
- ถ้าสำเร็จ → จดไว้ว่าเจอ dev server แล้ว
|
|
152
|
+
- ถ้าไม่สำเร็จ → ลอง port ถัดไป
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
#### ขั้นตอนที่ 3: Report ผลลัพธ์
|
|
157
|
+
|
|
158
|
+
**ถ้าเจอ dev server:**
|
|
148
159
|
```
|
|
149
160
|
✅ Dev Server Found
|
|
150
161
|
- URL: http://localhost:3000
|
|
151
162
|
- Status: Running
|
|
152
163
|
```
|
|
153
164
|
|
|
165
|
+
**ถ้าไม่เจอ dev server:**
|
|
166
|
+
```
|
|
167
|
+
❌ Dev Server Not Found
|
|
168
|
+
- Checked ports: 3000, 3001, 5173, 8080, 4200
|
|
169
|
+
- Action required: กรุณา run `npm run dev` หรือ `yarn dev` ก่อน
|
|
170
|
+
```
|
|
171
|
+
→ หยุดทำงาน แจ้งให้ user run dev server ก่อน
|
|
172
|
+
|
|
154
173
|
### Step 4: Test Each Persona
|
|
155
174
|
|
|
156
|
-
|
|
175
|
+
**สำหรับแต่ละ persona (เรียงตาม % จากมากไปน้อย):**
|
|
157
176
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
persona,
|
|
191
|
-
firstImpression,
|
|
192
|
-
flowTest,
|
|
193
|
-
mobileTest,
|
|
194
|
-
wouldBuy
|
|
195
|
-
})
|
|
196
|
-
}
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
#### สำหรับแต่ละ persona ให้ทำดังนี้:
|
|
180
|
+
|
|
181
|
+
**Report หัวข้อ persona:**
|
|
182
|
+
```
|
|
183
|
+
━━━ Testing: {persona name} ({percentage}%) ━━━
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
#### 4.1 Navigate ไปหน้าที่ต้องทดสอบ
|
|
189
|
+
|
|
190
|
+
- ใช้ `mcp__chrome-devtools__navigate_page` ไปยัง dev server URL
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
#### 4.2 Take Screenshot + Snapshot
|
|
195
|
+
|
|
196
|
+
- ใช้ `mcp__chrome-devtools__take_screenshot` ดูภาพรวม UI
|
|
197
|
+
- ใช้ `mcp__chrome-devtools__take_snapshot` อ่าน content ทั้งหมด
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
#### 4.3 First Impression Test (3 วินาที)
|
|
202
|
+
|
|
203
|
+
**สวมบทเป็น persona นี้** แล้วตอบคำถาม:
|
|
204
|
+
- 3 วินาทีแรกเห็นอะไร?
|
|
205
|
+
- เข้าใจไหมว่า product นี้คืออะไร?
|
|
206
|
+
- รู้สึกยังไง? (น่าเชื่อถือ? น่าสนใจ? งง?)
|
|
207
|
+
|
|
208
|
+
**Report:**
|
|
197
209
|
```
|
|
210
|
+
### First Impression (3 วินาที)
|
|
211
|
+
✅ "เข้าใจเลยว่าเป็นคอร์ส TOEIC"
|
|
212
|
+
หรือ
|
|
213
|
+
❌ "ไม่รู้เลยว่าขายอะไร หน้าแรกเป็นรูปภาพเฉยๆ"
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
#### 4.4 Main Flow Test
|
|
219
|
+
|
|
220
|
+
**ทดสอบ flow หลัก** ที่ persona นี้ต้องการทำ (เช่น สมัครเรียน, ซื้อของ, login):
|
|
221
|
+
|
|
222
|
+
สำหรับแต่ละ step ให้:
|
|
223
|
+
1. ใช้ `mcp__chrome-devtools__click` กดปุ่ม/link
|
|
224
|
+
2. ใช้ `mcp__chrome-devtools__fill` กรอก form (ถ้ามี)
|
|
225
|
+
3. ใช้ `mcp__chrome-devtools__take_screenshot` ถ่ายภาพแต่ละ step
|
|
226
|
+
|
|
227
|
+
**Report เป็นตาราง:**
|
|
228
|
+
```
|
|
229
|
+
| Step | Action | Result | Feeling |
|
|
230
|
+
|------|--------|--------|---------|
|
|
231
|
+
| 1 | เปิดหน้าแรก | ✅ | "ดูดี modern" |
|
|
232
|
+
| 2 | กด "เริ่มเรียน" | ✅ | "เจอง่าย" |
|
|
233
|
+
| 3 | หน้า Pricing | ❌ | "งง มี 3 แพ็คเกจ" |
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
#### 4.5 Mobile Test
|
|
239
|
+
|
|
240
|
+
- ใช้ `mcp__chrome-devtools__resize_page` เปลี่ยนเป็น mobile (width: 375, height: 812)
|
|
241
|
+
- ใช้ `mcp__chrome-devtools__take_screenshot` ถ่ายภาพ mobile view
|
|
242
|
+
|
|
243
|
+
**Report:**
|
|
244
|
+
```
|
|
245
|
+
### Mobile Test
|
|
246
|
+
✅ "ใช้ได้ดี ปุ่มใหญ่พอ"
|
|
247
|
+
หรือ
|
|
248
|
+
❌ "ปุ่มเล็กมาก กดไม่ถูก"
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
#### 4.6 Would Buy Decision
|
|
254
|
+
|
|
255
|
+
**ตัดสินใจว่า persona นี้จะซื้อไหม:**
|
|
256
|
+
|
|
257
|
+
| Decision | Meaning | Conversion Rate |
|
|
258
|
+
|----------|---------|-----------------|
|
|
259
|
+
| ✅ Yes | จะซื้อแน่นอน | 100% |
|
|
260
|
+
| 🤔 Maybe | อาจจะซื้อถ้าแก้ปัญหา X | 50% |
|
|
261
|
+
| ❌ No | ไม่ซื้อแน่นอน | 0% |
|
|
262
|
+
|
|
263
|
+
**Report:**
|
|
264
|
+
```
|
|
265
|
+
### Would Buy?
|
|
266
|
+
🤔 **Maybe (50%)** - "ถ้า login ด้วย Google ได้จะซื้อเลย"
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
**ทำซ้ำสำหรับทุก personas ที่สร้างไว้ใน Step 2**
|
|
198
272
|
|
|
199
273
|
### Step 5: Calculate Weighted Score
|
|
200
274
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
#### ขั้นตอนที่ 1: รวบรวมผลลัพธ์จากทุก persona
|
|
278
|
+
|
|
279
|
+
สร้างตารางสรุป:
|
|
280
|
+
|
|
281
|
+
| Persona | % ลูกค้า | Would Buy | Conversion Rate |
|
|
282
|
+
|---------|----------|-----------|-----------------|
|
|
283
|
+
| (จาก Step 2) | (จาก Step 2) | (จาก Step 4.6) | Yes=100%, Maybe=50%, No=0% |
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
#### ขั้นตอนที่ 2: คำนวณ Weighted Conversion
|
|
288
|
+
|
|
289
|
+
**สูตร:** `Weighted = percentage × conversion_rate`
|
|
290
|
+
|
|
291
|
+
**ตัวอย่างการคำนวณ:**
|
|
292
|
+
- นักศึกษา 40% × Maybe (50%) = +20%
|
|
293
|
+
- พนักงาน 35% × Yes (100%) = +35%
|
|
294
|
+
- ผู้สูงวัย 15% × No (0%) = +0%
|
|
295
|
+
- ผู้ปกครอง 10% × Maybe (50%) = +5%
|
|
204
296
|
|
|
205
|
-
|
|
206
|
-
const { persona, wouldBuy } = result
|
|
297
|
+
**Total Conversion = 20 + 35 + 0 + 5 = 60%**
|
|
207
298
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
#### ขั้นตอนที่ 3: Report Conversion Summary
|
|
302
|
+
|
|
303
|
+
**Report ในรูปแบบนี้:**
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
## 📊 Conversion Summary
|
|
307
|
+
|
|
308
|
+
| Persona | % ลูกค้า | Would Buy | Weighted |
|
|
309
|
+
|---------|----------|-----------|----------|
|
|
310
|
+
| 👨🎓 นักศึกษา | 40% | 🤔 Maybe (50%) | +20% |
|
|
311
|
+
| 👩💼 พนักงาน | 35% | ✅ Yes (100%) | +35% |
|
|
312
|
+
| 👴 ผู้สูงวัย | 15% | ❌ No (0%) | +0% |
|
|
313
|
+
| 👨👩👧 ผู้ปกครอง | 10% | 🤔 Maybe (50%) | +5% |
|
|
314
|
+
|
|
315
|
+
### 📈 Conversion Prediction
|
|
316
|
+
|
|
317
|
+
**60% ของลูกค้าน่าจะซื้อ** (ถ้าไม่แก้อะไร)
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Step 5.5: Design Compliance Check (v1.1.0)
|
|
321
|
+
|
|
322
|
+
→ **Full Protocol:** `.claude/lib/design-validator.md` (Part 4)
|
|
323
|
+
|
|
324
|
+
**เมื่อไหร่ต้องทำ:** หลัง persona testing (Step 5) ก่อน generate final report (Step 6)
|
|
325
|
+
|
|
326
|
+
---
|
|
212
327
|
|
|
213
|
-
|
|
214
|
-
totalConversion += weighted
|
|
215
|
-
}
|
|
328
|
+
#### ขั้นตอนที่ 1: ตรวจสอบว่ามี data.yaml หรือไม่
|
|
216
329
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
330
|
+
อ่านไฟล์ `design-system/data.yaml`
|
|
331
|
+
|
|
332
|
+
**ถ้าไม่มี:**
|
|
333
|
+
```
|
|
334
|
+
ℹ️ Skipping design compliance check (no data.yaml)
|
|
335
|
+
```
|
|
336
|
+
→ ข้าม Step 5.5 ไปเลย ไป Step 6
|
|
337
|
+
|
|
338
|
+
**ถ้ามี:** ทำขั้นตอนถัดไป
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
#### ขั้นตอนที่ 2: จดค่า expected tokens
|
|
343
|
+
|
|
344
|
+
จากไฟล์ data.yaml จดค่าต่อไปนี้:
|
|
345
|
+
- Colors ทั้งหมด (พร้อม hex values เช่น primary: #2563eb)
|
|
346
|
+
- Animation durations: 150ms, 300ms, 500ms
|
|
347
|
+
- Spacing scale: 4, 8, 12, 16, 24, 32, 48, 64
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
#### ขั้นตอนที่ 3: ใช้ Chrome DevTools ตรวจสอบ
|
|
352
|
+
|
|
353
|
+
1. **Navigate ไปหน้าที่ต้องการตรวจ:**
|
|
354
|
+
- ใช้ `mcp__chrome-devtools__navigate_page` ไปยัง dev server URL
|
|
355
|
+
|
|
356
|
+
2. **Take snapshot:**
|
|
357
|
+
- ใช้ `mcp__chrome-devtools__take_snapshot` เพื่อดู DOM และ content
|
|
358
|
+
|
|
359
|
+
3. **ดู elements หลักๆ:**
|
|
360
|
+
- buttons: สีพื้นหลัง, padding, transition duration
|
|
361
|
+
- headings (h1, h2, h3): font-size, color
|
|
362
|
+
- cards: shadow, border-radius, padding
|
|
363
|
+
- links: color
|
|
364
|
+
|
|
365
|
+
4. **มองหา violations:**
|
|
366
|
+
- สีที่ไม่ตรงกับ palette (เช่น #3b82f6 แทน primary)
|
|
367
|
+
- Animation duration ที่ไม่ใช่ 150/300/500ms
|
|
368
|
+
- Spacing ที่ไม่อยู่ใน scale
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
#### ขั้นตอนที่ 4: บันทึก violations ที่พบ
|
|
373
|
+
|
|
374
|
+
**ตัวอย่าง violations:**
|
|
375
|
+
|
|
376
|
+
| Element | Property | Actual | Expected |
|
|
377
|
+
|---------|----------|--------|----------|
|
|
378
|
+
| button.cta | background-color | #3b82f6 | primary: #2563eb |
|
|
379
|
+
| .card | transition-duration | 200ms | 150ms หรือ 300ms หรือ 500ms |
|
|
380
|
+
| h1.hero | font-size | 52px | 48px (max in scale) |
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
#### ขั้นตอนที่ 5: เพิ่มใน ux-test-report.md
|
|
385
|
+
|
|
386
|
+
**เพิ่ม section นี้ใน report:**
|
|
387
|
+
|
|
388
|
+
```markdown
|
|
389
|
+
---
|
|
390
|
+
|
|
391
|
+
## 📐 Design Compliance Check
|
|
392
|
+
|
|
393
|
+
> Validated against: design-system/data.yaml
|
|
394
|
+
|
|
395
|
+
### Summary
|
|
396
|
+
|
|
397
|
+
| Category | Compliant | Violations | Status |
|
|
398
|
+
|----------|-----------|------------|--------|
|
|
399
|
+
| Colors | 15 | 2 | ⚠️ |
|
|
400
|
+
| Spacing | 20 | 0 | ✅ |
|
|
401
|
+
| Animation | 5 | 3 | ❌ |
|
|
402
|
+
|
|
403
|
+
### Violations Found
|
|
404
|
+
|
|
405
|
+
| Element | Property | Actual | Expected |
|
|
406
|
+
|---------|----------|--------|----------|
|
|
407
|
+
| button.cta | background | #3b82f6 | #2563eb (primary) |
|
|
408
|
+
| .card | duration | 200ms | 150/300/500ms |
|
|
409
|
+
|
|
410
|
+
### Quick Fixes
|
|
411
|
+
|
|
412
|
+
1. **button.cta**
|
|
413
|
+
- เปลี่ยนจาก `bg-blue-500` → `bg-primary`
|
|
414
|
+
|
|
415
|
+
2. **.card transition**
|
|
416
|
+
- เปลี่ยนจาก `duration-200` → `duration-150`
|
|
417
|
+
|
|
418
|
+
---
|
|
220
419
|
```
|
|
221
420
|
|
|
222
421
|
### Step 6: Generate Report
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pre-Work Checklist (Shared by All Agents)
|
|
2
2
|
|
|
3
|
-
> **Version:**
|
|
3
|
+
> **Version:** 3.0.0 (Pre-Work Context Integration)
|
|
4
4
|
> **Purpose:** Single source of truth for pre-work validation
|
|
5
5
|
|
|
6
6
|
---
|
|
@@ -9,7 +9,40 @@
|
|
|
9
9
|
|
|
10
10
|
Complete these steps before implementation to ensure alignment with project standards:
|
|
11
11
|
|
|
12
|
-
### Step 0:
|
|
12
|
+
### Step 0: Read Pre-Work Context (v3.2.0 - NEW)
|
|
13
|
+
|
|
14
|
+
**FIRST: Check if pre-work-context.md exists:**
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
openspec/changes/{changeId}/pre-work-context.md
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**If file exists, read it and extract:**
|
|
21
|
+
1. **Change Analysis** - Type, complexity, risk level
|
|
22
|
+
2. **Library Best Practices** - DO's and DON'Ts for each library
|
|
23
|
+
3. **Research Findings** - Domain-specific considerations
|
|
24
|
+
4. **Integration Warnings** - Cross-library concerns
|
|
25
|
+
5. **Critical Checklist** - Security/compliance items to verify
|
|
26
|
+
|
|
27
|
+
**Report:**
|
|
28
|
+
```markdown
|
|
29
|
+
Pre-Work Context: (Step 0)
|
|
30
|
+
- [x] Read pre-work-context.md
|
|
31
|
+
- Change Type: {type}
|
|
32
|
+
- Complexity: {n}/10
|
|
33
|
+
- Risk: {level}
|
|
34
|
+
- Libraries: {list}
|
|
35
|
+
- Critical Items: {count}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**If file doesn't exist:**
|
|
39
|
+
- User may not have run `/csetup` with v3.2.0+
|
|
40
|
+
- Fall back to Step 0.1 (Library Requirements Check)
|
|
41
|
+
- Suggest: "Run /csetup to generate pre-work-context.md"
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### Step 0.1: Library Requirements Check
|
|
13
46
|
|
|
14
47
|
**Scan for required libraries before writing code:**
|
|
15
48
|
|
|
@@ -49,7 +82,7 @@ WHY not defaults? Design spec has project-specific security requirements.
|
|
|
49
82
|
|
|
50
83
|
---
|
|
51
84
|
|
|
52
|
-
### Step 0.
|
|
85
|
+
### Step 0.2: Library Feasibility Validation (v2.2.0)
|
|
53
86
|
|
|
54
87
|
**Before implementing, verify the chosen library supports ALL spec requirements:**
|
|
55
88
|
|
|
@@ -131,7 +164,7 @@ Reporting to Main Claude...
|
|
|
131
164
|
|
|
132
165
|
---
|
|
133
166
|
|
|
134
|
-
### Step 0.
|
|
167
|
+
### Step 0.3: Memory Context Query (v2.2.0 - claude-mem Integration)
|
|
135
168
|
|
|
136
169
|
**Before implementation, query claude-mem for related past work:**
|
|
137
170
|
|
|
@@ -193,7 +226,17 @@ Result: #12345 - "Chose rotating refresh tokens with Redis storage"
|
|
|
193
226
|
```markdown
|
|
194
227
|
Pre-Implementation Validation
|
|
195
228
|
|
|
196
|
-
|
|
229
|
+
Pre-Work Context: (Step 0 - v3.2.0)
|
|
230
|
+
- [ ] Read pre-work-context.md (if exists)
|
|
231
|
+
- Change Type: {type}
|
|
232
|
+
- Complexity: {n}/10
|
|
233
|
+
- Risk Level: {level}
|
|
234
|
+
- Libraries: {list from pre-work-context.md}
|
|
235
|
+
- Critical Checklist Items: {count}
|
|
236
|
+
- Integration Warnings: {count}
|
|
237
|
+
(OR: pre-work-context.md not found - using fallback steps)
|
|
238
|
+
|
|
239
|
+
Library Requirements: (Step 0.1 - fallback)
|
|
197
240
|
- [ ] Scanned tasks.md for "Install X" patterns
|
|
198
241
|
- [ ] Scanned design.md for design decisions
|
|
199
242
|
- Required libraries: {list from tasks.md/design.md}
|
|
@@ -205,7 +248,7 @@ Design Spec Implementation: (Step 5)
|
|
|
205
248
|
- {requirement 1 from design.md}
|
|
206
249
|
- {requirement 2 from design.md}
|
|
207
250
|
|
|
208
|
-
Memory Context: (Step 0.
|
|
251
|
+
Memory Context: (Step 0.3 - claude-mem)
|
|
209
252
|
- [ ] Queried claude-mem for related past work
|
|
210
253
|
- Relevant observations:
|
|
211
254
|
- {#ID: summary → will apply how}
|
|
@@ -214,7 +257,7 @@ Memory Context: (Step 0.6 - claude-mem)
|
|
|
214
257
|
Project Context:
|
|
215
258
|
- Project: {name}
|
|
216
259
|
- Stack: {tech-stack}
|
|
217
|
-
- Package Manager: {pm} (from tech-stack.md)
|
|
260
|
+
- Package Manager: {pm} (from tech-stack.md or pre-work-context.md)
|
|
218
261
|
|
|
219
262
|
Patterns Loaded:
|
|
220
263
|
- [ ] error-handling.md
|
|
@@ -223,13 +266,18 @@ Patterns Loaded:
|
|
|
223
266
|
- [ ] code-standards.md
|
|
224
267
|
- [ ] {agent-specific patterns}
|
|
225
268
|
|
|
226
|
-
Best Practices:
|
|
227
|
-
- [ ] {framework} best practices loaded
|
|
269
|
+
Best Practices: (from pre-work-context.md Section 2)
|
|
270
|
+
- [ ] {framework} best practices loaded
|
|
271
|
+
|
|
272
|
+
Critical Checklist: (from pre-work-context.md Section 5)
|
|
273
|
+
- [ ] {critical item 1}
|
|
274
|
+
- [ ] {critical item 2}
|
|
228
275
|
|
|
229
276
|
Ready to Implement:
|
|
230
277
|
- [ ] Task understood
|
|
231
278
|
- [ ] Dependencies identified
|
|
232
279
|
- [ ] Required libraries identified
|
|
280
|
+
- [ ] Critical checklist reviewed
|
|
233
281
|
- [ ] Memory context applied (if available)
|
|
234
282
|
- [ ] Approach planned (using specified libraries)
|
|
235
283
|
```
|