ArcPy Plan
Create a concrete, step‑by‑step ArcPy plan before writing code. Plans should be grounded in the actual ArcGIS Pro project context.
Intent
Turn a GIS task into a deterministic sequence of ArcPy operations, with inputs, outputs, and checks defined up front.
Inputs
task_description(string)project_path(string, optional)map_name(string, optional)output_workspace(string, optional)constraints(string, optional)
Use arcgispro-cli (preferred)
If available, gather real project context:
arcgispro layers --jsonarcgispro fields "LayerName"arcgispro connections
Use real layer/field names and data sources in the plan.
Output
A plan object with:
inputs: layers/tables/pathssteps: ordered ArcPy tools with purposeoutputs: new datasets + locationschecks: preflight validations and countsrisks: destructive operations or performance concerns
Example
User: “Find parcels within 500 ft of schools and export.”
Plan:
- Validate layers:
Parcels,Schoolsexist - Select schools (optional filter)
- Buffer schools (500 ft) →
Schools_Buffer_500 - Select parcels by location intersecting buffer
- Export selection to Output.gdb
- Report counts
Outputs
Return a concise, usable result with the key artifacts or recommendations.
Safety
Do not invent data, credentials, or system context. Flag uncertainty and risky operations clearly.