google-agents-cli-scaffold
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
forensic-organizational-alignment
Use when team reorganization planning, identifying coordination inefficiencies, validating Conway's Law, assessing team-architecture fit, or planning service splits - analyzes alignment between code module boundaries and team structures revealing organizational bottlenecks
Full skill instructions
State explicitly: "Using forensic-organizational-alignment pattern"
Then follow these steps:
Organizational alignment analysis examines whether code architecture matches team structure. Based on Conway's Law: "Organizations design systems that mirror their communication structures."
This analysis reveals:
Core principle: Architecture should match team boundaries. Misalignment causes coordination overhead, slow velocity, and unclear ownership.
This is Conway's Law-based alignment measurement - don't create custom metrics:
Module Alignment Score:
- Single team (>80% contribution): GOOD (10 points)
- Two teams (50-80% primary): MODERATE (5 points)
- Multi-team (<50% each): POOR (0 points)
- Orphaned (no team >50%): CRITICAL (-5 points)
Team Focus Score:
- Focused (1-2 modules owned): GOOD (5 points)
- Spread (3-5 modules): MODERATE (0 points)
- Overloaded (6+ modules): POOR (-5 points)
Cross-Team Coupling Penalty:
- Low (<10% cross-team commits): GOOD (5 points)
- Medium (10-30%): MODERATE (0 points)
- High (>30%): POOR (-5 points)
Overall Alignment = (sum of points / max possible) × 100
Thresholds: >75 = good alignment, 50-75 = moderate, <50 = poor (needs action)
Critical: Single-team modules with <10% cross-team involvement = ideal state.
Always reference Conway's Law research when presenting findings:
| Finding | Impact | Source | When to Cite |
|---|---|---|---|
| Conway's Law | Architecture mirrors org structure | Herbsleb & Mockus (2003) | "Conway's Law shows architecture mirrors communication structure (Herbsleb)" |
| Multi-team modules | 40-60% slower velocity | Microsoft DevOps | "Multi-team modules reduce velocity by 40-60% (Microsoft)" |
| Reverse Conway | Org structure can drive architecture | Inverse Conway | "You can reorganize teams to drive architectural change (Inverse Conway)" |
Always cite Conway's Law when recommending organizational or architectural changes.
| Purpose | Command |
|---|---|
| Contributors by module | git log --since="12 months ago" --format="%an" -- MODULE/ | sort | uniq -c | sort -rn |
| Cross-module commits | git log --since="12 months ago" --name-only --format="COMMIT:%H|%an" |
| Team inference (email) | git log --since="12 months ago" --format="%an|%ae" | sort -u |
| Contribution matrix | git log --since="12 months ago" --numstat --format="%H|%an" -- MODULE/ |
| Module State | Primary Team % | Secondary Teams | Alignment | Action |
|---|---|---|---|---|
| Single-team | >80% | None | GOOD | Maintain boundaries |
| Shared | 50-80% | 1 team | MODERATE | Clarify ownership |
| Multi-team | <50% each | 2+ teams | POOR | Refactor or reassign |
| Orphaned | <50% | Many | CRITICAL | Assign owner or deprecate |
| Pattern | Indicator | Risk | Fix |
|---|---|---|---|
| Multi-team module | >2 teams contribute significantly | HIGH | Assign primary owner, create interfaces |
| Cross-boundary coupling | High co-change across teams | HIGH | API contracts, versioning |
| Orphaned code | No team >50% ownership | CRITICAL | Assign ownership or delete |
| Overloaded team | Team owns 6+ modules | MEDIUM | Split team or consolidate modules |
If not provided, infer from git data:
# Pseudocode for team inference
def infer_teams(contributors):
# Method 1: Email domains
teams_by_domain = defaultdict(list)
for name, email in contributors:
domain = email.split('@')[1]
teams_by_domain[domain].append(name)
# Method 2: Co-commit patterns (proxy for communication)
teams_by_cocommit = cluster_by_cocommit_frequency(contributors)
# Method 3: Module ownership patterns
teams_by_module = cluster_by_shared_modules(contributors)
# Combine methods for best inference
return merge_team_inferences([teams_by_domain, teams_by_cocommit, teams_by_module])
Ask user for validation: Inferred teams may be wrong - always confirm.
Calculate contribution percentage:
def map_teams_to_modules(modules, contributors, team_mapping):
module_ownership = {}
for module in modules:
# Get all commits to this module
commits_by_team = defaultdict(int)
for commit in get_commits_to_module(module, since="12 months ago"):
author = commit.author
team = team_mapping.get(author, "Unknown")
commits_by_team[team] += 1
# Calculate percentages
total_commits = sum(commits_by_team.values())
ownership_pct = {
team: (count / total_commits * 100)
for team, count in commits_by_team.items()
}
# Find primary owner
primary_team = max(ownership_pct, key=ownership_pct.get)
primary_pct = ownership_pct[primary_team]
module_ownership[module] = {
'primary_team': primary_team,
'primary_pct': primary_pct,
'all_teams': ownership_pct
}
return module_ownership
Apply scoring formula:
def calculate_alignment_score(module_ownership, team_focus):
score = 0
max_score = 0
# Module alignment scoring
for module, ownership in module_ownership.items():
max_score += 10
primary_pct = ownership['primary_pct']
team_count = len([p for p in ownership['all_teams'].values() if p > 5])
if primary_pct > 80 and team_count == 1:
score += 10 # Single-team (ideal)
elif primary_pct > 50:
score += 5 # Shared but clear primary
elif primary_pct < 50:
score += 0 # Multi-team (poor)
# Orphaned modules
if primary_pct < 50 and team_count > 3:
score -= 5 # Orphaned (critical)
# Team focus scoring
for team, modules_owned in team_focus.items():
max_score += 5
if len(modules_owned) <= 2:
score += 5 # Focused (good)
elif len(modules_owned) <= 5:
score += 0 # Spread (moderate)
else:
score -= 5 # Overloaded (poor)
# Overall alignment percentage
alignment_pct = (score / max_score) * 100 if max_score > 0 else 0
return max(0, min(100, alignment_pct)) # Clamp to 0-100
Detect specific patterns:
def identify_misalignments(module_ownership, cross_team_coupling):
misalignments = []
for module, ownership in module_ownership.items():
primary_pct = ownership['primary_pct']
team_count = len(ownership['all_teams'])
# Pattern 1: Multi-team module
if team_count >= 3 and primary_pct < 60:
misalignments.append({
'type': 'MULTI_TEAM_MODULE',
'module': module,
'severity': 'HIGH',
'teams': ownership['all_teams'],
'recommendation': 'Assign primary owner, create interface layer'
})
# Pattern 2: Orphaned module
if primary_pct < 50:
misalignments.append({
'type': 'ORPHANED_MODULE',
'module': module,
'severity': 'CRITICAL',
'recommendation': 'Assign ownership or deprecate'
})
# Pattern 3: High cross-team coupling
if module in cross_team_coupling and cross_team_coupling[module] > 30:
misalignments.append({
'type': 'CROSS_BOUNDARY_COUPLING',
'module': module,
'severity': 'HIGH',
'recommendation': 'Create API contract, reduce coupling'
})
return misalignments
Organizational Alignment Analysis (forensic-organizational-alignment pattern)
Teams: 4 (Frontend, Backend, Platform, QA)
Modules: 12
Alignment Score: 68/100 (MODERATE)
Critical Misalignments: 2
Multi-Team Modules: 5
Conway's Law shows architecture mirrors communication structure (Herbsleb).
Team | Primary Modules | Secondary Modules | Focus Score
------------------|--------------------------|--------------------------|-------------
Frontend Team | frontend/, ui/ | api/ (15%) | GOOD (2)
Backend Team | backend/*, api/ | infrastructure/ (20%) | MODERATE (4)
Platform Team | infrastructure/, db/ | backend/ (25%) | GOOD (2)
QA Team | tests/ | (contributes to all) | FOCUSED (1)
Module | Primary Team | Primary % | Other Teams | Status
---------------------|---------------|-----------|----------------------|----------
frontend/ | Frontend | 95% | - | ✅ GOOD
backend/auth/ | Backend | 75% | Platform (20%) | ⚠️ MODERATE
backend/api/ | Backend | 55% | Frontend (30%), QA | ❌ POOR
infrastructure/ | Platform | 70% | Backend (25%) | ⚠️ MODERATE
legacy/old-api/ | (multiple) | 35% | All teams | 🚨 ORPHANED
CRITICAL MISALIGNMENT #1: Orphaned Module
Module: legacy/old-api/
Status: No clear ownership (highest contributor: 35%)
Teams: Backend (35%), Frontend (30%), Platform (20%), QA (15%)
Impact: Nobody maintains, unclear responsibility, technical debt accumulates
Conway's Law: Module structure doesn't reflect any team's communication pattern
RECOMMENDATION:
1. IMMEDIATE: Assign Backend team as owner (highest contribution)
2. SHORT-TERM: Document current state, freeze new features
3. MEDIUM-TERM: Plan migration or deprecation
HIGH MISALIGNMENT #2: Multi-Team Module
Module: backend/api/
Primary Team: Backend (55%)
Secondary Teams: Frontend (30%), QA (15%)
Impact: 40-60% slower velocity (Microsoft Research)
Issue: All teams editing API layer = coordination bottleneck
RECOMMENDATION:
1. Establish Backend team as sole owner
2. Create clear API contract (OpenAPI spec)
3. Cross-team changes go through PR review process
4. Consider API versioning strategy
VIOLATION: Monolithic Module, Distributed Teams
Module: core/
Contributing Teams: All 4 teams (no primary >40%)
Pattern: Everyone needs core utilities, no clear boundaries
Conway's Law Violation: Architecture (monolithic) conflicts with organization (4 teams)
RECOMMENDATION (choose one):
A) REFACTOR: Split core/ into team-aligned modules
- core-frontend/, core-backend/, etc.
- Teams maintain their own utilities
B) ORGANIZE: Create dedicated "Platform" ownership
- Assign Platform team as core/ owner
- Other teams submit PRs for changes
C) EXTRACT: Create shared library with versioning
- Extract to separate repo
- Semantic versioning, formal releases
Problem: Auto-detecting teams from email/commits without user confirmation.
# ❌ BAD: Use inferred teams directly
teams = infer_teams_from_email_domains()
proceed_with_analysis(teams)
# ✅ GOOD: Validate with user
inferred_teams = infer_teams_from_email_domains()
print("Inferred teams:", inferred_teams)
confirmed_teams = ask_user_to_validate(inferred_teams)
proceed_with_analysis(confirmed_teams)
Fix: Always validate inferred teams - automated inference may group incorrectly.
Problem: Flagging every module with >1 team without considering context.
# ❌ BAD: All multi-team = misalignment
if team_count > 1:
flag_as_misaligned()
# ✅ GOOD: Consider primary ownership and purpose
if team_count > 2 AND primary_pct < 60:
flag_as_misaligned()
# Shared modules (60-80% primary) may be acceptable
Fix: Moderate sharing is acceptable - focus on modules with <60% primary ownership or >3 teams.
Problem: Applying same standards to all modules regardless of their role.
Fix: Different standards for different module types:
Problem: Only suggesting architectural changes, not considering organizational changes.
Fix: Conway's Law works both ways:
Immediately suggest these next steps to the user:
Check coordination overhead (use forensic-coordination-analysis)
Find cross-team couplings (use forensic-change-coupling)
Calculate reorganization ROI (use forensic-refactoring-roi)
Track alignment trends (re-run quarterly)
"Using forensic-organizational-alignment pattern, I analyzed team-module fit.
ALIGNMENT SCORE: 68/100 (MODERATE)
Teams: 4 (Frontend, Backend, Platform, QA)
Modules: 12 analyzed
CRITICAL MISALIGNMENT:
legacy/old-api/:
- Orphaned (no team >40% ownership)
- 4 teams editing (Backend 35%, Frontend 30%, Platform 20%, QA 15%)
- Conway's Law violation: No communication structure owns this
backend/api/:
- Multi-team (Backend 55%, Frontend 30%, QA 15%)
- Impact: 40-60% slower velocity (Microsoft Research)
RECOMMENDATIONS:
Option A (Architectural):
1. Assign clear owners (Backend for both modules)
2. Refactor to reduce cross-team coupling
3. Create API contracts for cross-team changes
Option B (Organizational):
1. Create dedicated API team
2. Deprecate legacy/old-api/
3. Realign teams around module boundaries
NEXT STEPS:
1. Check coordination (forensic-coordination-analysis) - Validate >9 contributors?
2. Find couplings (forensic-change-coupling) - Which files cross teams?
3. Calculate ROI (forensic-refactoring-roi) - Cost of misalignment?
4. Track quarterly - Monitor alignment trends
Would you like me to proceed with coordination analysis?"
Always provide this integration guidance - alignment issues connect to coordination overhead and architectural coupling.
Use organizational changes to drive architecture:
CURRENT STATE:
Teams: Monolithic (one team, all code)
Architecture: Monolithic (one codebase)
DESIRED STATE:
Architecture: Microservices (separate deployable units)
INVERSE CONWAY:
1. Split team into service-aligned teams FIRST
2. Assign each team a future service boundary
3. Teams will naturally refactor toward separation
4. Architecture follows organizational change
Result: Team structure drives architectural evolution
Track evolution:
Quarterly Alignment Scores:
Q1 2024: 45/100 (POOR) - 3 teams, monolithic codebase
Q2 2024: 58/100 (MODERATE) - Started module boundaries
Q3 2024: 72/100 (GOOD) - Clear ownership established
Q4 2024: 68/100 (MODERATE) - New team added, realignment needed
Insight: Team changes require architectural adaptation
Action: Review module boundaries after team structure changes
Map actual vs desired communication:
Actual Communication (from co-commits):
Frontend ↔ Backend: 45 interactions (HIGH)
Backend ↔ Platform: 32 interactions (HIGH)
Frontend ↔ Platform: 8 interactions (LOW)
Module Coupling:
frontend/ ↔ backend/: Strong coupling
backend/ ↔ infrastructure/: Strong coupling
frontend/ ↔ infrastructure/: Weak coupling
VALIDATION: ✅ Conway's Law confirmed
Communication patterns match coupling patterns
Key studies:
Herbsleb & Mockus (2003): Conway's Law empirical validation
Microsoft DevOps Research (2016): Multi-team module impact
Inverse Conway Maneuver (ThoughtWorks, 2015): Organizational architecture
MacCormack et al (2012): Architectural coupling and team structure
Why alignment matters: Conway's Law is empirically validated - fighting it causes coordination overhead, slow velocity, and organizational friction.
Combine alignment analysis with:
Why: Organizational alignment affects all other forensic metrics - fixing alignment improves everything else.
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.
Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.
Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.
Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.
Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.
Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.
Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.
Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".
Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.
Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
Opus.ai: Revolutionize Your Web Experience
Build a no-code AI app in minutes.
An IDE for code migration from legacy to modern frameworks through coding agents.
Automate CGI animation in live-action scenes
Branded artistic QR-code concepts
Launch a website in seconds with AI.
Streamline Your Coding Experience with AI Code Helper
Convert any screenshot or design to clean code.