📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

How would you introduce AI coding tools to a .NET team? Talk me through the guidelines you'd set, what must still be reviewed by a human, how you'd handle sceptics and over-enthusiasts, and how you'd measure whether it actually helped.

Leading an AI-tools rollout: pilot, usage and data guidelines, human review rules, training, handling different attitudes in the team, and measuring impact with delivery and quality metrics rather than acceptance rates.

Senior Behavioral Advanced ai change-management developer-productivity engineering-practice github-copilot leadership

🎯 Key points

  • Start with a time-boxed pilot on a few teams with a baseline measured first
  • Approved tools on business/enterprise plans; data policy: no secrets, no personal data, content exclusions
  • Human review stays mandatory; the author owns AI-written code as if they wrote it
  • Higher scrutiny for auth, payments, crypto, migrations and infrastructure changes
  • Shared repo instructions (copilot-instructions.md / AGENTS.md) and prompt files, reviewed like code
  • Training on verification: tests from requirements, checking packages, spotting hallucinated APIs
  • Measure DORA metrics, cycle time, review rework, escaped defects and developer surveys, not acceptance rate
  • Respect sceptics and slow down over-enthusiasts with the same evidence

⏱ 30-second answer

I'd run it as a change programme with a pilot, not a licence rollout:

  • Baseline first: cycle time, review rework, escaped defects, and a developer survey.
  • Guidelines: approved tools on a business plan, a data policy (no secrets or personal data, content exclusions), and the rule that the author owns every line, with extra scrutiny on auth, payments, migrations and infrastructure.
  • Enablement: shared instruction files, prompt files and training focused on verifying output.
  • Measure after 8–12 weeks with DORA metrics and quality signals, not acceptance rate.

Sceptics get evidence, enthusiasts get guardrails. The trade-off is speed of drafting against the cost of reviewing more code, so review capacity is part of the plan.

🗣 Full answer (senior)

How I would answer this in an interview

"I'd treat it as a change in how we engineer, not a tool install. Before anyone gets a licence, I'd agree the guardrails with security and the engineering leads: which tools are approved, on a business or enterprise plan so prompts aren't used for training; what data must never go into a prompt, which in Australia means no personal information covered by the Privacy Act, no secrets, no customer production data; and content exclusions for sensitive paths. And one principle above all: the author owns AI-written code exactly as if they typed it, and human review stays mandatory, with extra scrutiny on auth, payments, crypto, migrations and Terraform or Bicep.

For example, at [company] I [led / proposed] a pilot with [two teams of about 12 engineers] for [ten weeks]. We measured a baseline first: PR cycle time, review rework, escaped defects and a short developer survey. We wrote a shared copilot-instructions.md with our conventions, a few prompt files for common tasks, and ran a session on verification: tests from requirements, checking every new NuGet package, and spotting invented APIs. Some engineers were sceptical, some wanted agent mode on everything. I paired with both groups on real tickets and let the data talk. [Result: cycle time on routine work dropped about X%, rework didn't rise, and we found Y issue we addressed with a rule.]

The mistake I see is measuring acceptance rate or lines generated and declaring victory. Independent research, such as METR's 2025 study where experienced developers were slower with AI while believing they were faster, shows perception isn't evidence. So I measure delivery and quality outcomes and keep review capacity in mind, because more code arriving faster just moves the bottleneck to reviewers. A good rollout makes the team faster and keeps it safe; one without that is just more code."


The rollout plan

Phase What happens Exit criteria
0. Guardrails Approved tools, data policy, content exclusions, review rules agreed with security Policy signed off, plan configured
1. Baseline Capture cycle time, rework, escaped defects, survey 4–6 weeks of data
2. Pilot 1–3 teams, shared instructions, training on verification 8–12 weeks, weekly retro notes
3. Evaluate Compare metrics, read the retros, adjust rules Go / adjust / stop decision
4. Scale Wider rollout, champions per team, review the instructions quarterly Metrics stable or improving

What always needs a human

Area Why
Authentication, authorisation, crypto Plausible code is often insecure code
Payments and money calculations Rounding and edge cases matter
EF Core migrations and data fixes Irreversible in production
Infrastructure as code, pipelines, permissions Blast radius across environments
New dependencies Hallucinated or malicious packages

Production example

In [the pilot], median PR cycle time for [routine CRUD and test work] went from [2.1 to 1.6 days], review rework stayed flat at [~1.3 rounds per PR], and the survey showed [most] developers wanted to continue. We also found [two] PRs adding NuGet packages nobody had vetted, which led to a dependency allow-list.

🔍 What the interviewer is checking

Checks whether the candidate can lead a tool-driven change responsibly: guardrails, people, and honest measurement.

Green flags

  • Pilot with a baseline and an evaluation date
  • Clear data policy (no secrets or personal data) and approved plans
  • Human review stays mandatory, higher scrutiny for risky paths
  • Measures delivery and quality outcomes, not acceptance rate
  • Handles sceptics and enthusiasts with evidence and pairing

Red flags

  • "Just give everyone Copilot"
  • Success = lines generated or acceptance rate
  • Relaxes review for AI-written code
  • No mention of data, privacy or security

📚 Learn in depth

1. Why a pilot with a baseline

Without a baseline, every result is anecdote. AI tools also change several things at once: how fast code is written, how big PRs are, and how much reviewers must read. You need before and after numbers on the same teams and kinds of work.

baseline (4–6 wks) ──► pilot (8–12 wks) ──► compare same metrics ──► decide ──► scale with adjustments

2. The policy layer

  • Tool and plan: business or enterprise tiers give organisation controls such as policy management, content exclusions, audit logs and contractual data terms. Personal accounts don't.
  • Data rules: no secrets, no personal information (Privacy Act 1988 and the APPs), no customer data, no confidential client code unless the contract allows it.
  • Public code matching: decide whether to block suggestions that match public code, to reduce licence risk.
  • Agent permissions: what agent mode and cloud coding agents may run, which MCP servers are allowed, and that they work on branches with normal PR review.

3. The engineering layer

  • Shared copilot-instructions.md / AGENTS.md and prompt files in each repo, reviewed like code.
  • The existing gates apply unchanged: analysers, TreatWarningsAsErrors, tests, SAST, dependency scanning, secret scanning, required human approval.
  • Optional PR label or checkbox "AI-assisted" to help the evaluation (not to blame).

4. Measuring properly

Metric family Examples Why
Delivery (DORA) Lead time for changes, deployment frequency, change failure rate, recovery time Outcomes the business sees
Flow PR cycle time, PR size, time to first review Where AI speeds up or bottlenecks
Quality Escaped defects, review rework rounds, revert rate, mutation score on critical code Whether speed costs quality
Experience Survey (satisfaction, cognitive load, trust) People's view; useful, but not sufficient
Usage Active users, acceptance rate Adoption only, never value

The 2024 DORA report associated higher AI adoption with slightly lower delivery stability, and the METR 2025 study found experienced open-source developers were slower with AI on their own repos while believing they were faster. The lesson: measure outcomes, and expect results to differ by task and codebase.

5. People

  • Sceptics often have good reasons (quality, security, craft). Involve them in writing the guardrails and the evaluation.
  • Over-enthusiasts produce big AI diffs that swamp reviewers. Set PR size expectations and pair on review.
  • Juniors need to learn the fundamentals; agree when they should write code without AI and explain any AI-generated code in review.

Try it yourself

  1. Pull 6 weeks of PR data from your repo (GitHub API or Azure DevOps) and compute cycle time and review rounds as a baseline.
  2. Draft a one-page AI usage policy covering tools, data and review rules.
  3. Write a copilot-instructions.md for one repo and review it with the team.
  4. Design a five-question developer survey to run before and after a pilot.
  5. Set up a dashboard comparing PR size and review time for labelled AI-assisted PRs vs others.

💻 Code

Guardrails expressed as code: an instructions file, branch protection that keeps a human reviewer, and a CI check that flags new NuGet packages for review.

<!-- .github/copilot-instructions.md (excerpt) -->
- Target .NET 10 and C# 14; follow the patterns in /src/Orders.
- Never add NuGet packages without saying so explicitly in the PR description.
- Never put connection strings, keys or personal data in code, tests or samples.
- Changes under /src/Auth, /src/Payments, /infra and /Migrations need a CODEOWNERS review.
# .github/CODEOWNERS: human owners for high-risk paths
/src/Auth/        @org/security-champions
/src/Payments/    @org/payments-leads
/infra/           @org/platform
**/Migrations/    @org/data-owners
// tools/NewPackageCheck/Program.cs: fails CI when Directory.Packages.props gains
// a package that is not on the allow-list, so a human must approve it.
using System.Xml.Linq;

var allowed = (await File.ReadAllLinesAsync("eng/allowed-packages.txt"))
    .Where(l => l.Length > 0 && !l.StartsWith('#'))
    .ToHashSet(StringComparer.OrdinalIgnoreCase);

var packages = XDocument.Load("Directory.Packages.props")
    .Descendants("PackageVersion")
    .Select(e => (string?)e.Attribute("Include"))
    .OfType<string>();

var unknown = packages.Where(p => !allowed.Contains(p)).ToList();
foreach (var p in unknown)
    Console.Error.WriteLine($"Package not on allow-list, needs review: {p}");

return unknown.Count == 0 ? 0 : 1;

⚠ Common mistakes

  • Mistake: Buying licences and announcing "we use AI now". Why it is wrong: no guardrails, no baseline, no way to tell if it helped. Instead: run a pilot with policy, baseline and an evaluation date.
  • Mistake: Measuring acceptance rate or lines generated. Why it is wrong: volume isn't value and can hide rework. Instead: measure DORA metrics, cycle time, rework and escaped defects, plus a developer survey.
  • Mistake: Allowing personal accounts and free tiers. Why it is wrong: no organisational data controls or audit, and personal information may leave the organisation in breach of the Privacy Act 1988 (or GDPR for EU data). Instead: approved business or enterprise plans with content exclusions and a written data policy.
  • Mistake: Relaxing review because "the AI already checked it". Why it is wrong: AI code has subtle bugs and security issues. Instead: keep required human review and CODEOWNERS for high-risk paths.
  • Mistake: Ignoring review capacity. Why it is wrong: faster generation floods reviewers, PRs grow and review quality drops. Instead: treat review as the constrained resource: PR size guidelines, automated gates (analysers, tests, SAST, dependency and secret scanning) so humans review only what machines can't, an AI first-pass review to remove mechanical comments, a "What I verified" PR section, and rotating reviewers with time to first review on a dashboard.
  • Mistake: Dismissing sceptics. Why it is wrong: they often spot the real risks and their buy-in matters. Instead: involve them in the guardrails and evaluation, share results openly, and make opting out of agent mode for some work acceptable.
  • Mistake: Letting juniors skip fundamentals. Why it is wrong: they can't review what they don't understand. Instead: require them to explain AI-written code in review.

🏛 Senior insight: trade-offs

The value of AI tools depends far more on the engineering system around them (tests, review, small PRs, clear conventions) than on the model. Teams with strong practices get faster; teams without them get more code and more incidents. So the senior job is to strengthen the system first, then keep evolving it as the tools change: update instruction files when reviewers repeat a comment, move new risks into automated gates (a package allow-list after a hallucinated dependency, a mutation-score gate after weak generated tests), and revisit agent permissions as features like cloud coding agents and MCP tools arrive. Senior engineers should own that loop, not leave it to whoever is most enthusiastic.

For sceptics, the most effective approach I know is ongoing and two-way: a short fortnightly show-and-tell of real wins and real failures, an open channel for problems, and the evaluation data shared with everyone. Training should focus on verification skills, not tricks.

Approach When it fits Cost When not to
Pilot with baseline Any organisation adopting AI tools 3–4 months, measurement effort Never skip it for a large rollout
Org-wide rollout at once Small org with strong review and CI Fast, risky Regulated environments, weak test culture
Restricted use (chat only) Highly sensitive code or contracts Less benefit When guardrails could make agent use safe
Champions per team Scaling after the pilot Champion time Before guidelines exist

Measure at 3 and 6 months, combine numbers with survey and retro feedback, and be willing to report a neutral or negative result.

🔗 Follow-ups the interviewer may ask

  1. When: Candidate talks about guidelines without explaining the tool's limits Why: Checks that the rules are based on how the tools actually work
    How to answer

    An AI coding assistant is a large language model that predicts the next token given a context window the IDE assembles for it: the current file around the cursor, other open tabs, repository instructions such as .github/copilot-instructions.md or AGENTS.md, and snippets retrieved from the codebase. It has no compiler inside it, so it produces plausible code, not checked code.

    • Inline completion: fast fill-in-the-middle suggestions as you type.
    • Chat: ask, explain, generate or edit with a conversation.
    • Agent mode / coding agent: plans, edits many files, runs dotnet build and dotnet test, reads the errors and iterates, or works from an issue and opens a PR.

    It is excellent at boilerplate, tests and explaining code, and weak at novel design and anything newer than its training data. The trade-off: speed of first draft against the cost of verifying it.

  2. When: Candidate mentions security or data policy Why: Checks depth on AI-specific security risks such as hallucinated packages and secrets in prompts
    How to answer

    AI-generated code carries the usual risks plus some new ones:

    • Insecure patterns: models reproduce what's common, such as string-built SQL, a certificate callback that returns true, MD5, or a missing [Authorize].
    • Hallucinated packages: the model names a NuGet or npm package that doesn't exist, and attackers register those names (slopsquatting).
    • Licence exposure from suggestions matching public code, and data leakage when secrets or personal information go into prompts.
    • Poisoned context: instruction files or docs that steer agent mode into unsafe edits or commands.

    Control it with the gates you already need (SAST, secret scanning, dependency review, human approval) plus package source mapping, lock files and allow-lists, content exclusions and a data policy. The trade-off: a little friction on new dependencies in exchange for closing the cheapest attack path.

  3. When: Candidate mentions AI generating more code faster than the team can review Why: Checks how they handle the technical debt that fast generation can create
    How to answer

    Technical debt is the future cost of a shortcut, and the interest is the extra effort or risk it adds every time we work near it. I make it visible in a debt register with each item's impact, how often we pay its interest (change frequency, incidents, delays) and a rough cost to fix. I prioritise by interest, not by how ugly the code is: debt in a hotspot that slows every feature beats a messy module nobody touches. I get time by explaining it in business terms (lead time, incident risk, cost), by reserving a steady share of capacity, and by pairing debt fixes with features that touch the same area.

🛠 Real-world problems: how you handle them

AI pilot sped up PRs but swamped reviewers
Situation
[A product group of 3 teams, ~20 engineers] building [an ASP.NET Core platform] started using agent mode heavily in [week 3] of a pilot. PRs got much larger and senior reviewers became the bottleneck.
Signals
Median PR size rose from [~180 to ~650] changed lines; time to first review doubled; reviewers reported fatigue in retros; [two] defects escaped in large AI-assisted PRs.
Investigation
Pulled PR data from the GitHub API and compared AI-labelled PRs with others: size, review rounds, time to merge, reverts. Read the two escaped defects: both in files unrelated to the ticket, changed by agent mode. Ran a short survey on reviewer load.
Resolution
Immediately: agreed a PR size guideline (~400 lines), asked authors to split agent output and describe what they verified. Then added repo instructions limiting agent edits to relevant folders, CODEOWNERS on risky paths, and pairing sessions on reviewing AI output.
Prevention
Dashboard of PR size and time to first review by label; quarterly review of instruction files; PR template section "What I verified"; rule that agent-generated changes outside the ticket scope are reverted.

How to tell it (STAR)

**S:** At [company] I [led] an AI-tools pilot with [three teams]. By [week 3], agent mode had made PRs [3x] larger and senior reviewers were the bottleneck, with [two] defects escaping. **T:** I had to keep the speed-up without losing review quality. **A:** I compared PR data for AI-assisted and other PRs, agreed a size guideline with the teams, added a "What I verified" section to the PR template, scoped agent edits with repo instructions, and ran pairing sessions on reviewing AI output. **R:** Median PR size fell back to [~250] lines, time to first review returned to [baseline], cycle time stayed [~20%] better than before the pilot, and we had [no] further escapes in the pilot.

More in AI-Assisted Development

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me