/adlc:canary Optional repo id (from .adlc/config.yml) or service name — auto-detected from current worktree if omittedfrom adlc
Deploys a zero-traffic revision to Cloud Run, runs health checks, and promotes on success. Use for canary deployments and smoke testing before going live.
Ships in adlc. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are deploying code through a canary process: deploy a zero-traffic revision, verify it works, then promote to live traffic. This prevents broken deploys from reaching users.
!test -s .adlc/ETHOS.md && cat .adlc/ETHOS.md || echo No ethos found — run /init, or /adlc:init on the plugin install, to vendor .adlc/ETHOS.md
Run this block first, with your shell tool, and read its output before you continue. Each read prints a notice instead of failing when its file is absent.
# adlc-context
echo '--- Current directory'
pwd
echo '--- Current branch'
git branch --show-current 2>/dev/null || echo 'Not a git repo'
echo '--- GCP project'
gcloud config get-value project 2>/dev/null || echo 'No GCP project configured'
echo '--- Active Cloud Run services'
gcloud run services list --format="table(SERVICE,REGION,URL)" 2>/dev/null || echo 'gcloud not configured'
The target is the argument: whatever follows /canary in the invocation (on Claude Code it can also arrive as an ARGUMENTS: line appended to this text), a repo id or a Cloud Run service name. With none, Service Resolution below detects it from the current directory.
gcloud CLI must be authenticated and configured with the correct projectService configuration lives in .adlc/config.yml in the primary repo under a services: block, keyed by repo id. This is the single source of truth — no service names, regions, or image paths should be hardcoded in this skill.
Expected config shape (primary repo .adlc/config.yml):
repos:
api:
path: ../api
web:
path: ../web
services:
api:
cloud_run_service: api
region: us-central1
image_path: us-central1-docker.pkg.dev/<gcp-project>/api/api
web:
cloud_run_service: web
region: us-central1
image_path: us-central1-docker.pkg.dev/<gcp-project>/web/web
Resolution order:
repos: in the primary's config, look up services[<repo-id>] and use that. If the repo id has no services: entry, stop and ask the user to add one.api and it matches services.*.cloud_run_service), use that entry.repos[*].path (resolve each to an absolute path first). Then look up its service..adlc/config.yml (single-repo legacy setup) AND the current repo has a top-level Dockerfile and a single Cloud Run service name that matches the repo basename, fall back to auto-detection: service name = repo basename, region = us-central1, image path = $(gcloud config get-value project)/<service>. Surface this fallback in the logs so the user knows it's being inferred.services: block to .adlc/config.yml or pass the service name as an argument."Operating worktree: if the resolved repo has a feature-branch worktree (e.g., .worktrees/REQ-xxx) that matches the current /proceed pipeline, build from inside that worktree. Otherwise build from the repo's main checkout. The caller can also pass the worktree path explicitly.
Note (post-REQ-380, REQ-381): /canary is no longer auto-invoked from /proceed (REQ-380) or /bugfix (REQ-381). Operators run it manually when a production canary is needed.
git rev-parse --short HEAD)docker build -t <IMAGE_PATH>:canary-<SHA> ./<subdir if needed>
docker push <IMAGE_PATH>:canary-<SHA>
If the user says "use latest" or the image was already built by CI, skip the build and use the :latest tag from Artifact Registry.
Deploy a new revision that receives NO traffic:
gcloud run deploy <SERVICE_NAME> \
--image=<IMAGE_PATH>:canary-<SHA> \
--region=us-central1 \
--no-traffic \
--tag=canary \
--format="json"
This creates a tagged revision accessible at https://canary---<SERVICE_NAME>-<hash>.a.run.app without affecting production traffic.
Capture the canary URL from the output.
Run basic health checks against the canary URL:
Liveness: curl -s -o /dev/null -w "%{http_code}" <CANARY_URL>/health
200Readiness: curl -s -o /dev/null -w "%{http_code}" <CANARY_URL>/api/health
200 (or the service's documented readiness endpoint)If health checks fail after 3 retries, go to Step 6 (Rollback).
Run smoke tests against the canary URL. Load test definitions from the primary repo's .adlc/context/smoke-tests.md if it exists, otherwise use defaults. In cross-repo mode the primary's smoke-tests.md is the authoritative source for every service — sibling repos do not need their own copy.
Default smoke tests (API services):
GET /health -> 200
GET /api/health -> 200
Custom smoke tests (from .adlc/context/smoke-tests.md):
Each entry should specify: method, path, expected status, optional body pattern.
For each test:
RESPONSE=$(curl -s -w "\n%{http_code}" <CANARY_URL><PATH>)
STATUS=$(echo "$RESPONSE" | tail -1)
BODY=$(echo "$RESPONSE" | head -n -1)
Report results:
## Smoke Test Results
| Test | Method | Path | Expected | Actual | Status |
|------|--------|------|----------|--------|--------|
| Health | GET | /health | 200 | 200 | PASS |
| API Health | GET | /api/health | 200 | 200 | PASS |
Result: 2/2 passed
If any test fails, go to Step 6 (Rollback).
All checks passed — promote the canary revision to 100% traffic:
gcloud run services update-traffic <SERVICE_NAME> \
--region=us-central1 \
--to-tags=canary=100
Verify promotion:
gcloud run services describe <SERVICE_NAME> \
--region=us-central1 \
--format="table(status.traffic[].percent,status.traffic[].revisionName,status.traffic[].tag)"
Confirm canary revision is now serving 100% traffic.
Remove the canary tag (clean up):
gcloud run services update-traffic <SERVICE_NAME> \
--region=us-central1 \
--remove-tags=canary
Report:
Canary promoted to production.
Service: <SERVICE_NAME>
Revision: <REVISION_NAME>
URL: <PRODUCTION_URL>
All smoke tests passed.
If health checks or smoke tests fail:
Delete the canary revision tag (so it's not addressable):
gcloud run services update-traffic <SERVICE_NAME> \
--region=us-central1 \
--remove-tags=canary
Report the failure:
CANARY FAILED — rolled back.
Service: <SERVICE_NAME>
Failed revision: canary-<SHA>
Failures:
- [list failed health checks or smoke tests]
Production traffic is unchanged — still serving the previous revision.
Suggest next steps:
gcloud run services logs read <SERVICE_NAME> --region=us-central1 --limit=50/canaryIf pipeline-state.json exists for the current REQ:
canary entry to phaseHistory with the result (passed/failed)To customize smoke tests, create .adlc/context/smoke-tests.md with this format:
# Smoke Tests
## api
| Method | Path | Expected Status | Body Pattern |
|--------|------|-----------------|--------------|
| GET | /health | 200 | |
| GET | /api/health | 200 | |
| GET | /api/v1/config | 200 | "version" |
## web
| Method | Path | Expected Status | Body Pattern |
|--------|------|-----------------|--------------|
| GET | / | 200 | |
| GET | /api/health | 200 | |
The keys above (api, web) are repo ids — the same ids you used under repos: in .adlc/config.yml. /canary looks up the smoke tests for the service it's deploying by matching repo id.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
17 skills in this plugin
/adversaryAdversarial review of any artifact — a spec, architecture doc, task breakdown, diff/PR, plan, README, or prose claim. Assumes it is wrong, broken, or incomplete, tries to prove it, and reports only the findings that survive its own refutation. Read-only. Use when the user says "attack this", "adversary", "red-team this spec/plan/PR", "try to break this", "what's wrong with this requirement", or wants a skeptical-by-default pass that hunts omissions, not just bugs./analyzeCodebase health audit — identify technical debt, quality issues, and improvement opportunities/architectDesign architecture and break requirement into tasksnpx claudepluginhub atelier-fashion/adlc-toolkit --plugin adlcOther plugins' skills for the same job