Skip to content
mentoor

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

  1. 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.
  2. 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.
  3. 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.
  4. Attempt first. Before asking where auth belongs, write down where you think it goes and why. Then ask, and study the differences.
  5. 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.
  6. 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

  1. Draft the map, then check it

    Skill: learn-new-field

    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
    ClaimSourceLabel
    Validation uses Ajv by defaultValidation docs pageConfirmed
    Decorators are visible to all pluginsEncapsulation page says scopedDisputed
    Fastify is always faster than ExpressBlog post, no methodUnsupported
  2. Build the glossary and a verified reading list

    Skill: learn-new-field

    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.

  3. Write your own plan first

    Skill: learn-think-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.

  4. Decide what to write by hand

    Skill: code-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

    1. By hand: idempotency key design
    2. By hand: signature verification
    3. Delegate and review: test fixtures
    4. Delegate and review: Dockerfile and CI scaffold
    5. By hand: one-line config renames
  5. Measure the real time saved

    Skill: code-by-hand

    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.

  6. Run a weekly no-AI round and a dependence check

    Skill: learn-think-first

    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