Bỏ qua để đến nội dung

Quản trị & Chính sách

Thời gian học: ~30 phút

Yêu cầu trước: Module 10.4 (Chia sẻ kiến thức)

Kết quả: Sau module này, bạn sẽ hiểu governance area cho AI coding tool, có template cho AI usage policy, và biết balance innovation với risk management.


Dev send proprietary code cho AI không nghĩ về confidentiality. Legal hỏi “ai own AI-generated code?” — không ai biết. Security hỏi “data gì đang gửi external API?” — im lặng. Compliance hỏi “regulatory requirement?” — blank stare.

Không governance, AI adoption tạo uncertainty và risk. Với clear policy, team move FASTER vì biết cái gì allowed. Governance không phải brake — là guardrail enable speed.


AreaKey QuestionPolicy Needed
AccessAi được dùng AI tool?Approval process, training
ScopeCode nào AI được touch?Sensitive area, client restriction
SecurityData nào gửi cho AI?PII, credential, proprietary
IP/LegalAi own AI output?Ownership, licensing, liability
QualityStandard nào apply?Review requirement, testing
ComplianceRegulatory requirement?Industry-specific rule
# AI Coding Tools Policy
## Purpose
[Tại sao policy này tồn tại]
## Approved Tools
[AI tool nào được phép]
## Usage Guidelines
[Allowed / Requires Approval / Prohibited]
## Security Requirements
[Data protection rule]
## Quality Requirements
[Review và testing standard]
## IP & Legal
[Ownership và liability]
## Compliance
[Cách ensure adherence]
CategoryExampleAction
Never sendCredential, API key, PII, production dataAbsolutely prohibited
Be cautiousProprietary algorithm, unreleased featureRequires approval
SafePublic API, general pattern, open-sourceAllowed
  • Ownership: AI-generated code là company work product
  • Liability: Human author responsible cho AI output
  • Licensing: AI có thể reproduce licensed code — review cẩn thận
  • Attribution: Document AI assistance trong commit

Scenario: Team tạo AI coding tools policy.

# AI Coding Tools Policy
## Version: 1.0 | Last Updated: [Date]
## 1. Purpose
Policy này govern AI coding assistant để enable productivity
trong khi manage security và quality risk.
## 2. Approved Tools
- Claude Code (Anthropic) — approved cho tất cả development
- GitHub Copilot — approved cho open-source project only
## 3. Usage Guidelines
### Allowed
- Code generation cho internal tool
- Test generation
- Documentation generation
- Refactoring assistance
### Requires Approval
- Client-facing code (notify project lead)
- Security-sensitive component (security review)
- Database schema và migration
### Prohibited
- Gửi credential, API key, hoặc secret
- Gửi PII hoặc customer data
- Gửi proprietary client code
- Dùng AI output không review
## 4. Security Requirements
- Never include real credential trong prompt
- Dùng placeholder data, không production data
- Review AI output cho accidental data exposure
## 5. Quality Requirements
- All AI-generated code phải pass code review
- AI-assisted PR phải label với 🤖
- Author phải hiểu và explain được AI code
## 6. IP & Legal
- AI-generated code là company work product
- Human author responsible cho AI output
- Document AI assistance trong commit message
## 7. Compliance
- Policy review quarterly
- Violation report tới security@company.com
Review policy với:
- Engineering leadership (practicality)
- Security team (risk assessment)
- Legal (IP và liability)
- Compliance (regulatory requirement)
- Dev team (usability feedback)
## Rollout Checklist
- [ ] Announce policy trong all-hands meeting
- [ ] Add vào onboarding documentation
- [ ] Tạo quick-reference 1-pager
- [ ] Host Q&A session cho question
- [ ] Add vào CLAUDE.md: "Review AI_POLICY.md trước khi dùng AI tool"
## Enforcement Mechanism
- PR template include: "AI tool used? Policy followed?"
- Monthly review incident
- Quarterly policy update based on learning
- Anonymous feedback channel cho improvement

Goal: Assess organization’s AI governance.

Instructions:

  1. Organization có AI tools policy chưa?
  2. Nếu có: Read nó. Practical không? Missing gì?
  3. Nếu không: Draft dùng template above
  4. Identify gap hoặc overly restrictive area
💡 Hint

Start với: Purpose, Approved Tools, Prohibited Actions, Security Requirements. Add section khác as needed.

Goal: Tạo personal safeguard.

Instructions:

  1. Review AI interaction tuần qua
  2. Có gửi gì không nên gửi cho AI không?
  3. Tạo pre-prompt checklist: “Trước khi gửi cho AI, verify: …”
✅ Solution

Pre-prompt checklist:

  • Không credential hoặc API key
  • Không PII hoặc customer data
  • Không proprietary client code
  • Dùng placeholder data, không production

Goal: Practice defend AI policy.

Instructions:

  1. Role-play present AI policy cho skeptical stakeholder
  2. Practice trả lời: “Nếu AI leak code?” “Ai liable?”
  3. Document answer cho real conversation
💡 Hint

Key answer: Ownership = company. Liability = human author. Security = policy define boundary. Quality = standard review apply.


  1. Purpose
  2. Approved Tools
  3. Usage Guidelines (Allowed/Approval/Prohibited)
  4. Security Requirements
  5. Quality Requirements
  6. IP & Legal
  7. Compliance
❌ Credential, API key
❌ PII, customer data
❌ Proprietary client code
❌ Production database content
QuestionAction
Data này sensitive?Không gửi
Đây là client code?Check policy
Explain được AI code này không?Nếu không, không submit
PR này AI-assisted?Label 🤖
QuestionAnswer
Ai own AI code?Company (work product)
Ai liable?Human author
Secure không?Policy define boundary
Quality assured?Standard review apply

❌ Sai Lầm✅ Đúng Cách
No policy (anything goes)Clear guideline enable faster adoption
Over-restrictive (không ai dùng AI)Balance security với productivity
Policy không trainingCommunicate, train, answer question
Policy không enforcementPR check, periodic audit
Static policy (không update)Quarterly review và update
Policy chỉ từ legal/securityInclude developer input cho practicality
Unclear ownershipHuman author own AI output

Scenario: Fintech Việt Nam, 50 developer. Trước policy: một số dev send customer transaction data cho AI để “test.” Dev khác accidentally include API key trong prompt. Near-miss security incident.

Policy implementation:

  • Tuần 1: Security team draft policy với dev input
  • Tuần 2: Legal review IP và liability section
  • Tuần 3: All-hands presentation, Q&A session
  • Tuần 4: Policy enforce, PR template update

Policy highlight:

  • Approved: Claude Code với company account
  • Prohibited: customer data, financial credential
  • Required: AI-assisted PR label, security review cho payment code

Result sau 3 tháng:

  • Zero security incident related AI
  • AI adoption increase 40% (dev biết cái gì allowed)
  • Audit found 100% compliance với labeling requirement
  • Policy update 2 lần based on team feedback

Quote: “Policy không slow down. Speed up vì stop second-guessing what’s allowed.”


Phase 10 Hoàn Thành! Bạn đã có framework đầy đủ cho team collaboration với Claude Code — từ shared convention đến governance.

Phase Tiếp Theo: Phase 11: Automation & Headless — Chạy Claude Code không cần human interaction.