agentleFS
Microsoft AzureKnown publisherAzure/azure-verified-modules-tools/AGENTS.md

azure-verified-modules-tools

AGENTS.md2 starsChanged 59 days agoMITView on GitHub

This repo is being delivered phase by phase against the plan in docs/avm-consolidation-plan.md and the engineering rules in docs/avm-implementation-spec.md. Sessions get swapped out often, so the work depends on every agent leaving the next agent a clean handoff. The protocol exists so that "I lost my context window" never means "I lost my place."

  • Commits and pushes
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository2 other files it gives its agents.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Staging: prefer git add -A for slice commits so progress-doc updates land with the code.

    line 33
  2. Very specific:

    Failure path: if git push is rejected because the remote moved, git pull --rebase origin <branch> and re-run ./build.ps1 pre-commit before …

    line 35
  3. Very specific:

    Run ./build.ps1 pre-commit before handing work off.

    line 50
  4. Distinctive:

    PowerShell 7.4+, Core only: No Windows PowerShell 5.1 paths.

    line 54
  5. Very specific:

    Read /memories/repo/pester-and-lint-gotchas.md (in your assistant's memory store, not in the repo) before you fight PSScriptAnalyzer or …

    line 64
  6. Distinctive:

    Commit-and-push to the active feature branch after every slice (see Commit & push protocol).

    line 76

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

This repo is being delivered phase by phase against the plan in docs/avm-consolidation-plan.md and the engineering rules in docs/avm-implementation-spec.md. Sessions get swapped out often, so the work depends on every agent leaving the next agent a clean handoff.

Read first, in this order

  1. docs/progress.md — the stable progress protocol. Always start here, then read active or blocked slice files under docs/progress/. Closed legacy work is in docs/progress-archive.md.
  2. docs/avm-implementation-spec.md — wins on implementation details (file layout, encoding, cross-OS rules, error handling, testing layers).
  3. docs/avm-consolidation-plan.md — wins on scope and sequencing (verb table, phase exit criteria, architecture options).
  4. docs/quality-standards.md — cross-cutting standards and gotchas (encoding, cross-OS, subprocess, PSScriptAnalyzer + Pester traps, networking, test layers, manifest casing, error handling, commit + push protocol).

Working protocol

The protocol exists so that "I lost my context window" never means "I lost my place."

  • Before starting a slice, create docs/progress/YYYY-MM-DD-<descriptive-slug>.md with Status: in-progress. Do not allocate a sequential F### identifier.
  • When you finish a slice, set its status to complete, finish its checklist, and record the relevant validation. Keep the file in place.
  • When you discover a new must-do, add it to the current slice when it is required for that outcome; otherwise create a separate slice file.
  • When you hit a blocker you can't unstick this turn, set the slice status to blocked and record a one-line diagnosis and candidate fix in that file.
  • Avoid shared indexes. docs/progress.md is the stable protocol page, not a mutable status rollup. Update only the slice file owned by the current branch unless another branch explicitly hands it over.
  • Never delete completed slice files. They are the audit trail. Older work from the former global checklist remains in docs/progress-archive.md.
  • Commit and push after every meaningful change. As soon as ./build.ps1 pre-commit is green for a slice (or for a focused doc-only edit that doesn't need it), stage the change, write a Conventional-Commits message, commit, and git push to the active feature branch. The user explicitly opted in to this on 2026-05-18 — they want each slice landed on origin as it completes so a lost session never costs more than the last unpushed slice. See Commit & push protocol below for the exact rules.

Commit & push protocol

  • Cadence: one commit per slice. A slice is the unit recorded in one docs/progress/ file, or a self-contained doc/refactor that does not need a tracking file.
  • Gate: ./build.ps1 pre-commit must be green before you commit code changes. Doc-only commits skip the gate.
  • Message style: Conventional Commits.
    • feat(<area>): … for new behaviour (feat(http): honour AVM_MIRROR via Resolve-AvmMirrorUrl helper).
    • fix(<area>): … for bug fixes.
    • refactor(<area>): …, test(<area>): …, docs: …, chore: …, ci: … as appropriate.
    • First line ≤ 72 chars. Use a body when the why isn't obvious from the diff; reference the spec / progress item.
  • Staging: prefer git add -A for slice commits so progress-doc updates land with the code. If you have unrelated dirty files (rare), be explicit instead.
  • Push: git push origin <branch> immediately after the commit. Never --force. Never push to main.
  • Failure path: if git push is rejected because the remote moved, git pull --rebase origin <branch> and re-run ./build.ps1 pre-commit before retrying the push. Do not force-push to resolve.
  • PRs / merges: still user-driven. Don't open, merge, or close PRs without explicit instruction.

Build / test commands

./build.ps1 layout       # casing & manifest guards (fast)
./build.ps1 lint         # PSScriptAnalyzer + repo settings
./build.ps1 test         # Pester unit tests (excludes Integration + Component)
./build.ps1 pre-commit   # layout + lint + test + component (the recommended local gate)
./build.ps1 ci           # CI entry point (alias for pre-commit, called from .github/workflows/ci.yml)
./build.ps1 coverage     # Pester with coverage (JaCoCo XML under out/coverage/)
./build.ps1 clean        # remove out/

Run ./build.ps1 pre-commit before handing work off. If lint ever crashes with Object reference not set to an instance of an object., see docs/quality-standards.md — the prior recurrence was transient and bisecting per file under src/Avm.Authoring/ was the diagnostic path.

Repo conventions that matter

  • PowerShell 7.4+, Core only. No Windows PowerShell 5.1 paths.
  • LF, UTF-8 (no BOM) for every text file in src/. .gitattributes enforces it; if a git status shows CRLF warnings, fix the file rather than fighting core.autocrlf.
  • Approved verbs only. Get-Verb is the allow-list.
  • Avm prefix on every exported function and noun.
  • Argv-array subprocess invocation through Invoke-AvmProcess. Never build a single command string.
  • [CmdletBinding(SupportsShouldProcess)] on any cmdlet that writes to disk or state.
  • Spec §6 casing rules: the Avm.Authoring/ folder and Avm.Authoring.psd1 filename are guarded by Test-AvmModuleLayout after a 2026-05 manifest-casing incident. Don't loosen those guards.

Known traps

Read /memories/repo/pester-and-lint-gotchas.md (in your assistant's memory store, not in the repo) before you fight PSScriptAnalyzer or Pester 5 scoping. It captures the recurring failure modes:

  • PSUseConsistentWhitespace + PSAlignAssignmentStatement mutual exclusion
  • PSUseProcessBlockForPipelineCommand requiring begin {} around Set-StrictMode when the function has [Parameter(ValueFromPipeline)]
  • Auto-variable traps ($matches, $eventArgs) inside Pester It blocks
  • function script:Foo { … } nested inside another function occasionally crashing PSScriptAnalyzer with NullReferenceException (suspected cause of a transient crash seen in 2026-05; no longer reproducing)
  • Pester 5 TestCases parameter binding (<word> placeholders) accidentally hitting test names

Branch & PR posture

  • Work on the current worktree feature branch; do not hard-code an active branch in repository documentation.
  • Default branch: main.
  • Commit-and-push to the active feature branch after every slice (see Commit & push protocol). Never push to main. Never force-push. Never open, merge, or close a PR without explicit user instruction.

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.