---
name: documentation-product-grade
description: Tiêu chí chuẩn product-grade cho Documentation - README, Architecture/ARCHITECTURE.md, API documentation, database schema, environment variables, deployment guide, runbook, troubleshooting, security policy, ADR (Architecture Decision Record), changelog/release notes; quy tắc branch và code review; SLA/SLO với RTO/RPO. Dùng khi viết tài liệu dự án hoặc chuẩn bị bàn giao để người khác tiếp nhận. KHÔNG dùng cho các tầng code.
---

# Documentation

Một product tốt phải có:

- README
- Architecture
- API documentation
- Database schema
- Environment variables
- Deployment guide
- Runbook
- Troubleshooting
- Security policy
- ADR
- Changelog

## README + ARCHITECTURE.md

- README hướng dẫn cài đặt/chạy.
- ARCHITECTURE.md: hệ thống chạy thế nào, ai làm gì.

## Runbook

Runbook cho sự cố: "service A down thì làm gì?", "ai làm gì khi hệ thống lỗi".

## ADR — Architecture Decision Record

Quan trọng nhất là **Architecture Decision Record**.

Ví dụ:

```
ADR-001
Why PostgreSQL?

ADR-002
Why Redis?

ADR-003
Why Ollama?

ADR-004
Why LiteLLM?
```

Sau này chính đội phát triển sẽ cảm ơn phần này.

## Quy trình

- Changelog / release notes.
- Quy tắc branch + code review bắt buộc (không commit thẳng vào main).
- SLA/SLO định nghĩa: uptime bao nhiêu %, thời gian khôi phục sự cố (RTO/RPO).

## Liên quan

- ADR về hạ tầng: skill `infrastructure-product-grade`.
- Tài liệu API sinh tự động: skill `backend-api-product-grade`.
- Runbook vận hành và xử lý alert: skill `observability-product-grade`.
- Trang quản trị thay cho SSH: skill `admin-operations-product-grade`.