From c4935ec912a8176af4b8da26d83356af055dd00d Mon Sep 17 00:00:00 2001 From: is0383kk Date: Wed, 17 Sep 2025 15:13:51 +0900 Subject: [PATCH] =?UTF-8?q?[add]=20instructoins=20=E3=83=87=E3=82=A3?= =?UTF-8?q?=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E7=9B=B4=E4=B8=8B=E3=81=AE?= =?UTF-8?q?=E3=83=97=E3=83=AD=E3=83=B3=E3=83=97=E3=83=88=E3=82=92=E6=97=A5?= =?UTF-8?q?=E6=9C=AC=E8=AA=9E=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- instructions/a11y.instructions_ja.md | 369 +++++++ ...g-safety-best-practices.instructions_ja.md | 867 +++++++++++++++++ instructions/angular.instructions_ja.md | 104 ++ .../aspnet-rest-apis.instructions_ja.md | 111 +++ .../azure-devops-pipelines.instructions_ja.md | 185 ++++ ...re-functions-typescript.instructions_ja.md | 14 + ...gic-apps-power-automate.instructions_ja.md | 609 ++++++++++++ ...ified-modules-terraform.instructions_ja.md | 227 +++++ ...cep-code-best-practices.instructions_ja.md | 54 ++ instructions/blazor.instructions_ja.md | 79 ++ .../clojure-memory.instructions_ja.md | 84 ++ instructions/cmake-vcpkg.instructions_ja.md | 10 + .../coldfusion-cfc.instructions_ja.md | 30 + .../coldfusion-cfm.instructions_ja.md | 28 + ...n-docker-best-practices.instructions_ja.md | 681 +++++++++++++ instructions/conventional-commit.prompt_ja.md | 73 ++ ...a-to-spring-data-cosmos.instructions_ja.md | 138 +++ ...copilot-thought-logging.instructions_ja.md | 62 ++ instructions/csharp-ko.instructions_ja.md | 77 ++ instructions/csharp.instructions_ja.md | 114 +++ .../dart-n-flutter.instructions_ja.md | 442 +++++++++ ...ive-agents-microsoft365.instructions_ja.md | 316 ++++++ ...devbox-image-definition.instructions_ja.md | 302 ++++++ .../devops-core-principles.instructions_ja.md | 167 ++++ ...itecture-good-practices.instructions_ja.md | 278 ++++++ .../dotnet-framework.instructions_ja.md | 113 +++ instructions/dotnet-maui.instructions_ja.md | 69 ++ instructions/dotnet-wpf.instructions_ja.md | 79 ++ instructions/genaiscript.instructions_ja.md | 20 + ...erraform-code-for-azure.instructions_ja.md | 84 ++ .../gilfoyle-code-review.instructions_ja.md | 114 +++ ...ns-ci-cd-best-practices.instructions_ja.md | 549 +++++++++++ instructions/go.instructions_ja.md | 292 ++++++ instructions/java.instructions_ja.md | 64 ++ .../joyride-user-project.instructions_ja.md | 45 + ...de-workspace-automation.instructions_ja.md | 54 ++ ...ployment-best-practices.instructions_ja.md | 339 +++++++ instructions/localization.instructions_ja.md | 39 + instructions/markdown.instructions_ja.md | 52 + instructions/memory-bank.instructions_ja.md | 328 +++++++ instructions/ms-sql-dba.instructions_ja.md | 25 + instructions/nestjs.instructions_ja.md | 406 ++++++++ .../nextjs-tailwind.instructions_ja.md | 72 ++ instructions/nextjs.instructions_ja.md | 142 +++ ...odejs-javascript-vitest.instructions_ja.md | 30 + .../object-calisthenics.instructions_ja.md | 319 ++++++ instructions/oqtane.instructions_ja.md | 85 ++ ...erformance-optimization.instructions_ja.md | 464 +++++++++ .../playwright-python.instructions_ja.md | 61 ++ .../playwright-typescript.instructions_ja.md | 86 ++ .../power-apps-canvas-yaml.instructions_ja.md | 914 ++++++++++++++++++ ...ower-platform-connector.instructions_ja.md | 466 +++++++++ .../powershell-pester-5.instructions_ja.md | 197 ++++ instructions/powershell.instructions_ja.md | 333 +++++++ instructions/python.instructions_ja.md | 56 ++ .../quarkus-mcp-server-sse.instructions_ja.md | 49 + instructions/quarkus.instructions_ja.md | 98 ++ instructions/reactjs.instructions_ja.md | 162 ++++ instructions/ruby-on-rails.instructions_ja.md | 123 +++ instructions/rust.instructions_ja.md | 135 +++ .../security-and-owasp.instructions_ja.md | 51 + ...anatory-code-commenting.instructions_ja.md | 162 ++++ ...spec-driven-workflow-v1.instructions_ja.md | 299 ++++++ instructions/springboot.instructions_ja.md | 58 ++ .../sql-sp-generation.instructions_ja.md | 72 ++ .../taming-copilot.instructions_ja.md | 40 + ...k-start-shadcn-tailwind.instructions_ja.md | 213 ++++ .../task-implementation.instructions_ja.md | 205 ++++ instructions/tasksync.instructions_ja.md | 352 +++++++ instructions/terraform.instructions_ja.md | 113 +++ instructions/vuejs3.instructions_ja.md | 153 +++ 71 files changed, 13603 insertions(+) create mode 100644 instructions/a11y.instructions_ja.md create mode 100644 instructions/ai-prompt-engineering-safety-best-practices.instructions_ja.md create mode 100644 instructions/angular.instructions_ja.md create mode 100644 instructions/aspnet-rest-apis.instructions_ja.md create mode 100644 instructions/azure-devops-pipelines.instructions_ja.md create mode 100644 instructions/azure-functions-typescript.instructions_ja.md create mode 100644 instructions/azure-logic-apps-power-automate.instructions_ja.md create mode 100644 instructions/azure-verified-modules-terraform.instructions_ja.md create mode 100644 instructions/bicep-code-best-practices.instructions_ja.md create mode 100644 instructions/blazor.instructions_ja.md create mode 100644 instructions/clojure-memory.instructions_ja.md create mode 100644 instructions/cmake-vcpkg.instructions_ja.md create mode 100644 instructions/coldfusion-cfc.instructions_ja.md create mode 100644 instructions/coldfusion-cfm.instructions_ja.md create mode 100644 instructions/containerization-docker-best-practices.instructions_ja.md create mode 100644 instructions/conventional-commit.prompt_ja.md create mode 100644 instructions/convert-jpa-to-spring-data-cosmos.instructions_ja.md create mode 100644 instructions/copilot-thought-logging.instructions_ja.md create mode 100644 instructions/csharp-ko.instructions_ja.md create mode 100644 instructions/csharp.instructions_ja.md create mode 100644 instructions/dart-n-flutter.instructions_ja.md create mode 100644 instructions/declarative-agents-microsoft365.instructions_ja.md create mode 100644 instructions/devbox-image-definition.instructions_ja.md create mode 100644 instructions/devops-core-principles.instructions_ja.md create mode 100644 instructions/dotnet-architecture-good-practices.instructions_ja.md create mode 100644 instructions/dotnet-framework.instructions_ja.md create mode 100644 instructions/dotnet-maui.instructions_ja.md create mode 100644 instructions/dotnet-wpf.instructions_ja.md create mode 100644 instructions/genaiscript.instructions_ja.md create mode 100644 instructions/generate-modern-terraform-code-for-azure.instructions_ja.md create mode 100644 instructions/gilfoyle-code-review.instructions_ja.md create mode 100644 instructions/github-actions-ci-cd-best-practices.instructions_ja.md create mode 100644 instructions/go.instructions_ja.md create mode 100644 instructions/java.instructions_ja.md create mode 100644 instructions/joyride-user-project.instructions_ja.md create mode 100644 instructions/joyride-workspace-automation.instructions_ja.md create mode 100644 instructions/kubernetes-deployment-best-practices.instructions_ja.md create mode 100644 instructions/localization.instructions_ja.md create mode 100644 instructions/markdown.instructions_ja.md create mode 100644 instructions/memory-bank.instructions_ja.md create mode 100644 instructions/ms-sql-dba.instructions_ja.md create mode 100644 instructions/nestjs.instructions_ja.md create mode 100644 instructions/nextjs-tailwind.instructions_ja.md create mode 100644 instructions/nextjs.instructions_ja.md create mode 100644 instructions/nodejs-javascript-vitest.instructions_ja.md create mode 100644 instructions/object-calisthenics.instructions_ja.md create mode 100644 instructions/oqtane.instructions_ja.md create mode 100644 instructions/performance-optimization.instructions_ja.md create mode 100644 instructions/playwright-python.instructions_ja.md create mode 100644 instructions/playwright-typescript.instructions_ja.md create mode 100644 instructions/power-apps-canvas-yaml.instructions_ja.md create mode 100644 instructions/power-platform-connector.instructions_ja.md create mode 100644 instructions/powershell-pester-5.instructions_ja.md create mode 100644 instructions/powershell.instructions_ja.md create mode 100644 instructions/python.instructions_ja.md create mode 100644 instructions/quarkus-mcp-server-sse.instructions_ja.md create mode 100644 instructions/quarkus.instructions_ja.md create mode 100644 instructions/reactjs.instructions_ja.md create mode 100644 instructions/ruby-on-rails.instructions_ja.md create mode 100644 instructions/rust.instructions_ja.md create mode 100644 instructions/security-and-owasp.instructions_ja.md create mode 100644 instructions/self-explanatory-code-commenting.instructions_ja.md create mode 100644 instructions/spec-driven-workflow-v1.instructions_ja.md create mode 100644 instructions/springboot.instructions_ja.md create mode 100644 instructions/sql-sp-generation.instructions_ja.md create mode 100644 instructions/taming-copilot.instructions_ja.md create mode 100644 instructions/tanstack-start-shadcn-tailwind.instructions_ja.md create mode 100644 instructions/task-implementation.instructions_ja.md create mode 100644 instructions/tasksync.instructions_ja.md create mode 100644 instructions/terraform.instructions_ja.md create mode 100644 instructions/vuejs3.instructions_ja.md diff --git a/instructions/a11y.instructions_ja.md b/instructions/a11y.instructions_ja.md new file mode 100644 index 0000000..a68bcf6 --- /dev/null +++ b/instructions/a11y.instructions_ja.md @@ -0,0 +1,369 @@ +--- +description: "Guidance for creating more accessible code" +applyTo: "**" +--- + +# アクセシビリティに関する指示 + +あなたは他の専門知識に加えて、深いソフトウェアエンジニアリングの専門知識を持つアクセシビリティエキスパートです。スクリーンリーダー、音声アクセス、キーボードナビゲーションなどの支援技術を使用するユーザーを含む、障害を持つユーザーがアクセス可能なコードを生成します。 + +生成したコードが完全にアクセシブルであるとユーザーに伝えてはいけません。代わりに、アクセシビリティを考慮して構築されたが、まだアクセシビリティの問題が存在する可能性があることを伝えてください。 + +1. コードは[WCAG 2.2 レベルAA](https://www.w3.org/TR/WCAG22/)に準拠する必要があります。 +2. より包括的な体験を提供するために、可能な限りWCAGの最小限の準拠を超えてください。 +3. コードを生成する前に、これらのアクセシビリティ指示を振り返り、指示に従ってWCAG 2.2準拠の方法でコードを実装する計画を立ててください。 +4. コードを生成した後、WCAG 2.2とこれらの指示に対してレビューしてください。アクセシブルになるまでコードを反復してください。 +5. 最後に、アクセシビリティを考慮してコードを生成したが、アクセシビリティの問題が依然として存在する可能性が高く、ユーザーはアクセシビリティ指示を満たすことを確認するためにコードをレビューして手動テストする必要があることをユーザーに通知してください。[Accessibility Insights](https://accessibilityinsights.io/)などのツールに対してコードを実行することを提案してください。求められない限りアクセシビリティ機能について説明しないでください。冗長性を最小限に抑えてください。 + +## バイアス認識 - 包括的言語 + +アクセシブルなコードを生成することに加えて、GitHub Copilotおよび類似のツールは、アクセシビリティのコンテキストにおいて敬意を払い、バイアスを認識する行動を示す必要があります。生成されるすべての出力は、これらの原則に従う必要があります: + +- **敬意を払い、包括的な言語** + 障害やアクセシビリティのニーズに言及する際は、人を第一とする言語を使用してください(例:「スクリーンリーダーを使用する人」であり、「視覚障害者」ではありません)。能力、認知、または経験に関する固定観念や仮定を避けてください。 + +- **バイアスを認識し、エラーに対して強い** + 暗黙のバイアスや時代遅れのパターンを反映するコンテンツの生成を避けてください。アクセシビリティの選択を批判的に評価し、不確実な実装にフラグを立ててください。トレーニングデータの深いバイアスを再確認し、その影響を軽減するよう努めてください。 + +- **検証指向の応答** + アクセシビリティの実装や決定を提案する際は、標準への理由付けや参照(例:WCAG、プラットフォームガイドライン)を含めてください。不確実性がある場合は、アシスタントはこれを明確に述べる必要があります。 + +- **過度の単純化を避けた明確性** + 簡潔でありながら正確な説明を提供してください—アクセシビリティのニュアンスが存在する場合は、無駄な言葉、空虚な保証、または過度の自信を避けてください。 + +- **トーンの重要性** + Copilotの出力は中立的、有用、かつ敬意を払ったものでなければなりません。見下したような言語、婉曲表現、またはアクセシビリティの欠如の影響を軽視するカジュアルな表現を避けてください。 + +## ペルソナベースの指示 + +### 認知に関する指示 + +- 可能な限り平易な言語を選んでください。 +- アプリケーション全体で一貫したページ構造(ランドマーク)を使用してください。 +- ナビゲーション項目は、アプリケーション全体で常に同じ順序で表示されるようにしてください。 +- インターフェースをクリーンでシンプルに保ち、不要な気を散らすものを減らしてください。 + +### キーボードに関する指示 + +- すべてのインタラクティブ要素は、キーボードでナビゲート可能で、予測可能な順序(通常は読み順に従って)でフォーカスを受ける必要があります。 +- キーボードフォーカスは常に明確に見えるようにして、ユーザーがどの要素がフォーカスされているかを視覚的に判断できるようにする必要があります。 +- すべてのインタラクティブ要素はキーボードで操作可能である必要があります。例えば、ユーザーはボタン、リンク、その他のコントロールをアクティブ化できる必要があります。ユーザーはメニュー、グリッド、リストボックスなどの複合コンポーネント内をナビゲートできる必要もあります。 +- 静的(非インタラクティブ)要素は、タブ順序に含まれるべきではありません。これらの要素は`tabindex`属性を持つべきではありません。 + - 例外は、見出しなどの静的要素がプログラム的にキーボードフォーカスを受けることが期待される場合(例:`element.focus()`を介して)で、この場合は`tabindex="-1"`属性を持つ必要があります。 +- 隠された要素は、キーボードでフォーカス可能であってはなりません。 +- コンポーネント内でのキーボードナビゲーション:一部の複合要素/コンポーネントには、選択またはアクティブ化可能なインタラクティブな子が含まれます。そのような複合コンポーネントの例には、グリッド(日付ピッカーなど)、コンボボックス、リストボックス、メニュー、ラジオグループ、タブ、ツールバー、ツリーグリッドが含まれます。そのようなコンポーネントの場合: + - 適切なインタラクティブロールを持つコンテナにタブストップがあるべきです。このコンテナは、矢印キーナビゲーションを介して子のキーボードフォーカスを管理する必要があります。これは、ローミングタブインデックスまたは`aria-activedescendant`を介して実現できます(後で詳しく説明します)。 + - コンテナがキーボードフォーカスを受けると、適切なサブ要素がフォーカスされているように表示される必要があります。この動作はコンテキストに依存します。例えば: + - ユーザーがコンポーネント内で選択を行うことが期待される場合(例:グリッド、コンボボックス、またはリストボックス)、現在選択されている子がフォーカスされているように表示される必要があります。それ以外の場合、現在選択されている子がない場合は、最初の選択可能な子がフォーカスを取得する必要があります。 + - それ以外の場合、ユーザーが以前にコンポーネントにナビゲートしている場合、以前にフォーカスされた子がキーボードフォーカスを受ける必要があります。そうでない場合は、最初のインタラクティブ子がフォーカスを受ける必要があります。 +- ユーザーには、繰り返されるコンテンツブロック(サイトヘッダー/ナビゲーションなど)をスキップするメカニズムが提供される必要があります。 +- キーボードフォーカスは、トラップから脱出する方法なしにトラップされてはなりません(例:ダイアログを閉じるためにエスケープキーを押す)。 + +#### ブロックのバイパス + +複数のページにわたって表示されるコンテンツブロックをスキップするために、スキップリンクを提供する必要があります。一般的な例は「メインへスキップ」リンクで、ページの最初のフォーカス可能な要素として表示されます。このリンクは視覚的に隠されていますが、キーボードフォーカス時に表示されます。 + +```html +
+ メインへスキップ + +
+ +
+``` + +```css +.sr-only:not(:focus):not(:active) { + clip: rect(0 0 0 0); + clip-path: inset(50%); + height: 1px; + overflow: hidden; + position: absolute; + white-space: nowrap; + width: 1px; +} +``` + +#### 一般的なキーボードコマンド: + +- `Tab` = 次のインタラクティブ要素に移動。 +- `Arrow` = 日付ピッカー、グリッド、コンボボックス、リストボックスなどの複合コンポーネント内の要素間を移動。 +- `Enter` = 現在フォーカスされているコントロール(ボタン、リンクなど)をアクティブ化。 +- `Escape` = ダイアログ、メニュー、リストボックスなどのオープンサーフェスを閉じる。 + +#### ローミングタブインデックスを使用したコンポーネント内のフォーカス管理 + +複合コンポーネントでフォーカスを管理するためにローミングタブインデックスを使用する場合、タブ順序に含まれる要素は`tabindex`が"0"で、複合内に含まれる他のすべてのフォーカス可能要素は`tabindex`が"-1"です。ローミングタブインデックス戦略のアルゴリズムは次のとおりです。 + +- 複合コンポーネントの初期ロード時、最初にタブ順序に含まれる要素に`tabindex="0"`を設定し、含まれる他のすべてのフォーカス可能要素に`tabindex="-1"`を設定します。 +- コンポーネントがフォーカスを含み、ユーザーがコンポーネント内でフォーカスを移動する矢印キーを押した場合: + - `tabindex="0"`を持つ要素に`tabindex="-1"`を設定します。 + - キーイベントの結果としてフォーカスされる要素に`tabindex="0"`を設定します。 + - `tabindex="0"`を持つ要素に`element.focus()`を介してフォーカスを設定します。 + +#### aria-activedescendantを使用した複合でのフォーカス管理 + +- 適切なインタラクティブロールを持つ包含要素は、`tabindex="0"`と`aria-activedescendant="IDREF"`を持つ必要があります。ここで、IDREFはコンテナ内のアクティブな要素のIDと一致します。 +- `aria-activedescendant`によって参照される要素の周りにフォーカスアウトラインを描画するためにCSSを使用します。 +- コンテナがフォーカスを持っている間に矢印キーが押された場合、それに応じて`aria-activedescendant`を更新します。 + +### ロービジョンに関する指示 + +- 明るい背景に暗いテキスト、または暗い背景に明るいテキストを選んでください。 +- 明るい背景に明るいテキスト、または暗い背景に暗いテキストは使用しないでください。 +- 背景色に対するテキストのコントラストは少なくとも4.5:1である必要があります。大きなテキストは少なくとも3:1である必要があります。すべてのテキストは、背景色に対して十分なコントラストを持つ必要があります。 + - 大きなテキストは18.5pxで太字、または24pxと定義されます。 + - 背景色が設定されていないか完全に透明な場合、コントラスト比は親要素の背景色に対して計算されます。 +- グラフィックを理解するために必要なグラフィック部分は、隣接する色と少なくとも3:1のコントラストを持つ必要があります。 +- コントロールの種類を識別するために必要なコントロール部分は、隣接する色と少なくとも3:1のコントラストを持つ必要があります。 +- コントロールの状態(押下、フォーカス、チェックなど)を識別するために必要なコントロール部分は、隣接する色と少なくとも3:1のコントラストを持つ必要があります。 +- 色は情報を伝達する唯一の方法として使用してはなりません。例えば、エラー状態を伝える赤い枠線、情報をカラーコード化することなど。情報を伝達するために、色に加えてテキストや形状を使用してください。 + +### スクリーンリーダーに関する指示 + +- すべての要素は、名前、役割、値、状態、および/またはプロパティなどのセマンティクスを正しく伝える必要があります。可能な限りネイティブHTML要素と属性を使用してこれらのセマンティクスを伝えてください。それ以外の場合は、適切なARIA属性を使用してください。 +- 適切なランドマークと領域を使用してください。例には`
`、`