AspectGenerator: Instructions file for Codex

AGENTS.md

AspectGenerator AGENTS.md is an instructions file for Codex, OpenCode from igor-tkachev/AspectGenerator. It costs 965 tokens per session, scanned A, original, MIT.

Repository instructions for AspectGenerator, a .NET tool that generates code from source-code patterns during compilation.

In plain words
What is it for?
Use them when changing AspectGenerator's diagnostics, code generation, hardening, or incremental generator implementation.
Why use it?
They set boundaries for hardening and refactoring work, including how to discover code, which diagnostics to defer, and which dependencies or line endings to preserve.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is igor-tkachev/AspectGenerator's own configuration. It tells Codex and OpenCode how to work on AspectGenerator itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything AspectGenerator configures →

Reuse

Borrowing it

Nothing to install: this file belongs to igor-tkachev/AspectGenerator. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/igor-tkachev/AspectGenerator/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/igor-tkachev/AspectGenerator

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for AspectGenerator AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/igor-tkachev/aspectgenerator/agents-md/github.svg)](https://agentmods.dev/instructions/igor-tkachev/aspectgenerator/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/igor-tkachev/aspectgenerator/agents-md"><img src="https://agentmods.dev/badge/instructions/igor-tkachev/aspectgenerator/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for AspectGenerator AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/igor-tkachev/aspectgenerator/agents-md"><img src="https://agentmods.dev/badge/instructions/igor-tkachev/aspectgenerator/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 965 This file is loaded in full into every session.
When invoked 965 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00965 $0.00965
Opus 5.5 $0.00386 $0.00386
Sonnet 5.5 $0.00193 $0.00193
Haiku 4.5 $0.00097 $0.00097

Measured today against content hash 395058a3149f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

AspectGenerator AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 26 lines

How it starts

The opening of the file, as written. The whole thing — 26 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Instructions

Before working on AspectGenerator hardening, diagnostics, code generation, or incremental generator refactors, read docs/AspectGeneratorHardeningPlan.md.

Current notes:

  • Invocation discovery should stay on SyntaxProvider candidates. Do not reintroduce full syntax-tree scans through CompilationProvider + DescendantNodes().
  • Keep InterceptMethods diagnostics deferred unless the user explicitly asks to work on them.
  • Preserve CRLF line endings for touched repository files.
  • Do not add new NuGet packages, template engines, formatters, source-generation helper libraries, or build tools unless the maintainer explicitly asks for that dependency.
  • Do not replace internal code generation with Scriban, Handlebars.Net, CSharpier, or other external templating/formatting tools as an automatic refactoring step.

Target filter parser

The parser of the target filter language is written in DotGram (Source/TargetFilter/TargetFilter.gram) and generated ahead of the build. The generated C# in Source/TargetFilter/Generated is committed and compiled like any other source: the build and the package have no DotGram dependency, and nothing is generated at build time.

Every target filter is read by the generated parser (Source/TargetFilter/TargetFilterFront.cs compiles what it reads into the rules the matchers run). The golden baselines in Baselines/TargetFilters pin what it reads over the whole corpus (UnitTests/Tests/TargetFilters): the diagnostic ids, the plan, the compiled rules and the decision for every target of a fixed list. The generated parser compiles against Roslyn 4.12 on netstandard2.0, and the minimum-sdk consumers run it in the SDK 9.0.100 compiler through their TargetFilter.

  • The grammar reads a line in the stages the filter language has always read it: a line, then each piece of it the language trims and reads again (a condition item, a value, a dotted name, the words of a method pattern, a parameter list and its parameters), each a publication read over the trimmed piece. Keep that shape when changing the language, and run the golden tests: a baseline difference is either a defect of the change or an intended change that needs a changelog line and re-accepted baselines (AG_UPDATE_BASELINES=1), with every changed record explained in the commit.
  • The generated parser can carry a reading nested deeper than its stack over to a thread of its own; TargetFilterParser.OnHandingOff refuses that (the generator runs on the compiler's threads), so such a rule is reported as AG0202. That code reads the thread's cultures, which RS1035 bans in analyzers; Source/TargetFilter/.editorconfig silences RS1035 for the generated file alone, until DotGram stops reading them there.

Read the full file on GitHub · 26 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +3 lines · +265 tokens per session 395058a3149f
  2. yesterday Changed · +11 lines · +532 tokens per session ec944e7fa20e
  3. 2mo ago First seen · 12 lines · 168 tokens per session scan A 8c2fd308e0dc

Subscribe to this mod's changes

AspectGenerator AGENTS.md is an instructions file published in the GitHub repository igor-tkachev/AspectGenerator (11 stars, last pushed yesterday), licensed MIT. It adds 965 tokens to every session, about $0.0039 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

AspectGenerator AGENTS.md compared with instructions from other repositories

AspectGenerator AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
AspectGenerator AGENTS.mdigor-tkachev/AspectGeneratorInstructions file11yesterdayMITA965Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot