Deliver to a non-production environment
Use $deliver-to stage (or another project-defined environment) to name the
target. Resolve that name through the project runbook; it is not automatically a
Git branch or deployment command.
Resolve the project contract
Read applicable AGENTS.md instructions and follow the Environment delivery,
Verification, and hosting-access runbook pointers (for example, GitLab access). Paths are project-defined;
direct project instructions or explicit user inputs can supply the same contract.
Obtain:
- environment names and their target refs/remotes;
- whether targets accumulate changes, and the permitted integration method;
- required preflight commands, target build configuration, and resource limits;
- automatic/manual pipeline behavior, required build/deploy jobs, and how to
identify the deployed revision;
- runtime acceptance requirements and any authorized task-tracker handoff;
- the permitted worktree location.
Check these inputs against current repository/CI configuration. Missing or
contradictory information blocks only its dependent steps: name the exact gap and
continue safe diagnostics. Never guess an environment ref, build command, deploy
job, or a policy exemption. This skill does not establish shared environment
branches, Docker preflights, a memory budget, or lean verification as company-wide
requirements.
Scope
Deliver into existing target history using a normal merge or scoped cherry-pick.
Preserve existing target changes. Resetting/repointing a target to feature HEAD or
force-pushing is outside this workflow. If project topology requires a different
mechanism, report the mismatch before mutation. Production delivery is outside
this skill.
An explicit request to deliver to a named environment authorizes necessary local
integration, required preflight, normal push, and observing deployment within that
scope. Execute the requested delivery without an additional plan-approval pause.
Follow declared authorization for manual pipeline/deployment actions.
Unrelated targets and source changes remain outside scope. Task-tracker mutations
follow the project's separate workflow and authorization; deployment alone does
not authorize closing an issue.
Worktree lifecycle
Inspect refs/history/diffs without creating a checkout. Reuse an existing suitable
checkout only when clean, free and compatible with task ownership. When separate
files are needed for execution, create a temporary worktree at the project/machine
permitted location; a temporary path does not replace explicit removal. Do not
make a long-lived checkout depend on temporary dependencies or configuration.
A reused checkout is borrowed, not disposable: preserve its original state and
restore any temporary checkout selection after the operation without discarding
concurrent changes. Remove only temporary worktrees created by this operation.
Creating a temporary worktree includes cleaning it up in this operation, without
a separate approval for the agent's own disposable artifacts once useful work is
retained or reproducible. Remove it before the final report using Git worktree
removal without force, or the runtime's supported managed-worktree lifecycle.
Move to a surviving directory first. On failure/interruption, remove reproducible
temporary artifacts when possible; preserve irreplaceable work and report the
specific reason and location of any remainder. Never silently discard valuable
files or bypass a removal refusal. No background cleanup is implied.
Procedure
- Resolve the requested source SHA/commit range and named targets. Fetch current
refs. Record source and target SHAs, check whether changes are already delivered,
and preserve dirty worktrees. Choose a suitable existing checkout or a temporary
target worktree only when execution needs separate files, following the lifecycle above.
- State source -> target topology before branch mutation. Prefer a normal merge
when the complete source-only scope is intended. Inspect commits and diff;
divergence alone is not an error. Use cherry-pick when only identified commits
are authorized or merging would import unrelated history. Record the ordered
commit list and dependencies. Pause if scope or conflict resolution is unclear.
- Prepare the candidate from the current target. Preserve existing target changes
and intended source behavior; inspect the delivery diff and conflict resolutions.
For merge, check source ancestry. For cherry-pick, map original to resulting
commits and verify patch/content equivalence instead of expecting original SHAs
to become ancestors.
- Perform the project's required preflight on the integrated candidate with the
target configuration. If a build is required, enforce the declared resource
limits on the actual workers before starting. Record SHA/tree, command, build
inputs, result, and enforced limits. Reuse evidence only for matching relevant
content, inputs and configuration. Failed required checks or unavailable required
enforcement block publication.
- Follow the project's verification policy. A lean delivery policy may reuse
earlier unit/lint/typecheck evidence and omit an automatic full verification
pass; it must be explicitly selected by the project. Even then, integration
edits/conflicts or unresolved risks require proportionate additional checks.
Missing policy is not permission to skip preflight or essential verification.
- Recheck the remote target before a normal push. If it advanced, integrate its
new state and reassess candidate/preflight evidence; never overwrite concurrent
work. Push only requested targets and verify remote SHAs. Preserve source history.
- Waiting for CI alone does not require retaining a checkout; remove a completed
temporary delivery worktree once its useful work is retained. Locate the pipeline for the exact pushed SHA AND target ref using the project's
access procedure. Observe required build/deploy jobs from that revision. For
automatic delivery, wait for its pipeline rather than starting a duplicate.
Execute manual steps only within declared authorization. Push, pipeline creation,
and image build do not prove deployment. Report missing/manual/failed/cancelled
jobs or superseding deliveries; an older successful pipeline is not evidence.
- Apply project runtime acceptance requirements after deployment. If the project
explicitly uses a lean workflow without runtime checks, report runtime as
unverified. Otherwise obtain required runtime evidence or report delivery as
deployed with acceptance incomplete. Follow the separate task-tracker workflow
only when its prerequisites and authorization are satisfied.
- Report each target, delivered SHA, merge/cherry-pick mapping, preflight results,
pipeline/deploy evidence, runtime acceptance, and tracker updates separately.
One environment's success does not prove another. Do not claim deployment while
it is pending or product acceptance based solely on a successful deploy job.
1---2name: deliver-to3description: Deliver a branch or selected commits to a non-production environment using merge or scoped cherry-pick, required preflight checks, push, and deployment tracking. Use when asked to update a development, test, or staging environment while preserving its existing changes.4metadata:5 source: https://skillmd.com/skills/gertyhiler/deliver-to6---78# Deliver to a non-production environment910Use `$deliver-to stage` (or another project-defined environment) to name the11target. Resolve that name through the project runbook; it is not automatically a12Git branch or deployment command.1314## Resolve the project contract1516Read applicable `AGENTS.md` instructions and follow the **Environment delivery**,17**Verification**, and hosting-access runbook pointers (for example, **GitLab access**). Paths are project-defined;18direct project instructions or explicit user inputs can supply the same contract.19Obtain:2021- environment names and their target refs/remotes;22- whether targets accumulate changes, and the permitted integration method;23- required preflight commands, target build configuration, and resource limits;24- automatic/manual pipeline behavior, required build/deploy jobs, and how to25 identify the deployed revision;26- runtime acceptance requirements and any authorized task-tracker handoff;27- the permitted worktree location.2829Check these inputs against current repository/CI configuration. Missing or30contradictory information blocks only its dependent steps: name the exact gap and31continue safe diagnostics. Never guess an environment ref, build command, deploy32job, or a policy exemption. This skill does not establish shared environment33branches, Docker preflights, a memory budget, or lean verification as company-wide34requirements.3536## Scope3738Deliver into existing target history using a normal merge or scoped cherry-pick.39Preserve existing target changes. Resetting/repointing a target to feature HEAD or40force-pushing is outside this workflow. If project topology requires a different41mechanism, report the mismatch before mutation. Production delivery is outside42this skill.4344An explicit request to deliver to a named environment authorizes necessary local45integration, required preflight, normal push, and observing deployment within that46scope. Execute the requested delivery without an additional plan-approval pause.47Follow declared authorization for manual pipeline/deployment actions.48Unrelated targets and source changes remain outside scope. Task-tracker mutations49follow the project's separate workflow and authorization; deployment alone does50not authorize closing an issue.5152## Worktree lifecycle5354Inspect refs/history/diffs without creating a checkout. Reuse an existing suitable55checkout only when clean, free and compatible with task ownership. When separate56files are needed for execution, create a temporary worktree at the project/machine57permitted location; a temporary path does not replace explicit removal. Do not58make a long-lived checkout depend on temporary dependencies or configuration.59A reused checkout is borrowed, not disposable: preserve its original state and60restore any temporary checkout selection after the operation without discarding61concurrent changes. Remove only temporary worktrees created by this operation.6263Creating a temporary worktree includes cleaning it up in this operation, without64a separate approval for the agent's own disposable artifacts once useful work is65retained or reproducible. Remove it before the final report using Git worktree66removal without force, or the runtime's supported managed-worktree lifecycle.67Move to a surviving directory first. On failure/interruption, remove reproducible68temporary artifacts when possible; preserve irreplaceable work and report the69specific reason and location of any remainder. Never silently discard valuable70files or bypass a removal refusal. No background cleanup is implied.7172## Procedure73741. Resolve the requested source SHA/commit range and named targets. Fetch current75 refs. Record source and target SHAs, check whether changes are already delivered,76 and preserve dirty worktrees. Choose a suitable existing checkout or a temporary77 target worktree only when execution needs separate files, following the lifecycle above.782. State source -> target topology before branch mutation. Prefer a normal merge79 when the complete source-only scope is intended. Inspect commits and diff;80 divergence alone is not an error. Use cherry-pick when only identified commits81 are authorized or merging would import unrelated history. Record the ordered82 commit list and dependencies. Pause if scope or conflict resolution is unclear.833. Prepare the candidate from the current target. Preserve existing target changes84 and intended source behavior; inspect the delivery diff and conflict resolutions.85 For merge, check source ancestry. For cherry-pick, map original to resulting86 commits and verify patch/content equivalence instead of expecting original SHAs87 to become ancestors.884. Perform the project's required preflight on the integrated candidate with the89 target configuration. If a build is required, enforce the declared resource90 limits on the actual workers before starting. Record SHA/tree, command, build91 inputs, result, and enforced limits. Reuse evidence only for matching relevant92 content, inputs and configuration. Failed required checks or unavailable required93 enforcement block publication.945. Follow the project's verification policy. A lean delivery policy may reuse95 earlier unit/lint/typecheck evidence and omit an automatic full verification96 pass; it must be explicitly selected by the project. Even then, integration97 edits/conflicts or unresolved risks require proportionate additional checks.98 Missing policy is not permission to skip preflight or essential verification.996. Recheck the remote target before a normal push. If it advanced, integrate its100 new state and reassess candidate/preflight evidence; never overwrite concurrent101 work. Push only requested targets and verify remote SHAs. Preserve source history.1027. Waiting for CI alone does not require retaining a checkout; remove a completed103 temporary delivery worktree once its useful work is retained. Locate the pipeline for the exact pushed SHA AND target ref using the project's104 access procedure. Observe required build/deploy jobs from that revision. For105 automatic delivery, wait for its pipeline rather than starting a duplicate.106 Execute manual steps only within declared authorization. Push, pipeline creation,107 and image build do not prove deployment. Report missing/manual/failed/cancelled108 jobs or superseding deliveries; an older successful pipeline is not evidence.1098. Apply project runtime acceptance requirements after deployment. If the project110 explicitly uses a lean workflow without runtime checks, report runtime as111 unverified. Otherwise obtain required runtime evidence or report delivery as112 deployed with acceptance incomplete. Follow the separate task-tracker workflow113 only when its prerequisites and authorization are satisfied.1149. Report each target, delivered SHA, merge/cherry-pick mapping, preflight results,115 pipeline/deploy evidence, runtime acceptance, and tracker updates separately.116 One environment's success does not prove another. Do not claim deployment while117 it is pending or product acceptance based solely on a successful deploy job.