agentleFS
MicrosoftKnown publishermicrosoft/mssql-jdbc/AGENTS.md

mssql-jdbc

AGENTS.md1.1k starsChanged 4 months agoMITView on GitHub

This document provides guidance for AI coding agents working with the mssql-jdbc repository. Before making changes, agents should be aware of: The .github/instructions/ directory contains comprehensive guides: This repository provides reusable prompts in .github/prompts/ for common maintainer workflows. Use these to guide agents through multi-step operations.

Trending

Quiet since September.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 2 mentionsMay 2026: 3 mentionsJun 2026: 3 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/mssql-jdbc repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/mssql-jdbc

The biggest 5 of 21 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 21

Talked about on GitHub and Hacker News (21 times).

On GitHub · 20

15 more on GitHub

On Hacker News · 1

  • 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 repositoryOne other file it gives its agents.

The file

Show its rules and text

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

23 rules. About 0 are common, 19 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈19

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before making changes, agents should be aware of:

    line 9
  2. Distinctive:

    Backward Compatibility: No breaking changes without proper deprecation and documentation

    line 55
  3. Distinctive:

    Test-First Development: All changes require tests — write failing tests before implementing fixes

    line 56
  4. Distinctive:

    Protocol Compliance: Follow MS-TDS specifications

    line 58
  5. Distinctive:

    Performance Awareness: Avoid allocations on hot paths, reuse buffers, guard log messages

    line 59
  6. Distinctive:

    JDBC Specification Compliance: Follow JDBC 4.2/4.3 specification for standard interfaces

    line 60
  7. Distinctive:

    Write a failing test that reproduces the issue

    line 68
  8. Distinctive:

    Ensure all tests pass across JRE profiles

    line 70
  9. Distinctive:

    Update Javadoc if behavior changes

    line 71
  10. Distinctive:

    Document new public APIs with Javadoc

    line 78
  11. Very specific:

    Add the property constant to SQLServerDriverStringProperty, SQLServerDriverBooleanProperty, or SQLServerDriverIntProperty

    line 83
  12. Very specific:

    Add getter/setter to SQLServerDataSource.java

    line 84
  13. Very specific:

    Add parsing in SQLServerConnection.java

    line 85
  14. Distinctive:

    Default to a backward-compatible value

    line 86
  15. Distinctive:

    Add tests for the new property

    line 87
  16. Distinctive:

    Add new token/flag constants to the relevant TDS classes

    line 93
  17. Distinctive:

    Test against multiple SQL Server versions (2012+, Azure SQL)

    line 95
  18. Very specific:

    Update SqlAuthentication enum if adding a new authentication method

    line 100
  19. Distinctive:

    Ensure federated auth flow works if applicable

    line 102
  20. Distinctive:

    Test with the relevant authentication infrastructure

    line 103
  21. Distinctive:

    Verify no regressions with existing tests

    line 110
  22. Distinctive:

    Run internal performance benchmarks for major changes

    line 111
  23. Distinctive:

    Check existing tests for usage patterns

    line 132

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

AI Agent Guidelines for Microsoft JDBC Driver for SQL Server

This document provides guidance for AI coding agents working with the mssql-jdbc repository.

Quick Start

Essential Context Files

Before making changes, agents should be aware of:

FilePurpose
README.mdProject overview
CONTRIBUTING.mdContribution guidelines
Coding_Guidelines.mdJava coding standards
coding-best-practices.mdEngineering best practices
review-process.mdPR review requirements
.github/copilot-instructions.mdCopilot-specific instructions

Detailed Technical Instructions

The .github/instructions/ directory contains comprehensive guides:

GuideCoverage
architecture.instructions.mdProject structure, package layout, layer architecture
patterns.instructions.mdException handling, logging, resource management, testing patterns
glossary.instructions.mdTerms, acronyms, authentication modes, data types
performance-metrics.mdPerformance instrumentation, connection and statement metrics
state-machine-testing.mdModel-based testing framework, seed-based reproducibility

Workflow Prompts

This repository provides reusable prompts in .github/prompts/ for common maintainer workflows. Use these to guide agents through multi-step operations.

PromptPurpose
getting-started.prompt.mdInteractive guide to all available mssql-jdbc Copilot prompts
build.prompt.mdBuild the driver with Maven across JRE profiles
run-tests.prompt.mdRun tests with Maven across JRE profiles
setup-dev.prompt.mdSet up the development environment
fix-bug.prompt.mdDiagnose and fix a bug with tests and documentation
implement-feature.prompt.mdPlan and implement a new feature end-to-end
code-review.prompt.mdAI-assisted code review for a pull request
perf-optimization.prompt.mdInvestigate and implement performance improvements
create-pr.prompt.mdCreate well-structured pull requests
generate-doc-comments.prompt.mdGenerate Javadoc comments following project conventions
generate-prompt.prompt.mdGenerate new Copilot prompt files for the project
generate-skill.prompt.mdGenerate Copilot Agent Skills (SKILL.md)

Core Principles

  1. Cross-Platform Compatibility: Code must work on Windows, Linux, and macOS
  2. Multi-Profile Compilation: Code must compile across all JRE profiles (jre8 through jre26)
  3. Backward Compatibility: No breaking changes without proper deprecation and documentation
  4. Test-First Development: All changes require tests — write failing tests before implementing fixes
  5. Security by Default: Secure defaults, no credential logging, parameterized queries
  6. Protocol Compliance: Follow MS-TDS specifications
  7. Performance Awareness: Avoid allocations on hot paths, reuse buffers, guard log messages
  8. JDBC Specification Compliance: Follow JDBC 4.2/4.3 specification for standard interfaces

Common Tasks

Bug Fix Workflow

  1. Understand the issue from the bug report
  2. Locate relevant code in src/main/java/com/microsoft/sqlserver/jdbc/
  3. Write a failing test that reproduces the issue
  4. Implement the fix using patterns from .github/instructions/patterns.instructions.md
  5. Ensure all tests pass across JRE profiles
  6. Update Javadoc if behavior changes

Feature Implementation

  1. Review the feature specification or issue
  2. Plan the implementation (see implement-feature prompt)
  3. Implement with tests (unit + integration)
  4. Document new public APIs with Javadoc
  5. Update CHANGELOG.md

Adding Connection String Properties

  1. Add the property constant to SQLServerDriverStringProperty, SQLServerDriverBooleanProperty, or SQLServerDriverIntProperty
  2. Add getter/setter to SQLServerDataSource.java
  3. Add parsing in SQLServerConnection.java
  4. Default to a backward-compatible value
  5. Add tests for the new property
  6. Document in Javadoc

TDS Protocol Changes

  1. Reference the MS-TDS specification for the protocol extension
  2. Add new token/flag constants to the relevant TDS classes
  3. Implement parsing/writing in IOBuffer.java, tdsparser.java, and Stream*.java files
  4. Test against multiple SQL Server versions (2012+, Azure SQL)
  5. Consider backward compatibility

Authentication Changes

  1. Update SqlAuthentication enum if adding a new authentication method
  2. Implement token acquisition in the appropriate auth class (SQLServerMSAL4JUtils.java, KerbAuthentication.java, etc.)
  3. Ensure federated auth flow works if applicable
  4. Test with the relevant authentication infrastructure

Performance Optimization

  1. Profile the issue using benchmarks or tracing
  2. Identify allocation hotspots (see perf-optimization prompt)
  3. Apply patterns: buffer reuse, lazy initialization, object caching, lock narrowing
  4. Verify no regressions with existing tests
  5. Run internal performance benchmarks for major changes

External Resources

Key Documentation Links

Repository Policies

See the root directory for:

  • Coding_Guidelines.md — Java coding standards and formatting rules
  • coding-best-practices.md — Engineering best practices
  • review-process.md — PR review requirements and responsibilities

Getting Help

  • Check existing tests for usage patterns
  • Reference similar implementations in the codebase
  • Consult the Microsoft Docs for API behavior specifications
  • For protocol questions, refer to MS-TDS open specifications
  • For JDBC specification questions, refer to the Oracle JDBC documentation

This document is automatically loaded as context for AI agents working in this repository.

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.