The engagement
A neuroscience lab with research-grade questions and engineering-grade needs.
The Social Brain Lab studies how brains respond to others — pain, empathy, aggression, social agency. The science is world-class. The engineering bandwidth inside the lab is the engineering bandwidth of any working research group: a few people who can code, none of them full-time on infrastructure.
The engagement covers two distinct deliverables that needed the same shape of partner. A senior engineer who could design things lab members would own afterwards.
Deliverable one
A public website the lab can run by itself.
The Social Brain Lab needed a public face. Seventeen pages: PI bios, group members, research areas, publications, news, opportunities. The constraint was the long-term one. The lab had to be able to update it without calling an engineer back every time a paper landed or a postdoc joined.
The architecture decision was an entity-driven static site. All content lives in versioned JSON files (one per entity: people.json, publications.json, projects.json). The pages render from those files at build time. Adding a person is a JSON edit, not an HTML edit.
The maintenance workflow uses ChatGPT Codex CLI plus GitHub plus Netlify. A lab member writes a natural-language change request ("add Dr. X to the postdoc list, replace her bio with this paragraph"), Codex makes the JSON edit, git push triggers Netlify deploy. No engineer in the loop. The lab tested it; it works.
Deliverable two
An fMRI experiment where the deception has to hold for the full scanner session.
The Social Brain Lab's aggression paradigm: a participant in an MRI scanner controls a pneumatic pump against what they believe is another human opponent. There is no opponent. The lab is measuring the empathy response to inflicting pain on someone the participant thinks is real.
For the measurement to be valid, the deception has to be airtight for sixty minutes of scanner time. A single tell breaks the experiment. The software is the experimental apparatus.
The core design decisions:
- Real actor clips, not real-time synthesis. The technical design considered real-time face synthesis of opponent reactions and rejected it. Synthesis fails on pain expressions specifically — the uncanny-valley signal overlaps directly with the empathy measure the experiment is trying to capture. Pre-recorded clips from real actors, indexed by behavioural state, sidestep the problem.
- Blink-gated transitions. Cuts between clips happen during participant blinks, detected via eye-tracking. The participant never sees a discontinuity; the system can switch behavioural states without visible seams.
- Adaptive opponent behaviour. The opponent's apparent strategy responds to participant choices in plausible ways. Not random, not deterministic, behaviourally calibrated to feel like another person making decisions under the same constraints.
- MRI sync. Trial events are clocked against scanner pulses so the neuroimaging analysis can align stimuli to BOLD response down to TR-precision.
Why this needed AI
Two AI moves, two different reasons.
On the website: AI as a delegation tool. Codex turns natural language into deterministic edits, with git as the audit log. The lab gets autonomy without giving up version control or review.
On the experiment: AI as a research instrument. The opponent's adaptive behaviour is driven by a model that selects from the actor-clip library in response to participant actions. A rule-based system would be detectable; a model with the right inductive bias is not.
Status
Where it stands.
This is the engagement that anchors the research-track side of the practice. The relationship runs longer than any single deliverable, and the engineering decisions made here will shape the lab's experimental software stack for years.