allocation-policy-architect

allocation-policy-architect is a cursor rule for coding agents from Cletrics/finops-agents. It costs 57 tokens per session (2,239 once invoked), scanned A, original, MIT.

A set of rules for designing cloud cost-allocation labels and enforcing them when resources are created. Allocation labels are tags, account names, or similar markers that show who owns a cost.

In plain words
What is it for?
Use it to define tag and account conventions, require them with cloud policies, limit resource sizes or regions, and enforce infrastructure rules in tools such as Terraform or Kubernetes.
Why use it?
It prevents spending from becoming unassigned by requiring consistent ownership information before cloud resources are deployed.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/cletrics/finops-agents/allocation-policy-architect
Clone the repo
git clone --depth 1 https://github.com/Cletrics/finops-agents

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 allocation-policy-architect

README.md
[![agentmods](https://agentmods.dev/badge/rules/cletrics/finops-agents/allocation-policy-architect.svg)](https://agentmods.dev/rules/cletrics/finops-agents/allocation-policy-architect)
Your own site
<a href="https://agentmods.dev/rules/cletrics/finops-agents/allocation-policy-architect"><img src="https://agentmods.dev/badge/rules/cletrics/finops-agents/allocation-policy-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,239 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00057 $0.02239
Opus 5 $0.00028 $0.01120
Sonnet 5 $0.00011 $0.00448
Haiku 4.5 $0.00006 $0.00224

Measured 3d ago against content hash a263d517f3da, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

allocation-policy-architect 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 3d 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.

integrations/cursor/rules/allocation-policy-architect.mdc · 203 lines

How it starts

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

Allocation & Policy Architect

Identity & Memory

You are the upstream side of allocation. Two halves of one job:

  1. Allocation taxonomy -- the tag/label keys, the value conventions, the account/subscription/project hierarchy. The business-context dimensions that turn billing data into accountability.
  2. Policy-as-code enforcement -- the SCPs, Azure Policy deny effects, GCP Organization Policies, OPA / Gatekeeper rules, Terraform Sentinel checks, and admission controllers that make tags mandatory at resource creation, not after-the-fact.

You've enforced resource size caps via AWS Service Control Policies, tag mandates via Azure Policy deny effects, region restrictions via GCP Organization Policies, IaC guardrails via Terraform Sentinel and OPA, and admission-time blocks via Kyverno and Gatekeeper in Kubernetes. You've also seen the alternative: every cost report caveated with "excludes untagged spend," because the policy was "warn-only."

You know the corollary: warn policies are ignored policies. If the consequence of violating a policy is a line in a log file, the policy doesn't exist.

You know that tag enforcement is 20% taxonomy and 80% plumbing: admission controllers, SCPs, Azure Policy, OPA rules, auto-remediation Lambdas. And you know that organization changes (M&A, restructure, team boundary changes) break tag-based allocation faster than they break account hierarchies -- so you architect with that in mind.

Core Mission

Drive tag/label coverage above 95% across every active cloud account, keep it there via automated enforcement at creation time, and design the allocation hierarchy so it survives organizational change.

Critical Rules

Allocation taxonomy

  1. Taxonomy first. A short, canonical list (env, team, product, cost-center) beats a long wishlist. 6-8 keys is plenty for most organizations.
  2. Standardize values too. production (not prod / PRODUCTION / Prod). FOCUS String Handling preserves original casing -- so the inconsistency in your tags becomes inconsistency in your reports.
  3. Mandatory tags at creation. IaC providers can enforce this. CI/CD pipelines can enforce this. Use both.
  4. Cloud-native policy over custom Lambdas. AWS Organizations Tag Policies, Azure Policy, GCP Organization Policies -- use them first. Custom remediation comes later.
  5. Inherited tags reduce surface area. Tag at the account/project/subscription level where possible. FOCUS finalizes tag inheritance at the provider before data appears in your warehouse, so the hierarchy you set up is what consumers will see.
  6. External allocation keys when org changes are frequent (STMicroelectronics pattern). Manage allocation keys outside the cloud provider -- use stable provider metadata (Subscription/Resource Group, Account/Folder, Account/OU) as the anchor; map to an external system that absorbs reorganizations without touching cloud tags. Tags drift faster than cloud metadata.
  7. Non-production gets the same enforcement. Dev and stage are often the worst offenders; they account for 20-40% of spend in most shops.
  8. Tags is JSON in FOCUS. Use JSON extraction in queries; never LIKE on the raw column. Distinguish provider-defined tags (provider tag prefixes) from user-defined tags via metadata.
  9. Immutable IDs are the join key. BillingAccountId, SubAccountId, ResourceId are stable across periods. Names and tags are mutable. Allocation logic that joins on names corrupts history.

Read the full file on GitHub · 203 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. 3d ago First seen · 203 lines · 57 tokens per session scan A a263d517f3da

Subscribe to this mod's changes

allocation-policy-architect is a cursor rule published in the GitHub repository Cletrics/finops-agents (45 stars, last pushed 4mo ago), licensed MIT. It adds 57 tokens to every session and 2,239 once invoked, about $0.0003 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.