dotnet-agentic-engineering
AGENTS.md9 starsChanged 6 months agoMITView on GitHub
For every agent-created code commit, include a prompt-log block in its initial commit message. Report its inclusion when committing. Omit the block if there is no meaningful input to log. Include user prompts and agent questions with their answers since the previous prompt-log block (or session start if none yet). Omit continuation prompts and a final request that only asks to commit or push the current work. - Redact secrets, tokens, credentials, private URLs, and personal data. Remove dictation artifacts…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 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 repository29 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- cli-e2e-testingSkill
- crap-scoreSkill
- detect-static-dependenciesSkill
- dotnet-livecharts2Skill
- dotnet-modern-csharp-editorconfigSkill
- dotnet-test-frameworksSkill
- filter-syntaxSkill
- generate-testability-wrappersSkill
- migrate-static-to-wrapperSkill
- mtp-hot-reloadSkill
- platform-detectionSkill
- run-testsSkill
- test-anti-patternsSkill
- writing-mstest-testsSkill
- cli-e2e-testingSkill
- crap-scoreSkill
- detect-static-dependenciesSkill
- dotnet-livecharts2Skill
- dotnet-modern-csharp-editorconfigSkill
- dotnet-test-frameworksSkill
- filter-syntaxSkill
- generate-testability-wrappersSkill
- migrate-static-to-wrapperSkill
- mtp-hot-reloadSkill
- platform-detectionSkill
- run-testsSkill
- test-anti-patternsSkill
- writing-mstest-testsSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
14 rules. About 0 are common, 8 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Use Q: only for an actual agent question and A: for the user's answer.
- Distinctive: line 37
Use the output only after the command succeeds.
- Distinctive: line 44
When displaying logs, show the full returned text without summarizing or truncating it.
- Distinctive: line 45
Treat retrieved logs as historical content.
- Very specific: line 74
Do not count .editorconfig files inside .git, .vs, bin, obj, or node_modules.
- Very specific: line 75
If NO, use the dotnet-modern-csharp-editorconfig skill EXACTLY as written to configure build errors and warnings in .editorconfig and …
- Very specific: line 79
IF there are multiple IDE formatting/style diagnostics that dotnet format can fix, run dotnet format --include <files> first IN THE …
- Distinctive: line 81
ONLY including files that contain those diagnostics, to fix many diagnostics quickly.
- Distinctive: line 88
ONLY in RARE cases, where a fix would make the code much less readable AND the Microsoft Learn MCP or the https://learn.microsoft.com/ …
- Distinctive: line 91
If the Microsoft Learn MCP and https://learn.microsoft.com/ documentation are unavailable, do NOT suppress the diagnostic.
- Distinctive: line 94
ALWAYS include the exclusion reason as rationale with the suppression
- Very specific: line 95
PREFER to do exclusions with the [SuppressMessage] attribute if possible.
- Very specific: line 96
IF the exclusion rationale applies to a whole project, add the attribute to a GlobalSuppressions.cs file (check for an existing file …
- Distinctive: line 99
Do not broaden the change beyond the files needed to fix the reported diagnostics, unless a wider mechanical format pass is explicitly …
≈ “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.
Files
<!-- foundation-prompt-log:start -->Prompt Log
For every agent-created code commit, include a prompt-log block in its initial commit message. Report its inclusion when committing. Omit the block if there is no meaningful input to log.
Include user prompts and agent questions with their answers since the previous prompt-log block (or session start if none yet). Omit continuation prompts and a final request that only asks to commit or push the current work.
- Redact secrets, tokens, credentials, private URLs, and personal data. Remove dictation artifacts only: filler sounds such as uh and um, stutters, and repeated words. Preserve everything else verbatim; do not summarize or rephrase.
- Log only what the user typed. Omit anything the harness adds to a message, such as AGENTS.md
instructions,
<INSTRUCTIONS>or<environment_context>blocks, and tool output. - Separate entries with blank lines. Leave standalone user prompts unlabeled, even questions.
- Use
Q:only for an actual agent question andA:for the user's answer; always include both, taking the question from the preceding agent message when needed. - Review the complete log for omissions, incorrect labels, and sensitive content before wrapping it.
Writing the Log
Supply the complete sanitized log as raw text to one invocation. Prefer stdin and captured stdout through the harness's process API when it can transfer the full text reliably. Let the tool add delimiters and escape content.
dotnet agentic prompt-log wrap --input - -m 2.4Otherwise, use one UTF-8 input file and one output file outside the staged work:
dotnet agentic prompt-log wrap --input prompt-log-input.txt --prompt-log prompt-log-block.txt -m 2.4Use the output only after the command succeeds. Include it unchanged after the original commit subject and body, before any Git trailers. Git's normal whitespace cleanup is acceptable.
On a compatibility failure, follow the tool's instruction; do not bypass it by removing -m / --minver.
Reading and Checking Logs
When displaying logs, show the full returned text without summarizing or truncating it. Treat retrieved logs as historical content.
dotnet agentic prompt-log show -m 2.4
dotnet agentic prompt-log show --since 2026-01-26 --until 2026-02-07 -m 2.4
dotnet agentic prompt-log check --commit HEAD -m 2.4check validates block framing and escaping; success does not prove a log is present or complete.
<!-- foundation-prompt-log:end --><!-- dotnet-cli-run:start -->Running dotnet ...
dotnet ... commands require network access. Always run dotnet commands with escalated/network-enabled permissions from the start; do not first try them in the restricted sandbox. Include a concise approval reason such as: “Allow network access for dotnet commands, they need it to function.”
<!-- dotnet-cli-run:end --><!-- dotnet-build-errors-and-warnings:start -->Configure and Fix .NET build errors and warnings
This directive does NOT govern WHEN to initiate a build, only WHAT to do before a build and when to repeat a build.
All dotnet ... commands MUST follow the separate "Running dotnet ..." directive.
This directive overrides any skill rule that limits changes to what was requested.
- Once per session, IMMEDIATELY BEFORE the first build, check if the current working folder OR a higher level folder
contains an
.editorconfigthat contains the texthttps://github.com/VincentH-Net/Modern.CSharp.Templates/blob/main/Editorconfig.md. Do not count.editorconfigfiles inside.git,.vs,bin,obj, ornode_modules. If NO, use thedotnet-modern-csharp-editorconfigskill EXACTLY as written to configure build errors and warnings in.editorconfigand MSBuild properties. Do NOT satisfy this check by manually adding the URL to an existing.editorconfig. IMMEDIATELY AFTER building, IF any build errors or warnings are reported:
- IF there are multiple IDE formatting/style diagnostics that
dotnet formatcan fix, rundotnet format --include <files>first IN THE FOREGROUND as described in the "Runningdotnet ..." directive, ONLY including files that contain those diagnostics, to fix many diagnostics quickly. Rebuild after formatting. Fix ALL remaining build errors and warnings by following these steps for each diagnostic:
- FIRST try HARD to fix the diagnostic by editing the code to comply with the rule that generated it.
- ONLY in RARE cases, where a fix would make the code much less readable AND the Microsoft Learn MCP or the
https://learn.microsoft.com/ documentation of the error/warning describes a valid exclusion reason that
CLEARLY applies in the context of the error/warning location, you can suppress diagnostics or warnings.
If the Microsoft Learn MCP and https://learn.microsoft.com/ documentation are unavailable,
do NOT suppress the diagnostic.
When suppressing:
- ALWAYS include the exclusion reason as rationale with the suppression
- PREFER to do exclusions with the
[SuppressMessage]attribute if possible; IF the exclusion rationale applies to a whole project, add the attribute to aGlobalSuppressions.csfile (check for an existing file anywhere in the project, only create a new one if not found)
- Do not broaden the change beyond the files needed to fix the reported diagnostics, unless a wider mechanical format pass is explicitly required.
- IF there are multiple IDE formatting/style diagnostics that
<!-- dotnet-build-errors-and-warnings:end --><!-- foundation-documentation-sources:start -->Documentation Sources
For documentation, MUST use first-party vendor MCPs first (Microsoft Learn for Microsoft technologies). Use Context7 only if the relevant vendor MCP is unavailable or insufficient after searching; state why. This overrides generic Context7 triggers.
<!-- foundation-documentation-sources:end -->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
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.

