LeadershipTechnical ManagerCommunication and Influence

Session 04 - Cross-team Collaboration

Dependency Management Between Teams

Dependencies giữa teams là nguồn gốc lớn nhất của delays trong software organizations. Senior dev cần biết identify, track, và mitigate chúng.

Dependency Types

TypeMô tảVí dụRisk Level
CodeTeam A cần code change từ Team BShared library updateMedium
APITeam A consume API mà Team B ownNew endpoint neededHigh
DataTeam A cần data mà Team B manageSchema changeHigh
InfrastructureTeam A cần infra mà Platform team provideNew Kubernetes namespaceMedium
KnowledgeTeam A cần expertise mà Team B cóSecurity reviewLow

Dependency Tracking Template

markdown
## Cross-team Dependencies - [Sprint/Quarter]

| ID | Description | Our Team | Depends On | Owner | Due Date | Status | Risk |
|----|------------|----------|-----------|-------|----------|--------|------|
| D-01 | Payment API v2 endpoint | Order Team | Payment Team | @tuan | Mar 15 | In Progress | Medium |
| D-02 | Auth service migration | All teams | Platform Team | @linh | Apr 1 | Blocked | High |
| D-03 | Product schema change | Search Team | Product Team | @minh | Mar 20 | Done | - |

Mitigation Strategies

StrategyKhi nào dùngVí dụ
Mock / StubAPI chưa readyContract-first development, mock server
Feature flagsKhông chắc timeline team kiaDeploy code nhưng disable cho đến dependency ready
Abstraction layerReduce couplingAnti-corruption layer, adapter pattern
Parallel workstreamsCả hai team cùng developAgree interface upfront, implement parallel
EscalationBlocked > 3 ngàyEscalate lên management

API Contract-First Development

Workflow

1. Both teams agree on API contract (OpenAPI/Swagger)
2. Contract committed vào shared repo
3. Consumer team generates mock từ contract
4. Provider team implements API theo contract
5. Contract tests verify both sides
6. Integration test trước go-live

OpenAPI Contract Template

yaml
openapi: 3.0.3
info:
  title: Order Service API
  version: 1.0.0
  description: API contract between Order Team and Payment Team
  
paths:
  /api/v1/orders/{orderId}/payment:
    post:
      summary: Initiate payment for order
      operationId: initiatePayment
      parameters:
        - name: orderId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentRequest'
      responses:
        '202':
          description: Payment initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponse'
        '400':
          description: Invalid request
        '404':
          description: Order not found

Contract Testing Checklist

  • API contract versioned trong Git
  • Breaking changes require version bump (v1 → v2)
  • Consumer-driven contract tests (Pact hoặc similar)
  • Provider verification tests
  • Contract review process (PR approval từ cả 2 teams)
  • Backward compatibility policy documented

Shared Libraries & Platform Teams

Khi nào tạo Shared Library

Tạo shared libraryKHÔNG tạo shared library
3+ teams dùng cùng logicChỉ 2 teams, logic đơn giản
Logic stable, ít thay đổiLogic đang evolve nhanh
Clear ownership và versioningKhông ai muốn maintain
Breaking changes manageableTight coupling risk cao

Shared Library Best Practices

DO:
  ✓ Semantic versioning (major.minor.patch)
  ✓ Clear CHANGELOG
  ✓ Published qua NuGet (internal feed)
  ✓ Backward compatible - deprecate trước khi remove
  ✓ Có dedicated owner/team
  ✓ Comprehensive tests và docs

DON'T:
  ✗ Force mọi team update cùng lúc
  ✗ Put business logic vào shared library
  ✗ Shared library phụ thuộc specific infrastructure
  ✗ "Common" library chứa everything

Platform Team Responsibilities

ResponsibilityDeliverableConsumer Teams Benefit
CI/CD PipelineTemplate pipelines, shared agentsTeams focus vào code, không setup pipeline
ObservabilityCentralized logging, monitoring stackConsistent monitoring across services
Service MeshShared infrastructure (Istio, Consul)Built-in retry, circuit breaker, mTLS
Developer PortalSelf-service tools, documentationOnboarding nhanh, reduce dependency
Security ScanningAutomated SAST/DAST in pipelineSecurity by default

Cross-team Sync Meetings

Meeting Types

MeetingFrequencyDurationAttendeesPurpose
Scrum of Scrums2-3x/week15 phút1 rep per teamSync dependencies, blockers
Tech Lead SyncWeekly30 phútTech leadsArchitecture alignment, shared decisions
Cross-team RetroQuarterly60 phútTeam membersImprove collaboration process
Demo DayBi-weekly60 phútAll teamsShare progress, celebrate wins

Scrum of Scrums Format

Mỗi team rep trả lời 3 câu hỏi (2 phút):

1. "Team chúng tôi đã complete gì ảnh hưởng teams khác?"
2. "Team chúng tôi sẽ làm gì cần teams khác?"  
3. "Blockers nào cần cross-team help?"

→ Action items assign ngay, follow up trong ngày
→ KHÔNG deep dive - book separate meeting cho complex topics

Escalation Paths

Escalation Framework

Level 0: Direct communication giữa engineers (Slack, PR comments)
         → Timeline: resolve trong 24h

Level 1: Tech Lead to Tech Lead
         → Timeline: resolve trong 48h
         → Khi: L0 không resolve được

Level 2: Engineering Manager to Engineering Manager
         → Timeline: resolve trong 1 week
         → Khi: Resource conflict, priority disagreement

Level 3: VP/Director level
         → Timeline: resolve cùng ngày
         → Khi: Business-critical blocker, cross-org conflict

Escalation Best Practices

DoDon't
Escalate sớm khi thấy stuckĐợi deadline mới escalate
Document context trước khi escalateEscalate bằng vague complaints
Propose solutionsChỉ throw problem lên trên
CC relevant peopleBypass direct report
Follow up sau khi resolvedEscalate rồi forget

Conway's Law & Organizational Design

"Organizations which design systems are constrained to produce designs which are copies of the communication structures of these organizations." - Melvin Conway

Ví dụ thực tế

Org StructureSystem Architecture Result
3 teams: Frontend, Backend, Database3-tier monolith
Teams theo business domainMicroservices theo domain
Centralized platform teamShared platform + dependent services
Cross-functional feature teamsEnd-to-end owned services

Inverse Conway Maneuver

Idea: Thay vì để org dictate architecture, organize teams theo desired architecture.

Muốn microservices? → Tạo teams theo bounded contexts
Muốn platform?      → Tạo dedicated platform team
Muốn full-stack?    → Tạo cross-functional teams

Team Topologies

4 Team Types (Matthew Skelton & Manuel Pais)

TypePurposeVí dụInteraction Mode
Stream-alignedDeliver business value liên tụcOrder team, Payment teamOwn end-to-end flow
PlatformReduce cognitive load cho stream-aligned teamsDevOps platform, Data platformSelf-service
EnablingHelp teams adopt new capabilitiesArchitecture team, Security guildCoaching, temporary
Complicated-subsystemManage complex domain cần specialist knowledgeML engine, Payment gateway integrationAPI/service

Interaction Modes

ModeMô tảDuration
Collaboration2 teams work closely togetherTemporary (weeks-months)
X-as-a-ServiceTeam cung cấp service, team khác consumeOngoing
FacilitatingTeam giúp team khác learn new skillTemporary (weeks)

Applying Team Topologies Checklist

  • Mỗi stream-aligned team có thể ship feature end-to-end
  • Platform team cung cấp self-service (không phải ticket-based)
  • Enabling teams có exit strategy (không permanent dependency)
  • Cognitive load per team manageable (max 2-3 services own)
  • Team boundaries align với architecture boundaries
  • Communication overhead minimize qua clear interfaces

Interface Agreements

Inter-team Interface Agreement Template

markdown
## Interface Agreement - [Team A] ↔ [Team B]

### Scope
[Mô tả interaction giữa 2 teams]

### API Contract
- Contract location: [Git repo link]
- Versioning policy: Semantic versioning
- Breaking change notice: Minimum 2 sprints

### SLA Between Teams
| Metric | Target |
|--------|--------|
| API availability | 99.9% |
| Response time P95 | < 200ms |
| Support response time | < 4 business hours |
| Breaking change notice | 2 sprints (4 weeks) |

### Communication
| Channel | Purpose |
|---------|---------|
| #team-a-team-b-sync | Daily async communication |
| Weekly sync meeting | Wednesday 10am |
| Escalation | [Tech Lead A] ↔ [Tech Lead B] |

### Change Management
- Contract changes require PR approval from BOTH teams
- Breaking changes announced trong weekly sync
- Migration support provided by provider team

### Review Schedule
- Agreement reviewed quarterly
- Next review: [Date]