試験CCAR-F トピック1 問題141 スレッド

Anthropic CCAR-Fのリアル試験問題集
問題 #: 141
トピック #: 1
You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution.
Your team has three requirements for Claude Code's behavior in your project:
* Claude must never modify files in the db/migrations/ directory.
* Claude should prefer your custom logging module over console.log .
* All TypeScript files must be auto-formatted with Prettier after every edit.
All three are currently written as instructions in your project's CLAUDE.md. During a complex refactoring session, a developer discovers that Claude edited a migration file, violating requirement #1.
How should you restructure these requirements across Claude Code's configuration mechanisms?

おすすめの解答:D 解答を投票する

Each requirement belongs in the mechanism matching its enforcement semantics. The migration restriction is a hard safety boundary, so it should be implemented through permissions.deny , not merely expressed as contextual guidance. Anthropic explicitly states that CLAUDE.md content is treated as context rather than enforced configuration. Permission rules use the Tool(specifier) form, evaluate deny rules before ask or allow rules, and support path-based Edit(...) restrictions. ( https://code.claude.com/docs/en/memory ) The custom logging convention is a persistent project preference, making CLAUDE.md the appropriate location. It should guide Claude's code-generation decisions but does not require deterministic interception.
Prettier formatting, by contrast, is deterministic automation. Anthropic documents the exact pattern of using a PostToolUse hook with an Edit|Write matcher to run Prettier automatically after file modifications. (
https://code.claude.com/docs/en/hooks-guide )
Option A incorrectly treats path-scoped rules as a security control; rules remain instructions. Option B overuses hooks for a semantic coding preference that belongs in CLAUDE.md. Option C relies entirely on stronger prompting, which cannot guarantee that protected files remain untouched. Option D correctly separates prohibition, preference, and automatic enforcement.
Official references/topics: Permission rules, CLAUDE.md semantics, PostToolUse formatting hooks.

川岛** 2026-08-25 09:43:33

コメント

正解:
?」こちらは投票コメントになっております。普通のコメントに切り替えます。
ニックネーム: 送信 キャンセル
投票コメントをあげるごとに、選択した解答の投票数を1つ増やすことができます。

他人の解答コメントを賛成するのも、その解答に一票を入れることになります。したがって、すでに同じ意見の投票コメントが存在する場合、新規コメントをする代わりに賛成することもできます。

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡