gj-env-deploy-assist

Plan, verify, and guide GitLab dev/test environment deployments with branch rules, environment locks, version records, rollback notes, and human confirmation. Use when a human asks whether a branch or MR can deploy to dev, shared test, staging, or another non-production environment, especially when only one shared test environment exists.

thelastmagician/gj-gitlab-ai-workflow1 installsMITSynced Aug 27

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: gj-env-deploy-assist
description: Plan, verify, and guide GitLab dev/test environment deployments with branch rules, environment locks, version records, rollback notes, and human confirmation. Use when a human asks whether a branch or MR can deploy to dev, shared test, staging, or another non-production environment, especially when only one shared test environment exists.
license: MIT
---

# GJ Env Deploy Assist

## Overview

Guide environment deployment decisions without assuming every project has multiple test environments. Keep dev fast, keep shared test stable, and require human confirmation before overwriting shared environments.

## Environment Policy

- Dev environments may be automatic if the project supports them.
- MR branches may deploy to isolated dev/review environments, not to shared test by default.
- Shared test/staging environments must be manual or queued.
- Shared environments must use an environment lock such as GitLab `resource_group`.
- Every shared environment deployment must record branch, commit SHA, MR, pipeline, deployer, time, and rollback target.
- AI may prepare or execute deployment commands only after explicit human authorization and project policy checks.
- Do not deploy to production from this skill. Route production release work to `gj-release-prep`.

## Branch Rules

Use these defaults unless the repository documents a stricter policy:

| Source | Dev deploy | Shared test deploy |
| --- | --- | --- |
| MR / feature branch | automatic only to isolated `dev/<ref>` or review app | no automatic deploy |
| `develop` / `integration` | automatic or manual dev deploy | manual deploy with lock |
| `release/*` | optional dev deploy | manual deploy with lock |
| tag / protected release | not required | manual deploy, release-gated |

## Workflow

1. Identify environment target: dev, review, test, staging, or production.
2. Identify source: branch, MR, tag, commit SHA, and latest pipeline.
3. Load project environment docs if present: `docs/standards/*environment*`, `docs/cicd.md`, `.gitlab-ci.yml`, deploy scripts, and release Issue.
4. For dev/review:
   - Confirm whether isolated environment naming exists.
   - Check latest pipeline/build status.
   - Allow automatic deployment only if CI rules already permit it.
5. For shared test/staging:
   - Check current occupant or last deployed version when available.
   - Check whether `resource_group` or another lock protects the environment.
   - Require explicit human confirmation before deploy.
   - Record rollback target before deploy.
6. If authorization is missing, output readiness and required confirmation.
7. Check documentation impact:
   - Update release note or deployment record when shared test/staging is
     overwritten.
   - Link test report or QA window for shared environment validation.
   - Update environment standard if the project discovers a new deploy rule.
8. If authorization is present and checks pass, execute only the project-approved deploy command or GitLab manual job trigger.
9. After deploy, report deployed version and follow-up QA/recovery actions.

## Readiness Output

```markdown
## Environment Deploy Readiness

Target environment:
Source:
Decision:

Checks:
- Pipeline/build:
- Environment type:
- Isolation:
- Lock/resource group:
- Current deployed version:
- Rollback target:
- Documentation impact:
- Human confirmation:
- Risk:

Recommended action:
Required confirmation:
```

`Decision` must be one of:

- `auto_dev_allowed`
- `manual_test_confirmation_required`
- `ready_after_human_confirmation`
- `deployed_after_explicit_human_authorization`
- `blocked_by_environment_policy`

## Explicit Confirmation

For shared test/staging, require wording that names target and source:

```text
Confirm deploy MR !12 commit <sha> to test.
Confirm deploy branch develop to test.
```

Ambiguous wording such as `deploy it if ready` is not enough.

## GitLab CI Guidance

Use `resource_group` for shared environments:

```yaml
deploy_test:
  stage: deploy
  when: manual
  resource_group: test-env
  environment:
    name: test
```

Use isolated environment names for MR/review dev deploys:

```yaml
deploy_dev:
  stage: deploy
  environment:
    name: dev/$CI_COMMIT_REF_SLUG
```

## References

Read `references/environment-policy.md` for the recommended GitLab CI pattern and deployment records.

More Deployment & CI/CD skills

finetuning

microsoft/azure-skills

Fine-tune models on Microsoft Foundry using SFT (supervised), DPO (preference), or RFT (reinforcement with graders). Covers dataset preparation, training job submission, deployment, and evaluation. USE FOR: fine-tune, SFT, DPO, RFT, training data, grader, distillation, fine-tuned model, training job, large file upload, calibrate grader, deploy fine-tuned model, evaluate fine-tuned model. DO NOT USE FOR: general model deployment without fine-tuning (use deploy-model), agent creation (use agents), prompt optimization without training (use prompt-optimizer).

323.2k

prisma-compute

prisma/skills

Prisma Compute deployment and hosting guide. Use whenever the user mentions Prisma Compute, `prisma.compute.ts`, `defineComputeConfig`, deploying or hosting a Prisma app, `@prisma/cli app deploy`, `compute:deploy`, `create-prisma --deploy`, `PRISMA_SERVICE_TOKEN`, Compute auth/workspaces, apps/deployments/build logs/domains, localhost vs `0.0.0.0`, deploy port binding, or framework deploy readiness for Hono, Elysia, Next.js, TanStack Start, Astro, Nuxt, Svelte, Nest, Turborepo, or custom/prebuilt artifacts.

231.4k

azure-quotas

microsoft/azure-skills

Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: \"check quotas\", \"service limits\", \"current usage\", \"request quota increase\", \"quota exceeded\", \"validate capacity\", \"regional availability\", \"provisioning limits\", \"vCPU limit\", \"how many vCPUs available in my subscription\".

187.6k

← All Deployment & CI/CD skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY