GitHub Actions Workflow Authoring
Generate production-grade GitHub Actions workflows from systematic repository
analysis. Every workflow is security-hardened, performance-optimized, and
verified against the codebase.
Workflow Router
Determine the workflow type before starting. This drives which phases apply,
which templates to use, and whether to write from scratch or edit existing
workflows.
Do any GitHub Actions workflows already exist?
(.github/workflows/*.yml or .github/workflows/*.yaml)
|
NO --> GREENFIELD (no workflows exist)
| Phases: Discover -> Plan -> Write -> Verify
|
YES --> What type of change?
|
+-> New feature/service needs a pipeline
| --> WORKFLOW ENHANCEMENT (brownfield)
| Phases: Discover -> Audit Existing -> Plan (delta) -> Write -> Verify
|
+-> Existing workflow needs fixing/updating
| --> WORKFLOW UPDATE (brownfield)
| Phases: Discover -> Audit Existing -> Plan (delta) -> Write (edit) -> Verify
|
+-> Workflows exist but have security/performance issues
| --> WORKFLOW AUDIT (brownfield)
| Phases: Discover -> Audit Existing -> Plan (assessment) -> Write (edit) -> Verify
|
+-> User wants a specific workflow rewritten
| --> TARGETED REWRITE (brownfield)
| Phases: Discover -> Audit Existing (single workflow) -> Write (replace) -> Verify
|
+-> User wants a specific new workflow type
| --> TARGETED NEW WORKFLOW
| Phases: Discover -> Write (specific) -> Verify
|
+-> Migrating from another CI system
--> CI MIGRATION
Phases: Discover -> Audit Source CI -> Plan -> Write -> Verify
Signal detection:
| Signal in request |
Likely type |
| "Add CI", "add GitHub Actions", "set up CI/CD" (no workflows exist) |
Greenfield |
| "Add CI", "add pipeline" (workflows already exist) |
Workflow Enhancement |
| "Fix the CI", "workflow is broken", "build fails" |
Workflow Update |
| "Workflow is slow", "optimize CI", "reduce build time" |
Workflow Audit |
| "Security audit", "harden workflows", "pin actions" |
Workflow Audit |
| "Rewrite the CI", "redo the pipeline" |
Targeted Rewrite |
| "Add deploy workflow", "add release pipeline" |
Targeted New Workflow |
| "Add Docker build", "publish to npm/PyPI" |
Targeted New Workflow |
| "Migrate from Jenkins/CircleCI/GitLab" |
CI Migration |
| "Add a cron job", "scheduled workflow" |
Targeted New Workflow |
Phase 0: Discover Repository
Always run this phase. Before writing any workflow, build a complete
picture of the project. See
references/repo-discovery.md for the full
discovery method.
What to detect
Read README.md/CLAUDE.md and manifest files first, then work through the
deterministic 12-step detection sequence in
references/repo-discovery.md (with its
file→tool lookup tables) to establish:
- Language and ecosystem and package manager (from manifests and
lockfiles: package.json, pyproject.toml, go.mod, Cargo.toml, pom.xml, etc.)
- Framework (Next.js, Django, Spring Boot, Rails, …)
- Build system (Webpack, Vite, Turborepo, Nx, Gradle, Maven, Make, …)
- Test setup and lint/format tools (framework, runner command, config)
- Containerization (Dockerfile, docker-compose, Kubernetes manifests)
- Infrastructure as Code (Terraform, Pulumi, CloudFormation, CDK)
- Monorepo signals (workspace configs, Nx/Turborepo/Lerna)
- Deployment targets (cloud/serverless/Vercel/Netlify/Kubernetes config)
- Existing CI (
.github/workflows/*.yml, plus other systems: .circleci/,
Jenkinsfile, .gitlab-ci.yml, .travis.yml)
- Branch and release strategy (default branch, protected/release
branches, tags, GitHub Releases, changelogs, version files)
Output: Repository Profile
Compile the detected attributes into a mental model (do not write a file
unless requested) using the Composite Profile format in
references/repo-discovery.md.
This profile drives every subsequent phase.
Phase 1: Audit Existing Workflows (Brownfield Only)
Skip this phase for greenfield projects.
Before planning or writing anything, understand what workflows already exist
and assess their state.
Read every existing workflow
For each .github/workflows/*.yml file found in Phase 0:
- Read it fully. Parse the YAML structure: triggers, permissions, jobs,
steps, secrets usage, caching, matrix strategies.
- Classify its purpose: CI (test/lint/build), CD (deploy), Release
(publish/tag), Maintenance (dependabot, stale issues), Scheduled (cron jobs).
- Note its conventions: naming style, job naming, step naming, comment
style, environment variable patterns.
- Assess security posture: permissions declared? Actions pinned by SHA?
Secrets handling? Fork protections? OIDC usage?
- Assess performance: caching used? Unnecessary steps? Job parallelism?
Matrix strategy? Concurrency groups?
Existing workflow inventory
Build a mental inventory:
Existing Workflow Inventory
[file path] | [purpose] | [triggers] | [security: good/fair/poor] | [performance: good/fair/poor]
ci.yml | CI | push, PR | fair (unpinned actions) | fair (no caching)
deploy.yml | CD | push main | good (OIDC, pinned) | good
...
What to preserve in brownfield
| Content Type |
Example |
Preserve? |
| Working trigger logic |
Path filters, branch filters |
Always |
| Environment-specific secrets |
AWS credentials, deploy tokens |
Always |
| Custom scripts/steps |
Project-specific build logic |
Always |
| Concurrency groups |
Existing cancel-in-progress logic |
Always |
| Job dependencies |
Established needs: chains |
Default yes |
| Unpinned actions |
uses: actions/checkout@v4 |
Replace with SHA pin |
| Overly broad permissions |
permissions: write-all |
Replace with least privilege |
| Duplicated logic |
Same steps in multiple workflows |
Refactor to reusable |
| Dead workflows |
Workflows for removed features |
Remove |
Rule: Working workflows are valuable. A workflow that runs correctly is
better than a theoretically perfect one that breaks. Preserve working logic
and improve incrementally.
Brownfield conventions contract
Extract the workflow conventions from existing files and follow them:
- File naming: kebab-case? snake_case? What prefix/suffix patterns?
- Job naming: How are jobs named? Descriptive or terse?
- Step naming: Named steps or anonymous? Style of names?
- Comment style: Are inline comments used? YAML comments?
- Secret naming: Convention for secret names (SCREAMING_SNAKE, etc.)?
- Environment patterns: How environments are used (if at all)?
Match existing conventions. Do NOT impose new conventions on a brownfield
project unless the user explicitly requests a style change.
Phase 2: Plan Workflows
Greenfield planning
Derive a complete CI/CD plan from the repository discovery.
Pipeline architecture
Every project needs at minimum:
CI workflow (pull request validation):
- Lint/format check
- Type check (if applicable)
- Unit tests
- Build verification
CI workflow (main branch):
- Everything in PR CI, plus:
- Integration tests (if applicable)
- Artifact building
- Trigger CD (if applicable)
CD workflow (if deployment target exists):
- Build artifacts/containers
- Deploy to environments (staging, production)
- Environment protection rules
Release workflow (if library or publishable):
- Version bumping
- Package publishing (npm, PyPI, Maven, crates.io)
- GitHub Release creation
Maintenance workflows (recommended):
- Dependabot configuration
- Stale issue/PR management
- Scheduled security scans
Workflow plan algorithm
Based on the repository profile from Phase 0:
FOR EACH detected language:
-> Add CI job: setup + install + lint + test + build
-> Select template from references/workflow-templates.md
IF Dockerfile exists:
-> Add Docker build/push job
-> Select registry (GHCR by default)
IF IaC files exist:
-> Add infrastructure validation job (plan on PR, apply on merge)
IF monorepo detected:
-> Add change detection job
-> Make CI jobs conditional on changed paths
-> See references/pipeline-patterns.md for monorepo patterns
IF deployment target detected:
-> Add CD workflow with environment protection
-> See references/pipeline-patterns.md for deployment patterns
IF library (not service):
-> Add release/publish workflow triggered by tags
ALWAYS:
-> Apply security hardening (references/security-hardening.md)
-> Add concurrency groups
-> Add caching for dependencies
-> Set explicit permissions (least privilege)
Plan output
Workflow Plan
- .github/workflows/ci.yml — CI pipeline (lint, test, build) on PR + push main
- .github/workflows/deploy.yml — Deploy to staging/prod with environment protection
- .github/workflows/release.yml — Publish package on tag push
- .github/dependabot.yml — Dependency update automation
Present the plan to the user for approval before writing.
Brownfield planning
Use the workflow inventory from Phase 1. Do NOT plan from scratch. Plan
only what changes.
Workflow Enhancement: Delta plan
When adding a new workflow to an existing set:
- Identify which EXISTING workflows might be affected (shared secrets,
concurrency groups, deployment targets)
- Identify the NEW workflow to create
- For existing workflows, specify ONLY what changes (if anything)
Workflow Delta Plan
- .github/workflows/ci.yml — KEEP (no changes needed)
- .github/workflows/deploy.yml — MODIFY: add staging environment before prod
- .github/workflows/docker.yml — CREATE: Docker build + push to GHCR
Workflow Audit: Assessment plan
When auditing existing workflows for security/performance:
- List all issues found in Phase 1 with severity
- Propose fixes grouped by category (Security > Performance > Maintenance)
- For each workflow: KEEP (as-is), EDIT (fix issues), REWRITE (replace),
DELETE (remove dead workflow)
- Present to user for approval
Audit Findings & Plan
ci.yml:
- [Critical] Actions not pinned to SHA → EDIT: pin all actions
- [High] No permissions declared → EDIT: add least-privilege permissions
- [Medium] No dependency caching → EDIT: add cache configuration
deploy.yml:
- [High] Uses long-lived AWS keys → EDIT: migrate to OIDC
- [Low] No concurrency group → EDIT: add concurrency
old-ci.yml:
- [Low] Duplicate of ci.yml → DELETE
Targeted Rewrite: Single-workflow plan
When the user asks to rewrite a specific workflow:
- Read the existing workflow fully (done in Phase 1)
- Identify what to PRESERVE (working trigger logic, secrets, custom scripts)
- Identify what to REPLACE (insecure patterns, poor performance, outdated actions)
- Identify what to ADD (missing security, caching, concurrency)
- Present the plan
Rewrite Plan: ci.yml
PRESERVE: Trigger logic (push/PR), test matrix (Node 18/20), deploy job dependency
REPLACE: Unpinned actions (pin to SHA), npm install (use npm ci + caching),
missing permissions (add least-privilege)
ADD: Concurrency group, artifact upload for test reports, type checking step
Get user approval before rewriting.
CI Migration plan
When migrating from another CI system:
- Read the source CI config (.circleci/config.yml, Jenkinsfile, .gitlab-ci.yml)
- Map each job/stage to a GitHub Actions equivalent
- Identify feature gaps (some CI features don't map 1:1)
- Plan the migration as a set of new workflows
Migration Plan: CircleCI → GitHub Actions
CircleCI build job → .github/workflows/ci.yml (lint + test + build)
CircleCI deploy job → .github/workflows/deploy.yml (with environment protection)
CircleCI scheduled scan → .github/workflows/security.yml (cron schedule)
Gap: CircleCI orbs used → Replace with equivalent GitHub Actions
Present the plan to the user for approval before writing.
Phase 3: Write Workflows
Greenfield: Write from scratch
Write each planned workflow using the appropriate template and security rules.
See references/workflow-templates.md for
ecosystem-specific templates.
See references/security-hardening.md for
security rules.
See references/pipeline-patterns.md for
CI/CD patterns.
Writing sequence
Write workflows in this order:
- CI workflow first (validates that the build/test pipeline works)
- CD workflow (deployment depends on CI)
- Release workflow (publishing depends on build)
- Maintenance workflows (dependabot, security scans)
Per-workflow process (greenfield)
For each workflow:
- Select template: Choose from references/workflow-templates.md based
on language/ecosystem detected in Phase 0.
- Customize for project: Replace template placeholders with actual
commands, paths, versions from the repository profile.
- Apply security hardening: Follow every rule in
references/security-hardening.md:
- Set explicit
permissions: (least privilege)
- Pin all actions to full SHA
- Use OIDC for cloud auth where possible
- Protect secrets from fork exposure
- Guard against script injection
- Add performance optimization:
- Add dependency caching (use setup action's built-in cache where available)
- Add concurrency groups to cancel stale runs
- Use matrix strategy for multi-version testing
- Add path filters to avoid unnecessary runs
- Verify YAML syntax: Ensure valid YAML, proper indentation, correct
GitHub Actions syntax.
- Add inline comments: Explain non-obvious choices (why a specific
SHA, why a particular cache key, why a permission).
Brownfield: Edit existing workflows
Read before writing. For every workflow you modify, read it fully first
(already done in Phase 1). Never modify a workflow you haven't read.
Per-workflow process (brownfield)
For each workflow being modified:
- Re-read the workflow. Confirm your understanding from Phase 1.
- Apply only planned changes. Follow the delta plan from Phase 2.
Do NOT restructure, restyle, or "improve" sections outside scope.
- Match existing conventions. Use the same naming style, comment style,
and patterns discovered in Phase 1.
- Preserve working logic. Trigger conditions, environment variables,
secrets references, and custom scripts survive unless explicitly marked
for change.
- Verify every edit. Each changed action version, command, or path must
be verified against the codebase.
- Minimize diff. Change only what needs changing. Smaller diffs are
easier to review.
Brownfield-specific rules
- Edit, don't rewrite. Unless the user requests a rewrite, modify the
existing workflow surgically. Fix the specific issues; leave working
steps alone.
- Match existing style. If existing workflows use
name: Build and Test
for jobs, continue that pattern. Do NOT switch to name: build-and-test
because you prefer it.
- Preserve structure. Keep the existing job ordering unless it's part of
the planned changes.
- Never silently remove steps. If a step needs removal, note it in your
plan and confirm with the user. A step that looks unnecessary may have
a non-obvious purpose.
- Refactor only what you're asked to change. Do NOT improve adjacent
workflows, fix unrelated issues, or add features not in the plan.
Targeted Rewrite process
When rewriting a specific workflow (user explicitly requested):
- Create from the approved plan. Write the new version using the
PRESERVE/REPLACE/ADD breakdown from Phase 2.
- Start from the template in references/workflow-templates.md, then
transplant preserved logic into the new structure.
- For preserved content: Keep trigger logic, secrets, and custom
scripts intact.
- For replaced content: Write fresh from repository analysis.
- For added content: Follow greenfield per-workflow process.
- Present the full new workflow for review before replacing.
Shared: Workflow structure conventions
Every workflow file follows the same skeleton: explicit name, explicit
on: triggers (never defaults), a least-privilege permissions: block, a
concurrency: group (cancel-in-progress: true, except deploy/release/IaC
workflows — see references/pipeline-patterns.md),
then jobs: whose first step is a SHA-pinned actions/checkout. The CI
templates in references/workflow-templates.md
share this exact header (factored into its "Shared CI header" section); start
from a template rather than reconstructing the skeleton by hand.
Shared: Action version pinning
Always pin actions to full commit SHA (with the version tag as an inline
comment); never use tags or branches. See
references/security-hardening.md
for the rule, rationale, and how to find SHAs.
Shared: Caching strategy
Prefer setup-action caching over raw actions/cache where available —
setup actions handle cache paths and keys automatically from the lockfile:
| Ecosystem |
Cache Method |
| Node.js |
actions/setup-node with cache: 'npm' (or pnpm/yarn) |
| Python |
actions/setup-python with cache: 'pip' (or pipenv/poetry) |
| Go |
actions/setup-go (cache on by default) |
| Rust |
Swatinem/rust-cache (Cargo.lock + rustc version) |
| Java |
actions/setup-java with cache: 'gradle' or 'maven' |
| Ruby |
ruby/setup-ruby with bundler-cache: true |
| Generic |
actions/cache with a custom lockfile-hash key |
See references/pipeline-patterns.md
for cache-key design, Docker layer caching, and the .NET NuGet approach.
Shared: Dependabot configuration
Always recommend adding .github/dependabot.yml to keep both the
github-actions ecosystem and project dependencies updated. Use the canonical
example (with the per-ecosystem id mapping) in
references/workflow-templates.md.
Phase 4: Verify Workflows
After writing, verify every workflow against the codebase and GitHub Actions
best practices.
Verification checklist (all workflows)
Each item pairs a requirement with how to detect a violation:
Additional brownfield verification
Verification method
For each workflow:
- Validate YAML syntax by reading it carefully for indentation and
structure issues
- Check all referenced paths exist in the repository (scripts, config
files, directories)
- Verify action references are valid (action exists, SHA is real)
- Verify commands match the project's actual tools and scripts (check
package.json scripts, Makefile targets, etc.)
- Check secret names match what the project expects (documented in
README or existing workflows)
- Simulate trigger scenarios mentally: what happens on PR, push to
main, tag push, schedule?
- (Brownfield) Compare against original to confirm only planned
changes were made
The "how to detect" hint on each verification checklist item above names the
common errors to look for (unpinned actions, missing permissions, wrong branch
names, dead path filters, wrong commands, missing cache/concurrency, script
injection, hardcoded versions).
Phase 5: Maintenance Strategy
Workflows rot when they fall behind ecosystem changes. Embed maintenance
practices.
Workflow-as-code principles
- Version workflows alongside code. All workflows live in
.github/workflows/.
- Review workflow changes in PRs. Use CODEOWNERS on
.github/ to require
review for workflow changes.
- Keep actions updated. Use Dependabot for GitHub Actions ecosystem updates.
- Delete dead workflows. Unused workflows create confusion and security risk.
- Document non-obvious choices. Inline comments explain WHY, not WHAT.
Automated maintenance (recommend to user)
| Tool |
Purpose |
| Dependabot (github-actions ecosystem) |
Auto-update action versions |
| actionlint |
Lint workflow files for syntax and best practice issues |
CODEOWNERS on .github/ |
Require review for workflow changes |
| OpenSSF Scorecard |
Automated security assessment of CI/CD practices |
| GitHub branch protection |
Require status checks to pass before merge |
Recommend to user
Suggest adding these where relevant:
- Branch protection rules: Require CI to pass before merge
- CODEOWNERS: Protect
.github/ directory
- Dependabot: Keep actions and dependencies updated
- actionlint: Add as a CI step or pre-commit hook
- Environment protection rules: Require approval for production deploys
Failure Recovery
Workflow issue
|
+-> Can't determine project type
| +-> Read more source files and config
| +-> Check build scripts in package.json/Makefile
| +-> Ask user for clarification
|
+-> Conflicting CI config (multiple systems)
| +-> Ask user which system is canonical
| +-> Treat GitHub Actions as target; other as reference
|
+-> Unsure which actions to use
| +-> Prefer official actions (actions/*, github/*)
| +-> For ecosystem tools, use most-adopted community action
| +-> Check references/workflow-templates.md for recommendations
| +-> When in doubt, use raw `run:` commands instead of actions
|
+-> Existing workflows are complex but fragile (brownfield)
| +-> Preserve working logic first
| +-> Never rewrite from scratch unless user requests it
| +-> Fix one issue at a time, verify between changes
|
+-> Monorepo with unclear service boundaries
| +-> Look for workspace configs (package.json workspaces, nx.json, turbo.json)
| +-> Check for independent package.json/go.mod files in subdirectories
| +-> Ask user to confirm service/package boundaries
|
+-> Migration from another CI system
| +-> Map concepts: jobs->jobs, stages->jobs with needs, orbs->reusable workflows
| +-> Not everything maps 1:1 — document gaps
| +-> Prioritize: get CI working first, optimize later
|
+-> Conventions in existing workflows conflict with best practices (brownfield)
+-> Follow existing conventions (consistency > correctness)
+-> Only change conventions if user explicitly requests it
+-> Exception: always fix critical security issues (unpinned actions,
missing permissions, script injection) regardless of convention
Never fabricate action names. If you're unsure an action exists, use a
raw run: command instead. Verify action names against known actions.
Never hardcode secrets. Always reference ${{ secrets.* }}.
Never write workflows you haven't verified. Check every command, path,
and action reference against the actual repository.
Anti-Patterns
Security anti-patterns
- Unpinned actions: Using
@v4 instead of @sha — supply chain attack vector
- Missing permissions: No
permissions: block — defaults to overly broad access
- Script injection: Using
${{ github.event.* }} directly in run: blocks
- Long-lived credentials: Storing AWS/GCP keys as secrets instead of using OIDC
- Fork secret exposure: Running
pull_request_target with checkout of PR code
- Overly broad
GITHUB_TOKEN: Granting write permissions when read suffices
Performance anti-patterns
- No caching: Reinstalling dependencies from scratch every run
- No concurrency groups: Queue buildup on rapid pushes
- Monolithic workflows: One huge workflow instead of parallel jobs
- Unnecessary triggers: Running full CI on docs-only changes
- Missing path filters: Every push triggers every workflow regardless of changes
- Excessive matrix: Testing on 12 OS/version combos when 4 would suffice
Architecture anti-patterns
- Workflow sprawl: 20 small workflow files with overlapping triggers
- Duplicate logic: Same steps copy-pasted across workflows (use reusable workflows)
- Missing
needs:: Jobs that should be sequential running in parallel
- No environment protection: Deploy to production without approval gates
- No Dependabot: Actions and dependencies never updated
Process anti-patterns
- Treating first draft as final: Always verify against the codebase
- Ignoring existing workflows: Not reading current workflows before modifying
- Over-engineering: Adding complex matrix builds for a single-language project
- Premature optimization: Adding self-hosted runners before measuring need
Reference Files
- Repository discovery: See references/repo-discovery.md
for deterministic repository analysis: language detection, ecosystem
identification, deployment target detection, and monorepo discovery
- Workflow templates: See references/workflow-templates.md
for complete YAML templates per ecosystem: Node.js, Python, Go, Rust,
Java, Docker, Terraform, and monorepo configurations
- Security hardening: See references/security-hardening.md
for permissions model, action pinning with current SHAs, OIDC configuration,
secret management, fork protection, and script injection prevention
- Pipeline patterns: See references/pipeline-patterns.md
for CI/CD patterns: caching strategies, matrix builds, concurrency groups,
reusable workflows, monorepo change detection, deployment strategies,
release automation, and scheduled pipelines
1---2name: github-actions3description: GitHub Actions workflow authoring for AI coding agents. Analyzes a repo's project type, language, and deployment targets, then generates production-grade CI/CD workflows with security hardening, caching, and optimization. Handles greenfield, brownfield, and audits. Use when the user requests GitHub Actions workflows: CI pipelines, CD deployments, release automation, or scheduled jobs, or when existing workflows need auditing, optimizing, or hardening. Triggers on phrases like "set up CI", "add CI/CD", "deploy on tag", "publish to npm/PyPI", "harden this pipeline", "pin actions to SHA", "OIDC", or "audit my workflows", and when creating or editing files under `.github/workflows/`, `action.yml`/`action.yaml`, or `.github/dependabot.yml`. Also triggers when migrating from GitLab CI, CircleCI, Travis, Jenkins, or Drone to GitHub Actions. Do NOT use for non-GitHub CI systems unless migrating TO GitHub Actions, or for general bash scripting, Makefiles, or local build config.4---56# GitHub Actions Workflow Authoring78Generate production-grade GitHub Actions workflows from systematic repository9analysis. Every workflow is security-hardened, performance-optimized, and10verified against the codebase.1112## Workflow Router1314Determine the workflow type before starting. This drives which phases apply,15which templates to use, and whether to write from scratch or edit existing16workflows.1718```19Do any GitHub Actions workflows already exist?20 (.github/workflows/*.yml or .github/workflows/*.yaml)21 |22 NO --> GREENFIELD (no workflows exist)23 | Phases: Discover -> Plan -> Write -> Verify24 |25 YES --> What type of change?26 |27 +-> New feature/service needs a pipeline28 | --> WORKFLOW ENHANCEMENT (brownfield)29 | Phases: Discover -> Audit Existing -> Plan (delta) -> Write -> Verify30 |31 +-> Existing workflow needs fixing/updating32 | --> WORKFLOW UPDATE (brownfield)33 | Phases: Discover -> Audit Existing -> Plan (delta) -> Write (edit) -> Verify34 |35 +-> Workflows exist but have security/performance issues36 | --> WORKFLOW AUDIT (brownfield)37 | Phases: Discover -> Audit Existing -> Plan (assessment) -> Write (edit) -> Verify38 |39 +-> User wants a specific workflow rewritten40 | --> TARGETED REWRITE (brownfield)41 | Phases: Discover -> Audit Existing (single workflow) -> Write (replace) -> Verify42 |43 +-> User wants a specific new workflow type44 | --> TARGETED NEW WORKFLOW45 | Phases: Discover -> Write (specific) -> Verify46 |47 +-> Migrating from another CI system48 --> CI MIGRATION49 Phases: Discover -> Audit Source CI -> Plan -> Write -> Verify50```5152**Signal detection:**5354| Signal in request | Likely type |55|-------------------|-------------|56| "Add CI", "add GitHub Actions", "set up CI/CD" (no workflows exist) | Greenfield |57| "Add CI", "add pipeline" (workflows already exist) | Workflow Enhancement |58| "Fix the CI", "workflow is broken", "build fails" | Workflow Update |59| "Workflow is slow", "optimize CI", "reduce build time" | Workflow Audit |60| "Security audit", "harden workflows", "pin actions" | Workflow Audit |61| "Rewrite the CI", "redo the pipeline" | Targeted Rewrite |62| "Add deploy workflow", "add release pipeline" | Targeted New Workflow |63| "Add Docker build", "publish to npm/PyPI" | Targeted New Workflow |64| "Migrate from Jenkins/CircleCI/GitLab" | CI Migration |65| "Add a cron job", "scheduled workflow" | Targeted New Workflow |6667---6869## Phase 0: Discover Repository7071**Always run this phase.** Before writing any workflow, build a complete72picture of the project. See73[references/repo-discovery.md](references/repo-discovery.md) for the full74discovery method.7576### What to detect7778Read README.md/CLAUDE.md and manifest files first, then work through the79deterministic 12-step detection sequence in80[references/repo-discovery.md](references/repo-discovery.md) (with its81file→tool lookup tables) to establish:82831. **Language and ecosystem** and **package manager** (from manifests and84 lockfiles: package.json, pyproject.toml, go.mod, Cargo.toml, pom.xml, etc.)852. **Framework** (Next.js, Django, Spring Boot, Rails, …)863. **Build system** (Webpack, Vite, Turborepo, Nx, Gradle, Maven, Make, …)874. **Test setup** and **lint/format tools** (framework, runner command, config)885. **Containerization** (Dockerfile, docker-compose, Kubernetes manifests)896. **Infrastructure as Code** (Terraform, Pulumi, CloudFormation, CDK)907. **Monorepo signals** (workspace configs, Nx/Turborepo/Lerna)918. **Deployment targets** (cloud/serverless/Vercel/Netlify/Kubernetes config)929. **Existing CI** (`.github/workflows/*.yml`, plus other systems: `.circleci/`,93 Jenkinsfile, `.gitlab-ci.yml`, `.travis.yml`)9410. **Branch and release strategy** (default branch, protected/release95 branches, tags, GitHub Releases, changelogs, version files)9697### Output: Repository Profile9899Compile the detected attributes into a mental model (do not write a file100unless requested) using the Composite Profile format in101[references/repo-discovery.md](references/repo-discovery.md#composite-profile).102This profile drives every subsequent phase.103104---105106## Phase 1: Audit Existing Workflows (Brownfield Only)107108**Skip this phase for greenfield projects.**109110Before planning or writing anything, understand what workflows already exist111and assess their state.112113### Read every existing workflow114115For each `.github/workflows/*.yml` file found in Phase 0:1161171. **Read it fully.** Parse the YAML structure: triggers, permissions, jobs,118 steps, secrets usage, caching, matrix strategies.1192. **Classify its purpose**: CI (test/lint/build), CD (deploy), Release120 (publish/tag), Maintenance (dependabot, stale issues), Scheduled (cron jobs).1213. **Note its conventions**: naming style, job naming, step naming, comment122 style, environment variable patterns.1234. **Assess security posture**: permissions declared? Actions pinned by SHA?124 Secrets handling? Fork protections? OIDC usage?1255. **Assess performance**: caching used? Unnecessary steps? Job parallelism?126 Matrix strategy? Concurrency groups?127128### Existing workflow inventory129130Build a mental inventory:131132```133Existing Workflow Inventory134 [file path] | [purpose] | [triggers] | [security: good/fair/poor] | [performance: good/fair/poor]135 ci.yml | CI | push, PR | fair (unpinned actions) | fair (no caching)136 deploy.yml | CD | push main | good (OIDC, pinned) | good137 ...138```139140### What to preserve in brownfield141142| Content Type | Example | Preserve? |143|-------------|---------|-----------|144| Working trigger logic | Path filters, branch filters | Always |145| Environment-specific secrets | AWS credentials, deploy tokens | Always |146| Custom scripts/steps | Project-specific build logic | Always |147| Concurrency groups | Existing cancel-in-progress logic | Always |148| Job dependencies | Established `needs:` chains | Default yes |149| Unpinned actions | `uses: actions/checkout@v4` | Replace with SHA pin |150| Overly broad permissions | `permissions: write-all` | Replace with least privilege |151| Duplicated logic | Same steps in multiple workflows | Refactor to reusable |152| Dead workflows | Workflows for removed features | Remove |153154**Rule: Working workflows are valuable.** A workflow that runs correctly is155better than a theoretically perfect one that breaks. Preserve working logic156and improve incrementally.157158### Brownfield conventions contract159160Extract the workflow conventions from existing files and follow them:161162- **File naming**: kebab-case? snake_case? What prefix/suffix patterns?163- **Job naming**: How are jobs named? Descriptive or terse?164- **Step naming**: Named steps or anonymous? Style of names?165- **Comment style**: Are inline comments used? YAML comments?166- **Secret naming**: Convention for secret names (SCREAMING_SNAKE, etc.)?167- **Environment patterns**: How environments are used (if at all)?168169**Match existing conventions.** Do NOT impose new conventions on a brownfield170project unless the user explicitly requests a style change.171172---173174## Phase 2: Plan Workflows175176### Greenfield planning177178Derive a complete CI/CD plan from the repository discovery.179180#### Pipeline architecture181182Every project needs at minimum:1831841. **CI workflow** (pull request validation):185 - Lint/format check186 - Type check (if applicable)187 - Unit tests188 - Build verification1891902. **CI workflow** (main branch):191 - Everything in PR CI, plus:192 - Integration tests (if applicable)193 - Artifact building194 - Trigger CD (if applicable)1951963. **CD workflow** (if deployment target exists):197 - Build artifacts/containers198 - Deploy to environments (staging, production)199 - Environment protection rules2002014. **Release workflow** (if library or publishable):202 - Version bumping203 - Package publishing (npm, PyPI, Maven, crates.io)204 - GitHub Release creation2052065. **Maintenance workflows** (recommended):207 - Dependabot configuration208 - Stale issue/PR management209 - Scheduled security scans210211#### Workflow plan algorithm212213Based on the repository profile from Phase 0:214215```216FOR EACH detected language:217 -> Add CI job: setup + install + lint + test + build218 -> Select template from references/workflow-templates.md219220IF Dockerfile exists:221 -> Add Docker build/push job222 -> Select registry (GHCR by default)223224IF IaC files exist:225 -> Add infrastructure validation job (plan on PR, apply on merge)226227IF monorepo detected:228 -> Add change detection job229 -> Make CI jobs conditional on changed paths230 -> See references/pipeline-patterns.md for monorepo patterns231232IF deployment target detected:233 -> Add CD workflow with environment protection234 -> See references/pipeline-patterns.md for deployment patterns235236IF library (not service):237 -> Add release/publish workflow triggered by tags238239ALWAYS:240 -> Apply security hardening (references/security-hardening.md)241 -> Add concurrency groups242 -> Add caching for dependencies243 -> Set explicit permissions (least privilege)244```245246#### Plan output247248```249Workflow Plan250- .github/workflows/ci.yml — CI pipeline (lint, test, build) on PR + push main251- .github/workflows/deploy.yml — Deploy to staging/prod with environment protection252- .github/workflows/release.yml — Publish package on tag push253- .github/dependabot.yml — Dependency update automation254```255256Present the plan to the user for approval before writing.257258### Brownfield planning259260**Use the workflow inventory from Phase 1.** Do NOT plan from scratch. Plan261only what changes.262263#### Workflow Enhancement: Delta plan264265When adding a new workflow to an existing set:2662671. Identify which EXISTING workflows might be affected (shared secrets,268 concurrency groups, deployment targets)2692. Identify the NEW workflow to create2703. For existing workflows, specify ONLY what changes (if anything)271272```273Workflow Delta Plan274- .github/workflows/ci.yml — KEEP (no changes needed)275- .github/workflows/deploy.yml — MODIFY: add staging environment before prod276- .github/workflows/docker.yml — CREATE: Docker build + push to GHCR277```278279#### Workflow Audit: Assessment plan280281When auditing existing workflows for security/performance:2822831. List all issues found in Phase 1 with severity2842. Propose fixes grouped by category (Security > Performance > Maintenance)2853. For each workflow: KEEP (as-is), EDIT (fix issues), REWRITE (replace),286 DELETE (remove dead workflow)2874. Present to user for approval288289```290Audit Findings & Plan291 ci.yml:292 - [Critical] Actions not pinned to SHA → EDIT: pin all actions293 - [High] No permissions declared → EDIT: add least-privilege permissions294 - [Medium] No dependency caching → EDIT: add cache configuration295 deploy.yml:296 - [High] Uses long-lived AWS keys → EDIT: migrate to OIDC297 - [Low] No concurrency group → EDIT: add concurrency298 old-ci.yml:299 - [Low] Duplicate of ci.yml → DELETE300```301302#### Targeted Rewrite: Single-workflow plan303304When the user asks to rewrite a specific workflow:3053061. Read the existing workflow fully (done in Phase 1)3072. Identify what to PRESERVE (working trigger logic, secrets, custom scripts)3083. Identify what to REPLACE (insecure patterns, poor performance, outdated actions)3094. Identify what to ADD (missing security, caching, concurrency)3105. Present the plan311312```313Rewrite Plan: ci.yml314 PRESERVE: Trigger logic (push/PR), test matrix (Node 18/20), deploy job dependency315 REPLACE: Unpinned actions (pin to SHA), npm install (use npm ci + caching),316 missing permissions (add least-privilege)317 ADD: Concurrency group, artifact upload for test reports, type checking step318```319320**Get user approval before rewriting.**321322#### CI Migration plan323324When migrating from another CI system:3253261. Read the source CI config (.circleci/config.yml, Jenkinsfile, .gitlab-ci.yml)3272. Map each job/stage to a GitHub Actions equivalent3283. Identify feature gaps (some CI features don't map 1:1)3294. Plan the migration as a set of new workflows330331```332Migration Plan: CircleCI → GitHub Actions333 CircleCI build job → .github/workflows/ci.yml (lint + test + build)334 CircleCI deploy job → .github/workflows/deploy.yml (with environment protection)335 CircleCI scheduled scan → .github/workflows/security.yml (cron schedule)336 Gap: CircleCI orbs used → Replace with equivalent GitHub Actions337```338339Present the plan to the user for approval before writing.340341---342343## Phase 3: Write Workflows344345### Greenfield: Write from scratch346347Write each planned workflow using the appropriate template and security rules.348See [references/workflow-templates.md](references/workflow-templates.md) for349ecosystem-specific templates.350See [references/security-hardening.md](references/security-hardening.md) for351security rules.352See [references/pipeline-patterns.md](references/pipeline-patterns.md) for353CI/CD patterns.354355#### Writing sequence356357Write workflows in this order:3583591. **CI workflow** first (validates that the build/test pipeline works)3602. **CD workflow** (deployment depends on CI)3613. **Release workflow** (publishing depends on build)3624. **Maintenance workflows** (dependabot, security scans)363364#### Per-workflow process (greenfield)365366For each workflow:3673681. **Select template**: Choose from references/workflow-templates.md based369 on language/ecosystem detected in Phase 0.3702. **Customize for project**: Replace template placeholders with actual371 commands, paths, versions from the repository profile.3723. **Apply security hardening**: Follow every rule in373 references/security-hardening.md:374 - Set explicit `permissions:` (least privilege)375 - Pin all actions to full SHA376 - Use OIDC for cloud auth where possible377 - Protect secrets from fork exposure378 - Guard against script injection3794. **Add performance optimization**:380 - Add dependency caching (use setup action's built-in cache where available)381 - Add concurrency groups to cancel stale runs382 - Use matrix strategy for multi-version testing383 - Add path filters to avoid unnecessary runs3845. **Verify YAML syntax**: Ensure valid YAML, proper indentation, correct385 GitHub Actions syntax.3866. **Add inline comments**: Explain non-obvious choices (why a specific387 SHA, why a particular cache key, why a permission).388389### Brownfield: Edit existing workflows390391**Read before writing.** For every workflow you modify, read it fully first392(already done in Phase 1). Never modify a workflow you haven't read.393394#### Per-workflow process (brownfield)395396For each workflow being modified:3973981. **Re-read the workflow.** Confirm your understanding from Phase 1.3992. **Apply only planned changes.** Follow the delta plan from Phase 2.400 Do NOT restructure, restyle, or "improve" sections outside scope.4013. **Match existing conventions.** Use the same naming style, comment style,402 and patterns discovered in Phase 1.4034. **Preserve working logic.** Trigger conditions, environment variables,404 secrets references, and custom scripts survive unless explicitly marked405 for change.4065. **Verify every edit.** Each changed action version, command, or path must407 be verified against the codebase.4086. **Minimize diff.** Change only what needs changing. Smaller diffs are409 easier to review.410411#### Brownfield-specific rules412413- **Edit, don't rewrite.** Unless the user requests a rewrite, modify the414 existing workflow surgically. Fix the specific issues; leave working415 steps alone.416- **Match existing style.** If existing workflows use `name: Build and Test`417 for jobs, continue that pattern. Do NOT switch to `name: build-and-test`418 because you prefer it.419- **Preserve structure.** Keep the existing job ordering unless it's part of420 the planned changes.421- **Never silently remove steps.** If a step needs removal, note it in your422 plan and confirm with the user. A step that looks unnecessary may have423 a non-obvious purpose.424- **Refactor only what you're asked to change.** Do NOT improve adjacent425 workflows, fix unrelated issues, or add features not in the plan.426427#### Targeted Rewrite process428429When rewriting a specific workflow (user explicitly requested):4304311. **Create from the approved plan.** Write the new version using the432 PRESERVE/REPLACE/ADD breakdown from Phase 2.4332. **Start from the template** in references/workflow-templates.md, then434 transplant preserved logic into the new structure.4353. **For preserved content**: Keep trigger logic, secrets, and custom436 scripts intact.4374. **For replaced content**: Write fresh from repository analysis.4385. **For added content**: Follow greenfield per-workflow process.4396. **Present the full new workflow for review** before replacing.440441### Shared: Workflow structure conventions442443Every workflow file follows the same skeleton: explicit `name`, explicit444`on:` triggers (never defaults), a least-privilege `permissions:` block, a445`concurrency:` group (`cancel-in-progress: true`, except deploy/release/IaC446workflows — see [references/pipeline-patterns.md](references/pipeline-patterns.md)),447then `jobs:` whose first step is a SHA-pinned `actions/checkout`. The CI448templates in [references/workflow-templates.md](references/workflow-templates.md)449share this exact header (factored into its "Shared CI header" section); start450from a template rather than reconstructing the skeleton by hand.451452### Shared: Action version pinning453454**Always pin actions to full commit SHA** (with the version tag as an inline455comment); never use tags or branches. See456[references/security-hardening.md](references/security-hardening.md#action-pinning)457for the rule, rationale, and how to find SHAs.458459### Shared: Caching strategy460461**Prefer setup-action caching over raw `actions/cache` where available** —462setup actions handle cache paths and keys automatically from the lockfile:463464| Ecosystem | Cache Method |465|-----------|-------------|466| Node.js | `actions/setup-node` with `cache: 'npm'` (or `pnpm`/`yarn`) |467| Python | `actions/setup-python` with `cache: 'pip'` (or `pipenv`/`poetry`) |468| Go | `actions/setup-go` (cache on by default) |469| Rust | `Swatinem/rust-cache` (Cargo.lock + rustc version) |470| Java | `actions/setup-java` with `cache: 'gradle'` or `'maven'` |471| Ruby | `ruby/setup-ruby` with `bundler-cache: true` |472| Generic | `actions/cache` with a custom lockfile-hash key |473474See [references/pipeline-patterns.md](references/pipeline-patterns.md#caching-strategies)475for cache-key design, Docker layer caching, and the .NET NuGet approach.476477### Shared: Dependabot configuration478479Always recommend adding `.github/dependabot.yml` to keep both the480`github-actions` ecosystem and project dependencies updated. Use the canonical481example (with the per-ecosystem id mapping) in482[references/workflow-templates.md](references/workflow-templates.md#dependabot-configuration).483484---485486## Phase 4: Verify Workflows487488After writing, verify every workflow against the codebase and GitHub Actions489best practices.490491### Verification checklist (all workflows)492493Each item pairs a requirement with how to detect a violation:494495- [ ] **Valid YAML**: proper indentation, no syntax errors496- [ ] **Triggers correct**: events match intent; watch for `on: push` without a497 branch filter (runs on every push)498- [ ] **Permissions declared**: explicit `permissions:` at workflow or job level499 — a missing block defaults to overly broad access500- [ ] **Least privilege**: no unnecessary write permissions501- [ ] **Actions pinned**: every `uses:` is a full SHA — flag any `@vN` or branch ref502- [ ] **Commands exist**: every `run:` references valid scripts/tools/paths, and503 matches the project's actual tooling (e.g. not `npm test` when the project uses `pnpm`)504- [ ] **Secrets referenced correctly**: all `${{ secrets.* }}` names exist; no505 hardcoded credentials in the file506- [ ] **Caching configured**: dependencies cached where possible — flag a setup507 action used without its `cache:` parameter508- [ ] **Concurrency set**: a `concurrency:` group is present (missing → queue buildup)509- [ ] **Branch filters correct**: triggers reference the real default branch (e.g.510 not `master` when default is `main`)511- [ ] **Path filters appropriate**: `paths:` reference directories that actually exist512- [ ] **Matrix strategy sensible**: tested versions current; language/tool versions513 come from the matrix or config, not hardcoded514- [ ] **Artifact handling correct**: upload/download artifact names are consistent515- [ ] **Environment protection**: deploy jobs reference proper environments516- [ ] **No script injection**: untrusted `${{ github.event.* }}` input is never used517 directly in `run:` blocks518519### Additional brownfield verification520521- [ ] **Preserved logic intact**: Trigger conditions, secrets, and custom522 scripts from existing workflows were not lost523- [ ] **Conventions maintained**: Naming, commenting, and structure style524 match the rest of the existing workflows525- [ ] **No unplanned changes**: Only the sections identified in the delta526 plan were modified527- [ ] **No steps silently removed**: Every removal was in the approved plan528- [ ] **Diff is minimal**: Changes are surgical, not a full rewrite529 (unless Targeted Rewrite was the chosen workflow type)530531### Verification method532533For each workflow:5345351. **Validate YAML syntax** by reading it carefully for indentation and536 structure issues5372. **Check all referenced paths** exist in the repository (scripts, config538 files, directories)5393. **Verify action references** are valid (action exists, SHA is real)5404. **Verify commands** match the project's actual tools and scripts (check541 package.json scripts, Makefile targets, etc.)5425. **Check secret names** match what the project expects (documented in543 README or existing workflows)5446. **Simulate trigger scenarios** mentally: what happens on PR, push to545 main, tag push, schedule?5467. **(Brownfield) Compare against original** to confirm only planned547 changes were made548549The "how to detect" hint on each verification checklist item above names the550common errors to look for (unpinned actions, missing permissions, wrong branch551names, dead path filters, wrong commands, missing cache/concurrency, script552injection, hardcoded versions).553554---555556## Phase 5: Maintenance Strategy557558Workflows rot when they fall behind ecosystem changes. Embed maintenance559practices.560561### Workflow-as-code principles562563- **Version workflows alongside code.** All workflows live in `.github/workflows/`.564- **Review workflow changes in PRs.** Use CODEOWNERS on `.github/` to require565 review for workflow changes.566- **Keep actions updated.** Use Dependabot for GitHub Actions ecosystem updates.567- **Delete dead workflows.** Unused workflows create confusion and security risk.568- **Document non-obvious choices.** Inline comments explain WHY, not WHAT.569570### Automated maintenance (recommend to user)571572| Tool | Purpose |573|------|---------|574| Dependabot (github-actions ecosystem) | Auto-update action versions |575| actionlint | Lint workflow files for syntax and best practice issues |576| CODEOWNERS on `.github/` | Require review for workflow changes |577| OpenSSF Scorecard | Automated security assessment of CI/CD practices |578| GitHub branch protection | Require status checks to pass before merge |579580### Recommend to user581582Suggest adding these where relevant:5835841. **Branch protection rules**: Require CI to pass before merge5852. **CODEOWNERS**: Protect `.github/` directory5863. **Dependabot**: Keep actions and dependencies updated5874. **actionlint**: Add as a CI step or pre-commit hook5885. **Environment protection rules**: Require approval for production deploys589590---591592## Failure Recovery593594```595Workflow issue596 |597 +-> Can't determine project type598 | +-> Read more source files and config599 | +-> Check build scripts in package.json/Makefile600 | +-> Ask user for clarification601 |602 +-> Conflicting CI config (multiple systems)603 | +-> Ask user which system is canonical604 | +-> Treat GitHub Actions as target; other as reference605 |606 +-> Unsure which actions to use607 | +-> Prefer official actions (actions/*, github/*)608 | +-> For ecosystem tools, use most-adopted community action609 | +-> Check references/workflow-templates.md for recommendations610 | +-> When in doubt, use raw `run:` commands instead of actions611 |612 +-> Existing workflows are complex but fragile (brownfield)613 | +-> Preserve working logic first614 | +-> Never rewrite from scratch unless user requests it615 | +-> Fix one issue at a time, verify between changes616 |617 +-> Monorepo with unclear service boundaries618 | +-> Look for workspace configs (package.json workspaces, nx.json, turbo.json)619 | +-> Check for independent package.json/go.mod files in subdirectories620 | +-> Ask user to confirm service/package boundaries621 |622 +-> Migration from another CI system623 | +-> Map concepts: jobs->jobs, stages->jobs with needs, orbs->reusable workflows624 | +-> Not everything maps 1:1 — document gaps625 | +-> Prioritize: get CI working first, optimize later626 |627 +-> Conventions in existing workflows conflict with best practices (brownfield)628 +-> Follow existing conventions (consistency > correctness)629 +-> Only change conventions if user explicitly requests it630 +-> Exception: always fix critical security issues (unpinned actions,631 missing permissions, script injection) regardless of convention632```633634**Never fabricate action names.** If you're unsure an action exists, use a635raw `run:` command instead. Verify action names against known actions.636637**Never hardcode secrets.** Always reference `${{ secrets.* }}`.638639**Never write workflows you haven't verified.** Check every command, path,640and action reference against the actual repository.641642---643644## Anti-Patterns645646### Security anti-patterns647- **Unpinned actions**: Using `@v4` instead of `@sha` — supply chain attack vector648- **Missing permissions**: No `permissions:` block — defaults to overly broad access649- **Script injection**: Using `${{ github.event.* }}` directly in `run:` blocks650- **Long-lived credentials**: Storing AWS/GCP keys as secrets instead of using OIDC651- **Fork secret exposure**: Running `pull_request_target` with checkout of PR code652- **Overly broad `GITHUB_TOKEN`**: Granting write permissions when read suffices653654### Performance anti-patterns655- **No caching**: Reinstalling dependencies from scratch every run656- **No concurrency groups**: Queue buildup on rapid pushes657- **Monolithic workflows**: One huge workflow instead of parallel jobs658- **Unnecessary triggers**: Running full CI on docs-only changes659- **Missing path filters**: Every push triggers every workflow regardless of changes660- **Excessive matrix**: Testing on 12 OS/version combos when 4 would suffice661662### Architecture anti-patterns663- **Workflow sprawl**: 20 small workflow files with overlapping triggers664- **Duplicate logic**: Same steps copy-pasted across workflows (use reusable workflows)665- **Missing `needs:`**: Jobs that should be sequential running in parallel666- **No environment protection**: Deploy to production without approval gates667- **No Dependabot**: Actions and dependencies never updated668669### Process anti-patterns670- **Treating first draft as final**: Always verify against the codebase671- **Ignoring existing workflows**: Not reading current workflows before modifying672- **Over-engineering**: Adding complex matrix builds for a single-language project673- **Premature optimization**: Adding self-hosted runners before measuring need674675---676677## Reference Files678679- **Repository discovery**: See [references/repo-discovery.md](references/repo-discovery.md)680 for deterministic repository analysis: language detection, ecosystem681 identification, deployment target detection, and monorepo discovery682- **Workflow templates**: See [references/workflow-templates.md](references/workflow-templates.md)683 for complete YAML templates per ecosystem: Node.js, Python, Go, Rust,684 Java, Docker, Terraform, and monorepo configurations685- **Security hardening**: See [references/security-hardening.md](references/security-hardening.md)686 for permissions model, action pinning with current SHAs, OIDC configuration,687 secret management, fork protection, and script injection prevention688- **Pipeline patterns**: See [references/pipeline-patterns.md](references/pipeline-patterns.md)689 for CI/CD patterns: caching strategies, matrix builds, concurrency groups,690 reusable workflows, monorepo change detection, deployment strategies,691 release automation, and scheduled pipelines