AGENTS.md

July 10, 2026 · View on GitHub

Cross-tool agent guidance for Sentinel-As-Code. Recognised by GitHub Copilot, Claude, Gemini, Cursor, and other agentic coding tools that look for AGENTS.md at the repo root.

This file is a thin pointer — every agent / tool should follow the canonical instructions in .github/copilot-instructions.md.

TL;DR for agents

  1. Read .github/copilot-instructions.md first. It carries the conventions (en-GB spelling, no em-dashes, commit-message format, no AI co-author trailers, etc.) that the rest of the docs assume.

  2. Read Docs/README.md second. It is the table of contents for every concern in the repo.

  3. Path-scoped instructions under .github/instructions/ carry per-folder schema rules and conventions. Copilot loads them automatically based on the file you're editing; other agents should read the matching <area>.instructions.md before editing files in that area.

  4. Reusable prompts under .github/prompts/ are slash commands for repeatable tasks (new rule, new test, review-a-rule, regenerate-deps). Copilot exposes them in chat; other agents can read them as task templates.

  5. Custom agents under .github/agents/ are persona configurations recognised by GitHub Copilot Chat (github.com), Copilot cloud agent, Copilot CLI, VS Code, JetBrains, Eclipse, and Xcode. Thirteen agents in two tiers:

    Persona-broad (5)repo-explorer, rule-author, content-editor, rule-tuner, code-explainer. Pick one based on the kind of help you want.

    Engineering specialists (8)pipeline-engineer, powershell-engineer, bicep-engineer, kql-engineer, test-engineer, security-reviewer, drift-engineer, dependencies-engineer. Pick one when the task is firmly in one engineering specialism.

    Other agentic tools can treat the .agent.md files as role definitions.

Hard rules

  • Never push to main directly. All changes via PR.
  • Never push to auto/* branches. Bot-managed.
  • Never hand-edit dependencies.json. Auto-derived. Run ./Tools/Build-DependencyManifest.ps1 -Mode Generate instead.
  • Never include AI / LLM references in commit messages or Co-Authored-By trailers. This includes Claude, Anthropic, ChatGPT, Copilot, etc.
  • Never use em-dashes (—) in new prose. Use hyphens or parenthetical phrasing.
  • Always run Pester locally before pushing: ./Tools/Invoke-PRValidation.ps1.

What to do for common tasks

You want to...ReadUse
Add a Sentinel analytical ruleDocs/Content/Analytical-Rules.mdAgent rule-author (works on github.com + VS Code) or prompt /new-analytical-rule (VS Code)
Add a hunting queryDocs/Content/Hunting-Queries.mdAgent rule-author or prompt /new-hunting-query
Add a Defender XDR detectionDocs/Content/Defender-Custom-Detections.mdAgent rule-author or prompt /new-defender-detection
Add a Pester testDocs/Tests/Pester-Tests.mdPrompt /new-pester-test (VS Code)
Tune an existing rule's threshold / severityThe rule file itselfAgent rule-tuner
Understand how a piece of the repo worksDocs/README.mdAgent repo-explorer
Explain a rule's KQLThe rule fileAgent code-explainer
Edit a workflow / pipeline, port an ADO change to GH, or diagnose a CI/CD failureDocs/Pipelines/README.mdAgent pipeline-engineer
Add a function to Sentinel.Common or refactor a scriptDocs/Deploy/Scripts.mdAgent powershell-engineer
Edit a Bicep templateDocs/Infra/Bicep.mdAgent bicep-engineer
Optimise a KQL query (performance, parser extraction, watchlist promotion).github/instructions/kql-queries.instructions.mdAgent kql-engineer
Add coverage / refactor a Pester suiteDocs/Tests/Pester-Tests.mdAgent test-engineer
Security-review a playbook / script / workflowThe file in questionAgent security-reviewer
Triage a drift auto-PR or fix the drift detectorDocs/Tools/Sentinel-Drift-Detection.mdAgent drift-engineer
Fix wrong output in dependencies.json or extend the KQL discovery extractorDocs/Tools/Dependency-Manifest.mdAgent dependencies-engineer
Refresh dependencies.json (routine regeneration)Docs/Tools/Dependency-Manifest.mdPrompt /regenerate-deps

Test before you ship

Always run the Pester suite locally before opening a PR:

./Tools/Invoke-PRValidation.ps1 -RepoPath .

Five-job CI gate on every PR to main:

  • validate — Pester suites
  • bicep-buildaz bicep build
  • arm-validateTest-AzResourceGroupDeployment template validation (OIDC)
  • kql-validate — Microsoft.Azure.Kusto.Language parser
  • dependency-manifestdependencies.json drift gate

A failing gate blocks merge. See Docs/Tests/Pester-Tests.md.