# Chỉ Mục Toàn Diện Tài Liệu Kỹ Thuật `docs/`

> **Mục đích**: Bản đồ tra cứu và chỉ mục toàn bộ tài liệu kỹ thuật của **DSCons**, đảm bảo các AI Agent và lập trình viên luôn nắm bắt đúng tài liệu theo chuyên môn, không bị phân tán thông tin hay lệch pha kiến thức.

---

## 1. NGUYÊN TẮC QUẢN TRỊ TÀI LIỆU (DOCUMENTATION GOVERNANCE)

1. **Nguồn Chân Lý Duy Nhất (Single Source of Truth)**: Tài liệu [docs/system-architecture-master.md](file:///c:/Projects/DSCons/docs/system-architecture-master.md) là tài liệu kiến trúc tối cao quy định chuẩn schema, API, và AI Personas.
2. **Tách Bạch Tri Thức và Vận Hành**:
   * Tri thức tĩnh (Luật pháp, chuẩn biểu mẫu, tiêu chuẩn kỹ thuật) ➔ Nạp vào **Qdrant Vector Store**.
   * Dữ liệu động (Dự án, hóa đơn, nhật ký, review session, phân công) ➔ Lưu trữ trong **PostgreSQL 16**.
3. **Ngôn Ngữ & Phong Cách**:
   * Viết bằng tiếng Việt chuẩn mực kỹ thuật, ngắn gọn, có cấu trúc bảng biểu và Mermaid diagrams.

---

## 2. PHÂN NHÓM TÀI LIỆU CHUYÊN SÂU

| Cụm Chuyên Môn | Mục Đích & Nội Dung Chính | Danh Sách Tài Liệu |
| :--- | :--- | :--- |
| **`hoat-dong-doanh-nghiep`** | **Tri thức cốt lõi về 4 Trụ Cột Hoạt Động (Xây lắp, Vận tải xe ben, Cho thuê máy đào, Mua bán vật tư), MST 0202111150 và Ma trận Đối tác** | • [docs/company-business-domains-and-operations-guide.md](file:///c:/Projects/DSCons/docs/company-business-domains-and-operations-guide.md) |
| **`kien-truc-tong-the`** | Kiến trúc hệ thống master, schema CSDL, hợp đồng API, bảo mật RBAC, cơ chế chống mất nhớ | • [docs/system-architecture-master.md](file:///c:/Projects/DSCons/docs/system-architecture-master.md)<br>• [docs/agent-architecture-7x.md](file:///c:/Projects/DSCons/docs/agent-architecture-7x.md)<br>• [docs/anti-memory-loss-implementation-plan.md](file:///c:/Projects/DSCons/docs/anti-memory-loss-implementation-plan.md)<br>• [docs/dossier-review-workflow-schema.md](file:///c:/Projects/DSCons/docs/dossier-review-workflow-schema.md)<br>• [docs/policy-operations-playbook.md](file:///c:/Projects/DSCons/docs/policy-operations-playbook.md)<br>• [docs/dual-platform-windows-mac-setup.md](file:///c:/Projects/DSCons/docs/dual-platform-windows-mac-setup.md) |
| **`hoa-don-ke-toan`** | Bóc tách XML HĐĐT NĐ 123/2020, làm giàu dòng hàng GDT, hạch toán xuất thẳng chân công trường (Direct-to-Site), 4 Trụ Cột | • [docs/boq-driven-material-allocation-and-direct-site-accounting-guide.md](file:///c:/Projects/DSCons/docs/boq-driven-material-allocation-and-direct-site-accounting-guide.md)<br>• [app/services/invoice_processing_service.py](file:///c:/Projects/DSCons/app/services/invoice_processing_service.py)<br>• [tests/test_invoice_processing_service.py](file:///c:/Projects/DSCons/tests/test_invoice_processing_service.py) |
| **`du-an-wbs-evm`** | Phân rã WBS bằng AI, phân bổ vật tư BoQ, phân tích Earned Value (BAC, PV, EV, AC, CPI, SPI) | • [docs/boq-norm-decomposition-and-material-scheduling-guide.md](file:///c:/Projects/DSCons/docs/boq-norm-decomposition-and-material-scheduling-guide.md)<br>• [docs/step5-command-center-readiness-planning.md](file:///c:/Projects/DSCons/docs/step5-command-center-readiness-planning.md)<br>• [tests/test_project_crud_and_wbs_service.py](file:///c:/Projects/DSCons/tests/test_project_crud_and_wbs_service.py)<br>• [tests/test_advanced_bim_evm_ai.py](file:///c:/Projects/DSCons/tests/test_advanced_bim_evm_ai.py) |
| **`ingest-knowledge`** | Ingest hồ sơ thực tế, taxonomy phân loại, metadata contract, từ điển dữ liệu TT91 | • [docs/knowledge-taxonomy.md](file:///c:/Projects/DSCons/docs/knowledge-taxonomy.md)<br>• [docs/tt91-data-dictionary.md](file:///c:/Projects/DSCons/docs/tt91-data-dictionary.md)<br>• [docs/project-dossier-manifest-template.md](file:///c:/Projects/DSCons/docs/project-dossier-manifest-template.md)<br>• [docs/kenh-xay-gold-reference-metadata-contract.md](file:///c:/Projects/DSCons/docs/kenh-xay-gold-reference-metadata-contract.md) |
| **`ho-so-cong-trinh-mau`** | Hồ sơ mẫu, manifest dự án Nam Hưng Khánh, Kênh Xây, gap analysis | • [docs/duong-ong-nam-hung-khanh-manifest.md](file:///c:/Projects/DSCons/docs/duong-ong-nam-hung-khanh-manifest.md)<br>• [docs/duong-ong-nam-hung-khanh-ho-so-gap-analysis.md](file:///c:/Projects/DSCons/docs/duong-ong-nam-hung-khanh-ho-so-gap-analysis.md)<br>• [docs/duong-ong-nam-hung-khanh-ho-so-standard.md](file:///c:/Projects/DSCons/docs/duong-ong-nam-hung-khanh-ho-so-standard.md)<br>• [docs/kenh-xay-document-manifest.md](file:///c:/Projects/DSCons/docs/kenh-xay-document-manifest.md) |
| **`van-hanh-nhan-su`** | Tri thức con người, 8 AI Personas, SOP chấm công & ca máy, phân công công việc | • [docs/company-people-knowledge.md](file:///c:/Projects/DSCons/docs/company-people-knowledge.md)<br>• [docs/employee-rag-sop.md](file:///c:/Projects/DSCons/docs/employee-rag-sop.md)<br>• [docs/duong-ong-nam-hung-khanh-work-assignment.md](file:///c:/Projects/DSCons/docs/duong-ong-nam-hung-khanh-work-assignment.md) |
| **`dieu-hanh-digital-twin`** | Digital Twin công ty, SSE streaming, Case & Blocker Management | • [docs/operations-case-management-upgrade-proposal.md](file:///c:/Projects/DSCons/docs/operations-case-management-upgrade-proposal.md)<br>• [docs/verification-strategy-workflow-and-operational-state.md](file:///c:/Projects/DSCons/docs/verification-strategy-workflow-and-operational-state.md)<br>• [docs/degraded-state-observability-plan.md](file:///c:/Projects/DSCons/docs/degraded-state-observability-plan.md) |
| **`automation-zalo-desktop`** | Tự động hóa Zalo PC, Desktop Automation adapter | • [docs/desktop-automation-architecture.md](file:///c:/Projects/DSCons/docs/desktop-automation-architecture.md)<br>• [docs/zalo-pc-contact-playbook.md](file:///c:/Projects/DSCons/docs/zalo-pc-contact-playbook.md)<br>• [docs/zalo-missing-dossier-contact-policy.md](file:///c:/Projects/DSCons/docs/zalo-missing-dossier-contact-policy.md) |

---

## 3. THỨ TỰ ĐỌC TÀI LIỆU BẮT BUỘC CHO MỌI AI AGENT MỚI (ONBOARDING PIPELINE)

Khi một AI Agent nhận nhiệm vụ mới trong repo, quy trình đọc hiểu ngữ cảnh bắt buộc là:

1. **BẮT BUỘC ĐẦU TIÊN**: Đọc [docs/company-business-domains-and-operations-guide.md](file:///c:/Projects/DSCons/docs/company-business-domains-and-operations-guide.md) để nắm vững **4 Trụ Cột Hoạt Động Cốt Lõi**, MST `0202111150`, và Ma trận Phân loại Khách hàng/Nhà cung cấp (Không được nhầm lẫn giữa Xây lắp, Vận tải bùn đất, Cho thuê máy đào và Mua bán vật tư).
2. Đọc [README.md](file:///c:/Projects/DSCons/README.md) để nắm tổng quan và danh mục API.
3. Đọc [docs/system-architecture-master.md](file:///c:/Projects/DSCons/docs/system-architecture-master.md) để nắm cấu trúc DB, contract endpoints và danh mục AI Personas.
4. Đọc [workflow.md](file:///c:/Projects/DSCons/workflow.md) để hiểu chu trình luân chuyển dữ liệu.
5. Đọc tài liệu chi tiết trong cụm chuyên môn liên quan trước khi sửa mã nguồn hoặc thực thi lệnh.