/flowx:flowx-enrichfrom flowx
Adds agent-authored architectural judgment to a discovered pipeline inventory: factory-wide recommendations, per-pipeline intent and Databricks patterns, and cross-pipeline couplings. Runs between discover and route in the flowx migration workflow.
Ships in flowx. 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.
Read when SKILL.md points to them.
The deterministic discover pass records what each source workflow is; it cannot record what to
do about it. That judgment — a factory-wide architectural recommendation, each pipeline's intent
and recommended Databricks patterns, and how pipelines couple — is authored by you, the agent,
and recorded by the library in its own file, metadata/agentic_insights.json, bound to the saved
metadata/source_graphs.json it was checked against. The library then rebuilds
metadata/inventory.json from source_graphs.json plus that file, so it carries the same block under
a single additive insights key; you never pass it anything for that step. Airflow discover saves no
source_graphs.json yet, so for Airflow the file is bound to inventory.json alone (through its
inventory_sha256), and the inventory is rebuilt from that.
This is the standard step between discover and route in the flowx workflow. flowx-migrate
runs this skill after discover by default; the routing step (flowx-route) reads the insights block to
present the agentic conversion option per connected component. The one-shot MCP migrate command
runs discover, convert and package without it, so it records no insights.
Insights are advice for the people planning the migration, not a full report. Spend your effort where a wrong or missing insight would change the migration:
system_recommendation) when one choice, such as a managed
connector for a family of extractors, reshapes many pipelines. Leave it out when there is none.inferred
one only with evidence you can cite, and set its confidence honestly.risk_if_ignored for what is critical: data loss, wrong results, a broken dependency or a
missed schedule. Leave it out rather than state a generic risk.For a large factory, cover the factory-wide decision and the pipelines it touches first. Enrich records whatever valid insights you give it, so a partial set is fine.
Enrichment is on by default, but it is skippable. A standalone, deterministic-only discover — no
agent, no LLM — is fully valid: metadata/inventory.json from discover is complete and self-standing
without an insights block, and flowx-route still recommends and records a plan from the
deterministic structure alone (the agentic option simply shows no recommended patterns). Skip enrich
when the caller asked for a headless/deterministic pass, or when no human reader needs a migration
narrative.
Read the deterministic inventory. Load <output_dir>/metadata/inventory.json (on the hosted
MCP server, through enrich with action="prepare", which also returns source_graphs.json; see
below). Note every
pipeline name (these are the valid foreign keys), and each pipeline's lineage block — in
particular lineage.control_edges, each {source_workflow, target_workflow, via_task_key}. A
deterministic control relationship you annotate must match one of these exactly, and only an
edge marked "resolved": true can be annotated. Such an edge can be annotated even when its
target_workflow is not a listed pipeline (discover ran with --pipeline, or the called pipeline
has no activities); every other relationship endpoint, and every pipeline_insights[].pipeline,
must be a listed pipeline. When the
inventory records a top-level source_graphs_sha256 (ADF discover does), copy it into
authored_against by default, so enrich can refuse your insights if discover runs again before
you submit them; when it records none, leave authored_against out.
Read the source artifacts you need to form judgment: each activity's raw payload in
metadata/source_graphs.json (on the hosted server, bundle.files["source_graphs.json"] from
prepare), the ADF metadata/<pipeline>.arm.json provenance, or the DAG source.
The inventory carries no raw payloads. Read enough to state
each pipeline's intent and the Databricks patterns that fit. Ground every recommended pattern in
a real, publicly-documented Databricks capability; never invent a product name.
Check the release state of every capability you recommend, then record it. Release states
change, so never take one from memory or from this skill. Before you name a connector or other
capability in recommended_patterns or system_recommendation, check on the current public
Databricks docs that its release state is acceptable and that it is available in the target
workspace; Databricks preview releases
explains the states. Check first, then recommend; never recommend now and verify later.
Record the state in the pattern's release_state (ga, public_preview, private_preview,
beta, or unknown when you could not verify it) and cite the page in release_state_source. The
validator requires a state on every simplification_pattern: true pattern and a source for the
preview and beta states. A preview or beta capability may still be recommended: record its state and
let the customer decide. flowx-route shows the state as a plain label, and nothing for ga and
unknown.
Author the insights JSON, then call enrich. The library validates it against the inventory
and the saved source graphs and, only when clean, writes agentic_insights.json and rebuilds the
inventory. On any violation both files are left untouched and you get the full list of
problems to fix in one pass.
See insights.md in this skill directory for the exact insights shape, every field, and the
validation rules the library enforces.
Run the setup skill first if you haven't. Both paths run the same validate-and-record contract.
MCP tool (Databricks Genie Code, or a local stdio registration): call the single flowx
tool with command="enrich". On the hosted server you cannot read output_dir, so first read the
inventory and the activity details with action="prepare". It returns metadata/inventory.json inline
as bundle.files["inventory.json"] and, when discover wrote it (ADF does, Airflow does not),
metadata/source_graphs.json as bundle.files["source_graphs.json"], the same way package returns a
bundle; pass output_volume_path or output_workspace_path to have them uploaded there instead. A file
too large to return inline makes prepare fail with ok: false, naming that file and those two
options. Then record the insights (the default action="apply") with either inline insights or a file:
flowx(command="enrich", parameters={"output_dir": "<dir>", "action": "prepare"}) # read inventory.json + source_graphs.json
flowx(command="enrich", parameters={"output_dir": "<dir>", "insights": { ... }}) # inline object
flowx(command="enrich", parameters={"output_dir": "<dir>", "insights_path": "<file>"})
Provide exactly one of insights (inline object) or insights_path. ok reflects validation;
result.violations lists any problems. Run no python3/$PY commands on this path.
venv CLI (local, no MCP server): ensure the venv exists (setup / bootstrap.sh), then:
export PYTHONPATH="<plugin_dir>/src"
PY="$(cat <plugin_dir>/.migration-venv)"
"$PY" -m flowx.adapter enrich --output-dir <dir> --insights-path authored_insights.json
Both --output-dir and --insights-path are required; --out <file> optionally writes the result
JSON to a file instead of stdout. Exit code 0 means the insights were recorded; exit code 1 prints
the violations JSON and leaves the inventory untouched.
enrich is idempotent: it records the validated insights in
metadata/agentic_insights.json (stamping schema_version, inventory_sha256, source_graphs_sha256
and agentic_insights_sha256), then rebuilds inventory.json itself from the saved source_graphs.json
(or, for an inventory that records no graphs hash, from its existing deterministic part) plus that
document rather than patching it in place. The insights block is replaced wholesale (never stacks),
and every deterministic inventory key stays byte-identical. Re-running with the same insights rewrites the same bytes; re-running
with different insights replaces the block. A validation failure writes nothing.
Don't run enrich alongside discover or another enrich on the same output folder. If it fails, run
it again.
If enrich reports that metadata/.enrich.lock exists and no other enrich is running, an earlier
run stopped mid-write. Clear the lock, then enrich again:
metadata/.enrich.lock and run enrich again; it rewrites both files.output_dir, so run discover again (it
clears metadata/, the lock with it), then enrich with action="prepare" and apply the insights again.After the inventory is enriched, continue with flowx-route to recommend and record a
per-connected-component conversion route (deterministic vs. agentic), then convert and package.
insights.md — the insights shape, every field, and the validator's rules.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
10 skills in this plugin
/flowx-convertTranslate a source's parsed inventory into Databricks IR (intermediate representation): run deterministic translators for known types, then agentic (LLM-assisted) translation for the gaps. Phase 2 of the flowx migration workflow; routes to a source-specific guide.
/flowx-deployDeploy the per-pipeline Declarative Automation Bundles from a multi-pipeline flowx migration in dependency order, resolving cross-bundle job ids automatically. Local CLI only.
/flowx-discoverParse a source orchestrator's pipeline definitions (Azure Data Factory, Apache Airflow) into a typed inventory that classifies every task as deterministic, agentic, or unsupported. Phase 1 of the flowx migration workflow; routes to a source-specific guide.
npx claudepluginhub databricks-solutions/flowx --plugin flowx