cxas-dfcx-migration
Installation
SKILL.md
DFCX to CXAS Migration
Four small scripts, one persistent IR bundle:
| Script | What it does | Runtime | Output |
|---|---|---|---|
migrate.py |
1:1 conversion of every selected playbook/flow into the IR, and deploys base resources only (app, variables, tools). Agent deployment is DEFERRED to stage_1.py so large sources don't exceed the CXAS 100-agent cap — the compiled agents are saved in <target>_ir.json, not pushed. Pass --no-consolidate to push the full 1:1 agent set immediately (only safe below ~100 agents). |
~30 min for ~40 flows | <target>_ir.json, <target>_migration_report.md, <target>_unit_tests.json |
stage_1.py |
Loads the IR bundle, runs CXASOptimizer.optimize_stage1 (variable dedup) and Gemini structural consolidation (N→M agent grouping). This is the first agent push to CXAS — only the consolidated (N→M) agents are deployed; the raw 1:1 originals are never pushed (consolidate() drops them and the pre-consolidation snapshot is used transiently for the integrity check only, never persisted). CXAS Version 0.0.2 (dedup) and 0.0.3 (consolidation). |
~15 min | Updated <target>_ir.json, <target>_grouping.json |
stage_2.py |
Loads the IR bundle, runs CXASOptimizer.optimize_stage2 (instruction state machines + tool mocks). Pushes via update-pass deploys. CXAS Version 0.0.4. Re-generates unit tests. Lints. Writes the audit report. |
~10 min | Updated <target>_ir.json, <target>_optimization_report.md, regenerated <target>_unit_tests.json |
stage_3.py |
Only after Stage 1 consolidation. Rewires the consolidated agents' parent → children topology by mapping the SOURCE DFCX dep graph onto the new groups (rather than relying on what the synthesized PIF XML happened to reference) according to Spoke-Hub architecture style. Sets app root_agent to the is_root group. Idempotent — safe to re-run. CXAS Version 0.0.5. |
~10 sec | Updated <target>_ir.json stage history; CXAS app's child_agents set per group |
State flows through <target>_ir.json (a Pydantic IRBundle containing the MigrationConfig, source DFCXAgentIR, target MigrationIR, stage history, and version checkpoints). Each stage loads it from disk, mutates it, and writes it back. No re-fetching or re-compiling between stages.
When to use this skill vs. the CLI directly
This skill (InquirerPy prompts + HTML pre-flight preview + Gemini model picker) is the right entry when you want to interactively drive a migration with rich pre-flight context. The same MigrationService.run_stage* methods this skill calls are also exposed via the canonical CLI for scripted / CI use: