Skip to content
ProtocolProtocol
← Your pathLevel 1 · Beginner

Environments, and why the analysis broke six months later

Lesson 4 of 6 · From chat to script

1 · Learn the move · Cognitive verifier

The analysis that ran in March and crashes in September did not decay - its environment drifted. A package updated, a default changed, and your script now runs against a different toolchain with the same name. Interrogate what the analysis depends on, sub-question by sub-question: Which interpreter version? Which packages does the script import - directly, and through them? Which versions are installed? Where is any of that recorded? The honest answers usually end at "nowhere," which is the finding. Then the repair: an environment file generated from your real, working installation - conda env export or pip freeze, run by you, where it works - never from the model's memory of typical versions, which describes a fiction. The file lives in the repo next to the script it protects, and future-you rebuilds the March toolchain in one command.

Verify my analysis environment by sub-questions, one at a time: (1) which interpreter and version does [script] actually run under - and what command proves it; (2) which packages does it import, directly and transitively - derive the direct list from the script text I paste; (3) which versions are installed - give me the command to run, and build the environment file ONLY from the output I paste back, never from typical versions; (4) where is this recorded - and if the answer is nowhere, produce the file, name it, and state where it lives in the repo. Finish with the one-command rebuild instruction and what it does and does not guarantee.

2 · Your turn. You write the prompt

Your proteomics differential-abundance script from February now throws errors on a fresh machine, and the postdoc who wrote parts of it has left the lab. Before touching a single line of the code itself, run the environment interrogation from the top - the script may be entirely innocent.

Remember: the AI sees only your prompt, not this page. If the situation isn't in your prompt, it doesn't exist.

Optional. These shape the output when you run your prompt below, not your score.