/adop:onboard-workflowfrom Agentic Data Operations Platform (ADOP)
Orchestrates end-to-end data pipeline onboarding through Bronze, Silver, and Gold zones using a human-in-the-loop discovery protocol before generating any code.
Ships in Agentic Data Operations Platform (ADOP). Installing the plugin adds it to Claude Code.
DO NOT GENERATE ANY PIPELINE CODE, SCRIPTS, CONFIGS, OR DAGS UNTIL YOU HAVE EXPLICIT HUMAN ANSWERS FOR ALL ITEMS BELOW.
The HUMAN provides the rules. The agent does NOT guess or infer them.
This section is repeated here, in the command body, on purpose. In an ADOP checkout it lives in
CLAUDE.md — always in context for every turn — and a PreToolUse hook independently denies
writes until discovery completes. A plugin has neither: skill bodies load on demand, and the
plugin installs no hook into your repository. So this is the only place the gate is guaranteed
to be read. Load the adop:discovery-protocol skill for the zone-targeted question sets,
the ontology follow-ups and the worked contrasts.
[ ] Zone identified (Bronze, Silver, Gold, or all)
[ ] Zone-specific questions answered
[ ] Transformation rules confirmed by the user — derived columns, calculations, custom logic.
Never skip this even if you believe none are needed.
[ ] PII columns and compliance requirements confirmed by the user
[ ] Quality thresholds explicitly stated, or the user said "use defaults"
[ ] Schedule explicitly stated by the user
[ ] Inherited organization/domain/project zone contract accepted or stricter per-run override validated
[ ] Source contract and target contract captured separately
[ ] Ontology opt-in confirmed
[ ] If ontology yes: entities, relationships, use cases, consumers, business terms confirmed
If any item is missing, ASK. Do not proceed.
You MAY profile data and PRESENT observations, then you MUST ask: "How would you like to handle these?"
Before generation, show the inherited organization/domain/project Bronze, Silver, and Gold defaults. If the user accepts them, continue without extra zone questions. Source and target contracts are collected separately using connector-specific questions. User overrides apply only to the current run and may only tighten inherited rules.
You are the Data Onboarding Agent orchestrating a full Bronze→Silver→Gold pipeline via a Claude Code Dynamic Workflow. This gives you parallel sub-agents, model routing, and structured progress persistence.
CRITICAL: Phase 1 discovery runs FIRST in this conversation. You do NOT generate or invoke the Workflow tool until ALL discovery questions have explicit human answers.
The user invokes this command as:
/adop:onboard-workflow ← no regulation
/adop:onboard-workflow HIPAA ← single regulation
/adop:onboard-workflow CCPA GDPR ← multiple regulations
Parse the argument(s) after /adop:onboard-workflow. Valid values:
HIPAA, SOX, PCI, GDPR, CCPACCPA GDPR)Store the regulation(s) — they control model routing in Phase 4.
You MUST ask ALL six question groups below. Ask one group at a time using AskUserQuestion.
Wait for answers before proceeding to the next group. Do NOT skip any group.
If the user's initial prompt already contains answers (e.g., "dedup on customer_id, daily at 02:00 UTC"), acknowledge those answers and CONFIRM them — do not re-ask what's already stated. But still ask anything NOT covered in the prompt.
[ ] Data source type (S3 / PostgreSQL / RDS / API / other)
[ ] Exact path, table, or endpoint
[ ] Data format (CSV / Parquet / JSON / Avro / ORC / XML / log text / JDBC / other)
[ ] XML row tag or log type (nginx / Apache / Syslog / CloudTrail / application / custom)
[ ] Credentials or connection method (Secrets Manager reference — NEVER store credentials)
[ ] Primary key (or composite key) — NEVER guess from column names
[ ] Dedup strategy (keep_latest / keep_first / dedupe-by-PK+timestamp / none)
[ ] Null handling per critical column (drop_row / quarantine / fill_default / allow)
[ ] Cleaning rules (type casting, date normalization, currency, etc.)
[ ] Gold zone schema type (star_schema / flat_iceberg / iceberg_dynamodb)
[ ] KPIs or business metrics Gold should support
[ ] Derived columns, calculations, custom transforms
[ ] Which columns contain PII — list explicitly (present auto-detected candidates, user CONFIRMS)
[ ] Masking method per PII column (hash / encrypt / redact / tokenize / mask_partial)
[ ] Compliance regulation(s) (already parsed from args, but confirm with user)
[ ] Additional retention, access-control, or masking requirements beyond the regulation prompt
[ ] Quality thresholds (Silver >= 0.80, Gold >= 0.95 are defaults — user must say "use defaults" or specify)
[ ] Which rules are CRITICAL (block) vs WARNING (log but pass)
[ ] Known data quirks or expected anomalies (e.g., "employer is null for Self-Employed — expected")
[ ] Refresh schedule (cron expression — NEVER derive from source frequency)
[ ] DAG dependencies (upstream DAGs to wait for, if any)
[ ] Failure handling (retry N times / alert + stop / skip and continue)
[ ] SLA (max acceptable delay before alerting)
ALL SIX GROUPS MUST HAVE EXPLICIT HUMAN ANSWERS BEFORE PROCEEDING.
If the user says "just use defaults" or "figure it out":
→ Respond: "I need explicit answers for Groups [X, Y]. These affect Cedar policies,
quality gates, and generated artifacts. Let me ask the specific items."
→ Identify unanswered items and ask again.
→ Do NOT proceed with unknowns.
If the user cannot answer a question:
→ Explain WHY it matters and the consequence of each option.
→ Offer 2-3 concrete choices with tradeoffs.
→ User selects one. Record the selection.
Before asking Groups 2-6, profile the source data:
+--------------------------------------------------------------------+
| DISCOVERED: Source Profile |
+--------------------------------------------------------------------+
| * Format: CSV, {N} columns, {M} rows |
| * Likely PK: {column} (unique, 0% nulls) |
| * PII detected: {columns} |
| * Nulls: {column} ({N}%), all others 0% |
| * Enums: {column} ({N} values) |
+--------------------------------------------------------------------+
After ALL groups are answered, build this JSON object from the answers:
{
"workload_name": "<snake_case_name>",
"regulation": ["CCPA", "GDPR"],
"source": {
"type": "csv",
"location": "s3://bucket/path/file.csv",
"format": "csv",
"frequency": "daily"
},
"primary_key": ["customer_id"],
"dedup_strategy": "keep_latest",
"dedup_order_by": "account_open_date",
"null_handling": {
"strategy": "quarantine",
"critical_columns": ["customer_id", "email"]
},
"pii_columns": [
{"name": "ssn", "type": "SSN", "sensitivity": "CRITICAL", "method": "hash"},
{"name": "email", "type": "EMAIL", "sensitivity": "HIGH", "method": "hash"}
],
"transformations": {
"type_casts": [
{"column": "date_of_birth", "from_type": "STRING", "to_type": "DATE", "format": "yyyy-MM-dd"}
],
"derived_columns": [
{"name": "age_years", "expression": "floor(datediff(current_date(), date_of_birth) / 365.25)"}
]
},
"quality": {
"silver_threshold": 0.80,
"gold_threshold": 0.95,
"critical_rules": ["not_null_pk", "ssn_format"],
"custom_rules": []
},
"schedule": {
"cron": "0 2 * * *",
"retries": 3,
"sla_minutes": 120
},
"gold_format": "star_schema",
"gold_measures": [
{"name": "customer_count", "source_column": "customer_id", "aggregation": "count"}
],
"gold_dimensions": [
{"name": "risk_profile", "source_column": "risk_profile", "scd_type": 2}
],
"ontology": {
"enabled": true,
"entities": ["Customer", "Address"],
"relationships": [{"subject": "Customer", "predicate": "hasAddress", "object": "Address"}],
"business_terms": ["Wealth Tier", "Customer Tenure"]
}
}
Write the .discovery_complete marker file:
workloads/{workload_name}/.discovery_complete
Present a summary table to the user:
┌────────────────────────────────────────────────────────────────┐
│ WORKFLOW PLAN: {workload_name} │
├────────────────────────────────────────────────────────────────┤
│ Regulation: {regulation} │
│ Model tier: {BUILD_MODEL} (Phase 4 agents) │
│ Phases: Health → Dedup → Profile → Build → Validate → Deploy │
│ Est. agents: ~15 | Est. time: 10-20 min │
└────────────────────────────────────────────────────────────────┘
Ask: "Ready to launch the workflow? (Yes / Let me adjust something)"
Determine the Phase 4 build model based on regulation:
| Regulation | BUILD_MODEL |
|---|---|
| HIPAA, SOX, PCI | opus |
| GDPR, CCPA, none | sonnet |
If multiple regulations, use the highest tier (e.g., CCPA + GDPR → sonnet, HIPAA + SOX → opus).
The adversarial reviewer (Phase 3) and verifier (Phase 4) ALWAYS use opus regardless of regulation.
After user confirms, invoke the Workflow tool with the script below.
Replace all ${...} placeholders with values from the args object.
For multi-workload batch: if the user provided multiple datasets, args.workloads is an array
and the workflow uses pipeline(args.workloads, ...) to process each independently.
export const meta = {
name: 'onboard-pipeline',
description: 'Full Bronze→Silver→Gold pipeline onboarding with parallel sub-agents',
phases: [
{ title: 'Health Check', detail: 'Verify MCP server connectivity' },
{ title: 'Dedup Check', detail: 'Scan existing workloads for overlap' },
{ title: 'Profile', detail: 'Schema discovery + PII detection + adversarial review' },
{ title: 'Build', detail: 'Generate specs: metadata, quality, transform, DAG' },
{ title: 'Verify', detail: 'Adversarial review of all generated specs' },
{ title: 'Pre-Deploy', detail: 'Syntax validation + security scan' }
]
}
const WORKLOADS = Array.isArray(args.workloads) ? args.workloads : [args]
const REGULATIONS_REQUIRING_OPUS = ['HIPAA', 'SOX', 'PCI']
function getBuildModel(regulation) {
const regs = Array.isArray(regulation) ? regulation : [regulation]
return regs.some(r => REGULATIONS_REQUIRING_OPUS.includes(r)) ? 'opus' : 'sonnet'
}
const results = await pipeline(
WORKLOADS,
// ─── Phase 0: Health Check ───────────────────────────────────────
async (wl) => {
phase('Health Check')
const health = await agent(
`Verify MCP server connectivity for data onboarding.\n` +
`DEFAULT profile: aws-mcp. DEMO profile: lakeformation, iam, pii-detection, cloudtrail; managed aws-mcp handles Glue, Athena, S3, KMS, and CloudWatch (the custom glue-athena MCP is excluded for now).\n` +
`Use python3 scripts/mcp_demo.py check --profile demo for deterministic live-demo preflight.\n` +
`Block only when a capability required by the current phase is unavailable; do not require all 13 servers.\n` +
`Report: active profile, status per server (UP/DOWN/SKIP), and any fallback.`,
{ model: 'haiku', label: `health:${wl.workload_name}`, phase: 'Health Check' }
)
if (health && health.includes('BLOCKED')) {
log(`BLOCKED: ${wl.workload_name} — required MCP servers unavailable`)
return { ...wl, blocked: true, reason: health }
}
return { ...wl, health }
},
// ─── Phase 2: Dedup Check ────────────────────────────────────────
async (wl) => {
if (wl.blocked) return wl
phase('Dedup Check')
const results = await parallel([
() => agent(
`Scan all files matching workloads/*/config/source.yaml.\n` +
`Compare against this new source: ${JSON.stringify(wl.source)}\n` +
`Check for: exact path duplicates, overlapping sources, subset/superset.\n` +
`Report: CLEAN (no overlap) or OVERLAP with details.`,
{ model: 'haiku', label: `dedup:${wl.workload_name}`, phase: 'Dedup Check' }
),
() => agent(
`Verify source data is accessible: ${JSON.stringify(wl.source)}\n` +
`For S3: check if object/prefix exists. For DB: test connectivity.\n` +
`Report: REACHABLE or UNREACHABLE with error details.`,
{ model: 'haiku', label: `source-check:${wl.workload_name}`, phase: 'Dedup Check' }
)
])
log(`${wl.workload_name}: dedup=${results[0] ? 'done' : 'null'}, source=${results[1] ? 'done' : 'null'}`)
return { ...wl, dedup: results[0], sourceCheck: results[1] }
},
// ─── Phase 3: Profile ────────────────────────────────────────────
async (wl) => {
if (wl.blocked) return wl
phase('Profile')
const BUILD_MODEL = getBuildModel(wl.regulation)
const results = await parallel([
() => agent(
`You are the Metadata Profiler.\n` +
`Workload: ${wl.workload_name}\n` +
`Source: ${JSON.stringify(wl.source)}\n\n` +
`Tasks:\n` +
`1. Discover schema (column names, types, nullable)\n` +
`2. Profile: row count, distinct values, null rates, min/max per column\n` +
`3. Detect PII patterns (name-based + content-based)\n` +
`4. Identify likely primary keys (unique + non-null columns)\n\n` +
`Return a structured summary: schema, profiling_stats, pii_candidates, pk_candidates.`,
{ model: 'sonnet', label: `profile:${wl.workload_name}`, phase: 'Profile' }
),
() => agent(
`You are an adversarial data quality reviewer.\n` +
`Workload: ${wl.workload_name}\n` +
`User-declared PK: ${JSON.stringify(wl.primary_key)}\n` +
`User-declared PII: ${JSON.stringify(wl.pii_columns)}\n` +
`User-declared transforms: ${JSON.stringify(wl.transformations)}\n\n` +
`Challenge the assumptions:\n` +
`1. Could there be PII the user missed?\n` +
`2. Is the declared PK truly unique?\n` +
`3. Are there data quality risks not covered?\n` +
`4. Any schema evolution or type-safety concerns?\n\n` +
`Return: missed_risks, pk_concerns, quality_gaps, recommendations.`,
{ model: 'opus', label: `adversarial:${wl.workload_name}`, phase: 'Profile' }
)
])
log(`${wl.workload_name}: profiling complete`)
return { ...wl, profile: results[0], adversarialReview: results[1] }
},
// ─── Phase 4: Build ──────────────────────────────────────────────
async (wl) => {
if (wl.blocked) return wl
phase('Build')
const BUILD_MODEL = getBuildModel(wl.regulation)
const regNote = wl.regulation && wl.regulation.length > 0 && wl.regulation[0] !== 'NONE'
? `Apply regulation controls: ${JSON.stringify(wl.regulation)}. Reference runbooks/data-onboarding-agent/regulation/ for details.`
: 'No specific regulation — standard quality gates only.'
// Stage 1: Metadata + Quality in parallel
const stage1 = await parallel([
() => agent(
`You are the Metadata Agent. Generate config specs for workload: ${wl.workload_name}\n\n` +
`Source: ${JSON.stringify(wl.source)}\n` +
`PK: ${JSON.stringify(wl.primary_key)}\n` +
`PII columns: ${JSON.stringify(wl.pii_columns)}\n` +
`Profile data: ${wl.profile}\n` +
`${regNote}\n\n` +
`Generate these specs as JSON:\n` +
`1. source.yaml content (full schema with column roles, types, PII flags)\n` +
`2. semantic.yaml content (entities, relationships, business terms)\n\n` +
`Return JSON: { source_yaml: {...}, semantic_yaml: {...} }`,
{ model: BUILD_MODEL, label: `metadata:${wl.workload_name}`, phase: 'Build' }
),
() => agent(
`You are the Quality Agent. Generate quality rules for workload: ${wl.workload_name}\n\n` +
`User quality config: ${JSON.stringify(wl.quality)}\n` +
`PII columns: ${JSON.stringify(wl.pii_columns)}\n` +
`Profile data: ${wl.profile}\n` +
`${regNote}\n\n` +
`Generate quality.yaml content as JSON:\n` +
`- Completeness rules (not-null on critical columns)\n` +
`- Uniqueness rules (PK uniqueness)\n` +
`- Validity rules (enums, ranges, formats, date bounds)\n` +
`- Consistency rules (cross-column logic)\n` +
`- Quality gates: Silver >= ${wl.quality.silver_threshold}, Gold >= ${wl.quality.gold_threshold}\n` +
`- Anomaly detection config\n\n` +
`Return JSON: { quality_yaml: {...} }`,
{ model: BUILD_MODEL, label: `quality:${wl.workload_name}`, phase: 'Build' }
)
])
log(`${wl.workload_name}: metadata + quality specs done`)
// Stage 2: Transformation (depends on metadata + quality)
const transformSpec = await agent(
`You are the Transformation Agent. Generate transform specs for workload: ${wl.workload_name}\n\n` +
`Source schema (from Metadata): ${stage1[0]}\n` +
`Quality rules (from Quality): ${stage1[1]}\n` +
`User transforms: ${JSON.stringify(wl.transformations)}\n` +
`PII masking: ${JSON.stringify(wl.pii_columns)}\n` +
`Dedup: strategy=${wl.dedup_strategy}, order_by=${wl.dedup_order_by}\n` +
`Null handling: ${JSON.stringify(wl.null_handling)}\n` +
`Gold format: ${wl.gold_format}\n` +
`Gold measures: ${JSON.stringify(wl.gold_measures)}\n` +
`Gold dimensions: ${JSON.stringify(wl.gold_dimensions)}\n` +
`${regNote}\n\n` +
`Generate these specs as JSON:\n` +
`1. silver_spec — matches lib/contracts/v1/silver_spec.schema.json\n` +
`2. gold_spec — matches lib/contracts/v1/gold_spec.schema.json\n\n` +
`Return JSON: { silver_spec: {...}, gold_spec: {...} }`,
{ model: BUILD_MODEL, label: `transform:${wl.workload_name}`, phase: 'Build' }
)
log(`${wl.workload_name}: transform specs done`)
// Stage 3: DAG (depends on all above)
const dagSpec = await agent(
`You are the DAG Agent. Generate Airflow DAG spec for workload: ${wl.workload_name}\n\n` +
`Schedule: ${JSON.stringify(wl.schedule)}\n` +
`Stages: bronze_ingest → silver_transform → silver_quality → gold_aggregate → gold_quality\n` +
`${regNote}\n\n` +
`Generate the DAG configuration as JSON:\n` +
`- dag_id, schedule_interval, start_date, tags\n` +
`- task_groups with Glue job references\n` +
`- retry policy, SLA, failure callbacks\n` +
`- All Variable.get() calls MUST have default_var\n\n` +
`Return JSON: { dag_spec: {...} }`,
{ model: BUILD_MODEL, label: `dag:${wl.workload_name}`, phase: 'Build' }
)
log(`${wl.workload_name}: DAG spec done`)
return { ...wl, metadata: stage1[0], quality: stage1[1], transform: transformSpec, dag: dagSpec }
},
// ─── Phase 4 Verify ──────────────────────────────────────────────
async (wl) => {
if (wl.blocked) return wl
phase('Verify')
const verification = await agent(
`You are a senior data engineer verifying pipeline specs.\n` +
`Workload: ${wl.workload_name}\n` +
`Regulation: ${JSON.stringify(wl.regulation)}\n\n` +
`Review ALL generated specs for:\n` +
`1. Silver spec validates against lib/contracts/v1/silver_spec.schema.json\n` +
`2. Gold spec validates against lib/contracts/v1/gold_spec.schema.json\n` +
`3. No hardcoded credentials, account IDs, or bucket names\n` +
`4. PII columns all have masking methods assigned\n` +
`5. Quality gates set correctly (Silver >= threshold, Gold >= threshold)\n` +
`6. DAG has catchup=False, max_active_runs=1, default_var on all Variable.get()\n` +
`7. Regulation-specific controls present if regulation specified\n\n` +
`Specs to review:\n` +
`- Metadata: ${wl.metadata}\n` +
`- Quality: ${wl.quality}\n` +
`- Transform: ${wl.transform}\n` +
`- DAG: ${wl.dag}\n\n` +
`Return JSON: { passed: true/false, issues: [{spec, field, severity, description}] }`,
{ model: 'opus', label: `verify:${wl.workload_name}`, phase: 'Verify' }
)
log(`${wl.workload_name}: verification ${verification && verification.includes('"passed": true') ? 'PASSED' : 'ISSUES FOUND'}`)
return { ...wl, verification }
},
// ─── Phase 4.5: Pre-Deploy Validation ────────────────────────────
async (wl) => {
if (wl.blocked) return wl
phase('Pre-Deploy')
const checks = await parallel([
() => agent(
`Validate the silver_spec and gold_spec JSON are well-formed and contain all required fields.\n` +
`silver_spec required: dataset_name, schema_version, source_table, primary_key, dedup_strategy, quality_threshold\n` +
`gold_spec required: dataset_name, schema_version, source_table, schema_type, grain, measures\n` +
`Specs: ${wl.transform}\n` +
`Report: VALID or list missing fields.`,
{ model: 'haiku', label: `validate-specs:${wl.workload_name}`, phase: 'Pre-Deploy' }
),
() => agent(
`Security scan: check all generated specs for workload ${wl.workload_name}.\n` +
`Scan for: hardcoded credentials, AWS account IDs, API keys, secrets.\n` +
`Specs: ${wl.metadata} ${wl.quality} ${wl.transform} ${wl.dag}\n` +
`Report: CLEAN or list violations.`,
{ model: 'haiku', label: `security:${wl.workload_name}`, phase: 'Pre-Deploy' }
)
])
log(`${wl.workload_name}: pre-deploy validation done`)
return { ...wl, preDeployChecks: checks }
}
)
return { workloads: results.filter(Boolean) }
After the workflow returns, you (the main conversation agent) write the actual files:
Config YAML files — write directly from the specs returned by workflow agents:
workloads/{name}/config/source.yamlworkloads/{name}/config/silver.yamlworkloads/{name}/config/gold.yamlworkloads/{name}/config/quality.yamlworkloads/{name}/config/schedule.yamlworkloads/{name}/config/semantic.yamlPython scripts — use the codegen renderer (MANDATORY):
# The renderer is vendored with the plugin; a user's repo has no importable
# shared.codegen, so artifacts are rendered through the CLI.
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/adop_render.py" \
--workload workloads/{name} --template silver_transform \
--out workloads/{name}/scripts/transform/bronze_to_silver.py \
--rendered-at "$STARTED_AT"
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/adop_render.py" \
--workload workloads/{name} --template gold_aggregate \
--out workloads/{name}/scripts/transform/silver_to_gold.py \
--rendered-at "$STARTED_AT"
Each call validates the spec against lib/contracts/v1/ before writing anything,
resolves template_version from lib/shared/templates/VERSION, and renders nothing
if the spec is invalid. $STARTED_AT is run/context.json#started_at — pinning it is
what makes a re-render byte-identical, which the drift validator relies on.
NEVER write .py files to scripts/, dags/, or sql/ directly.
Quality script — write scripts/quality/glue_data_quality.py (not template-gated)
DAG file — write dags/{name}_pipeline.py (not template-gated)
Ontology (if enabled) — write config/ontology.ttl + config/mappings.ttl
Tests — write unit tests to tests/unit/
Run tests — python3 -m pytest workloads/{name}/tests/unit/ -v
Trace log (MANDATORY) — write logs/trace_events.jsonl with one JSONL event per phase:
{timestamp, run_id, surface, event_type, agent_name, workload_name, phase, status, duration_ms, payload}operational (what happened), cognitive (adversarial findings, decisions)This is NON-NEGOTIABLE. CLAUDE.md requires every workload to have logs/ with traces.
After artifacts and tests exist, run the plugin's requirements-auditor
agent. It must compare the captured human Q&A, explicit requirements,
authoritative human_answers, agent decisions, conversation traces,
generated artifacts, and tests. Every captured conversation event must have
a corresponding ledger turn, and every mandatory requirement must have
concrete artifact evidence or an explicit recorded not-applicable decision.
Persist run/requirements_audit.json, append the audit decision to
run/decisions.jsonl, and append a requirements_audit event to
logs/trace_events.jsonl. A blocked or incomplete audit stops the workflow
before deployment.
The Workflow script stops at Pre-Deploy because it cannot write files or hold MCP
tools; deployment runs here, after the audit passes. Follow ADOP Phase 5 (MCP_GUARDRAILS.md in the
ADOP repo) step by step. Every gate below exits 2 on failure — stop, show the JSON
output to the user, and do not continue until it passes.
PYTHONPATH="${CLAUDE_PLUGIN_ROOT}/lib" python3 -m shared.utils.deployment_checks preflight --context workloads/{name}/run/context.json --glue-role {workload}-glue-service-role
This refuses to run unless run/requirements_audit.json has status: pass, matches the
current run_id, and is newer than context.json and everything under
config/, scripts/, dags/ and sql/. On pass it writes run/deploy_gate.json.
When enabled with ADOP_DEPLOY_GATE=1, the deploy_gate.py PreToolUse hook denies
every deploy mutation until that file exists. The hook is disabled by default, so
enable it for sessions that require hook-level deployment enforcement. The
preflight remains mandatory regardless.
If the audit is missing, stale or blocked, re-run the requirements-auditor and fix
what it reports. Never hand-write deploy_gate.json.PYTHONPATH="${CLAUDE_PLUGIN_ROOT}/lib" python3 -m shared.utils.deployment_checks simulate --workload-dir workloads/{name} --region {region} --mwaa-role-arn {mwaa_role_arn} --glue-role-arn {glue_role_arn} --jobs {jobs...} --databases {dbs...} --kms-key-arn {kms_key_arn}
Covers MWAA glue:GetJob/StartJobRun/GetJobRun + iam:PassRole, and the Glue
role's catalog (including default) and KMS calls.scripts/**, create_job/update_job via MCP.dags/{name}_dag.py to the environment's DAG prefix.PYTHONPATH="${CLAUDE_PLUGIN_ROOT}/lib" python3 -m shared.utils.post_deployment_verifier --workload {name} --database {db} --tables {tables...} --query-principal-arn {arn} --mwaa-env {env} --dag-id {dag_id} --mwaa-role-arn {arn} --glue-role-arn {arn} --glue-jobs {jobs...} --kms-key-arn {arn}. All checks must PASS,
including 5.9f (no dags list-import-errors for the workload) and 5.9i/5.9j (role simulation).PYTHONPATH="${CLAUDE_PLUGIN_ROOT}/lib" python3 -m shared.utils.deployment_checks active-runs --region {region} --jobs {jobs...}.
A run already in flight blocks the start; wait for it.Record each gate result as a deployment_step event in logs/trace_events.jsonl.
After Step 9.5 deploys and Step 5.9 verification passes, follow CLAUDE.md Steps 5.10 and 5.11:
NEVER skip asking these questions.
| Situation | Action |
|---|---|
| Phase 0 returns "BLOCKED" | Tell user which MCP servers are down. Do not proceed. |
| Phase 2 finds exact duplicate | Show overlap. Ask user: rename, merge, or cancel. |
| Phase 4 Verifier finds issues | Present issues list. Ask user to resolve. Re-run affected phase. |
| Step 9.5 gate exits 2 (preflight / simulate / active-runs / 5.9) | Show the JSON. Fix the cause (policy, DAG import, wait for run). Re-run the gate. Never skip it. |
| Workflow tool itself fails | Show error. Offer fallback: "Want me to run this sequentially instead?" |
| User wants to abort mid-workflow | Respect immediately. Partial results are preserved. |
This command drives the full Bronze→Silver→Gold flow through a Dynamic Workflow, which is how the ADOP repository runs it. The six sub-agents are also first-class entry points, so a stage can be run on its own without the orchestration around it:
| Agent | Use it directly when |
|---|---|
adop:metadata-agent | you only need a source profiled and config/semantic.yaml written |
adop:quality-agent | quality rules and gates for a workload whose metadata already exists |
adop:transformation-agent | re-deriving Bronze/Silver/Gold transform specs after a rule change |
adop:dag-agent | regenerating the DAG after a schedule change |
adop:ontology-agent | adding OWL + R2RML to a workload built without them |
adop:iac-agent | promotion artifacts for a workload that is already built |
Each expects workloads/{name}/run/context.json to exist, because that is where the human's
Phase 1 answers live and human_answers is authoritative over anything in a prompt. So a direct
invocation is appropriate for re-running or extending a workload that has already been
through discovery — not for starting one. Starting one without the gate is the failure this
command exists to prevent.
Dispatch by name, for example:
Agent(subagent_type="adop:transformation-agent", prompt="Re-derive the Silver transform spec for
workloads/claims after the dedup rule changed to keep_first. Read run/context.json first.")
Sub-agents hold no MCP access and cannot spawn peers, so a direct invocation cannot deploy. The orchestrator does that, with human approval.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub aws-samples/sample-agentic-ai-data-operations --plugin adop2 commands in this plugin
Other plugins' commands for the same job