演習 › 全問
問題 Q3-09
64 / 120分野3・パス固有ルール
まだ解いていません。
terraform フォルダー配下の設定を編集するときだけ、インフラの規約を読み込ませたい。最も適切な書き方はどれか。
正解は A
- A正解です。パスの条件を付けたルールは、該当するファイルを扱うときだけ読み込まれます。
- B毎回書くと、関係のない作業でも文脈を占めます。
- C常時読み込みとなり、無駄が出ます。
- D各ファイルに散らすと、保守が困難で、読み込みの制御もできません。
考え方:特定のフォルダー向けの規約は、paths つきのルールで条件つきに読み込む。
出典:How Claude remembers your project
Rules can be scoped to specific files using YAML frontmatter with the paths field. These conditional rules only apply when Claude is working with files matching the specified patterns.https://code.claude.com/docs/en/memory.md(取得 2026-11-20)
出典:How Claude remembers your project
A path-scoped rule loads when Claude uses the Read, Write, or Edit tool on a matching file.https://code.claude.com/docs/en/memory.md(取得 2026-11-20)
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
How path-scoped rules load only when editing matching files, reducing irrelevant context and token usagehttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)