SDD Project Memory Editor (/sdd-claude-edit)
Output language: All output mirrors the language of the invoking prompt. Vietnamese prompt → Vietnamese output; English prompt → English output. Canonical tokens (PENDING HUMAN REVIEW, APPROVED), file paths, and CLI commands are language-invariant.
Dùng khi cập nhật CLAUDE.md, là bộ nhớ kiến trúc cho người đọc và phải phản chiếu Architecture Profile đã approved.
Tham số
--section=<tên-mục>: Tùy chọn; mục cần sửa, ví dụ tech-stack, naming-conventions, directory-anatomy, architecture-dna.
--reason=<lý-do>: Lý do cập nhật kiến trúc hoặc project memory.
Cấu trúc 4 sections cốt lõi của CLAUDE.md
CLAUDE.md phải phản chiếu project thực — không dùng placeholder. Khi sửa, ưu tiên update các sections:
| Section |
Nội dung |
Khi nào update |
| TL;DR (30 giây) |
Loại service, giao thức chính, dependency quan trọng |
Khi scope project thay đổi |
| Architecture |
Pattern (Clean/Hexagonal/MVC), file structure, dependency direction |
Khi profile binding thay đổi |
| Lesson Learned |
Sự cố, root cause, fix áp dụng — format [YYYY-MM] |
Sau incident, post-mortem |
| Current Sprint Focus |
Feature đang build; link đến TASKS.md |
Đầu mỗi sprint/feature |
CLAUDE.md là bộ nhớ kiến trúc cho con người đọc. Không dùng để Agent suy đoán stack; Agent đọc Architecture Profile. Không áp đặt section không tồn tại vào CLAUDE.md hiện hữu.
Quy trình
- Đọc
CLAUDE.md, CONSTITUTION.md, .sdd/architecture-profile.md, constraint và evidence repository.
- Tech stack/architecture binding chỉ được cập nhật trong profile theo Architecture Profile Protocol; không suy đoán framework, database, ORM/query layer, validation hoặc command từ prose.
- Profile thay đổi: invalidate recommendation/Plan/Tasks bị ảnh hưởng, tạo
PENDING HUMAN REVIEW, rồi chỉ phản chiếu binding đã APPROVED vào CLAUDE.md.
- Không áp đặt section, version hoặc changelog không tồn tại. Giữ cấu trúc hiện hữu trừ khi Human-approved scope yêu cầu thay đổi.
- Kiểm tra nội dung
CLAUDE.md khớp source layout, skill và profile hiện tại.
AI Recommendation và Human Final Review
Trước khi sửa CLAUDE.md, tạo canonical recommendation từ .claude/skills/_shared/ai-review-protocol.md, gồm architecture evidence, memory change đề xuất, alternative, drift risk và affected skill. Lưu tại .sdd/reviews/claude-edit.md với PENDING HUMAN REVIEW. Human reviewer có thẩm quyền phải APPROVED trước edit; Tech Lead có thể review architecture khi repository giao thẩm quyền. Sau edit refresh recommendation và không tự approve project memory mới.
1---2name: sdd-claude-edit3description: Cập nhật CLAUDE.md an toàn theo Architecture Profile và repository evidence4---56# SDD Project Memory Editor (`/sdd-claude-edit`)78**Output language:** All output mirrors the language of the invoking prompt. Vietnamese prompt → Vietnamese output; English prompt → English output. Canonical tokens (`PENDING HUMAN REVIEW`, `APPROVED`), file paths, and CLI commands are language-invariant.910Dùng khi cập nhật `CLAUDE.md`, là bộ nhớ kiến trúc cho người đọc và phải phản chiếu Architecture Profile đã approved.1112## Tham số1314- `--section=<tên-mục>`: Tùy chọn; mục cần sửa, ví dụ `tech-stack`, `naming-conventions`, `directory-anatomy`, `architecture-dna`.15- `--reason=<lý-do>`: Lý do cập nhật kiến trúc hoặc project memory.1617## Cấu trúc 4 sections cốt lõi của CLAUDE.md1819`CLAUDE.md` phải phản chiếu **project thực** — không dùng placeholder. Khi sửa, ưu tiên update các sections:2021| Section | Nội dung | Khi nào update |22| :--- | :--- | :--- |23| **TL;DR (30 giây)** | Loại service, giao thức chính, dependency quan trọng | Khi scope project thay đổi |24| **Architecture** | Pattern (Clean/Hexagonal/MVC), file structure, dependency direction | Khi profile binding thay đổi |25| **Lesson Learned** | Sự cố, root cause, fix áp dụng — format `[YYYY-MM]` | Sau incident, post-mortem |26| **Current Sprint Focus** | Feature đang build; link đến `TASKS.md` | Đầu mỗi sprint/feature |2728`CLAUDE.md` là bộ nhớ kiến trúc cho **con người đọc**. Không dùng để Agent suy đoán stack; Agent đọc Architecture Profile. Không áp đặt section không tồn tại vào `CLAUDE.md` hiện hữu.2930## Quy trình31321. Đọc `CLAUDE.md`, `CONSTITUTION.md`, `.sdd/architecture-profile.md`, constraint và evidence repository.332. Tech stack/architecture binding chỉ được cập nhật trong profile theo [Architecture Profile Protocol](../_shared/architecture-profile-protocol.md); không suy đoán framework, database, ORM/query layer, validation hoặc command từ prose.343. Profile thay đổi: invalidate recommendation/Plan/Tasks bị ảnh hưởng, tạo `PENDING HUMAN REVIEW`, rồi chỉ phản chiếu binding đã `APPROVED` vào `CLAUDE.md`.354. Không áp đặt section, version hoặc changelog không tồn tại. Giữ cấu trúc hiện hữu trừ khi Human-approved scope yêu cầu thay đổi.365. Kiểm tra nội dung `CLAUDE.md` khớp source layout, skill và profile hiện tại.3738## AI Recommendation và Human Final Review3940Trước khi sửa `CLAUDE.md`, tạo canonical recommendation từ `.claude/skills/_shared/ai-review-protocol.md`, gồm architecture evidence, memory change đề xuất, alternative, drift risk và affected skill. Lưu tại `.sdd/reviews/claude-edit.md` với `PENDING HUMAN REVIEW`. Human reviewer có thẩm quyền phải `APPROVED` trước edit; `Tech Lead` có thể review architecture khi repository giao thẩm quyền. Sau edit refresh recommendation và không tự approve project memory mới.