> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/devops/devops-ja/kdo/kdotsru/ai-kdodokyumentotsruno.md).

# AI コードドキュメント作成ツールの使用

{% hint style="warning" %}

#### 旧UI向けに作成

この記事は旧UI向けに作成されました。手順は今でも使用できますが、スクリーンショットは古くなっています。場合によっては、手順で参照されている項目が移動または変更されていることがあります。項目が見つからない場合は、 [どこに行ったのか](/devops/devops-ja/shii-uiux-heno/dokonittanoka.md) 記事。
{% endhint %}

## ![](https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FG5ZbxX918xOHwbAwAJ4n%2FSummary2-Small-Icon.svg?alt=media\&token=da26a67f-ff7f-47b3-8669-06be960dc2d7) 概要

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

{% hint style="info" %}

#### デフォルトのAI制限

デフォルトでは、FlosumはDeepSeekのAPIを通じて、DevOps向けに無料の共有DeepSeek AIモデルを提供します。これはテナント間で共有されているため、パフォーマンスと可用性はシステム負荷とトークン容量に依存します。使用が集中すると、遅延が大きくなったり、一時的なエラーが発生したりする場合があります。これを回避するには、独自のカスタムAIモデルを追加できます。次の記事を参照してください。

* [カスタム AI モデルの追加](/devops/devops-ja/she-ding/ai-she-ding/kasutamu-ai-moderuno.md)
  {% endhint %}

{% hint style="info" %}

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

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

## AI Code Documenter の使用

{% stepper %}
{% step %}

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

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

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F6BzOyFRxWUmCMo2l6oqX%2FUsingAiCodeDocumenter-S01-01.png?alt=media&amp;token=45147edb-dce8-43c2-8363-0026e0ea0e75" alt="" width="563"><figcaption></figcaption></figure></div>
3. ドキュメント化したいコンポーネントをクリックします。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FbACIdtJEKsFKAbOzLGya%2FUsingAiCodeDocumenter-S01-02.png?alt=media&amp;token=6059fd06-4a29-4ba4-9bfb-1d3b06c3319c" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

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

1. 次をクリックします **AI ツール** の横の **編集**.

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2Fdoy4RFvG41k7BUW8PW0l%2FUsingAiCodeDocumenter-S02-01.png?alt=media&amp;token=e907df18-b638-41f7-851c-e9e02a26da53" alt="" width="563"><figcaption></figcaption></figure></div>
2. 次をクリックします **AI Code Documenter** ドロップダウン メニューから。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F1SmvnqItxXChdTI1dHW7%2FUsingAiCodeDocumenter-S02-02.png?alt=media&amp;token=20f5838e-7fb2-49c0-859d-4e46c3aa2f69" alt="" width="563"><figcaption></figcaption></figure></div>
3. ドキュメントが生成されている間、 **AI が生成中...** が表示されます。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FqXbSTdANEjNUJ42toBR8%2FUsingAiCodeDocumenter-S02-03.png?alt=media&amp;token=c4c3a173-595f-47e9-829d-d1168c23bca2" alt="" width="563"><figcaption></figcaption></figure></div>
4. AI Code Documenter が完了すると、差分ビューアが開き、左側に元の内容、右側に AI の変更内容が表示されます。
5. 変更内容を確認し、必要に応じて編集します。
6. 次をクリックします **変更をコミット**.

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FsVAccDOWzK4WVUtpA8Z3%2FUsingAiCodeDocumenter-S02-04.png?alt=media&amp;token=55c2927b-d75a-4b7f-907a-850c6f2d0466" alt="" width="563"><figcaption></figcaption></figure></div>
7. を入力してください。 **コミット メッセージ**.
8. 次をクリックします **コミット**.

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FnQ5nleu5HFSzzbfEVVQG%2FUsingAiCodeDocumenter-S02-05.png?alt=media&amp;token=75d392c3-c1b6-42c0-99d2-7d6ee85b8d8e" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
