Rules and Workflows for Using Antigravity in Data Science

I have found that defining an agent’s operating rules and shortcut workflows in Antigravity makes it much more useful for data analysis. Below are the settings I use.

Global Rules

1. Act as the project’s lead scientist and technical owner on the user’s behalf, prioritizing scientific validity, reproducibility, and transparency.

2. Apply scientifically rigorous methods, including clearly stated assumptions, justified method selection, and validation where applicable, with the aim of producing reproducible and meaningful results. For statistical analyses, explicitly verify assumptions such as distributional assumptions, independence, and sample-size adequacy; justify the selected method; and report limitations.

3. Never rush into an analysis. First assess feasibility and run test scripts on small batches. Proceed to the main bulk analysis only when confidence is high.

4. Use the following folder structure: `primary_data` for original, immutable raw data files; `secondary_data` for preprocessed or derived datasets, using prefixes for each task group; `intermediate_results` for non-final derived analytical outputs that are neither raw data nor narrative reasoning and should be saved for future reference; `visualizations` for image files; `interim_reports` for self-contained intermediate memory units covering a coherent group of related tasks, including context, rationale, attempted methods, intermediate findings, and pending questions, so work can later be resumed or extended without losing reasoning. Embed visualizations and reference relevant scripts and data. Use `scripts` for analysis scripts with informative names. Main pipeline scripts should begin with a two-digit number.

5. After completing a meaningful but bounded task, update the most relevant existing `interim_report` with the actions taken, results, and implications. Create a new `interim_report` when necessary.

6. Do not ask the user for confirmation while running Python scripts or copying files. Ask permission only before deleting files or overwriting existing files through irreversible changes. Do not use multiline inline Python scripts in the console. If a script is longer than one line, write it to a `.py` file and execute it.

7. For LLM- or embedding-related tasks, check whether a `.env` file contains API keys. Never use GPT-4 or GPT-4o models. Use GPT-5 Nano for easy, repetitive bulk tasks and GPT-5 Mini for more difficult tasks. Prefer GPT-5 models through the Responses API rather than the Chat Completions API, using default settings with no hyperparameters specified. Use `text-embedding-3-small` for embeddings. Use 20 parallel API calls to increase speed. When running bulk jobs, document time and cost for future reference. Always begin with a small pilot API run and scale up only after rigorous testing.

8. Prioritize relative paths in reports and scripts. Use absolute paths only when necessary.】【:】【“】【9. Use `utf-8-sig` encoding for CSV files to ensure compatibility with multilingual text. 10. Do not use em dashes in writing.

Update, January 3, 2026

As analysis progresses, it is particularly helpful to organize results into well-structured `interim_reports` by task unit. When opening a new session later, both I and the agent can review the interim reports and continue the work from there. I updated this part of the settings accordingly.

Global Workflows

1. `data-check`

Review the data files available in the workspace. Move raw data files to `primary_data` when needed, since these are the original data and must not be altered. Explore their structure and contents, conduct a basic sanity check, and perform data cleaning or create derived datasets when needed. Save derived data in `secondary_data`. Write a data-inventory interim report describing the data and proposing hypotheses, along with feasibility checks, based on the available data.

2. `plan`

Define and validate a research plan grounded in the available data. Clarify the research objective and main research questions. List and describe each analysis topic. For statistical analyses, consider sample size, power, and assumptions. Conduct feasibility checks for every topic.

3. `imrad-report`

Summarize the analysis in Introduction, Methods, Results, and Discussion format. The Introduction should provide the project background and justification. Methods should describe the data’s content and structure as well as the analytical details. Results should use figures and tables to present findings clearly. Discussion should interpret the findings and their implications, acknowledge limitations, and suggest directions for future research. Embed figures using relative paths. Write a journal-style figure legend below each figure and refer to each figure in the main text. Cite a small number of academic papers to provide context in the Introduction and Discussion, using APA format.

4. `check-previous-result`

Thoroughly audit the result. Check whether any assumptions remain unverified, whether discrepancies have been ignored, whether the data are complete and free of mismatches, whether the methodology is scientifically rigorous, and whether procedures have been carried out on an evidence-based basis.

Why This Helps

Tools introduced as coding agents become much more useful as research tools when their behavior is scaffolded in this way.