microsoft-planetary-computer-pro
Copilot instructions4 starsChanged 9 months agoMITView on GitHub
The main notebook applications/storm_impact_assessment/hurricane_forecast_infra_impact.ipynb is 1.57 MB / 19K JSON lines / 71 cells with 1.07 MB of embedded outputs. This exceeds VS Code's diff editor limits and causes Copilot edit tools (edit_notebook_file, replace_string_in_file) to fail silently or produce corrupt edits. When making complex edits with multiline old/new text:
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,336 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this copilot-instructions.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 63
When making complex edits with multiline old/new text:
≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot Instructions for aurora_hackathon
Critical: Large Notebook Handling
The main notebook applications/storm_impact_assessment/hurricane_forecast_infra_impact.ipynb is 1.57 MB / 19K JSON lines / 71 cells with 1.07 MB of embedded outputs. This exceeds VS Code's diff editor limits and causes Copilot edit tools (edit_notebook_file, replace_string_in_file) to fail silently or produce corrupt edits.
Rules for Editing the Notebook
- NEVER use VS Code's built-in notebook edit tools (
edit_notebook_file,replace_string_in_file) onapplications/storm_impact_assessment/hurricane_forecast_infra_impact.ipynb. They will fail due to file size. - ALWAYS use
python applications/storm_impact_assessment/scripts/nb_edit.pycommands in the terminal (from the repo root) to read and modify the notebook. The script operates directly on the.ipynbJSON and auto-creates backups. - For reading cell content:
python applications/storm_impact_assessment/scripts/nb_edit.py read <cell_index> # full cell python applications/storm_impact_assessment/scripts/nb_edit.py read <cell_index> --lines 50-80 # specific lines - For searching across all cells:
python applications/storm_impact_assessment/scripts/nb_edit.py search "function_name" - For replacing text in a cell:
# Simple inline replacement python applications/storm_impact_assessment/scripts/nb_edit.py replace <cell_index> --old "old_text" --new "new_text" # Multiline replacement using temp files # Step 1: Write old text to a temp file # Step 2: Write new text to a temp file # Step 3: Run replacement python applications/storm_impact_assessment/scripts/nb_edit.py replace <cell_index> --old-file old.txt --new-file new.txt - For replacing a range of lines in a cell:
# First read the lines to verify python applications/storm_impact_assessment/scripts/nb_edit.py read <cell_index> --lines 100-120 # Write new content to a file, then replace python applications/storm_impact_assessment/scripts/nb_edit.py replace-lines <cell_index> --lines 100-120 --file new_content.py - For inserting or deleting cells:
python applications/storm_impact_assessment/scripts/nb_edit.py insert <after_index> --type code --file content.py python applications/storm_impact_assessment/scripts/nb_edit.py delete <cell_index> - For listing all cells:
python applications/storm_impact_assessment/scripts/nb_edit.py list - For reducing file size (clear outputs):
python applications/storm_impact_assessment/scripts/nb_edit.py clear-outputs # all cells python applications/storm_impact_assessment/scripts/nb_edit.py clear-outputs --cell 21 # specific cell
Workflow for Multi-line Edits
When making complex edits with multiline old/new text:
# 1. Read the target area
python applications/storm_impact_assessment/scripts/nb_edit.py read <cell> --lines <start>-<end>
# 2. Create temp files with the old and new content
# (use create_file tool to write old.txt and new.txt)
# 3. Apply the replacement
python applications/storm_impact_assessment/scripts/nb_edit.py replace <cell> --old-file old.txt --new-file new.txt
# 4. Verify the edit
python applications/storm_impact_assessment/scripts/nb_edit.py read <cell> --lines <start>-<end>
# 5. Clean up temp filesProject Context
- This is an Azure Aurora AI weather model project for hurricane forecasting and infrastructure impact analysis.
- The notebook processes GRIB2/NetCDF weather data, runs Aurora model inference, and overlays infrastructure data from Microsoft Planetary Computer (STAC catalog) and Azure GeoCatalog.
- Key dependencies:
microsoft-aurora,xarray,pystac-client,geopandas,folium,azure-ai-inference. - Python environment is managed via
pyenv(Python 3.13.0).
Cell Index Reference (0-based) — 71 cells total
- Cells 0-3: Title, intro markdown, pre-requisites
- Cells 4-5: Environment setup (dotenv, Azure config)
- Cell 6: Markdown — Download Storm Data from IBTrACS
- Cell 7: Large helper/utility functions (1425 lines) — core data processing
- Cells 8-9: Markdown — Download Model Input Data, data availability check
- Cell 10: Data availability check code (461 lines)
- Cells 11-16: Download OPER/SCDA stream data, merge GRIB files (markdown + code)
- Cells 17-18: Open & combine GRIB/xarray datasets
- Cells 19-26: Upload to Azure GeoCatalog (blob storage, STAC ingest, render config, fallback URLs)
- Cells 27-28: Download ERA5 static variables
- Cells 29-39: Prepare Aurora Batch (surface, atmospheric, static vars, create batch, verify dims)
- Cell 30: Markdown — Build Unified Impact Zone (misplaced section header)
- Cells 40-41: Run Aurora Model Inference (markdown + code, 275 lines)
- Cells 42-45: Upload forecast results to GeoCatalog, configure visualization
- Cells 46-49: Visualize Hurricane Track (matplotlib, track extraction — cells 48-49 are large: 425/505 lines)
- Cells 50-52: Upload track & impact swath to GeoCatalog, fallback URLs
- Cells 53-56: Infrastructure Impact Analysis setup (markdown, package install, imports)
- Cells 57-58: Create Storm Cone of Uncertainty
- Cells 59-66: Query power infrastructure from OpenStreetMap (Overpass API, substations, power lines, summary)
- Cells 67-68: Ingest infrastructure data to GeoCatalog (cell 68: 683 lines)
- Cells 69-70: Animated storm & infrastructure map (cell 70: 1167 lines, STAC/endpoint fallback)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

