End-to-End Research with AI

Labour-market-AI-exposure case — question to paper, one checkpoint at a time.

New to this? Start here.

No coding background needed. Here's what a few names you'll see mean, in plain language, with a link to where you'd actually get each one.

A code editor (VS Code)

A free program for opening a project folder and looking at its files — think of it as the window everything else in this course happens inside. You won't need to write code in it yourself.

Download VS Code →

Claude & Claude Code

Claude is Anthropic's AI assistant — the model that actually reads your question and writes the hypothesis, design, and manuscript in this tool. Claude Code is the same assistant, running inside your editor instead of a chat window.

Sign up at claude.ai →

ChatGPT & Codex

OpenAI's equivalent pair — ChatGPT for chatting, Codex for working inside an editor. The course treats these as an alternative to Claude, not a requirement — pick one family and stick with it.

Sign up at chatgpt.com →

What's an API (and an API key)?

An API is simply how one piece of software asks another to do something — here, it's how this tool asks Claude to write something for you. An API key is a private password for that connection, tied to your own account and billing, that you paste into this tool's setup page. Never share it.

Get an Anthropic API key →

AGENTS.md & README.md

Both are plain text files sitting in a project folder. A README.md is written for a human opening the project for the first time. An AGENTS.md is written for the AI assistant — a short set of standing rules it re-reads automatically every session.

Read the AGENTS.md convention →

The whole two-day pipeline as one graph, plus the reasoning rule inside every step — the same decision logic this app runs on the built-in labour-market-AI-exposure case. This page documents the pedagogy; the pipeline above starts once you begin.

Tool presentations

A 12-slide deck per tool — what it is, which stage it's used in, and how it fits with the rest.

1 12 slides

Claude & Claude Code

The backbone tool — reasoning LLM and agentic coder, used at every stage

2 12 slides

ChatGPT & Codex

The parallel track — an alternative reasoning LLM and agentic coder

3 12 slides

VS Code

The editor that hosts every session

4 12 slides

Semantic Scholar

Free, unauthenticated, and scriptable — the literature tool with a script

5 13 slides

Consensus

AI-summarized evidence — read with the abstract still open

6 13 slides

Elicit

Structured, systematic-review-style extraction across many papers

7 13 slides

Scite

Smart citations — supported, or contradicted?

8 12 slides

Gemini

The optional cross-check, and the Co-Scientist demo

Decision graphs on this page

Jump straight to a step's reasoning graph below.

The whole pipeline, Day 1 into Day 2

Solid arrows are artifacts one step hands to the next. Dashed arrows are standing rules or subagents that cut across steps rather than being produced once and consumed once. The feedback edge (governance → results) means a failed referee or disclosure gate sends you back to fix the underlying number, not just the wording.

flowchart TD
    subgraph Day1["Day 1 - Tool fluency"]
        D1_1["1. Environment check"]
        D1_2["2. Write your AGENTS.md"]
        D1_3["3. Literature & verification tools"]
        D1_4["4. Build a referee-style skill"]
        D1_5["5. Six-subagent pattern"]
        D1_1 --> D1_2 --> D1_3 --> D1_4 --> D1_5
    end

    subgraph Day2["Day 2 - Full pipeline"]
        D2_1["1. Hypothesis"]
        D2_2["2. Design & identification"]
        D2_3["3. Data & analysis lab"]
        D2_4["4. Results & robustness"]
        D2_5["5. Manuscript (voice.md)"]
        D2_6["6. Governance & disclosure"]
        D2_1 -->|one-sentence hypothesis| D2_2
        D2_2 -->|design memo + flagged alternative| D2_3
        D2_3 -->|naive vs. robust estimate| D2_4
        D2_4 -->|numbers & figures| D2_5
        D2_5 -->|draft| D2_6
        D2_6 -.->|referee or disclosure gate fails| D2_4
    end

    D1_5 ==>|Day 1 complete| D2_1
    D1_2 -.->|governs every step| Day2
    D1_5 -.->|identification-skeptic| D2_1
    D1_5 -.->|identification-skeptic| D2_2
    D1_5 -.->|identification-skeptic, stats-reviewer| D2_3
    D1_5 -.->|writing-editor| D2_5
    D1_5 -.->|disclosure-auditor| D2_6
    D1_3 -.->|citation-verification habit| D2_5
    D1_4 -.->|same skill, applied to the real draft| D2_6
  
Reading every graph below
Trigger (light blue) starts the check · Question (orange border) is what actually has to be decided · green/red rows are the Yes/No outcomes · navy is the terminal gate. Every “No” either fixes something concretely or hands off to a named subagent — never a shrug.

Day 1 — Tool fluency

Five steps: get fluent with the mechanics before turning them on your own research question.

1. Environment check

Confirm the setup actually has everything before you're 20 minutes into an exercise and stuck on a missing package.

flowchart TD
    A(["Run python scripts/check_setup.py"]):::start --> B{"All checks pass?"}:::decision
    B -->|No| C["Fix by category:
packages missing -> pip install -r requirements.txt
claude not found -> npm install -g @anthropic-ai/claude-code
no key -> export ANTHROPIC_API_KEY"]:::no C --> A B -->|Yes| D["Ask the agent: 'Read AGENTS.md and summarize
the ground rules in 3 bullets.'"]:::yes D --> E{"Does the summary match the real file?"}:::decision E -->|No| F["Agent isn't picking up repo instructions -
fix config before relying on it"]:::no E -->|Yes| G(["Ready for the rest of the course"]):::final classDef start fill:#eef2f6,stroke:#16324f,color:#16324f; classDef decision fill:#ffffff,stroke:#c8762a,color:#0e2336; classDef yes fill:#e3f1e8,stroke:#2f7a4f,color:#2f7a4f; classDef no fill:#f8e4e2,stroke:#a13a3a,color:#a13a3a; classDef final fill:#16324f,stroke:#16324f,color:#ffffff;

2. Write your own AGENTS.md

Understand that AGENTS.md is not documentation for humans — it's what the agent reads on every session — by extending the root file for your own angle on the case.

flowchart TD
    subgraph SG1["Precedence: which file wins"]
    A1(["About to ask the agent to do a task on your angle"]):::start --> B1{"Does your angle's AGENTS.md
say anything about this?"}:::decision B1 -->|Yes| C1["Follow the angle-specific rule - more specific wins"]:::yes B1 -->|No| D1["Fall back to root AGENTS.md:
no invented citations, no bare causal claims,
disclose every AI step"]:::no end subgraph SG2["Test it"] A2(["Give the agent that same task"]):::start --> B2{"Did it visibly follow your added rule,
not just the root one?"}:::decision B2 -->|No| C2["Rule was too vague - tighten wording, retry"]:::no B2 -->|Yes| D2(["Done - the file changes behavior observably"]):::final end classDef start fill:#eef2f6,stroke:#16324f,color:#16324f; classDef decision fill:#ffffff,stroke:#c8762a,color:#0e2336; classDef yes fill:#e3f1e8,stroke:#2f7a4f,color:#2f7a4f; classDef no fill:#f8e4e2,stroke:#a13a3a,color:#a13a3a; classDef final fill:#16324f,stroke:#16324f,color:#ffffff;

3. Literature & verification tools

Build the habit of checking an AI-supplied citation before it ends up in a manuscript — this is where AGENTS.md's "never invent citations" rule earns its keep.

flowchart TD
    A(["Agent is about to cite a paper"]):::start --> B{"Does it come from an actual search result?
(script output, or Consensus/Elicit/Scite you pasted in)"}:::decision B -->|No| C["Say 'unverified' explicitly -
never soften into a plausible-sounding citation"]:::no B -->|Yes| D{"In Scite: has it been contradicted
by later work?"}:::decision D -->|Yes| E["Report both the paper and the
contradicting evidence - don't cherry-pick"]:::no D -->|No| F{"Does the Consensus/Elicit synthesis
match the paper's own abstract?"}:::decision F -->|No| G["Flag the mismatch - trust the
primary source over the AI summary"]:::no F -->|Yes| H(["Safe to cite - note venue and year"]):::final classDef start fill:#eef2f6,stroke:#16324f,color:#16324f; classDef decision fill:#ffffff,stroke:#c8762a,color:#0e2336; classDef yes fill:#e3f1e8,stroke:#2f7a4f,color:#2f7a4f; classDef no fill:#f8e4e2,stroke:#a13a3a,color:#a13a3a; classDef final fill:#16324f,stroke:#16324f,color:#ffffff;

4. Build a referee-style skill

Package a repeatable review task as a skill an agent loads on demand — this is the same checklist the "referee" stage of this app's own pipeline runs.

flowchart TD
    A(["Run /referee-review on a manuscript draft"]):::start --> B{"1. Causal language present -
does the paragraph name an identification strategy?"}:::decision B -->|No| B2["Flag: soften to correlational language,
or add a forward reference"]:::no B -->|Yes| C{"2. Any post x exposure estimate -
is there pre-trend evidence?"}:::decision C -->|No| C2["Flag - the single most important
thing this skill exists to catch"]:::no C -->|Yes| D{"3. Every citation traceable
to a real search result?"}:::decision D -->|No| D2["Flag as unverified, per AGENTS.md"]:::no D -->|Yes| E{"4. Do 2-3 spot-checked numbers match
the analysis script output?"}:::decision E -->|No| E2["Hard blocker, not a style note"]:::no E -->|Yes| F{"5. Does every AI-assisted step have
a disclosure entry?"}:::decision F -->|No| F2["Flag"]:::no F -->|Yes| G(["Ready for governance sign-off: yes
(no, if 1-3 above unresolved)"]):::final classDef start fill:#eef2f6,stroke:#16324f,color:#16324f; classDef decision fill:#ffffff,stroke:#c8762a,color:#0e2336; classDef yes fill:#e3f1e8,stroke:#2f7a4f,color:#2f7a4f; classDef no fill:#f8e4e2,stroke:#a13a3a,color:#a13a3a; classDef final fill:#16324f,stroke:#16324f,color:#ffffff;

5. The six-subagent pattern

Delegate a narrow review task to a specialist instead of asking one general-purpose agent to "check everything," which tends to produce shallow, generic feedback.

flowchart TD
    A(["You need a specific kind of check on your work"]):::start --> B{"What are you worried might be wrong?"}:::decision
    B -->|Citation not verified| C1["literature-scout"]:::yes
    B -->|Causal claim might be a confound| C2["identification-skeptic"]:::yes
    B -->|Data code might have a silent bug| C3["data-integrity-checker"]:::yes
    B -->|Statistics might not match the question| C4["stats-reviewer"]:::yes
    B -->|Prose needs tightening| C5["writing-editor"]:::yes
    B -->|An AI step might be undisclosed| C6["disclosure-auditor"]:::yes
    C1 --> D{"Run 2+ relevant subagents independently -
do they flag the same thing?"}:::decision C2 --> D C3 --> D C4 --> D C5 --> D C6 --> D D -->|Yes, rare| E1["Probably an obvious, high-priority issue"]:::no D -->|No, expected| E2(["That's the point - independent blind spots"]):::final classDef start fill:#eef2f6,stroke:#16324f,color:#16324f; classDef decision fill:#ffffff,stroke:#c8762a,color:#0e2336; classDef yes fill:#e3f1e8,stroke:#2f7a4f,color:#2f7a4f; classDef no fill:#f8e4e2,stroke:#a13a3a,color:#a13a3a; classDef final fill:#16324f,stroke:#16324f,color:#ffffff;

Day 2 — Full pipeline

Six steps, hypothesis to governance — this is what the pipeline above actually runs once you begin.

1. Hypothesis — Co-Scientist-style loop

Generate and stress-test a falsifiable hypothesis before touching any data, via generate → critique → refine, repeated once.

flowchart TD
    A(["Generate 3 distinct hypotheses"]):::start --> B{"Is there a result that would
prove this one wrong?"}:::decision B -->|No| C["Not a real hypothesis - reject or reword"]:::no B -->|Yes| D{"identification-skeptic:
is there a confound producing the same
pattern with no true AI effect?"}:::decision D -->|Yes| E["Name the alternative explanation -
narrow or weaken the hypothesis"]:::no D -->|No| F["Refine: name outcome, comparison,
time window, direction"]:::yes E --> G{"Take it through the confound
question once more - survives twice?"}:::decision F --> G G -->|No| H["Refine again"]:::no G -->|Yes| I(["In good enough shape to move to design"]):::final classDef start fill:#eef2f6,stroke:#16324f,color:#16324f; classDef decision fill:#ffffff,stroke:#c8762a,color:#0e2336; classDef yes fill:#e3f1e8,stroke:#2f7a4f,color:#2f7a4f; classDef no fill:#f8e4e2,stroke:#a13a3a,color:#a13a3a; classDef final fill:#16324f,stroke:#16324f,color:#ffffff;

2. Design & identification — adversarial review

Turn the hypothesis into a specific identification strategy, then have it attacked before running a single regression.

flowchart TD
    A(["Write the design memo: comparison, counterfactual,
estimating equation, what would violate the assumption"]):::start --> B{"Does it name a violation specific
to THIS dataset?"}:::decision B -->|No| C["Too generic - name a data-specific risk
(hint: check pre-trends)"]:::no B -->|Yes| D["Run the memo past identification-skeptic"]:::yes D --> E{"Does it flag a specific vulnerability?
(e.g. post x exposure, no pre-trend check)"}:::decision E -->|Yes| F(["It proposes an alternative spec -
test it in the data lab"]):::final E -->|No| G(["Proceed to the data lab as specified -
document what was checked"]):::final classDef start fill:#eef2f6,stroke:#16324f,color:#16324f; classDef decision fill:#ffffff,stroke:#c8762a,color:#0e2336; classDef yes fill:#e3f1e8,stroke:#2f7a4f,color:#2f7a4f; classDef no fill:#f8e4e2,stroke:#a13a3a,color:#a13a3a; classDef final fill:#16324f,stroke:#16324f,color:#ffffff;

3. Data & analysis lab

Run the design memo's analysis, discover the naive version overstates the effect, and find out why — the hands-on core of Day 2.

flowchart TD
    A(["Run the naive ai_exposure x post2023 estimate;
plot pre-2023 hours by exposure tercile"]):::start --> B{"Are the pre-2023 lines parallel
across terciles?"}:::decision B -->|No| C["Confound present - add a continuous
trend control (ai_exposure x year)"]:::no B -->|Yes| C2["Naive estimate more trustworthy -
still disclose the check"]:::yes C --> D{"Once the control is added,
does the estimate move a lot?"}:::decision D -->|Yes| E(["That gap is the main result -
write it up, don't bury it"]):::final D -->|No| F(["Report both numbers - the check
itself is the evidence"]):::final E --> G{"Send the spec to identification-skeptic
and stats-reviewer - anything new?"}:::decision F --> G G -->|Yes| H["Address it before write-up"]:::no G -->|No| I(["Proceed to results"]):::final classDef start fill:#eef2f6,stroke:#16324f,color:#16324f; classDef decision fill:#ffffff,stroke:#c8762a,color:#0e2336; classDef yes fill:#e3f1e8,stroke:#2f7a4f,color:#2f7a4f; classDef no fill:#f8e4e2,stroke:#a13a3a,color:#a13a3a; classDef final fill:#16324f,stroke:#16324f,color:#ffffff;

4. Results, figures & robustness

Write up what the data lab found honestly, including the part where the first estimate was wrong — the spurious-causality trap, made explicit.

flowchart TD
    A(["Report the naive estimate, the pre-trend evidence,
and the robust estimate with the added control"]):::start --> B{"How far did the estimate move?"}:::decision B -->|A lot| C(["Foreground the gap as the main finding -
state confidence caveats"]):::final B -->|Little| D(["Note robustness confirms the initial read"]):::final C --> E{"Optional checks (median split, drop covid,
occupation trend) - estimate changes materially?"}:::decision D --> E E -->|Yes| F["Report it - don't drop the check
that ruins the nicer number"]:::no E -->|No| G["Note stability across specifications"]:::yes classDef start fill:#eef2f6,stroke:#16324f,color:#16324f; classDef decision fill:#ffffff,stroke:#c8762a,color:#0e2336; classDef yes fill:#e3f1e8,stroke:#2f7a4f,color:#2f7a4f; classDef no fill:#f8e4e2,stroke:#a13a3a,color:#a13a3a; classDef final fill:#16324f,stroke:#16324f,color:#ffffff;

5. Manuscript writing, in your own voice

Get editing help that tightens prose without flattening it into generic academic filler — the same rule this app's manuscript stage applies to your pasted writing sample.

flowchart TD
    A(["Before editing anything"]):::start --> B{"Does voice.md have concrete
examples, not generic advice?"}:::decision B -->|No| C["Fill it in with real, specific examples first"]:::no B -->|Yes| D["writing-editor reads it, then matches it"]:::yes D --> E{"Does the edit touch causal-confidence wording,
or add a citation/number/claim not already there?"}:::decision E -->|Yes| F["Never - that's substance,
route to identification-skeptic + author"]:::no E -->|No| G{"Is the sentence ambiguous about
correlation vs. causation?"}:::decision G -->|Yes| H["Flag it - don't silently pick a reading"]:::no G -->|No| I{"Is this a style edit or a substance edit?"}:::decision I -->|Unsure| J["Treat as substance - ask the author, don't guess"]:::no I -->|Style, e.g. hedging/throat-clearing| K{"Does voice.md call for that register?"}:::decision K -->|Yes| L["Keep it as-is"]:::yes K -->|No| M["Cut it"]:::yes M --> N(["Proceed - preserve paragraph structure"]):::final L --> N classDef start fill:#eef2f6,stroke:#16324f,color:#16324f; classDef decision fill:#ffffff,stroke:#c8762a,color:#0e2336; classDef yes fill:#e3f1e8,stroke:#2f7a4f,color:#2f7a4f; classDef no fill:#f8e4e2,stroke:#a13a3a,color:#a13a3a; classDef final fill:#16324f,stroke:#16324f,color:#ffffff;

6. AI as critical referee, then governance sign-off

Run the referee checklist on the real draft, then verify every AI-assisted step is actually disclosed before calling it done.

flowchart TD
    A(["disclosure-auditor scans the repo for
evidence of AI-assisted steps"]):::start --> B{"Is there a matching entry in
this checklist for each one?"}:::decision B -->|No| C["Flag the gap - add the entry now
(asked / tool / human check),
not reconstructed from memory later"]:::no B -->|Yes, but vague| D["Flag as insufficient -
'used AI for writing' isn't an entry"]:::no B -->|Yes, specific| E(["Entry passes"]):::final A --> F{"Is there a step that plainly
wasn't AI-assisted?"}:::decision F -->|Yes| G["No entry needed just because AI
is used elsewhere in the repo"]:::yes classDef start fill:#eef2f6,stroke:#16324f,color:#16324f; classDef decision fill:#ffffff,stroke:#c8762a,color:#0e2336; classDef yes fill:#e3f1e8,stroke:#2f7a4f,color:#2f7a4f; classDef no fill:#f8e4e2,stroke:#a13a3a,color:#a13a3a; classDef final fill:#16324f,stroke:#16324f,color:#ffffff;

This app streamlines the 11-step teaching sequence above into a 9-stage pipeline (dataset → literature → hypothesis → design → analysis → results → manuscript → referee → disclosure) — see the hosted-app README's "What's simplified" section for exactly what's folded together.

Begin — set up your session →