> For the complete documentation index, see [llms.txt](https://livlog-llc.gitbook.io/engineering-handbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://livlog-llc.gitbook.io/engineering-handbook/riburoguno/6-documentation.md).

# 6. ドキュメンテーション方針

リブログでは、ドキュメントをコードと同じく重要な技術資産として扱います。

小規模な開発では、作った本人の記憶に頼りがちです。しかし、プロダクトを長く運用するには、目的、仕様、設計、判断理由を残しておく必要があります。

## ドキュメントを書く目的

ドキュメントの目的は、文章を増やすことではありません。

* 未来の自分が迷わないようにする
* AIに正しい前提を渡せるようにする
* 仕様変更の判断材料を残す
* データやAPIの意味を説明できるようにする
* 外部に公開する情報と内部運用情報を分ける

## 残すべき情報

リブログのプロダクトでは、次の情報を残します。

* プロダクトの目的
* 対象ユーザー
* 主な機能
* 使用データ
* データの出典
* 加工方法
* API仕様
* DB設計
* 画面構成
* デプロイ手順
* 運用手順
* 既知の制約
* 今後の改善案

## docsディレクトリの標準構成

プロダクトごとに、必要に応じて次のような構成にします。

```
README.md
docs/
  requirements.md
  architecture.md
  api.md
  database.md
  deployment.md
  operations.md
  prompts.md
```

すべてのファイルを最初から用意する必要はありません。必要になったものから追加します。

## AIに渡すためのドキュメント

CodexなどのAIに依頼する場合、ドキュメントがそのまま前提情報になります。

AI向けには、特に次の情報を明確にします。

* 変更対象
* 変更してはいけない箇所
* 期待する動作
* 入出力の例
* 既存仕様
* 完了条件

AIに渡すプロンプトも、再利用できる場合は `docs/prompts.md` などに残します。

各プロダクトの技術構成を調査する場合は、[技術スタック調査プロンプト](/engineering-handbook/fu-lu/32-technology-stack-audit-prompt.md)を使います。調査対象のコミット、技術ごとの根拠、現在の利用状態を確認し、AIの出力を人間が確認してからHandbookへ反映します。

## 公開ドキュメントと内部ドキュメント

外部公開するHandbookには、考え方、技術方針、プロダクト概要を中心に載せます。

一方で、秘密情報、認証情報、内部URL、運用上の詳細手順などは公開しません。

公開する情報と内部に残す情報を分けることで、外部発信と安全な運用を両立します。


---

# 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 dynamically by asking a question.

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

```
GET https://livlog-llc.gitbook.io/engineering-handbook/riburoguno/6-documentation.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.
