# AI コードドキュメンターの使用

## ![](/files/4c5bb4ee34c9115c818cb9fcd7c705d7742d04e8) 概要

この記事では、AI Code Documenter を使用して、選択したコンポーネントのドキュメントを自動生成する方法を説明します。これにより、チームはブランチにコミットできる、明確で構造化されたコードドキュメントを作成できます。

{% hint style="info" %}

#### ベストプラクティス

* AI Code Documenter は、コメントの再生成を繰り返さないよう、安定したコードに対して実行してください。
* 正確性と用語の適切さを確保するため、コミットする前に必ず AI のコメントを確認してください。
* レビューとロールバックを簡単にするため、変更は小さく論理的な単位でコミットしてください。
  {% endhint %}

## AI Code Documenter の使用

{% stepper %}
{% step %}

### ブランチとコンポーネントを選択する

1. クリック **コード** を左側のサイドバーメニューから選択します。
2. ドキュメント化したいコンポーネントを含むブランチをクリックします。

   <div align="left"><figure><img src="/files/355bdd8d8a51f58cf297408d32583c8d838aee29" alt="" width="563"><figcaption></figcaption></figure></div>
3. ドキュメント化したいコンポーネントをクリックします。

   <div align="left"><figure><img src="/files/b0d2d1f3a7b89885add0548c210d46b41d639519" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### ドキュメントを作成する

1. クリック **AI ツール** の横の **編集**.

   <div align="left"><figure><img src="/files/e3afdccc9f39d08fb2893a182669fb68cf2ead33" alt="" width="563"><figcaption></figcaption></figure></div>
2. クリック **AI Code Documenter** をドロップダウンメニューから選択します。

   <div align="left"><figure><img src="/files/668bd09b8f3fe8f284eb78ebbb8a41aa93e98e83" alt="" width="563"><figcaption></figcaption></figure></div>
3. ドキュメントが生成されている間、 **AI を生成中...** と表示されます。

   <div align="left"><figure><img src="/files/a9206fed6750f129a8c6d4b9e9905a9013e77a32" alt="" width="563"><figcaption></figcaption></figure></div>
4. AI Code Documenter が完了すると、差分ビューアーが開き、左側に元の内容、右側に AI による変更が表示されます。
5. 変更を確認し、必要に応じて編集します。
6. クリック **変更をコミットする**.

   <div align="left"><figure><img src="/files/a2a8f6e9e0181b4d26f6f9de21f2059abd8739b5" alt="" width="563"><figcaption></figcaption></figure></div>
7. を入力します **コミットメッセージ**.
8. クリック **コミット**.

   <div align="left"><figure><img src="/files/8eea950b6d19bcba3d98230b4a858f855ecbc7d9" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flosum.com/devops/devops-ja/kdo/kdotsru/ai-kdodokyumentno.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
