CyberSkill

Claude Certified Architect

Mock Exam - by CyberSkill

All sample questions
Code exploration

Code exploration sample questions

Five original sample questions with answers and explanations for the code exploration domain of the Claude Certified Architect - Foundations exam. They are written by CyberSkill and kept separate from the mock question bank, so the answers are shown here. This is an unofficial study aid and is not affiliated with or endorsed by Anthropic.

1. An agent must find why a specific error message is thrown in a large service. The most context-efficient first step is to:

  • A. Read the whole service top to bottom to build a full picture.

    Reading everything floods the context and buries the few relevant lines.

  • B. Search for the exact error string, then open only the files and functions that produce or handle it. (correct)

    Searching the known string narrows the surface to the code that actually raises the error.

  • C. Open the largest file first on the assumption that is where the logic lives.

    File size is not a signal for where a specific error originates.

  • D. Rewrite the error handling and see if the message changes.

    Editing before locating the cause risks masking the bug rather than finding it.

Why: Start from the known signal, the error string, and open only the matching code, rather than reading the whole service or guessing by file size.

2. An agent is dropped into an unfamiliar repository and asked to add a feature. The best way to orient without burning context is to:

  • A. Load every file into context so nothing is missed.

    Loading the whole tree spends the context budget on noise before any work starts.

  • B. Read the entry points and project structure, then search for the area the feature touches. (correct)

    Skimming structure and entry points, then searching to the relevant area, builds a working map cheaply.

  • C. Start editing the first file that looks related.

    Editing before understanding the structure invites changes in the wrong place.

  • D. Ask the user to explain every file.

    Offloading orientation to the user is slow and usually unnecessary.

Why: Orient from entry points and structure, then search to the relevant area, rather than loading the whole repo or editing blind.

3. A single source file is thousands of lines long and the agent needs one function from it. The agent should:

  • A. Read the entire file into context to be thorough.

    Pulling thousands of lines for one function wastes most of the context on the rest.

  • B. Search within the file for the function and read only that region and its immediate dependencies. (correct)

    Targeting the function and what it touches keeps context focused on what the task needs.

  • C. Read the first few hundred lines and stop.

    A fixed slice from the top may miss the function entirely.

  • D. Reformat the file so it is easier to scan.

    Reformatting changes the file without helping locate the function and adds noise to the diff.

Why: Read the specific function and its immediate dependencies, not the whole large file or an arbitrary slice.

4. Before renaming a widely used function, an agent needs to know what a change would break. The right move is to:

  • A. Rename it and run the build to see what fails.

    Letting the compiler find every site is noisy, incomplete for dynamic calls, and risky in a large repo.

  • B. Search the codebase for all references first, then plan the change across the call sites. (correct)

    Finding the references up front shows the blast radius before any edit and catches indirect uses.

  • C. Rename only the definition and assume callers will adapt.

    Callers do not adapt themselves; this breaks every site that used the old name.

  • D. Add a second function and leave the old one untouched.

    Duplicating logic without a plan grows the surface and leaves dead code.

Why: Map all references before a wide rename so the blast radius is known up front, rather than renaming first and reacting to failures.

5. A README says the auth check happens in one module, but the agent must be sure before changing it. The agent should:

  • A. Trust the README and edit the module it names.

    Docs drift from code, so trusting them can point the edit at the wrong place.

  • B. Confirm in the current code where the auth check actually runs, then make the change there. (correct)

    Verifying against the live code grounds the edit in what is true now, not what the docs claim.

  • C. Search the commit history for the original author and ask them.

    Chasing the author is slow and unnecessary when the code itself is the source of truth.

  • D. Assume the check moved and search at random.

    Random searching without using the README as a starting hint is inefficient.

Why: Verify where logic lives in the current code before editing, using docs only as a hint, because documentation drifts from the code.

Sample questions for the other domains

Practice code exploration for real

These five are a taste. The full free mock has 15 code exploration questions among its 60, under a 120-minute timer and scored against the 720 pass line, with an explanation on every option.