agentleFS
MicrosoftKnown publishermicrosoft/vsts-extension-retrospectives/AGENTS.md

vsts-extension-retrospectives

AGENTS.md211 starsChanged 3 months agoMITView on GitHub

Instructions for AI coding agents working on the Retrospectives Extension for Azure DevOps. Full-stack Azure DevOps extension: Imports - organize in order: Formatting (Prettier config): TypeScript (tsconfig): Naming Conventions: Component Pattern: Follow C# Coding Conventions: Frontend: try/catch with telemetry:

  • 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.

The file

We split this AGENTS.md into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Start text searches with grep.

    line 31
  2. Distinctive:

    Follow C# Coding Conventions:

    line 106
  3. Very specific:

    Use @testing-library/react and @testing-library/user-event

    line 130
  4. Distinctive:

    Use Moq for mocking, Arrange-Act-Assert pattern

    line 135
  5. Very specific:

    Always run npm test before committing frontend changes.

    line 170

≈ “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.

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

AGENTS.md - AI Coding Agent Instructions

Instructions for AI coding agents working on the Retrospectives Extension for Azure DevOps.

Project Overview

Full-stack Azure DevOps extension:

  • Frontend: React 19 + TypeScript in src/frontend/
  • Backend: .NET 9 (ASP.NET Core + SignalR) in src/backend/

Directory Structure

src/
├── frontend/              # React/TypeScript frontend
│   ├── components/        # React components
│   │   ├── __tests__/     # Jest tests (*.test.tsx)
│   │   └── __mocks__/     # Test mocks
│   ├── dal/               # Data access layer
│   ├── interfaces/        # TypeScript interfaces
│   └── utilities/         # Utility functions
├── backend/               # C#/.NET SignalR backend
└── backend.tests/         # xUnit tests for backend

Build/Lint/Test Commands

Tooling Preferences

  • Start text searches with grep; use rg only if it is available and working.
  • Frontend Jest runs must use the jsdom environment, for example npx jest --env=jsdom ....

Frontend (run from src/frontend/)

npm ci                     # Install dependencies
npm run build              # Build for production
npm run format             # Format with Prettier
npm test                   # Run all tests with coverage

# Run a single test file
npx jest --env=jsdom components/__tests__/feedbackItem.test.tsx

# Full check (lint + format + pre-commit + test)
npm run check

Backend (run from src/backend/)

dotnet restore --locked-mode && dotnet build

# Run tests (from src/backend.tests/)
dotnet test
dotnet test --filter "FullyQualifiedName~TestMethodName"  # Single test

Pre-commit Hooks

pre-commit install              # Install hooks
pre-commit run --all-files      # Run on all files

Code Style Guidelines

TypeScript/React

Imports - organize in order:

  1. React and hooks
  2. Third-party libraries (@fluentui, azure-devops-extension-*)
  3. Local interfaces/types
  4. Local components
  5. Local utilities/services

Formatting (Prettier config):

  • Tab width: 2 spaces, no tabs
  • Arrow parens: avoid (x => x)
  • Bracket spacing: true

TypeScript (tsconfig):

  • Target: ES2020, Module: ESNext, JSX: react-jsx
  • noImplicitReturns, noImplicitThis, noImplicitAny: true
  • strictNullChecks: false

Naming Conventions:

  • Interfaces: PascalCase with I prefix (IFeedbackItemDocument)
  • Components: PascalCase (FeedbackItem)
  • Component files: camelCase (feedbackItem.tsx)
  • Props/State interfaces: I{ComponentName}Props, I{ComponentName}State
  • Utilities: camelCase functions (getUserIdentity)

Component Pattern:

  • Functional components with hooks (useState, useEffect, useCallback)
  • forwardRef + useImperativeHandle for ref-exposing components
  • Define prop/state interfaces before component

C# (Backend)

Follow C# Coding Conventions:

  • PascalCase for public members/methods/classes
  • _camelCase for private fields (_logger, _insights)
  • XML documentation comments for public methods
  • Async methods return Task
/// <summary>
/// Broadcast receiveNewItem to all other clients.
/// </summary>
public Task BroadcastNewItem(string reflectBoardId, string columnId, string feedbackItemId)
{
    _logger.LogInformation($"BroadcastNewItem connectionID: {Context.ConnectionId}");
    return Clients.OthersInGroup(reflectBoardId).SendAsync(receiveNewItem.ToString(), columnId, feedbackItemId);
}

Testing

Frontend (Jest + React Testing Library)

  • Test files: components/__tests__/*.test.tsx
  • Mock Azure DevOps SDK, telemetry, and external services
  • Use @testing-library/react and @testing-library/user-event

Backend (xUnit + Moq)

  • Test files: src/backend.tests/
  • Use Moq for mocking, Arrange-Act-Assert pattern

Error Handling

Frontend: try/catch with telemetry:

try {
  await itemDataService.updateFeedbackItem(item);
} catch (error) {
  appInsights.trackException({ exception: error as Error });
}

Backend: logging + Application Insights:

_logger.LogInformation($"Operation: {Context.ConnectionId}");
_insights.TrackEvent("Event name");

Key Patterns

  • SignalR: Backend hub ReflectHub.cs, frontend dal/reflectBackendService
  • Signal names: Defined in ReflectBackendSignals enum
  • Data storage: Azure DevOps data service (via extension SDK)

CI/CD

PRs trigger:

  1. Frontend: lint, build, test (with coverage)
  2. Backend: restore, build, test
  3. Pre-commit: gitleaks (secrets), shellcheck, formatting

Always run npm test before committing frontend changes.

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.