Communitygithub.com

lguidolin/resilience-and-deploy-safety

Use when planning a deploy, designing a rollback, or responding to an incident or writing a postmortem. Keywords — deploy safety, rollback, immutable artifact, progressive delivery, canary, blast radius, incident response, blameless postmortem, error budget.

Qu'est-ce que resilience-and-deploy-safety ?

resilience-and-deploy-safety is a Claude Code agent skill that use when planning a deploy, designing a rollback, or responding to an incident or writing a postmortem. Keywords — deploy safety, rollback, immutable artifact, progressive delivery, canary, blast radius, incident response, blameless postmortem, error budget.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lguidolin/agent-skills/tree/main/skills/resilience-and-deploy-safety

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Resilience and Deploy Safety

Overview

Things will break. The stance is not "prevent all failure" but fail small, recover fast, and learn every time. Reliability is not the absence of failure; it is the bounded blast radius and short recovery time when failure comes.

Deploy Safety — Every Deploy Reversible and Progressively Exposed

  • The artifact is immutable and promoted, not rebuilt. One image, built once in CI and identified by its content digest, moves preview → staging → production unchanged. Rebuilding per environment means deploying something you never tested.
  • Tags are mutable pointers; the digest is the identity. A tag can be overwritten and silently point somewhere new. A content digest cannot. Each environment records the digest it validated, and production runs only a digest a lower environment validated — so "the exact thing we tested" is a property the pipeline enforces, not a discipline someone has to remember.
  • A human decision precedes production. For a solo maintainer this is a deliberate pause and an audit record rather than separation of duties. Say which it is; do not oversell it.
  • The running version is injected at deploy time, never baked into the image. A version baked as a build argument forces a rebuild to stamp a release, and the rebuild is exactly what promotion exists to avoid.
  • When infrastructure lives in its own repository, coordinate by expand/contract. Infrastructure expands first (additive, backward-compatible), the application consumes the new capability in a later deploy, and infrastructure contracts only once no live artifact depends on the old shape — the same discipline as a schema change (see zero-downtime-migrations). The invariant: never ship an application artifact that requires an infrastructure change not yet live. Held to that, each repository is independently reversible, which is what makes rollback tractable when the two are out of step.
  • Roll forward only when you can roll back. A rollback path exists and is tested before a risky change ships. "How do we undo this?" is answered in the plan, not during the incident.
  • Rollback is redeploying the previously-good digest. That digest is still in the registry and still immutable, so rolling back is promotion in reverse — never a rebuild, and never a rebuild "as it was".
  • Progressive exposure. New versions reach users gradually (health-gated rollout, canary where supported), so a bad release harms a fraction, not everyone.
  • Schema changes are decoupled from code deploys and follow expand/contract (see zero-downtime-migrations). A deploy must never require a simultaneous destructive migration.
  • A deploy-readiness checklist gates production: observability in place, rollback verified, migrations expand-safe, SLOs unbroken.

Incident Response — Failure Is a Learning Input

  • Classify by severity and respond proportionally; have a known path to engage the right people.
  • Blameless postmortems for every user-facing incident. Written timeline, contributing causes (systemic, not personal), concrete action items. The question is "what about the system let this happen," never "who messed up."
  • Action items are tracked, not forgotten — they flow into the Future Considerations doc (see recording-decisions) and become real work.
  • The error budget governs. When reliability is spent, reliability work outranks features until the budget recovers.

Quick Reference

Before a risky deployConfirm
ArtifactBuilt once in CI; promoted by digest; the same one staging validated
GateA human decision recorded before production
RollbackPath exists and is tested
ExposureGradual/canary, not all-at-once
SchemaExpand-safe, decoupled from the code deploy
ObservabilityCan you see if it's going wrong?

When to scale this

Local/pre-launch projects write these rules now, activate on first real users. The properties are portable — build once, promote what you tested, decide before production, be able to roll back — but the mechanisms are not: a digest promotion is meaningful on a container host and largely moot for a static site, and a managed platform may supply preview environments and instant rollback for free. Name the mechanism in the project's delivery skill; keep the property here. Stack mechanisms (k8s probes, canary, per-PR envs): cloud-delivery-aks.

Full rationale: Article XII of the constitution, bundled at engineering-constitution/references/engineering-constitution.md.

Individual skills in this repo

This repo contains 18 individual skills — each has its own dedicated page.

lguidolin/change-hygiene-and-code-craft

Use when writing or refactoring code, structuring a commit or PR, or deciding whether to abstract duplication. Symptoms — mixing reorg with logic changes, a PR doing several things at once, a file growing large, the second copy of similar code, or unsure whether to DRY something up.

lguidolin/cloud-delivery-aks

Use when deploying to Kubernetes or Azure Kubernetes Service (AKS), configuring cloud secrets, setting up progressive rollout/canary, per-PR ephemeral environments, or k8s health probes. Keywords — Kubernetes, AKS, Key Vault, Argo Rollouts, Flagger, canary, blue-green, liveness, readiness, PodDisruptionBudget, HPA, rollback, GHCR.

lguidolin/commit-history-rewrite

Use when an existing repository has messy commit history that needs to conform to conventional commits before adopting release-please, or when intermediate WIP/fixup/merge commits need to be cleaned up.

lguidolin/conventional-commits-and-releases

Use when committing, writing a commit message, opening a PR that will be squash-merged, or configuring automated versioning/changelogs. Keywords — conventional commits, release-please, semver, feat/fix/chore, breaking change, changelog.

lguidolin/defense-in-depth-security

Use when handling untrusted input, secrets, authentication/authorization, or dependencies — or threat-modeling a new surface. Keywords — STRIDE, threat model, least privilege, secrets management, supply chain, dependency scanning, input validation, audit log, defense in depth.

lguidolin/designing-before-building

Use when starting a feature, fixing a non-trivial bug, or about to write implementation code — before any code exists. Symptoms you need this: "this is simple, I'll just code it", reaching for the editor before a design is approved, or an idea that hasn't been turned into a spec and plan.

lguidolin/engineering-constitution

Use when starting work in a project that follows the engineering constitution, orienting to its rules, or deciding which engineering practice applies to a task — spec writing, commits, testing, security, deploys, database, or UI work.

lguidolin/graphql-contract-testing

Use when writing a GraphQL query/mutation that the UI and a test will share, or building route/schema contract or smoke tests. Symptoms — copying a query into a test, a test asserting on query text, schema change that didn't break the UI build, or RLS/permission drift. Keywords — graphql-codegen, typed document, contract test, route smoke test.

lguidolin/init-repo-CI

Use when setting up a new repository with conventional commits, release-please, and CI automation, or when retrofitting an existing repository that lacks automated versioning and PR validation workflows.

lguidolin/interface-craft-and-accessibility

Use when building or styling UI — components, layouts, forms, design tokens — or making accessibility decisions. Keywords — a11y, WCAG, keyboard navigation, focus state, contrast, design system, minimalist UI, component reuse, ARIA, semantic HTML.

lguidolin/merge-gates-and-automation

Use when setting up or changing CI, pre-push hooks, or a task runner, or deciding what must pass before merge. Symptoms — tempted to put authoritative checks only in a local hook, skip CI, bypass with --no-verify, or unsure what gates a merge vs. runs locally.

lguidolin/observability-and-slos

Use when adding logging, metrics, tracing, health checks, SLOs, or alerting — or when building a service surface that needs to be operable and debuggable. Keywords — structured logs, OpenTelemetry, correlation id, RED metrics, liveness, readiness, SLI, SLO, error budget, alerting.

lguidolin/performance-and-scale

Use when working on hot paths, list endpoints, pagination, data-access in loops, or public interfaces/schemas. Symptoms — unbounded queries, N+1 access, no latency budget, optimizing without measuring, or changing an interface many consumers depend on. Keywords — pagination, N+1, Hyrum's Law, performance budget, bundle size.

lguidolin/postgres-postgraphile-rls-and-sql

Use when writing PostgreSQL, PostGraphile config, Row-Level Security policies, SQL schema files, or working on the Browser→App→PostGraphile→Postgres data path. Keywords — RLS, SECURITY DEFINER, search_path, pgSettings, grants, roles, GraphQL depth limit, query cost, statement_timeout, SQL file organization.

lguidolin/recording-decisions

Use when a design or architecture decision has been made and needs to be captured — writing a decision record or ADR, updating a decision index, noting a deferred idea, or superseding a past decision. Keywords — ADR, decision record, rationale, rejected alternatives, dependency index.

lguidolin/ship-it

Use when the user wants to ship work — push, PR, archive decision records, merge, and clean up. Handles the full lifecycle from committing final changes through post-merge cleanup including converting specs/plans to compact decision records.

lguidolin/tests-as-a-control

Use when writing or modifying tests, when a test breaks during a refactor, or when testing permission/role rules. Symptoms — tempted to edit a test to make it pass, testing only the happy path, a deny-test that started passing, flaky tests, or unsure what to assert.

lguidolin/zero-downtime-migrations

Use when changing a database schema where data must survive the change — adding/removing/renaming columns, constraints, indexes, or backfilling. Symptoms — a destructive migration bundled with a code deploy, a NOT NULL column with a backfill, a table-locking UPDATE, or a rename. Keywords — expand/contract, parallel change, backfill, NOT VALID, CREATE INDEX CONCURRENTLY, graphile-migrate.

Skills associés