Skip to content

Phase 1 stack #3: agentic insights / enrich - #95

Open
matthewmoorcroft wants to merge 10 commits into
stack/adf-discoveryfrom
stack/agentic-insights
Open

matthewmoorcroft wants to merge 10 commits into
stack/adf-discoveryfrom
stack/agentic-insights

Conversation

@matthewmoorcroft

@matthewmoorcroft matthewmoorcroft commented Sep 16, 2026

Copy link
Copy Markdown
Member

Part of the Phase 1 stack. Base: stack/adf-discovery. (Content of the former #82.)

What this adds

An optional, source-neutral, agent-authored insights layer over discovery. The deterministic inventory records what the source is; an external agent authors judgment; the library has no LLM — it validates the authored object and atomically merges it under one additive insights block.

Schema (insights block)

schema_version, inventory_sha256 (fingerprint binding), overview, system_recommendation, pipeline_insights[], pipeline_relationships[] — with recommended_patterns[] and per-pattern simplification_pattern.

Contract

enrich validates foreign keys / lineage refs / evidence / schema, stamps the library-owned fields, and atomically merges. Author→validate→merge; nothing else in the inventory changes.

GA/Preview release state — structured, validated, tiered disclosure

What. Two new optional fields on each recommended_patterns[] entry (per pipeline and system-wide):

  • release_state — one of ga / public_preview / private_preview / beta / unknown.
  • release_state_source — the doc URL / citation grounding the state.

Why. GA/Preview grounding used to be prose-only in the enrich skill (verify status, then write it into fit/conversion_notes). Nothing structured it, the validator never checked it, and the closed key allow-list would have rejected a status field. This makes it a real, validated, structured field that downstream routing can surface consistently.

How it works (validator rules, all violations aggregated — no fail-fast):

  • release_state is enum-validated when present.
  • Required-when: release_state is required whenever simplification_pattern == true — a distinctive capability must declare its verified release state.
  • Citation-required: release_state_source (a non-empty string) is required when release_state ∈ {public_preview, private_preview, beta}; not required for ga / unknown.

Surfacing intent (neutral factual disclosure, not a warning — see #97 for the routing side):
ga and unknown are silent (unknown is treated exactly like ga); public_preview is disclosed as "Public Preview (production-ready)" (Public Preview is generally production-ready and supported per Databricks); private_preview / beta are stated as plain factual labels. No alarm/severity/warning framing.

Grounding rule kept as-is (independent of surfacing tone): verify GA/Preview status against current public Databricks docs before recommending (never "recommend now, verify later").

Private Preview is now disclose-and-decide, not a hard gate. The earlier draft treated a Private Preview feature as doNotSuggest unless the workspace had confirmed enrollment/entitlement. Because release state goes stale and enrollment is the customer's decision, the skill now discloses the verified release state (via the structured release_state / release_state_source fields), notes that Private Preview typically requires workspace enrollment/entitlement, and lets the customer decide whether to proceed — the tool no longer unilaterally refuses to suggest it (there is no doNotSuggest gate). The verify-before-recommend requirement and the neutral (non-warning) surfacing are unchanged.

No hardcoded GA/Preview status in the skill text or examples

Hardcoded GA/Preview statuses go stale — we confirmed via live docs that a real connector's release state had already moved (a "Gateway CDC = Private Preview" style claim can be wrong; SQL Server LFC is GA). So the enrich skill's illustrative JSON examples no longer pin any real named connector to a literal status value: the system_recommendation and pipeline_insights examples now use anonymized pattern names with a clearly-placeholder release_state that tells the author to verify live and not copy it, and the decision_driver example no longer hardcodes "GA". A grep of the enrich skill confirms no real-connector-to-status literal remains; everything routes through live verification + the structured disclosure fields. (The parallel Airflow-side grounding rule is tracked separately in #103 and is untouched here.)

Back-compat. The new fields are optional; insights authored before this field still validate — except the one intended new strictness: simplification_pattern == true now requires release_state.

This pull request and its description were written by Isaac.

matthewmoorcroft and others added 2 commits September 16, 2026 17:25
Add a source-neutral insights artifact (models/insights.py) and an
enrich_inventory pass (discovery_insights.py) that layers agentic insights
onto the unified inventory, with a validator that forbids inferred-only keys
by presence and aggregates per-edge errors. Expose it through the discover
CLI and MCP (enrich subcommand) and document it in the flowx-discover skill.

Consolidates PR #82 (agentic insights enrich_inventory + validator + CLI/MCP).

Co-authored-by: Isaac <no-reply@databricks.com>
Introduces the first-class flowx-enrich skill (SKILL.md + insights.md,
moved here from flowx-discover) and reframes flowx-discover to chain into
enrich by default while keeping a deterministic-only skip path. Registers
flowx-enrich in the plugin manifest.

The agent authors the insights JSON; the library only validates and merges
it (no LLM in the library). Skill/manifest docs only; no src/ changes.

Co-authored-by: Isaac <no-reply@databricks.com>
matthewmoorcroft added a commit that referenced this pull request Sep 17, 2026
Propagate the flowx-enrich skill (from #95) up the stack ahead of adding
the routing skill changes on this branch.

Co-authored-by: Isaac <no-reply@databricks.com>
matthewmoorcroft and others added 7 commits September 18, 2026 11:32
FIX 4: The insights validator only accepts edge_type 'control'/'inferred'.
Improve the rejection message so a mis-typed cross-pipeline data coupling (e.g.
edge_type 'data') is steered onto the 'inferred' tier with the required
'evidence' + 'confidence', instead of just being rejected. Add an explicit
"data coupling -> inferred" worked example (wrong vs. right) to the enrich
insights.md reference, and strengthen the regression test to assert the guidance.

FIX 8a: Port the GA/Preview grounding guidance that previously lived only in the
Airflow skill into flowx-enrich. Before recommending a connector or Lakeflow
Connect pattern, the authoring agent must verify the feature's current
GA-vs-Preview status AND target-workspace availability against public Databricks
docs and cite the source; Private Preview is treated as doNotSuggest absent
confirmed enrollment. Prose/guidance only.

Co-authored-by: Isaac <no-reply@databricks.com>
Propagate the discover loud-0-pipeline warning + activity-count units label up
the stack.

Co-authored-by: Isaac <no-reply@databricks.com>
Cross-review BLOCKING 2: the FIX 8a prose contradicted itself -- it required
verify-before-recommend but then permitted a conditional recommendation when
release state is uncertain, and it required citing the source but not recording
the resolved status.

Fix: remove the conditional-recommendation escape hatch. The agent MUST verify
each recommended capability/connector's GA-vs-Preview status AND workspace
availability against current public Databricks docs BEFORE recommending it, and
MUST record the resolved GA/Preview status (and cite the doc source) in the
pattern's fit / conversion_notes. If it cannot verify, it must not recommend the
capability and should offer a verified alternative instead. Consistent with the
Airflow lakeflow-connect grounding it was ported from. Prose only; references
only real insight fields (fit / conversion_notes / recommended_patterns).

Co-authored-by: Isaac <no-reply@databricks.com>
…insights

Propagate the --adf-source-path warning correction up the stack.

Co-authored-by: Isaac <no-reply@databricks.com>
…mended patterns

Turn the enrich GA-grounding rule from prose into a real, validated, structured
field. RecommendedPattern gains optional release_state
("ga"/"public_preview"/"private_preview"/"beta"/"unknown") + release_state_source
(the doc citation). The insights validator now:

- enum-validates release_state when present;
- REQUIRES release_state when simplification_pattern is true (intended new
  strictness -- a distinctive capability must declare its verified release state);
- REQUIRES a non-empty release_state_source for public_preview/private_preview/beta
  (not for ga/unknown);
- aggregates all violations (no fail-fast), like the rest of the module.

The enrich skill prose now sets the structured fields instead of burying status in
fit/conversion_notes, and documents the tiered surfacing intent: ga = no warning;
public_preview = informational disclosure (production-ready per Databricks, confirm
availability); private_preview & beta = prominent warning; unknown = could not
verify, prefer a verified alternative. The verify-before-recommend /
never-recommend-now-verify-later rule is kept.

Fields are optional/back-compat; only the simplification-requires-release_state rule
is a stricter check.

Co-authored-by: Isaac <no-reply@databricks.com>
Revise the release-state surfacing to pure factual disclosure per design review;
the validator/grounding rules are unchanged (release_state still required when
simplification_pattern is true; release_state_source still required for
public_preview/private_preview/beta). Only how the state is *surfaced* changes:

- ga and unknown are silent (unknown is treated exactly like ga);
- public_preview is disclosed as "Public Preview (production-ready)";
- private_preview and beta are stated as plain factual labels.

Drop the prominent-warning / not-production-ready / gated framing from the skill
prose and the RecommendedPattern docstring. The separate recommendation-eligibility
rule (treat Private Preview as doNotSuggest without confirmed enrollment) and the
verify-before-recommend grounding rule are kept as-is.

Co-authored-by: Isaac <no-reply@databricks.com>
Follow the neutral-disclosure design through the RELEASE_STATES constant comment
(state definitions are now purely factual; surfacing is described on
RecommendedPattern.release_state) and the validator docstring ("disclose" rather
than "warn"). No behavior change.

Co-authored-by: Isaac <no-reply@databricks.com>
…rop hardcoded release_state examples

Private Preview features are no longer hard-gated as `doNotSuggest`.
Instead the flowx-enrich skill now says to disclose the verified release
state via the structured release_state / release_state_source fields, note
that Private Preview typically needs workspace enrollment/entitlement, and
let the customer decide whether to proceed — the tool does not unilaterally
refuse to suggest it. The requirement to verify the release state against
current public docs before recommending is kept, and so is the neutral
(non-warning) surfacing. The release_state mechanism and validator rules
are unchanged.

Also neutralize the illustrative JSON examples so no real connector is
pinned to a literal GA/Preview status (release state goes stale): the
system_recommendation and pipeline_insights examples now use anonymized
pattern names with a clearly-placeholder release_state value that tells the
author to verify live and not copy it. No real-connector-to-status literal
remains in the enrich skill. The Airflow-side grounding rule is tracked
separately (#103) and is untouched here.

Co-authored-by: Isaac <no-reply@databricks.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant