Tham chiếu
Quy chuẩn viết docs
Quy chuẩn viết và review tài liệu kỹ thuật CenterOS cho humans và Codex.
Quy chuẩn viết docs
Mục tiêu
Giữ CenterOS Docs ngắn, đúng implementation, dễ review và dùng được khi engineer cần build, validate hoặc debug.
Section ownership
architecture: system model, service boundary, token/context model, runtime rule cấp hệ thống.services: runtime, API surface, behavior và ownership của từng service.flows: luồng FE-BE hoặc service-to-service theo journey kỹ thuật.use-cases: một endpoint hoặc một use case cụ thể, input/output/rule chính.database: schema/table ownership, migration note, cross-service database rule.runbooks: thao tác validate/debug/deploy/reset có thể chạy được.reference: glossary, conventions, headers, token scopes, env var names.adr: quyết định kiến trúc đã chọn, context ngắn, consequence.
DOD cho một file
- File trả lời một câu hỏi rõ ràng.
- Không viết dài lan man.
- Không invent implementation.
- Fact đã đóng được nói rõ là đã đóng.
- Fact chưa validate được đánh dấu
TODOhoặcChưa đóng. - Không chứa secrets, token thật, credential hoặc giá trị private từ
.env. - Giữ nguyên identifiers: API paths, header names, JSON fields, Docker names, image names, env var names, schema/table names.
- Có related links khi giúp người đọc đi tiếp.
DOD cho một batch
- Sidebar order hợp lý.
- Không có empty files.
- Không có docs toàn
TODO. - Không mâu thuẫn giữa các file.
bun run types:checkpass.bun run lintpass.bun run buildpass.
Templates
Architecture doc:
---
title: ...
description: ...
---
# ...
## Mục tiêu
## Trạng thái hiện tại
## Luồng chính
## Quy tắc quan trọng
## Liên quan
## TODOService doc:
# Service name
## Mục tiêu
## Runtime
## API surface
## Ownership
## Không sở hữu
## TODOFlow doc:
# Flow name
## Mục tiêu
## Actors
## Luồng chính
## Failure cases
## Validated
## TODOUse case doc:
# Use case name
## Endpoint
## Mục tiêu
## Request
## Response
## Rules
## TODODatabase doc:
# Database topic
## Mục tiêu
## Owner service
## Tables/schema
## Read/write rules
## Migration notes
## TODORunbook doc:
# Runbook name
## Mục tiêu
## Prerequisites
## Commands
## Expected result
## Debug notes
## TODO