SDD Registry Sync (/sdd-sync)
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, CONFIGURATION GAP), file paths, and CLI commands are language-invariant.
Dùng để quét và cập nhật Master Feature Registry (.sdd/README.md) cùng shared API/state contract (.sdd/shared_context.md) sau khi feature thay đổi.
Tham số
--feature=<feature-slug>: Tùy chọn; chỉ đồng bộ feature này. Không truyền thì giữ hành vi quét mọi feature.
--reason=<change-summary>: Tùy chọn; lý do sync. Bắt buộc khi sync theo change đã biết để liên kết Action Record/change impact.
Architecture Profile reference
Tuân thủ Architecture Profile Protocol.
- Đọc
.sdd/architecture-profile.md trước khi trích xuất/cập nhật shared contract.
- Chỉ ghi HTTP route, event schema, DTO validator, persistence identifier và command khi profile binding/evidence tương ứng đã
APPROVED.
- Binding chưa chọn: ghi behavior và data shape technology-neutral; không thêm framework route syntax, decorator, ORM schema hoặc command suy đoán.
- Artifact feature mâu thuẫn profile
APPROVED: giữ evidence, báo CONFIGURATION GAP và yêu cầu Human reviewer có thẩm quyền disposition; không tự rewrite contract.
Quy trình
- Quét
.sdd/features/ hoặc feature được chọn; đọc header từng SPEC.md để lấy status, SemVer và số REQ-XXX.
- Phân loại thay đổi dự kiến. Chỉ cập nhật registry không làm thay đổi contract có thể tiếp tục với Action Record. Mọi shared/public contract change là material state change.
- Trước shared-contract write, xác minh checkpoint persisted đã
APPROVED cho feature/contract, cùng decision, reviewer và timestamp. Nếu thiếu, tạo recommendation PENDING HUMAN REVIEW, lưu tại .sdd/reviews/sync-<slug>.md, rồi dừng; recommendation sau action không thể hợp thức hóa write trước đó.
- Trước khi sửa shared contract, đọc ownership và frozen contract record trong
.sdd/shared_context.md. Chỉ contract owner hoặc Lead được sửa; actor khác dừng và gửi change request.
- Sau checkpoint hợp lệ, cập nhật
.sdd/README.md; tổng hợp contract được evidence xác nhận; ghi producer, contract ID/version/status, owner, linked REQ-XXX/task/review/Dispatch Record evidence, consumers, compatibility, unresolved decision, last sync và Action Record reference.
- Ghi hoặc đề xuất
/sdd-trace khi contract version, requirement hoặc implementation evidence thay đổi. Action Record phải tham chiếu checkpoint đã tồn tại trước action.
Output
SDD SYNC
Feature: <slug | all>
Reason: <summary | full registry sync>
Contract: <ID/version/status or N/A>
Producer: <feature>
Owner: <role>
Consumers: <list or none>
Compatibility: <compatible | migration required | pending decision>
Evidence: <REQ/task/review/action record>
Unresolved decision: <none or decision>
Next trace/sync step: <command or N/A>
AI Recommendation và Human Final Review
Nếu sync chỉ cập nhật registry không thay đổi contract, ghi Action Record và recommendation theo protocol nếu artifact scope thay đổi. Nếu shared contract đã thay đổi, checkpoint phải tồn tại trước action; Action Record sau sync tham chiếu checkpoint đó và nêu changed producer/version/status/owner/consumer/compatibility, drift evidence, unresolved decision và residual integration risk. Agent không tự kết luận registry hoặc contract đã APPROVED.
1---2name: sdd-sync3description: Đồng bộ Master Feature Registry và shared contract trong .sdd4---56# SDD Registry Sync (`/sdd-sync`)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`, `CONFIGURATION GAP`), file paths, and CLI commands are language-invariant.910Dùng để quét và cập nhật Master Feature Registry (`.sdd/README.md`) cùng shared API/state contract (`.sdd/shared_context.md`) sau khi feature thay đổi.1112## Tham số1314- `--feature=<feature-slug>`: Tùy chọn; chỉ đồng bộ feature này. Không truyền thì giữ hành vi quét mọi feature.15- `--reason=<change-summary>`: Tùy chọn; lý do sync. Bắt buộc khi sync theo change đã biết để liên kết Action Record/change impact.1617## Architecture Profile reference1819Tuân thủ [Architecture Profile Protocol](../_shared/architecture-profile-protocol.md).2021- Đọc `.sdd/architecture-profile.md` trước khi trích xuất/cập nhật shared contract.22- Chỉ ghi HTTP route, event schema, DTO validator, persistence identifier và command khi profile binding/evidence tương ứng đã `APPROVED`.23- Binding chưa chọn: ghi behavior và data shape technology-neutral; không thêm framework route syntax, decorator, ORM schema hoặc command suy đoán.24- Artifact feature mâu thuẫn profile `APPROVED`: giữ evidence, báo `CONFIGURATION GAP` và yêu cầu Human reviewer có thẩm quyền disposition; không tự rewrite contract.2526## Quy trình27281. Quét `.sdd/features/` hoặc feature được chọn; đọc header từng `SPEC.md` để lấy status, SemVer và số `REQ-XXX`.292. Phân loại thay đổi dự kiến. Chỉ cập nhật registry không làm thay đổi contract có thể tiếp tục với Action Record. Mọi shared/public contract change là material state change.303. Trước shared-contract write, xác minh checkpoint persisted đã `APPROVED` cho feature/contract, cùng decision, reviewer và timestamp. Nếu thiếu, tạo recommendation `PENDING HUMAN REVIEW`, lưu tại `.sdd/reviews/sync-<slug>.md`, rồi dừng; recommendation sau action không thể hợp thức hóa write trước đó.314. Trước khi sửa shared contract, đọc ownership và frozen contract record trong `.sdd/shared_context.md`. Chỉ contract owner hoặc Lead được sửa; actor khác dừng và gửi change request.325. Sau checkpoint hợp lệ, cập nhật `.sdd/README.md`; tổng hợp contract được evidence xác nhận; ghi producer, contract ID/version/status, owner, linked `REQ-XXX`/task/review/Dispatch Record evidence, consumers, compatibility, unresolved decision, last sync và Action Record reference.336. Ghi hoặc đề xuất `/sdd-trace` khi contract version, requirement hoặc implementation evidence thay đổi. Action Record phải tham chiếu checkpoint đã tồn tại trước action.3435## Output3637```text38SDD SYNC39Feature: <slug | all>40Reason: <summary | full registry sync>41Contract: <ID/version/status or N/A>42Producer: <feature>43Owner: <role>44Consumers: <list or none>45Compatibility: <compatible | migration required | pending decision>46Evidence: <REQ/task/review/action record>47Unresolved decision: <none or decision>48Next trace/sync step: <command or N/A>49```5051## AI Recommendation và Human Final Review5253Nếu sync chỉ cập nhật registry không thay đổi contract, ghi Action Record và recommendation theo protocol nếu artifact scope thay đổi. Nếu shared contract đã thay đổi, checkpoint phải tồn tại trước action; Action Record sau sync tham chiếu checkpoint đó và nêu changed producer/version/status/owner/consumer/compatibility, drift evidence, unresolved decision và residual integration risk. Agent không tự kết luận registry hoặc contract đã `APPROVED`.