はじめに
久しぶりに Angular のアプリケーションを新規作成したら AI ツールの設定をしてくれたことに驚いたのでその話を書く。
ng new をしたときに各 AI ツール向けの設定ファイルが配置される
npm create @angular@latest my-app
を実行すると次のように任意の AI ツールの設定ファイルを配置するか確認される。
? Which AI tools do you want to configure with Angular best practices? https://angular.dev/ai/develop-with-ai ❯◉ None ◯ Claude [ https://docs.anthropic.com/en/docs/claude-code/memory ] ◯ Cursor [ https://docs.cursor.com/en/context/rules ] ◯ Gemini [ https://ai.google.dev/gemini-api/docs ] ◯ GitHub Copilot [ https://code.visualstudio.com/docs/copilot/copilot-customization#_custom-instructions ] ◯ JetBrains AI Assistant [ https://www.jetbrains.com/help/junie/customize-guidelines.html ] ◯ Windsurf [ https://docs.windsurf.com/windsurf/cascade/memories#rules ]
好きなツールを選ぶとそれに対応した設定ファイルがはじめから用意してくれる。 各ツールと設定ファイルの対応表は下記の通り。
ツール | 設定ファイル |
---|---|
Claude | .claude/CLAUDE.md |
Cursor | .cursor/rules/cursor.mdc |
Gemini | .gemini/GEMINI.md |
GitHub Copilot | .github/copilot-instructions.md |
JetBrains AI Assistant | .junie/guidelines.md |
Windsurf | .windsurf/rules/guidelines.md |
どのファイルも Custom Prompts and System Instructions の内容が記述される。
どのバージョンから?
CHANGELOG を見ると 20.2.0 で追加されていた。
angular-cli/CHANGELOG.md at main · angular/angular-cli · GitHub
まとめ
Angular のベストプラクティスが最初から提供されるようになったため、かなり始めやすくなったと思う。
v20.2 で始められなかった人も上で紹介した Custom Prompts and System Instructions の内容を配置すればよいだけなので、必要な人はいつでも使えるようになっている。
with AI で快適な開発を