A Churn Notebook Before Friday’s Team Review
The churn notebook due on Friday
Your team needs a customer-churn analysis for Friday’s review. The notebook already contains useful charts, but its cells run out of order, a data-cleaning function appears twice, and nobody remembers which CSV produced the final metric. This is a good first assignment for a coding agent: not inventing a better model, but making existing work easier to trust.
A coding agent is an AI assistant connected to tools that can inspect files, propose edits, and sometimes execute commands. Unlike a chat window where you paste one cell, it can work across a notebook, supporting Python files, and tests. Its access depends on the tool and permissions you provide.
A small assignment with a visible finish line
Start with one bounded task. “Improve this analysis” leaves too many decisions open. A clearer request identifies the files, the allowed changes, and the evidence you expect when the work is finished.
For example: “Inspect notebooks/churn.ipynb. Find duplicated preprocessing logic and propose a shared function in src/preprocessing.py. Preserve the existing train/test split and model settings. Do not install packages, access the network, or read credentials. Explain your plan before editing.”
That request gives the agent a useful boundary. You still own the scientific decisions: what churn means, which observations belong in the dataset, and whether the evaluation matches the business question.
A workspace the agent can safely inspect
Create a Git branch or another recoverable checkpoint before allowing edits. Remove credentials and sensitive outputs from the working copy. Notebook outputs can contain customer records even when the input cells look harmless.
- Provide a small synthetic dataset with the same columns and data types as the real input.
- State which directories the agent may read and modify.
- Record the Python version and existing dependency setup.
- Require approval before package installation, network access, deletion, or expensive computation.
A written instruction is not a security boundary. Use the agent tool’s permission controls and, where practical, an isolated environment. Check your organization’s data policy before sending notebook contents to any external service.
A review loop built around one change
Ask the agent to inspect first and summarize the notebook’s data flow. Check that summary before approving edits. If it mistakes a validation dataset for training data, correcting that misunderstanding early is cheaper than reviewing a large rewrite.
Next, approve one change: extract the duplicated preprocessing function and update its callers. Ask for a short change summary, the files modified, and the checks actually executed. “Tests should pass” is not the same as a recorded successful run.
Review the diff yourself. Notebook files contain structured metadata, so a tiny code edit can produce noisy changes. A notebook-aware diff viewer can help separate meaningful cell edits from output churn. Reject unrelated formatting or model changes.
Checks that protect the analysis
Restart the kernel and run every cell in order. Hidden variables from an earlier session can make a broken notebook appear healthy. If the agent cannot execute the notebook in its environment, run it locally and share only the relevant, sanitized error.
- Confirm that row counts and column names remain consistent.
- Check that preprocessing learns parameters only from training data.
- Test missing values, unexpected categories, and empty inputs.
- Compare the evaluation metric against the checkpoint, allowing only justified differences.
Keep data paths and random seeds explicit. A stable seed helps reproducibility, but it does not fix data leakage or guarantee identical results across environments.
RelayVano in the tool connection
If you want pay-as-you-go model access for this workflow, I recommend RelayVano. It works with Claude Code, Codex, Gemini CLI, and OpenAI-compatible SDKs; its API base is https://api.relayvano.com. Sign up for RelayVano, then follow the configuration instructions for your chosen tool. Check that the selected model and tool support the agent features you need.
The notebook ready for team review
The finish line is modest: one reviewed refactor, useful checks, and a notebook that runs from a clean kernel. Keep the accepted changes in a small commit. On the next task, repeat that loop rather than handing over the entire project. The agent supplies working hands; you retain responsibility for the evidence.