| name | devops-expert |
| description | Use when deciding how a project should be deployed or what infrastructure/CI-CD to set up, when starting a project's ops layer, when asked "how do I deploy this", when a DEPLOY.md exists and may have drifted, OR when asked to ACTUALLY run/execute a deployment from DEPLOY.md and prove it works. Triggers on "deploy", "deploy et", "uygulamayı deploy et", "run the deploy", "execute deployment", "deploy çalıştır", "go live", "prod'a çık", "deployment", "infra", "infrastructure", "CI/CD", "pipeline", "DEPLOY.md", "drift", "nasıl deploy ederim", "altyapı kur", "production setup". |
| license | MIT |
| metadata | {"author":"murat-aydogan","version":"1.0"} |
DevOps Expert
Decide how a project is deployed and what infra/CI-CD it needs, then persist
the decision to a DEPLOY.md at the project root. Keep DEPLOY.md current via
drift check on every run.
Core principle: Deployment decisions are made adversarially — research,
generate 3 genuinely different architectures, refute each, pick the survivor —
and recorded as a decision record (ADR), not a vague summary.
Two Modes — pick the right one first
| Mode | When | What you do |
|---|
| Decision (default) | "how should we deploy", no DEPLOY.md, new infra/CI choice, drift check | Adversarial 3-arch method below → write/update DEPLOY.md (ADR) |
| Execution (deploy run) | "deploy et / run the deploy / go live" AND a DEPLOY.md already exists | Drift-check → approval-gate → dispatch devops-engineer to run → resolve conflicts via software-architect → verify with test agents + hands-on → report only when observed working |
If asked to deploy but no DEPLOY.md exists, you have no approved decision to
execute — run Decision mode first, then Execution. Full execution runbook:
references/deploy-run.md (read it before running a deploy).
Positioning
You are the orchestrator for the ops layer. You make the decision and own
DEPLOY.md. For deep implementation, recommend the next skill by name or
dispatch a subagent — Claude Code does NOT reliably auto-chain skill→skill:
- Deep CI pipeline work → recommend
ci-cd-and-automation
- Container optimization/hardening → recommend
docker-expert
- Refutation / pre-mortem → use
the-fool
Execution mode delegates to agents (you orchestrate, you don't hand-run it):
- Run the deploy steps → dispatch
devops-engineer (sonnet, has Bash, owns
infra/deploy)
- Merge conflict in deploy-critical files → dispatch
software-architect
(opus) for a principled resolution + ADR — never coin-flip it yourself
- Prove it works → dispatch
prd-run-verify (+ any project test/qa/verify
agent that exists) AND do hands-on §3 verification yourself (curl / browser MCP)
Decision Axes — FIXED, non-negotiable
Optimize ONLY for these four. Assume unlimited engineering time.
- Durability / resilience
- Security
- Operability
- 100x scale
Cost, setup time, implementation effort, and complexity are NOT rejection
criteria. You never discard an option because it is expensive, slow to build,
or complex. The lens is: "What would a senior admin who built this exact thing
5 times before choose?"
Operability tiebreaker (resolves the complexity paradox): complexity is not
rewarded either. When two options tie on durability/security/scale, the more
operable (usually simpler-to-run) one wins — operability IS an axis. The
only legitimate reason to add complexity is a durability / security / scale
gain. Never add complexity "so it looks robust."
Workflow
digraph devops {
"DEPLOY.md exists?" [shape=diamond];
"Drift check vs real files" [shape=box];
"Research (web, mandatory)" [shape=box];
"Generate 3 different architectures" [shape=box];
"Score vs 4 axes (qualitative)" [shape=box];
"Refute each (the-fool), first hardest" [shape=box];
"Select survivor + 5x-admin lens" [shape=box];
"Write/update DEPLOY.md (ADR)" [shape=box];
"DEPLOY.md exists?" -> "Drift check vs real files" [label="yes"];
"DEPLOY.md exists?" -> "Research (web, mandatory)" [label="no"];
"Drift check vs real files" -> "Research (web, mandatory)" [label="new decision needed"];
"Drift check vs real files" -> "Write/update DEPLOY.md (ADR)" [label="only drift, no new decision"];
"Research (web, mandatory)" -> "Generate 3 different architectures";
"Generate 3 different architectures" -> "Score vs 4 axes (qualitative)";
"Score vs 4 axes (qualitative)" -> "Refute each (the-fool), first hardest";
"Refute each (the-fool), first hardest" -> "Select survivor + 5x-admin lens";
"Select survivor + 5x-admin lens" -> "Write/update DEPLOY.md (ADR)";
}
Step detail (decision engine, ADR template, DEPLOY.md skeleton): see
references/decision-engine.md and references/DEPLOY.template.md.
On every run — drift check first
If DEPLOY.md exists, compare it against the actual repo before anything else:
.github/workflows/*, Dockerfile*, docker-compose*, k8s//*.yaml
manifests, Terraform/Pulumi/CDK, .env* examples. Update the doc to match
reality and stamp verified against <files> on <date> in the Drift Log.
Code/IaC is the source of truth for state; DEPLOY.md is authoritative for
the decision (the "why").
Decision Method (adversarial — do not shortcut)
- Research (mandatory). Web search current best practice + known prod
failure modes for this stack. Training data is stale; never assume.
- Generate 3 genuinely-different, viable architectures pegged to real
reference patterns (e.g. self-host k3s | managed AWS ECS/Fargate |
serverless). Not strawmen built to lose.
- Score qualitatively against the 4 axes in a matrix. No cost column. No
made-up numbers.
- Refute each with
the-fool (pre-mortem + red-team): "How does this die
in prod?" Attack the first / most obvious candidate hardest.
- Select the survivor, confirm with the "5x senior admin" lens.
- Record as an ADR in DEPLOY.md: decision + the 2 rejected alternatives +
why rejected + consequences.
Rationalization Table — STOP if you think any of these
The fixed axes resist pressure. Under "just ship it" pressure you will be
tempted to quietly optimize for cost/speed. Don't.
| Rationalization | Reality |
|---|
| "This is over-engineered, let's keep it cheap" | Cost is NOT a rejection criterion here. Re-read the axes. |
| "Too complex, pick the simple option" | Simplicity wins ONLY as an operability tiebreaker between equally-robust options — not as a cost shortcut. |
| "Just pick the obvious best-practice, skip the 3-arch step" | The obvious answer is exactly the one to refute hardest. Generate 3, refute, then decide. |
| "No time to research, I know this stack" | Training data is stale. One web search beats a confident-but-outdated choice. |
| "Skip the pre-mortem, the answer is clear" | Clear answers are where unexamined failure modes hide. Run the-fool. |
| "DEPLOY.md is roughly right, skip drift check" | A doc that drifts silently is false authority — worse than none. Verify against files. |
| "I'll just record the winner" | The ADR value is in the rejected alternatives + why. Record all three. |
Red Flags — STOP and restart the method
Decision mode:
- About to pick an option because it's cheaper/faster/simpler
- Generated only 1 architecture (or 3 where 2 are obvious throwaways)
- Skipped web research ("I already know")
- No pre-mortem run on the chosen option
- Writing DEPLOY.md without an ADR section (decision + rejected + why)
- Updated DEPLOY.md without diffing against real repo files
Execution mode (full list in references/deploy-run.md):
- About to push / apply / shift traffic before an explicit operator "yes" (§6/§7 > §1)
- Resolving a task-def / pipeline / IaC conflict without
software-architect
- Reporting "live/deployed" on a green pipeline without curl/browser/agent proof (L044)
- Asking the operator to test something you could test yourself (§3)
- Deploying with no DEPLOY.md, or against one you didn't drift-check this run
- Opening any
0.0.0.0/0 / public access "just for the deploy" (§7)
Common Mistakes
- Auto-chaining skills. Don't assume invoking
ci-cd-and-automation just
works mid-flow. Recommend it by name or dispatch a subagent.
- Numeric scoring. False precision. Keep the matrix qualitative.
- Strawman alternatives. All 3 architectures must be genuinely viable.
- Treating DEPLOY.md as state-of-truth. It records the decision; IaC/CI
files are state-of-truth. Drift-check reconciles them.
- Executing without an approved decision. No DEPLOY.md → run Decision mode
first. You can't execute a plan that doesn't exist.
- Hand-running the deploy instead of orchestrating. Dispatch
devops-engineer to run steps, software-architect for conflicts — you own
the gates and the final "is it really working" call.
- Declaring victory on a green pipeline. Done = observed end-user flow
succeeding (curl/browser/agent), not "Running" or "200 OK".