spec-lite 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -86,7 +86,7 @@ Mỗi requirement mới đều đi qua pipeline này.
86
86
 
87
87
  /build ◄──────────────┐
88
88
  │ │
89
- /review │ (nếu Critical/Important → sửa và build lại)
89
+ /review-integration │ (nếu Critical/Important → sửa và build lại)
90
90
  │ │
91
91
  [approve] ───────────┘ (nếu chỉ Suggestion hoặc không có finding)
92
92
  ```
@@ -109,7 +109,7 @@ Tạo `plan.md` và `todo.md` từ `spec.md` + `tech.md`.
109
109
  #### `/build`
110
110
  Implement từng task trong `plan.md`/`todo.md` theo TDD incremental.
111
111
 
112
- #### `/review`
112
+ #### `/review-integration`
113
113
  Review implementation sau `/build` theo năm trục: correctness, readability, architecture, security, performance. Đối chiếu trực tiếp với `spec.md` và `tech.md`.
114
114
 
115
115
  - Critical/Important → dừng, sửa, re-review
@@ -130,6 +130,6 @@ Review implementation sau `/build` theo năm trục: correctness, readability, a
130
130
  | `/spec-tech` | `specs/integrations/{slug}/tech.md` |
131
131
  | `/plan` | `specs/integrations/{slug}/plan.md`, `todo.md` |
132
132
  | `/build` | *(implements tasks từ `plan.md`/`todo.md`)* |
133
- | `/review` | *(findings report — không tạo file)* |
133
+ | `/review-integration` | *(findings report — không tạo file)* |
134
134
 
135
135
  Component và feature artifacts trong greenfield mọc dần qua **cascade proposals** từ integrations — không có skill chuyên biệt để tạo.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-lite",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Spec-driven development kit for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -74,7 +74,7 @@ Nếu `status: approved` → tiếp tục sang Bước 0b.
74
74
 
75
75
  **Tạo branch (bắt buộc):**
76
76
 
77
- Luôn tạo branch `build/{integration-slug}` trước khi build, bất kể có dùng worktree hay không. Điều này đảm bảo `/review` luôn có base để diff chính xác.
77
+ Luôn tạo branch `build/{integration-slug}` trước khi build, bất kể có dùng worktree hay không. Điều này đảm bảo `/review-integration` luôn có base để diff chính xác.
78
78
 
79
79
  ```bash
80
80
  git checkout -b feat/{slug}
@@ -212,7 +212,7 @@ Invoke `debugging-and-error-recovery`:
212
212
  Khi tất cả task trong session này đã done, thông báo:
213
213
 
214
214
  ```
215
- Tất cả task đã hoàn thành. Bước tiếp theo: chạy /review để kiểm tra toàn bộ implementation trước khi merge.
215
+ Tất cả task đã hoàn thành. Bước tiếp theo: chạy /review-integration để kiểm tra toàn bộ implementation trước khi merge.
216
216
  ```
217
217
 
218
- Không tự động invoke `/review` — để user chủ động gọi.
218
+ Không tự động invoke `/review-integration` — để user chủ động gọi.
@@ -1,9 +1,9 @@
1
1
  ---
2
- name: review
2
+ name: review-integration
3
3
  description: Review code sau bước /build theo năm trục — correctness, readability, architecture, security, performance. Dùng sau khi hoàn thành một hoặc nhiều task trong todo.md. Đối chiếu implementation với spec.md và tech.md để xác nhận đúng yêu cầu.
4
4
  ---
5
5
 
6
- # Review
6
+ # Review Integration
7
7
 
8
8
  ## Tổng quan
9
9
 
@@ -65,7 +65,7 @@ Append section mới vào cuối file (không ghi đè section cũ). Chỉ ghi c
65
65
  - [ ] **Important** — {tên ngắn gọn}
66
66
  ```
67
67
 
68
- > Details đầy đủ nằm ở Phase Review trong `plan.md` (nếu user chọn thêm phase), hoặc trong output của `/review` lúc đó.
68
+ > Details đầy đủ nằm ở Phase Review trong `plan.md` (nếu user chọn thêm phase), hoặc trong output của `/review-integration` lúc đó.
69
69
 
70
70
  **Bước 3 — Đề xuất thêm phase mới vào plan.md và todo.md:**
71
71
 
@@ -142,7 +142,7 @@ Thông báo:
142
142
 
143
143
  ```
144
144
  Findings đã được lưu vào specs/integrations/{slug}/techdebt.md.
145
- Chạy /review lại hoặc /build khi sẵn sàng xử lý.
145
+ Chạy /review-integration lại hoặc /build khi sẵn sàng xử lý.
146
146
  ```
147
147
 
148
148
  ---
@@ -214,20 +214,30 @@ Ghi tất cả? [y] hoặc review từng file trước [r]:
214
214
 
215
215
  ---
216
216
 
217
- ### Bước 10: Điền Component Index vào prd.md
217
+ ### Bước 10: Điền Component Index vào prd.md + sad.md Components table
218
218
 
219
- Sau khi artifacts đã được ghi, update `specs/main/prd.md` Component Index với danh sách đã confirm:
219
+ Sau khi artifacts đã được ghi, update song song hai bảng — `prd.md > Components` (vai trò business) `sad.md > System Overview > Components` (góc nhìn architectural). Danh sách C-XXX phải khớp giữa hai bảng.
220
220
 
221
221
  ```
222
- Sẽ điền Component Index vào prd.md:
222
+ Sẽ điền:
223
+
224
+ prd.md Component Index (business view):
223
225
  C-001 | auth | Xác thực và phân quyền người dùng | active
224
226
  C-002 | user | Quản lý thông tin người dùng | active
225
227
  C-003 | payment | Xử lý thanh toán và giao dịch | active
226
228
  C-004 | notification | Gửi thông báo qua email/push | active
227
229
 
230
+ sad.md Components table (architectural view):
231
+ C-001 | auth | Stateless service, JWT issuer, in-mem session cache
232
+ C-002 | user | Stateful service, owns user DB, exposes REST
233
+ C-003 | payment | Stateful service, integrates Stripe, idempotent writes
234
+ C-004 | notification | Worker, consumes events from message bus
235
+
228
236
  Apply? [y/n]
229
237
  ```
230
238
 
239
+ Cột architectural notes trong sad.md nên ngắn gọn — tập trung vào boundary/deployment/key tech concern, không lặp lại business role từ prd.md.
240
+
231
241
  ---
232
242
 
233
243
  ### Bước 11: Summary
@@ -239,6 +249,7 @@ Apply? [y/n]
239
249
  ...
240
250
 
241
251
  ✓ prd.md Component Index: {N} entries đã được điền
252
+ ✓ sad.md Components table: {N} entries đã được điền (architectural view)
242
253
 
243
254
  {nếu có} ✓ domain.md Shared Entities: {N} entities đã được cascade
244
255
 
@@ -262,5 +273,6 @@ Bước tiếp theo:
262
273
  - [ ] Dependencies chỉ reference C-XXX IDs, không reference file paths
263
274
  - [ ] Business rules detect được đánh dấu `(detected from code)`
264
275
  - [ ] prd.md Component Index đã được update
276
+ - [ ] sad.md Components table đã được update — danh sách C-XXX khớp với prd.md
265
277
  - [ ] Shared Entities đã được cascade vào domain.md (nếu có)
266
278
  - [ ] NEEDS_CLARIFY items được list đầy đủ trong summary
@@ -111,6 +111,12 @@ Hỏi tuần tự từng phần:
111
111
 
112
112
  Nếu user muốn đề xuất → đề xuất 2-3 option với trade-offs rõ ràng, để user chọn. Không quyết định thay.
113
113
 
114
+ **Phần 1.5 — System Overview (diagram + Components table):**
115
+ > Vẽ sơ đồ tổng thể (Mermaid): các component và quan hệ chính.
116
+ > Components table (projection từ `prd.md > Components`): với mỗi `C-XXX`, ghi 1 dòng architectural note — boundary/deployment unit/key tech concern. **Không lặp lại role/responsibility từ `crd.md`** — chỉ góc nhìn architectural.
117
+
118
+ Nếu `prd.md > Components` còn rỗng (brownfield init chưa scan code, hoặc greenfield chưa biết component) → để placeholder và note rằng bảng này sẽ được điền khi Component Index có nội dung (qua `/spec-brownfield-component` hoặc cascade từ integration).
119
+
114
120
  **Phần 2 — Tech Stack:**
115
121
  > Tech stack cho từng layer: Frontend, Backend, Database, Infrastructure?
116
122
  > Với mỗi lựa chọn: lý do chọn là gì? (performance, team familiarity, ecosystem...)
@@ -196,6 +202,7 @@ Trước khi kết thúc, kiểm tra:
196
202
 
197
203
  - [ ] Frontmatter đầy đủ và đúng schema
198
204
  - [ ] Architectural Style có lý do gắn với NFRs hoặc constraints
205
+ - [ ] System Overview có diagram + Components table; danh sách C-XXX khớp với `prd.md > Components` (hoặc cả hai cùng rỗng nếu Component Index chưa được điền)
199
206
  - [ ] Mỗi tech stack item có lý do chọn rõ ràng
200
207
  - [ ] Tất cả 4 cross-cutting concerns đã được điền (auth, error, logging, caching)
201
208
  - [ ] Guardrails có ít nhất 3 item, mỗi item cụ thể và actionable
@@ -173,7 +173,7 @@ Sau khi main artifacts đã sẵn sàng (từ greenfield hoặc brownfield), m
173
173
  | `/spec-tech [number]` | `sad.md`, `domain.md`, cdd(s), fdd(s), `spec.md` | `specs/integrations/{slug}/tech.md` |
174
174
  | `/plan` | `spec.md`, `tech.md`, `domain.md` | `plan.md`, `todo.md` |
175
175
  | `/build` | `plan.md`, `todo.md` | *(source code)* |
176
- | `/review` | `spec.md`, `tech.md`, `plan.md`, `todo.md`, *(source code)* | *(findings report)* |
176
+ | `/review-integration` | `spec.md`, `tech.md`, `plan.md`, `todo.md`, *(source code)* | *(findings report)* |
177
177
  | `/archive` | `specs/integrations/` | `specs/archive/` |
178
178
 
179
179
  ### `/spec-new [requirement]`
@@ -250,7 +250,7 @@ Với mỗi task `[ ]` trong `todo.md`, lặp lại:
250
250
 
251
251
  ---
252
252
 
253
- ### `/review`
253
+ ### `/review-integration`
254
254
 
255
255
  Review implementation sau `/build` theo năm trục: correctness, readability, architecture, security, performance. Đối chiếu trực tiếp với `spec.md` và `tech.md`. Delegates to `code-review-and-quality`.
256
256
 
@@ -298,7 +298,7 @@ Di chuyển integration đã hoàn thành hoặc không còn active từ `specs/
298
298
 
299
299
  /build ←──────────────┐
300
300
  │ │
301
- /review │ (nếu Critical/Important)
301
+ /review-integration │ (nếu Critical/Important)
302
302
  │ │
303
303
  [approve] ──────────┘ (nếu Suggestion only)
304
304
 
@@ -2,7 +2,7 @@
2
2
  slug: "{slug}"
3
3
  created: {YYYY-MM-DD}
4
4
  referenced_by:
5
- - skills/review/SKILL.md > Bước 2 — Luôn ghi findings vào techdebt.md
5
+ - skills/review-integration/SKILL.md > Bước 2 — Luôn ghi findings vào techdebt.md
6
6
  ---
7
7
 
8
8
  # Tech Debt — {title}
@@ -24,6 +24,14 @@ graph TD
24
24
  ...
25
25
  ```
26
26
 
27
+ ### Components
28
+
29
+ Liệt kê các component của hệ thống — projection từ `prd.md > Components` với góc nhìn **architectural** (boundary, deployment unit, key tech concern). Vai trò business/role chi tiết xem `crd.md`, internal design xem `cdd.md`.
30
+
31
+ | ID | Component | Boundary / Architectural notes |
32
+ | --- | --- | --- |
33
+ | C-XXX | {name} | {deployment unit, layer, key tech-level concern} |
34
+
27
35
  ## Tech Stack
28
36
 
29
37
  | Layer | Technology | Lý do chọn |