workflows
Onboarding new engineers with an AI pair
AI pair programming tools help new engineers find code context and answers faster by routing their questions through relevant repositories, issues, and documentation automatically.

Getting a new engineer productive on day one means solving the same three problems every time: they don't know where things are, they don't know why things are the way they are, and they're afraid to break something while they figure it out. Traditional onboarding throws docs and a mentor at this. AI pair programming flips it: let the new hire drive, and route their questions to the right context automatically.
The gap between "clone the repo" and "ship your first PR" is where most onboarding friction lives. A junior engineer joins, spends two days setting up their environment, reads architecture docs that are six months out of date, and finally asks a senior "why does the auth service talk to three different databases?" The answer involves a migration that never finished, a performance hack from 2022, and a compliance requirement nobody wrote down. Multiply that conversation by twenty and you've described the first month.
An AI pair changes the equation. Instead of front-loading knowledge transfer or waiting for the right person to be available, you compress the feedback loop: the new hire asks a question in their editor, the AI routes it through the relevant code, issues, and past decisions, and returns an answer grounded in your actual system. They stay in flow. The senior engineer gets interrupted less. And the onboarding path becomes measurable.
Questions are the real onboarding curriculum
Most onboarding plans are structured around what the company wants to teach: "Here's our tech stack, here's our deployment process, here's our style guide." But new engineers don't learn in that order. They learn by trying to accomplish something small, hitting a wall, and asking "why doesn't this work?" or "where do I change X?"
The quality of their questions is the best signal you have for what's actually blocking them. If someone asks "How do I run tests locally?" on day two, you know your setup docs are incomplete. If they ask "Why does userService.get() sometimes return a cached result and sometimes hit the database?" on day four, they're already thinking about correctness and you can route them toward the caching layer's design doc.
An AI pair that can answer these questions in context—pointing to the specific file, the git blame, the Slack thread where the decision was made—turns every question into a learning moment without pulling someone away from their own work. The constraint is that the AI needs access to more than just your codebase. It needs issues, PRs, design docs, and the commit history that explains why a messy bit of code exists.
The agent loop keeps new hires from going off the rails
Letting someone new explore freely is good for learning. Letting them spend three hours implementing a solution that violates an unwritten architectural constraint is not. The classic fix is heavyweight code review after the fact, which feels demoralizing when you've invested in the wrong approach.
Goatfied's agent loop—plan, constrain, edit, validate, retry—short-circuits this. When a new engineer starts on a task, the AI generates a plan: "You'll need to add a new endpoint in api/routes/users.ts, update the schema in db/migrations, and add a corresponding test in tests/api/users.test.ts." The constraints gate runs lint, type-check, and any custom rules you've encoded (maybe you enforce that all database queries go through a specific repository layer). If the edit violates a constraint, the agent retries before the human has committed.
For onboarding, this means the new hire gets corrective feedback in seconds, not hours. They learn the team's conventions by running into the guardrails immediately, not by having a PR rejected after a day of review. And because each retry is tied to a specific constraint violation, the learning is concrete: "We don't allow raw SQL in route handlers; use the UserRepository instead."
Small reversible diffs build confidence faster than reading docs
A new engineer's first week is a tightrope walk between "I don't want to look incompetent by asking too many questions" and "I don't want to break prod by changing the wrong thing." The result is usually paralysis: they read for days before touching anything.
AI pair programming inverts this. Start them on a real task—something small and well-scoped, like adding a missing validation error message or updating a deprecated API call—and let the AI scaffold the change. The diff is small (maybe ten lines), the test coverage confirms it works, and the validation step catches any obvious mistakes.
Because the changes are small and the feedback is fast, the psychological cost of being wrong drops. If the AI suggests a change that doesn't make sense, the engineer can read the diff, ask "why did you modify this line?" and get an explanation tied to the actual code. If they disagree, they can edit it manually and re-validate. The loop is tight enough that trial and error becomes a legitimate learning strategy.
This also surfaces institutional knowledge that never made it into docs. When the AI suggests wrapping a database call in a transaction and the new hire asks why, the answer might reference a production incident from eight months ago. That story is more memorable than a bullet point in a wiki.
Onboarding reveals what's actually undocumented
Every question a new engineer asks is an implicit bug report about your onboarding materials. If three people in a row ask "How do I configure environment variables for local development?" you've found a gap. But those questions usually disappear into Slack and get answered one-off.
When the AI is the first line of response, you get a log of every question it couldn't answer well. If it keeps routing people to an outdated wiki page, you know the page needs an update. If it has to infer an answer because there's no written explanation for why your API uses snake_case in some endpoints and camelCase in others, you've found an implicit convention worth codifying.
You can run analytics on this: which files generate the most "why does this work this way?" questions, which parts of the system new hires touch first, where they spend the most time between plan and validated commit. That data tells you where your onboarding is actually happening, as opposed to where your onboarding plan says it should happen.
Practical setup: what the AI needs to be useful
For an AI pair to handle onboarding questions, it needs more than code access. At minimum:
- Commit history with decent messages. If your commits are all "fix bug" and "update stuff," the AI can't explain why a change was made. If they reference issue numbers and summarize intent, it can trace decisions.
- Pull request discussions. The conversation in a PR often contains the "we tried X but it didn't work because Y" context that never makes it into comments.
- Design docs or RFCs. Even informal markdown files in a
/docsdirectory give the AI something to reference when a new hire asks "why is this service architected this way?" - Links between issues and commits. If your issue tracker references are machine-readable (e.g., "Fixes #1234" in commits), the AI can connect a confusing piece of code back to the bug or feature request that motivated it.
You don't need perfect documentation. You need enough connective tissue that the AI can construct an answer by stitching together code, history, and discussion. If your onboarding questions mostly get "I'm not sure, but here's the relevant code and the last three PRs that touched it," that's often enough for the new hire to figure it out.
Measuring whether it's working
The traditional onboarding metric is "time to first commit" or "time to first deployed feature." Those are lagging indicators. You find out it didn't work a month later.
With AI pair programming, you can track:
- Question volume over time per engineer. Does it drop as they ramp? Or do they hit a plateau where they're stuck on the same class of question repeatedly?
- Retry rate in the agent loop. Are they making the same mistake over and over (suggesting a gap in guidance), or do they quickly converge on valid solutions?
- Manual override frequency. How often does the new hire reject the AI's suggestion and write something different? High override rates might mean the AI doesn't understand your conventions yet—or that the engineer has prior experience and is confidently adapting.
If someone's question volume drops but their retry rate stays high, they've learned what to ask but not how to execute correctly. If both drop together, onboarding is working.