GiANTbEAN Engineering Note · 2026-08-20

Agent OS: สมองเดียว สองราง

OMP เป็น runtime หลักและ Claude Code เป็น warm standby แต่ทั้งคู่รับตัวตน กติกา ทักษะ และความจำจากแกนกลางเดียวกัน—จึงสลับเครื่องมือได้โดยไม่ต้องสร้าง “คนใหม่” ทุกครั้ง

Author: bEAN Language: TH / EN commands Scope: identity · teams · memory · skills · hooks · launchers
01 / Why

เปลี่ยนราง ไม่แยกสมอง

ปัญหาเดิมไม่ใช่ “เครื่องมือไหนเก่งกว่า” แต่คือข้อมูลสำคัญกระจายอยู่หลายบ้าน: charter บอกว่า agent เป็นใคร, memory บอกสิ่งที่เรียนรู้, board บอกงานสด, skills บอกวิธีทำงาน และแต่ละ harness เคยเห็นไม่เท่ากัน

คำตอบที่เรียบกว่า: ไม่ sync OMP กับ Claude Code ไปมา ให้ทั้งสองเป็นเพียง adapter ที่อ่าน Agent OS canonical เดียวกันแทน เหมือนรถไฟสองขบวนใช้สถานีกลางเดียว ไม่สร้างเมืองซ้ำสองเมือง

Invariant: Canonical state ชนะ runtime memory เสมอ · ไม่มี CC↔OMP direct sync · OMP local memory ยังคง off
02 / Flow

สามชั้นที่ต้องไม่ปนกัน

CANONICAL

Agent OS Core

Identity, company rules, team overlays, skill bodies, memory ownership map และ decision logs มีเจ้าของเดียวที่ตรวจย้อนกลับได้

ADAPTERS

OMP + Claude Code

OMP อ่าน skills ผ่าน skills.customDirectories; Claude Code อ่าน plugin/skills และ autoMemoryDirectory. Adapter แปลรูปแบบ ไม่ถือความจริงเอง

RESIDENT LANES

bEAN + Sui Projects

cwd และ resident marker เลือก lane: bEAN ดู company/infra; Sui ดู product workspace เช่น doHEALER, EGI, NAVA และ Vega

03 / Commands

คำสั่งที่ใช้จริง

bean [args]
เปิด bEAN ใน OMP ที่ ~/giantbean-ws
sui [project] [args]
เปิด Sui ใน OMP; picker ตรวจ resident marker ก่อนเสนอ project workspace ที่ผ่านการยืนยัน
bean-cc [args]
เปิด bEAN ใน Claude Code warm standby จาก lane เดิม
sui-cc [project] [args]
เปิด Sui ใน Claude Code ผ่าน picker ตัวเดียวกับ OMP
omp -c
ทำต่อ conversation ล่าสุดใน cwd ปัจจุบัน
omp -r
เลือก session เดิมด้วย resume picker
/team-switch
ออกจาก process แล้ว resume ด้วย omp-team <team> -c; conversation เดิมกลับมาครบ
omp-team claude|openai
เปิดทีมที่กำหนดจาก shell; overlay เปลี่ยน model topology ไม่เปลี่ยน identity/memory
omp-team status current
ดู Primary, Advisor, Plan, Slow และ vendor separation ที่กำลังใช้
omp-team doctor
ตรวจ model catalog, role completeness, fallback chains, stale keys และ cross-vendor review lane
omp-team auto --dry-run
ดูทีมที่ auto-router จะเลือกจาก quota โดยยังไม่เปิด session
omp config get memory.backend --json
ต้องเห็น off; durable memory เข้า canonical ผ่าน promotion gate เท่านั้น
04 / Memory

ความจำมีบ้านจริงหนึ่งหลังต่อ lane

bEAN canonical

~/giantbean-ws/agent-os-data/memory/bean/

Company/infra memory. Old encoded Claude path เป็น compatibility symlink เท่านั้น

Sui · doHEALER canonical

~/giantbean-ws/agent-os-data/memory/sui/dohealer/

~/dohealer-ws/memory/ และ old encoded path ชี้กลับมาที่นี่; retention snapshot เดิมยังเก็บไว้เพื่อ rollback

Memory Promotion Gate: runtime observation ยังไม่ใช่ความจริงถาวร จนกว่าจะจำแนก owner, ตรวจ duplicate, เขียนเข้า canonical layer ที่ถูกต้อง และปิด loop ด้วย consumer จริง
05 / Discipline

สร้างและรีวิวคนละสมอง

DESIGN

Pao + orchestrator ล็อก goal, scope, non-goals และ work-order ก่อน build

ARGUE

Codex Sol เปิดข้อโต้แย้ง, Opus counter, orchestrator ตัดสิน; deadlock กลับไปหา Pao ไม่ไต่โมเดลหนีคำถาม

BUILD

Builder ทำใน worktree ตามขอบเขต; declare-before-delete ทุก role; ไม่มี direct push เข้า main

REVIEW

Cross-vendor เสมอ: Codex build → Claude review; Claude build → Codex Sol review พร้อม simpler-alternative gate

MERGE

Staging/preview: agent merge เมื่อ CI เขียว · main: Pao เท่านั้น

06 / Proof

ไม่ถือว่าเสร็จเพราะไฟล์อยู่

42 / 42durable Agent OS inventory rows มี canonical owner, adapter หรือเหตุผลที่ไม่มี, และ status ครบทุก row
9 × 2priority skills + ponytail ตอบ behavior จริงจากทั้ง OMP และ Claude Code
SHA gateทุกไฟล์ใน cutover snapshot ผ่าน SHA, retention, compatibility และ idempotence gates เมื่อ 2026-08-20
2 seamsClaude Code เขียน canonical sentinel แล้ว fresh OMP อ่านค่าตรง ทั้ง bEAN และ Sui
3 depthsSui outer workspace, inner repo และ worktree เห็น identity + central memory path เดียวกัน
0 syncไม่มี CC↔OMP direct sync; adapter ทุกตัวอ่านจาก canonical owner เดียว
The operating rule

เปลี่ยนเครื่องมือได้ โดยไม่เปลี่ยนตัวตน

Agent OS ไม่ใช่ harness ตัวที่สาม แต่คือสัญญากลางที่ทำให้ harness ใด ๆ รู้ว่าใครกำลังทำงาน, ความจริงอยู่ที่ไหน, ใครมีสิทธิ์แก้ และต้องพิสูจน์อะไรจึงเรียกว่าเสร็จ

← กลับไปหน้า Blog