@warnyin/agents 0.13.0 → 0.15.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 +139 -125
  2. package/README.md +160 -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 +22 -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 -14
  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 -5
  24. package/src/.warnyin/installer/templates/CLAUDE.md +34 -34
  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 +105 -102
  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 -136
  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 +145 -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 +154 -131
  76. package/src/.warnyin/workflow/stages/discovery.md +256 -78
  77. package/src/.warnyin/workflow/stages/ship.md +94 -94
  78. package/src/.warnyin/workflow/stages/verify.md +82 -82
  79. package/src/.warnyin/workflow/triage.md +74 -74
  80. package/src/AGENTS.md +54 -54
  81. package/src/bin/cli.mjs +310 -310
package/CHANGELOG.md CHANGED
@@ -1,125 +1,139 @@
1
- # Changelog
2
-
3
- ทุกการเปลี่ยนแปลงที่สำคัญของโปรเจกต์นี้ถูกบันทึกในไฟล์นี้
4
-
5
- รูปแบบอ้างอิง [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
6
- และโปรเจกต์ยึด [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
7
-
8
- ## Migration guide
9
-
10
- อัปเกรดจากรุ่นเก่าที่ layout ต่างไป (installer จะ **เตือนให้ย้ายเอง ไม่แตะงานจริงของคุณ**):
11
-
12
- > **ลำดับที่แนะนำ: ย้ายงานจริงก่อน แล้วค่อยรัน `npx @warnyin/agents`**
13
- > คำสั่งย้ายด้านล่างใช้รูปแบบ `git mv <เก่า>/* docs/stages/` (ย้าย *เนื้อหา* ไม่ใช่ทั้งโฟลเดอร์) จึงปลอดภัยทั้งกรณีที่ยังไม่มี `docs/stages/` และกรณีที่เผลอรัน installer ไปก่อน (installer สร้าง `docs/stages/` เปล่าให้แล้ว) — กันงานจริงไปซ้อนเป็น `docs/stages/stages/`
14
-
15
- | จากรุ่น | layout เดิม | ต้องทำเอง (งานจริงปลอดภัย ไม่ถูกแตะ) |
16
- |---|---|---|
17
- | **≤0.2.x** | core `workflow/` + งานจริง `warnyin-stages/` ที่ root | `mkdir -p docs/stages && git mv warnyin-stages/* docs/stages/` แล้วลบ core เก่า `rm -rf workflow warnyin-stages` |
18
- | **0.3–0.5.x** | ทุกอย่างใต้ `warnyin/{workflow,template,installer,stages}` | `mkdir -p docs/stages && git mv warnyin/stages/* docs/stages/` แล้วลบ core เก่า `rm -rf warnyin` |
19
-
20
- จากนั้นรัน installer อีกครั้ง — installer จะวาง `.warnyin/` (core) ชุดใหม่ + แยกงานจริงไว้ที่ `docs/stages/` ให้
21
-
22
- > **0.6.0 → 0.7.0:** ผู้ใช้ปลายทาง (`npx @warnyin/agents`) **ไม่ต้องทำอะไร** — payload ที่ติดตั้งคงเดิม การเปลี่ยนแปลงทั้งหมด (bin path → `src/`, dogfood 2-layer) เป็นเรื่องภายใน repo เท่านั้น; ผู้พัฒนา repo เอง (contributor) ดู [`CONTRIBUTING.md`](CONTRIBUTING.md)
23
-
24
- ## [Unreleased]
25
-
26
- ## [0.13.0] - 2026-06-11
27
-
28
- ### Added
29
- - **Global install mode — ติดตั้งครั้งเดียวใช้ได้ทุกโปรเจกต์ (opt-in)** (feature `global-install`) — `npx @warnyin/agents --global` ติดตั้ง adapter → `~/.claude/{commands/warnyin,agents,skills}` + playbook → `~/.warnyin/{workflow,template}` **ครั้งเดียว** → `/warnyin:*` ใช้ได้ทุกโปรเจกต์ (Claude Code โหลด user-level `~/.claude/`). **Hybrid:** workspace (`docs/`) ยัง per-project; โปรเจกต์ที่มี `./.warnyin/` local → ใช้ local ก่อน (override → คง reproducibility); **per-project ยังเป็น default**. **mode resolution** `resolveMode()` (pure-fn): flag `--global`/`--project`; ไม่ระบุ+TTY → prompt; **non-TTY → project (CI-safe ไม่ค้าง)**; `--global --project` → error. **ปลอดภัยต่อ homedir:** first-install `overwrite:false` (ไม่ทับไฟล์ user ใน `~/.claude/{agents,skills}`), `installGlobalNote()` เขียน `~/.claude/CLAUDE.md` แบบ **append-with-marker** (ไม่แตะ personal global memory), homedir guard (falsy/root → error), echo target paths. **resolve playbook local-first → global** ผ่าน convention canonical ใน `CLAUDE.md`/`AGENTS.md`/`CLAUDE.global.md` (ไม่ duplicate ลงทุก adapter). `/warnyin:init` รับ workspace bootstrap (scaffold + seed `docs/`, อ่าน template local→global). **backward compatible** (project mode = default ไม่เปลี่ยน; `--global` opt-in). **limitation:** Codex/Antigravity global root doc รอบนี้ยังไม่รองรับ (per-project ใช้ได้เต็ม). zero-dep + cross-platform (`os.homedir()`, HOME/USERPROFILE); payload ติดมากับ `--update` รอบถัดไป
30
-
31
- ## [0.12.0] - 2026-06-11
32
-
33
- ### Added
34
- - **Change sizing — ประเมินขนาด change ก่อนจ่าย ceremony แล้วจ่ายให้พอดี** (feature `change-sizing`) — capability ใหม่ `/warnyin:triage` (read-only router) + playbook `src/.warnyin/workflow/triage.md`: รับคำอธิบาย change → จัดเป็น **3 tier `{fast, standard, large}`** ด้วย rubric (signals + tie-break ก้ำกึ่ง→standard + **hard-floor 5 หมวด** [auth/authz · data-migration/schema · secret/credential · public-API/contract(breaking) · security-sensitive] บังคับ ≥ standard เสมอ + escalation/downgrade symmetric) → **แนะนำ route แล้วหยุด** (ให้ user สั่ง command เอง — pattern เดียวกับ `next`; triage = request by size, next = topic by stage). **fast-track wiring ครบ 4 stage แบบ unify-in-place:** reframe `stages/design.md §7` (2-level → 3-tier ชี้ skip-list canonical, tier `large` บังคับ `/warnyin:discovery`) + pointer hook ใน `stages/verify.md` (verify-lite) + `stages/ship.md` (ship-lite) — **rubric canonical อยู่ที่ `triage.md` เดียว** ทุกที่ชี้ด้วย markdown-link/backtick runtime-ref ไม่ duplicate. **fast-track ลดเฉพาะ ceremony ไม่ลด correctness** (skip-list ต่อ stage แต่คง test-floor/archive); ต่อยอด `build-orchestration` (fast → model `cheap` + DAG width 1). adapter `src/.claude/commands/warnyin/triage.md` + register ใน slash-command list; tool-agnostic (playbook กลางทุก harness อ่านได้). payload ติดมากับ `--update` รอบถัดไป
35
-
36
- ## [0.11.0] - 2026-06-10
37
-
38
- ### Added
39
- - **Build orchestration — BUILD เร็วขึ้นด้วย DAG กว้าง + model routing + lean verify** (feature `build-orchestration`) — แก้ root cause ที่ BUILD ช้า ("1 agent/wave, chain ยาว") โดยปรับ playbook 2 ชั้นแบบ **unify-in-place**: **(โครงสร้าง — DESIGN)** `src/.warnyin/workflow/stages/design.md` §3 เพิ่ม **DAG-width toolkit** (3 เทคนิคลด serialization: contract-first decouple / re-slice ต่างแกน / ยอม serialize เฉพาะ chain แท้ — toolkit optional คงนิยาม vertical slice เดิม) + **critical-path gate** (Gate §8 judgment: วัด critical-path depth + max wave width; chain เส้นตรงต้องมีเหตุผล explicit) + **task/context lean**; `roles/tech-lead.md` checklist + template `design.md` §7 (ช่อง depth/wave-width). **(กลไก — BUILD)** `src/.warnyin/workflow/scripts/build-wave.mjs` รับ `tasks: string[] | Array<{name, model?}>` — `model` per task แบบ **pass-through** เข้า `agent()` (ไม่ map/hardcode ชื่อรุ่น — payload generic); orchestrator `src/.claude/commands/warnyin/build.md` map tier→รุ่นจริง (Claude adapter); `stages/build.md` §3 ทำ **self-verify = scope component ตัวเอง** (integration เลื่อนไป full-gate ที่คง blocking). vocab tier generic `{cheap, balanced, deepest}` ใน `task.md` field `Model tier` (ไม่ระบุ = balanced; ไม่แตะ `balanced+` ของ review). **พิสูจน์เชิงประจักษ์:** งานอิสระ 4 task ขนาน 1 wave เทียบ chain 4 wave = **~3.95× เร็วขึ้น** (token เท่ากัน) + redesign DAG ของ scaffold-foundation chain depth 4 → wave width 2. **backward compatible** (`tasks: string[]` เดิม + ไม่ส่ง `model` → พฤติกรรมเดิม); payload ติดมากับ `--update` รอบถัดไป
40
-
41
- ## [0.10.0] - 2026-06-09
42
-
43
- ### Added
44
- - **Adaptive API documentation (OpenAPI 3.1) ตลอด lifecycle** — capability กลางใหม่ `.warnyin/workflow/api-doc.md`: stage **auto-detect** ว่า topic แตะ backend/REST API ไหม (techstack/route/annotation/API task/endpoint change) ถ้าใช่ → ผลิต+ยืนยัน+ส่งมอบ **OpenAPI 3.1 contract** ให้อัตโนมัติ (ไม่ใช่ REST API → ข้ามเงียบ ไม่ยัดเยียด). เสียบ hook บางๆ เข้า 3 stage โดย **ไม่ duplicate logic**: **DESIGN** ผลิต `docs/stages/<slug>/openapi.yaml` (design-first/code-first/hybrid) + `spec.md` ของ API task ชี้มาที่ contract; **VERIFY** ยืนยัน implementation จริงตรง contract (regen+diff หรือยิง request จริง — mismatch = ไม่ผ่าน เข้า fix loop); **SHIP** promote/merge → `docs/techstack/<component>/openapi.yaml` (living API contract). เพิ่มเกณฑ์ Gate ทั้ง 3 stage (N/A ถ้าไม่ใช่ REST API). ยึดหลัก **reference ไม่ vendor**: ชี้ skill `openapi-spec-generation` (`wshobson/agents`) เป็น template library + เครื่องมือ (Spectral/Redocly/OpenAPI Generator) แบบติดตั้งเอง — เพิ่มแถว SA/Developer ใน `roles/README.md` §"Skill เสริม". tool-agnostic (Codex/Antigravity ใช้ playbook ชุดเดียวกัน); payload ติดมากับ `--update` รอบถัดไป
45
-
46
- ## [0.9.1] - 2026-06-08
47
-
48
- ### Fixed
49
- - **BUILD worktree เห็น dependency ครบทุก wave (build-wave sync build branch)** — harness fork worktree จาก **main** (คุมไม่ได้) ทำให้ build sub-agent ไม่เห็น `docs/stages/<slug>/` (topic docs) + output ของ wave ก่อนหน้า แล้ว improvise (KB#14). แก้ที่ payload แบบ **unify-in-place**: `src/.warnyin/workflow/scripts/build-wave.mjs` รับ arg `baseRef?` (ชื่อ build branch) + แทรก prompt **step `0.`** ให้ agent `git merge <baseRef> --no-edit` เป็นงานแรกก่อนอ่าน task **เฉพาะ `isolate && baseRef`** (`!baseRef` → ไม่แทรก = backward compat ไม่ renumber step 1-9) — มี **abort-on-conflict** (`|| git merge --abort` กันค้าง MERGE state) + retry transient lock + **hard-stop** (merge สำเร็จแต่ `task.md` ไม่ปรากฏ → STOP failed ห้าม improvise) + บันทึกผล merge ใน `notes`; command `src/.claude/commands/warnyin/build.md` step 6 ส่ง `baseRef` + integrate ด้วย `git checkout <branch> -- <scoped src files>` (เลี่ยง topic-docs copy + ปลอด KB#11 tracked-deletion); playbook `src/.warnyin/workflow/stages/build.md` §3 principle 3 + §4 step 5 อธิบายกลไก. **backward compatible** (caller ไม่ส่ง `baseRef`/`isolate:false` → พฤติกรรมเดิม); payload ติดมากับ `--update` รอบถัดไป
50
-
51
- ## [0.9.0] - 2026-06-08
52
-
53
- ### Added
54
- - **Structural validator + status script (`validate-topic.mjs`) wired เข้า workflow 3 จุด** — script เดียวใน payload (`src/.warnyin/workflow/scripts/validate-topic.mjs`, zero-dep ตาม pattern `lint-md.mjs`) 2 โหมด: **status** (ไม่ใส่ arg → ตารางทุก active topic, exit 0 เสมอ) · **validate** (`<slug>` → `✖`/`⚠` structural ละเอียด มี code C1–C5 กำกับ, exit 1 เมื่อมี ✖ · 0 เมื่อสะอาด/มีแค่ ⚠ · 2 slug ไม่ถูกต้อง/path traversal). wire เข้า playbook **3 จุดแบบ unify-in-place + node-guard ทุกจุด**: `next.md` (§2 step pre-scan โหมด status ก่อนอ่าน semantic — ตาราง heuristic เดิมคง fallback) · `stages/design.md` (§8 gate item "ทุก task มี 4 ไฟล์ครบ" → validate `<slug>` ควรไม่มี ✖, guidance ไม่ใช่ hard gate) · `stages/ship.md` (§4 step 1 → validate `<slug>` ก่อน promote, มี ✖ ควรแก้ก่อน) + command mirror `next/design/ship` (ชี้ playbook ไม่ duplicate รายการเช็ค). **structural เท่านั้น** — semantic ยังเป็นหน้าที่ model/ผู้ ship; **backward compatible** (เครื่องไม่มี node → playbook คง fallback เดิม); payload ติดมากับ `--update` รอบถัดไป
55
- - **วงจร Feature spec delta ครบ 3 stage (DESIGN/VERIFY/SHIP)** — wiring discipline ของ behavior spec แบบ unify-in-place ลง playbook กลาง + template + command adapter: `src/.warnyin/workflow/stages/design.md` (§2 input อ่าน `docs/features/<name>/spec.md` · §4 step 5 + §5 + §8 gate ครอบ "Spec delta") · `verify.md` (feature spec = regression baseline — scenario เดิม = regression case, delta = test case ใหม่; §2/§3/§4/§6) · `ship.md` (§4 step 5.1 merge `spec.md` ตาม delta — ADDED ต่อท้าย/MODIFIED แทนที่/REMOVED ลบ + **read-modify-verify key ไม่เจอ → STOP** + rename `[เดิมชื่อ:]` + stale delta re-check; §3/§5/§6 gate) · template `stages/[topic]/design.md` (+section "9. Spec delta") + `ship.md` (+แถว `spec.md`) · `src/.warnyin/workflow/README.md` note `spec.md` (living behavior spec) · command mirror `design/verify/ship` (ชี้ playbook ไม่ duplicate logic). **backward compatible** (feature ไม่มี spec → วิธีเดิม; topic ไม่มี §9 delta → SHIP ทำแบบเดิม); payload `.md` ล้วน ติดมากับ `--update` รอบถัดไป
56
-
57
- ## [0.8.5] - 2026-06-07
58
-
59
- ### Added
60
- - **Model-tier guidance ใน context profile** — `src/.warnyin/workflow/contexts/{research,build,review}.md` เพิ่มบรรทัด "Model tier" ใน section Tool preference (generic: `research`→`deepest reasoning` · `build`→`balanced`/fan-out worker เชิงกลไก→`cheap` · `review`→`balanced+`) + ตาราง legend ใน `contexts/README.md` — แนะนำ model tier ตาม posture เพื่อคุม token/cost; **tool-agnostic** ไม่ผูกชื่อรุ่น (harness map เอง) · global `docs/rule.md` §1 payload-guidance-generic — `.md` ล้วน, ติดมากับ `--update` รอบถัดไป
61
- - **Worked-example pointer ใน README** — section "ตัวอย่างจริง (worked example)" ชี้ `docs/example-walkthrough.md` (เดิน topic จริง `cli-legacy-warning-fix` ครบ 5 stage บน repo) ให้ผู้ใช้ใหม่เห็น artifact จริง
62
-
63
- ## [0.8.4] - 2026-06-07
64
-
65
- ### Added
66
- - **Utility skills (Claude adapter, auto-invocable)** — 3 safe utility skill ใหม่ `src/.claude/skills/{update-codemaps,explore,next}/SKILL.md` (`/update-codemaps`, `/explore`, `/next`): Claude project skill ที่ model **auto-invoke ได้เอง (description-driven)** body ชี้ playbook กลางเดิม (`.warnyin/workflow/{codemap,explore,next}.md`) ไม่ duplicate — auto-invoke เฉพาะ utility **read-only safe**; ผู้ใช้ปลายทางรับ skills อัตโนมัติตอน `npx @warnyin/agents` / `--update`. command `/warnyin:*` เดิม **ไม่เปลี่ยน** (non-breaking); build/ship คงเป็น command user-only (irreversible). global `docs/rule.md` §1 skill-adapter convention
67
-
68
- ### Changed
69
- - **installer/packaging รองรับ skills** — `cli.mjs` CORE +`.claude/skills`; `package.json files` +`src/.claude/skills` (nested dotfolder ระบุชัด); `verify-pack` ALLOWED_PREFIX +`src/.claude/skills/` + R1 assert `hasSkills` (skills เป็น required payload กันหล่นเงียบ); test suite 1819 (verify-pack 9→10)
70
-
71
- ## [0.8.3] - 2026-06-07
72
-
73
- ### Added
74
- - **Learned-rule capture ใน SHIP** — `ship.md` playbook (§3 principle 7 ขยาย + §4 step 1/3/5 + §6 gate) + command + template `[topic]/ship.md` (section "Learned rules"): จับ rule ที่ได้จากการทำจริง (planned + emergent จาก build/verify/troubleshooting) ด้วย `rule + evidence(บังคับ) + scope` แล้ว user ยืนยัน per-rule ก่อน promote — unify กับกลไก "รอ SHIP" เดิม; global `docs/rule.md` §1 + continuous-learning discipline + unify-in-place — `.md` ล้วน, ติดมากับ `--update` รอบถัดไป
75
-
76
- ## [0.8.2] - 2026-06-07
77
-
78
- ### Added
79
- - **Security checklist (agent-runtime + supply-chain)** — `roles/security.md` เพิ่ม section "Runtime / operational security" (secret isolation · no-egress · identity separation + Claude adapter note) + checklist item supply-chain/MCP (prompt-injection surface); `verify.md` §2 อ้าง runtime security ตอนรัน local env; `install-skill.md` step 4 เสริม warning prompt-injection; global `docs/rule.md` §3 ขยายเป็น Security baseline 2 มิติ (CI + agent-runtime) — `.md` ล้วน, ติดมากับ `--update` รอบถัดไป
80
-
81
- ## [0.8.1] - 2026-06-07
82
-
83
- ### Added
84
- - **Defensive rules** ใน BUILD/VERIFY playbook (§3) + developer.md/qa.md checklist + global `docs/rule.md` §1 — เวอร์ชัน enforce ของ "ห้ามเดา": (1) **investigate-before-edit** ก่อนแก้ไฟล์ที่มีอยู่ต้องเข้าใจ (ใครใช้/contract/เจตนา), (2) **config-protection** ห้ามแก้ config/test "เพื่อให้ผ่าน" แทนแก้โค้ดจริง — `.md` ล้วน, ติดมากับ `--update` รอบถัดไป
85
-
86
- ## [0.8.0] - 2026-06-07
87
-
88
- ### Added
89
- - **Context profiles** (`.warnyin/workflow/contexts/{research,build,review,README}.md`) — session-level posture 3 โหมด (สำรวจ/สร้าง/ตรวจ) คู่ขนานกับ role card (task-level lens); playbook แต่ละ stage มี callout ชี้ context ที่เข้าคู่ (Discovery→research · DESIGN→research+build · BUILD→build · VERIFY→review · SHIP→review) — `.md` ล้วน, ติดมากับ `--update` รอบถัดไป ไม่ต้องตั้งค่าเพิ่ม
90
-
91
- ### Fixed
92
- - โครงสร้าง repo ใน `.warnyin/workflow/README.md` ให้ตรง layout จริงหลัง restructure 0.7.0 (`src/` layer + `.warnyin/`) — เดิมยังเป็น layout เก่า (`warnyin/`, `bin/cli.mjs`)
93
-
94
- ## [0.7.0] - 2026-06-07
95
-
96
- ### Added
97
- - **Bootstrap / self-hosting (2-layer):** แยก source ของ warnyin ทั้งหมดเข้า `src/` (committed/publish layer); repo install release เสถียรไว้ root เป็น dogfood (`.warnyin/`/`.claude/`/`CLAUDE.md`/`AGENTS.md` — gitignored) เพื่อพัฒนา `src/` โดย workflow ที่ใช้ทำงานยังเสถียร
98
- - `npm run setup:dogfood` คืน dogfood env ที่ root จาก release (`npx @latest` + fallback `npm pack`→extract→node สำหรับ Windows), append pointer `CONTRIBUTING.md` แบบ idempotent
99
- - `npm run setup:sandbox` — install v-next จาก `src/` ลง temp dir (`os.tmpdir()`) เพื่อทดสอบ version skew โดยไม่แตะ dogfood ที่ root
100
- - `CONTRIBUTING.md` dev-instructions ของ repo (แยกจาก root `CLAUDE.md` เดิม)
101
- - pass-count gate (`src/scripts/check-test-count.mjs`) — anti-false-green: fail ถ้า `fail≠0` / `pass<9` / `pass≠tests`
102
- - Automated installer test suite (`node:test` black-box — spawn `src/bin/cli.mjs` จริงใน temp dir แล้ว assert side-effect) + unit test `checkFiles` รันด้วย `npm test`
103
- - GitHub Actions CI (`.github/workflows/ci.yml`) — matrix node 20/22/24 + job `pack-verify`
104
- - npm-pack verify (`src/scripts/verify-pack.mjs`) — testable `checkFiles(files)→errors[]`: allowlist granular + denylist (tooling/`docs/`/dogfood ที่ root) + tripwire (`settings.local.json`/`*.tgz`/`.env*`); assert `src/.warnyin/workflow/` + `src/.claude/commands/warnyin/` ติด tarball
105
-
106
- ### Changed
107
- - **bin path** `bin/cli.mjs` → `src/bin/cli.mjs` (restructure source เข้า `src/`) — `pkgRoot` resolve เป็น `src/` อัตโนมัติ, payload คงเดิม
108
- - `package.json files` เป็น allowlist granular — nested dotfolder ระบุชัด (`src/.warnyin`, `src/.claude/commands`, `src/.claude/agents`); ตัด `src/tests`/`src/scripts` (dev-only)
109
- - test/scripts ย้ายไป `src/tests/` + `src/scripts/`; `npm test` = `node --test` bare (auto-discover, portable node 20/22/24)
110
- - `engines.node` `>=18` → `>=20` (node 18 EOL)
111
- - `.gitignore` เพิ่ม dogfood layer (root-anchored ทุกบรรทัด กัน match `src/.claude`/`src/.warnyin`)
112
-
113
- ### Removed
114
- - รองรับ node 18 (drop ตาม EOL)
115
-
116
- [Unreleased]: https://github.com/warnyin/warnyin-agents/compare/v0.9.1...HEAD
117
- [0.9.1]: https://github.com/warnyin/warnyin-agents/compare/v0.9.0...v0.9.1
118
- [0.9.0]: https://github.com/warnyin/warnyin-agents/compare/v0.8.5...v0.9.0
119
- [0.8.5]: https://github.com/warnyin/warnyin-agents/compare/v0.8.4...v0.8.5
120
- [0.8.4]: https://github.com/warnyin/warnyin-agents/compare/v0.8.3...v0.8.4
121
- [0.8.3]: https://github.com/warnyin/warnyin-agents/compare/v0.8.2...v0.8.3
122
- [0.8.2]: https://github.com/warnyin/warnyin-agents/compare/v0.8.1...v0.8.2
123
- [0.8.1]: https://github.com/warnyin/warnyin-agents/compare/v0.8.0...v0.8.1
124
- [0.8.0]: https://github.com/warnyin/warnyin-agents/compare/v0.7.0...v0.8.0
125
- [0.7.0]: https://github.com/warnyin/warnyin-agents/compare/v0.6.0...v0.7.0
1
+ # Changelog
2
+
3
+ ทุกการเปลี่ยนแปลงที่สำคัญของโปรเจกต์นี้ถูกบันทึกในไฟล์นี้
4
+
5
+ รูปแบบอ้างอิง [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
6
+ และโปรเจกต์ยึด [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
7
+
8
+ ## Migration guide
9
+
10
+ อัปเกรดจากรุ่นเก่าที่ layout ต่างไป (installer จะ **เตือนให้ย้ายเอง ไม่แตะงานจริงของคุณ**):
11
+
12
+ > **ลำดับที่แนะนำ: ย้ายงานจริงก่อน แล้วค่อยรัน `npx @warnyin/agents`**
13
+ > คำสั่งย้ายด้านล่างใช้รูปแบบ `git mv <เก่า>/* docs/stages/` (ย้าย *เนื้อหา* ไม่ใช่ทั้งโฟลเดอร์) จึงปลอดภัยทั้งกรณีที่ยังไม่มี `docs/stages/` และกรณีที่เผลอรัน installer ไปก่อน (installer สร้าง `docs/stages/` เปล่าให้แล้ว) — กันงานจริงไปซ้อนเป็น `docs/stages/stages/`
14
+
15
+ | จากรุ่น | layout เดิม | ต้องทำเอง (งานจริงปลอดภัย ไม่ถูกแตะ) |
16
+ |---|---|---|
17
+ | **≤0.2.x** | core `workflow/` + งานจริง `warnyin-stages/` ที่ root | `mkdir -p docs/stages && git mv warnyin-stages/* docs/stages/` แล้วลบ core เก่า `rm -rf workflow warnyin-stages` |
18
+ | **0.3–0.5.x** | ทุกอย่างใต้ `warnyin/{workflow,template,installer,stages}` | `mkdir -p docs/stages && git mv warnyin/stages/* docs/stages/` แล้วลบ core เก่า `rm -rf warnyin` |
19
+
20
+ จากนั้นรัน installer อีกครั้ง — installer จะวาง `.warnyin/` (core) ชุดใหม่ + แยกงานจริงไว้ที่ `docs/stages/` ให้
21
+
22
+ > **0.6.0 → 0.7.0:** ผู้ใช้ปลายทาง (`npx @warnyin/agents`) **ไม่ต้องทำอะไร** — payload ที่ติดตั้งคงเดิม การเปลี่ยนแปลงทั้งหมด (bin path → `src/`, dogfood 2-layer) เป็นเรื่องภายใน repo เท่านั้น; ผู้พัฒนา repo เอง (contributor) ดู [`CONTRIBUTING.md`](CONTRIBUTING.md)
23
+
24
+ ## [Unreleased]
25
+
26
+ ### Fixed
27
+ - **`build-wave.mjs` launch ผ่าน Workflow tool ได้** — ลบ top-level `export function normalizeTasks`/`buildOpts` (คง `export const meta`) ที่ทำให้ Workflow loader พังด้วย `SyntaxError: Unexpected keyword 'export'` (runtime wrap body เป็น async fn) → BUILD fan-out wave ทำงานผ่าน Workflow script ได้โดยไม่ต้อง fallback. **behavior identical** (function ใช้ภายใน script, unit test สกัดด้วย extraction ไม่ต้องแก้). ปิดบั๊กที่ documented ค้างไว้ (`installer/rule.md` §build orchestration · troubleshooting #16/#20).
28
+
29
+ ### Changed
30
+ - **DESIGN stage — parallelize การสร้างเอกสาร (ลด wall-clock ไม่ลด correctness)** — เพิ่มหลักการแกน "Parallelize gathering, serialize judgment/narrative" ใน playbook `design.md` §3 + 3 จุด: (1) **parallel grounding** — fan-out อ่าน input หลายโดเมนขนาน (§4 step 2), (2) **task-file fan-out เป็น default สำหรับ standard/large** — หนึ่ง read-only agent ต่อหนึ่ง task ขนาน หลังผ่าน Gate §8 (§4 step 9; fast tier = 1 task เขียนเอง), (3) **design narrative = single-writer guardrail** — research เก็บ fact ขนานได้ แต่เขียน narrative โดย main loop คนเดียว (§4 step 5). ปรับ adapter `src/.claude/commands/warnyin/design.md` §5 สะท้อน fan-out default. **backward-compatible:** ทุกจุดมี fallback (เครื่องที่ fan-out ไม่ได้ทำตามลำดับเหมือนเดิม — tool-agnostic).
31
+
32
+ ## [0.14.0] - 2026-06-11
33
+
34
+ ### Added
35
+ - **DESIGN sizing gate — establish tier ก่อนจ่าย ceremony** (เสริม feature `change-sizing`) — เพิ่ม **step 1.5 "Establish tier"** ใน `src/.warnyin/workflow/stages/design.md §4` (ก่อน `business.md`/`proposal`): DESIGN **ประเมินขนาด change เบื้องต้นเอง** ตาม rubric (`triage.md` signals + hard-floor) → **มั่นใจ = กำหนด tier + บันทึก `proposal.md`**; **ไม่มั่นใจ/ก้ำกึ่ง = ถาม user เป็น options** (ประเมินด้วย `/warnyin:triage` ก่อน / user กำหนด tier เองถ้ารู้; ก้ำกึ่ง default = ปัดขึ้น `standard`); **hard-floor** (auth/migration/secret/public-API/security-sensitive) บังคับ ≥ standard เสมอ. อุดช่องว่างเดิมที่ `§7` **บริโภค** tier แต่ไม่มีตัวการันตีว่า established จริง (DESIGN เคยเดินโดยไม่รู้ขนาด). `§7` เพิ่มประโยคชี้ "tier ถูก established ที่ §4 step 1.5" (ไม่ inline rubric — ชี้ `triage.md`); ปรับช่อง `ขนาด` ใน proposal template `เล็ก/กลาง/ใหญ่` → `fast/standard/large` (vocab ตรง triage). tier = judgment (⚠ ไม่ใช่ validator). payload ติดมากับ `--update` รอบถัดไป
36
+
37
+ ### Fixed
38
+ - **`docs/features/global-install/spec.md`** — เพิ่ม `WHEN` ที่ขาดใน scenario "--global + --project → error" (validate-topic C5)
39
+
40
+ ## [0.13.0] - 2026-06-11
41
+
42
+ ### Added
43
+ - **Global install mode — ติดตั้งครั้งเดียวใช้ได้ทุกโปรเจกต์ (opt-in)** (feature `global-install`) — `npx @warnyin/agents --global` ติดตั้ง adapter → `~/.claude/{commands/warnyin,agents,skills}` + playbook → `~/.warnyin/{workflow,template}` **ครั้งเดียว** → `/warnyin:*` ใช้ได้ทุกโปรเจกต์ (Claude Code โหลด user-level `~/.claude/`). **Hybrid:** workspace (`docs/`) ยัง per-project; โปรเจกต์ที่มี `./.warnyin/` local → ใช้ local ก่อน (override → คง reproducibility); **per-project ยังเป็น default**. **mode resolution** `resolveMode()` (pure-fn): flag `--global`/`--project`; ไม่ระบุ+TTY → prompt; **non-TTY → project (CI-safe ไม่ค้าง)**; `--global --project` → error. **ปลอดภัยต่อ homedir:** first-install `overwrite:false` (ไม่ทับไฟล์ user ใน `~/.claude/{agents,skills}`), `installGlobalNote()` เขียน `~/.claude/CLAUDE.md` แบบ **append-with-marker** (ไม่แตะ personal global memory), homedir guard (falsy/root → error), echo target paths. **resolve playbook local-first → global** ผ่าน convention canonical ใน `CLAUDE.md`/`AGENTS.md`/`CLAUDE.global.md` (ไม่ duplicate ลงทุก adapter). `/warnyin:init` รับ workspace bootstrap (scaffold + seed `docs/`, อ่าน template local→global). **backward compatible** (project mode = default ไม่เปลี่ยน; `--global` opt-in). **limitation:** Codex/Antigravity global root doc รอบนี้ยังไม่รองรับ (per-project ใช้ได้เต็ม). zero-dep + cross-platform (`os.homedir()`, HOME/USERPROFILE); payload ติดมากับ `--update` รอบถัดไป
44
+
45
+ ## [0.12.0] - 2026-06-11
46
+
47
+ ### Added
48
+ - **Change sizing — ประเมินขนาด change ก่อนจ่าย ceremony แล้วจ่ายให้พอดี** (feature `change-sizing`) — capability ใหม่ `/warnyin:triage` (read-only router) + playbook `src/.warnyin/workflow/triage.md`: รับคำอธิบาย change → จัดเป็น **3 tier `{fast, standard, large}`** ด้วย rubric (signals + tie-break ก้ำกึ่ง→standard + **hard-floor 5 หมวด** [auth/authz · data-migration/schema · secret/credential · public-API/contract(breaking) · security-sensitive] บังคับ ≥ standard เสมอ + escalation/downgrade symmetric) → **แนะนำ route แล้วหยุด** (ให้ user สั่ง command เอง — pattern เดียวกับ `next`; triage = request by size, next = topic by stage). **fast-track wiring ครบ 4 stage แบบ unify-in-place:** reframe `stages/design.md §7` (2-level → 3-tier ชี้ skip-list canonical, tier `large` บังคับ `/warnyin:discovery`) + pointer hook ใน `stages/verify.md` (verify-lite) + `stages/ship.md` (ship-lite) — **rubric canonical อยู่ที่ `triage.md` เดียว** ทุกที่ชี้ด้วย markdown-link/backtick runtime-ref ไม่ duplicate. **fast-track ลดเฉพาะ ceremony ไม่ลด correctness** (skip-list ต่อ stage แต่คง test-floor/archive); ต่อยอด `build-orchestration` (fast → model `cheap` + DAG width 1). adapter `src/.claude/commands/warnyin/triage.md` + register ใน slash-command list; tool-agnostic (playbook กลางทุก harness อ่านได้). payload ติดมากับ `--update` รอบถัดไป
49
+
50
+ ## [0.11.0] - 2026-06-10
51
+
52
+ ### Added
53
+ - **Build orchestration — BUILD เร็วขึ้นด้วย DAG กว้าง + model routing + lean verify** (feature `build-orchestration`) — แก้ root cause ที่ BUILD ช้า ("1 agent/wave, chain ยาว") โดยปรับ playbook 2 ชั้นแบบ **unify-in-place**: **(โครงสร้าง — DESIGN)** `src/.warnyin/workflow/stages/design.md` §3 เพิ่ม **DAG-width toolkit** (3 เทคนิคลด serialization: contract-first decouple / re-slice ต่างแกน / ยอม serialize เฉพาะ chain แท้ — toolkit optional คงนิยาม vertical slice เดิม) + **critical-path gate** (Gate §8 judgment: วัด critical-path depth + max wave width; chain เส้นตรงต้องมีเหตุผล explicit) + **task/context lean**; `roles/tech-lead.md` checklist + template `design.md` §7 (ช่อง depth/wave-width). **(กลไก — BUILD)** `src/.warnyin/workflow/scripts/build-wave.mjs` รับ `tasks: string[] | Array<{name, model?}>` — `model` per task แบบ **pass-through** เข้า `agent()` (ไม่ map/hardcode ชื่อรุ่น — payload generic); orchestrator `src/.claude/commands/warnyin/build.md` map tier→รุ่นจริง (Claude adapter); `stages/build.md` §3 ทำ **self-verify = scope component ตัวเอง** (integration เลื่อนไป full-gate ที่คง blocking). vocab tier generic `{cheap, balanced, deepest}` ใน `task.md` field `Model tier` (ไม่ระบุ = balanced; ไม่แตะ `balanced+` ของ review). **พิสูจน์เชิงประจักษ์:** งานอิสระ 4 task ขนาน 1 wave เทียบ chain 4 wave = **~3.95× เร็วขึ้น** (token เท่ากัน) + redesign DAG ของ scaffold-foundation chain depth 4 → wave width 2. **backward compatible** (`tasks: string[]` เดิม + ไม่ส่ง `model` → พฤติกรรมเดิม); payload ติดมากับ `--update` รอบถัดไป
54
+
55
+ ## [0.10.0] - 2026-06-09
56
+
57
+ ### Added
58
+ - **Adaptive API documentation (OpenAPI 3.1) ตลอด lifecycle** — capability กลางใหม่ `.warnyin/workflow/api-doc.md`: stage **auto-detect** ว่า topic แตะ backend/REST API ไหม (techstack/route/annotation/API task/endpoint change) ถ้าใช่ → ผลิต+ยืนยัน+ส่งมอบ **OpenAPI 3.1 contract** ให้อัตโนมัติ (ไม่ใช่ REST API → ข้ามเงียบ ไม่ยัดเยียด). เสียบ hook บางๆ เข้า 3 stage โดย **ไม่ duplicate logic**: **DESIGN** ผลิต `docs/stages/<slug>/openapi.yaml` (design-first/code-first/hybrid) + `spec.md` ของ API task ชี้มาที่ contract; **VERIFY** ยืนยัน implementation จริงตรง contract (regen+diff หรือยิง request จริง — mismatch = ไม่ผ่าน เข้า fix loop); **SHIP** promote/merge → `docs/techstack/<component>/openapi.yaml` (living API contract). เพิ่มเกณฑ์ Gate ทั้ง 3 stage (N/A ถ้าไม่ใช่ REST API). ยึดหลัก **reference ไม่ vendor**: ชี้ skill `openapi-spec-generation` (`wshobson/agents`) เป็น template library + เครื่องมือ (Spectral/Redocly/OpenAPI Generator) แบบติดตั้งเอง — เพิ่มแถว SA/Developer ใน `roles/README.md` §"Skill เสริม". tool-agnostic (Codex/Antigravity ใช้ playbook ชุดเดียวกัน); payload ติดมากับ `--update` รอบถัดไป
59
+
60
+ ## [0.9.1] - 2026-06-08
61
+
62
+ ### Fixed
63
+ - **BUILD worktree เห็น dependency ครบทุก wave (build-wave sync build branch)** — harness fork worktree จาก **main** (คุมไม่ได้) ทำให้ build sub-agent ไม่เห็น `docs/stages/<slug>/` (topic docs) + output ของ wave ก่อนหน้า แล้ว improvise (KB#14). แก้ที่ payload แบบ **unify-in-place**: `src/.warnyin/workflow/scripts/build-wave.mjs` รับ arg `baseRef?` (ชื่อ build branch) + แทรก prompt **step `0.`** ให้ agent `git merge <baseRef> --no-edit` เป็นงานแรกก่อนอ่าน task **เฉพาะ `isolate && baseRef`** (`!baseRef` → ไม่แทรก = backward compat ไม่ renumber step 1-9) — มี **abort-on-conflict** (`|| git merge --abort` กันค้าง MERGE state) + retry transient lock + **hard-stop** (merge สำเร็จแต่ `task.md` ไม่ปรากฏ → STOP failed ห้าม improvise) + บันทึกผล merge ใน `notes`; command `src/.claude/commands/warnyin/build.md` step 6 ส่ง `baseRef` + integrate ด้วย `git checkout <branch> -- <scoped src files>` (เลี่ยง topic-docs copy + ปลอด KB#11 tracked-deletion); playbook `src/.warnyin/workflow/stages/build.md` §3 principle 3 + §4 step 5 อธิบายกลไก. **backward compatible** (caller ไม่ส่ง `baseRef`/`isolate:false` → พฤติกรรมเดิม); payload ติดมากับ `--update` รอบถัดไป
64
+
65
+ ## [0.9.0] - 2026-06-08
66
+
67
+ ### Added
68
+ - **Structural validator + status script (`validate-topic.mjs`) wired เข้า workflow 3 จุด** — script เดียวใน payload (`src/.warnyin/workflow/scripts/validate-topic.mjs`, zero-dep ตาม pattern `lint-md.mjs`) 2 โหมด: **status** (ไม่ใส่ arg → ตารางทุก active topic, exit 0 เสมอ) · **validate** (`<slug>` → `✖`/`⚠` structural ละเอียด มี code C1–C5 กำกับ, exit 1 เมื่อมี ✖ · 0 เมื่อสะอาด/มีแค่ ⚠ · 2 slug ไม่ถูกต้อง/path traversal). wire เข้า playbook **3 จุดแบบ unify-in-place + node-guard ทุกจุด**: `next.md` (§2 step pre-scan โหมด status ก่อนอ่าน semantic — ตาราง heuristic เดิมคง fallback) · `stages/design.md` (§8 gate item "ทุก task มี 4 ไฟล์ครบ" → validate `<slug>` ควรไม่มี ✖, guidance ไม่ใช่ hard gate) · `stages/ship.md` (§4 step 1 → validate `<slug>` ก่อน promote, มี ✖ ควรแก้ก่อน) + command mirror `next/design/ship` (ชี้ playbook ไม่ duplicate รายการเช็ค). **structural เท่านั้น** — semantic ยังเป็นหน้าที่ model/ผู้ ship; **backward compatible** (เครื่องไม่มี node → playbook คง fallback เดิม); payload ติดมากับ `--update` รอบถัดไป
69
+ - **วงจร Feature spec delta ครบ 3 stage (DESIGN/VERIFY/SHIP)** — wiring discipline ของ behavior spec แบบ unify-in-place ลง playbook กลาง + template + command adapter: `src/.warnyin/workflow/stages/design.md` (§2 input อ่าน `docs/features/<name>/spec.md` · §4 step 5 + §5 + §8 gate ครอบ "Spec delta") · `verify.md` (feature spec = regression baseline — scenario เดิม = regression case, delta = test case ใหม่; §2/§3/§4/§6) · `ship.md` (§4 step 5.1 merge `spec.md` ตาม delta — ADDED ต่อท้าย/MODIFIED แทนที่/REMOVED ลบ + **read-modify-verify key ไม่เจอ → STOP** + rename `[เดิมชื่อ:]` + stale delta re-check; §3/§5/§6 gate) · template `stages/[topic]/design.md` (+section "9. Spec delta") + `ship.md` (+แถว `spec.md`) · `src/.warnyin/workflow/README.md` note `spec.md` (living behavior spec) · command mirror `design/verify/ship` (ชี้ playbook ไม่ duplicate logic). **backward compatible** (feature ไม่มี spec วิธีเดิม; topic ไม่มี §9 delta SHIP ทำแบบเดิม); payload `.md` ล้วน ติดมากับ `--update` รอบถัดไป
70
+
71
+ ## [0.8.5] - 2026-06-07
72
+
73
+ ### Added
74
+ - **Model-tier guidance ใน context profile** — `src/.warnyin/workflow/contexts/{research,build,review}.md` เพิ่มบรรทัด "Model tier" ใน section Tool preference (generic: `research`→`deepest reasoning` · `build`→`balanced`/fan-out worker เชิงกลไก→`cheap` · `review`→`balanced+`) + ตาราง legend ใน `contexts/README.md` แนะนำ model tier ตาม posture เพื่อคุม token/cost; **tool-agnostic** ไม่ผูกชื่อรุ่น (harness map เอง) · global `docs/rule.md` §1 payload-guidance-generic — `.md` ล้วน, ติดมากับ `--update` รอบถัดไป
75
+ - **Worked-example pointer ใน README** — section "ตัวอย่างจริง (worked example)" ชี้ `docs/example-walkthrough.md` (เดิน topic จริง `cli-legacy-warning-fix` ครบ 5 stage บน repo) ให้ผู้ใช้ใหม่เห็น artifact จริง
76
+
77
+ ## [0.8.4] - 2026-06-07
78
+
79
+ ### Added
80
+ - **Utility skills (Claude adapter, auto-invocable)** — 3 safe utility skill ใหม่ `src/.claude/skills/{update-codemaps,explore,next}/SKILL.md` (`/update-codemaps`, `/explore`, `/next`): Claude project skill ที่ model **auto-invoke ได้เอง (description-driven)** body ชี้ playbook กลางเดิม (`.warnyin/workflow/{codemap,explore,next}.md`) ไม่ duplicate — auto-invoke เฉพาะ utility **read-only safe**; ผู้ใช้ปลายทางรับ skills อัตโนมัติตอน `npx @warnyin/agents` / `--update`. command `/warnyin:*` เดิม **ไม่เปลี่ยน** (non-breaking); build/ship คงเป็น command user-only (irreversible). global `docs/rule.md` §1 skill-adapter convention
81
+
82
+ ### Changed
83
+ - **installer/packaging รองรับ skills** — `cli.mjs` CORE +`.claude/skills`; `package.json files` +`src/.claude/skills` (nested dotfolder ระบุชัด); `verify-pack` ALLOWED_PREFIX +`src/.claude/skills/` + R1 assert `hasSkills` (skills เป็น required payload กันหล่นเงียบ); test suite 18→19 (verify-pack 9→10)
84
+
85
+ ## [0.8.3] - 2026-06-07
86
+
87
+ ### Added
88
+ - **Learned-rule capture ใน SHIP** — `ship.md` playbook (§3 principle 7 ขยาย + §4 step 1/3/5 + §6 gate) + command + template `[topic]/ship.md` (section "Learned rules"): จับ rule ที่ได้จากการทำจริง (planned + emergent จาก build/verify/troubleshooting) ด้วย `rule + evidence(บังคับ) + scope` แล้ว user ยืนยัน per-rule ก่อน promote — unify กับกลไก "รอ SHIP" เดิม; global `docs/rule.md` §1 + continuous-learning discipline + unify-in-place — `.md` ล้วน, ติดมากับ `--update` รอบถัดไป
89
+
90
+ ## [0.8.2] - 2026-06-07
91
+
92
+ ### Added
93
+ - **Security checklist (agent-runtime + supply-chain)** — `roles/security.md` เพิ่ม section "Runtime / operational security" (secret isolation · no-egress · identity separation + Claude adapter note) + checklist item supply-chain/MCP (prompt-injection surface); `verify.md` §2 อ้าง runtime security ตอนรัน local env; `install-skill.md` step 4 เสริม warning prompt-injection; global `docs/rule.md` §3 ขยายเป็น Security baseline 2 มิติ (CI + agent-runtime) — `.md` ล้วน, ติดมากับ `--update` รอบถัดไป
94
+
95
+ ## [0.8.1] - 2026-06-07
96
+
97
+ ### Added
98
+ - **Defensive rules** ใน BUILD/VERIFY playbook (§3) + developer.md/qa.md checklist + global `docs/rule.md` §1 เวอร์ชัน enforce ของ "ห้ามเดา": (1) **investigate-before-edit** ก่อนแก้ไฟล์ที่มีอยู่ต้องเข้าใจ (ใครใช้/contract/เจตนา), (2) **config-protection** ห้ามแก้ config/test "เพื่อให้ผ่าน" แทนแก้โค้ดจริง — `.md` ล้วน, ติดมากับ `--update` รอบถัดไป
99
+
100
+ ## [0.8.0] - 2026-06-07
101
+
102
+ ### Added
103
+ - **Context profiles** (`.warnyin/workflow/contexts/{research,build,review,README}.md`) — session-level posture 3 โหมด (สำรวจ/สร้าง/ตรวจ) คู่ขนานกับ role card (task-level lens); playbook แต่ละ stage มี callout ชี้ context ที่เข้าคู่ (Discovery→research · DESIGN→research+build · BUILD→build · VERIFY→review · SHIP→review) — `.md` ล้วน, ติดมากับ `--update` รอบถัดไป ไม่ต้องตั้งค่าเพิ่ม
104
+
105
+ ### Fixed
106
+ - โครงสร้าง repo ใน `.warnyin/workflow/README.md` ให้ตรง layout จริงหลัง restructure 0.7.0 (`src/` layer + `.warnyin/`) — เดิมยังเป็น layout เก่า (`warnyin/`, `bin/cli.mjs`)
107
+
108
+ ## [0.7.0] - 2026-06-07
109
+
110
+ ### Added
111
+ - **Bootstrap / self-hosting (2-layer):** แยก source ของ warnyin ทั้งหมดเข้า `src/` (committed/publish layer); repo install release เสถียรไว้ root เป็น dogfood (`.warnyin/`/`.claude/`/`CLAUDE.md`/`AGENTS.md` — gitignored) เพื่อพัฒนา `src/` โดย workflow ที่ใช้ทำงานยังเสถียร
112
+ - `npm run setup:dogfood` — คืน dogfood env ที่ root จาก release (`npx @latest` + fallback `npm pack`→extract→node สำหรับ Windows), append pointer → `CONTRIBUTING.md` แบบ idempotent
113
+ - `npm run setup:sandbox` — install v-next จาก `src/` ลง temp dir (`os.tmpdir()`) เพื่อทดสอบ version skew โดยไม่แตะ dogfood ที่ root
114
+ - `CONTRIBUTING.md` dev-instructions ของ repo (แยกจาก root `CLAUDE.md` เดิม)
115
+ - pass-count gate (`src/scripts/check-test-count.mjs`) — anti-false-green: fail ถ้า `fail≠0` / `pass<9` / `pass≠tests`
116
+ - Automated installer test suite (`node:test` black-box — spawn `src/bin/cli.mjs` จริงใน temp dir แล้ว assert side-effect) + unit test `checkFiles` รันด้วย `npm test`
117
+ - GitHub Actions CI (`.github/workflows/ci.yml`) — matrix node 20/22/24 + job `pack-verify`
118
+ - npm-pack verify (`src/scripts/verify-pack.mjs`) — testable `checkFiles(files)→errors[]`: allowlist granular + denylist (tooling/`docs/`/dogfood ที่ root) + tripwire (`settings.local.json`/`*.tgz`/`.env*`); assert `src/.warnyin/workflow/` + `src/.claude/commands/warnyin/` ติด tarball
119
+
120
+ ### Changed
121
+ - **bin path** `bin/cli.mjs` → `src/bin/cli.mjs` (restructure source เข้า `src/`) — `pkgRoot` resolve เป็น `src/` อัตโนมัติ, payload คงเดิม
122
+ - `package.json files` เป็น allowlist granular — nested dotfolder ระบุชัด (`src/.warnyin`, `src/.claude/commands`, `src/.claude/agents`); ตัด `src/tests`/`src/scripts` (dev-only)
123
+ - test/scripts ย้ายไป `src/tests/` + `src/scripts/`; `npm test` = `node --test` bare (auto-discover, portable node 20/22/24)
124
+ - `engines.node` `>=18` → `>=20` (node 18 EOL)
125
+ - `.gitignore` เพิ่ม dogfood layer (root-anchored ทุกบรรทัด — กัน match `src/.claude`/`src/.warnyin`)
126
+
127
+ ### Removed
128
+ - รองรับ node 18 (drop ตาม EOL)
129
+
130
+ [Unreleased]: https://github.com/warnyin/warnyin-agents/compare/v0.9.1...HEAD
131
+ [0.9.1]: https://github.com/warnyin/warnyin-agents/compare/v0.9.0...v0.9.1
132
+ [0.9.0]: https://github.com/warnyin/warnyin-agents/compare/v0.8.5...v0.9.0
133
+ [0.8.5]: https://github.com/warnyin/warnyin-agents/compare/v0.8.4...v0.8.5
134
+ [0.8.4]: https://github.com/warnyin/warnyin-agents/compare/v0.8.3...v0.8.4
135
+ [0.8.3]: https://github.com/warnyin/warnyin-agents/compare/v0.8.2...v0.8.3
136
+ [0.8.2]: https://github.com/warnyin/warnyin-agents/compare/v0.8.1...v0.8.2
137
+ [0.8.1]: https://github.com/warnyin/warnyin-agents/compare/v0.8.0...v0.8.1
138
+ [0.8.0]: https://github.com/warnyin/warnyin-agents/compare/v0.7.0...v0.8.0
139
+ [0.7.0]: https://github.com/warnyin/warnyin-agents/compare/v0.6.0...v0.7.0