agentleFS
Microsoft AzureKnown publisherAzure/azclips/Agent/AGENTS.md

azclips / Agent

AGENTS.md15 starsChanged 2 days agoMITView on GitHub

Scoped guidance for the AI agent under Agent/ and its tests. Read this before changing Agent code or Agent tests. When a rule here changes, update this guide in the same PR. - Build expected paths from the product's path constants (for example HomePaths), not from string literals. A literal path can drift from what the product writes, and the assertion then passes for the wrong reason. - Prove that a new assertion fails when the condition it guards is…

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not write tests for test helpers.

    line 13
  2. Distinctive:

    If a helper needs its own tests, simplify it instead.

    line 15
  3. Distinctive:

    Do not assert an upper bound on elapsed time.

    line 20
  4. Distinctive:

    Test infrastructure defaults to a fake clock that never advances.

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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

Agent — Agent Guide

Scoped guidance for the AI agent under Agent/ and its tests. Read this before changing Agent code or Agent tests. When a rule here changes, update this guide in the same PR.

Tests

  • Build expected paths from the product's path constants (for example HomePaths), not from string literals. A literal path can drift from what the product writes, and the assertion then passes for the wrong reason.
  • Prove that a new assertion fails when the condition it guards is broken.
  • Do not write tests for test helpers. Keep fakes, harnesses and fake servers simple enough to verify by reading. Add a guard to a helper only when a real test needs it. If a helper needs its own tests, simplify it instead.
  • Tests must not depend on machine speed. See "Timing in tests".

Timing in tests

  • Do not assert an upper bound on elapsed time.
  • Product code with a time budget takes a TimeProvider (default TimeProvider.System). Its tests use FakeTimeProvider or SignalingFakeTimeProvider, and wait for the timer (WaitForTimerAsync) before calling Advance when the timer may not be armed yet. Test infrastructure defaults to a fake clock that never advances.
  • A wait for something that must happen on a real thread, process or I/O uses the shared 60-second hang guard: .WithAgentHangGuard(), or AgentTestTimeouts.HangGuard where a TimeSpan is needed (tests/Common/Utilities/AgentTestTimeouts.cs).
  • A short window of 50-100 ms is allowed only to show that something did not happen.
  • A budget the test owns must not end the operation under test. Give the operation its own untimed token and assert which token cancelled it.
  • A child process the test expects to be killed must outlive every wait in the test.
  • Mark any test that is still speed-dependent [Trait("Category", "LocalOnly")]. CI skips it.

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.