Let’s Get Certified
Module 08 / 12 · Claude Code configuration and workflows

From a development plan to a CI review

Plan a change, refine it against examples, and run an independent review in CI.

Move a reporting feature into CI

A product team wants a new reporting period across storage, API responses, and dashboards. An initial patch that changes only the label can pass a screenshot check while leaving historical records inconsistent.

3.4 · Match the mode to the uncertainty

Start in plan mode when architecture, dependencies, or several plausible implementations need investigation. Use a read-only Explore subagent to map callers and return files, responsibilities, and open decisions. Compare approaches, settle the migration strategy, then implement. A bounded change with a clear failing assertion and a known target can go directly to execution.

Choose the point at which to leave plan mode

Request A supplies the failing test, exact validator and expected change for an empty month value. Request B asks to change the fiscal calendar for archived and live reports across storage, API and dashboard. The owner has not decided whether archived reports will be restated. How should the assistant start each?

Compare two change requests

A is suitable for direct implementation after confirming the reproduction and nearby contract. For B, use plan mode to inventory the schemas, consumers and migration options. Delegate a bounded read-only exploration if the raw trace is large. Request a summary of affected paths, evidence and unresolved decisions. The owner needs to decide the treatment of historical reports before a patch can satisfy the requirement.

Once the owner chooses a policy, define test inputs on either side of the fiscal boundary, a migration sequence and a rollback check. Move to implementation and run those checks. Remaining in planning after the requirements are settled does not improve the evidence.

Video background · freeCodeCamp at 8:10:44 · Plan mode and permission modes

3.5 · Refine against examples and tests

Ask the agent to interview the owner about fiscal boundaries, missing dates, and existing reports. Capture examples such as “2026-03-31 becomes FY26 Q4” and “a missing date remains unknown” for an April-start fiscal year named for its end year. Write tests for the boundary, ordinary records, missing values, and relevant performance constraints. Feed actual failures and expected outputs into the next iteration.

If a date conversion changes both the cache key and the displayed period, describe both symptoms together so the fixes agree. Address independent display polish separately. Run the regression suite and inspect a representative report before accepting the change.

Turn “as before” into a testable change

A legacy converter accepts a date, a blank cell or an explicit unknown marker. A stakeholder says “keep the old behavior.” The new converter turns a blank cell into today’s date. Another change would sort records by the converted value. Which questions, examples and tests should come before the next revision?

Build a feedback loop

Ask whether a blank means missing, whether the explicit unknown marker must survive export, and how either value sorts. Have the owner approve a dated row, a blank row and an explicit unknown row with exact expected outputs. Write a failing test for the blank cell and a sorting fixture containing all three rows. Include a representative large input if performance is an acceptance criterion.

Send the failing input, observed result and expected result together. Explain the interaction between conversion and sorting so the next revision handles both consistently. An unrelated label or layout issue can be addressed separately. Rerun the original passing examples after each change.

Official reference · Official CCAR-F exam guide, sample questions and practice exercises

3.6 · Make CI produce actionable review output

Run Claude Code with -p or --print for unattended execution. Supply the diff, project review criteria, and a schema. Parse and validate the machine output before publishing any findings. A minimal command for a checkout with access to the change is:

claude -p "Review the staged diff for broken period boundaries" \
  --output-format json \
  --json-schema '{"type":"object","properties":{"findings":{"type":"array","items":{"type":"string"}}},"required":["findings"]}'

For inline comments, require path, location, observed impact, and suggested fix. Include prior comments and the new diff on reruns, then publish only new or unresolved findings. Supply existing tests and fixture conventions for test generation. Give an independent reviewer the patch, requirements, and test evidence in a fresh session so it can challenge the author’s assumptions.

Re-review an amended pull request without duplicating a finding

On revision A a reviewer flagged a missing guard. Revision B moves the function, fixes the guard and introduces a new date-conversion error. A rerun still posts the old comment because its publisher compares line numbers only. Decide what enters the review job and what may be published.

Inspect the CI contract

Run a fresh review instance in noninteractive print mode. Give it the current diff, relevant source and tests, project review instructions and prior findings with stable identities. Ask for structured fields such as file, symbol, issue, status and evidence. Check the CLI’s structured result against the expected schema and associate it with revision B before publication.

Use the old finding as a reconciliation candidate. Verify the guard on B and close it as resolved. Post the new independently evidenced date issue once. Distinguish a completed review with zero findings from a denied read or failed process. The latter should produce an incomplete check, even if its result array is empty.

Video background · freeCodeCamp at 11:41:24 · Triggering Claude Code in a repository workflow

Further reading · Claude Code instructions and rules · Claude Code in automation

Knowledge check

From a development plan to a CI review quiz

Answer 9 questions. Check each answer for an explanation.