| name | setup-business |
| category | thai-sme-owner |
| version | 1.0.0 |
| description | First-run onboarding — interview the owner, then create the real KMS files (business-context, finance-rules, pricing-policy, tone-of-voice) in .thclaws/kms/ from the blank templates in .thclaws/templates/, verify completeness, and mark the framework ready to use. |
| risk_level | low |
| output_type | markdown |
Setup Business Skill (First-Run Onboarding)
Purpose
ทุก workflow ในระบบนี้พึ่งพา KMS (.thclaws/kms/) เป็นข้อมูลอ้างอิง — ถ้า KMS ยังเป็นค่าว่าง ระบบจะเดาข้อมูลธุรกิจไม่ได้และ output จะผิด
Skill นี้เปลี่ยน template เปล่าใน .thclaws/templates/ ให้เป็นไฟล์ความรู้จริงใน .thclaws/kms/ ผ่านการสัมภาษณ์ทีละหมวด แล้วตรวจความครบถ้วนก่อนประกาศว่าระบบพร้อมใช้
Use When
- ติดตั้ง framework ครั้งแรก (ยังไม่มีไฟล์
.thclaws/kms/business-context.md)
- เปลี่ยนธุรกิจ / เพิ่ม business unit ใหม่
- User พิมพ์
/setup-business หรือถาม "เริ่มใช้งานยังไง" / "setup ข้อมูลบริษัท"
Required Inputs
- คำตอบจาก owner (สัมภาษณ์เป็นรอบ ทีละหมวด — ไม่ต้องเตรียมไฟล์ก่อนก็เริ่มได้)
- Optional: เอกสารที่มีอยู่แล้ว เช่น price list, company profile, ผังบัญชี, ตัวอย่างใบเสนอราคา/อีเมลเก่า — ถ้ามี ให้วางใน
workspace/08-Inbox/ ก่อนเริ่ม แล้ว skill จะอ่านมา pre-fill ให้ owner ยืนยันแทนการถามทีละข้อ
Workflow
-
Check state — ตรวจว่า .thclaws/kms/ มีไฟล์จริงหรือยัง
- มีครบแล้ว → รายงานสถานะ ถามว่าต้องการ update หมวดไหน
- มีบางส่วน → ทำต่อเฉพาะหมวดที่ขาด
- ยังไม่มี → เริ่ม Phase ทั้งหมดตามลำดับ
-
Pre-fill from documents (optional) — ถ้ามีไฟล์ใน workspace/08-Inbox/ ให้อ่านแล้ว draft คำตอบล่วงหน้า ระบุชัดว่าข้อไหนมาจากเอกสาร ข้อไหนยังต้องถาม
-
Interview per phase — ถามทีละหมวด หมวดละไม่เกิน ~8 คำถาม ใช้ template เป็น checklist:
| Phase | Template | Output file | จำเป็น |
|---|
| 1. ข้อมูลบริษัท | .thclaws/templates/business-context.template.md | .thclaws/kms/business-context.md | ✅ ต้องมีก่อนใช้ทุก workflow |
| 2. กติกาการเงิน | .thclaws/templates/finance-rules.template.md | .thclaws/kms/finance-rules.md | ✅ ก่อนใช้ /expense-report, /close-month |
| 3. นโยบายราคา | .thclaws/templates/pricing-policy.template.md | .thclaws/kms/pricing-policy.md | ✅ ก่อนใช้ /quotation |
| 4. โทนภาษา | .thclaws/templates/tone-of-voice.template.md | .thclaws/kms/tone-of-voice.md | แนะนำ — ใช้กับทุก output ที่ถึงลูกค้า |
| 5. ลูกค้าหลัก | .thclaws/templates/customer-template.md | .thclaws/kms/customers/<name>.md หรือ workspace/01-Customers/Active/<name>/customer.md | เริ่มจากลูกค้า top 3–5 พอ |
กติกาการถาม: ยอมรับคำตอบ "ยังไม่มี / ไม่แน่ใจ" ได้ — ให้ใส่ TBD พร้อม comment ว่าต้องเติมภายหลัง ห้ามแต่งข้อมูลแทน owner
-
Write KMS files — สร้างไฟล์ใน .thclaws/kms/ ตาม template structure เดิม (คงหัวข้อครบทุก section แม้บาง field เป็น TBD) ห้ามแก้ไฟล์ template ต้นทาง
-
Setup workspace — ถ้ายังไม่มีโครงสร้าง folder ตาม WORKSPACE-SETUP.md เสนอสร้าง workspace/01-Customers/ ถึง workspace/09-Outputs/ + workspace/99-Templates/ และ sync BUSINESS_CONTEXT.md ที่ repository root จาก .thclaws/kms/business-context.md — การสร้าง folder/ไฟล์จำนวนมากต้องผ่าน approval gate ตามปกติ
-
Verify — ตรวจ completeness ต่อไฟล์:
- นับ field ที่ยังเป็น TBD ต่อหมวด
- Field วิกฤตห้ามเป็น TBD: ชื่อบริษัท, ประเภทธุรกิจ, สินค้า/บริการหลัก, สกุลเงิน, VAT registration status, default payment terms, discount approval threshold
- ถ้า field วิกฤตยังว่าง → แจ้ง owner ว่า workflow ไหนยังใช้ไม่ได้เพราะอะไร
-
Readiness report — สรุปเป็น workspace/09-Outputs/Reports/setup-readiness_<date>.md:
- ไฟล์ KMS ที่สร้างแล้ว + % ความครบถ้วน
- Workflow ที่พร้อมใช้ / ยังไม่พร้อม (พร้อมเหตุผล)
- รายการ TBD ที่ต้องกลับมาเติม
- แนะนำ workflow แรกที่ควรลองโดยดู reversibility/mode:
/morning-brief = Medium + owner review; /organize-files = plan-only และ High หาก execute
-
Log — เขียน Standard Log ลง workspace/09-Outputs/Logs/
Output Contract
- ไฟล์ KMS จริงใน
.thclaws/kms/ (อย่างน้อย business-context.md)
workspace/09-Outputs/Reports/setup-readiness_<date>.md
- Standard Log ใน
workspace/09-Outputs/Logs/
Risk Control
- ห้ามแต่งข้อมูลธุรกิจที่ owner ไม่ได้ให้ — ใส่ TBD เท่านั้น
- ห้ามแก้/ลบ template ใน
.thclaws/templates/
- ถ้าไฟล์ KMS มีอยู่แล้ว การเขียนทับต้องขอ approval (
action_type: file_overwrite)
- ข้อมูลการเงิน/ภาษีที่ owner ให้ ถือเป็น input ไม่ใช่คำแนะนำทางบัญชี — งานภาษีจริงให้ผ่านนักบัญชี