# Patterns

> Use when designing or reviewing automation architecture for GitHub Actions, Argo Workflows, or Argo Events — choosing an idempotency or work-avoidance strategy, wiring GitHub App authentication, or picking an error-handling or hub-and-spoke pattern.

- Skill: `adaptive-enforcement-lab/patterns` (Agent Skill, multi-file: 40 files)
- Install (CLI): `npx skillmds@latest add adaptive-enforcement-lab/patterns`
- Raw SKILL.md: https://api.skillmd.com/api/skills/adaptive-enforcement-lab/patterns/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: adaptive-enforcement-lab (https://skillmd.com/u/adaptive-enforcement-lab)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/adaptive-enforcement-lab/patterns

---


# Patterns

## Overview

Reusable design patterns for resilient automation.

## Architecture Patterns

Fundamental patterns for building maintainable, scalable…
- [Hub and Spoke](library/architecture/hub-and-spoke/index.md) — Centralized orchestration with distributed execution.
- [Matrix Distribution](library/architecture/matrix-distribution/index.md) — Parallelize operations across dynamic target lists…
- [Separation of Concerns Pattern Overview](library/architecture/separation-of-concerns/index.md) — Single-responsibility components with clear boundaries.
- [Strangler Fig](library/architecture/strangler-fig/index.md) — Incremental migration from legacy systems.

## Argo Events

Build event-driven Kubernetes automation with Argo…
- [Argo Events Setup Guide](library/argo-events/setup/index.md) — Deploy event-driven automation with EventSource, EventBus…
- [Event Routing](library/argo-events/routing/index.md) — Control event flow from EventSources to…
- [Reliability Patterns](library/argo-events/reliability/index.md) — Build resilient event systems with retry…
- [Troubleshooting](library/argo-events/troubleshooting/index.md) — Debug event flows systematically from EventSource…

## Argo Workflows Patterns

Production Argo Workflows patterns: reusable templates…
- [Concurrency Control](library/argo-workflows/concurrency/index.md) — Prevent workflow conflicts with mutex synchronization…
- [Scheduled Workflows](library/argo-workflows/scheduled/index.md) — CronWorkflow patterns for scheduled automation: time-based…
- [Workflow Composition](library/argo-workflows/composition/index.md) — Build complex pipelines from reusable workflow…
- [WorkflowTemplate Patterns](library/argo-workflows/templates/index.md) — WorkflowTemplate foundations: versioned, reusable automation building…

## Efficiency Patterns

Optimize automation with idempotency and work…
- [Idempotency](library/efficiency/idempotency/index.md) — Build automation that survives reruns.
- [Implementation Patterns](library/efficiency/idempotency/patterns/index.md) — Five idempotency patterns for automation: check-before-act…
- [Tombstone/Marker Files](library/efficiency/idempotency/patterns/tombstone-markers/index.md) — Leave markers indicating operations completed.
- [Work Avoidance](library/efficiency/work-avoidance/index.md) — Skip work when outcomes won't change.
- [Work Avoidance Techniques](library/efficiency/work-avoidance/techniques/index.md) — Layer work avoidance checks from existence…

## Error Handling Patterns

Master when to fail fast vs…
- [Fail Fast](library/error-handling/fail-fast/index.md) — Detect and halt on precondition failures…
- [Graceful Degradation](library/error-handling/graceful-degradation/index.md) — Build tiered fallback systems that degrade…
- [Prerequisite Checks](library/error-handling/prerequisite-checks/index.md) — Consolidate all precondition validation into a…

## Github Actions
- [Actions Integration](library/github-actions/actions-integration/index.md) — Integrate GitHub Core Apps with Actions…
- [Error Handling](library/github-actions/actions-integration/error-handling/index.md) — Handle token failures, API rate limits…
- [File Distribution](library/github-actions/use-cases/file-distribution/index.md) — Automated file distribution across multiple repositories…
- [Installation Token Generation](library/github-actions/actions-integration/token-generation/index.md) — Generate short-lived installation tokens from GitHub…
- [JWT Authentication](library/github-actions/actions-integration/jwt-authentication/index.md) — Generate JWTs for GitHub App authentication.
- [Matrix Filtering and Deduplication](library/github-actions/use-cases/work-avoidance/matrix-patterns/index.md) — Reduce matrix builds from 47 jobs…
- [OAuth User Authentication](library/github-actions/actions-integration/oauth-authentication/index.md) — OAuth flows for user-context operations.
- [Token Lifecycle Management](library/github-actions/actions-integration/token-lifecycle/index.md) — Token expiration handling, refresh strategies, and…
- [Work Avoidance in GitHub Actions](library/github-actions/use-cases/work-avoidance/index.md) — Skip unnecessary CI/CD operations before execution.

## Reliability
- [Chaos Engineering for Kubernetes](library/reliability/chaos-engineering/index.md) — Chaos engineering for Kubernetes with Chaos…
- [Chaos Experiment Design](library/reliability/chaos-engineering/experiment-design/index.md) — Chaos experiment design methodology.

## Security
- [Secure-by-Design Pattern Library](library/security/secure-by-design/index.md) — Secure-by-design architecture patterns for Kubernetes.

## Full Reference

Full text: [reference.md](reference.md). Raw sources: [library/](library/). Live: [docs](https://adaptive-enforcement-lab.com/patterns/).

