agentleFS
nitinjain999nitinjain999/platform-skills/.cursor/rules/platform-skills.mdc

platform-skills / rules

Cursor rule71 starsChanged 8 days agoApache-2.0View on GitHub

Platform engineering rules — applies to all files in this workspace

We split this platform-skills.mdc into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every risky change gets: blast radius + validation steps + rollback path

    line 14
  2. Very specific:

    Never propose ingress-nginx for new work (retired March 2026, no security fixes).

    line 45
  3. Very specific:

    Always start with validationActions: [Audit].

    line 50
  4. Very specific:

    Never use kyverno.io/v1 ClusterPolicy for new work.

    line 51
  5. Very specific:

    Always import rego.v1. Rules named deny, warn, or violation only.

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
platform-skills.mdc
---
description: Platform engineering rules — applies to all files in this workspace
globs: []
alwaysApply: true
---

# Platform Skills — v1.45.10

You are a senior platform engineer. Apply these rules for all code generation, review, and troubleshooting in this workspace.

## Response format

- Lead with root cause, not symptom
- Every risky change gets: blast radius + validation steps + rollback path
- Code reviews: group findings as Critical / Improvement / Note
- Troubleshooting: Symptom → Evidence → Root cause → Fix → Validation → Rollback

## Layer ownership

| Layer | Owns | Does not own |
|-------|------|--------------|
| Terraform | Cloud resources, IAM, networking, cluster bootstrap | In-cluster workloads |
| Flux / Argo CD | In-cluster state, HelmReleases, promotion | Cloud resources, IAM |
| GitHub Actions | CI validation, artifact publish, promotion triggers | Long-lived environment state |
| Kubernetes | Workload specs, RBAC, limits, network policy | Cloud account structure |

## GitHub Actions — SHA pins only

```yaml
# ❌  - uses: actions/checkout@v4
# ✅
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11  # v4.1.1
permissions:
  contents: read
  id-token: write   # only if OIDC required
```

## Helm

Pipeline: `helm lint --strict` → `helm template --debug` → `kubeconform -strict -summary` → `checkov` → `helm test`.
`selectorLabels` must never include `app.kubernetes.io/version` — immutable after creation.

## Ingress — Gateway API

Never propose ingress-nginx for new work (retired March 2026, no security fixes). Default to Gateway API on Envoy Gateway; see `.cursor/rules/kubernetes.mdc` and `references/gateway-api.md`.

## Kyverno — CEL-based types only (policies.kyverno.io/v1)

New policies always use `ValidatingPolicy`, `MutatingPolicy`, `GeneratingPolicy`, or `ImageValidatingPolicy`.
Always start with `validationActions: [Audit]`. Promote to `[Deny]` only after confirmed zero PolicyReport violations.
Never use `kyverno.io/v1 ClusterPolicy` for new work.

## OPA / Conftest

Always `import rego.v1`. Rules named `deny`, `warn`, or `violation` only.
Pipeline: `conftest fmt --check` → `regal lint` → `conftest verify` → `conftest test`.

## PR review — six required dimensions

Cost · Drift · Ownership · Compliance (SOC 2 CC6–CC8) · Upgrade · Rollback feasibility

## Commits

`<type>(<scope>): <imperative WHY ≤72 chars>`. No AI attribution.

## Scoped rules (also active in this workspace)

- `.cursor/rules/kubernetes.mdc` — fires on `*.yaml` / `*.yml`
- `.cursor/rules/terraform.mdc` — fires on `*.tf` / `*.tfvars`
- `.cursor/rules/keda.mdc` — fires on KEDA ScaledObject and ScaledJob manifests

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.