How to get scope document from ADF pipeline and notebooks

I’m generating an Excel report from Databricks.
The ADF pipeline updates parameters (time period, country, etc.).
The notebook uses input files defined inside the pipeline.
I would like Cursor to analyze the entire workflow end‑to‑end and tell the full story of what happens:

which inputs are used,
how the data is extracted,
what transformations are applied,
what the perimeter and time periods are.

My goal is to get instructions to replicate this same report on another platform.
So I want Cursor to tell me which fields I need, the required input structure, the logic, the perimeter, and all functional rules.
What is the best prompt to submit to Cursor?

Thanks for your help

Hey @Redouane_Laoufi!

It’s to overthink the prompt engineering side of things! The great thing about Cursor is you can just ask it what you need in plain language, and you basically already wrote the perfect prompt in your question. Open your pipeline and notebook files, reference them with @ , and ask Cursor to trace the full flow and document it as a functional spec. If the output is missing something, just follow up and ask for more details on that part. You’ll get there in a couple of turns.

For example, putting your question into Cursor, this was the suggested prompt:

Analyze this end-to-end data pipeline and produce a full functional specification I can use to replicate the report on another platform.

Start from the ADF pipeline definition (@pipeline.json or relevant file) and trace through to the Databricks notebook (@notebook).

For each stage, document:

  1. Inputs — every source table, file, or parameter (name, type, where it comes from, example values)
  2. Extraction — SQL queries or reads, including any filters, joins, or WHERE clauses
  3. Transformations — calculated columns, aggregations, pivots, formatting, business rules
  4. Perimeter & time periods — how the data scope is defined (country filters, date ranges, fiscal periods) and how ADF parameters control them
  5. Output — final Excel structure (sheets, columns, sort order, formatting)

Present the result as a functional spec with: required input schema, transformation logic (pseudocode or SQL), business rules, and output format — detailed enough that a developer on a completely different stack could reproduce the exact same report.

Hi Colin,

Thank you very much for your help — I’m now able to submit prompts and get results.

However, I’ve noticed that each time I submit a prompt, Cursor automatically generates a script.
My question is: is the script supposed to be generic enough to work for any pipeline, or should Cursor instead use its agents to analyze each pipeline and return feedback only?
Does that make sense?

What would be the best prompt to achieve this behavior?

Thanks again!

Hi @Redouane_Laoufi!

I’m not familiar enough with your work to provide a definitive answer. However, you can ask Cursor the same question—it has the context of what you’re working on. You can also instruct Cursor to always generate a script (or not) and to run the script itself and summarize the feedback.