Node.js interview questions: Working with an AI assistant

AI-assisted engineering rounds change what the interviewer can observe, not what production requires. You may be allowed to generate a first draft, but you still own the prompt's hidden assumptions, the code you accept, the tests you choose, and the explanation you give when the model is confidently wrong. The valuable signal is a visible control loop: frame the task, constrain the tool, inspect the diff, verify behavior, and narrate the decisions that remain yours.

These questions model that round directly. Opening answers treat the assistant as a faster search box or code generator. Follow-ups ask how you prevent fabricated APIs, protect secrets, preserve authorship of design decisions, and recover when generated code passes shallow tests but violates an invariant. Practice saying what evidence you need before accepting each step. The fully unlocked sample demonstrates a workflow that uses AI aggressively without outsourcing judgment. A strong answer makes the assistant's contribution auditable and keeps security, correctness, and operational ownership with the engineer who ships the result.

Covered in Volume 7: The AI-assisted engineering round
Question 01Answers in Raw Mode

So walk me through it, how does an AI assistant actually fit into your day-to-day engineering work?

A strong answer sounds like a loop the candidate actually runs, with a check they can name at every single step

Senior

The loop you can actually defend, where you do the decomposition yourself, prompt against a spec you wrote, and something runs after every diff you accept.

Staff

What heavy generation quietly does to a team's review economics, the numbers that show the decay before an incident does, and the norms that keep a human owning every merge.

Follow-up chain

  1. What's the biggest chunk of work you'd hand the assistant in one go?
  2. And what starts going wrong when you go bigger than that?
  3. How do you know when a generated change is actually done?
  4. Has the assistant changed which parts of the work you keep for yourself these days?
Question 02Answers in Raw Mode

When the assistant generates code for you, how often do you stop and verify it, and what does that verification actually look like?

A strong answer gives you a real cadence for when generated code first runs, with the checks lined up from cheapest to most expensive

Senior

The cadence that holds up in practice, read first, then typecheck, then a focused test, then a runtime probe, plus the one rule about stacking generations that keeps bisection cheap.

Staff

Verification debt you can actually measure, the first-execution failure rate, where to sample it, and how to tune a team's cadence off that number.

Follow-up chain

  1. What's the cheapest check you run, and when is it enough all on its own?
  2. Okay, so where does just reading it let you down?
  3. Does that rhythm change when you're in a codebase you don't know well?
  4. And what if the language or the framework is new to you too?
Question 03Answers in Raw Mode

Is there work you deliberately keep away from the assistant? What kinds, and why those?

A strong answer has an actual rule for when generation is off the table, and the rule comes down to what verification costs.

Senior

The one rule the whole keep-away list falls out of, and the four kinds of work where it tells you to write the code yourself.

Staff

Setting generation boundaries for a whole team, why the line has to move with seniority, and what shows up in the incident channel when a boundary sits in the wrong place.

Follow-up chain

  1. Why hold onto debugging yourself when the assistant is pretty good at suggesting fixes?
  2. You ruled out security-sensitive code, but the assistant has seen more security patterns than most engineers ever will. Defend that one.
  3. So does the assistant get any role at all in that code?
Question 04Answers in Raw Mode

Say you're reviewing a pull request and you know most of it came out of a model. What do you do differently than you would for a human-written one?

A strong answer knows why reviewing generated code is different, the bugs land in new places and the author's intent is no longer in the text

Senior

Why fluency stops being a quality signal, where the plausible-but-wrong bugs actually cluster, and what you ask instead of 'why did you do it this way' when the author is a model.

Staff

How review survives when diff volume doubles, the provenance norms, where the depth should go, and the PR metadata that catches rubber-stamping before an incident has to.

Follow-up chain

  1. Say the author tells you they already went through the generated code themselves. Do you ease up?
  2. If you could ask the human behind an AI-heavy PR just one question, what would it be?
  3. And what if they can't answer it?
Question 05Answers in Raw Mode

So the model hallucinates an API. How does that get caught before it ships?

A strong answer splits hallucinations into the ones that crash and the ones that quietly no-op, and knows which check catches each kind

Senior

The loud hallucinations and the silent ones, why Node ignoring unknown options makes the silent kind genuinely dangerous, and the cheap check that catches each.

Staff

The gates that make hallucinations unshippable by construction, from type coverage to executed-path tests to the dependency check for packages that never existed.

Follow-up chain

  1. Why does the model make up an API instead of just telling you it doesn't know?
  2. TypeScript would catch most of this stuff, right? So does adopting it close the problem?
  3. What still slips through even on a fully typed codebase?
Question 06Answers in Raw Mode

When the output has to be production code, how do you actually prompt the assistant?

A strong answer treats the prompt like an engineering spec with acceptance criteria, written down before the model generates a single line

Senior

Writing the prompt as a spec, inputs, outputs, invariants, error behavior, non-goals, and why an underspecified prompt hands you the training data's median implementation.

Staff

Why spec quality moves a team more than anything else downstream, prompts and plans living as PR artifacts, and what the drift between stated spec and shipped diff tells you in review.

Follow-up chain

  1. Honestly, writing that much spec sounds slower than just writing the code. When does it pay off?
  2. So the model keeps blowing past one of your stated constraints. What do you do about it?
  3. And when do you give up on re-prompting?
Question 07Answers in Raw Mode

Tell me about your testing strategy when the assistant wrote the code.

A strong answer gets correlated blind spots, that the generator can't be the only author of its own verification, and builds the tests around independence

Senior

The independence rule, assertions that come from the spec instead of the implementation, and the sixty-second break-the-code trick that outs a vacuous suite.

Staff

Keeping a test suite honest once generation scales up, why coverage inflates, what mutation-style sampling actually tells you, and where property-based testing earns its complexity.

Follow-up chain

  1. Generated tests have to be good for something, though. What do you actually keep them around for?
  2. How would you even know your suite would go red if the code broke?
  3. That's basically mutation testing, right? Would you put it in CI?
Question 08Answers in Raw Mode

How do you run a security review on code that came out of a model?

A strong answer reviews generated code against the vulnerability classes models actually reproduce, and treats every new dependency as attack surface

Senior

The vulnerabilities generation actually produces, interpreter boundaries, weak randomness, example secrets that turn real, and the boundary-walking checklist that catches them.

Staff

The security gates a generating team needs, secret scanning, SAST tuned to generated patterns, deny-by-default dependencies, and how slopsquatting turns package names into an attack.

Follow-up chain

  1. Give me a real example, a vulnerability a model wrote that a human probably wouldn't have.
  2. Why do model-suggested dependencies count as a security problem and not just a quality problem?
  3. So walk me through it, what does your policy actually require before a new package lands?
Question 09Answers in Raw Mode

You've been using the assistant heavily for a year now. How do you make sure you still understand your own codebase?

A strong answer has real practices for keeping a mental model of code the assistant wrote, plus a way to notice when that model has slipped

Senior

What actually causes ownership decay, the boundaries-by-hand rule, and the predict-before-grep test that tells you whether the system still lives in your head.

Staff

Ownership decay as an operational risk, the symptoms that surface at incident time, the MTTR pattern by module, and the structures that keep humans holding the architecture.

Follow-up chain

  1. Come on, reading every accepted diff carefully, does that really survive a deadline?
  2. When this happens to a team, what does it actually look like?
  3. And once nobody understands a module anymore, how do you get it back?
Question 10Answers in Raw Mode

Imagine you're writing your team's policy for AI-assisted development. What goes in it?

A strong answer designs real policy, ownership, gates, and disclosure, and can defend it against a ban on one side and a free-for-all on the other

Senior

The four clauses that do all the work, merge ownership, identical gates, disclosure that actually changes reviewer behavior, and the named paths that demand a human author.

Staff

Policy run as a control system, measuring outcomes instead of usage, watching the exception budget for a misfitted rule, and keeping postmortem language pointed at humans.

Follow-up chain

  1. Why not keep it simple, ban assistants on the riskiest repos and allow everything else?
  2. Do you want commits recording that an assistant wrote the code?
  3. Okay, but what stops disclosure from turning into a stigma that people dodge by hiding their usage?
Question 11Answers in Raw Mode

You're allowed to use the assistant in this round. Before we start, walk me through how you're going to use it in this session.

A strong answer drives the assistant live, narrating intent, reading each diff before accepting it, and running code on a cadence stated out loud

Senior

The three moves of the live protocol, say the plan before you touch the tool, read every diff out loud before accepting, and put a run between each accept and the next prompt.

Staff

What the interviewer is really scoring, direction, verification cadence, and recovery when the model gets it wrong, and why a wrong generation is your best chance to gain ground.

Follow-up chain

  1. The assistant hands you a big diff that mostly works, and the clock's running down. What do you do?
  2. What do you do when the assistant is confidently wrong right in front of the interviewer?
  3. And if you honestly can't tell whether it's wrong?
Question 12Answers in Raw Mode

Okay, the model just gave you this code. What do you do before you accept it?

A strong answer treats the accept as taking ownership, reads the diff in a fixed order, and can name the things that get a diff rejected on sight

Senior

Why the accept is an ownership transfer, the fixed reading order that keeps your attention off the happy path, and the diffs that get thrown out before the read even finishes.

Staff

What happens to the protocol under incident pressure, which checks compress, which ones never go away, and how skipped depth gets written down instead of forgotten.

Follow-up chain

  1. Sixty seconds an accept, dozens of accepts a day, does that math actually work out?
  2. What is it in a diff that makes you slow down and blow the sixty-second budget?
  3. And what makes you just reject it without even finishing the read?

EVERY ANSWER IS PART OF RAW MODE.

Raw Mode trains the follow-ups.

Unlock every first, Senior, and Staff answer, every tree answer, the debug repos, hallucination drills, design scenarios, and the framework capstone.Get NodeBook Raw Mode