AGENTS.md TemplatesAGENTS.md Template

AGENTS.md Template for SQL Server Production Architecture

AGENTS.md Template for SQL Server production architecture that governs AI coding agents, single-agent and multi-agent orchestration, and production governance.

AGENTS.md templateSQL Serverproduction architectureAI coding agentsmulti-agent orchestrationagent handoff rulestool governancesecuritySQL Server deploymentDBA automationworkflow orchestration

Target User

Developers, DBAs, SREs, Architecture leaders

Use Cases

  • SQL Server production orchestration
  • DBA automation with AI agents
  • Multi-agent governance for production SQL Server

Markdown Template

AGENTS.md Template for SQL Server Production Architecture

# AGENTS.md
Project: SQL Server Production Architecture AI Agents
Version: 1.0
Purpose: Defines an operating model for SQL Server production architecture using AI coding agents and multi-agent orchestration.

Agent roster and responsibilities:
- Planner: Responsible for creating the high-level plan, sequencing tasks, and validating constraints for SQL Server production architecture.
- Implementer: Executes actions to provision, configure, and code against SQL Server in production environments.
- Reviewer: Checks outputs for correctness, security, and compliance before handoffs to testers.
- Tester: Runs validation tests, performance checks, and rollback scenarios in staging before production.
- Researcher: Gathers sources, standards, and best practices for SQL Server production, encryption, backups, and DR/BCP.
- Domain Specialist: Senior DBA/SQL Server Architect ensures domain-specific decisions are sound and compliant with governance.

Supervisor or orchestrator behavior:
- The Planner coordinates tasks, defines success criteria, and assigns Agents to subtasks.
- Agents operate under policy constraints, and escalations happen when a decision requires human review.

Handoff rules between agents:
- Planner → Implementer: hand off plan with concrete tasks, prerequisites, and data sources.
- Implementer → Reviewer: hand off outputs with test results and remediation steps.
- Reviewer → Tester: hand off validated artifacts for automated and manual tests.
- Researcher/Domain Specialist → Planner: provide findings and constraints for the next cycle.
- All handoffs must include context, memory state, and sources of truth.

Context, memory, and source-of-truth rules:
- Context must include current SQL Server instance details, topology, and security posture.
- Memory stores: latest plan, artifacts, test results in a dedicated memory bucket (e.g., agent memory store).
- Source of truth: CI/CD artifacts, versioned scripts, configuration baselines, and documented decisions.

Tool access and permission rules:
- Tools: SSMS, sqlcmd, PowerShell, SQL Agent, Azure DevOps CLI, Git, monitoring dashboards.
- Access: least-privilege, role-based permissions, secrets managed in a vault.
- Prohibit direct production changes by non-approved agents; require an approved plan.

Architecture rules:
- Maintain separation of duties between provisioning, configuration, and validation.
- Use blue/green deployment for schema changes when possible.
- Ensure rollback paths for each change.

File structure rules:
- All production scripts must be versioned.
- Architecture-related files live under infra/ and deployments/.

Data, API, or integration rules:
- Data handling must comply with encryption at rest/in transit.
- Use service accounts for APIs; secrets never embedded in code.
- Audit trails for all data operations.

Validation rules:
- Each change must have unit tests (tSQLt or equivalent) and integration tests.
- Validation must include security and access control checks.
- Rollback verification after deployment.

Security rules:
- Enforce least-privilege access and secrets management.
- Audit logging and monitoring in production.
- SQL Injection and misconfig checks.

Testing rules:
- Include unit, integration, and load testing with defined thresholds.
- Use staging environment identical to production.

Deployment rules:
- CI/CD gated deployments with approval gates.
- Feature toggles for risky changes.
- Blue/Green for major schema changes.

Human review and escalation rules:
- Any policy violation or security concern escalates to Domain Specialist and Security.
- Critical failures require human-in-the-loop review.

Failure handling and rollback rules:
- Safe rollback via versioned artifacts and pre/post deployment checks.
- Automated rollback on detected anomalies.

Things Agents must not do:
- Do not bypass approval gates.
- Do not access production without a validated plan.
- Do not ignore source-of-truth artifacts.
- Do not share secrets in logs.

Overview

Direct answer: This AGENTS.md template defines a SQL Server production architecture workflow with clear single-agent and multi-agent orchestration, providing hands-off governance, escalation paths, and auditable decisions for AI coding agents.

The AGENTS.md Template for SQL Server Production Architecture offers a complete operating manual for how AI coding agents collaborate on provisioning, configuring, validating, deploying, and monitoring SQL Server in production—all while enforcing tool governance and human review where appropriate.

When to Use This AGENTS.md Template

  • When designing AI-assisted SQL Server production workflows with explicit handoffs and governance.
  • For multi-agent orchestration across DBA, DevOps, security, and data engineering tasks.
  • As a project-level operating context for single-agent or multi-agent execution in production environments.
  • To define security, data handling, auditing, and deployment rules in a SQL Server pipeline.

Copyable AGENTS.md Template

# AGENTS.md
Project: SQL Server Production Architecture AI Agents
Version: 1.0
Purpose: Defines an operating model for SQL Server production architecture using AI coding agents and multi-agent orchestration.

Agent roster and responsibilities:
- Planner: Responsible for creating the high-level plan, sequencing tasks, and validating constraints for SQL Server production architecture.
- Implementer: Executes actions to provision, configure, and code against SQL Server in production environments.
- Reviewer: Checks outputs for correctness, security, and compliance before handoffs to testers.
- Tester: Runs validation tests, performance checks, and rollback scenarios in staging before production.
- Researcher: Gathers sources, standards, and best practices for SQL Server production, encryption, backups, and DR/BCP.
- Domain Specialist: Senior DBA/SQL Server Architect ensures domain-specific decisions are sound and compliant with governance.

Supervisor or orchestrator behavior:
- The Planner coordinates tasks, defines success criteria, and assigns Agents to subtasks.
- Agents operate under policy constraints, and escalations happen when a decision requires human review.

Handoff rules between agents:
- Planner → Implementer: hand off plan with concrete tasks, prerequisites, and data sources.
- Implementer → Reviewer: hand off outputs with test results and remediation steps.
- Reviewer → Tester: hand off validated artifacts for automated and manual tests.
- Researcher/Domain Specialist → Planner: provide findings and constraints for the next cycle.
- All handoffs must include context, memory state, and sources of truth.

Context, memory, and source-of-truth rules:
- Context must include current SQL Server instance details, topology, and security posture.
- Memory stores: latest plan, artifacts, test results in a dedicated memory bucket (e.g., agent memory store).
- Source of truth: CI/CD artifacts, versioned scripts, configuration baselines, and documented decisions.

Tool access and permission rules:
- Tools: SSMS, sqlcmd, PowerShell, SQL Agent, Azure DevOps CLI, Git, monitoring dashboards.
- Access: least-privilege, role-based permissions, secrets managed in a vault.
- Prohibit direct production changes by non-approved agents; require an approved plan.

Architecture rules:
- Maintain separation of duties between provisioning, configuration, and validation.
- Use blue/green deployment for schema changes when possible.
- Ensure rollback paths for each change.

File structure rules:
- All production scripts must be versioned.
- Architecture-related files live under infra/ and deployments/.

Data, API, or integration rules:
- Data handling must comply with encryption at rest/in transit.
- Use service accounts for APIs; secrets never embedded in code.
- Audit trails for all data operations.

Validation rules:
- Each change must have unit tests (tSQLt or equivalent) and integration tests.
- Validation must include security and access control checks.
- Rollback verification after deployment.

Security rules:
- Enforce least-privilege access and secrets management.
- Audit logging and monitoring in production.
- SQL Injection and misconfig checks.

Testing rules:
- Include unit, integration, and load testing with defined thresholds.
- Use staging environment identical to production.

Deployment rules:
- CI/CD gated deployments with approval gates.
- Feature toggles for risky changes.
- Blue/Green for major schema changes.

Human review and escalation rules:
- Any policy violation or security concern escalates to Domain Specialist and Security.
- Critical failures require human-in-the-loop review.

Failure handling and rollback rules:
- Safe rollback via versioned artifacts and pre/post deployment checks.
- Automated rollback on detected anomalies.

Things Agents must not do:
- Do not bypass approval gates.
- Do not access production without a validated plan.
- Do not ignore source-of-truth artifacts.
- Do not share secrets in logs.

Recommended Agent Operating Model

Roles, responsibilities and decision boundaries for SQL Server production architecture AI agents. The planner and domain specialist drive governance and safety; the implementer executes config and code; the reviewer validates; the tester confirms functionality; researchers provide evidence; escalation paths exist for human review when needed.

Recommended Project Structure

/
├── infra/
│   ├── sqlserver/
│   │   ├── configs/
│   │   │   └── production-config.yml
│   │   └── policies/
│   │       └── access-control.yaml
│   ├── monitoring/
│   │   ├── dashboards/
│   │   └── alerts/
│   └── secrets/
├── migrations/
│   └── 20260521_add_backups.sql
├── pipelines/
│   └── ci_cd/
├── src/
│   ├── agents/
│   │   ├── planner/
│   │   ├── implementer/
│   │   ├── reviewer/
│   │   ├── tester/
│   │   ├── researcher/
│   │   └── domain-specialist/
│   └── sql/
│       ├── stored_procedures/
│       └── tests/
└── docs/

Core Operating Principles

  • Single source of truth for production configurations and scripts.
  • Clear separation of duties across provisioning, changes, validation, and monitoring.
  • Traceable decisions with auditable logs and versioned artifacts.
  • Handoff protocols with explicit context and memory transfer.
  • Least-privilege access and strict secrets management.

Agent Handoff and Collaboration Rules

  • Planner coordinates tasks and communicates constraints to Implementer.
  • Implementer provides artifacts with test results to Reviewer.
  • Reviewer confirms artifacts pass tests and forwards to Tester.
  • Researcher/Domain Specialist contributes findings to Planner for iteration.
  • All agents must include memory state and sources of truth in handoffs.

Tool Governance and Permission Rules

  • Use least-privilege access to SSMS, sqlcmd, PowerShell, and Git.
  • Do not modify production configurations without approved changes.
  • Secrets must be stored in a vault; avoid embedding in code or logs.
  • All API calls to production services require approvals and auditing.

Code Construction Rules

  • All changes are versioned and traceable.
  • Use parameterized queries and stored procedures with proper error handling.
  • Follow SQL Server security best practices (least privilege, encryption, auditing).
  • Idempotent scripts where possible; avoid destructive operations without rollback.

Security and Production Rules

  • Encrypt data at rest and in transit; enable auditing.
  • Harden servers, patch management, and vulnerability scanning.
  • Change management with approvals; incident response plan in place.

Testing Checklist

  • Unit tests for stored procedures and functions.
  • Integration tests for data flows and security constraints.
  • Performance/load tests; monitor resource usage.
  • Deployment tests in staging that mirror production.

Common Mistakes to Avoid

  • Skipping security reviews for production changes.
  • Untracked changes in production configs.
  • Ignoring drift between environments.
  • Overlooking rollback strategies for migrations.

Related implementation resources: AI Use Case for Corporate Event Managers Using Slack To Orchestrate Day-Of Venue Tasks Across Multi-Department Teams and AI Agent Use Case for Food Processors Using Production Line Check-Sheets To Build Audit-Ready Food Safety Compliance Reports.

FAQ

What is the purpose of this AGENTS.md Template?

This AGENTS.md Template defines an operating manual for SQL Server production architecture that enables AI coding agents to collaborate with clear handoffs, governance, and safety constraints.

Who should use this AGENTS.md Template?

Developers, DBAs, SREs, and engineering leaders implementing AI-assisted SQL Server production workflows and multi-agent orchestration.

What does multi-agent orchestration look like in this template?

Planner, Implementer, Reviewer, Tester, Researcher, and Domain Specialist coordinate tasks with explicit handoffs and shared truth sources to ensure safe, auditable changes.

How are security and approvals enforced?

Least-privilege access, secrets in vaults, and gated approvals with auditable logs for every production change.

How do agents handle failures and rollback?

Automated rollback paths exist via versioned artifacts and pre/post deployment checks, with a defined escalation for human review.