-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathagentic-coding-seminar-shared.typ
More file actions
1995 lines (1914 loc) · 95.7 KB
/
Copy pathagentic-coding-seminar-shared.typ
File metadata and controls
1995 lines (1914 loc) · 95.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ============================================================
// Effective Agentic Coding for Scientific Computing
// James Kermode · School of Engineering, University of Warwick
//
// Three delivered talks share this source:
// research: Predictive Modelling Discussion Group + HetSys CDT, Warwick (30 Apr 2026)
// brookes: Oxford Brookes · AI & Data Analysis Network (6 May 2026)
// mpip: Max Planck Institute for Polymer Research (15 Jun 2026)
//
// Build (each shim is one line — `#import` + `#deck(...)`):
// typst compile agentic-coding-seminar-research.typ
// typst compile agentic-coding-seminar-research-handout.typ
// typst compile agentic-coding-seminar-brookes.typ
// typst compile agentic-coding-seminar-brookes-handout.typ
// typst compile agentic-coding-seminar-mpip.typ
// typst compile agentic-coding-seminar-mpip-handout.typ
//
// `version` (string) is checked at slides that diverge between audiences:
// title, thesis (brookes-only), the case-study region (mograder-first vs.
// research-first), anti-pattern 2 examples, outlook bullets, lecturer/student
// guide, responsible-use, and the closing discussion question.
//
// `mpip` inherits the research deck verbatim by falling through every
// `else` branch (it is close to the research audience). It diverges only at
// the title, responsible-use, and discussion slides, and is trimmed to ~45
// min: four research slides are wrapped in `#if version != "mpip"` (the
// heatmap, Commit Analysis, Atomistica, and the mograder case study).
//
// `handout: true` collapses every `phased-slide` to its final phase only,
// producing a shareable post-talk PDF without the build-up pages. Reveals are
// recovered automatically because `phase(k, step, content)` returns the
// content as soon as `k >= step`.
//
// Disclaimer: the views in these slides are the author's, not the
// institutional position of the University of Warwick. See README.md.
// ============================================================
#let deck(version, handout: false) = [
#set page(paper: "presentation-16-9", margin: 0pt)
#set text(font: "Arial", size: 20pt)
#set par(leading: 0.65em)
#let accent = rgb("#005BA1")
#let accent2 = rgb("#003870")
#let light = rgb("#EEF4FB")
#let warn = rgb("#FFF3E0")
#let green = rgb("#E8F5E9")
#let red-bg = rgb("#FDECEA")
#let code-bg = rgb("#F4F4F4")
// ── helpers ──────────────────────────────────────────────────
#let slide(title: none, body) = page(margin: 0pt, {
set text(size: 19pt)
if title != none {
block(
fill: accent, width: 100%,
inset: (x: 1.3em, y: 0.6em),
text(fill: white, weight: "bold", size: 23pt, title)
)
}
block(width: 100%, inset: (x: 1.6em, y: 0.9em), body)
})
#let titleslide(title, subtitle, author, date, disclaimer: none) = page(
margin: 0pt,
fill: accent2,
{
set align(horizon)
block(width: 100%, inset: (x: 2em, y: 0em), {
text(fill: white, weight: "bold", size: 34pt, title)
v(0.5em)
text(fill: rgb("#AACCEE"), size: 22pt, subtitle)
v(1.5em)
line(length: 60%, stroke: 0.5pt + rgb("#AACCEE"))
v(0.6em)
text(fill: white, size: 18pt, author)
linebreak()
text(fill: rgb("#AACCEE"), size: 16pt, date)
if disclaimer != none {
v(1.2em)
text(fill: rgb("#88AACC"), size: 12pt, style: "italic", disclaimer)
}
})
}
)
#let sectionslide(title, subtitle: none) = page(
margin: 0pt,
fill: light,
{
set align(horizon + center)
text(fill: accent, weight: "bold", size: 30pt, title)
if subtitle != none {
v(0.5em)
text(fill: gray, size: 20pt, subtitle)
}
}
)
#let bullet(body) = {
grid(
columns: (1.2em, 1fr), gutter: 0.3em,
text(fill: accent, weight: "bold", "▸"),
body
)
v(0.2em)
}
#let note(body) = block(
fill: light, radius: 4pt,
inset: (x: 1em, y: 0.65em), width: 100%,
text(size: 17pt, style: "italic", body)
)
#let warn-block(body) = block(
fill: warn, radius: 4pt,
inset: (x: 1em, y: 0.65em), width: 100%,
body
)
#let good-block(body) = block(
fill: green, radius: 4pt,
inset: (x: 1em, y: 0.65em), width: 100%,
body
)
#let bad-block(body) = block(
fill: red-bg, radius: 4pt,
inset: (x: 1em, y: 0.65em), width: 100%,
body
)
#let codebox(content) = block(
fill: code-bg, radius: 4pt,
inset: (x: 1em, y: 0.7em), width: 100%,
text(font: "Monaco", size: 15pt, content)
)
#let twocol(left, right, gutter: 1.4em) = grid(
columns: (1fr, 1fr), gutter: gutter, left, right
)
// Progressive-reveal helpers. `phased-slide` emits `phases` copies of a slide,
// passing the current phase number `k` (1..phases) to the body lambda. Inside
// the body, wrap each block with `phase(k, step, ...)`: the block appears on
// phase `step` and stays visible thereafter. Hidden blocks still occupy their
// layout space (via `hide()`), so the slide doesn't reflow between phases.
//
// When the deck is invoked with `handout: true`, we emit only the final phase
// of each slide, collapsing build-up pages into a single post-talk page.
#let phased-slide(title: none, phases: 1, body) = {
if handout {
slide(title: title, body(phases))
} else {
for k in range(1, phases + 1) {
slide(title: title, body(k))
}
}
}
#let phase(k, step, content) = if k >= step { content } else { hide(content) }
// ============================================================
// SLIDES
// ============================================================
// ── 1. Title (version-specific) ──────────────────────────────
#let warwick-disclaimer = "Personal experience as a Warwick academic and HetSys CDT director — not the institutional view of the University of Warwick. Warwick's AI strategy is being developed separately."
#if version == "brookes" [
#titleslide(
"AI-assisted coding, assessment design,\nand the agentic AI era",
"If students can use AI to write code, what are we really assessing?",
"James Kermode · School of Engineering, University of Warwick",
"6 May 2026 · Oxford Brookes · AI & Data Analysis Network",
disclaimer: warwick-disclaimer,
)
] else if version == "mpip" [
#titleslide(
"Effective Agentic Coding\nfor Scientific Computing",
"Patterns, pitfalls, and a live case study",
"James Kermode · School of Engineering, University of Warwick",
"15 June 2026 · Max Planck Institute for Polymer Research",
disclaimer: warwick-disclaimer,
)
] else [
#titleslide(
"Effective Agentic Coding\nfor Scientific Computing",
"Patterns, pitfalls, and a live case study",
"James Kermode · School of Engineering, University of Warwick\nPredictive Modelling Discussion Group + HetSys CDT",
"30 April 2026",
disclaimer: warwick-disclaimer,
)
]
// ── 1b. Thesis slide (Brookes only) ──────────────────────────
#if version == "brookes" [
#slide(title: "Talk Thesis")[
#v(0.4em)
#block(fill: light, radius: 4pt, inset: (x: 1.3em, y: 0.9em), width: 100%)[
#text(size: 21pt, weight: "bold")[
If students can use AI to write code,
what are we really assessing?
]
#v(0.5em)
#text(size: 17pt, style: "italic")[
One useful way forward: treat *coding as formative*,
and *understanding as summative*.
]
]
#v(0.5em)
#text(size: 16pt)[
#bullet[This talk argues that split, and gives a worked example — *mograder* — of what it can look like in practice.]
#bullet[Plus the patterns and anti-patterns of using Agentic Coding tools well for your own work.]
#bullet[Audience is mixed: discipline-specific examples where useful, but the assessment question cuts across.]
]
]
]
// ── 3. Spectrum ───────────────────────────────────────────────
#phased-slide(title: "A spectrum of AI coding tools", phases: 5, k => {
// Direction indicators always visible
grid(
columns: (auto, 1fr, auto), align: horizon, gutter: 0.8em,
text(size: 14pt, weight: "bold", fill: rgb("#B71C1C"))[Vibe coding],
align(center)[#text(size: 12pt, fill: gray, style: "italic")[
increasing context · increasing autonomy · increasing oversight responsibility
]],
text(size: 14pt, weight: "bold", fill: rgb("#1B5E20"))[Agentic engineering],
)
v(0.3em)
// Four stations revealed phase-by-phase; layout space reserved via hide()
grid(
columns: (1fr, 1fr, 1fr, 1fr), gutter: 0.6em,
phase(k, 1, bad-block[
#text(size: 14pt, weight: "bold")[ChatGPT in browser]
#v(0.1em)
#text(size: 12pt)[
#bullet[Copy/paste both ways]
#bullet[No project context]
#bullet[You run the code]
#bullet[*ChatGPT, Claude.ai*]
]
]),
phase(k, 2, block(fill: warn, radius: 4pt, inset: (x: 0.8em, y: 0.55em), width: 100%)[
#text(size: 14pt, weight: "bold")[Autocomplete in editor]
#v(0.1em)
#text(size: 12pt)[
#bullet[Inline tab-completion]
#bullet[Current-file context]
#bullet[You drive every keystroke]
#bullet[*Copilot, Cursor tab*]
]
]),
phase(k, 3, block(fill: light, radius: 4pt, inset: (x: 0.8em, y: 0.55em), width: 100%)[
#text(size: 14pt, weight: "bold")[Full AI editor]
#v(0.1em)
#text(size: 12pt)[
#bullet[Chat edits files in repo]
#bullet[Codebase-aware context]
#bullet[You approve diffs in IDE]
#bullet[*Cursor, Windsurf*]
]
]),
phase(k, 4, good-block[
#text(size: 14pt, weight: "bold")[Agent]
#v(0.1em)
#text(size: 12pt)[
#bullet[Runs commands, iterates]
#bullet[Full project context (`CLAUDE.md`)]
#bullet[Review at task boundaries]
#bullet[*Claude Code, Codex, Gemini CLI*]
]
])
)
v(0.3em)
phase(k, 5, note[#text(size: 13pt)[
Same model can sit behind any of these — the difference is the *harness*: how much context it sees, whether it can act, and where the human reviews. Willison: "Agentic Engineering represents the other end of the scale — professional engineers using coding agents to amplify their existing expertise." Case studies that follow use Claude Code; the patterns themselves are agnostic to which agentic harness you prefer.
]])
})
// ── How an LLM chatbot works (precursor to the agentic loop) ──
#slide(title: "How an LLM chatbot works")[
#twocol(
[
*Pseudocode Sketch*
#codebox(raw(
"messages = [system_prompt, task]
while not done:
reply = model.generate(messages)
messages.append(reply.text)
display(reply.text)
done = await_user()"
))
],
[
*Key properties*
#v(0.15em)
#text(size: 13pt)[
#bullet[*System prompt* – persistent instructions set by the application #text(fill: rgb("#555"))[(role, tone, safety, format)]]
#bullet[*`messages`* – full conversation history, replayed on every call; the model has no memory between sessions]
#bullet[*Context window* – finite tokens per turn \
#text(fill: rgb("#555"))[(200k-1M tokens, \~150k-750k words)]]
#bullet[*Sampling* – `generate()` picks tokens probabilistically; same input can give different replies #text(fill: rgb("#555"))[(temperature, top-p)]]
#bullet[*Knowledge cutoff* – no access to events after training ends]
#bullet[*No actions* – model cannot run code, read files, or browse the web – only text in, text out]
]
#v(0.2em)
#note[#text(size: 13pt)[ChatGPT, Claude, Gemini etc. all basically work like this.]]
]
)
]
// ── 3a. The agentic loop ─────────────────────────────────────
#slide(title: "Agentic Loop")[
#twocol(
[
*Pseudocode Sketch*
#block(
fill: code-bg, radius: 4pt,
inset: (x: 1em, y: 0.7em), width: 100%,
{
set text(font: "Monaco", size: 15pt)
set par(leading: 0.45em)
let hl(body) = highlight(fill: rgb("#b2ff9d"), extent: 2pt, body)
[
`messages = [system_prompt, `#hl[`CLAUDE_MD, `]`task]` \
#hl[`tools = [Bash, Read, Edit, Write, Grep,`] \
#hl[` Glob, WebFetch, WebSearch, Task]`] \
`while not done:` \
` reply = model.generate(messages, ` \
` `#hl[`tools=tools`]`)` \
#hl[` if reply.tool_calls:`] \
#hl[` for call in reply.tool_calls:`] \
#hl[` out = run_tool(call.name,`] \
#hl[` call.args)`] \
#hl[` messages.append(`] \
#hl[` tool_result(call, out))`] \
#hl[` else:`] \
` messages.append(reply.text)` \
` display(reply.text)` \
` done = await_user()`
]
}
)
],
[
*Examples of Tools*
#v(0.15em)
#text(size: 12pt)[
#bullet[*Bash* – run a shell command #text(fill: rgb("#555"))[(`pytest -xvs`, `uv run …`, `git log`, `make`)]]
#bullet[*Read* / *Write* / *Edit* – create or open a file, or do a find-and-replace]
#bullet[*Grep* – regex-search #text(fill: rgb("#555"))[(e.g. `def test_energy` across `**/*.py`)]]
#bullet[*Glob* – enumerate files by pattern #text(fill: rgb("#555"))[(`src/**/*.py`)]]
#bullet[*WebFetch* – pull a specific URL #text(fill: rgb("#555"))[(docs, GitHub issues, papers)]]
#bullet[*WebSearch* – look up recent/obscure info #text(fill: rgb("#555"))[(post-training data, niche APIs, error message searches)]]
#bullet[*Task* – spawn a sub-agent with its own context #text(fill: rgb("#555"))[("audit this PR", "find all callers of X"). Can use a cheaper model for sub-tasks.]]
]
#v(0.2em)
#note[#text(size: 12pt)[The agent is only as capable as its tools. Add an MCP server and it gains a new action; remove `Bash` and it can no longer run code. You can teach it to use new CLI tools (or even write new ones which are agent-friendly, with explanatory docs).]]
]
)
]
// ── Agentic vs. Vibe Coding – key differences ────────────────
// Phase-2 payoff is discipline-specific: "physically correct" for research audiences;
// generalised to domain correctness for the cross-discipline Brookes audience.
#phased-slide(title: "Agentic vs. Vibe Coding – Key Differences", phases: 2, k => {
phase(k, 1)[
#bullet[Agent = model + harness that *executes* code and feeds results back]
#bullet[Core loop is ~200 lines of code, not magic (MIT Missing Semester, 2026)]
#v(0.4em)
#warn-block[
#bullet[*Willison: "Writing code is cheap now"*.]
#bullet[Typing code into a computer is now almost free.]
#bullet[Delivering *good* code, which is tested, correct, maintainable, is not.]
]
]
phase(k, 2)[
#v(0.2em)
#if version == "brookes" [
#text(size: 17pt)[
In most disciplines, "correct" means more than "the tests pass":
#block(fill: rgb("#FFF8E1"), radius: 4pt, inset: 0.6em)[
#bullet[Code must also be correct *in your domain's sense* – physically, causally, pedagogically.]
#bullet[No auto-generated test suite fully captures that: that is *your* job.]
]
]
] else [
For scientific computing, we need to add another dimension:
#block(fill: rgb("#FFF8E1"), radius: 4pt, inset: 0.8em)[
#bullet[Code must also be physically correct.]
#bullet[No auto-generated test suite fully captures that: that is our job.]
]
]
]
})
// ── 3b. Addressing the objections ────────────────────────────
#phased-slide(title: "Common Objections", phases: 4, k => {
twocol(
[
#phase(k, 1)[
*"AI writes code that doesn't compile"*
#text(size: 16pt)[
Zero-shot, no context, wrong language version: yes, often.
With a `CLAUDE.md` specifying your Python/Julia version, package environment, and a working example to follow: almost never.
The agent executes and iterates – it sees the compiler error.
]
]
#v(0.35em)
#phase(k, 3)[
*"Fortran coverage is low"*
#text(size: 16pt)[
Correct. Training data is dominated by Fortran 77; modern Fortran 2018 features and fixed/free format confusion are failure modes. My QUIP work in this talk was CI and Python glue, not extensively touching the Fortran. Know your tool's limits.
]
]
],
[
#phase(k, 2)[
*"Zero-shot failures on niche APIs"*
#text(size: 16pt)[
Correct. Zero-shot with no context for a specific LAMMPS fix style or ASE calculator is unreliable. Solution: provide a working example from your codebase. The agent recombines; it doesn't (shouldn't) invent.
]
]
#v(0.35em)
#phase(k, 4)[
*"I tried it and got rubbish"*
#text(size: 16pt)[
Almost certainly towards vibe coding end of spectrum: without `CLAUDE.md`, working examples, or iterative feedback. The same person wouldn't hand a junior developer a task with no briefing and be surprised at the output. Capable models also help — recent flagship models from Anthropic, OpenAI, and Google all clear the bar; older or distilled checkpoints often don't.
]
]
]
)
})
// ── 3c. Harder objections ─────────────────────────────────────
#phased-slide(title: "Harder Objections", phases: 4, k => {
twocol(
[
#phase(k, 1)[
*"It made me slower, not faster"*
#text(size: 16pt)[
A rigorous RCT (METR, July 2025) found experienced open-source developers were *19% slower* with AI tools. The finding is real for tasks where the developer already knows exactly what to do. Gains appear on unfamiliar territory, bridging expertise gaps, and maintenance work. Track time honestly.
]
]
#v(0.35em)
#phase(k, 3)[
*"It's just regurgitating training data"*
#text(size: 16pt)[
Partly fair. For novel algorithms, you are the source of novelty: the agent implements what you specify. That is the spec-first pattern: you design, it codes. The Anthropic C compiler rewrite attracted "code laundering" criticism; for original research, the question is whether your idea/spec is novel.
]
]
],
[
#phase(k, 2)[
*Skill atrophy: the paradox of supervision*
#text(size: 16pt)[
Anthropic internal study (Dec 2025): developers scored *17% lower* on code comprehension tests when using AI to learn a new library. Paradox: effective use of Agentic AI requires supervising Claude, which requires the very skills that atrophy. Practise without AI too!
]
]
#v(0.35em)
#phase(k, 4)[
*Data privacy and reproducibility*
#text(size: 16pt)[
Your code goes to Anthropic's servers – OK for open source code, otherwise not. For sensitive data, local models (Ollama + open weights) are improving rapidly. Hybrid approaches possible.
]
]
]
)
})
// ── 4. Struggle as pedagogy ───────────────────────────────────
#slide(title: "Pedagogical Tensions")[
#v(0.2em)
#twocol(
warn-block[
*Struggle as pedagogy*
#v(0.3em)
#text(size: 17pt)[
#bullet[Hitting a confusing error and working through it *is* the learning.]
#bullet[Friction builds intuition.]
#bullet[Researchers who never debug never develop a mental model of failure modes.]
]
],
good-block[
*Reducing friction*
#v(0.3em)
#text(size: 17pt)[
#bullet[Remove obstacles that aren't educational.]
#bullet[Better tools let people spend cognitive load on the science, not boilerplate.]
#bullet[We don't code in assembly any more!]
#bullet[AI assistance is now a professional reality in many domains]
]
]
)
#v(0.5em)
The question is not whether to use AI tools – it is which friction is worth keeping.
]
// ── 4b. Where to draw the line ────────────────────────────────
#phased-slide(title: "Which friction is worth keeping?", phases: 2, k => {
twocol(
phase(k, 1)[
*Worth keeping*
#v(0.2em)
#text(size: 17pt)[
#bullet[Debugging logic errors in your own code]
#bullet[Understanding *why* a numerical method converges or doesn't]
#bullet[Choosing the right algorithm for the problem]
#bullet[Interpreting results physically]
#bullet[Reviewing/owning every line in a paper or PR]
]
],
phase(k, 2)[
*Worth removing*
#v(0.2em)
#text(size: 17pt)[
#bullet[Boilerplate file I/O and plotting scaffolding]
#bullet[Looking up library API signatures]
#bullet[Translating a known algorithm into working syntax, or from one language to another]
#bullet[Writing tests for behaviour you already understand]
#bullet[Formatting and docstrings]
]
]
)
})
// ── 5b. Speedup by education ──────────────────────────────────
#phased-slide(title: "Speedup grows with expertise – Anthropic Economic Index, Jan 2026", phases: 2, k => {
v(0.3em)
grid(columns: (1fr, 1fr), gutter: 1.5em,
phase(k, 1)[
*Measured speedup on Claude.ai by task complexity*
#text(size: 13pt, style: "italic")[(years of schooling required to understand the task)]
#v(0.3em)
#let edbar(label, years, speedup, maxspeed, col) = {
grid(columns: (6.5em, 2.2em, 1fr, 2em), gutter: 0.3em,
text(size: 13pt, label),
text(size: 13pt, fill: col, weight: "bold", str(speedup) + "×"),
block(height: 0.9em, width: (100% * speedup / maxspeed), fill: col, radius: 2pt),
none
)
v(0.2em)
}
#edbar("< High school", 10, 7, 20, rgb("#90A4AE"))
#edbar("High school", 12, 9, 20, rgb("#FFB74D"))
#edbar("Some college", 14, 10, 20, rgb("#FF8F00"))
#edbar("College degree", 16, 12, 20, accent)
#edbar("API (college)", 16, 16, 20, rgb("#1565C0"))
#v(0.2em)
#text(size: 12pt, style: "italic")[
Source: Anthropic Economic Index, Jan 2026 (\~2M Claude conversations, Nov 2025) – *vendor-published, treat as directional*. Speedup = human-alone time / human-with-AI time.
]
],
phase(k, 2)[
*What this means for us as researchers*
#v(0.3em)
#text(size: 15pt)[
#good-block[
#bullet[More expertise you bring, more you gain.]
#bullet[A PhD student at the frontier gets more leverage than someone doing routine tasks.]
]
#v(0.2em)
#bullet[Contradicts "AI levels the playing field" narrative]
#bullet[Domain knowledge is amplified, not devalued]
#bullet[The METR 19% slowdown: low end of this curve]
#bullet[*Caveat*: data tops out at college-level tasks – no direct measurements of PhD-level work. Trend suggests further amplification; nobody has proved it.]
#v(0.15em)
#warn-block[
#text(size: 14pt)[Success rate falls with complexity (70% → 66%). Human oversight becomes more important, not less.]
]
]
]
)
})
// ============================================================
// CASE-STUDY REGION — diverges heavily between versions
// Both branches are markup-mode content blocks, so `#` prefixes
// on function calls are used exactly as at top level.
// ============================================================
#if version == "brookes" [
// ── Section break — mograder leads ─────────────────────────
#sectionslide("mograder — a worked example", subtitle: "Formative coding, summative understanding")
// ── mograder intro (full, from original teaching deck) ─────
#phased-slide(title: "mograder", phases: 3, k => {
phase(k, 1)[#text(size: 16pt)[#good-block[
*mograder* is an autograder for coding assignments. It provides fast formative feedback on code correctness, and allows summative assessment of understanding via written/oral components.
]
#warn-block[
*Motivation*
I want to teach postgraduate students to use AI tools effectively, not ban them.]
]]
twocol(
phase(k, 2)[
*The task*
#v(0.2em)
#text(size: 16pt)[
#bullet[Generate / autograde / validate assignments]
#bullet[Student and grading web interfaces]
#bullet[Moodle API integration]
#bullet[Robust security model]
#bullet[Comprehensive docs · PyPI release · CI/CD]
]
],
phase(k, 3)[
*The setup*
#v(0.2em)
#text(size: 16pt)[
#bullet[Claude Code bare metal on Mac and Linux]
#bullet[Close supervision – reviewing every change]
#bullet[Git as the safety net and progress log]
#bullet[Iterative: short tasks, verify, commit, repeat]
]
]
)
})
// ── Development process ────────────────────────────────────
#slide(title: "Development process")[
#text(size: 16pt)[
#bullet[I wrote almost no code by hand. Almost every line was generated by Claude Code, and reviewed by me.]
#bullet[*369 commits over 48 days* · 95% Claude co-authored, 5% manual touch-ups · 30 active days \
(≈12 commits/day when working on it); busiest day: *36 commits*]
#bullet[*4 days from empty repo to first tagged release*; released on PyPI after 13 days;\
36 tagged versions]
#bullet[*19k lines of Python* (53 modules) + *16k lines of tests* (482 tests, \~25 tests / kLOC src) + 2.5k lines docs]
]
#align(center, image("figures/mograder_commits.png", width: 60%))
]
// ── What the agent was good at ─────────────────────────────
#slide(title: "What the agent was good at")[
#bullet[*Boilerplate-heavy infrastructure* – FastAPI routes, SQLite schema, Moodle REST calls, CI/CD YAML configuration, Python packaging.]
#bullet[*Verifiable tasks* – "does `pytest` pass?", "does `pip install` work?", "does the Moodle token round-trip?", "does the example notebook run/autograde without error?"]
#bullet[*Recombining known patterns* – PEP 723 metadata + cell-hash embedding merged two things it already understood]
#bullet[*Documentation and tests* – given a spec, write docstrings and unit tests first]
#v(0.5em)
#note[
The agent is a very fast, tireless junior developer with broad knowledge
and zero physical intuition.
]
]
// ── What required human judgement ──────────────────────────
#slide(title: "What required human judgement")[
#bullet[*Security model design* – six-layer defence-in-depth was a deliberate choice (resource limits, timeouts, static safety checks, temp directory isolation, bubblewrap sandbox, integrity checking). The agent would have stopped at "run in a temp dir".]
#bullet[*Assessment philosophy* – formative coding, summative written and oral components, students must explain code with their name on it. Practical experience with similar tools.]
#bullet[*Architecture* – Marimo over Jupyter, sidecar JSONL over HTML parsing to extract machine-readable metadata, write-ahead logging (WAL) mode for SQLite operations.]
#bullet[*Catching agent errors* – plausible-looking but broken async logic; incorrect Moodle API endpoints needed iterative testing and careful review to catch.]
#v(0.4em)
#note[
Agents can deal with the 'How' but not the 'What' or the 'Why'. You cannot delegate the decisions that define what the software is for!
]
]
// ── mograder assessment philosophy (new, Brookes-only) ─────
#slide(title: "mograder — formative / summative separation")[
#v(0.2em)
#twocol(
good-block[
*Formative — the code*
#v(0.2em)
#text(size: 13pt)[
#bullet[*Release notebook*: students receive the assignment with solutions stripped and check cells pre-populated]
#bullet[*Instant feedback*: checks run as each cell is completed; an incorrect answer gets partial credit + targeted feedback, not pass/fail]
#bullet[*Tamper-proof*: edit a check cell and the hash mismatch is detected]
#bullet[*Workshop mode*: hosted in a static HTML page via WASM: works in a browser, no server or VLE. Instructors can release model solutions live.]
#bullet[*Low-stakes, fast turnaround*: automated tests.]
]
],
warn-block[
*Summative — the understanding*
#v(0.2em)
#text(size: 13pt)[
#bullet[*Written defence*: students explain their approach — why this algorithm, where it might fail]
#bullet[*Oral mini-viva*: 10-15 minutes, student walks the marker through their submitted code. Random sample of students, allocated after submission. ]
#bullet[*The student's name is on it.* It doesn't matter how the code was written; they still have to defend it.]
#bullet[*Higher-stakes, hard to delegate*: human judgement.]
]
]
)
#note[#text(size: 13pt)[mograder allows delegating *pattern-matching* — did the code produce the right answer? — to the machine, but keeps the *human question* — did the student understand? — for humans.]]
]
// ── Mograder Demo (URLs) ───────────────────────────────────
#slide(title: "Mograder Demo")[
#bullet[A *release notebook* – what students receive (solutions stripped, check cells present)]
#bullet[*Formative checks* run as cells are completed]
#bullet[An *incorrect* answer gets partial credit + targeted feedback rather than pass/fail]
#bullet[*Tamper-proof submission*: edit a check cell and the hash mismatch is caught]
#bullet[*Instructor dashboard*: all assignments, submissions and marks in one view]
#bullet[*Workshop demo*: example workshop-mode, fully formative and hosted in a static HTML page (via WASM). Instructors can release model solutions live during workshops.]
#v(0.4em)
#align(center)[
#text(size: 17pt)[
#text(fill: accent2)[*Student dashboard:* #link("https://mograder-demo.jrkermode.uk")[`mograder-demo.jrkermode.uk`]] \
#text(fill: accent2)[*Instructor dashboard:* #link("https://mograder-demo.jrkermode.uk/grader")[`mograder-demo.jrkermode.uk/grader`]] \
#text(fill: accent2)[*Workshop demo*: #link("https://jameskermode.github.io/mograder/dashboard/notebooks/demo-workshop.html")[`jameskermode.github.io/mograder/dashboard/notebooks/demo-workshop.html`]]
]
]
]
// ── Section break — compressed research context ────────────
#sectionslide("Further examples", subtitle: "A quick tour of my recent AI-assisted codebases")
// ── Heatmap (phase 1 only for Brookes) ─────────────────────
#slide(title: "Can you spot when I started using Claude?")[
#text(size: 13pt)[*GitHub contribution heatmap* (jameskermode · Jun 2025 – Jun 2026)]
#v(-0.2em)
#align(center, image("figures/heatmap.png", width: 96%))
]
// ── 1.2k commits data (single slide for Brookes) ─────────────
#slide(title: "1.2k Claude co-authored commits · 286k lines of code")[
#text(size: 13pt)[
#grid(columns: (1.15fr, 0.85fr), gutter: 1.2em,
[
*By repository — commits (blue) and kLOC added (orange)*
#v(0.15em)
#let tickbar(label, color, ticks) = grid(
columns: (12.5em, 1fr), gutter: 0.4em, align: horizon,
text(size: 8pt, label),
stack(dir: ttb, spacing: 1pt,
block(height: 0.35em, width: 100%, fill: color),
grid(
columns: (
(0.5fr,),
(1fr,) * (ticks.len() - 2),
(0.5fr,),
).flatten(),
..ticks.enumerate().map(((i, t)) => align(
if i == 0 { left } else if i == ticks.len() - 1 { right } else { center },
text(size: 7pt, fill: rgb("#555"), str(t))
))
)
)
)
#tickbar("commits", accent, (0, 100, 200, 300, 400))
#tickbar("kLOC added", rgb("#FF8F00"), (0, 25, 50, 75, 100))
#v(0.2em)
#let entries = (
("mograder", "CI · bugs · features", 366, 78.6),
("HetSys/PX914", "bugs · features · CI", 247, 81.0),
("SciML demos", "CI · features · bugs", 88, 30.1),
("HetSys/isg2026-amentum", "features", 87, 9.8),
("libAtoms/extxyz", "CI · bugs", 74, 7.1),
("ACEpotentials.jl", "features · bugs · CI", 59, 12.1),
("QUIP", "CI · bugs (94%)", 47, 2.7),
("f90wrap", "CI · bugs · tests", 42, 1.7),
("mograder-tauri", "bugs · CI · other", 28, 1.8),
("marimo-precompute", "even mix", 26, 3.0),
("audio-player", "features", 18, 6.0),
("matscipy", "CI · bugs", 18, 0.6),
)
#grid(
columns: (12.5em, 1fr), row-gutter: 7pt, column-gutter: 0.4em, align: horizon,
..entries.map(((r, k2, c, l)) => (
stack(dir: ttb, spacing: 2pt,
text(size: 10pt, r),
text(size: 8pt, style: "italic", fill: rgb("#666"), k2),
),
stack(dir: ttb, spacing: 1.5pt,
block(height: 0.4em, width: (100% * c / 400), fill: accent),
block(height: 0.4em, width: (100% * l / 100), fill: rgb("#FF8F00")),
),
)).flatten()
)
#text(size: 8pt, style: "italic")[36 repos · `git log --numstat` · simulation data excluded · Mar 2025–Jun 2026]
],
[
*By contribution type*
#v(0.15em)
#let cat(label, n, total, col) = grid(
columns: (8em, 1.8em, 1fr), gutter: 0.3em,
text(size: 12pt, label), text(size: 12pt, str(n)),
block(height: 0.75em, width: (100% * n / total), fill: col)
)
#cat("CI/CD & build", 320, 330, rgb("#E57373"))
#cat("Bug fixes", 247, 330, rgb("#FFB74D"))
#cat("New features", 242, 330, accent)
#cat("Other", 169, 330, rgb("#B0BEC5"))
#cat("Demo / viz", 73, 330, rgb("#9575CD"))
#cat("Documentation", 66, 330, rgb("#81C784"))
#cat("Tests", 40, 330, rgb("#4DB6AC"))
#cat("Refactor", 38, 330, rgb("#90A4AE"))
#cat("API compat", 23, 330, rgb("#A1887F"))
#v(0.2em)
#warn-block[
#text(size: 11pt)[*26% is CI/CD + build infrastructure* – the unglamorous maintenance work that would otherwise never get done.]
]
#v(0.2em)
#text(size: 12pt, style: "italic")[*Cost log*: \~£500 over 8 months on Claude Max 5× (\~\$2,500 at metered rates). Specialist knowledge made this hard to delegate – counterfactual is "not done", not "done by someone else".]
]
)
]
]
// ── Atomistica (second-order effect) — kept per user request
#phased-slide(title: "Second-order effects: Atomistica", phases: 4, k => {
phase(k, 1)[
#text(size: 16pt)[
#bullet[*Atomistica:* (#link("https://github.com/atomistica/atomistica")[`github.com/atomistica/atomistica`]) Fortran library of interatomic potentials (ASE + LAMMPS compatible)
maintained by Lars Pastewka in Freiburg.]
#bullet[`numpy.distutils` removed in Python 3.12 – Atomistica's build system was broken]
#bullet[I needed it for teaching, and thought it would be a good test of what Claude Code could handle on an unfamiliar Fortran codebase]
]
]
twocol(
phase(k, 2)[
#good-block[
*Oct 2025: my meson PR*
#v(0.15em)
#text(size: 15pt)[
Migrated from `numpy.distutils` to Meson + `meson-python`. PR description: *"I did it using Claude Code so some careful testing is required before merging."* Merged with final fixes, Oct 20.
]
]
],
phase(k, 3)[
#block(fill: rgb("#F3E5F5"), radius: 4pt, inset: 0.7em)[
*Dec 2025: Lars starts C++ rewrite*
#v(0.15em)
#text(size: 15pt)[
PR 54: *"Complete rewrite of Atomistica in modern C++."* 72 files · 21,623 lines of new C++ · full reimplementation of all potentials, integrators, neighbour lists.
]
]
]
)
phase(k, 4)[
#text(size: 15pt)[
#note[Six weeks between "fix our build system" and "rewrite 15 years of Fortran in modern C++" – the willingness to attempt ambitious transformations spreads, across disciplines as well as codebases.]
]
]
})
] else [
// ── Research-version case-study section ────────────────────
#sectionslide("Research codebases — some worked examples", subtitle: "ACEpotentials.jl · LAMMPS interface · GPU port · Atomistica")
// ── Heatmap (2 phases) — cut from MPIP for time ────────────
#phased-slide(title: "Can you spot when I started using Claude?", phases: 2, k => {
phase(k, 1)[
#text(size: 13pt)[*GitHub contribution heatmap* (jameskermode · Jun 2025 – Jun 2026)]
#v(-0.2em)
#align(center, image("figures/heatmap.png", width: 96%))
]
v(-0.3em)
phase(k, 2)[
#text(size: 13pt)[*Weekly commits across 36 repos: Claude co-authored vs other*]
#v(-0.2em)
#align(center, image("figures/transition.png", width: 96%))
]
})
// ── 1.2k commits (3 phases) ──────────────────────────────────
#phased-slide(title: "1.2k Claude co-authored commits · 286k lines of code", phases: 3, k => {
text(size: 13pt)[
#grid(columns: (1.15fr, 0.85fr), gutter: 1.2em,
phase(k, 1)[
*By repository — commits (blue) and kLOC added (orange)*
#v(0.15em)
#let tickbar(label, color, ticks) = grid(
columns: (12.5em, 1fr), gutter: 0.4em, align: horizon,
text(size: 8pt, label),
stack(dir: ttb, spacing: 1pt,
block(height: 0.35em, width: 100%, fill: color),
grid(
columns: (
(0.5fr,),
(1fr,) * (ticks.len() - 2),
(0.5fr,),
).flatten(),
..ticks.enumerate().map(((i, t)) => align(
if i == 0 { left } else if i == ticks.len() - 1 { right } else { center },
text(size: 7pt, fill: rgb("#555"), str(t))
))
)
)
)
#tickbar("commits", accent, (0, 100, 200, 300, 400))
#tickbar("kLOC added", rgb("#FF8F00"), (0, 25, 50, 75, 100))
#v(0.2em)
#let entries = (
("mograder", "CI · bugs · features", 366, 78.6),
("HetSys/PX914", "bugs · features · CI", 247, 81.0),
("SciML demos", "CI · features · bugs", 88, 30.1),
("HetSys/isg2026-amentum", "features", 87, 9.8),
("libAtoms/extxyz", "CI · bugs", 74, 7.1),
("ACEpotentials.jl", "features · bugs · CI", 59, 12.1),
("QUIP", "CI · bugs (94%)", 47, 2.7),
("f90wrap", "CI · bugs · tests", 42, 1.7),
("mograder-tauri", "bugs · CI · other", 28, 1.8),
("marimo-precompute", "even mix", 26, 3.0),
("audio-player", "features", 18, 6.0),
("matscipy", "CI · bugs", 18, 0.6),
)
#grid(
columns: (12.5em, 1fr), row-gutter: 7pt, column-gutter: 0.4em, align: horizon,
..entries.map(((r, k2, c, l)) => (
stack(dir: ttb, spacing: 2pt,
text(size: 10pt, r),
text(size: 8pt, style: "italic", fill: rgb("#666"), k2),
),
stack(dir: ttb, spacing: 1.5pt,
block(height: 0.4em, width: (100% * c / 400), fill: accent),
block(height: 0.4em, width: (100% * l / 100), fill: rgb("#FF8F00")),
),
)).flatten()
)
#text(size: 8pt, style: "italic")[36 repos · `git log --numstat` · simulation data excluded · Mar 2025–Jun 2026]
],
[
#phase(k, 2)[
*By contribution type*
#v(0.15em)
#let cat(label, n, total, col) = grid(
columns: (8em, 1.8em, 1fr), gutter: 0.3em,
text(size: 12pt, label), text(size: 12pt, str(n)),
block(height: 0.75em, width: (100% * n / total), fill: col)
)
#cat("CI/CD & build", 320, 330, rgb("#E57373"))
#cat("Bug fixes", 247, 330, rgb("#FFB74D"))
#cat("New features", 242, 330, accent)
#cat("Other", 169, 330, rgb("#B0BEC5"))
#cat("Demo / viz", 73, 330, rgb("#9575CD"))
#cat("Documentation", 66, 330, rgb("#81C784"))
#cat("Tests", 40, 330, rgb("#4DB6AC"))
#cat("Refactor", 38, 330, rgb("#90A4AE"))
#cat("API compat", 23, 330, rgb("#A1887F"))
#v(0.2em)
#warn-block[
#text(size: 11pt)[*26% is CI/CD + build infrastructure* – the unglamorous maintenance work that would otherwise never get done.]
]
]
#v(0.2em)
#phase(k, 3)[
#text(size: 12pt, style: "italic")[*Cost log*: \~£500 over 8 months on Claude Max 5× (\~\$2,500 at metered rates). Specialist knowledge made this hard to delegate – counterfactual is "not done", not "done by someone else".]
]
]
)
]
})
// ── Commit Analysis — cut from MPIP for time ───────────────
#if version != "mpip" [
#phased-slide(title: "Commit Analysis", phases: 2, k => {
twocol(
phase(k, 1)[
*Main activity types:*
#v(0.2em)
#text(size: 15pt)[
#bullet[*Maintaining codebases*: CI/CD, bug fixes, API compat = 48% of commits – work that accumulates as debt otherwise]
#bullet[*New features*: 242 commits – new ETACE backend in ACEpotentials.jl, Amentum HetSys ISG setup, mograder + tauri wrapper]
#bullet[*Bridging expertise gaps*: QUIP's 47 commits almost entirely CI/build in a Fortran/Python/Meson stack; f90wrap and matscipy similar]
]
],
phase(k, 2)[
*Four repo archetypes*
#v(0.2em)
#text(size: 15pt)[
#bullet[*Teaching*: highest commit volume – \
agent as co-developer + infrastructure scaffolder]
#bullet[*Research*: features + refactoring – \
agent as collaborator]
#bullet[*Shared infrastructure* (QUIP, matscipy, f90wrap): \
CI and bug fixes dominate – agent as \
maintainer-in-residence]
#bullet[*Personal tools*: experimental, varied – \
agent as sketchpad ]
]
]
)
})
]
// ── ACEpotentials LAMMPS interface ─────────────────────────
#phased-slide(title: "ACEpotentials.jl – LAMMPS interface", phases: 4, k => {
phase(k, 1)[
#text(size: 16pt)[
#bullet[*Goal:* deploy trained ACE potentials in LAMMPS for production MD runs]
#bullet[This used to be possible in older ACEpotentials.jl releases, but support was dropped due to lack of maintainer time to keep the ML-PACE C++ code up to date with ACE and LAMMPS changes]
#bullet[*Challenge:* bridging Julia and C++, matching LAMMPS pair style conventions]
]
]
v(0.2em)
twocol(
phase(k, 2)[
#text(size: 16pt)[
*First attempt: `juliac --trim`*
Native compilation of Julia to a shared library via `juliac --trim` – new niche approach, sparse docs. Agent handled boilerplate and iterated on errors; I knew this was the right strategy and validated the force outputs.
]
],
phase(k, 3)[