Technical Review
AI & Engineering Productivity

AI as a Developer:
Context Is the Bottleneck

A capable model with no context is a brilliant new hire on day one — lost.

Một model mạnh nhưng thiếu context cũng giống một dev giỏi vừa nhận việc ngày đầu — lạc lối.

Presenter: Phuong
Team: C
The Analogy · Phép ẩn dụ

AI joins your team like a new developer

AI gia nhập team giống như một developer mới

  • The model is already senior-level smart — raw capability is not the problem. Model đã giỏi ở tầm senior — năng lực thô không phải vấn đề.
  • But on a new project it knows nothing: your codebase, conventions, decisions, domain. Nhưng ở dự án mới nó chưa biết gì: codebase, convention, các quyết định, nghiệp vụ.
  • A great dev given a one-line ticket and no context still ships the wrong thing. Một dev giỏi nhận ticket một dòng, không context, vẫn làm ra thứ sai.
  • The fix for humans and for AI is the same: give it the context to succeed. Cách khắc phục cho người và cho AI là giống nhau: cấp đủ context để thành công.
The Baseline · Nền tảng

What a developer needs to ship a ticket well

Một dev cần gì để hoàn thành tốt một ticket

1 Acceptance Criteria & Requirements

What "done" means, edge cases, scope.

Định nghĩa "done", edge case, phạm vi.

2 Codebase & Conventions

Structure, patterns, style, existing utilities.

Cấu trúc, pattern, style, tiện ích sẵn có.

3 Business & Domain Context

Why the ticket exists, who it serves.

Vì sao có ticket, phục vụ ai.

4 Past Decisions & Tooling

Prior choices, gotchas, environment, tests.

Quyết định trước đó, cạm bẫy, môi trường, tests.

The Core Thesis · Luận điểm cốt lõi

Output quality is a function of context — not IQ

Chất lượng đầu ra là hàm của context — không phải IQ

Output = f(Context)   f(IQ)
  • Today's models are smart enough for most engineering tasks. Model hiện nay đủ thông minh cho phần lớn tác vụ kỹ thuật.
  • The bottleneck has shifted from model capability to context quality. Nút thắt đã dịch từ năng lực model sang chất lượng context.
  • Incomplete context → hallucination, wrong conventions, rework. Context thiếu → bịa (hallucinate), sai convention, phải làm lại.
The Problem · Vấn đề

The Context Gap

Khoảng trống context — vì sao dùng AI hay "hên xui"

  • Ephemeral chats: context is retyped every session and lost afterwards. Chat tạm thời: phải gõ lại context mỗi phiên, xong là mất.
  • Knowledge is scattered across docs, tickets, Slack, and people's heads. Kiến thức tản mát ở docs, ticket, Slack, và trong đầu mỗi người.
  • Every developer prompts differently → inconsistent, unrepeatable results. Mỗi dev prompt một kiểu → kết quả không nhất quán, không lặp lại được.
  • The AI "forgets" project decisions and repeats past mistakes. AI "quên" các quyết định của dự án và lặp lại lỗi cũ.
The Mapping · Ánh xạ khái niệm

Everything a dev relies on has an AI equivalent

Mọi thứ dev dựa vào đều có "phiên bản" cho AI

Developer worldAI / Harness equivalent
Jira ticket / ACTicket / tiêu chí chấp nhận Structured prompt + plan filePrompt có cấu trúc + file plan
Onboarding docsTài liệu onboarding Context routing (all-context.md, _GUIDE.md)Định tuyến context
Tribal knowledgeKiến thức truyền miệng Persistent memory (facts, gotchas)Bộ nhớ bền vững
Team process / code reviewQuy trình / review Harness workflow (RIPER-5, agents)Quy trình harness
IDE, linters, CICông cụ, lint, CI Skills, tools, MCP integrationsSkills, tools, MCP
The Solution · Giải pháp

Context Engineering: three layers

Kỹ nghệ context — ba lớp để AI luôn có đủ ngữ cảnh

1 Harness

A structured workflow that forces the right context before code.

Quy trình có cấu trúc, buộc nạp đúng context trước khi code.

2 Memory

Durable facts that survive across sessions.

Tri thức bền vững, sống qua nhiều phiên làm việc.

3 Routing & Automation

The AI finds the right context itself — no manual paste.

AI tự tìm đúng context — không cần dán tay.

→ Together they turn "prompt luck" into a repeatable system. Cả ba biến "hên xui khi prompt" thành một hệ thống lặp lại được.

Layer 1 · Lớp 1

The Harness — a phase-locked workflow

Harness — quy trình khoá theo từng pha (RIPER-5)

  • RESEARCH → INNOVATE → PLAN → EXECUTE → UPDATE PROCESS: no coding before context is gathered. Nghiên cứu → Ý tưởng → Lập kế hoạch → Thực thi → Cập nhật quy trình: không code khi chưa đủ context.
  • Specialized sub-agents, each with its own context window and tool limits. Sub-agent chuyên biệt, mỗi cái có context window riêng và giới hạn tool.
  • Phase-locking prevents "premature implementation" — the #1 AI failure mode. Khoá pha chặn "code non" — lỗi phổ biến nhất khi dùng AI.
  • Every task leaves a plan artifact — reviewable, resumable, auditable. Mỗi task để lại file plan — review được, tiếp tục được, truy vết được.
Layer 2 · Lớp 2

Persistent Memory — facts that outlive the chat

Bộ nhớ bền vững — tri thức sống lâu hơn cuộc chat

What it stores

User prefs, decisions, project constraints, hard-won gotchas.

Sở thích, quyết định, ràng buộc dự án, các "bẫy" đã trả giá để biết.

Real examples (this repo)

"Every admin API route must wrap its handler in withAdmin."

"Mọi route admin phải bọc handler trong withAdmin — nếu không là hở toang."

"Prod-only bugs: check cookie/header/build diffs before blaming Docker."

"Bug chỉ có ở prod: soi cookie/header/build trước khi đổ cho Docker."

The AI recalls these automatically — it stops repeating the same mistakes. AI tự nhớ lại — không lặp lại lỗi cũ nữa.

Layer 3 · Lớp 3

Context Routing & Automation

Định tuyến context & tự động hoá

  • Router files (all-context.md) point the AI to the smallest relevant docs. File router (all-context.md) chỉ AI tới đúng tài liệu nhỏ nhất cần đọc.
  • Feature guides (_GUIDE.md) scope context per domain — load only what's needed. Guide theo feature nạp context theo miền — chỉ đọc phần cần thiết.
  • Skills & agents automate research, planning, review, security, testing. Skills & agents tự động hoá nghiên cứu, lập plan, review, bảo mật, test.
  • MCP connects live systems (Jira, Drive, browser) as first-class context. MCP kết nối hệ thống thật (Jira, Drive, browser) thành context trực tiếp.
Case Study · Nghiên cứu tình huống

vibecode-pro-max-kit — the harness, packaged

Một bộ kit đóng gói sẵn ba lớp trên (đang chạy trong dự án Zaku)

What the kit ships

Agents · skills · process/ context tree · memory · shared protocols.

Agents · skills · cây context process/ · memory · protocol dùng chung.

Why it matters

Drop-in, versioned, team-wide. Every dev gets the same context discipline.

Cài vào là chạy, có version, dùng chung team. Mọi dev cùng một kỷ luật context.

github.com/withkynam/vibecode-pro-max-kit

Kết quả: context không còn là việc thủ công của từng người, mà là tài sản của cả team.

Live Demo · Minh hoạ trực quan

Same ticket, two runs

Cùng một ticket — chạy 2 lần: prompt trần vs. qua harness

✕ Raw prompt · Prompt trần
"Add an admin API to
delete a product."
no auth guard wrong folder hard-deletes data no i18n Thiếu withAdmin, sai vị trí, xoá cứng dữ liệu, quên i18n → phải làm lại.
✓ Through the harness · Qua harness
Same ticket →
reads context + memory,
plans, then executes.
wraps withAdmin archive not hard-delete correct convention i18n + tests Tự nhớ withAdmin, archive thay vì xoá cứng, đúng convention, kèm i18n + test.

Illustrative — swap in a real recorded run during the session. · Minh hoạ — nên thay bằng bản demo quay thật khi trình bày.

Impact · Tác động

What the team gets back

Team nhận lại được gì (điền số liệu thật của team C)

↓ Rework
Fewer redo cyclesGiảm số lần làm lại
↑ Consistency
Same conventionsNhất quán convention
↓ Onboarding
Faster ramp-upOnboarding nhanh hơn
↑ Throughput
More shipped safelyShip nhiều & an toàn hơn

Replace with measured numbers before the review (e.g. % rework, hrs saved/sprint). · Thay bằng số đo thực tế trước buổi review.

Honest View · Góc nhìn thẳng thắn

Concerns & Trade-offs

Chi phí và rủi ro — điều một technical review sẽ hỏi

  • Maintenance cost: context and memory must be kept current, or they mislead. Chi phí duy trì: context & memory phải cập nhật, nếu cũ sẽ dẫn AI đi sai.
  • Over-engineering: don't run a full harness for a one-line fix. Tránh over-engineering: fix một dòng thì đừng bắt chạy cả harness.
  • Stale memory risk: wrong facts are worse than no facts — needs review. Rủi ro memory lỗi thời: fact sai còn tệ hơn không có — cần review định kỳ.
  • Human ownership stays: AI drafts, engineers decide and are accountable. Con người vẫn làm chủ: AI soạn, kỹ sư quyết định và chịu trách nhiệm.
Governance · Quản trị

Security & governance of context

Bảo mật & quản trị context/memory

  • No secrets in context or memory — env values stay in .env, names only in docs. Không để secret trong context/memory — giá trị env ở .env, docs chỉ ghi tên biến.
  • Memory is versioned in git — every change is reviewable in a PR. Memory được version trong git — mọi thay đổi review được qua PR.
  • Least-privilege tools: sub-agents only get the tools their phase needs. Đặc quyền tối thiểu: sub-agent chỉ có tool mà pha của nó cần.
  • AI output still passes the normal review + CI gates before merge. Output của AI vẫn phải qua review + CI như thường trước khi merge.
Wrap-up · Kết luận

Takeaways & adoption

Điều rút ra & lộ trình áp dụng cho team C

  • Treat AI like a new developer: its output is only as good as its context. Coi AI như một dev mới: output chỉ tốt bằng context bạn cấp.
  • Engineer context deliberately — harness, memory, routing — don't leave it to luck. Kỹ nghệ context có chủ đích — harness, memory, routing — đừng để hên xui.
  • Adopt a shared kit so context becomes a team asset, not a personal trick. Dùng kit chung để context là tài sản của team, không phải mẹo cá nhân.
  • Next step: pilot the kit on one feature this sprint, measure rework & report back. Bước tiếp: thử kit trên một feature sprint này, đo rework & báo cáo lại.

Questions? · Thank you — Phuong, Team C

AI as a Developer · Context Engineering
← / → · L lang · N notes · F full 1 / 16

Speaker Notes