InterviewTreedInterviewTreed

InterviewTreed Question Bank

JetBrains AI Junie Interview Questions and Answers

Prepare for JetBrains AI Junie interviews with practical questions, detailed answers, and examples.

Total Questions

100

Beginner

30

Intermediate

40

Advanced

30

Beginner Questions

Foundational concepts, terminology, and core ideas.

Q1Fundamentals

What is JetBrains AI Assistant?

JetBrains AI Assistant is an AI-powered coding assistant integrated into supported JetBrains IDE workflows. Depending on the product version, configur...

Answer

JetBrains AI Assistant is an AI-powered coding assistant integrated into supported JetBrains IDE workflows. Depending on the product version, configuration, and subscription, it can help explain code, generate code, write tests, document APIs, and support development tasks. Treat its output as a draft that must be reviewed and verified.

Syntax

Developer question + IDE context → AI response → review → tests

Example

Ask it to explain a service method, then verify the explanation against callers and tests.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q2Fundamentals

What is Junie?

Junie is JetBrains' coding agent designed to handle multi-step development tasks in a project. An agent can inspect relevant files, plan work, make ed...

Answer

Junie is JetBrains' coding agent designed to handle multi-step development tasks in a project. An agent can inspect relevant files, plan work, make edits, and run checks when permitted by its environment. Its available features and controls can evolve, so verify details against the current Junie documentation.

Syntax

Task → plan → inspect project → edit → run checks → review

Example

Ask Junie to add input validation and tests, then review its plan and final diff.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q3Fundamentals

How does AI Assistant differ from Junie?

AI Assistant commonly supports interactive assistance such as explaining code, generating snippets, and answering questions in the IDE. Junie focuses ...

Answer

AI Assistant commonly supports interactive assistance such as explaining code, generating snippets, and answering questions in the IDE. Junie focuses more on agentic, multi-step tasks that may involve multiple files and tool execution. The exact boundary depends on the current JetBrains product versions and enabled features.

Syntax

Quick question/snippet → AI Assistant
Multi-step task → Junie

Example

Use AI Assistant to explain a method; use Junie to implement a small feature across a service and its tests.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q4Setup

Which IDEs support JetBrains AI features?

Availability depends on the specific JetBrains IDE, release, platform, and feature. Check the current official compatibility documentation before prom...

Answer

Availability depends on the specific JetBrains IDE, release, platform, and feature. Check the current official compatibility documentation before promising support for a particular IDE or version. Teams should validate the exact workflows they intend to use in their own development environment.

Syntax

IDE + version + feature → compatibility check

Example

Confirm the installed IntelliJ IDEA or PyCharm version supports the intended assistant or agent feature.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q5Setup

How should a developer get started with JetBrains AI tools?

Start by confirming the IDE version, installing or enabling the official feature, signing in as required, and checking subscription and organization p...

Answer

Start by confirming the IDE version, installing or enabling the official feature, signing in as required, and checking subscription and organization policies. Test with a low-risk task and learn the available context and permission controls before using it on sensitive repositories.

Syntax

Install/enable → sign in → review settings → small task

Example

Ask for an explanation of a non-sensitive utility method before requesting code changes.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q6Code Completion

What is AI-powered code completion?

AI completion suggests code near the cursor using available context such as the current file and surrounding code. It can speed up repetitive work, bu...

Answer

AI completion suggests code near the cursor using available context such as the current file and surrounding code. It can speed up repetitive work, but it may infer incorrect requirements or use APIs that are not available in the project. Review suggestions incrementally and run appropriate checks.

Syntax

Intent + nearby code → suggestion → accept/edit/dismiss

Example

Accept only the useful portion of a generated conditional and write the domain rule yourself.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q7Chat

What tasks are suitable for AI Assistant chat?

Chat is useful for explaining code, comparing approaches, proposing tests, drafting documentation, and investigating errors. A good request includes t...

Answer

Chat is useful for explaining code, comparing approaches, proposing tests, drafting documentation, and investigating errors. A good request includes the goal, relevant code or files, constraints, and the expected output. Verify any claims about runtime behavior or framework APIs.

Syntax

Goal + context + constraints → answer → validate

Example

Ask it to explain why a Kotlin coroutine might be cancelled in a specific code path.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q8Prompting

What makes a good prompt for JetBrains AI tools?

A strong prompt states the task, relevant project context, constraints, acceptance criteria, and desired response. For coding tasks, specify what must...

Answer

A strong prompt states the task, relevant project context, constraints, acceptance criteria, and desired response. For coding tasks, specify what must remain unchanged and what checks should be run. If requirements are ambiguous, ask for a plan or clarifying questions before allowing edits.

Syntax

Task + context + constraints + acceptance criteria

Example

"Add null validation to this service, preserve the public API, and add tests for null and valid inputs."

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q9Context

Why is IDE context important for AI assistance?

Context can include the current file, selected code, open files, project structure, or explicitly attached references, depending on the feature. The a...

Answer

Context can include the current file, selected code, open files, project structure, or explicitly attached references, depending on the feature. The assistant may not know every requirement or file in the repository. Provide relevant context and verify conclusions against the actual codebase.

Syntax

Relevant symbols + files + requirements → grounded answer

Example

Include the service and its unit test when asking for a behavior-preserving refactor.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q10Code Understanding

How can AI Assistant help explain unfamiliar code?

Ask for the method's purpose, inputs, outputs, side effects, dependencies, and edge cases. For cross-module behavior, ask it to trace callers and data...

Answer

Ask for the method's purpose, inputs, outputs, side effects, dependencies, and edge cases. For cross-module behavior, ask it to trace callers and data flow. Treat the explanation as a hypothesis and confirm it against implementation, tests, and runtime behavior.

Syntax

Entry point → callers → dependencies → tests

Example

Ask it to trace a controller endpoint through a service to the repository layer.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q11Testing

How can JetBrains AI tools help generate unit tests?

They can draft test cases from implementation and requirements, including normal cases, boundaries, and exceptions. Specify the project's framework an...

Answer

They can draft test cases from implementation and requirements, including normal cases, boundaries, and exceptions. Specify the project's framework and conventions, then inspect assertions for meaningful behavior rather than implementation details. Run the tests and add missing cases manually.

Syntax

Arrange → Act → Assert

Example

Ask for JUnit tests covering valid input, empty input, and a boundary value.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q12Documentation

How should AI-generated code documentation be reviewed?

Ask for documentation that explains intent, contracts, assumptions, and non-obvious behavior. Check every statement against the implementation and rem...

Answer

Ask for documentation that explains intent, contracts, assumptions, and non-obvious behavior. Check every statement against the implementation and remove speculative claims. Comments should add durable value rather than merely restating the code.

Syntax

Purpose + parameters + return value + exceptions

Example

Generate KDoc or Javadoc for a public method, then verify its nullability and exception behavior.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q13Refactoring

How can an AI tool help with a safe refactor?

Define the scope and state that observable behavior and public contracts must remain unchanged. Make a small change, inspect the diff, and run baselin...

Answer

Define the scope and state that observable behavior and public contracts must remain unchanged. Make a small change, inspect the diff, and run baseline tests. Avoid mixing unrelated formatting or renaming with semantic changes because that makes regressions harder to spot.

Syntax

Baseline tests → focused refactor → diff → tests

Example

Ask to extract duplicated validation into a private helper without changing public behavior.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q14Code Generation

When is AI useful for generating boilerplate?

AI can draft DTOs, simple mappings, repetitive tests, and documentation scaffolding. Generated boilerplate still needs review for naming, nullability,...

Answer

AI can draft DTOs, simple mappings, repetitive tests, and documentation scaffolding. Generated boilerplate still needs review for naming, nullability, validation, annotations, and consistency with nearby project code. Prefer existing project patterns over introducing a new style.

Syntax

Existing pattern → generated scaffold → convention review

Example

Generate a data class following the project's established DTO conventions.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q15Languages

Can JetBrains AI tools assist with multiple languages?

Capabilities depend on the IDE, language, framework, and product feature. Suggestion quality may vary for uncommon libraries or specialized syntax. Te...

Answer

Capabilities depend on the IDE, language, framework, and product feature. Suggestion quality may vary for uncommon libraries or specialized syntax. Test the workflow with representative code from the actual project instead of assuming equal quality across all languages.

Syntax

Language + framework + project conventions

Example

Evaluate tasks in Java, Kotlin, Python, or TypeScript only where the team's IDE and feature support them.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q16Workflow

Why learn the IDE shortcuts for AI features?

Shortcuts can reduce friction when opening chat, accepting completions, or navigating suggestions. Exact keybindings vary by IDE, operating system, an...

Answer

Shortcuts can reduce friction when opening chat, accepting completions, or navigating suggestions. Exact keybindings vary by IDE, operating system, and custom configuration. Use the IDE's keymap settings to confirm the current bindings.

Syntax

Keymap settings → find AI action → practice

Example

Search the keymap for the action that opens AI Assistant in your installed IDE.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q17Workflow

When should you use chat instead of inline completion?

Inline completion is best for small local edits or predictable code. Chat is better for explanations, trade-offs, and test planning. An agent such as ...

Answer

Inline completion is best for small local edits or predictable code. Chat is better for explanations, trade-offs, and test planning. An agent such as Junie may be more suitable for multi-step work across files, but the choice should reflect task risk and available controls.

Syntax

Small local edit → completion
Question/analysis → chat
Multi-step task → agent

Example

Complete a simple getter inline; ask chat to compare two caching approaches; use an agent for a bounded cross-file change.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q18Testing

How can you ask an AI tool to follow a test-first workflow?

Ask it to identify the intended behavior, draft a regression test, run the test, and only then propose an implementation. Verify that the test fails f...

Answer

Ask it to identify the intended behavior, draft a regression test, run the test, and only then propose an implementation. Verify that the test fails for the expected reason before the fix and passes afterward. This prevents a generated solution from being accepted without evidence.

Syntax

Requirement → failing test → implementation → rerun

Example

For a discount calculation bug, add a test for the threshold before editing the calculation.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q19Quality

Why should developers avoid blindly accepting generated code?

Generated code can be plausible yet incorrect, insecure, outdated, or inconsistent with business requirements. Review the diff, check API compatibilit...

Answer

Generated code can be plausible yet incorrect, insecure, outdated, or inconsistent with business requirements. Review the diff, check API compatibility, run tests and static analysis, and apply domain knowledge to high-impact logic. Passing tests are useful evidence but do not prove complete correctness.

Syntax

Suggestion ≠ verified implementation

Example

Manually inspect authentication, payments, and data-deletion code even if generated tests pass.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q20Privacy

What privacy concerns matter when using JetBrains AI tools?

Follow organizational policy and the current product's data-handling terms. Avoid sharing credentials, customer records, regulated data, or confidenti...

Answer

Follow organizational policy and the current product's data-handling terms. Avoid sharing credentials, customer records, regulated data, or confidential source code unless the organization has approved that workflow. Verify the actual plan and configuration rather than assuming every account has identical privacy controls.

Syntax

Classify data → check policy → minimize context

Example

Use synthetic sample data instead of copying a real customer record into a prompt.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q21Security

Can AI Assistant help review code for security issues?

It can suggest potential risks and mitigations, but it is not a complete security scanner. Combine AI-assisted review with static analysis, dependency...

Answer

It can suggest potential risks and mitigations, but it is not a complete security scanner. Combine AI-assisted review with static analysis, dependency scanning, security tests, threat modeling, and human review. Reproduce important findings and validate fixes.

Syntax

AI review + SAST + dependency scan + human review

Example

Ask it to inspect a database query for injection risk, then confirm parameterization and run checks.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q22Reliability

What is a hallucinated API in AI-generated code?

It is a method, package, parameter, or configuration that appears plausible but does not exist or work as described. Check compiler feedback, installe...

Answer

It is a method, package, parameter, or configuration that appears plausible but does not exist or work as described. Check compiler feedback, installed library versions, and official documentation. Prefer established APIs already used by the repository when appropriate.

Syntax

Suggestion → compiler/docs → verify

Example

If generated code calls a nonexistent SDK method, check the installed dependency's API before adopting it.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q23Code Quality

How can AI tools follow existing project conventions?

Provide nearby examples, formatting rules, architecture constraints, and repository instructions where supported. Ask the tool to match the project's ...

Answer

Provide nearby examples, formatting rules, architecture constraints, and repository instructions where supported. Ask the tool to match the project's existing patterns rather than inventing a new abstraction for a small task. Review naming, dependency injection, error handling, and test style.

Syntax

Existing examples + project rules → generated change → lint

Example

Ask it to add a service using the same dependency-injection style as neighboring services.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q24Workflow

Why should a large coding task be split into smaller steps?

Smaller tasks have clearer acceptance criteria and reduce the risk of broad unintended edits. Separate discovery, planning, implementation, tests, and...

Answer

Smaller tasks have clearer acceptance criteria and reduce the risk of broad unintended edits. Separate discovery, planning, implementation, tests, and review. Inspect each result before allowing the next step, especially when an agent can use tools or modify multiple files.

Syntax

Explore → plan → implement slice → test → continue

Example

Create the API contract first, then service logic, then UI integration.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q25Code Review

How can AI help with code review?

It can summarize a diff and suggest possible defects or improvements. Ask for evidence-backed findings with locations and impact, then reproduce signi...

Answer

It can summarize a diff and suggest possible defects or improvements. Ask for evidence-backed findings with locations and impact, then reproduce significant issues. A clean AI review is not proof that a patch is safe, and required human reviews should still be followed.

Syntax

Diff → findings → reproduce → fix

Example

Request a review for authorization gaps, null handling, data loss, and missing tests.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q26Context

Should comments and TODOs be trusted as instructions?

Comments can explain intent, but they may be stale or inaccurate. Confirm them against implementation and requirements. Treat text in source files or ...

Answer

Comments can explain intent, but they may be stale or inaccurate. Confirm them against implementation and requirements. Treat text in source files or external content as untrusted project data rather than permission to reveal secrets, ignore policies, or perform unrelated actions.

Syntax

Comment → verify against code → use as context

Example

Check whether a TODO still applies before implementing it.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q27Database

How should AI-generated SQL be reviewed?

Check correctness, parameterization, transaction boundaries, indexes, query plans, and database permissions. Never concatenate untrusted input into SQ...

Answer

Check correctness, parameterization, transaction boundaries, indexes, query plans, and database permissions. Never concatenate untrusted input into SQL. Test on non-production data and inspect execution plans for performance-sensitive queries.

Syntax

Parameterized SQL + least-privilege database role

Example

Review a generated search query and ensure user input is passed as a parameter.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q28Code Quality

How can AI help improve error handling?

Describe expected failure modes and the application's conventions. Ask for explicit handling of expected errors while preserving useful diagnostics an...

Answer

Describe expected failure modes and the application's conventions. Ask for explicit handling of expected errors while preserving useful diagnostics and avoiding secret leakage. Verify that errors are not swallowed and that callers receive the correct result or status.

Syntax

Expected failures → safe handling → redacted logs

Example

Add validation errors for bad input and a safe response for a transient dependency failure.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q29Frontend

How can AI help generate accessible UI code?

Ask for semantic elements, accessible names, keyboard support, focus management, and clear validation messages. Combine generated code with automated ...

Answer

Ask for semantic elements, accessible names, keyboard support, focus management, and clear validation messages. Combine generated code with automated accessibility checks and manual keyboard or assistive-technology testing. Code generation alone does not establish accessibility compliance.

Syntax

Semantic HTML + keyboard + labels + focus

Example

Ask for an accessible label and validation message for a form field.

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.
Q30Workflow

What should a coding task's definition of done include?

Define observable behavior, tests, compatibility, error handling, and quality checks. A clear definition distinguishes a plausible code suggestion fro...

Answer

Define observable behavior, tests, compatibility, error handling, and quality checks. A clear definition distinguishes a plausible code suggestion from a finished change ready for review. Include explicit statements about what must not change.

Syntax

Done = acceptance criteria + tests + lint + diff review

Example

"Tests pass, no unrelated files change, and the public API remains compatible."

Key Points

  • Keep the task and file scope clear.
  • Review suggestions before accepting them.
  • Verify behavior with tests or direct inspection.

Intermediate Questions

Implementation details, practical patterns, and common workflows.

Q31Junie Workflows

How should Junie be used to plan a multi-step feature?

Start by asking for a plan and affected files, then review assumptions and scope before implementation. Break the feature into coherent slices and ver...

Answer

Start by asking for a plan and affected files, then review assumptions and scope before implementation. Break the feature into coherent slices and verify each result. Avoid authorizing a broad task if the acceptance criteria or data boundaries are unclear.

Syntax

Requirements → plan → file map → implementation slices → verify

Example

Ask Junie to plan pagination across controller, service, repository, and tests before editing.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q32Junie Workflows

When is an agent workflow preferable to chat?

Use an agent workflow when the task requires coordinated steps such as inspecting files, editing multiple modules, and running checks. Use chat for an...

Answer

Use an agent workflow when the task requires coordinated steps such as inspecting files, editing multiple modules, and running checks. Use chat for analysis, explanation, and alternatives. Keep agent tasks bounded, observable, and reversible, and confirm the exact capabilities of the installed version.

Syntax

Question → chat
Multi-file implementation → agent + review

Example

Ask chat to compare designs, then let Junie implement the selected design in a feature branch.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q33Junie Workflows

Why review an agent's plan before execution?

A plan reveals which files, tools, and operations the agent expects to use. Reviewing it can catch scope expansion, unnecessary dependencies, destruct...

Answer

A plan reveals which files, tools, and operations the agent expects to use. Reviewing it can catch scope expansion, unnecessary dependencies, destructive commands, or missing tests before they occur. A plan is still a proposal and does not replace review of the final diff.

Syntax

Goal → proposed steps → scope check → execute

Example

Reject a plan that proposes changing unrelated configuration for a small validation fix.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q34Junie Workflows

How should multi-file agent changes be managed?

Ask the agent to identify affected files and dependencies first. Make changes in coherent slices, inspect the full diff, and run unit and integration ...

Answer

Ask the agent to identify affected files and dependencies first. Make changes in coherent slices, inspect the full diff, and run unit and integration tests. Pay special attention to public interfaces, configuration, migrations, and generated files.

Syntax

File map → edits → diff review → tests

Example

For a new field, inspect the DTO, validation, persistence, mapping, API contract, and tests.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q35Junie Workflows

What risks come with agent-run terminal commands?

Commands may change files, install packages, access networks, or affect data. Inspect the command, arguments, target paths, and side effects; use a de...

Answer

Commands may change files, install packages, access networks, or affect data. Inspect the command, arguments, target paths, and side effects; use a development environment and least privilege. Require explicit approval for destructive or production operations.

Syntax

Inspect command → validate scope → approve/deny → audit

Example

Review `./gradlew test` differently from a command that deletes files or deploys infrastructure.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q36Safety

How should permission prompts for an agent be handled?

Treat permission prompts as a security boundary. Verify command intent, arguments, file paths, network effects, and credentials before approving. Deny...

Answer

Treat permission prompts as a security boundary. Verify command intent, arguments, file paths, network effects, and credentials before approving. Deny or narrow actions that exceed task scope, and use the least privilege available.

Syntax

Action + arguments + side effects → decision

Example

Do not approve a network upload simply because it appears in an agent-generated plan.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q38Debugging

How should an AI tool be given a stack trace?

Provide a sanitized stack trace, reproduction steps, expected and actual behavior, and recent changes. Ask for plausible root causes and the evidence ...

Answer

Provide a sanitized stack trace, reproduction steps, expected and actual behavior, and recent changes. Ask for plausible root causes and the evidence that would distinguish them. Never include tokens, passwords, or customer data in diagnostic prompts.

Syntax

Trace + reproduction + expected/actual + environment

Example

Ask it to map the first application frame to source code and propose a reproducing test.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q39Testing

How should an agent help fix a failing test?

First reproduce and classify the failure as a regression, flaky test, environment issue, or stale assertion. Ask the agent to inspect both test and pr...

Answer

First reproduce and classify the failure as a regression, flaky test, environment issue, or stale assertion. Ask the agent to inspect both test and production code before changing either. Avoid weakening a test merely to make it pass.

Syntax

Reproduce → classify → root cause → fix → rerun

Example

Compare the failing test against the base branch before changing its expected result.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q40Testing

Can an agent generate integration tests?

It can draft tests for interactions among services, databases, and HTTP endpoints. Specify fixtures, isolation, cleanup, and expected side effects. Ve...

Answer

It can draft tests for interactions among services, databases, and HTTP endpoints. Specify fixtures, isolation, cleanup, and expected side effects. Verify tests do not depend on production services or real credentials and that failures are diagnosable.

Syntax

Arrange dependencies → invoke boundary → assert outcomes

Example

Use a disposable test database and test server for API integration tests.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q41Testing

How should generated mocks be reviewed?

Mocks should represent relevant collaborator behavior without making tests brittle or hiding integration defects. Follow the project's framework and c...

Answer

Mocks should represent relevant collaborator behavior without making tests brittle or hiding integration defects. Follow the project's framework and conventions, verify setups and verifications, and prefer real implementations for simple value objects where practical.

Syntax

Arrange mock → act → assert behavior

Example

Mock an external payment gateway while testing the business rule directly.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q42Testing

Does more generated test code always mean better coverage?

No. Coverage measures executed code, not whether assertions catch meaningful defects. Review boundary cases, negative paths, invariants, and regressio...

Answer

No. Coverage measures executed code, not whether assertions catch meaningful defects. Review boundary cases, negative paths, invariants, and regression sensitivity. A few strong tests can be more valuable than many repetitive ones.

Syntax

Coverage + meaningful assertions + mutation sensitivity

Example

Check that a test fails if the validation condition is removed.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q43Code Review

What should an AI code-review finding include?

A useful finding identifies the location, severity, evidence, impact, and concrete remediation. Ask for actionable defects rather than speculative sty...

Answer

A useful finding identifies the location, severity, evidence, impact, and concrete remediation. Ask for actionable defects rather than speculative style comments, and reproduce high-impact issues before modifying code.

Syntax

Finding = location + evidence + impact + remediation

Example

Prioritize an authorization bypass over a minor naming preference.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q44Git Workflow

How can AI help prepare a pull request description?

It can draft a summary, test notes, and explanation from a diff and task context. Confirm that the description matches actual changes and clearly stat...

Answer

It can draft a summary, test notes, and explanation from a diff and task context. Confirm that the description matches actual changes and clearly state tests that were not run. Never claim validation or performance improvements without evidence.

Syntax

Diff → summary + test evidence + limitations

Example

List changed API behavior and the exact test commands executed.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q45Git Workflow

Can AI draft useful commit messages?

It can summarize a diff into a commit message, but the developer must ensure the message describes actual intent. Follow the repository's format and t...

Answer

It can summarize a diff into a commit message, but the developer must ensure the message describes actual intent. Follow the repository's format and ticket conventions, and avoid claiming a fix if the diff only adds diagnostics.

Syntax

type(scope): concise intent

Example

Use `fix(auth): reject expired tokens` only if the patch actually enforces that behavior.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q46Git Workflow

How can AI help resolve merge conflicts?

Ask it to explain the intent of each side and propose a resolution that preserves required behavior. Inspect the final semantics and run tests for bot...

Answer

Ask it to explain the intent of each side and propose a resolution that preserves required behavior. Inspect the final semantics and run tests for both branches' functionality. Never accept one side wholesale without understanding what would be lost.

Syntax

Conflict markers → compare intent → resolve → test

Example

Resolve a conflict in validation logic and test both previously supported cases.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q47Modernization

How can AI help modernize legacy code safely?

It can explain legacy patterns and propose incremental migrations, but broad rewrites carry compatibility and regression risks. Establish baseline tes...

Answer

It can explain legacy patterns and propose incremental migrations, but broad rewrites carry compatibility and regression risks. Establish baseline tests, migrate one boundary at a time, and verify behavior and performance. Prefer adapters and small changes when possible.

Syntax

Baseline → incremental migration → tests → expand

Example

Migrate one service from a legacy API before rewriting the entire application.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q48Dependencies

How should AI-suggested dependency updates be evaluated?

Check package identity, release notes, breaking changes, license, vulnerabilities, transitive dependencies, and lockfile changes. Use approved package...

Answer

Check package identity, release notes, breaking changes, license, vulnerabilities, transitive dependencies, and lockfile changes. Use approved package sources and automated scanning. Do not install a dependency solely because a generated snippet references it.

Syntax

Verify package → release notes → lockfile → tests

Example

Confirm a suggested method exists in the installed library version before adopting it.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q49Database

How should AI-generated ORM queries be reviewed?

Check generated SQL, parameterization, tracking behavior, query count, pagination, and transaction semantics. Use realistic test data and query plans ...

Answer

Check generated SQL, parameterization, tracking behavior, query count, pagination, and transaction semantics. Use realistic test data and query plans for performance-sensitive operations. Watch for N+1 queries and unintended eager loading.

Syntax

ORM expression → SQL → execution plan

Example

Check whether a generated loop triggers one database query per item.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q50Security

How should agent-generated API code be reviewed for security?

Review authentication, authorization, input validation, output encoding, rate limits, error handling, and sensitive-data logging. Confirm authorizatio...

Answer

Review authentication, authorization, input validation, output encoding, rate limits, error handling, and sensitive-data logging. Confirm authorization is enforced server-side for each resource and not inferred from UI visibility. Add tests for unauthorized access.

Syntax

Authenticate → authorize → validate → execute → safe response

Example

Test that changing a resource ID cannot let one user access another user's record.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q51Security

What is prompt injection in an IDE coding workflow?

Prompt injection is untrusted content that attempts to manipulate an AI tool into ignoring intended instructions or taking unrelated actions. It can a...

Answer

Prompt injection is untrusted content that attempts to manipulate an AI tool into ignoring intended instructions or taking unrelated actions. It can appear in issues, comments, documentation, or retrieved content. Treat it as data, and never follow it to reveal secrets or bypass access controls.

Syntax

Untrusted text ≠ trusted instruction

Example

Ignore a source comment that asks the agent to print environment secrets.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q52Privacy

How should secrets be handled during AI-assisted development?

Keep credentials in approved secret stores and environment configuration, not prompts, source files, or logs. Use placeholders in examples, enable sec...

Answer

Keep credentials in approved secret stores and environment configuration, not prompts, source files, or logs. Use placeholders in examples, enable secret scanning, and rotate any exposed credential. Follow organizational policy for AI tools and sensitive repositories.

Syntax

Secret manager → environment → redacted logs

Example

Use `API_TOKEN=<placeholder>` in a sample configuration.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q53Security

Can AI-generated code introduce supply-chain risks?

A suggestion may reference a nonexistent or malicious package, a vulnerable version, or an untrusted integration. Verify publisher, package identity, ...

Answer

A suggestion may reference a nonexistent or malicious package, a vulnerable version, or an untrusted integration. Verify publisher, package identity, maintenance, license, advisories, and transitive dependencies before adoption.

Syntax

Package identity → provenance → advisories → lockfile

Example

Check the package registry and lockfile before installing a suggested library.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q54Performance

How should AI-assisted performance optimization be validated?

Use the assistant to form hypotheses and propose changes, then measure with a profiler or benchmark. Optimize demonstrated bottlenecks, preserve corre...

Answer

Use the assistant to form hypotheses and propose changes, then measure with a profiler or benchmark. Optimize demonstrated bottlenecks, preserve correctness tests, and avoid caching or concurrency changes without a clear invalidation and safety model.

Syntax

Baseline → profile → change → benchmark → compare

Example

Measure a slow database query before introducing caching.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q55Frontend

How can AI assist with accessibility reviews?

Ask for semantic markup, accessible names, keyboard operation, focus management, contrast, and clear error announcements. Validate with automated chec...

Answer

Ask for semantic markup, accessible names, keyboard operation, focus management, contrast, and clear error announcements. Validate with automated checks and manual keyboard or assistive-technology testing. Generated code alone does not establish conformance.

Syntax

Automated scan + keyboard test + manual review

Example

Check that a dialog returns focus to its trigger when closed.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q56Architecture

How should AI tools be used in a monorepo?

Identify workspace boundaries, shared libraries, scripts, and dependent applications before editing. Scope the change to relevant packages and consume...

Answer

Identify workspace boundaries, shared libraries, scripts, and dependent applications before editing. Scope the change to relevant packages and consumers, then run targeted and integration tests. Do not assume a repository summary includes every dependency.

Syntax

Workspace → package → dependents → tests

Example

For a shared type change, test each package that imports it.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q57Safety

How should an agent treat tool output and generated commands?

Treat tool output and commands as proposals requiring validation. Confirm paths, arguments, side effects, and provenance. Use deterministic controls f...

Answer

Treat tool output and commands as proposals requiring validation. Confirm paths, arguments, side effects, and provenance. Use deterministic controls for permissions and CI rather than relying on the model to self-police risky actions.

Syntax

Proposal → policy check → scoped execution → audit

Example

Verify a cleanup command targets only a temporary workspace.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q58Evaluation

How should a team measure AI coding productivity?

Measure time-to-accepted-change, review effort, defect rate, rework, developer satisfaction, and task completion across representative work. Code volu...

Answer

Measure time-to-accepted-change, review effort, defect rate, rework, developer satisfaction, and task completion across representative work. Code volume and suggestion acceptance alone can be misleading. Compare similar tasks and account for learning effects and risk.

Syntax

Quality + cycle time + review effort + developer experience

Example

Run a pilot with bug fixes, tests, documentation, and features before and after adoption.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q59Governance

What should an organization define before adopting JetBrains AI tools?

Define approved data classes, eligible repositories, access and retention expectations, code review requirements, security controls, and incident hand...

Answer

Define approved data classes, eligible repositories, access and retention expectations, code review requirements, security controls, and incident handling. Verify current plan capabilities and organization settings instead of assuming all accounts have identical controls.

Syntax

Policy → configuration → training → monitoring

Example

Document which repositories may use AI assistance and which require additional approval.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q60Architecture

How would you design a safe coding-agent workflow?

Use an orchestrator, scoped tools, policy checks, isolated execution, deterministic tests, audit logs, and human approval for high-impact actions. Kee...

Answer

Use an orchestrator, scoped tools, policy checks, isolated execution, deterministic tests, audit logs, and human approval for high-impact actions. Keep authorization outside the model and make state resumable. Product features may implement parts of this workflow differently.

Syntax

Task → plan → policy → tools → tests → human review

Example

Allow an agent to draft a patch while protected CI and a reviewer control merging.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q61Security

How does least privilege apply to Junie or other coding agents?

Give the agent only the files, commands, credentials, and network access needed for the task. Separate read and write capabilities, use short-lived cr...

Answer

Give the agent only the files, commands, credentials, and network access needed for the task. Separate read and write capabilities, use short-lived credentials, and require approval for privileged operations. Avoid exposing production secrets to coding sessions.

Syntax

Capabilities = minimum required permissions

Example

A test-fixing agent may edit a feature branch but cannot deploy to production.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q62Security

What should an agent execution sandbox isolate?

A sandbox should restrict filesystem access, process execution, network egress, credentials, and resource use. Containers alone may not be a complete ...

Answer

A sandbox should restrict filesystem access, process execution, network egress, credentials, and resource use. Containers alone may not be a complete boundary if privileged host resources are shared. Select controls based on the threat model and verify isolation.

Syntax

Task → isolated workspace → restricted tools/network → audit

Example

Run untrusted build scripts in an ephemeral environment without production credentials.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q63Security

How can command injection occur in agent workflows?

Injection can occur when untrusted file paths, issue text, or generated arguments are interpolated into shell commands. Prefer structured process APIs...

Answer

Injection can occur when untrusted file paths, issue text, or generated arguments are interpolated into shell commands. Prefer structured process APIs, argument arrays, strict allowlists, and validation. Avoid building shell commands by concatenating untrusted strings.

Syntax

spawn("grep", ["-R", validatedPattern, validatedPath])

Example

Do not concatenate a user-controlled branch name into a shell command without validation.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q64Security

How should agent file access prevent path traversal?

Resolve paths against an approved workspace root, normalize them, and reject paths that escape the root, including symlink escapes where relevant. Rev...

Answer

Resolve paths against an approved workspace root, normalize them, and reject paths that escape the root, including symlink escapes where relevant. Revalidate at execution time to reduce time-of-check/time-of-use risks.

Syntax

resolved = realpath(join(root, inputPath))
assert isWithin(root, resolved)

Example

Reject `../../.ssh/id_rsa` when a tool may read only project files.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q65Architecture

Why put a deterministic policy engine between an agent and tools?

A policy engine enforces allowed paths, commands, data classes, and approval requirements independently of model intent. Validate each action at the e...

Answer

A policy engine enforces allowed paths, commands, data classes, and approval requirements independently of model intent. Validate each action at the execution boundary and record decisions. This is stronger than relying on prompt instructions alone.

Syntax

Model action → policy check → tool executor → audit event

Example

Block infrastructure apply commands unless environment and approval requirements are satisfied.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q66Architecture

How should tools exposed to an agent be designed?

Tools should have narrow purposes, typed schemas, explicit side effects, predictable errors, and minimal outputs. Separate read and write operations, ...

Answer

Tools should have narrow purposes, typed schemas, explicit side effects, predictable errors, and minimal outputs. Separate read and write operations, validate arguments server-side, and avoid a single unrestricted tool that can do everything.

Syntax

Tool = name + schema + permission + effect + error contract

Example

Prefer `read_file` and `apply_patch` over unrestricted shell access where practical.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q93Customization

How should reusable prompts be designed for repeatable work?

Reusable prompts should define the task, required inputs, constraints, output format, and verification steps. Keep organization-wide instructions sepa...

Answer

Reusable prompts should define the task, required inputs, constraints, output format, and verification steps. Keep organization-wide instructions separate from task-specific prompts, and confirm which reusable-prompt features are supported by the current IDE and product version.

Syntax

Task template + inputs + constraints + output contract

Example

Create a reusable prompt to review a REST endpoint for validation, authorization, and tests.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q94IDE Integration

How should AI suggestions work alongside IDE inspections?

IDE inspections, compiler diagnostics, and static analysis provide deterministic signals that complement AI suggestions. Use them to catch type errors...

Answer

IDE inspections, compiler diagnostics, and static analysis provide deterministic signals that complement AI suggestions. Use them to catch type errors, style violations, and known risky patterns, then review warnings rather than assuming a generated change is correct because the editor accepts it.

Syntax

AI draft → IDE inspections → compiler → tests

Example

Run the project's inspections after an agent edits Kotlin or Java code.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q95Git Workflow

Why use version-control checkpoints before agent tasks?

Start from a clean or understood working tree and create a branch or checkpoint before broad changes. This makes the agent's contribution easier to is...

Answer

Start from a clean or understood working tree and create a branch or checkpoint before broad changes. This makes the agent's contribution easier to isolate and revert, while protecting unrelated developer work. Never overwrite uncommitted user changes without explicit consent.

Syntax

git status → branch/checkpoint → agent task → diff review

Example

Create a feature branch before asking Junie to refactor several files.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.
Q96Build Systems

How should AI tools be instructed to run project builds?

Provide the correct build and test commands for the repository and the modules affected. Agents may guess a command or run a costly full build unneces...

Answer

Provide the correct build and test commands for the repository and the modules affected. Agents may guess a command or run a costly full build unnecessarily, so define the smallest meaningful checks and escalate to broader validation before merging.

Syntax

changed module → targeted tests → full CI checks

Example

Tell the agent to run `./gradlew :service:test` for a Gradle multi-module service.

Key Points

  • Use focused, observable workflows.
  • Validate tool results and proposed changes.
  • Keep risky actions behind explicit review.

Advanced Questions

Architecture, optimization, and design trade-offs.

Q67Governance

How should approval be bound to a proposed action?

Bind approval to the exact action, arguments, target environment, and relevant diff hash, and expire it when those details change. Broad approvals are...

Answer

Bind approval to the exact action, arguments, target environment, and relevant diff hash, and expire it when those details change. Broad approvals are difficult to audit and may authorize unintended actions.

Syntax

approval = hash(action + args + target + diff)

Example

If the patch changes after approval, require review of the new diff.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q68Governance

What should coding-agent audit logs record?

Record task and actor identity, tool name, validated arguments or a redacted summary, policy decision, timestamps, outcome, and approval reference. Av...

Answer

Record task and actor identity, tool name, validated arguments or a redacted summary, policy decision, timestamps, outcome, and approval reference. Avoid storing secrets or excessive personal data. Logs should aid investigation without creating another data exposure risk.

Syntax

event = {taskId, tool, decision, time, outcome}

Example

Log that a deployment was denied without recording its credential.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q69Security

How should multi-tenant coding tasks be isolated?

Bind each task to an authenticated tenant and workspace on the server side, enforce authorization on every tool call, and isolate files and credential...

Answer

Bind each task to an authenticated tenant and workspace on the server side, enforce authorization on every tool call, and isolate files and credentials. Never trust a tenant ID supplied only by the model. Test cross-tenant access explicitly.

Syntax

Authenticated tenant → scoped workspace → authorized tools

Example

A task for tenant A must not read tenant B's repository even if prompted to do so.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q70Security

Why restrict network egress from coding agents?

Unrestricted egress can leak source code or secrets and contact malicious endpoints. Use allowlists, proxies, and explicit review for uploads or packa...

Answer

Unrestricted egress can leak source code or secrets and contact malicious endpoints. Use allowlists, proxies, and explicit review for uploads or package downloads. Permit only external services required for approved workflows.

Syntax

Agent sandbox → egress proxy → approved domains

Example

Allow the package registry required for builds while blocking arbitrary uploads.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q71Security

How should an agent handle malicious tool results?

Treat tool output as untrusted data, validate its structure and origin, and never let embedded instructions override trusted policy. For high-impact a...

Answer

Treat tool output as untrusted data, validate its structure and origin, and never let embedded instructions override trusted policy. For high-impact actions, use independent checks rather than relying on the same model to judge suspicious output.

Syntax

Untrusted result → parser/validator → policy → limited next action

Example

A webpage asking the assistant to reveal keys remains content, not an instruction.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q72Reliability

How do you make agent-triggered actions idempotent?

Use stable operation identifiers, detect completed work, and verify state before retrying. This prevents duplicate issues, commits, resources, or depl...

Answer

Use stable operation identifiers, detect completed work, and verify state before retrying. This prevents duplicate issues, commits, resources, or deployments when a tool call times out and is retried.

Syntax

if not completed(taskKey): perform(taskKey)

Example

A ticket integration should return an existing ticket for the same idempotency key.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q73Reliability

How should retries work in agent workflows?

Retry only transient failures with bounded exponential backoff and jitter. Before retrying non-idempotent operations, check whether the first attempt ...

Answer

Retry only transient failures with bounded exponential backoff and jitter. Before retrying non-idempotent operations, check whether the first attempt succeeded. Stop after a small number of failures rather than looping indefinitely.

Syntax

delay = min(cap, base * 2**attempt) + jitter

Example

Retry a rate-limited read after the prescribed delay, not a deployment blindly.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q74Reliability

How can an agent detect that it is stuck in a loop?

Track repeated tool arguments, unchanged state, recurring errors, and lack of progress against acceptance criteria. Stop or escalate after bounded rep...

Answer

Track repeated tool arguments, unchanged state, recurring errors, and lack of progress against acceptance criteria. Stop or escalate after bounded repeats and summarize attempts to prevent wasted resources and repeated unsafe actions.

Syntax

if repeated(action, history) or noProgress >= limit: stop()

Example

If the same test fails after repeated unchanged patches, stop and reconsider the approach.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q75Security

What does fail-closed behavior mean for an agent?

When authorization, approval, validation, or policy evaluation is unavailable or ambiguous, deny the high-impact action rather than guessing. Provide ...

Answer

When authorization, approval, validation, or policy evaluation is unavailable or ambiguous, deny the high-impact action rather than guessing. Provide a clear error and safe recovery path. This avoids turning a control outage into unintended permission.

Syntax

if policy_result != ALLOW: deny()

Example

If the approval service is unavailable, block deployment and explain why.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q76Reliability

How should cancellation work in long-running agent tasks?

Propagate cancellation to active tools, stop scheduling new work, and leave the workspace recoverable. Cancelling a model request may not terminate su...

Answer

Propagate cancellation to active tools, stop scheduling new work, and leave the workspace recoverable. Cancelling a model request may not terminate subprocesses or reverse external side effects, so orchestration must manage them explicitly.

Syntax

cancel → stop scheduling → terminate child tools → checkpoint

Example

If a user cancels a build, terminate the process and report changes already made.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q77Reliability

Why should tool output size be limited?

Large outputs consume context and hide relevant signals. Cap output, summarize with deterministic tools where possible, and preserve a reference to th...

Answer

Large outputs consume context and hide relevant signals. Cap output, summarize with deterministic tools where possible, and preserve a reference to the full artifact. Do not silently discard error details needed for diagnosis.

Syntax

output → cap → summarize → retain artifact reference

Example

Filter a long test log to failures while preserving the full log as an artifact.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q78Governance

How does separation of duties apply to coding agents?

The agent that proposes a change should not be the only control deciding whether it is safe to merge or deploy. Use independent CI, code-owner review,...

Answer

The agent that proposes a change should not be the only control deciding whether it is safe to merge or deploy. Use independent CI, code-owner review, protected branches, and separate deployment permissions for high-impact systems.

Syntax

Author → independent checks → reviewer → release system

Example

Let an agent open a pull request but not approve or merge its own changes.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q79Security

How should tool-access policies be tested?

Test allowed and denied actions, including boundary paths, symlinks, encoded inputs, missing identity, expired approval, and policy-service failure. C...

Answer

Test allowed and denied actions, including boundary paths, symlinks, encoded inputs, missing identity, expired approval, and policy-service failure. Critical controls should fail closed and emit auditable decisions.

Syntax

Identity × target × action × approval → allow/deny

Example

Verify that a missing policy response cannot accidentally grant shell access.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q80Evaluation

How should a coding-agent workflow upgrade be evaluated?

Compare the current and candidate workflow on the same representative task suite. Measure correctness, safety, latency, cost, and review burden; inspe...

Answer

Compare the current and candidate workflow on the same representative task suite. Measure correctness, safety, latency, cost, and review burden; inspect regressions before rollout and use staged adoption with rollback criteria.

Syntax

Baseline suite → candidate suite → compare → canary → rollout

Example

Do not promote a new workflow based on one impressive coding example.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q81Security

What should a red-team suite for AI coding agents include?

Test prompt injection in issues and files, path traversal, command injection, secret exfiltration, permission bypass, malicious dependencies, and dest...

Answer

Test prompt injection in issues and files, path traversal, command injection, secret exfiltration, permission bypass, malicious dependencies, and destructive actions without approval. Measure prevention and safe recovery, not just task completion.

Syntax

Threat scenario → expected policy outcome → test → evidence

Example

Place adversarial instructions in a fixture and verify no secret is disclosed or uploaded.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q82Evaluation

How should human review effort be measured?

Track review time, escaped defects, acceptance with minor edits, rework, and severity-weighted findings. Generation speed alone is misleading if revie...

Answer

Track review time, escaped defects, acceptance with minor edits, rework, and severity-weighted findings. Generation speed alone is misleading if review burden or production risk rises. Compare time-to-accepted-change rather than time-to-first-suggestion.

Syntax

Net value = time saved − review − rework − incident cost

Example

Compare representative tasks with and without AI using the same acceptance criteria.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q83Governance

How can a coding-agent workflow score change risk?

Consider affected component, privilege level, data sensitivity, public API impact, test coverage, and reversibility. Use risk scores to choose additio...

Answer

Consider affected component, privilege level, data sensitivity, public API impact, test coverage, and reversibility. Use risk scores to choose additional checks and approvals, but never let a model estimate override hard security rules.

Syntax

risk ≈ impact × likelihood × exposure

Example

Authentication changes still require specialist review even if a score appears low.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q84Reliability

How should AI-assisted changes be rolled back?

Prefer small commits or isolated branches, preserve the original diff, and define rollback steps before risky operations. Database and infrastructure ...

Answer

Prefer small commits or isolated branches, preserve the original diff, and define rollback steps before risky operations. Database and infrastructure changes may require compensating actions rather than a simple source-code revert.

Syntax

checkpoint → apply → verify → rollback path

Example

Document schema rollback compatibility and data recovery before a migration.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q85Operations

Should a coding agent deploy directly to production?

Production changes should follow the organization's release process, independent CI checks, access controls, and explicit approval. Do not grant unres...

Answer

Production changes should follow the organization's release process, independent CI checks, access controls, and explicit approval. Do not grant unrestricted production credentials by default. An agent can prepare a plan or draft a pull request for a protected pipeline.

Syntax

Patch → CI → review → approval → controlled deployment

Example

Let an agent draft release notes while a protected pipeline performs deployment.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q86Security

What if an AI coding workflow exposes a secret?

Stop further actions, preserve audit evidence, revoke or rotate exposed credentials, assess scope, contain affected systems, and follow the incident p...

Answer

Stop further actions, preserve audit evidence, revoke or rotate exposed credentials, assess scope, contain affected systems, and follow the incident process. Fix the underlying permission or policy weakness rather than relying only on a new prompt.

Syntax

Contain → revoke → investigate → remediate → validate

Example

Disable a compromised integration and rotate the affected token immediately.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q87Reliability

Which checks should be deterministic rather than model-based?

Use deterministic controls for authorization, schema validation, tests, formatting, static analysis, secret scanning, and required approvals. Models c...

Answer

Use deterministic controls for authorization, schema validation, tests, formatting, static analysis, secret scanning, and required approvals. Models can interpret context and generate hypotheses but should not be the sole enforcement mechanism for hard constraints.

Syntax

Model proposes → deterministic policy decides

Example

A model may flag a possible injection; tests and static analysis provide independent evidence.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q88Adoption

How would you roll out JetBrains AI tools across an engineering organization?

Start with a pilot and low-risk tasks, publish instructions and data-handling rules, train reviewers, measure outcomes, and expand gradually. Include ...

Answer

Start with a pilot and low-risk tasks, publish instructions and data-handling rules, train reviewers, measure outcomes, and expand gradually. Include a feedback path for failures and review policies as product capabilities evolve.

Syntax

Pilot → baseline → guardrails → evaluate → expand

Example

Start with tests and documentation before enabling broader agentic workflows in sensitive repositories.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q89Governance

How should teams handle intellectual-property concerns?

Define review procedures for generated code, licensing and attribution requirements, source-code policies, and handling of suspiciously similar output...

Answer

Define review procedures for generated code, licensing and attribution requirements, source-code policies, and handling of suspiciously similar output. Product controls and legal terms can change, so consult current official documentation and organizational counsel for high-risk uses.

Syntax

Policy → review → provenance checks → record decision

Example

Escalate a large copied-looking code block for provenance and license review.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q90Privacy

What data-retention questions should be reviewed before adoption?

Confirm current product and plan settings for prompts, suggestions, telemetry, and project context alongside contractual terms and organizational requ...

Answer

Confirm current product and plan settings for prompts, suggestions, telemetry, and project context alongside contractual terms and organizational requirements. Do not assume all plans have identical retention or training settings. Document approved data classes and deletion processes.

Syntax

Data class → product settings → retention policy → audit

Example

Verify the organization's actual JetBrains AI settings before using regulated data.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q91Evaluation

Which metrics best indicate success for AI coding tools?

Track accepted-task rate, escaped defects, rework, review time, policy violations, time-to-accepted-change, and developer satisfaction. Segment by tas...

Answer

Track accepted-task rate, escaped defects, rework, review time, policy violations, time-to-accepted-change, and developer satisfaction. Segment by task type and risk; raw code volume or suggestion acceptance can reward low-quality output.

Syntax

Quality + safety + cycle time + review effort

Example

Compare representative feature, bug-fix, testing, and documentation tasks in a pilot.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q92Architecture

How would you design an enterprise AI coding workflow around JetBrains IDEs?

Combine IDE assistance with repository instructions, protected source control, deterministic CI, scoped integrations, secret scanning, auditability, a...

Answer

Combine IDE assistance with repository instructions, protected source control, deterministic CI, scoped integrations, secret scanning, auditability, and human approval for high-impact actions. Keep access control outside the model and ensure changes can be traced, tested, and rolled back.

Syntax

Developer → AI tool/agent → branch → CI/security checks → reviewer → protected merge

Example

Let AI draft a change while branch protection and code-owner review control integration.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q97Configuration

Why are AI-generated configuration changes high risk?

Configuration can affect credentials, network access, feature flags, build behavior, and production environments. Review every changed setting, compar...

Answer

Configuration can affect credentials, network access, feature flags, build behavior, and production environments. Review every changed setting, compare with environment-specific conventions, and avoid copying secrets or local paths into committed files. Validate configuration with the normal deployment checks.

Syntax

config diff → policy review → environment validation

Example

Reject a generated change that embeds a local machine path or credential.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q98Database

How should AI-generated database migrations be reviewed?

Review schema changes for data loss, locking, compatibility with old application versions, rollback strategy, and production data volume. Test migrati...

Answer

Review schema changes for data loss, locking, compatibility with old application versions, rollback strategy, and production data volume. Test migrations on representative non-production data and consider expand-and-contract deployment patterns for zero-downtime changes.

Syntax

Expand schema → deploy compatible app → migrate data → contract later

Example

Add a nullable column first before deploying code that requires it.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q99Architecture

How can an agent preserve public API compatibility?

Specify compatibility constraints and inspect all callers, consumers, serialization formats, and versioning rules. Add contract tests where practical ...

Answer

Specify compatibility constraints and inspect all callers, consumers, serialization formats, and versioning rules. Add contract tests where practical and avoid silently changing response fields or exception behavior. Review generated changes at the API boundary as well as inside the implementation.

Syntax

Contract baseline → implementation → contract tests → diff

Example

Add an optional response field without renaming or removing existing fields.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.
Q100Operations

When should an agent stop and ask a human for guidance?

The agent should escalate when requirements conflict, authorization is unclear, tests cannot establish correctness, a destructive action is proposed, ...

Answer

The agent should escalate when requirements conflict, authorization is unclear, tests cannot establish correctness, a destructive action is proposed, or repeated attempts make no progress. Define stop conditions explicitly and require a concise summary of uncertainty and options.

Syntax

Ambiguity/high impact/no progress → pause → summarize → ask

Example

Ask for confirmation before deleting data or changing production infrastructure.

Key Points

  • Enforce critical controls outside the model.
  • Test adversarial and failure scenarios.
  • Measure correctness, safety, and review effort.

Share this question bank

Send this page to someone preparing for an interview.