/dx-automation:auto-pipelinesfrom dx-automation
Imports ADO pipeline YAML files into Azure DevOps and sets required variables. Reads config from .ai/automation/infra.json. Skips existing pipelines.
Ships in dx-automation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You import ADO pipeline YAML files into Azure DevOps and set all required variables. Uses az pipelines (audit-wrapped) and reads config from .ai/automation/infra.json. Each project is self-contained — imports all enabled pipelines regardless of profile.
source .ai/lib/audit.sh
export AUDIT_LOG_PREFIX=infra
Read .ai/automation/infra.json. Extract:
adoOrg — ADO org URLadoProject — ADO project namepipelineFolder — optional ADO pipeline folder path (e.g. \\KAI). If set, pipelines are created inside this folder."disabled": trueRead .ai/config.yaml to get scm.repo (repository name for pipeline import).
If automationProfile is consumer, pr-only, or pr-delegation (legacy): warn ⚠ Legacy profile — re-run /auto-init to migrate to per-project model. Proceed with all enabled pipelines.
Print: Importing <N> enabled pipelines
SimpleAgent + the KAI-HUB router are imported here like any other pipeline. SimpleAgent has no Lambda — its trigger is an Azure-native Service Hook + Incoming WebHook service connection (configured by /auto-webhooks, not here). But "no Lambda" only affects the trigger: the pipeline YAML still must be imported as an ADO definition and given variables, which is exactly this skill's job. So:
simple (ado-cli-simple.yml) — enabled by default when not disabled.hub (ado-cli-hub.yml) — multi-repo only, "disabled": true by default. Import only when explicitly enabled.For each enabled pipeline (in order), import the YAML into ADO.
All pipelines use Claude Code CLI (single-step skill invocation): .ai/automation/pipelines/cli/ado-cli-<agent>.yml.
Pipeline names follow ../../rules/ado-service-hooks.md § Pipeline Naming — hub KAI-*, consumer KAI-<RepoShortName>-* — so build-policy dropdowns can tell repos apart.
Before creating, check if a pipeline with this name already exists in the project:
EXISTING_ID=$(az pipelines list \
--name "<pipeline-name>" \
--project "<adoProject>" \
--organization "<adoOrg>" \
--query "[0].id" --output tsv 2>/dev/null)
EXISTING_ID is non-empty: skip creation, use existing ID. Report: ⏭ <pipeline-name> already exists (ID: <id>) — skippingIf pipelineFolder is set in infra.json, first ensure the folder exists:
az pipelines folder create \
--path "<pipelineFolder>" \
--project "<adoProject>" \
--organization "<adoOrg>" 2>/dev/null || true # ignore if already exists
Then create the pipeline with --folder-path if the folder is configured:
PIPELINE_ID=$(az_pipelines create \
--name "<pipeline-name>" \
--repository "<repo-name>" \
--branch main \
--repository-type tfsgit \
--yml-path "<yaml-path>" \
--folder-path "<pipelineFolder>" \
--project "<adoProject>" \
--organization "<adoOrg>" \
--skip-first-run true \
--query id --output tsv)
Omit --folder-path if pipelineFolder is not set or empty in infra.json.
After each import (or reuse), update infra.json:
pipelines.<agent>.id → $PIPELINE_ID (or $EXISTING_ID)Report: pipeline name, ID, YAML path, created/reused.
For each imported pipeline, set required variables. Ask for secret values — one pipeline at a time, display current pipeline name clearly before asking.
All pipelines use Claude Code CLI. Ask once, apply to all pipelines:
Anthropic API key? (secret — used by Claude Code CLI for authentication)
Set: ANTHROPIC_API_KEY (secret).
Monthly token cap? (default:
5000000= 5M tokens per month)
az_pipelines_variable create \
--name "MONTHLY_TOKEN_CAP" \
--value "5000000" \
--pipeline-name "<pipeline-name>" \
--project "<adoProject>" \
--organization "<adoOrg>"
DoR wiki URL? ADO wiki page with your Definition of Ready criteria.
(Leave blank to skip — agent uses default criteria)
az_pipelines_variable create \
--name "DOR_WIKI_URL" \
--value "<value>" \
--pipeline-name "<pipeline-name>" \
--project "<adoProject>" \
--organization "<adoOrg>"
Reviewer identities? Comma-separated ADO identities to filter as reviewer.
Format:
[email protected], Display Name(from/auto-initconfig — pre-fill from infra.json)
az_pipelines_variable create \
--name "REVIEWER_IDENTITIES" \
--value "<email, Name>" \
--pipeline-name "<pipeline-name>" \
--project "<adoProject>" \
--organization "<adoOrg>"
My identities? Comma-separated ADO identities for PR Answer (whose PRs to respond on).
(Pre-fill from infra.json if set during
auto-init)
az_pipelines_variable create \
--name "MY_IDENTITIES" \
--value "<email, Name>" \
--pipeline-name "<pipeline-name>" \
--project "<adoProject>" \
--organization "<adoOrg>"
Remote AEM Author URL? For dialog/component verification (e.g.
https://author-myproject.adobeaemcloud.com) Default:http://localhost:4502
Remote AEM Publisher URL? For user-facing page verification (e.g.
https://publish-myproject.adobeaemcloud.com) Default:http://localhost:4503
AEM username? Default:
admin
AEM password? (secret)
Set: AEM_AUTHOR_URL, AEM_PUBLISH_URL, AEM_USER, AEM_PASS (secret).
These four pipelines pass BASIC_AUTH_SITES to the agent so the browser and curl-basic-auth can open sites behind HTTP Basic Auth (QA/Stage publishers). Ask:
Do any sites the agents open need HTTP Basic Auth? If yes:
name:url:user:passentries joined by,(onlypassmay contain:, written%3A;,and%are%2C,%25).
Set it as a secret on each of those pipelines that the user enabled:
az_pipelines_variable create \
--name "BASIC_AUTH_SITES" \
--value "<entries>" --secret true \
--pipeline-name "<pipeline-name>" \
--project "<adoProject>" \
--organization "<adoOrg>"
If no site needs it, skip it: ADO then passes the literal $(BASIC_AUTH_SITES), which the parsers treat as unset. Never echo the value back.
Set this on ALL CLI pipelines (DoR, PR Review, PR Answer, DoD, DoD-Fix, BugFix, QA, DevAgent, DOCAgent, Estimation). The pipelines fetch the dx-aem-flow plugins by cloning the public GitHub repo (https://github.com/easingthemes/dx-aem-flow.git, hardcoded in each pipeline YAML) — no marketplace URL variable is needed. ADO_ORG_URL is used by the agents to reach the ADO REST API.
ADO org URL? (pre-fill from
infra.json>adoOrg)Used by the agents to call the ADO REST API (fetch work item, post comments).
az_pipelines_variable create \
--name "ADO_ORG_URL" \
--value "<adoOrg from infra.json>" \
--pipeline-name "<pipeline-name>" \
--project "<adoProject>" \
--organization "<adoOrg>"
Set these on ALL three code-writing pipelines. These enable cross-repo delegation — when a work item requires changes in another repo, the pipeline queues the equivalent pipeline in that repo.
ADO org URL? (pre-fill from
infra.json>adoOrg)Used by the delegation step to call ADO REST API.
az_pipelines_variable create \
--name "ADO_ORG_URL" \
--value "<adoOrg from infra.json>" \
--pipeline-name "<pipeline-name>" \
--project "<adoProject>" \
--organization "<adoOrg>"
Multi-repo fan-out? There is no per-pipeline cross-repo map anymore. The central KAI-HUB router (
ado-cli-hub.yml) handles multi-repo fan-out: it reads therepos.json+agents.jsonregistries (.ai/automation/registries/) and queues each agent's worker once per resolved repo. Single-repo projects don't import the hub at all — their dual-mode worker fires directly via its own webhook. Seedx-hub/shared/registry-format.md.So workers no longer need a
CROSS_REPO_PIPELINE_MAPvariable. The only extra variable the hub itself needs isADO_PAT(to queue cross-project worker runs).
Set these on the DevAgent pipeline (in addition to ANTHROPIC_API_KEY + ADO_ORG_URL above):
| Variable | Value | Secret? |
|---|---|---|
FIGMA_PERSONAL_ACCESS_TOKEN | Optional — Figma API token for headless/CI Figma access (not needed locally — Figma MCP uses desktop app) | Yes |
The DOCAgent runs /dx-post-merge <id>: AEM demo page on QA → wiki page → [QAHandoff] comment. For an AEM story it stops without posting anything when the merged change is not on QA yet — tag the work item after the QA deploy, or tag it again after a blocked run. A dry run skips the demo step (--skip demo).
Set these on the DOCAgent pipeline (in addition to ANTHROPIC_API_KEY):
| Variable | Value | Secret? |
|---|---|---|
AEM_AUTHOR_URL | Remote AEM author URL (same as QA pipeline) | No |
AEM_PUBLISH_URL | Remote AEM publisher URL (same as QA pipeline) | No |
AEM_USER | AEM username (same as QA pipeline) | No |
AEM_PASS | AEM password (same as QA pipeline) | Yes |
The SimpleAgent pipeline (ado-cli-simple.yml, triggered by a @kai-simple comment via an Azure-native Service Hook — no Lambda) runs the /dx-simple skill via the Claude Agent SDK against the QA AEM environment. It needs its own AEM credentials separate from the QA/DOC pipelines (which may target a different environment).
Set these on the SimpleAgent pipeline (in addition to ANTHROPIC_API_KEY + plugin marketplace variables above):
| Variable | Value | Secret? |
|---|---|---|
AEM_QA_URL | QA author URL (e.g. https://qa-author.example.com) | No |
AEM_QA_USER | Service-account username on QA | Yes |
AEM_QA_PASSWORD | Service-account password on QA | Yes |
PLAYWRIGHT_MCP_VERSION | Playwright MCP (@playwright/mcp) version — defaults to value pinned in ado-cli-simple.yml (override only if needed) | No |
AEM_MCP_VERSION | AEM MCP version — defaults to value pinned in ado-cli-simple.yml (override only if needed) | No |
ADO_MCP_VERSION | ADO MCP (@azure-devops/mcp) version — defaults to the value pinned in pipeline-agent.js (override only if needed) | No |
ADO_MCP_DOMAINS | ADO MCP tool domains, comma-separated — default core,work,work-items,search,repositories,wiki (no pipelines, test-plans, advanced-security); all loads every domain | No |
AEM QA author URL? For SimpleAgent visual verification + authoring writes (e.g.
https://qa-author.example.com)
AEM QA service-account username? (secret)
AEM QA service-account password? (secret)
az_pipelines_variable create \
--name "AEM_QA_URL" \
--value "<qa-url>" \
--pipeline-name "<simple-pipeline-name>" \
--project "<adoProject>" \
--organization "<adoOrg>"
az_pipelines_variable create \
--name "AEM_QA_USER" \
--value "<user>" --secret true \
--pipeline-name "<simple-pipeline-name>" \
--project "<adoProject>" \
--organization "<adoOrg>"
az_pipelines_variable create \
--name "AEM_QA_PASSWORD" \
--value "<password>" --secret true \
--pipeline-name "<simple-pipeline-name>" \
--project "<adoProject>" \
--organization "<adoOrg>"
The MCP version variables (PLAYWRIGHT_MCP_VERSION, AEM_MCP_VERSION) have inline defaults in the YAML — only set as pipeline variables to override.
Only applies if hub is enabled ("disabled": true by default — skip otherwise). The hub queues each agent's worker (one run per resolved repo, possibly cross-project) via the ADO REST API, so it needs a PAT. It runs claude-code only for the dx-discover-repos step, so it does need ANTHROPIC_API_KEY. It reads the repos.json + agents.json registries from .ai/automation/registries/ (files in the repo — not pipeline variables).
| Variable | Value | Secret? |
|---|---|---|
ADO_PAT | PAT with Build (Read & Execute) scope — used to POST worker runs (Basic auth; cross-project) | Yes |
ADO_ORG_URL | ADO org URL (pre-fill from infra.json > adoOrg) | No |
ANTHROPIC_API_KEY | LLM key for the discovery step | Yes |
az_pipelines_variable create \
--name "ADO_PAT" \
--value "<pat>" --secret true \
--pipeline-name "<kai-hub-pipeline-name>" \
--project "<adoProject>" \
--organization "<adoOrg>"
Trigger note: in a multi-repo project the
@kai-<agent>Service Hook targets thehubIncoming WebHook, not the per-repo workers./auto-webhooks§2b handles that. This skill only imports the YAML and sets the variables above.
## ADO Pipelines Imported
| Pipeline | ID | Variables |
|----------|-----|-----------|
| <name from infra.json> | <id> | <N> set |
| ... | ... | ... |
(List each imported pipeline with its name from `infra.json`, assigned ID, and variable count.)
**infra.json** updated with pipeline IDs.
**Audit log:** `.ai/logs/infra.<week>.jsonl`
### Next step
`/auto-deploy` — Deploy Lambda code
/auto-pipelines (hub, first run) — Reads infra.json for 11 enabled agents (the 10 core agents + simple; the hub router is disabled by default). Imports each pipeline one at a time into ADO (e.g., KAI-DoR-Checker, KAI-PR-Review-Agent), sets required variables (ADO PAT, LLM API key, resource prefix), and records each pipeline ID back to infra.json. All 11 imported successfully.
/auto-pipelines (consumer project) — Reads consumer-profile infra.json with 2 pipelines (PR Review, PR Answer). Imports KAI-BrandB-PR-Review-Agent and KAI-BrandB-PR-Answer-Agent with repo-specific names. Sets pipeline variables including hub Lambda URLs. Reminds user to register pipeline IDs with the hub's Lambda env vars.
/auto-pipelines (re-run, some pipelines exist) — Checks each pipeline by name before creating. Finds 6 of 10 already exist with matching IDs. Skips those 6, imports the 4 new ones, and updates infra.json with the new pipeline IDs.
"Pipeline with this name already exists" Cause: A pipeline with the same name was already imported (possibly from a previous run). Fix: This is handled automatically — the skill detects existing pipelines and reuses their IDs. If the existing pipeline is from a different repo or is stale, delete it manually in ADO and re-run.
Pipeline variable set fails with "unauthorized"
Cause: The ADO PAT used for the az pipelines CLI doesn't have pipeline admin permissions.
Fix: Ensure the PAT has "Build: Read & Execute" and "Variable Groups: Read, Create, & Manage" scopes. Re-authenticate with az devops login.
Pipeline imported but not showing in infra.json
Cause: The skill updates infra.json after each import. If the process was interrupted, the last pipeline may be missing.
Fix: Re-run /auto-pipelines — it will detect the existing pipeline by name and record its ID without creating a duplicate.
az pipelines mutating calls"disabled": true in infra.json before importingWhat SKILL.md sets; muted values are Claude Code's defaults
Use when importing ADO pipelines for AI automation agents, when the user says 'import pipelines', 'set up ADO pipelines', 'create automation pipelines', or after /auto-init to register the pipelines in ADO.
Three short reads, in order
Other plugins' skills for the same job
10 skills in this plugin
/auto-alarmsCreate CloudWatch alarms and SNS subscription for AI automation monitoring. Creates 4 alarms (DLQ depth, WI-Router errors, PR-Router errors, throttles) and subscribes an email address to alerts. Reads config from .ai/automation/infra.json./auto-deployDeploy Lambda code for AI automation agents (wi-router and/or pr-router). Packages agent steps + shared libs into a zip and uploads to AWS Lambda. Safe to re-run after code changes. Reads function names from .ai/automation/infra.json./auto-doctorHealth check of the AI automation setup — local files, ADO pipeline configuration, Lambda state. Use when automation seems broken, for 'check automation'./auto-initScaffold AI automation for a project — sets up .ai/automation/ and infra.json; each project owns its pipelines (and optional AWS infra). Run once after /dx-init./auto-lambda-envSet environment variables on AI automation Lambda functions. Interactively collects secrets and operational values, then applies them via AWS CLI. Reads function names and pre-filled values from .ai/automation/infra.json./auto-provisionCreate all AWS resources for AI automation agents — DynamoDB tables, SQS queue, S3 bucket, SNS topic, IAM role, Lambda functions, and API Gateway. Reads config from .ai/automation/infra.json. Idempotent — skips already-existing resources.npx claudepluginhub easingthemes/dx-aem-flow --plugin dx-automation