Skip to main content

Understand unfamiliar code

Use Ask mode: it can explore the project but does not change files.

Choosing Ask mode to explore the project

To study code without changing it, choose Ask mode.

  1. Attach an entry point: a class, a method, a test, an error message, or a run configuration.

  2. Phrase the question in terms of observable behavior. For example:

    Explain how a request travels from this controller to the database write.
    Find the main calls and implementations, and check the code of the linked
    dependencies if the behavior depends on them. Give the file paths and do not
    change the project.
  3. Ask the agent to separate facts taken from the code from assumptions, and to point out the places that need to be verified at run time.

  4. Open the declarations and usages named in the answer. If the question comes down to a library, ask the agent to read its code.

  5. If static analysis is not enough, move on to the bug fixing route and check your hypothesis in Debug mode.

To give the agent lasting familiarity with the project, use onboarding or add context to AGENTS.md.