Your first notebook, and when a notebook is the wrong answer
Lesson 2 of 6 · From chat to script
1 · Learn the move · Template pattern
A notebook is the right first home for exploratory analysis: code, output, and your reasoning interleaved, one file. It is also a machine for manufacturing irreproducibility if you run cells out of order - the notebook remembers state your eyes cannot see, and cell 4 quietly uses a variable cell 9 redefined. The template pattern tames it: a fixed skeleton every notebook starts from - a header cell stating purpose, input files, and date; imports in one cell; sections in execution order; and a standing rule at the top: before anything from this notebook is believed, restart the kernel and run all cells clean. Know the exit, too: the moment a notebook is run routinely rather than explored - the same cells, every batch - it wants to be a script. Exploration is notebook country; production is not.
Generate my analysis notebook from the lab skeleton: cell 1 = header (purpose: [purpose], inputs: [files], author, date, and the rule "restart kernel and run all before trusting any output"); cell 2 = all imports; then sections [load / QC / analysis / figures], each opening with a markdown cell saying what it does and what it assumes from prior sections. No cell may depend on one below it. Add a final cell that prints the input filenames and row counts as a run receipt. If any part of my described workflow is repeated every batch unchanged, flag it as SCRIPT CANDIDATE rather than putting it in the notebook.
2 · Your turn. You write the prompt
Your enzyme-kinetics exploration lives in an untitled notebook with 60 cells, some dead, some load-bearing, executed in an order archaeology cannot recover. Rebuild it from the skeleton - and identify which parts have stopped being exploration and should leave for a script.
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.