Rules for automated pull request reviewers. AGENTS.md owns orientation; each rule links to the page that owns its details.
- Block (Medium or higher): a broken public contract (rule IDs,
ScanResultand finding shapes, SDK exports, CLI options and exit codes,action.ymlinputs and outputs); a wrong verdict (false finding, missed finding, or a pass on unknown evidence); reuse of stale cached evidence; unexpected or repeated billable AWS calls; untrusted input reaching the action's PR output or the privileged release workflow; release tags or releases at the wrong commit. - Nit at most: missing TSDoc on exports, naming, and documentation wording that does not change a contract.
- Rule IDs are immutable. Under
packages/rules/src/aws/, never renumber, reuse, or reassign an ID, even after removing a rule. Configuration, consumer profiles, and scan manifests pin IDs; the metadata test checks only uniqueness. See rule ID compatibility. - Static rules cover both IaC formats. A static evaluator change needs Terraform-shaped and CloudFormation-shaped test cases; no check enforces this (testing strategy).
- Cache versions follow dataset changes. In
packages/sdk/src/providers/aws/discovery-registry.ts, bump a dataset'sschemaVersionwhen its normalized output changes andloaderVersionwhen its collection, normalization, or observation semantics change (loaders live inpackages/sdk/src/providers/aws/resources/). Without the bump, cached evidence from the old loader is reused until its TTL expires. Bumping an unchanged dataset discards its cache and repeats billable CloudWatch collection. See dataset versions. - Unknown evidence stays unknown. Missing, partial, failed, or unresolved evidence must surface as nullable
values and
unknowncoverage (getLiveEvaluationCoverage), never as zero,assessed, orpassed. Metric windows must match the declaredfreshness.observationwindow, which uses complete UTC days for daily lookbacks. See the SDK architecture. - Identity fails closed. In
packages/rules/src/aws/resource-identity.ts,packages/rules/src/shared/, the Cost Optimization Hub loader and rules, andpackages/sdk/src/engine/finding-precedence.ts, contradictory or malformed IDs, ARNs, accounts, or Regions must dropresourceKeyandopportunityIdand keep provenance only. Otherwise precedence suppresses a real native finding. Tie-breaks use UTF-16 code-unit order, and freshness timestamps need an explicit timezone. See finding identity. - Public shapes are additive and documented.
ScanResultis also the output ofcloudburn --format json. A change to exported SDK types, result fields, CLI options, or exit codes must be additive and must update the finding reference and the affected package README in the same pull request. If a pull request deletes a test, check that the contract it covered is still tested elsewhere. - Action output treats PR content as untrusted. In
packages/action/src/, escape PR-controlled text such as file paths and diagnostics before it goes into comments or summaries. Update only marker comments written by the token's GraphQL viewer, and keep comment bodies under GitHub's 65,536-character limit.action.ymloutputs are additive only, and its description stays under Marketplace's 125-character limit. See the action instructions. - Release recovery is privileged. In
.github/workflows/release.yml, check a dispatched ref's ancestry and the absence of pending changesets before any setup step. Check npm provenance naming that exact SHA beforepnpm installor any other repository code runs. Toolchain setup actions may run first. Compare peeled commits for annotated tags, and create tags only for packages that commit released. Version tags are immutable, and the floating major tag never moves backwards. See release recovery. - MCP tools stay read-only and host-independent. In
packages/mcp/src/, tools must not change AWS resources, must reject relative paths, and must write nothing but JSON-RPC to stdout. Tool names, inputs, and results are additive only. Plugin MCP launchers are pinned by the build, never by hand-edited versions. See the MCP instructions. - Changesets. A user-visible change to
cloudburn,@cloudburn/sdk,@cloudburn/rules,@cloudburn/action, or@cloudburn/mcpneeds one.changeset/*.mdfile per package,patchorminoronly. A missing changeset is Medium: the change is never versioned or released, so users do not receive it. Documentation-only changes need none. Keep the action's and MCP package'sworkspace:*SDK pins. See contributor changesets.
- Precedence output is sorted deterministically and does not preserve rule or evaluator order. The precedence graph is opportunity-local, so A→B→C does not suppress C when B has no match for that opportunity (cross-rule precedence).
findingCountinevaluations.rulescounts findings before precedence, so it can exceed what remains underproviders.- A
recommendationwithoutopportunityIdskips precedence on purpose; the SDK never rebuilds identity from display fields. - Auto Scaling group ARNs with a colon in the group name are not canonicalized, because AWS forbids colons there.
- Rule evaluator tests use SDK-normalized dataset fixtures. Template parsing and joins belong in SDK provider tests, not rule tests.
- The release workflow labels the version pull request after creating it, and a labeling failure does not fail the run. Changesets offers no atomic labeling, so the short race is accepted.
- Generated output:
packages/*/dist/,pnpm-lock.yaml, and package versions andCHANGELOG.mdfiles written by Changesets (generated files). - Files of upstream skills listed in
skills-lock.json; the skills CLI owns them. - Issues that CI already catches: Biome lint and formatting, typecheck,
turbo boundariesimport direction,pnpm docs:checklinks and aliases, the metadata test (unique IDs, evaluator modes, declared dataset reads, multi-dataset coverage hooks), and the action bundle test (no AWS SDK or Smithy in the static bundle).
Back any claim about AWS API behavior, serialization, or limits with AWS documentation or the installed SDK source. For a finding about cache versions or coverage, name the normalized field or semantic that changed and the rule whose verdict it affects.