Borrowing it
Nothing to install: this file belongs to joslat/maf-doctor. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/joslat/maf-doctor/main/.github/instructions/maf-constraints.instructions.mdgit clone --depth 1 https://github.com/joslat/maf-doctorWrote 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.
[](https://agentmods.dev/instructions/joslat/maf-doctor/maf-constraints)<a href="https://agentmods.dev/instructions/joslat/maf-doctor/maf-constraints"><img src="https://agentmods.dev/badge/instructions/joslat/maf-doctor/maf-constraints/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.
<a href="https://agentmods.dev/instructions/joslat/maf-doctor/maf-constraints"><img src="https://agentmods.dev/badge/instructions/joslat/maf-doctor/maf-constraints.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01608 | $0.01608 |
| Opus 5 | $0.00804 | $0.00804 |
| Sonnet 5 | $0.00322 | $0.00322 |
| Haiku 4.5 | $0.00161 | $0.00161 |
Grade A, and why
maf-doctor maf-constraints.instructions.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 10d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MAF Migration Constraints
These rules apply across the tracked MAF release chain. Version-specific API recipes belong in the ordered per-version guides and registry; do not promote a single release's syntax into a timeless global rule.
Hard Constraints (Never Violate)
- ALWAYS identify the exact source and target package versions and call
MafMigrationPath(currentVer, targetVer)for a multi-version upgrade. Apply every returned step in ascending order. - NEVER store session-specific state in
AIContextProviderorChatHistoryProviderinstance fields. Use the framework's session-state mechanism for the selected version, such asProviderSessionState<T>, and persist the session when continuity must outlive a process or top-level call. - NEVER use
DefaultAzureCredentialin production code. Prefer an explicit production credential such asManagedIdentityCredential; keep developer credential chains in development-only composition. - NEVER enable
EnableSensitiveData = trueoutside a development-only, access-controlled diagnostic boundary. Provider errors, prompts, tool arguments, session state, and model output can contain secrets or personal data. - NEVER treat model-generated code or shell commands as sandboxed.
LocalCodeAct, Python child processes, andTools.Shellrequire a real container/VM boundary, minimal filesystem mounts, restricted credentials and egress, resource limits, and explicit tool/policy composition. - NEVER derive file-memory roots, shell paths, callback destinations, or tenant storage folders directly from untrusted input. Validate and authorize them against an application-owned boundary.
- NEVER expose raw hosted-provider failure detail by default. Preserve server-side diagnostics in access-controlled telemetry; enable exception details only for trusted callers.
- ALWAYS pin
dotnet-inspectto exact v0.9.1 in this repository. Reject a missing, mismatched, truncated, or structurally invalid report. UseMafRunCs0618Huntand the compiler as ground truth for overload resolution, transitive obsoletions, and project-local[Obsolete]attributes. - ALWAYS preserve the published maturity/version of each package. Stable, preview, RC, and alpha packages in one train are not interchangeable. Do not invent an aligned version for an externalized or independently shipped package.
- ALWAYS restore, build, and run focused behavior tests after migration. An empty public API diff cannot detect persistence, streaming, checkpoint, redaction, tool-approval, or workflow-routing behavior 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.
- 10d ago First seen · 116 lines · 1,608 tokens per session scan A 12f5177d22a8
maf-doctor maf-constraints.instructions.md is an instructions file published in the GitHub repository joslat/maf-doctor (14 stars, last pushed 23d ago), licensed MIT. It adds 1,608 tokens to every session, about $0.0080 per session on Opus 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.
Other instructions, from other repositories
plan-forge dapr.instructions.md
Dapr patterns for .NET — building blocks, component config, sidecar architecture, multi-tenant isolation, workflows, state management, secrets.
plan-forge landing-zone.instructions.md
Azure Landing Zone baselines — identity, network, policy, management, security, tagging, subscription organization.
plan-forge policy.instructions.md
Azure Policy and Initiative compliance — definitions, assignment, compliance state, exemptions, remediation tasks.
plan-forge api-patterns.instructions.md
API patterns for .NET — REST conventions, ProblemDetails, pagination, versioning, error responses.
plan-forge database.instructions.md
Database patterns for .NET — Dapper/EF Core, parameterized queries, migration strategy.
plan-forge messaging.instructions.md
Messaging patterns for .NET — Dapr Pub/Sub, MassTransit, NATS, RabbitMQ, CloudEvents.