agentleFS
MicrosoftKnown publishermicrosoft/mssql-jdbc/.github/copilot-instructions.md

mssql-jdbc

Copilot instructions1.1k starsChanged 4 months agoMITView on GitHub

This project is the Microsoft JDBC Driver for SQL Server, enabling Java applications to interact with SQL Server and Azure SQL databases. It implements the JDBC 4.2/4.3 specification, communicating over the TDS (Tabular Data Stream) protocol. It supports features like connection pooling, Always Encrypted, Azure AD authentication, bulk copy, configurable retry logic, and idle connection resiliency. The project builds from a single Maven project (pom.xml) with multiple JRE profiles (jre8, jre11, jre17, jre21, jre25, jre26). Each profile compiles against a…

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

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

19 rules. About 0 are common, 8 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Driver source: All source code in src/main/java/com/microsoft/sqlserver/jdbc/.

    line 11
  2. Distinctive:

    If the issue is a bug, reproduce it and identify the root cause in source code.

    line 21
  3. Distinctive:

    If the issue is a feature request, review the proposal and assess its feasibility.

    line 22
  4. Distinctive:

    If the issue is a task, follow the instructions provided in the issue description.

    line 23
  5. Distinctive:

    If public APIs are changed, update Javadoc comments on all affected public members.

    line 25
  6. Very specific:

    Add or update tests in src/test/java/ to validate the fix.

    line 26
  7. Very specific:

    Use the existing test framework: extend AbstractTest for tests needing SQL Server, use JUnit 5 annotations (@Test, @Tag, @BeforeAll, …

    line 33
  8. Distinctive:

    Follow the naming conventions and structure of existing tests.

    line 34
  9. Distinctive:

    Ensure tests are comprehensive and cover edge cases.

    line 35
  10. Very specific:

    Do NOT hardcode connection strings — use AbstractTest utilities and test config.

    line 36
  11. Very specific:

    Consider state machine tests for complex stateful features (see docs/state-machine-testing.md).

    line 38
  12. Very specific:

    Use the getting-started prompt (#getting-started) for an interactive guide to all available Copilot prompts.

    line 42
  13. Very specific:

    All source code is in src/main/java/com/microsoft/sqlserver/jdbc/.

    line 49
  14. Very specific:

    Follow exception handling patterns: SQLServerException.makeFromDriverError(...) with error keys from SQLServerResource.java (see …

    line 53
  15. Distinctive:

    Do not change repository ownership or review-routing conventions without team discussion.

    line 58
  16. Distinctive:

    Do not close issues without a fix or without providing a clear reason.

    line 59
  17. Very specific:

    All changed code must be formatted with Eclipse formatter mssql-jdbc_formatter.xml.

    line 60
  18. Very specific:

    Follow Coding_Guidelines.md for code style and coding-best-practices.md for engineering practices.

    line 64
  19. Very specific:

    Follow review-process.md for PR review guidelines.

    line 65

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions 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
copilot-instructions.md

Copilot Instructions — mssql-jdbc

📚 Project Overview

This project is the Microsoft JDBC Driver for SQL Server, enabling Java applications to interact with SQL Server and Azure SQL databases. It implements the JDBC 4.2/4.3 specification, communicating over the TDS (Tabular Data Stream) protocol. It supports features like connection pooling, Always Encrypted, Azure AD authentication, bulk copy, configurable retry logic, and idle connection resiliency.

The project builds from a single Maven project (pom.xml) with multiple JRE profiles (jre8, jre11, jre17, jre21, jre25, jre26). Each profile compiles against a different Java source level and produces a profile-specific JAR.

The project includes:

  • Driver source: All source code in src/main/java/com/microsoft/sqlserver/jdbc/.
  • Error resources: Localized error messages in SQLServerResource.java.
  • Tests: Located in src/test/java/com/microsoft/sqlserver/jdbc/.
    • Unit Tests: Many tests in src/test/java/com/microsoft/sqlserver/jdbc/unit/ are isolated, but this tree is not guaranteed to be SQL-Server-free; tests that extend AbstractTest or call setConnection() / getConnection() require test database configuration.
    • Integration Tests: In feature-specific packages (connection/, datatypes/, bulkCopy/, AlwaysEncrypted/, etc.) — generally require a SQL Server instance.
    • BVT Tests: In src/test/java/com/microsoft/sqlserver/jdbc/bvt/ — build verification / smoke tests.
    • State Machine Tests: In src/test/java/com/microsoft/sqlserver/jdbc/statemachinetest/ — model-based testing for complex state interactions.

🔧 Working with Issues

  • If the issue is a bug, reproduce it and identify the root cause in source code.
  • If the issue is a feature request, review the proposal and assess its feasibility.
  • If the issue is a task, follow the instructions provided in the issue description.
  • Cross-reference issue descriptions with code in src/main/java/com/microsoft/sqlserver/jdbc/.
  • If public APIs are changed, update Javadoc comments on all affected public members.
  • Add or update tests in src/test/java/ to validate the fix.

🧪 Writing Tests

  • For every bug fix, ensure there are unit tests and integration tests that cover the scenario.
  • For new features, write tests that validate the functionality.
  • Write a failing test before implementing the fix (test-driven approach).
  • Use the existing test framework: extend AbstractTest for tests needing SQL Server, use JUnit 5 annotations (@Test, @Tag, @BeforeAll, @AfterAll).
  • Follow the naming conventions and structure of existing tests.
  • Ensure tests are comprehensive and cover edge cases.
  • Do NOT hardcode connection strings — use AbstractTest utilities and test config.
  • Tag tests requiring external resources with appropriate group annotations (xSQLv12, xSQLv15, reqExternalSetup, fedAuth, kerberos, etc.).
  • Consider state machine tests for complex stateful features (see docs/state-machine-testing.md).

⚙️ Automating Workflows

  • Use the getting-started prompt (#getting-started) for an interactive guide to all available Copilot prompts.
  • Auto-label PRs based on folder paths (e.g., changes in src/main/java/ → area-driver, changes in src/test/java/ → area-testing).
  • Suggest CHANGELOG entries for fixes in CHANGELOG.md.
  • Tag reviewers based on area of change.

🧠 Contextual Awareness

  • All source code is in src/main/java/com/microsoft/sqlserver/jdbc/. Follow the package structure described in .github/instructions/architecture.instructions.md.
  • The driver must work cross-platform: Windows, Linux, and macOS. Do not make platform-specific assumptions.
  • Code must compile across all JRE profiles (jre8 through jre26). Avoid using APIs unavailable in older JDK versions without profile guards.
  • Respect API compatibility rules — do not introduce breaking changes without proper justification and documentation.
  • Follow exception handling patterns: SQLServerException.makeFromDriverError(...) with error keys from SQLServerResource.java (see .github/instructions/patterns.instructions.md).
  • Guard log statements: if (logger.isLoggable(Level.FINER)) — never log sensitive data (passwords, tokens, connection strings with credentials).

Constraints

  • Do not change repository ownership or review-routing conventions without team discussion.
  • Do not close issues without a fix or without providing a clear reason.
  • All changed code must be formatted with Eclipse formatter mssql-jdbc_formatter.xml.

📝 Notes

  • Follow Coding_Guidelines.md for code style and coding-best-practices.md for engineering practices.
  • Follow review-process.md for PR review guidelines.
  • Regularly review and update documentation to ensure it reflects the current state of the project.

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.