teamxray
AGENTS.md18 starsChanged 17 months agoMITView on GitHub
VS Code extension that transforms git history into team expertise maps. Discover who knows what, reveal collaboration patterns, get AI-powered management insights. "Stop being a stranger on your own team." π¬ Agent can request: - Team member commit counts - File ownership breakdown - Collaboration patterns (co-author networks) - Bus factor analysis (single points of failure) - Recent activity trends Auto-fallback: Copilot SDK (default or BYOK) β GitHub Models (deprecated, only if a token is set) β Local git-only GitHubβ¦
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- evals/AGENTS.mdAGENTS.md
- src/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
β0
Common Β· estimate
Many files like this have a rule of this kind.
β5
Distinctive Β· estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 96
If adding any other ESM-only package, apply the same pattern and whitelist it in .vscodeignore.
- Distinctive: line 146
Don't bypass Copilot SDK for AI calls β it's the primary interface
- Distinctive: line 147
Don't add custom tools that mutate state β tools must be read-only
- Distinctive: line 148
Don't skip bot detection β filtered bots skew analysis
- Distinctive: line 149
Don't hardcode git limits β large repos need configurable thresholds
- Distinctive: line 150
Don't use inline styles in webview β CSP blocks them (see Runtime Guardrails above)
- Very specific: line 151
Don't bundle ESM-only packages with webpack β use webpackIgnore dynamic import (see Runtime Guardrails above)
β βCommonβ is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. βVery specificβ is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Purpose
VS Code extension that transforms git history into team expertise maps. Discover who knows what, reveal collaboration patterns, get AI-powered management insights.
Tagline
"Stop being a stranger on your own team." π¬
Tech Stack
- TypeScript β Extension core
- VS Code Extension API β 1.100.0+
- GitHub Copilot SDK (
@github/copilot-sdk) β Agentic analysis with custom tools - Node.js 20+ β Worker threads for git processing
- Webpack β Bundling
- simple-git β Git history parsing
Architecture
VS Code Extension
β
ExpertiseAnalyzer (gathers git history)
β
CopilotService (Copilot SDK session with custom tools)
β (agent calls tools to request team data)
AI Analysis (team profiles, management insights)
β
Webview (dark-themed reports, HTML export)Custom Copilot SDK Tools
Agent can request:
- Team member commit counts
- File ownership breakdown
- Collaboration patterns (co-author networks)
- Bus factor analysis (single points of failure)
- Recent activity trends
AI Provider Modes
| Mode | Provider | Setup | Fallback |
| 1 | Copilot SDK (default) | Copilot CLI installed + authenticated | N/A |
| 2 | BYOK OpenAI | Set API key via command | teamxray.byokBaseUrl, teamxray.byokModel |
| 3 | BYOK Anthropic | Set API key via command | teamxray.byokBaseUrl, teamxray.byokModel |
| 4 | BYOK Azure | Set API key + endpoint | teamxray.byokBaseUrl, teamxray.byokModel |
| 5 | GitHub Models (deprecated) | GitHub token (PAT) | Still in code. Don't present it as an option for new users; point them to BYOK |
| 6 | Local git-only | No AI | Reduced analysis (no insights, just ownership) |
Auto-fallback: Copilot SDK (default or BYOK) β GitHub Models (deprecated, only if a token is set) β Local git-only
GitHub Models is deprecated. Docs describe it as deprecated; the code path stays until it is removed.
Features
- π File Expert Discovery β Right-click any file β find who knows it best
- π§ Team Expertise Analysis β AI profiles: communication styles, specializations, collab patterns
- π Management Insights β Bus factor risks, growth opportunities, efficiency gaps
- π€ Bot/Agent Detection β Auto-identifies Dependabot, Copilot, Renovate (visual distinction)
- π Dark-themed Reports β Exportable HTML with SVG charts, X-Ray branding
- π Git-backed Fallback β Works without AI (reduced view from local git)
Commands
| Command | Action |
Team X-Ray: Analyze Repository Expertise | Full team analysis |
Team X-Ray: Show Team Expertise Overview | Display cached analysis |
Team X-Ray: Analyze This File | File-specific ownership |
Team X-Ray: Find Expert for This File | Right-click context menu |
Team X-Ray: Set GitHub Token | Deprecated. GitHub Models fallback only |
Team X-Ray: Set BYOK API Key (Secure) | For BYOK providers |
β οΈ Runtime Guardrails β Read Before Touching These Areas
These constraints are invisible from the code. Violations compile cleanly and break silently at runtime in VS Code.
Webview: No inline styles (CSP)
The webview runs under a strict Content Security Policy. Inline style="..." attributes are blocked at runtime even though they compile fine.
- β Add CSS classes and rules to the stylesheet
- β Do not use
style="..."on any HTML element in the webview
Copilot SDK: ESM bundling (webpackIgnore)
@github/copilot-sdk is ESM-only and cannot be bundled by webpack as CJS. Always use:
const sdk = await import(/* webpackIgnore: true */ '@github/copilot-sdk');- β
Dynamic import with
webpackIgnorecomment - β Do not add the package to webpack externals
- β Do not use static
importβ webpack will convert it torequire()and it will fail at runtime
If adding any other ESM-only package, apply the same pattern and whitelist it in .vscodeignore.
Key Constraints
- No manual token pasting by default β Copilot SDK auto-authenticates
- Custom tools must be stateless β Agent calls them multiple times per analysis
- Worker threads for git parsing β Keeps extension responsive on large repos
- Bot detection is deterministic β Regex-based (not LLM inference)
- Webview uses Content Security Policy β Strict CSP for security
Bot/Agent Detection
Auto-detected bots:
- Dependabot
- Renovate
- GitHub Actions Bot
- Copilot
- CodeQL
- Mergify
- Snyk
- WhiteSource
- ImgBot
- Stale Bot
Detection method: Email/name regex patterns (deterministic, no AI)
Configuration
| Setting | Default | Description |
teamxray.cliPath | (auto) | Copilot CLI path (if not on PATH) |
teamxray.aiProvider | copilot | AI provider mode |
teamxray.copilotModel | (auto) | Optional Copilot model override |
teamxray.githubModelsModel | openai/gpt-4.1 | Deprecated. GitHub Models catalog ID for direct or fallback analysis |
teamxray.byokBaseUrl | (empty) | BYOK endpoint URL |
teamxray.byokModel | (empty) | BYOK model name |
teamxray.maxCommits | 1000 | Max commits to analyze |
teamxray.excludeBots | true | Filter out bot contributors |
File Structure
src/core/expertise-analyzer.tsβ Git history parsersrc/core/copilot-service.tsβ Copilot SDK integrationsrc/ui/webview-provider.tsβ Analysis webviewsrc/commands/β VS Code commandsresources/β HTML templates, CSS, imagesdocs/β Setup, architecture, troubleshooting
What NOT to Do
- Don't bypass Copilot SDK for AI calls β it's the primary interface
- Don't add custom tools that mutate state β tools must be read-only
- Don't skip bot detection β filtered bots skew analysis
- Don't hardcode git limits β large repos need configurable thresholds
- Don't use inline styles in webview β CSP blocks them (see Runtime Guardrails above)
- Don't bundle ESM-only packages with webpack β use
webpackIgnoredynamic import (see Runtime Guardrails above)
Docs
- Setup β Installation + config
- Architecture β Components, tools, worker threads
- AI Providers β Provider modes + fallback chain
- Reports β Webview + HTML export
- Troubleshooting β Common issues
Release
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

