ผมไปเจออันนึงมาว่า ทุกคนน่าจะเห็นตรงกันว่าตอนนี้ทุกคนสามารถผลิตโค้ดออกมาได้จำนวนเยอะมาก แต่คำถามคือ แล้วเราจะมีวิธีจัดการโค้ดที่ผลิตออกมาเยอะมากนี้ยังไง ให้มันดูเหมือน Real Engineer ได้อย่างน้อยระดับนึง

ช่วงนี้มี workflow ตัวนึงที่ดังใน YouTube มาก ของพี่ Kun Chen ชื่อว่า L8 Principal’s Agentic Engineering Workflow

โดย workflow ของเค้ามองการผลิตโค้ดเป็นแบบต้นจนจบ ตอนต้นเขาบอกว่าเราต้องวางแผนที่ดีก่อน เลยผลิตตัว Lavish ขึ้นมาเพื่อวางแผนให้ดี พอวางแผนครบถ้วนแล้ว ทุกอย่างก็ทำตามที่เราต้องการ ตอนจบเขาใช้ No Mistake QA Pipeline ตรวจสอบว่าโอเค แล้วเปิด PR ให้ มนุษย์ค่อยไปตรวจอีกที

แต่โจทย์ต่อมาคือ พอเรามีแพลนที่ดีแล้ว จะทำยังไงให้ Agent ทำในสิ่งที่เราต้องการแบบ long run ได้ เพราะสังเกตว่าหลายครั้งถ้าไม่ใช้ /goal หรืออะไรแบบนี้ มันจะไม่รันจนสุด รันไปได้แปลกนึงก็หยุดรอเราตอบ เสียเวลา เขาก็เลยทำ Good Night Have Fun ขึ้นมา ให้ Agent ทำงานของมันเองได้ ข้อดีคือดีกว่า /goal ตรงที่ตั้งได้ว่าจะ Iterate กี่รอบ หรือใช้โทเคนเท่าไหร่ ใส่ stop condition ได้เหมือนกัน ซึ่งช่วย optimize โทเคนให้ตรงกับที่เราเหลืออยู่ได้

พอใช้ Good Night Have Fun แล้ว Agent มีหลายตัว อาจตีกันเอง เขาก็ใช้ Work Tree จัดการไม่ให้แต่ละ Agent ตีกัน ทำเป็นสกิลชื่อ Treehouse ที่กระจายงานให้แต่ละ Agent โดยไม่ให้ Work Tree ชนกัน แล้วมีอีกสกิลนึงที่เป็นระดับผู้จัดการ คอยมอนิเตอร์อยู่ด้านบน ชื่อ First Mate

นอกจากนี้เขายังพยายาม optimize การใช้ token ด้วย Axi — Axi เองประหยัด token ได้มากกว่า MCP หรือ CLI อีก เพราะ MCP กินโทเคนเยอะอยู่แล้ว แต่ Axi ดีกว่า CLI ด้วย หลักการง่ายๆ เช่นใช้ .toon แทน JSON

อีกอันที่ชอบมากและใช้เองเยอะ คือทุกวันนี้งานพวกนี้เป็น Terminal-based มากขึ้น ไม่ค่อยอยู่ใน IDE แล้ว เพราะเราไม่ได้เป็นคนเขียนเอง เราแค่เป็นคนมอนิเตอร์ พี่คนนี้มอนิเตอร์ผ่านเทอร์มินอลเป็นหลัก ใช้ WezTerm คู่กับ tmux เพื่อจัดการเรื่อง window แล้วก็ access ได้จากเครื่องไหนก็ได้

โดยสรุป วิดีโอนี้ดีมาก อยากให้ทุกคนดู สรุปข้างบนนี้ไม่ครบแน่นอน ลองไปดูแล้วประยุกต์ใช้กับ workflow ตัวเองดู แต่ละคนน่าจะมีโจทย์ต่างกัน เชื่อว่าทุกคนที่ดูจะเอาไปประยุกต์อะไรที่เป็นประโยชน์ได้เยอะ อย่าลืมไปดูตัวเต็มด้วย

ที่มา: Kun Chen — วิดีโอต้นฉบับ L8 Principal’s Agentic Engineering Workflow

TLDR; ยาวไปไม่อ่าน สรุปก็คือ:

  1. คอขวดของงานเขียนโค้ดยุคนี้ ไม่ได้อยู่ที่ผลิตโค้ด แต่อยู่ที่ตรวจโค้ดให้ไม่พัง
  2. วางแผนดีตั้งแต่ต้น (Lavish) → รันจบด้วย QA pipeline (No Mistake) → เปิด PR ให้คนตรวจอีกที
  3. อยากให้ Agent รัน long run เอง ใช้ Good Night Have Fun ตั้ง iteration/token cap + stop condition ได้
  4. Agent หลายตัวพร้อมกัน ใช้ Work Tree ผ่านสกิล Treehouse กันชนกัน แล้วมี First Mate เป็นตัวมอนิเตอร์ระดับผู้จัดการ
  5. ประหยัด token ด้วย Axi (ถูกกว่า MCP และ CLI) เช่นใช้ .toon แทน JSON
  6. งานพวกนี้ย้ายมาเป็นเทอร์มินอลเบสมากขึ้น (WezTerm + tmux) เพราะเราเป็นแค่คนมอนิเตอร์ ไม่ใช่คนเขียนเองแล้ว

I came across something worth sharing: I think everyone can agree that these days anyone can produce a huge volume of code. But the real question is — how do we manage all that code so it still looks like the work of a real engineer, at least to some degree?

There’s a workflow that’s been quite popular on YouTube lately, from Kun Chen, called L8 Principal’s Agentic Engineering Workflow.

His workflow treats code production as a start-to-end process. At the start, good planning matters, so he built a tool called Lavish for planning. Once the plan is thorough, everything follows what you actually wanted. At the end, he uses a “No Mistakes” QA pipeline to verify everything’s okay, then opens a PR — a human still reviews it once more after that.

But the next problem is: once you have a good plan, how do you get the agent to carry it out the way you want over a long run? He noticed that without something like a /goal command, agents often won’t run all the way through — they’d go a bit off track, stop, and wait for you to respond, wasting time. So he built “Good Night Have Fun” to let the agent work on its own. The advantage over /goal is that you can set exactly how many iterations to run, or how many tokens to spend, and set a stop condition the same way — which lets you optimize token usage to match whatever budget you have left.

Once you’re running multiple agents with Good Night Have Fun, they can start stepping on each other. So he uses git worktrees to keep agents from colliding, packaged as a skill called Treehouse that hands out separate worktrees to each agent so they never clash. On top of that, there’s another skill that acts like a manager — monitoring everything from above — called First Mate.

He’s also optimizing token usage with a tool called Axi. Axi saves even more tokens than MCP or a plain CLI — MCP already burns a lot of tokens, but Axi beats CLI too, using simple principles like a .toon format instead of JSON.

One more thing I really like, and use a lot myself: this kind of work is becoming much more terminal-based these days, and less about living inside an IDE — because you’re not the one writing the code anymore, you’re just the one monitoring it. He mostly monitors through the terminal, using WezTerm together with tmux to manage windows, with the ability to access the session from any machine.

Overall, it’s a really good video, and I’d recommend everyone watch it. This summary definitely isn’t complete — go watch it and try applying it to your own workflow. Everyone’s problems are probably a little different, but I believe anyone who watches it will find something useful to apply.

Source: Kun Chen — original video L8 Principal’s Agentic Engineering Workflow

TL;DR:

  1. The bottleneck in coding today isn’t producing code — it’s verifying that it doesn’t break anything.
  2. Plan well upfront (Lavish) → run it through a QA pipeline (No Mistakes) → open a PR for a human to review.
  3. Want the agent to run long, unattended? Use Good Night Have Fun to set an iteration/token cap and stop condition.
  4. Running multiple agents at once? Use git worktrees via the Treehouse skill to avoid collisions, with First Mate acting as a manager-level monitor.
  5. Save tokens with Axi (cheaper than MCP and CLI) — e.g. .toon instead of JSON.
  6. This kind of work is moving more terminal-based (WezTerm + tmux) because you’re just the monitor now, not the one writing the code.