CCAR-F scenarios › Code Generation with Claude Code · Question 17 of 60

Scenario 2 · Code Generation with Claude Code

Your engineering team relies on Claude Code to generate, refactor, debug, and document code. You're responsible for fitting it into the team's workflow: custom slash commands and skills, a sensible CLAUDE.md setup, and knowing when a task calls for plan mode and when direct execution is enough.

Claude Code Configuration & Workflows

You ask Claude Code to convert legacy log lines into a new structured format. Despite two rounds of increasingly detailed prose explaining how timestamps, severity levels, and multi-line stack traces should be handled, each run interprets the rules differently. What is the most effective next step?

Show answer and explanation

Answer: A — Provide two or three concrete examples, each showing a real legacy log line and the exact structured output expected, including one with a multi-line stack trace.

When prose descriptions are interpreted inconsistently, two or three concrete input/output examples are the most effective way to communicate the expected transformation, especially for edge cases such as multi-line stack traces (task 3.5). More emphatic prose (b) repeats the approach that already failed. Plan mode (c) is for architectural or multi-approach decisions, and this problem is about specification, not exploration. Sending interacting rules one at a time (d) suits independent issues. These formatting rules interact within each log line, so sequential fixes are likely to undo each other.