Lesson 0007 · Domains 2·3·1 · Claude Certified Architect — Foundations

The mechanics you can't reason your way to

Built-in tools (2.5), headless CI (3.6), session state (1.7) — the three blocks of pure recall. ~15 minutes.
Why you're here. Every other lesson in this workspace teaches judgment. This one teaches facts — and it exists because of two independent signals. A candidate who scored 829 named exactly two things that cost them points: "набаранив на всякій нудоті про Grep/Glob/Edit і CC в CICD". And your own 60-Q mock put 5 of 15 misses in "Claude Code for Continuous Integration". Meanwhile I grepped all seven existing lessons: CI/CD appears once, and Grep/Glob/Edit/Read/Write have zero coverage. These are the cheapest points on the exam and we have never touched them.

0 · Why these three blocks belong together

Lessons 0003–0006 trained you to ask "what's the root cause?" That's the right instinct for most of the exam. But three task statements are not judgment calls at all — they have one correct factual answer, and reasoning harder does not help you:

Why this matters for pacing: reports say the first ~15 questions eat the most clock. Recall questions are the ones you should answer in 15 seconds so you bank time for the architectural ones. Any recall question you have to think about is costing you twice.

1 · Built-in tools — the one table

The distinction the exam actually tests is Grep vs Glob: one searches inside files, the other finds files by name.

ToolWhat it doesReach for it when
GrepSearches file contents for a pattern. Built on ripgrep — ripgrep regex, not POSIX."find all callers of processOrder", "locate this error message", "which files import X"
GlobFinds files by name / path pattern. ** = recursive."find every test file" → **/*.test.tsx; "all YAML configs"
ReadLoads full file contents.You already know which file, and you need to follow the logic in it
WriteCreates or overwrites a whole file.New file — or as the fallback when Edit can't get a unique anchor
EditExact string replacement. No regex, no fuzzy matching.Targeted change where you can quote a unique snippet
BashRuns shell commands.Tests, builds, git, anything the file tools don't cover

Exam tell: the question names what you're looking for. Looking for a string (function name, error text, import) → Grep. Looking for a filename shape (*.test.tsx, *.tf) → Glob. Distractors swap these two, and they look fine if you skim.

Grep's parameters — the level of detail the exam actually reaches

Knowing "Grep searches contents" is not enough. A certsafari item asked how to match class headers wrapped across lines (class OrderHandler(\n BaseHandler, LoggingMixin\n):) — a single-line search misses them. The answer is a parameter, not a different tool.

ParameterWhat it does
multiline: trueMatch across line boundaries. Off by default — patterns match within a single line.
typeScope by language, e.g. py, rust.
globScope by file pattern, e.g. **/*.tsx.
output_modefiles_with_matches (default) · content (lines + line numbers) · count.

Exam tell: when a search nearly works — finds some matches but not the wrapped/multi-line ones — reach for multiline: true plus scoping, not for a different tool. Globbing every file and reading them all is the distractor, and it's the same read-everything anti-pattern as §3.

Also: Grep is ripgrep regex, not POSIX — metacharacters need escaping (finding interface{} in Go takes interface\{\}).

Two details docs confirm that distractors are built from

2 · The Edit failure mode — and its named fallback

This is a specific, testable mechanic. Edit requires the target text to appear exactly once. Whitespace counts — a single character of different indentation misses.

When Edit fails because the anchor text isn't unique, the guide's answer is: Read the full file, then Write it back.

Verbatim from the guide (2.5): "When Edit fails due to non-unique text matches, using Read + Write as a fallback for reliable file modifications."

So the chain is: Edit first (cheap, targeted) → on non-unique match, either extend the anchor with surrounding context, or fall back to Read + Write.

Anti-pattern: retrying the same Edit, or reaching for a regex — Edit has no regex mode, so "use a regex to disambiguate" is always wrong.

3 · Exploration order: Grep → Read, never read-everything

This one bridges into Domain 5 (context management), which is why it's worth real points.

Build understanding incrementally. Start with Grep to find entry points, then Read to follow imports and trace the flow — rather than reading all files upfront.

For tracing a function through wrapper modules: first identify all the exported names, then search for each name across the codebase.

Exam tell: if a scenario says the context window is filling up during exploration, or that the agent is losing track mid-task, the answer is narrow the discovery — Grep-then-Read, or hand the discovery to a subagent whose verbose output stays out of the main conversation. "Read every file in the directory first" is the distractor.

4 · Built-in vs MCP — when Claude picks the wrong one

A crossover from 2.4 that's easy to miss. If you've installed a capable MCP tool but the agent keeps using Grep instead:

Verbatim from the guide (2.4): "Enhancing MCP tool descriptions to explain capabilities and outputs in detail, preventing the agent from preferring built-in tools (like Grep) over more capable MCP tools."

The fix is the tool description — consistent with Domain 2's master rule that descriptions are the primary mechanism for tool selection.

Anti-pattern: removing or disabling the built-in tool to force the MCP one. Fix the description, don't amputate the toolset.

5 · Headless CI — the flag stack

FlagWhat it buys you
-p / --printNon-interactive mode. Processes the prompt, prints to stdout, exits. This is the fix for a CI job that hangs.
--output-format jsonMachine-parseable output. (Values: text, json, stream-json.)
--json-schemaValidated JSON matching your schema. Print mode only. Use with --output-format json when findings must be posted as inline PR comments.

Exam tell: "job hangs waiting for input" → -p. "findings must be posted automatically as inline PR comments" → --output-format json + --json-schema. Invented flags (--batch, CLAUDE_HEADLESS=true) and generic Unix workarounds (< /dev/null) are the standard distractors — you saw all three on Q1 of your mock.

How CI-invoked Claude Code gets project context

CLAUDE.md. That's the mechanism. Testing standards, fixture conventions, review criteria, what counts as valuable — document them in CLAUDE.md and the CI invocation picks them up.

Exam tell: "the CI review doesn't know our conventions" → put them in CLAUDE.md, not in a longer inline prompt string.

6 · The three CI review patterns worth memorizing

Your mock hit all three of these and you missed two. They're separate mechanics, not one idea.

a) Self-review doesn't work — use an independent instance

The session that generated the code is less effective at reviewing it than a fresh instance. Same context carries the same confirmation bias.

Verbatim from the guide (3.6): "Session context isolation: why the same Claude session that generated code is less effective at reviewing its own changes compared to an independent review instance."

Your Q15 miss: you picked "add self-review instructions to the generation prompt." But the scenario stated Claude already considered those cases and rationalized them. More self-critique in the same context reaches the same conclusion. The answer is a second instance that never sees the generator's reasoning. Extended thinking loses for the same reason — more deliberation inside the biased context.

b) Re-running a review posts duplicate comments — feed it the prior findings

When you re-run after new commits, include the previous findings in context and instruct Claude to report only new or still-unaddressed issues.

Same shape for test generation: provide the existing test files so it doesn't propose scenarios the suite already covers.

The pattern: duplicate/redundant output → the missing piece is what already exists in context. Not a dedup post-processor.

c) Batch API cannot run this workflow at all

If the review loop calls tools mid-analysis (request a file, get it back, continue), batch is architecturally out — not merely slow. The async fire-and-forget model has no way to execute a tool mid-request and hand results back.

Your Q8 miss: you picked the 24-hour latency answer. Latency is real, but that option said the workflow "could otherwise function" — and it couldn't. When one option names a hard impossibility and another names an inconvenience, the impossibility is the "primary technical constraint." (Lesson 0006 §3 drills this same trap.)

7 · Session state — resume, fork, or start fresh

SituationMove
Continue a specific named investigation across work sessions--resume <session-name>
Explore two divergent approaches from one shared baseline analysisfork_session — independent branches, e.g. comparing two testing strategies
Prior context is mostly still validResume it
Prior tool results are stale (code changed underneath)Start fresh with a structured summary injected
Resuming, but specific files changedTell it which files changed → targeted re-analysis, not full re-exploration

The judgment call the exam tests: resume vs fresh-with-summary. The deciding factor is whether the tool results in that history are still true. Stale tool results are worse than no context, because the agent trusts them. The guide states plainly: starting fresh with a structured summary is more reliable than resuming with stale tool results.

Spelling divergence — answer per the guide. The exam guide writes fork_session (snake_case). Current Claude Code docs ship the CLI flag as --fork-session, used alongside --resume/--continue. Same concept. On the exam, pick the guide's spelling. Likewise the guide calls the subagent-spawning tool Task; current docs call it Agent. Don't let a renamed flag talk you out of the right concept.

Practice — recall speed, not deliberation

Target: under 15 seconds each. If one makes you think, that's the one to re-read.

Primary source

Exam guide PDF (guides/, v1.0) — Task Statements 2.5 (built-in tools), 3.6 (CI/CD integration), 1.7 (session state, resumption, forking), 2.4 (MCP tool descriptions vs built-ins). Read 2026-08-20.

Verified against live docs the same day: CLI reference (-p, --output-format, --json-schema, --resume, --fork-session) and Tools reference (Grep = contents / ripgrep / respects .gitignore; Glob = names / 100-file cap / ignores .gitignore; Edit = exact match + uniqueness).