Complete AI Training

AI agent for phd students

Analysis Plan Deviation Tracker Agent

Produce a complete deviation log that matches the analysis actually run to the plan written.

Analysis Plan Deviation Tracker Agent: what goes in, what the agent does and what you get

What it does

A written analysis plan protects a study from after-the-fact choices, but real projects change: an exclusion rule shifts, a model is swapped, a test is added. Those changes are often forgotten by the time of writing. This agent reads the written plan and breaks it into checkable items such as variables, exclusions, models, tests and thresholds. It then reads the analysis scripts and outputs and compares each item. Where the script differs, it flags the difference and asks the researcher for the reason and the date. It builds a deviation log marking each change as planned, justified or unexplained, and rechecks after every edit to the scripts. It never changes the scripts. The researcher approves the log. Edge case: an added exploratory test is logged as exploratory, not as a deviation from the primary plan.

How it works

Follow the arrows from top to bottom. The orange dashed arrow is the loop: when a check fails, the agent goes back and tries again.

Start and resultWhat it doesA check on its own workWaits for your OKGoes back and retries
ApprovedYes, continueYes, continueApprovedNoNo 1 STARTS WHEN Scripts or outputs change 2 USES A TOOL Parse the plan into checkable items 3 USES A TOOL Read the scripts and outputs and extract the sameitems 4 DOES Compare each item between plan and scripts 5 DOES List differences and mark exploratory additions 6 YOU APPROVE Researcher approves sending the questions aboutreasons 7 DOES Record reasons and dates in the deviation log 8 CHECKS THE RESULT Does every deviation have a reason and date? If not: mark unexplained and ask again. Back to step 5. 9 CHECKS THE RESULT After the next edit, do the scripts still match thelogged state? If not: compare again and add the new differences to thelog. Back to step 3. 10 YOU APPROVE Researcher approves the log 11 RESULT Deviation log for the paper
Read the steps as a list
  1. Scripts or outputs change
  2. Parse the plan into checkable items
  3. Read the scripts and outputs and extract the same items
  4. Compare each item between plan and scripts
  5. List differences and mark exploratory additions
  6. Researcher approves sending the questions about reasonsThe agent waits here for your OK.
  7. Record reasons and dates in the deviation log
  8. Does every deviation have a reason and date?If not: mark unexplained and ask again. Back to step 5.
  9. After the next edit, do the scripts still match the logged state?If not: compare again and add the new differences to the log. Back to step 3.
  10. Researcher approves the logThe agent waits here for your OK.
  11. Deviation log for the paper

How it decides

It counts any difference in variables, exclusions, models, tests or thresholds as a deviation, and sorts it as justified only when the researcher gives a reason and date.

  • Count any change to exclusion rules, models or thresholds as a deviation
  • Log added tests as exploratory, not as deviations
  • Mark a deviation unexplained until a reason and date are recorded
  • Re-run the comparison after every script version

Make it yours

Every agent is a starting point. You choose these settings for your own situation.

  • Plan items to track
  • Where scripts live
  • Exploratory label rule
  • Question template
  • Log format

What keeps you in control

It always asks you first

  • Questions sent to the team
  • The final deviation log

Hard limits

  • Never edit the plan or scripts
  • Never mark a deviation justified without a recorded reason

It stops when

  • Done: log complete and approved
  • Stop: plan document missing

Set it up

We guide you through the set-up, step by step

Members get the full set-up guide for this agent. No technical skills needed: you copy, paste and upload.

10 minto set it up in your AI
5 AIsChatGPT, Claude, Copilot, Gemini, Grok
  • One set of instructions to paste into your AI, with the clicks for ChatGPT, Claude, Microsoft 365 Copilot, Gemini and Grok
  • The agent then walks you through connecting your own data, one source at a time
  • A downloadable copy with the flow chart, the rules and the full guide
Get access to this agent

An example run

What happensThe plan said exclude participants with accuracy under 60%. The script used 65%, and a robust regression replaced the planned ANOVA. The agent logged both and asked why. The researcher said the 65% cutoff came from a pilot on 12 March, and the ANOVA failed assumptions. After a later edit added a third test, the agent logged it as exploratory. The researcher approved the log.

More agents for phd students