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

durabletask-mssql

Copilot instructions106 starsChanged 3 years agoMITView on GitHub

This repository implements the Microsoft SQL Server and Azure SQL storage provider for the Durable Task Framework and Durable Functions. It contains: The provider persists orchestration and entity state, coordinates distributed workers, and supports multiple independently deployed applications sharing one database. Correctness, rolling-upgrade compatibility, and predictable SQL performance take priority over convenience. Published table-valued parameters are wire contracts for independently deployed apps sharing a database schema. Never change or recreate a published TVP in a minor or patch release, even…

The file

Show its rules and text

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

13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

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

    Run the core suite with dotnet test --no-build --filter Category!=Stress …

    line 18
  2. Very specific:

    Run the Functions suite with dotnet test --no-build …

    line 19
  3. Distinctive:

    Prefer the smallest targeted test first, then run the affected suite.

    line 21
  4. Distinctive:

    Add regression tests for customer-reported failures and schema compatibility changes.

    line 22
  5. Distinctive:

    Follow the existing C# style, nullable annotations, naming, and file organization.

    line 26
  6. Distinctive:

    Keep changes focused and avoid unrelated refactoring.

    line 28
  7. Distinctive:

    Use existing logging and retry helpers rather than adding broad catches or silent fallbacks.

    line 29
  8. Distinctive:

    Keep synchronous data-reader loops where comments identify them as deliberate performance optimizations.

    line 30
  9. Distinctive:

    Avoid adding database round trips, metadata queries, dynamic SQL, or per-operation schema checks to hot paths.

    line 31
  10. Very specific:

    Never edit a published schema-x.y.z.sql migration.

    line 36
  11. Distinctive:

    Use explicit column lists for inserts and projections.

    line 38
  12. Distinctive:

    Follow the canonical database schema development rules for the rationale and maintenance procedure.

    line 45
  13. Very specific:

    Update src/DurableTask.SqlServer/Scripts/README.md for schema-development rules and docs for deployment-visible behavior.

    line 49

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

Repository scope and purpose

This repository implements the Microsoft SQL Server and Azure SQL storage provider for the Durable Task Framework and Durable Functions. It contains:

  • src/DurableTask.SqlServer: the core orchestration service, SQL client mappings, and embedded database scripts.
  • src/DurableTask.SqlServer.AzureFunctions: the in-process Azure Functions provider integration.
  • src/Functions.Worker.Extensions.DurableTask.SqlServer: the isolated-worker extension.
  • test: integration, Azure Functions, and performance tests.
  • docs: user-facing architecture, deployment, scaling, and multitenancy documentation.

The provider persists orchestration and entity state, coordinates distributed workers, and supports multiple independently deployed applications sharing one database. Correctness, rolling-upgrade compatibility, and predictable SQL performance take priority over convenience.

Build and test conventions

  • Build with dotnet build.
  • Run the core suite with dotnet test --no-build --filter Category!=Stress test/DurableTask.SqlServer.Tests/DurableTask.SqlServer.Tests.csproj.
  • Run the Functions suite with dotnet test --no-build test/DurableTask.SqlServer.AzureFunctions.Tests/DurableTask.SqlServer.AzureFunctions.Tests.csproj.
  • Integration tests require SQL Server. Locally they use localhost; CI starts the container with test/setup.ps1.
  • Prefer the smallest targeted test first, then run the affected suite.
  • Add regression tests for customer-reported failures and schema compatibility changes.

Code conventions

  • Follow the existing C# style, nullable annotations, naming, and file organization.
  • Preserve netstandard2.0 compatibility in the core provider.
  • Keep changes focused and avoid unrelated refactoring.
  • Use existing logging and retry helpers rather than adding broad catches or silent fallbacks.
  • Keep synchronous data-reader loops where comments identify them as deliberate performance optimizations.
  • Avoid adding database round trips, metadata queries, dynamic SQL, or per-operation schema checks to hot paths.

SQL schema conventions

  • SQL scripts under src/DurableTask.SqlServer/Scripts are embedded in the provider assembly.
  • Never edit a published schema-x.y.z.sql migration. Add a new idempotent migration for persistent schema changes.
  • logic.sql and permissions.sql are reapplied during schema initialization and upgrades.
  • Use explicit column lists for inserts and projections. New physical table columns must be nullable or have safe defaults so older clients continue to work.
  • Preserve established transaction table-access order, locking hints, and indexes unless a measured and tested change requires otherwise.

Published TVPs are immutable compatibility contracts

Published table-valued parameters are wire contracts for independently deployed apps sharing a database schema. Never change or recreate a published TVP in a minor or patch release, even to add a nullable column. Prefer scalar parameters or a versioned TVP and procedure, retain old contracts during rolling upgrades, and keep version-specific compatibility test baselines frozen.

Follow the canonical database schema development rules for the rationale and maintenance procedure.

Documentation

Update src/DurableTask.SqlServer/Scripts/README.md for schema-development rules and docs for deployment-visible behavior. Call out rolling-upgrade or multitenancy implications whenever a database contract 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.