AI-DLC AI-DLCAI-DLC
AI-DLC フレームワーク AI-DLC FRAMEWORKAI-DLC FRAMEWORK

AI駆動 開発の 設計思想 Tư duy thiết kế phát triển AIDesign philosophy for AI-driven development

「何でも知っている AI 開発者」を作るのではなく、専門性を持ったエージェント群を編成し、文脈を制御する設計。Tinhvan Japan が現場で培った実装知から導いた答えである。 Thay vì xây dựng "một AI biết tuốt", framework này tổ chức đội ngũ agent chuyên môn hoá và kiểm soát context theo từng lĩnh vực — đáp án Tinhvan Japan rút ra từ thực tiễn triển khai.Rather than building a "know-it-all AI", this framework orchestrates a team of specialized agents and controls context within each domain — the answer Tinhvan Japan drew from real-world implementation.

Origin
Tinhvan Japan — TVJ
Approach
マルチエージェント × ナレッジ基盤 Multi-agent × Knowledge FoundationMulti-agent × Knowledge Foundation
Structure
二層構造 — 知識基盤 × エージェント編成 Cấu trúc hai tầng — nền tri thức × tổ chức agentTwo-layer architecture — Knowledge Foundation × orchestrated agents
Goal
Context制御 + モデル非依存 Kiểm soát context, không lệ thuộc modelContext control + model-agnostic
従来手法の限界 — PROMPT ENGINEERING の壁 GIỚI HẠN CỦA CÁCH LÀM CŨ — RÀO CẢN PROMPT ENGINEERINGLIMITS OF THE CONVENTIONAL APPROACH — THE PROMPT ENGINEERING WALL
AIを「素のまま」使う時に直面する四つの課題 Bốn vấn đề thường gặp khi dùng AI theo cách thông thườngFour common challenges when using AI the conventional way
01
精度のばらつき Độ chính xác thấpInconsistent accuracy
業務文脈や規約を知らないAIは、それらしいが誤った実装を生む。検証コストが膨らむ。 AI không nắm được nghiệp vụ và quy ước sẽ sinh ra code trông có vẻ đúng nhưng thực chất sai. Chi phí kiểm chứng tăng vọt.An AI that doesn't know your business context and conventions produces code that looks right but is actually wrong. Verification costs balloon.
02
出力の再現性が無い Output không nhất quánNo output reproducibility
同じ依頼でも実行のたびに違う結果。チーム全体での標準化が進まない。 Cùng một yêu cầu, mỗi lần chạy lại cho kết quả khác. Cả team không thể chuẩn hoá được quy trình.The same request yields different results every run. The whole team can't standardize its process.
03
Context Window 超過 Tràn Context WindowContext Window overflow
大規模リポジトリでは全コードが入りきらない。重要な情報が削られ、誤判断を招く。 Repo lớn không thể nhét hết vào context. Thông tin quan trọng bị cắt bỏ, dẫn đến phán đoán sai.Large repositories don't fit entirely into context. Critical information gets cut, leading to wrong decisions.
04
プロンプトの属人化 Prompt phụ thuộc cá nhânPrompts tied to individuals
巧みなプロンプトは個人のノウハウに留まり、組織資産にならない。スケールしない。 Prompt hay nằm trong đầu cá nhân, không trở thành tài sản chung của tổ chức. Không thể nhân rộng.Skilled prompts stay in individuals' heads and never become organizational assets. They don't scale.
0
全体像 — MASTER OVERVIEW TOÀN CẢNH — MASTER OVERVIEWFULL PICTURE — MASTER OVERVIEW

全体の 流れ と関係性 Dòng chảy và mối liên hệ tổng thểThe overall flow and relationships

知識基盤(Layer 1)を整え、それを材料としてマルチエージェント体制(Layer 2)が稼働する。エージェントは作業中に得た知見を知識基盤へ書き戻し、人間は最終判断と方針決定を握る。 Trước tiên, dựng nền tri thức (Layer 1). Đội ngũ multi-agent (Layer 2) sau đó vận hành dựa trên nguyên liệu đó. Trong quá trình làm việc, các agent ghi ngược tri thức học được về nền tri thức; con người giữ vai trò quyết định cuối cùng và định hướng tổng thể.First, build the Knowledge Foundation (Layer 1). The multi-agent system (Layer 2) then runs on that material. As they work, agents write what they learn back to the Knowledge Foundation, while humans hold the final decisions and overall direction.

INPUTS 要件定義 requirements コードベース codebase 仕様書 spec / docs LAYER 01 — 知識基盤 仕様 & 業務 MarkItDown コードグラフ GitNexus アーキ図 Mermaid / DaC 規約 AGENTS.md / CLAUDE.md 意思決定記録 ADR API/Schema OpenAPI / GQL 依存・影響分析 Knowledge Graph 統合ナレッジベース unified knowledge base ドメイン Skills TVJ プロジェクト知見 FOUNDATION — 先に固める feeds LAYER 02 — マルチエージェント オーケストレーション層 Harness Engineering BUSINESS 業務 Agent ARCHITECT アーキテクト Agent DEVELOPMENT 開発 Agents QA / SEC 品質・セキュリティ Agents REVIEWER レビュアー Agent DOCUMENT ドキュメント Agent 再利用可能なワークフロー / コマンド reusable workflows & commands 成果物 code / docs / tests / ADR HUMAN-IN-THE-LOOP 人間による最終判断 final decision & approval writes back 学習結果を還流 human feedback — 知識基盤を継続更新 INPUTS Yêu cầu requirements Mã nguồn codebase Đặc tả spec / docs LAYER 01 — NỀN TRI THỨC Spec & Business MarkItDown Graph code GitNexus Sơ đồ kiến trúc Mermaid / DaC Quy ước AGENTS.md / CLAUDE.md Lưu vết QĐ ADR API / Schema OpenAPI / GQL Phân tích ảnh hưởng Knowledge Graph Knowledge Base hợp nhất unified knowledge base Domain Skills tri thức TVJ đóng gói FOUNDATION — dựng vững trước feeds LAYER 02 — MULTI-AGENT Tầng Orchestration Harness Engineering BUSINESS Nghiệp vụ Agent ARCHITECT Kiến trúc Agent DEVELOPMENT Phát triển Agents QA / SEC QA & Security Agents REVIEWER Reviewer Agent DOCUMENT Tài liệu Agent Workflow / Command tái sử dụng reusable workflows & commands Sản phẩm đầu ra code / docs / tests / ADR HUMAN-IN-THE-LOOP Quyết định cuối — Người final decision & approval writes back Agent học & ghi ngược human feedback — cập nhật liên tục nền tri thức INPUTS Requirements requirements Codebase codebase Spec / Docs spec / docs LAYER 01 — KNOWLEDGE FOUNDATION Spec & Business MarkItDown Graph code GitNexus Architecture diagram Mermaid / DaC Conventions AGENTS.md / CLAUDE.md Decision records ADR API / Schema OpenAPI / GQL Impact analysis Knowledge Graph Unified Knowledge Base unified knowledge base Domain Skills packaged TVJ knowledge FOUNDATION — build it solid first feeds LAYER 02 — MULTI-AGENT Orchestration layer Harness Engineering BUSINESS Business Agent ARCHITECT Architecture Agent DEVELOPMENT Development Agents QA / SEC QA & Security Agents REVIEWER Reviewer Agent DOCUMENT Documentation Agent Reusable workflows / commands reusable workflows & commands Deliverables code / docs / tests / ADR HUMAN-IN-THE-LOOP Final decision — Human final decision & approval writes back Agents learn & write back human feedback — continuously updates the Knowledge Foundation
LAYER 01
知識基盤Nền tri thứcKnowledge Foundation
LAYER 02
マルチエージェントMulti-agentMulti-agent
WRITE-BACK
Agentの学習を還流Agent ghi ngượcAgents feed learning back
HUMAN
最終判断・承認Quyết định cuốiFinal decisions
CONTROL
調停・接続Điều phốiOrchestration
HUMAN-IN-THE-LOOP

人間が 必ず 関与する Con người bắt buộc phải tham giaHumans must be involved

AIエージェントが自律的に動く範囲を広げても、重要な判断、承認、最終責任は人間が握るという原則。AI は提案・実装・検証までを担うが、リリース可否、設計上のトレードオフ、業務上のリスク受容、コンプライアンス判断は人間が決める。 Dù phạm vi AI tự chủ được mở rộng đến đâu, nguyên tắc cốt lõi vẫn là: quyết định quan trọng, phê duyệt và trách nhiệm cuối cùng phải thuộc về con người. AI đảm nhận phần đề xuất, hiện thực và kiểm chứng — còn việc duyệt release, đánh đổi thiết kế, chấp nhận rủi ro nghiệp vụ và phán quyết tuân thủ đều do con người quyết định.However far AI's autonomy expands, the core principle stands: important decisions, approvals, and final responsibility belong to humans. AI handles proposals, implementation, and verification — but release go/no-go, design trade-offs, business risk acceptance, and compliance judgments are all decided by humans.

01
承認ゲートCổng phê duyệtApproval gate
各フェーズの出力を人間がレビューしてから次に進む。AIが勝手にマージしない。Con người review output ở từng giai đoạn rồi mới chuyển sang bước tiếp. AI không được tự ý merge.Humans review each phase's output before moving on. The AI never merges on its own.
02
方針修正Điều chỉnh phương hướngCourse correction
AIが暴走したり間違った方向に進んだ時、人間が止めてリダイレクトする。Khi AI đi sai hướng hoặc vượt ngoài kiểm soát, con người can thiệp để dừng lại và định hướng lại.When the AI goes off course or beyond control, humans step in to stop and redirect it.
03
知識の還流Phản hồi tri thứcKnowledge feedback
レビューで気付いた問題やパターンを知識基盤へ書き戻し、次回以降に活かす。Những vấn đề và pattern phát hiện qua review được ghi ngược về nền tri thức để sử dụng cho lần sau.Problems and patterns spotted in review are written back to the Knowledge Foundation for next time.
04
責任の所在Quy trách nhiệmAccountability
本番障害、データ事故、コンプライアンス違反 — 最終責任は AI ではなく人間にある。Sự cố production, tai nạn dữ liệu, vi phạm tuân thủ — trách nhiệm cuối cùng thuộc về con người, không phải AI.Production incidents, data mishaps, compliance violations — final responsibility rests with humans, not the AI.
人間が提供すべきもの Những gì con người phải cung cấpWhat humans must provide

明確で構造化された Input Input rõ ràng và có cấu trúcClear, structured Input

曖昧なプロンプトは曖昧な結果を生む。要件、文脈、制約は明示的かつ整然と提供する必要がある。 Prompt mơ hồ sẽ cho ra kết quả mơ hồ. Yêu cầu, context và ràng buộc phải được trình bày rõ ràng, có cấu trúc.Vague prompts produce vague results. Requirements, context, and constraints must be provided explicitly and in an orderly way.

判断と決定権 Phán đoán & Quyền quyết địnhJudgment & Decision authority

AIは提案する、人間が決める。重要な設計、トレードオフ、リスク判断は人間が握る。 AI đưa ra đề xuất, con người ra quyết định. Các vấn đề về thiết kế quan trọng, đánh đổi và đánh giá rủi ro phải do con người nắm giữ.AI proposes, humans decide. Key design choices, trade-offs, and risk judgments stay with humans.

フィードバック & 継続レビュー Phản hồi & Review liên tụcFeedback & Continuous review

スキルとワークフローは、人間が AI 出力を能動的にレビューし修正を還流させて初めて改善される。 Skill và workflow chỉ thực sự được cải thiện khi con người chủ động review output của AI và đưa các chỉnh sửa quay ngược về hệ thống.Skills and workflows improve only when humans actively review AI output and feed corrections back into the system.

クロスファンクショナルな連携 Phối hợp đa chức năngCross-functional collaboration

AI-DLC は Dev / QA / BA / Ops を横断する。人間が部門を超えて調整する役割を担う。 AI-DLC trải dài qua Dev / QA / BA / Ops. Con người đóng vai trò điều phối, kết nối giữa các bộ phận.AI-DLC spans Dev / QA / BA / Ops. Humans coordinate and connect across departments.

1
LAYER 01 — 基盤構築 LAYER 01 — XÂY NỀN MÓNGLAYER 01 — BUILDING THE FOUNDATION

専用ツールで 知識基盤 を築く Dựng nền tri thức bằng công cụ chuyên biệtBuild the Knowledge Foundation with dedicated tools

AIに渡す前に、人間が理解できる形で体系化する。スペック、コード、アーキテクチャ、決定の経緯まで、それぞれに適したフォーマットで整える。 Trước khi đưa cho AI xử lý, mọi thứ phải được hệ thống hoá theo cách con người hiểu được. Từ spec, mã nguồn, kiến trúc cho đến lý do đằng sau các quyết định — mỗi loại đều có định dạng phù hợp riêng.Before handing anything to AI, structure it in a form humans can understand. From specs, code, and architecture to the reasoning behind decisions — each in the format that suits it.

01
1

仕様 & 業務知識Spec & BusinessSpec & Business

各種ドキュメントをAIが扱える形式へ正規化する。Chuẩn hoá tài liệu đa dạng về dạng AI có thể đọc.Normalize diverse documents into a form AI can read.

MarkItDown
02
2

コードグラフGraph ContextGraph Context

関数・モジュール・呼出関係をグラフ化し、文脈を圧縮する。Đồ thị hoá hàm, module, quan hệ gọi — nén context.Graph functions, modules, and call relationships — compressing context.

GitNexusUnderstand-Anything
03
3

アーキテクチャ図Architecture & FlowArchitecture & Flow

システム構造をコードで管理し、版を追えるようにする。Quản lý cấu trúc hệ thống bằng code, theo được phiên bản.Manage system structure as code, with version tracking.

MermaidDiagram-as-Code
04
4

規約 & ルールファイルCoding Standards & RulesCoding Standards & Rules

AGENTS.md / CLAUDE.md でAIが守るべきルールを明文化する。曖昧な暗黙知を残さない。Văn bản hoá luật AI phải tuân bằng AGENTS.md / CLAUDE.md — không để tri thức ngầm tồn tại.Document the rules AI must follow in AGENTS.md / CLAUDE.md — leaving no ambiguous tacit knowledge.

AGENTS.mdCLAUDE.mdRULES.md
05
5

意思決定の記録Historical DecisionsHistorical Decisions

「なぜそう決めたか」をADRで残す。技術選定の背景と業務上の制約をAIが参照できる形に。Ghi lại "vì sao quyết định như vậy" qua ADR. Bối cảnh chọn công nghệ và ràng buộc nghiệp vụ — để AI tra cứu được.Record "why we decided this way" as ADRs. Technology-choice rationale and business constraints — in a form AI can reference.

ADRDomain Knowledge
06
6

API & スキーマAPI & SchemaAPI & Schema

OpenAPI、GraphQL、DBスキーマを正としてAIに渡す。インターフェース定義こそが最も信頼できる文脈。OpenAPI, GraphQL, DB schema làm nguồn chính cho AI. Định nghĩa interface là context đáng tin nhất.Feed OpenAPI, GraphQL, and DB schemas to AI as the source of truth. Interface definitions are the most trustworthy context.

OpenAPIGraphQLDB Schema
07
7

依存関係 & 影響分析Dependency & ImpactDependency & Impact

変更が何処に波及するかをナレッジグラフ上で可視化し、修正の安全性を担保する。Trực quan hoá ảnh hưởng của thay đổi trên knowledge graph — đảm bảo an toàn khi sửa.Visualize where a change ripples across the knowledge graph — ensuring safe edits.

Knowledge GraphImpact Mapping

Knowledge Foundation: ツール Knowledge Foundation: Bộ công cụKnowledge Foundation: Toolkit

知識抽出を高速かつ確実にする推奨ツール Bộ công cụ giúp trích xuất tri thức nhanh và đáng tin cậyRecommended tools for fast, reliable knowledge extraction.

GitNexus
Browser-native Knowledge Graph

ブラウザ上でインタラクティブなグラフを構築。コードQ&A用の Graph RAG エージェント機能を搭載。 Dựng knowledge graph tương tác trực tiếp trong browser. Tích hợp Graph RAG agent cho Q&A code.Build interactive graphs right in the browser. Includes a Graph RAG agent for code Q&A.

カスタムパーサが必要Cần custom parserCustom parser required

ニッチな JS lib、独自 DSL、COBOL、Delphi は tree-sitter パーサを手動で書く必要あり。JS lib hiếm, DSL custom, COBOL, Delphi cần tree-sitter parser thủ công.Niche JS libs, custom DSLs, COBOL, and Delphi need hand-written tree-sitter parsers.

↗ github.com/abhigyanpatwari/GitNexus
Understand-Anything
Claude Code / Codex Skill

任意のコードベースをインタラクティブな知識グラフに変換。マルチプラットフォーム対応。 Biến mọi codebase thành knowledge graph tương tác. Hỗ trợ đa nền tảng.Turn any codebase into an interactive knowledge graph. Multi-platform support.

リアルタイム探索 Real-time ExplorationReal-time Exploration

/understand-anything コマンドで関係性と呼出チェーンを検索。 Tìm quan hệ và call chain qua lệnh /understand-anything.Search relationships and call chains with the /understand-anything command.

↗ github.com/Lum1104/Understand-Anything
MarkItDown
Multi-format to Markdown

Microsoft 製の PDF/DOCX/PPTX → Markdown 変換ツール。AI コンテキスト構築に必須。 Tool của Microsoft chuyển PDF/DOCX/PPTX → Markdown. Cần thiết để dựng AI context.Microsoft's PDF/DOCX/PPTX → Markdown converter. Essential for building AI context.

カスタマイズ必須Cần customiseCustomization required

日本語エンコーディング (Shift-JIS)、ふりがな除去、文書構造のアダプタが必要。Cần adapter cho encoding Nhật (Shift-JIS), bỏ furigana, cấu trúc doc.Needs adapters for Japanese encoding (Shift-JIS), furigana removal, and document structure.

↗ github.com/microsoft/markitdown
ソースSourceSource
(PDF/DOCX/Repo)
カスタマイズCustomiseCustomize
Adapters / Parsers
抽出・変換Extract & ConvertExtract & Convert
MarkItDown / GitNexus
構造化・索引Structure & IndexStructure & Index
Understand-Anything
リポジトリへCommit to RepoCommit to Repo
docs/context/
両ツールともプロジェクト毎のカスタマイズが必要。Cả 2 tool đều cần customise theo từng project.Both tools require per-project customization. MarkItDown は特に日本語向けにフォーマット/エンコーディングアダプタが必要。GitNexus は未サポート言語のためにカスタムパーサが必要 — コミット前に必ずテストすること。 MarkItDown cần adapter format/encoding (đặc biệt tiếng Nhật). GitNexus cần parser cho ngôn ngữ chưa hỗ trợ — phải test trước khi commit.MarkItDown needs format/encoding adapters (especially for Japanese). GitNexus needs custom parsers for unsupported languages — always test before committing.
AGENTS.md
~ 100-200 LINES
百科事典ではなく、目次 Không phải bách khoa toàn thư — mà là mục lục.Not an encyclopedia — a table of contents.

Mitchell Hashimoto が Ghostty プロジェクトで広めた標準ファイル。「何処に何がある」を約100行に絞り、本体知識は docs/ 配下へ。コンテキストは希少資源。OpenAI のCodex 100万行実証でも採用された。 File chuẩn được Mitchell Hashimoto phổ biến qua dự án Ghostty. Gói gọn "ở đâu có gì" trong khoảng 100 dòng, tri thức chi tiết để dưới thư mục docs/. Context là tài nguyên khan hiếm. OpenAI cũng áp dụng cách này trong thử nghiệm 1 triệu dòng code với Codex.The standard file popularized by Mitchell Hashimoto through the Ghostty project. It captures "where everything lives" in about 100 lines, keeping detailed knowledge under docs/. Context is a scarce resource. OpenAI adopted this approach too, in its million-line Codex trial.

含まれる内容NỘI DUNGCONTENTS
  • プロジェクト構造のマップ
  • ビルド・テストコマンド
  • コーディング規約の要点
  • 過去の失敗パターン (アンチパターン)
  • 詳細は docs/ への参照ポインタ
  • Bản đồ cấu trúc dự án
  • Map of the project structure
  • Các lệnh build & test
  • Build & test commands
  • Các điểm chính trong quy ước code
  • Key points of the code conventions
  • Anti-pattern — những lỗi đã từng mắc
  • Anti-patterns — mistakes made before
  • Con trỏ tới docs/ để xem chi tiết
  • Pointers to docs/ for the details
CLAUDE.md
ALWAYS LOADED
常時コンテキストとして読み込まれる司令書。 Cuốn cẩm nang luôn được nạp sẵn vào context.The playbook always preloaded into context.

Claude Code がセッション開始時に常に読み込むファイル。AGENTS.md と同じく目次型で書くのが原則。詳細手順は .claude/skills/ 配下の SKILL.md へ遅延読み込みさせる構造に。 File mà Claude Code luôn đọc khi mở session. Cũng theo phong cách mục lục như AGENTS.md. Quy trình chi tiết được nạp trễ (deferred load) qua các file SKILL.md nằm trong .claude/skills/.The file Claude Code always reads at session start. Written table-of-contents style, like AGENTS.md. Detailed procedures are deferred-loaded via SKILL.md files under .claude/skills/.

含まれる内容NỘI DUNGCONTENTS
  • 常に守るべき原則(短く)
  • 主要ファイル・ディレクトリへのマップ
  • 使用すべきコマンド・スクリプト
  • 禁止事項と境界条件
  • .claude/skills/ への参照
  • Nguyên tắc cần luôn tuân thủ (ngắn gọn)
  • Principles to always follow (concise)
  • Bản đồ các file & thư mục chính
  • Map of the key files & folders
  • Các lệnh và script nên dùng
  • Recommended commands and scripts
  • Điều cấm và ràng buộc biên
  • Prohibitions and boundary constraints
  • Tham chiếu tới .claude/skills/
  • References to .claude/skills/

プロジェクト構造Cấu trúc dự ánProject structure

全フォルダツリー — 各ファイルの役割を解説。クリックで展開/折りたたみ。Toàn bộ cây thư mục — vai trò từng file. Click để mở/đóng từng cấp.The full folder tree — the role of every file. Click to expand/collapse each level.

project-root/
·
CLAUDE.mdAlways
常時読込 (< 200行)Luôn nạp (< 200 dòng)Always loaded (< 200 lines)
·
AGENTS.mdAlways
IDE横断のユニバーサルルールQuy tắc chung cho mọi IDEUniversal rules across IDEs
·
.mcp.jsonAlways
MCP接続: Jira, GitHubKết nối MCP: Jira, GitHubMCP connections: Jira, GitHub
.claude/
·
settings.jsonHook
Hooks + permissions (deny rules)Hooks + permissions (deny rules)Hooks + permissions (deny rules)
·
rules/Always
CLAUDE.md と共に自動読込Auto-loaded cùng CLAUDE.mdAuto-loaded with CLAUDE.md
·
skills/On-demand
オンデマンド、文脈で自動起動On-demand, tự kích hoạt theo contextOn-demand, auto-triggered by context
·
commands/Manual
/feature /fix /review /deploy/feature /fix /review /deploy/feature /fix /review /deploy
·
agents/On-demand
Sub-agents (独立コンテキスト)Sub-agents (context isolated)Sub-agents (isolated context)
·
.cursor/rules/IDE
.mdc ファイル + glob スコープFile .mdc với glob scoping.mdc files with glob scoping
·
.windsurf/rules/IDE
Workspace rules + workflowsWorkspace rules + workflowsWorkspace rules + workflows
docs/
requirements/Always
PRDファイル — 1機能/1エピックにつき1ファイルFile PRD — mỗi feature/epic một filePRD files — one file per feature/epic
·
PRD-001-user-auth.md
問題 + 目的 + 受入基準 + スコープ外Vấn đề + mục tiêu + AC + ngoài phạm viProblem + goals + AC + out of scope
·
PRD-002-payments.md
命名: PRD-[番号]-[短縮名].mdTên: PRD-[số]-[tên ngắn].mdNaming: PRD-[number]-[short-name].md
architecture/
decisions/Always
ADR — 承認後は不変ADR — bất biến sau khi duyệtADR — immutable after approval
·
ADR-001-auth-strategy.md
背景 + 決定 + 代替案 + 結果Context + Decision + Alternatives + ConsequencesContext + Decision + Alternatives + Consequences
·
ADR-002-database.md
命名: ADR-[番号]-[トピック].mdTên: ADR-[số]-[topic].mdName: ADR-[number]-[topic].md
api-contracts/On-demand
ドメイン毎のAPIスキーマAPI schema theo từng domainAPI schema per domain
·
auth.md
API endpoint 変更時に更新Cập nhật khi endpoint thay đổiUpdate when an endpoint changes
·
system-overview.mdAlways
Mermaid図によるハイレベルアーキKiến trúc tổng quan với MermaidHigh-level architecture with Mermaid
tasks/
active/Manual
現スプリント — AIセッションログSprint hiện tại — log session AICurrent sprint — AI session logs
·
TASK-101.md
目的 + 受入 + 文脈 + テストシナリオObjective + AC + context + test scenariosObjective + AC + context + test scenarios
done/Manual
完了後に移動 — 履歴参照用Move sau khi merge — lưu lịch sửMove after merge — for history reference
·
TASK-099.md
履歴として保存Lưu làm lịch sửSaved as history
context/On-demand
AI 特化の長期記憶Tri thức dài hạn cho AILong-term memory for AI
·
domain-glossary.md
業務用語 — ハルシネーション防止Thuật ngữ — chống hallucinationTerminology — prevent hallucination
·
known-issues.md
既知のバグと回避策Bug đã biết & workaroundKnown bugs & workarounds
·
business-rules.md
PM/BA のみが知るルールQuy tắc chỉ PM/BA biếtRules only PM/BA know
·
tool-changelog.md
新しいツール採用時に追記Khi adopt tool mớiWhen adopting a new tool
templates/Manual
新規ファイル用コピペ雛形Mẫu copy-paste cho file mớiCopy-paste template for new files
·
TASK.md.template
標準タスクファイル構造Cấu trúc file task chuẩnStandard task file structure
·
PRD.md.template
標準要件ドキュメントTài liệu yêu cầu chuẩnStandard requirements document
·
ADR.md.template
標準アーキ決定Quyết định kiến trúc chuẩnStandard architecture decisions
src/
·
CLAUDE.mdAlways
ソースレベルのパターンPattern cấp sourceSource-level patterns
·
[components|api|lib]/CLAUDE.mdAlways
モジュール固有のコンテキストContext riêng từng moduleModule-specific context
常時読込Always loadedAlways loaded
オンデマンドOn-demandOn-demand
手動起動Manual triggerManual trigger
自動発火 HookAuto-fire hookAuto-fire hook
IDE-specific
2
LAYER 02 — エージェント編成 LAYER 02 — TỔ CHỨC AGENTLAYER 02 — ORCHESTRATED AGENT TEAM

専門特化 したマルチエージェント Multi-agent chuyên môn hoáMulti-agent specialization

各エージェントは担当領域に特化したスキルとコマンドで動く。Tinhvan Japan がプロジェクトで蓄積したナレッジが、そのスキルセットの核となる。 Mỗi agent vận hành bằng bộ skill và command chuyên biệt theo lĩnh vực. Tri thức mà Tinhvan Japan tích luỹ qua các dự án chính là phần lõi của những bộ skill này.Each agent runs on a set of Skills and commands specialized to its domain. The knowledge Tinhvan Japan has accumulated across projects forms the core of these skill sets.

◆ オーケストレーション層 ◆ ORCHESTRATION LAYER◆ ORCHESTRATION LAYER

調停役エージェント Agent điều phốiOrchestrator Agent

仕事を誰に任せ、何時繋ぐかを判断する司令塔。Harness Engineering の発想で、適切なエージェントへ的確に作業を流す。 Là sở chỉ huy quyết định giao việc cho ai và kết nối lúc nào. Theo tinh thần Harness Engineering, công việc được điều phối chính xác đến đúng agent phụ trách.The command center that decides who to delegate work to and when to connect them. In the spirit of Harness Engineering, work is routed precisely to the right agent.

BUSINESS01 / 06

業務エージェントBusiness AgentBusiness Agent

要件と業務ロジックを読み解く。顧客側の言語で課題を整理し、技術側へ橋渡しする。Đọc hiểu yêu cầu và logic nghiệp vụ. Sắp xếp vấn đề theo ngôn ngữ của khách hàng, làm cầu nối sang phía kỹ thuật.Reads and interprets requirements and business logic. Frames issues in the customer's language and bridges them to the technical side.

ARCHITECT02 / 06

アーキテクトエージェントArchitect AgentArchitect Agent

システム構造と技術選定を担う。ADRと既存アーキテクチャを参照し、整合性のある設計を提示。Phụ trách cấu trúc hệ thống và lựa chọn công nghệ. Tham chiếu ADR và kiến trúc hiện hữu để đưa ra thiết kế nhất quán.Owns system structure and technology selection. References ADRs and existing architecture to deliver consistent designs.

DEVELOPMENT03 / 06

開発エージェント群Development AgentsDevelopment Agents

実装を担う複数の専門エージェント。フロント、バック、インフラ等を分担し、それぞれのスキルで作業する。Nhóm các agent chuyên môn phụ trách phần hiện thực. Chia thành front-end, back-end, infra... — mỗi agent dùng bộ skill riêng để xử lý phần việc của mình.A group of specialized agents that own implementation. Split across front-end, back-end, infra, and more — each agent uses its own skills to handle its part.

QA & SECURITY04 / 06

品質・セキュリティQA & Security AgentsQA & Security Agents

テストケース生成、脆弱性検査、セキュリティルールの自動適用までを引き受ける。Đảm nhận toàn bộ: sinh test case, quét lỗ hổng bảo mật, tự động áp dụng các quy tắc bảo mật.Handles it all: generating test cases, scanning for vulnerabilities, and automatically applying security rules.

REVIEWER05 / 06

レビュアーエージェントReviewer AgentReviewer Agent

コーディング規約と設計意図に照らして他エージェントの成果物を点検。人によるレビュー前の一次防波堤。Soi xét sản phẩm của các agent khác theo quy ước code và ý đồ thiết kế. Lớp chắn đầu tiên trước khi con người review.Inspects other agents' output against coding conventions and design intent. The first line of defense before human review.

DOCUMENTATION06 / 06

ドキュメントエージェントDocumentation AgentDocumentation Agent

仕様変更、ADR、APIスキーマを実装と同期し、知識基盤を腐らせない役割を担う。Đồng bộ thay đổi spec, ADR và API schema với phần hiện thực — đảm bảo nền tri thức không bị lỗi thời theo thời gian.Keeps spec changes, ADRs, and API schemas in sync with the implementation — ensuring the Knowledge Foundation never goes stale.

◆ ハーネスエンジニアリングとは何か ◆ HARNESS ENGINEERING LÀ GÌ◆ WHAT IS HARNESS ENGINEERING

Agent = Model + Harness

"Harness" は馬具・装着具を意味する。強力だが放っておくと暴走する馬 (LLM) を、有用な方向に働かせるための装着物 — それがハーネスである。Mitchell Hashimoto (Terraform 創業者) が命名し、OpenAI が 2026年2月に提唱した、AI時代の新しいエンジニアリング規律。 "Harness" có nghĩa là bộ yên cương — dụng cụ buộc lên con ngựa mạnh mẽ (LLM) nhưng nếu để mặc thì sẽ chạy loạn, giúp nó đi đúng hướng. Thuật ngữ do Mitchell Hashimoto (đồng sáng lập Terraform) đặt tên và OpenAI chính thức đề xuất vào tháng 2/2026 — một kỷ luật kỹ thuật mới cho thời đại AI."Harness" refers to the tack and gear strapped onto a horse. A powerful horse (the LLM) will run wild if left alone — the harness is what channels it in a useful direction. Coined by Mitchell Hashimoto (co-founder of Terraform) and formally proposed by OpenAI in February 2026, it is a new engineering discipline for the AI era.

22:1
OPENAI 実証実験データ SỐ LIỆU THỰC NGHIỆM OPENAIOPENAI EMPIRICAL DATA
モデルを変えても1点、ハーネスを変えると22点。 Đổi model +1 điểm, đổi harness +22 điểm.Change the model: +1 point. Change the harness: +22 points.
AIモデルの性能差より、環境設計の差の方が 22倍 大きい。最高性能のモデルを選ぶより、ハーネスを整える方が遥かに効く。 Khoảng cách do thiết kế môi trường tạo ra lớn gấp 22 lần khoảng cách giữa các model AI. Việc dựng harness tốt mang lại hiệu quả vượt xa so với việc chỉ chăm chăm chọn model mạnh nhất.The gap created by environment design is 22× larger than the gap between AI models. Building a good harness pays off far more than obsessing over picking the most powerful model.
Model vs Harness comparison chart — 1 point vs 22 points
「モデルを変えても1点、ハーネスを変えると22点」— OpenAI 実証データ。出典: Hexabase Harness Engineering 完全ガイド (2026.05) "Đổi model chỉ được +1 điểm, đổi harness được +22 điểm" — số liệu thực nghiệm OpenAI. Nguồn: Hexabase Harness Engineering 完全ガイド (2026.05)"Change the model for just +1 point; change the harness for +22 points" — OpenAI empirical data. Source: Hexabase Harness Engineering Complete Guide (2026.05)
◆ HARNESS の 3 要素 ◆ 3 YẾU TỐ CỦA HARNESS◆ THE 3 ELEMENTS OF HARNESS

ルールファイル × フィードバックループ × コンテキスト管理 Rule File × Feedback Loop × Context ManagementRule File × Feedback Loop × Context Management

ハーネスの基本は 3 つの要素で構成される。Martin Fowler の解説によると、これらの要素を整えることで AI エージェントの出力品質が劇的に向上する。 Nền tảng của Harness gồm 3 yếu tố cấu thành. Theo phân tích của Martin Fowler, khi triển khai đầy đủ cả 3 yếu tố này, chất lượng output của AI agent sẽ được nâng lên một cách đột phá.The foundation of the Harness is built from three elements. According to Martin Fowler's analysis, putting all three in place dramatically improves the output quality of AI agents.

Harness Engineering — 3 elements: Rule File, Feedback Loop, Context Management
ハーネスエンジニアリングの 3 要素 — 出典: Hexabase Harness Engineering 完全ガイド (2026.05) Ba yếu tố của Harness Engineering — Nguồn: Hexabase Harness Engineering 完全ガイド (2026.05)The three elements of Harness Engineering — Source: Hexabase Harness Engineering Complete Guide (2026.05)
01
ルールファイルRule FileRule File
AIが守るべき規約を明文化するVăn bản hoá quy ước AI phải tuân thủCodify the conventions AI must follow

AIエージェントが守るべきコーディング規約、命名規則、禁止事項を明文化したドキュメント。プロジェクトルートに .claude/rules.mdCONTRIBUTING.md を配置し、AIに読ませることで、一貫性のあるコードを生成させることができる。 Tài liệu văn bản hoá các quy ước code, quy tắc đặt tên và điều cấm mà AI agent phải tuân thủ. Đặt .claude/rules.md hoặc CONTRIBUTING.md ở thư mục gốc dự án và cho AI đọc — kết quả là AI sẽ sinh code nhất quán.A document that codifies the coding conventions, naming rules, and prohibitions an AI agent must follow. Place .claude/rules.md or CONTRIBUTING.md at the project root and let the AI read it — the result is consistent code generation.

Mitchell Hashimoto が Ghostty で公開している AGENTS.md は、ハーネス設計の実例として広く参照されている。プロジェクト構造、ビルド・テストコマンド、コーディング規約、AIが過去に繰り返した間違いのアンチパターンリストが記載され、AIが同じミスを二度としないための「学習ノート」として機能する。 AGENTS.md mà Mitchell Hashimoto công khai trong dự án Ghostty hiện được tham chiếu rộng rãi như một ví dụ điển hình. File này chứa cấu trúc dự án, lệnh build/test, quy ước code và danh sách các anti-pattern mà AI từng mắc — hoạt động như "sổ tay học bài" giúp AI không lặp lại cùng một lỗi.The AGENTS.md that Mitchell Hashimoto publishes in the Ghostty project is now widely referenced as a textbook example of harness design. It contains the project structure, build/test commands, coding conventions, and a list of anti-patterns the AI has repeatedly hit — functioning as a "study notebook" that keeps the AI from making the same mistake twice.

IMPLEMENT → AGENTS.md CLAUDE.md .claude/rules.md RULES.md per module
02
フィードバックループFeedback LoopFeedback Loop
AIの出力を検証し、失敗を検出するKiểm chứng output, phát hiện lỗiVerify output, detect failures

AIの出力をテスト・検証し、失敗を検出して再試行させる仕組み。CI/CDパイプライン、自動テスト、静的解析ツールを組み込み、AIが生成したコードが品質基準を満たしているかを自動でチェックする。 Cơ chế test và kiểm chứng output của AI, tự động phát hiện lỗi và buộc AI retry. Tích hợp CI/CD pipeline, automated test và static analysis để tự động kiểm tra xem code AI sinh ra có đạt tiêu chuẩn chất lượng hay không.A mechanism that tests and verifies AI output, detects failures, and forces the AI to retry. It integrates a CI/CD pipeline, automated tests, and static analysis to automatically check whether the code the AI generates meets quality standards.

OpenAI の実験では、約 1,500 件のプルリクエストが自動で生成・マージされたが、その裏では強固なフィードバックループが機能していた。テストが失敗すれば、AIは自動的にエラーメッセージを読み取り、修正を試みる。静的解析でコーディング規約違反が検出されれば、ルールファイルを参照して再生成する。このサイクルを高速で回すことで、人間の手を介さずに高品質なコードが生成される。 Trong thực nghiệm của OpenAI, khoảng 1.500 pull request đã được tự động sinh và merge — phía sau là một feedback loop mạnh mẽ đang vận hành. Khi test fail, AI tự động đọc thông báo lỗi và sửa lại. Khi static analysis phát hiện vi phạm quy ước, AI tham chiếu rule file và sinh lại code. Vòng lặp này quay tốc độ cao và sinh ra code chất lượng cao mà không cần con người can thiệp.In OpenAI's experiment, roughly 1,500 pull requests were automatically generated and merged — behind them, a robust feedback loop was at work. When a test fails, the AI automatically reads the error message and fixes the code. When static analysis flags a convention violation, the AI consults the rule file and regenerates the code. Running this cycle at high speed produces high-quality code with no human intervention.

IMPLEMENT → CI/CD PreToolUse Hooks PostToolUse Hooks Linter Type-check
03
コンテキスト管理Quản lý ContextContext Management
AIが正しく判断するための情報を提供Cung cấp thông tin để AI phán đoán đúngProvide the information AI needs to judge correctly

AIが正しく判断するための情報を適切に提供すること。プロジェクト構造、依存関係、過去の決定事項、アーキテクチャドキュメントを整理し、AIが「なぜこのコードがここにあるのか」を理解できるようにする。 Cung cấp thông tin phù hợp để AI có thể phán đoán đúng. Sắp xếp cấu trúc dự án, quan hệ phụ thuộc, các quyết định trong quá khứ và tài liệu kiến trúc — để AI hiểu được "vì sao đoạn code này nằm ở đây".Provide the right information so AI can judge correctly. Organize project structure, dependencies, past decisions and architecture documents — so AI can understand "why this piece of code is here".

OpenAI の研究によると、「Codex に地図を渡せ、1,000 ページの説明書ではなく」という教訓がある。巨大な指示ファイルはコンテキストを圧迫し、AIがタスク・コード・関連ドキュメントを見失う原因になる。重要なのは、必要な情報を簡潔に、構造化して提供すること。 Theo nghiên cứu của OpenAI, có một bài học quan trọng: "Hãy đưa Codex một tấm bản đồ, đừng đưa nó cuốn sách hướng dẫn 1.000 trang". File hướng dẫn quá lớn sẽ chiếm hết context và khiến AI mất dấu task, code và tài liệu liên quan. Quan trọng nhất là cung cấp thông tin cần thiết một cách súc tích, có cấu trúc.According to OpenAI research, there is a key lesson: "Give Codex a map, not a 1,000-page manual". An oversized instruction file eats up the context and causes AI to lose track of the task, the code and related documents. What matters most is providing the needed information concisely and in a structured way.

IMPLEMENT → docs/ structure Skills deferred loading Knowledge Graph AGENTS.md as map
◆ 自己改善ループ ◆ VÒNG TỰ CẢI TIẾN◆ SELF-IMPROVEMENT LOOP
3 要素が揃って初めて成立する「実験 → 検証 → 学習 → 改善」のサイクル Chu trình "Thử nghiệm → Kiểm chứng → Học hỏi → Cải tiến" chỉ vận hành khi cả 3 yếu tố đầy đủThe "Experiment → Verify → Learn → Improve" cycle only works when all 3 elements are in place

フィードバックループが無ければ、AIは同じミスを永遠に繰り返す。ルールファイルが無ければ、AIは過去の失敗を記憶できない。コンテキスト管理が無ければ、AIは「なぜこの改善が必要なのか」を理解できない。3 要素が揃って初めて、AIは「ツール」から「同僚」へと進化する。 Không có Feedback Loop, AI sẽ lặp lại cùng một lỗi mãi mãi. Không có Rule File, AI không thể ghi nhớ những thất bại trong quá khứ. Không có Context Management, AI không hiểu được "tại sao cần cải tiến chỗ này". Chỉ khi cả 3 yếu tố hội đủ, AI mới thực sự tiến hoá từ "công cụ" thành "đồng nghiệp".Without a Feedback Loop, AI repeats the same mistake forever. Without a Rule File, AI cannot remember past failures. Without Context Management, AI cannot understand "why this needs improving". Only when all 3 elements come together does AI truly evolve from a "tool" into a "colleague".

◆ AGENT SKILLS とは何か ◆ AGENT SKILLS LÀ GÌ◆ WHAT ARE AGENT SKILLS

ドメイン知識を再利用可能な単位にパッケージ化 Đóng gói tri thức thành đơn vị tái sử dụngPackage knowledge into reusable units

Claude Agent Skills は、特定領域のドメイン知識・手順・テンプレートをフォルダ単位でまとめた「スキル」のこと。エージェントは必要になった時だけ該当スキルを読み込む (deferred loading) — コンテキストを節約しながら、深い専門性を提供できる。Tinhvan Japan のプロジェクト現場知をスキル化することで、組織のノウハウが資産として蓄積される。 Claude Agent Skills là cách đóng gói tri thức chuyên ngành, quy trình và template thành từng thư mục — gọi là "skill". Agent chỉ nạp skill liên quan khi thực sự cần (deferred loading), nhờ đó vừa tiết kiệm context vừa giữ được chuyên môn sâu. Khi tri thức từ hiện trường dự án của Tinhvan Japan được đóng gói thành skill, know-how của tổ chức sẽ được tích luỹ và trở thành tài sản dùng lâu dài.Claude Agent Skills are a way to package domain knowledge, procedures and templates into folders — called "skills". An agent loads only the relevant skill when it actually needs it (deferred loading), saving context while retaining deep expertise. When field knowledge from Tinhvan Japan projects is packaged into skills, the organization's know-how accumulates as a lasting asset.

Skill の中身 — 何が入っているかBên trong một SkillInside a Skill

  • SKILL.mdスキルの「顔」となるドキュメント。YAML frontmatter に `name` と `description` を書き、エージェントはこの description を読んで「今このスキルが必要か」を判断する。Tài liệu "mặt tiền" của skill. YAML frontmatter ghi `name` và `description` — agent đọc description để quyết định "có cần skill này lúc này không".The "front door" document of a skill. The YAML frontmatter holds `name` and `description` — the agent reads the description to decide "whether this skill is needed right now".
  • 手順書領域特有の作業手順、ベストプラクティス、注意点を Markdown で記述。例:「DOCX 生成時の注意」「PowerPoint テンプレ適用手順」など。Quy trình làm việc đặc thù, best practice, lưu ý viết bằng Markdown. Ví dụ: "Lưu ý khi sinh file DOCX", "Quy trình apply template PowerPoint".Domain-specific workflows, best practices and notes written in Markdown. For example: "Notes when generating DOCX files", "Procedure to apply a PowerPoint template".
  • Scriptsその領域で繰り返し使うコード、ヘルパー関数、ツール。Python/Bash/TypeScript 等を必要に応じて同梱できる。Code, helper function, tool dùng lặp trong lĩnh vực đó. Có thể đính kèm Python/Bash/TypeScript khi cần.Code, helper functions and tools reused within that domain. Python/Bash/TypeScript can be bundled as needed.
  • Templates定型フォーマット、雛形ファイル、サンプル設定。エージェントが「ゼロから書く」のではなく「正しい雛形から始める」状態を作る。Format định sẵn, file mẫu, config sample. Agent không "viết từ zero" mà "bắt đầu từ mẫu chuẩn".Preset formats, template files, sample configs. The agent doesn't "write from zero" but "starts from a proper template".
  • deferred loadセッション開始時には description だけが見える状態。エージェントが「使うべき」と判断した瞬間、初めて中身全体が読み込まれる。コンテキスト窓を浪費しない設計。Lúc bắt đầu session chỉ thấy description. Khi agent quyết định "cần dùng", lúc đó mới nạp toàn bộ nội dung. Thiết kế không lãng phí context window.At the start of a session, only the description is visible. The moment the agent decides "this is needed", the full content is loaded. A design that doesn't waste the context window.

典型的なディレクトリ構造Cấu trúc thư mục điển hìnhTypical directory structure

.claude/
└── skills/
    ├── docx-generation/
    │   ├── SKILL.md // name + description
    │   ├── procedures.md
    │   ├── helper.py
    │   └── templates/
    ├── aws-migration/
    │   ├── SKILL.md
    │   ├── runbooks/
    │   └── tvj-cases.md // TVJ 知見
    └── code-review-jp/
        ├── SKILL.md
        └── checklist.md

各スキルは独立。新しい知識領域が増えたら、新しいスキルフォルダを追加するだけで拡張できる。 Mỗi skill độc lập. Có lĩnh vực tri thức mới — chỉ cần thêm folder skill mới là mở rộng được.Each skill is independent. When a new knowledge domain appears — just add a new skill folder to extend it.

3
セキュリティ — CREDENTIALS & SECRETS BẢO MẬT — CREDENTIALS & SECRETSSECURITY — CREDENTIALS & SECRETS

多層防御 — 単一の層に頼らない Phòng vệ đa lớp — không dựa vào một lớp duy nhấtMulti-layer defense — never rely on a single layer

AI エージェントは強力だが故に、機密情報の漏洩リスクも高い。.gitignore 単独では不十分 — 複数の層を同時に張り、AIが秘密情報に触れない環境を機械的に強制する。 AI agent càng mạnh thì rủi ro rò rỉ thông tin nhạy cảm càng cao. Chỉ dùng .gitignore là không đủ — cần kết hợp đồng thời nhiều lớp bảo vệ để cưỡng chế bằng cơ chế máy, ngăn AI tiếp cận được secret.The more powerful the AI agent, the higher the risk of leaking sensitive information. .gitignore alone is not enough — you need to combine multiple protective layers at once to mechanically enforce that AI cannot reach secrets.

重要 / IMPORTANT:QUAN TRỌNG:IMPORTANT: Claude Code の .claudeignore は AI による .env 読み取りを完全には防げない。.gitignore 単独では不十分。複数の層を同時に張る必要がある。 File .claudeignore của Claude Code KHÔNG hoàn toàn ngăn được việc AI đọc .env. Chỉ dùng .gitignore là KHÔNG đủ. Bắt buộc phải áp dụng đồng thời nhiều lớp bảo vệ.Claude Code's .claudeignore does NOT fully prevent AI from reading .env. .gitignore alone is NOT enough. You must apply multiple protective layers at once.
LAYER 1
アーキテクチャKiến trúcArchitecture
Secrets Manager を使用 (AWS / Azure KV / Vault)。.env.example はコミット (実値なし)、.env.local は .gitignore へ。 Dùng Secrets Manager (AWS / Azure KV / Vault). Commit .env.example (không giá trị thật). .env.local đưa vào .gitignore.Use a Secrets Manager (AWS / Azure KV / Vault). Commit .env.example (no real values). Put .env.local into .gitignore.
LAYER 2
Git
.gitignore: .env .env.* *.pem *.key secrets/ credentials.json CLAUDE.local.md .claude/memory.json
pre-commit: gitleaks scan
LAYER 3
PermissionsPermissionsPermissions
settings.json
deny: ["Read(./.env)", "Read(./secrets/**)", "Bash(curl *)", "Bash(cat *.env)"]
LAYER 4
Hooks
security-hook.sh: AIが .env / *.key / ~/.aws を読もうとしたらブロック。Exit 2 + 通知。Chặn AI nếu thử đọc .env / *.key / ~/.aws. Exit 2 + notify.Block AI if it tries to read .env / *.key / ~/.aws. Exit 2 + notify.
LAYER 5
CI/CD Gate
gitleaks + Trufflehog on every PR. シークレットパターン検出時はマージをブロック。 Phát hiện pattern secret → chặn merge.Detect a secret pattern → block the merge.
LAYER 6
Rules + 教育Rules + TrainingRules + Training
rules/security.md: 絶対にハードコードしない。常に process.env.X を使う。AI 自己スキャン: sk-, api_key=, password=。Tuyệt đối không hardcode. Luôn dùng process.env.X. AI self-scan: sk-, api_key=, password=.Never hardcode. Always use process.env.X. AI self-scan: sk-, api_key=, password=.
rules/security.md AIが必ず従う規約AI buộc phải theoAI must comply
API キー / パスワードを絶対にインライン記述しない — 必ず process.env.VARIABLE_NAME を使用。 TUYỆT ĐỐI không viết API key / password inline — luôn dùng process.env.VARIABLE_NAME.NEVER write API key / password inline — always use process.env.VARIABLE_NAME.
新変数を追加する時は必ず .env.example に追記 (実値なし) し、README に記述する。 Thêm biến mới → LUÔN thêm vào .env.example (không giá trị thật), ghi chú trong README.Adding a new variable → ALWAYS add it to .env.example (no real value) and note it in the README.
生成した全コードを自己スキャン: sk-, pk_, api_key=, password=, secret=, token= Self-scan toàn bộ code sinh ra với pattern: sk-, pk_, api_key=, password=, secret=, token=Self-scan all generated code for patterns: sk-, pk_, api_key=, password=, secret=, token=
自身の出力にシークレットパターンを見つけたら → 停止、環境変数にリファクタ、レポート。 Nếu phát hiện pattern secret trong output của chính mình → STOP, refactor về env var, report.If a secret pattern is found in your own output → STOP, refactor to env vars, report.
.env ファイルを絶対に読まない — 構造の参照は docs/context/ のみ。 TUYỆT ĐỐI không đọc file .env — chỉ tham chiếu cấu trúc qua docs/context/.NEVER read .env files — reference the structure only via docs/context/.
4
I/O MAP — フェーズ毎の役割分担 I/O MAP — VAI TRÒ TỪNG GIAI ĐOẠNI/O MAP — ROLES BY PHASE

Input / Output マップ Bản đồ Input / OutputInput / Output map

各フェーズで「誰が何をするか、何が入り、何が出るか」を明示する。AIとヒトの役割境界を曖昧にしないための表。 Ở mỗi giai đoạn — ai làm gì, đầu vào là gì, đầu ra là gì — tất cả đều được làm rõ. Bảng này giúp ranh giới vai trò giữa AI và con người không bao giờ bị mơ hồ.At each phase — who does what, what goes in, what comes out — all made explicit. This table keeps the boundary between AI and human roles from ever becoming blurred.

01
知識基盤Knowledge FoundationKnowledge Foundation
Knowledge Foundation
INAIGATEOUT
人間 INPUTNgười INPUTHuman INPUT
  • Codebase
  • 生ドキュメントRaw docsRaw docs
  • 暗黙知Tribal knowledgeTribal knowledge
AI 実行AI thực hiệnAI executes
  • /initパターン抽出extract patternsextract patterns
  • CLAUDE.md ドラフト生成Generate CLAUDE.md draftGenerate CLAUDE.md draft
人間 GATENgười GATEHuman GATE
  • レビュー + 承認Review + approveReview + approve
  • 文脈追加Add contextAdd context
OUTPUT
  • docs/ folder
  • CLAUDE.md v1
02
ブートストラップBootstrapBootstrap
Bootstrap
INAIGATEOUT
人間 INPUTNgười INPUTHuman INPUT
  • 技術スタックTech stackTech stack
  • 規約ConventionsConventions
  • コミュニティ Skill reposCommunity Skill reposCommunity Skill repos
AI 実行AI thực hiệnAI executes
  • スキルをカスタマイズCustomise skillsCustomise skills
  • コマンド + Hook 起草Draft commands + hooksDraft commands + hooks
人間 GATENgười GATEHuman GATE
  • スキルレビューReview skillsReview skills
  • コマンド検証Test commandsTest commands
  • Hook 承認Approve hooksApprove hooks
OUTPUT
  • .claude/skills/
  • .claude/commands/
  • settings.json
03
タスク受領Tiếp nhận taskReceive task
Task Intake
INAIGATEOUT
人間 INPUTNgười INPUTHuman INPUT
  • チケット URLTicket URLTicket URL
  • または概要hoặc tóm tắtor summary
AI 実行AI thực hiệnAI executes
  • MCP 経由でチケット読込Đọc ticket qua MCPRead ticket via MCP
  • 不明点を質問Hỏi điểm chưa rõAsk about unclear points
  • タスクファイル作成Tạo file taskCreate task file
人間 GATENgười GATEHuman GATE
  • タスクファイル確認Xem lại file taskReview task file
  • 承認Phê duyệtApprove
OUTPUT
  • TASK-xxx.md
  • docs/tasks/
04
設計Thiết kếDesign
Design
INAIGATEOUT
人間 INPUTNgười INPUTHuman INPUT
  • 承認済タスクファイルFile task đã phê duyệtApproved task file
AI 実行AI thực hiệnAI executes
  • アプローチ提案Đề xuất approachPropose approach
  • ADR 整合性チェックCheck ADR consistencyCheck ADR consistency
  • 変更ファイル一覧Liệt kê file phải sửaList files to change
人間 GATENgười GATEHuman GATE
  • 計画承認Duyệt kế hoạchApprove plan
  • または方向修正hoặc đổi hướngor course correction
OUTPUT
  • 設計メモDesign notesDesign notes
  • 更新タスクファイルTask file cập nhậtUpdated task file
05
実装Hiện thựcImplementation
Implement
INAIGATEOUT
人間 INPUTNgười INPUTHuman INPUT
  • /feature
  • TASK-xxx
AI 実行AI thực hiệnAI executes
  • スキル + ルール読込Load skills + rulesLoad skills + rules
  • TDD でテスト先行Test trước (TDD)Tests first (TDD)
  • 実装 + 自己レビューImplement + self-reviewImplement + self-review
人間 GATENgười GATEHuman GATE
  • 差分レビューReview diffReview diff
  • 受入基準を手動テストTest AC thủ côngManually test AC
OUTPUT
  • ソースコードSource codeSource code
  • 単体テストUnit testsUnit tests
  • 更新タスクログTask log cập nhậtUpdated task log
06
テストKiểm thửTesting
Testing
INAIGATEOUT
人間 INPUTNgười INPUTHuman INPUT
  • /test [file]
  • /e2e [scenario]
AI 実行AI thực hiệnAI executes
  • テスト計画生成Sinh test planGenerate test plan
  • 承認待ちChờ phê duyệtAwait approval
  • テスト記述 + 実行Viết + chạy testWrite + run tests
人間 GATENgười GATEHuman GATE
  • シナリオレビューReview scenariosReview scenarios
  • 承認Phê duyệtApprove
OUTPUT
  • テストファイルTest filesTest files
  • カバレッジレポートBáo cáo coverageCoverage report
07
デプロイTriển khaiDeploy
Deploy
INAIGATEOUT
人間 INPUTNgười INPUTHuman INPUT
  • /deploy [env]
AI 実行AI thực hiệnAI executes
  • デプロイ前チェックリストChecklist trước deployPre-deploy checklist
  • ステージングで E2EE2E trên stagingE2E on staging
  • シークレットスキャンScan secretSecret scan
  • リリースノートRelease notesRelease notes
人間 GATENgười GATEHuman GATE
  • 最終承認Duyệt cuốiFinal approval
OUTPUT
  • デプロイログDeploy logDeploy log
  • E2E 結果E2E resultsE2E results
  • リリースノートRelease notesRelease notes
08
改善Cải tiếnImprovement
Improve
INAIGATEOUT
人間 INPUTNgười INPUTHuman INPUT
  • 随時Bất cứ lúc nàoAnytime
  • バグ・パターン・新ツールBug, pattern, tool mớiBugs, patterns, new tools
AI 実行AI thực hiệnAI execution
  • 反復パターン / エラーに対する更新提案Đề xuất cập nhật cho pattern lặp / lỗiUpdate proposals for recurring patterns / errors
人間 GATENgười GATEHuman GATE
  • レビュー + 改善マージReview + merge cải tiếnReview + merge improvements
OUTPUT
  • CLAUDE.md 更新cập nhậtupdate
  • 新/更新スキルSkill mới / cập nhậtNew / updated Skill
5
原則 — 設計の五箇条 NGUYÊN TẮC — NĂM TÔN CHỈ THIẾT KẾPRINCIPLES — THE FIVE DESIGN TENETS

守るべき 五箇条 Năm tôn chỉ cần giữFive tenets to uphold

Tinhvan Japan が現場で繰り返し検証してきた、AI 駆動開発の設計原則。これらを外すと、フレームワーク全体の効果が急速に失われる。 Năm nguyên tắc thiết kế cho AI-Driven Development mà Tinhvan Japan đã kiểm chứng nhiều lần qua thực tiễn dự án. Bỏ qua bất kỳ nguyên tắc nào, hiệu quả của toàn bộ framework sẽ suy giảm rất nhanh.Five design principles for AI-driven development that Tinhvan Japan has validated repeatedly in the field. Drop any one of them, and the effectiveness of the entire framework degrades rapidly.

1
AIを「何でも知っている開発者」にしない Không biến AI thành "developer biết tuốt"Don't turn AI into a "know-it-all developer"
  • 万能AIは存在しない — 業務文脈や規約を知らないモデルは、それらしいが誤った実装を生む。Không tồn tại AI vạn năng — một model không nắm được nghiệp vụ và quy ước sẽ chỉ tạo ra code trông có vẻ đúng nhưng thực chất sai.There is no all-purpose AI — a model that doesn't grasp your business context and conventions will only produce code that looks right but is actually wrong.
  • 「すべてを任せる」発想を捨て、明確な境界と役割を設定する。Cần từ bỏ tư duy "giao hết cho AI" và thiết lập ranh giới, vai trò rõ ràng cho từng thành phần.Abandon the "delegate everything to AI" mindset and set clear boundaries and roles for each component.
2
役割と文脈を専門性で 分割 する Chia nhỏ vai trò và context theo chuyên mônSplit roles and context by specialization
  • Business / Architect / Development / QA / Reviewer / Documentation など、領域別の専門エージェントを編成する。Tổ chức đội ngũ agent chuyên môn theo từng lĩnh vực: Business / Architect / Development / QA / Reviewer / Documentation.Orchestrate a team of specialized agents by domain: Business / Architect / Development / QA / Reviewer / Documentation.
  • 各エージェントは独立したコンテキストウィンドウを持ち、互いに汚染しない。Mỗi agent có context window độc lập, không gây nhiễu lẫn nhau.Each agent has an independent context window, so they don't contaminate one another.
  • 専門特化により、深い精度と高い再現性が両立する。Nhờ chuyên môn hoá, vừa đạt được độ chính xác sâu vừa giữ được tính tái lập cao.Specialization delivers both deep accuracy and high reproducibility.
3
手作りのプロンプトではなく、再利用可能なワークフロー を組む Không viết prompt thủ công — hãy xây workflow tái sử dụng đượcDon't hand-craft prompts — build reusable workflows
  • 巧みなプロンプトは個人のノウハウに留まり、組織資産にならない。スケールしない。Prompt hay chỉ nằm trong đầu cá nhân, không trở thành tài sản chung của tổ chức và không thể nhân rộng.A clever prompt stays in one person's head — it never becomes a shared organizational asset, and it doesn't scale.
  • コマンド・スキル・サブエージェントとして体系化し、チーム全員が同じ品質を再現できるようにする。Hệ thống hoá thành command, skill và sub-agent — để cả team đều có thể tái lập được cùng một mức chất lượng.Systematize them into commands, Skills, and sub-agents so the whole team can reproduce the same quality.
  • 属人化を排除することが、AI 駆動開発を本格運用に乗せる唯一の道。Loại bỏ sự phụ thuộc cá nhân là con đường duy nhất để đưa AI-Driven Development vào vận hành ở quy mô thực.Eliminating individual dependency is the only way to bring AI-driven development into real-scale operation.
4
AIを広げる前に、知識基盤 を先に固める Trước khi mở rộng AI, hãy củng cố nền tri thức trướcBefore scaling AI, first solidify the Knowledge Foundation
  • 仕様・コードグラフ・ADR・APIスキーマ・ナレッジグラフを整備していない状態でAIを広げると、誤りが指数的に増える。Khi chưa chuẩn bị xong spec, code graph, ADR, API schema và knowledge graph mà đã mở rộng AI — sai sót sẽ tăng theo cấp số nhân.Scaling AI before your specs, code graph, ADRs, API schema, and knowledge graph are in place makes errors grow exponentially.
  • 「AIに地図を渡せ、千ページの説明書ではなく」— OpenAI の教訓。"Hãy đưa AI một tấm bản đồ, đừng đưa nó cuốn sách hướng dẫn ngàn trang" — bài học từ OpenAI."Give AI a map, not a thousand-page manual" — a lesson from OpenAI.
  • FOUNDATION FIRST — 基盤が固まってから、エージェント体制を拡大する。FOUNDATION FIRST — nền móng vững chắc trước, rồi mới mở rộng đội ngũ agent.FOUNDATION FIRST — solidify the foundation, then scale up the agent team.
5
システムを理解する こそが、依然として最重要要素である Con người hiểu hệ thống vẫn là yếu tố quan trọng nhấtThe people who understand the system remain the single most critical factor
  • AI は提案する、人間が決める。重要な設計、トレードオフ、リスク判断は人間が握る。AI đưa ra đề xuất, con người ra quyết định. Thiết kế quan trọng, đánh đổi và đánh giá rủi ro — đều thuộc về con người.AI proposes, humans decide. Critical design, trade-offs, and risk judgment all stay with humans.
  • Human-in-the-loop を恒久的に組み込み、AIの暴走を防ぐ。Tích hợp Human-in-the-loop một cách bền vững để ngăn AI đi chệch hướng.Embed Human-in-the-Loop permanently to keep AI from running off course.
  • ドメイン知識のエンコードは人間にしかできない仕事。Việc mã hoá tri thức nghiệp vụ là việc duy nhất chỉ con người mới làm được.Encoding domain knowledge is work that only humans can do.
— Tinhvan Japan の現場知から導かれた五箇条 — Năm tôn chỉ đúc kết từ thực tiễn tại Tinhvan Japan— Five tenets distilled from hands-on experience at Tinhvan Japan
◆ 期待される効果 — OUTCOME ◆ ◆ KẾT QUẢ ĐẠT ĐƯỢC — OUTCOME ◆◆ EXPECTED OUTCOMES — OUTCOME ◆

Context window を制御し、 モデルに縛られない 開発体制へ。 Kiểm soát Context Window, đạt được thể chế phát triển không phụ thuộc model.Control the context window, for a development structure that is model-agnostic.

開発速度 Tốc độ phát triểnDevelopment speed
1/10
所要時間が約 1/10 へ Thời gian rút xuống ~ 1/10Time cut to ~1/10
  • 手書きコードの場合の約 1/10 の期間で完了Hoàn thành trong khoảng 1/10 thời gian so với viết tayCompleted in about 1/10 the time of hand-written code
  • 3 人のエンジニアで 5 ヶ月、約 100 万行コードを生成3 kỹ sư trong 5 tháng tạo ra khoảng 1 triệu dòng code3 engineers generated ~1 million lines of code in 5 months
  • 1 ヶ月のスプリントが数日で完結可能にSprint dài 1 tháng có thể hoàn thành chỉ trong vài ngàyA one-month sprint can be finished in just a few days
環境設計の効果 Hiệu quả thiết kế môi trườngImpact of environment design
22×
ハーネス vs モデル選定 Harness vs chọn ModelHarness vs model selection
  • モデル変更 +1 点、ハーネス設計 +22 点Đổi model thì được +1 điểm, còn thiết kế harness lại được +22 điểmChanging the model: +1 point; designing the Harness: +22 points
  • 最新モデルへの依存より、環境整備の方が圧倒的に効くĐầu tư cho môi trường mang lại hiệu quả vượt trội so với chạy theo model mới nhấtInvesting in the environment vastly outperforms chasing the latest model
  • 同じモデルでも、ハーネス次第で出力品質が劇的に変わるCùng một model, nhưng harness khác nhau thì chất lượng output khác hẳnWith the same model, output quality changes dramatically depending on the Harness
スループット ThroughputThroughput
3.5PR/dayday
1 人あたり 1 日 3.5 PR 3.5 PR / người / ngày3.5 PRs / person / day
  • OpenAI 実験: 1,500 件の PR が自動生成・マージ済みThực nghiệm tại OpenAI: 1.500 PR được tự động sinh và mergeOpenAI experiment: 1,500 PRs auto-generated and merged
  • 単一の Codex 実行が 6 時間以上自律稼働 (人間就寝中も)Một lần chạy Codex có thể tự chủ hoạt động hơn 6 tiếng (kể cả lúc con người đang ngủ)A single Codex run can operate autonomously for over 6 hours (even while humans sleep)
  • 従来比 約 2 倍のマージ済 PR (Business Insider 調査)Số PR được merge cao gấp khoảng 2 lần so với cách làm truyền thống (theo Business Insider)About 2x the merged PRs vs traditional methods (Business Insider study)
再現性 & 品質 Tái hiện & Chất lượngReproducibility & quality
100%
標準化された出力 Output chuẩn hoáStandardized output
  • 属人化したプロンプトへの依存ゼロHoàn toàn không phụ thuộc vào prompt cá nhânZero dependency on individual prompts
  • ワークフローとスキルが組織資産として蓄積Workflow và skill được tích luỹ thành tài sản chung của tổ chứcWorkflows and Skills accumulate as shared organizational assets
  • チーム全員が同じ品質と一貫性を再現可能Cả team đều có thể tái lập cùng một mức chất lượng và sự nhất quánThe whole team can reproduce the same quality and consistency