Learn a new framework with AI without losing your edge
For engineers
Scenario lesson and practice set combining Learning a new field fast, Think first, then ask and When to code by hand. Completing it counts as evidence for every listed skill.
To learn a new framework with AI without losing your edge, build a draft map with the assistant, check it against the docs, try each design yourself before you ask, and write the risky and novel parts by hand. The assistant speeds you up, and the habits below keep you the person who can judge its work.
The situation
Dana has seven years of Express experience. Her team asks her to ship a payment webhook receiver in Fastify in three weeks. She has never used Fastify. She will work with Claude and an AI coding agent in her editor. She also wants to stay able to review that agent's work, because she will own the service.
Why this combination matters
Each skill alone fails. If she only uses the assistant to learn, she collects confident but unchecked claims. If she only writes by hand, she is slow and ignores a useful tool. If she delegates everything, the service ships and she cannot explain it. A 2025 randomised trial by METR found that experienced developers working on their own repositories took 19% longer with AI tools, even though they expected to be faster. Feeling fast is not evidence of being fast.
How to do it
- Map the field as a draft. Ask for the core ideas, the parts of the request lifecycle and the usual Express-to-Fastify confusions. Label every claim unverified.
- Check the map against the source. Open the Fastify docs for plugins, encapsulation, hooks, and validation. Use lateral reading: open the primary page, not another answer that repeats the claim. Label each claim confirmed, disputed or unsupported.
- Build a glossary and a reading list. For each term add a definition, a small example and the confusion beginners have. Check every reading-list entry exists and says what the list claims.
- Attempt first. Before asking where auth belongs, write down where you think it goes and why. Then ask, and study the differences.
- Choose what to write by hand. Write novel design (how duplicate events are detected), hot spots (signature checks, races) and tiny diffs yourself. Delegate fixtures, scaffolding and repetitive tests, and review the result.
- Measure and keep a no-AI round. Log prompt, review and fix time, not prompt time only. Once a week, do one core task unaided.
Before and after
Weak: "Write me a Fastify webhook service with auth and idempotency." She pastes the output, it runs, and she cannot say why auth is global.
Better: she writes her own plan first, asks for a critique and the strongest objection, then reads the Encapsulation page and rewrites her auth as a scoped plugin herself.
// Dana's own version, written by hand after reading the docs
app.register(async (scope) => {
scope.addHook('onRequest', requireApiKey);
scope.post('/webhooks/payments', paymentsHandler);
});
app.get('/health', async () => ({ ok: true }));
What goes wrong
- Trusting a fluent map. Models blend Express habits and older versions into Fastify answers. A decorator described as global is a bug waiting for production.
- Invented sources. Reading lists mix real pages with books and URLs that do not exist. A list that was never checked is a risk.
- Copying the answer to the question you should have tried first. You learn nothing from the difference if you never made a guess.
- Counting only prompt time. A saving of 40% on paper becomes 30% or less once review and rework are counted.
- Delegating the dangerous parts. A signature check or a duplicate-event guard looks fine and passes tests while hiding a timing leak or a race.
Dana's three weeks end with a working service, a checked glossary, notes on what the assistant got wrong, and a Friday habit that keeps her design and debugging sharp.
Steps
Draft the map, then check it
Ask Claude, ChatGPT or Gemini for a map of Fastify: plugins, hooks, validation and the Express confusions. Treat it as unverified. Open the docs pages for encapsulation, hooks and validation, and label each claim confirmed, disputed or unsupported.
Claim check Claim Source Label Validation uses Ajv by default Validation docs page Confirmed Decorators are visible to all plugins Encapsulation page says scoped Disputed Fastify is always faster than Express Blog post, no method Unsupported Build the glossary and a verified reading list
For each term write a definition, an example and the beginner confusion. Check each reading-list entry in a catalogue or at the URL, and remove invented ones.
Write your own plan first
Before asking where auth, validation and logging go, write your own placement and reason. Ask the assistant for the strongest objection, then compare and read the docs on every difference.
Decide what to write by hand
Write the duplicate-event design, the signature check and any tiny rename yourself. Delegate fixtures and scaffolding, and read generated code line by line wherever it touches auth, payments or concurrency.
Hand or delegate Goal: Webhook service, three weeks
- By hand: idempotency key design
- By hand: signature verification
- Delegate and review: test fixtures
- Delegate and review: Dockerfile and CI scaffold
- By hand: one-line config renames
Measure the real time saved
Log prompt, review and fix minutes against a by-hand estimate. Report the whole cycle, and stop delegating task types where review costs more than typing.
Run a weekly no-AI round and a dependence check
Pick a core task, such as designing a route or tracing a bug, and do it unaided each Friday. Every two weeks check what you cannot do, explain or error-check alone, and retrain that task.
Skills this scenario uses
Where to study
- Fastify documentation (opens in a new tab)DocsFree
The primary source for every Fastify claim in this scenario.
- Fastify encapsulation (opens in a new tab)DocsFree
Explains plugin scope and why decorators are not shared by default.
- Fastify hooks (opens in a new tab)DocsFree
Lists the request lifecycle and the order of hooks.
- Fastify validation and serialization (opens in a new tab)DocsFree
Shows how request and response schemas work.
- SIFT (The Four Moves) (opens in a new tab)ArticleFree
A short method for checking claims in a field you do not know.
- Early-2025 AI and experienced developer productivity (METR) (opens in a new tab)PaperFree
Source for the 19% slower result and the gap between felt and measured speed.