devops-patterns

A set of rules for diagnosing continuous-integration failures and prioritizing security findings. It defines categories such as configuration, code, security, environment, and known recurring failures.

In plain words
What is it for?
Use it to classify failed CI steps, recognize recurring problems, rank vulnerabilities, and calculate CI health from build, controller, and security signals.
Why use it?
It gives investigations a consistent way to interpret failures and order security work by severity and deadlines.

Cursor rule for Cursor

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/cloudbees-oss/devops-agent-kit/devops-patterns
Clone the repo
git clone --depth 1 https://github.com/cloudbees-oss/devops-agent-kit

Made for: Cursor.

Per session 401 This file is loaded in full into every session.
When invoked 401 The same file — it is already loaded in full.
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.00401 $0.00401
Opus 5 $0.00200 $0.00200
Sonnet 5 $0.00080 $0.00080
Haiku 4.5 $0.00040 $0.00040

Measured yesterday against content hash 165c82e4e86d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

devops-patterns 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 yesterday.

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.

.cursor/rules/devops-patterns.mdc · 46 lines

What it actually says

DevOps Analysis Patterns

Failure Classification

When triaging a failed CI run, classify the root cause:

Category Indicators Examples
CONFIG Validation errors, missing inputs, invalid references YAML syntax error, missing folder-name input, bad action version
CODE Build/compile/test steps fail after checkout succeeds Compilation error, test assertion failure, lint violation
SECURITY Security scan step fails Gitleaks finding, SAST vulnerability, SCA dependency issue
ENVIRONMENT Timeouts, connection errors, resource issues Runner unavailable, OOM kill, network timeout, disk full
KNOWN Same step + same error pattern as a previous triage Recurring flaky step, known infrastructure issue

Security Prioritization

Rank findings by:

  1. Critical severity (immediate action)
  2. High severity with approaching SLA deadline
  3. High severity
  4. Medium severity
  5. Low severity

For each finding, always include: finding type, file path, line number, SLA due date.

CI Health Scoring

Calculate a 0-100 score based on:

  • Pass rate: 35% weight
  • Controller health: 20% weight
  • Security posture: 25% weight
  • Queue efficiency: 20% weight

Known Quirks

  • logs_list may return HTTP 500 — fall back to step names and statuses
  • controllers_data_get widgets ci5, ci6, ci7 may return empty — skip gracefully
  • organizations_suborg_report widgets s4, s5 may return "No Data Found" at org level — use component-level tools instead
  • Always skip runs with workflow names containing "code_scan" (infrastructure-managed scans)
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. yesterday First seen · 46 lines · 401 tokens per session scan A 165c82e4e86d

Subscribe to this mod's changes

devops-patterns is a cursor rule published in the GitHub repository cloudbees-oss/devops-agent-kit (3 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 401 tokens to every session, about $0.0020 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-31.