agentleFS
AndreaGriffiths11AndreaGriffiths11/teamxray/AGENTS.md

teamxray

AGENTS.md19 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 code style.

    Of the AGENTS.md files we read, the 33,398 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.

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
  1. Very specific:

    If adding any other ESM-only package, apply the same pattern and whitelist it in .vscodeignore.

    line 96
  2. Distinctive:

    Don't bypass Copilot SDK for AI calls β€” it's the primary interface

    line 146
  3. Distinctive:

    Don't add custom tools that mutate state β€” tools must be read-only

    line 147
  4. Distinctive:

    Don't skip bot detection β€” filtered bots skew analysis

    line 148
  5. Distinctive:

    Don't hardcode git limits β€” large repos need configurable thresholds

    line 149
  6. Distinctive:

    Don't use inline styles in webview β€” CSP blocks them (see Runtime Guardrails above)

    line 150
  7. Very specific:

    Don't bundle ESM-only packages with webpack β€” use webpackIgnore dynamic import (see Runtime Guardrails above)

    line 151

β‰ˆ β€œCommon” is an estimate: at least 1 in 5 of the 43,423 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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

ModeProviderSetupFallback
1Copilot SDK (default)Copilot CLI installed + authenticatedN/A
2BYOK OpenAISet API key via commandteamxray.byokBaseUrl, teamxray.byokModel
3BYOK AnthropicSet API key via commandteamxray.byokBaseUrl, teamxray.byokModel
4BYOK AzureSet API key + endpointteamxray.byokBaseUrl, teamxray.byokModel
5GitHub Models (deprecated)GitHub token (PAT)Still in code. Don't present it as an option for new users; point them to BYOK
6Local git-onlyNo AIReduced 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

CommandAction
Team X-Ray: Analyze Repository ExpertiseFull team analysis
Team X-Ray: Show Team Expertise OverviewDisplay cached analysis
Team X-Ray: Analyze This FileFile-specific ownership
Team X-Ray: Find Expert for This FileRight-click context menu
Team X-Ray: Set GitHub TokenDeprecated. 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 webpackIgnore comment
  • ❌ Do not add the package to webpack externals
  • ❌ Do not use static import β€” webpack will convert it to require() 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

SettingDefaultDescription
teamxray.cliPath(auto)Copilot CLI path (if not on PATH)
teamxray.aiProvidercopilotAI provider mode
teamxray.copilotModel(auto)Optional Copilot model override
teamxray.githubModelsModelopenai/gpt-4.1Deprecated. GitHub Models catalog ID for direct or fallback analysis
teamxray.byokBaseUrl(empty)BYOK endpoint URL
teamxray.byokModel(empty)BYOK model name
teamxray.maxCommits1000Max commits to analyze
teamxray.excludeBotstrueFilter out bot contributors

File Structure

  • src/core/expertise-analyzer.ts β€” Git history parser
  • src/core/copilot-service.ts β€” Copilot SDK integration
  • src/ui/webview-provider.ts β€” Analysis webview
  • src/commands/ β€” VS Code commands
  • resources/ β€” HTML templates, CSS, images
  • docs/ β€” 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 webpackIgnore dynamic 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.