Baseline: September 2026
Desktop coding workflow
Vietnamese prompts are OK

AI Coding Workflow 2026

Từ cách dùng ChatGPT/Claude như một “chat box” sang workflow kỹ sư có context, rules, Git, verification, Jira/Figma/GitHub connectors, MCP và reusable Skills.

1. Mental model: 5 lớp để dùng AI coding tốt

LớpMục đíchVí dụ
1. PromptNói task hiện tại“Fix bug NTA-123, chỉ sửa backend, chạy test X.”
2. Persistent instructionsLuật luôn áp dụng cho repoAGENTS.md, CLAUDE.md, Copilot instructions
3. Context sourcesCho AI biết ticket/design/code thậtGitHub, Jira, Figma, docs, MCP/plugins
4. Execution & verificationCho agent đọc/sửa/chạy test và chứng minhgit diff, unit/integration tests, lint, build
5. Reusable workflowsKhông lặp prompt dàiSkills, prompt files, slash commands, plugins
Quy tắc vàng: prompt chỉ nên chứa điều riêng của task hiện tại. Những gì lặp đi lặp lại phải chuyển vào repo instructions hoặc Skill.

2. Prompt tiếng Việt: dùng thế nào cho hiệu quả

Bạn không cần chuyển toàn bộ sang tiếng Anh. Với coding, tên class, API, error, stack trace, acceptance criteria và command nên giữ nguyên dạng kỹ thuật; phần mô tả task có thể viết tiếng Việt.

Mẫu prompt 6 phần

Mục tiêu:
- Implement <tính năng / bug>.

Context:
- Ticket: NTA-xxxx
- Module liên quan: ...
- File/design liên quan: ...

Ràng buộc:
- Không đổi public API nếu không cần.
- Không sửa file ngoài scope.
- Follow AGENTS.md / CLAUDE.md.

Acceptance criteria:
- ...

Verification:
- Chạy unit test ...
- Chạy build/lint ...

Output cuối:
- Tóm tắt file đã đổi, lý do, test đã chạy, rủi ro còn lại.

OpenAI hiện khuyến nghị prompt rõ ràng, cụ thể, đủ context và refinement theo vòng lặp. Anthropic cũng nhấn mạnh output constraints, step ordering và examples khi cần consistency.

3. Đừng bắt đầu bằng “prompt engineering”; hãy bắt đầu bằng repo instructions

AGENTS.md — lựa chọn trung lập tốt cho multi-agent

# Project context
- Java 21 + Spring Boot + React.
- Backend: /backend, frontend: /frontend.

# Working rules
- Read existing implementation before editing.
- Make the smallest change that satisfies the task.
- Do not change API contracts unless explicitly requested.
- Never modify generated files.

# Verification
- Backend: ./mvnw test
- Frontend: npm test && npm run build
- Before finishing: show git diff summary and test results.

# Style
- Follow existing naming and package structure.
- Prefer existing utilities over introducing new abstractions.

Codex hỗ trợ AGENTS.md theo scope thư mục; GitHub Copilot cũng nhận agent-instruction files ở nhiều surface. Đây là file tốt nếu bạn muốn repo dùng được với nhiều agent.

CLAUDE.md — Claude Code-specific memory

Claude Code tự tải CLAUDE.md theo hierarchy. Nội dung phù hợp: architecture, build/test commands, conventions, “do/don't” của project. Không nên biến nó thành wiki dài; giữ các rule quan trọng, ổn định và có thể kiểm tra được.

Anti-pattern: nhét cả Jira ticket, log tạm thời hoặc một bug cụ thể vào rule file. Những thứ ngắn hạn thuộc prompt/task, không thuộc persistent memory.

4. Workflow chuẩn cho một coding task

  1. Orient: đọc repo instruction + ticket/design + code liên quan.
  2. Plan: nêu scope file dự kiến, risk, test strategy.
  3. Implement: sửa nhỏ nhất có thể, ưu tiên pattern đã có.
  4. Verify: compile/test/lint; với bug phải có regression test khi phù hợp.
  5. Review diff: kiểm tra accidental changes, secrets, debug log, generated files.
  6. Report: file đổi, behavior đổi, tests, unresolved risks.
  7. PR: con người review trước merge; không coi “agent nói xong” là Definition of Done.

5. Git & GitHub: bước nâng cấp nên làm sớm nhất

Kết nối GitHub giúp AI đọc code/README từ repository thật thay vì bạn copy/paste. Với coding agent, Git cũng là safety net: mỗi thay đổi có diff, dễ revert và review.

Best practices

6. Jira: từ copy/paste ticket sang task-grounded coding

Atlassian hiện hỗ trợ mở Jira work item trực tiếp trong coding tools và có Rovo MCP để coding agent lấy context từ Jira/Confluence và cập nhật work item khi workflow cho phép.

Workflow nên dùng

Jira ticket → agent đọc acceptance criteria → agent inspect repo
→ plan → implement → test → PR → draft Jira comment/update

Không cho agent tự đóng ticket ngay từ đầu. Giai đoạn đầu nên để AI read Jira + draft update; sau khi workflow ổn định mới cho write action có approval.

7. Figma: design-to-code đúng cách

Figma cung cấp MCP server chính thức; remote MCP được Figma khuyến nghị cho bộ tool rộng hơn. Agent có thể lấy design context/code/assets trực tiếp từ file thiết kế.

8. MCP / Plugins / Connectors: hiểu đúng vai trò

MCP là protocol để agent gọi external tools/data. App/connector nối tới dịch vụ như GitHub/Drive/Slack. Plugin có thể đóng gói apps + Skills + workflow. Đừng connect mọi thứ ngay; thêm theo use case có giá trị.

Ưu tiênConnectLý do
1GitHubContext code + PR workflow
2JiraAcceptance criteria và traceability
3FigmaDesign context cho frontend
4Docs/ConfluenceArchitecture/decision records
5ObservabilityProduction debugging khi đã có guardrail
Security: bắt đầu bằng read-only hoặc approval-gated actions. Review permission scope của từng connector/MCP. Tránh MCP không rõ nguồn gốc trên máy có source code hoặc credential nhạy cảm.

9. Skills: khi nào nên dùng

Skills là workflow tái sử dụng gồm instruction, ví dụ và có thể cả code. Khi đã cài, ChatGPT có thể tự chọn Skill phù hợp. Đây là bước sau khi bạn đã có workflow thủ công ổn định.

3 Skills phù hợp nhất với bạn

Jira → Implementation

Đọc ticket, extract AC, inspect repo, plan, implement, test, draft Jira update.

Code Review

Review diff theo correctness, regression, security, tests và project conventions.

Demo/Release Handoff

Từ Jira + diff + test evidence tạo demo script, release note và handoff chuẩn.

HTML Study Migration

Workflow bạn đang làm nhiều: đọc contract, migrate semantic content, QA, zip outputs.

Một Skill tốt nên ngắn ở entrypoint, chỉ chứa rule/workflow đặc thù; reference dài để file riêng và script dùng cho bước deterministic.

10. Dùng AI agent an toàn hơn

11. Khi nào dùng ChatGPT/Codex, khi nào Claude Code?

Nhu cầuGợi ý
Giải thích, research, file/report, cross-tool workflowChatGPT/Work phù hợp khi cần nhiều loại artifact/context.
Repo coding agent với AGENTS.md, diff/test/PRCodex.
Terminal-centric coding, CLAUDE.md, MCP-rich workflowClaude Code.
Không muốn lock-inDùng AGENTS.md cho common rules; bổ sung CLAUDE.md khi cần Claude-specific.

Không cần chọn “một tool duy nhất”. Tối ưu quy trình và artifacts (instructions, tests, Git, ticket/design links) trước; model/tool có thể thay đổi.

12. Anti-patterns thường gặp

13. Labs — học bằng workflow thật

Lab 01 — Viết AGENTS.md đầu tiên

Mục tiêu: biến project từ chat-only sang repo-aware.

  1. Chọn một repo cá nhân hoặc sandbox.
  2. Viết 15–30 dòng: architecture, build/test, code style, forbidden changes, final report.
  3. Đưa cùng một task nhỏ cho AI trước và sau khi có AGENTS.md.
  4. So sánh số lần phải nhắc lại rule.

Done khi:

AI tự chạy đúng command và không sửa ngoài scope mà không cần bạn nhắc lại.

Lab 02 — Prompt tiếng Việt có cấu trúc

  1. Chọn một bug thật.
  2. Viết prompt theo 6 phần: mục tiêu, context, constraints, AC, verification, output.
  3. Không dịch sang tiếng Anh.
  4. Yêu cầu plan trước rồi implementation.

Done khi:

Bạn có thể đọc prompt trong <2 phút và một developer khác cũng hiểu Definition of Done.

Lab 03 — Git safety loop

  1. Working tree sạch.
  2. Cho AI implement task nhỏ.
  3. Yêu cầu test.
  4. Review git diff --stat và full diff.
  5. Cho AI tự review lại diff để tìm accidental change.

Done khi:

Bạn có test evidence và có thể revert toàn bộ thay đổi trong một thao tác Git.

Lab 04 — Connect GitHub

  1. Kết nối GitHub trên surface bạn dùng.
  2. Chọn repo test, chỉ cấp access cần thiết.
  3. Hỏi AI: kiến trúc repo, test command, nơi implement một feature cụ thể.
  4. So sánh với README/code thật.

Done khi:

AI trả lời dựa trên repo live thay vì bạn upload/copy file thủ công.

Lab 05 — Jira read workflow

  1. Kết nối Jira/Rovo MCP hoặc integration được workspace cho phép.
  2. Dùng một ticket không nhạy cảm.
  3. Yêu cầu extract AC, unknowns, files likely affected, test plan.
  4. Chỉ cho read ở vòng đầu.

Done khi:

Prompt coding chỉ cần ticket ID + mục tiêu, không cần copy toàn bộ description.

Lab 06 — Figma → implementation

  1. Kết nối Figma MCP.
  2. Chọn 1 component nhỏ có desktop/mobile state.
  3. Yêu cầu agent đọc design context và tìm reusable component trong repo.
  4. Implement + screenshot review.

Done khi:

Component match layout/tokens và không tạo CSS/component duplicate không cần thiết.

Lab 07 — Tạo Skill đầu tiên

  1. Chọn workflow đã làm ít nhất 3 lần.
  2. Ví dụ: “Jira ticket → implementation plan + tests + Jira comment”.
  3. Tách phần luôn đúng thành Skill; task-specific data vẫn để prompt.
  4. Test Skill trên 3 ticket khác nhau.

Done khi:

Bạn giảm đáng kể prompt lặp lại nhưng output vẫn consistent.

Lab 08 — Full feature loop

  1. Jira ticket + Figma node + GitHub repo.
  2. Agent lấy context từ cả 3.
  3. Plan → implement → tests → self-review diff.
  4. Generate PR summary + Jira update draft.
  5. Bạn review và approve thủ công.

Done khi:

Không copy/paste ticket/design/code giữa apps và vẫn có human gate trước merge/update.

14. Lộ trình 30 ngày

TuầnThực hànhKết quả mong đợi
Tuần 1Lab 01–03. Chuẩn hóa prompt + AGENTS.md + Git verification.AI ít “đoán”, diff nhỏ hơn, test rõ hơn.
Tuần 2Lab 04. GitHub live context; thử path-specific rules nếu repo lớn.Giảm copy/paste source.
Tuần 3Lab 05–06. Jira và Figma read-first.Task/design context đi thẳng vào coding workflow.
Tuần 4Lab 07–08. Skill + end-to-end workflow.Một workflow lặp lại, có guardrail và human approval.

15. Self-assessment checklist

16. Official references

Research baseline: 13 September 2026. Product availability, plan restrictions and UI labels may change; verify provider docs when enabling integrations in a managed enterprise workspace.