@ngocsangairvds/vsaf 3.0.10 → 3.0.12

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.
@@ -10,11 +10,28 @@ Implement code đúng theo SRS và testcase, từng task một, với TDD — đ
10
10
 
11
11
  ## Điều kiện tiên quyết
12
12
  - Đã chạy `/vsaf-doc` và có SRS được approve
13
- - Đã chạy `/vsaf-test` và có testcase docs
13
+ - Đã chạy `/vsaf-test` và có testcase docs (implementation readiness = PASS)
14
14
  - User đã xác nhận phạm vi implement
15
15
 
16
16
  ## Các bước thực hiện
17
17
 
18
+ ### Bước 0 — Kiểm tra Superpowers (bắt buộc kiểm tra)
19
+ - Kiểm tra xem Superpowers plugin đã được cài trong Claude Code chưa
20
+ - Nếu **chưa cài** → hiển thị:
21
+ ```
22
+ ⚠️ Superpowers chưa được cài đặt.
23
+ Superpowers giúp tăng chất lượng implement (TDD execution, plan execution, debugging, code review).
24
+ Để cài, chạy trong Claude Code:
25
+ /plugin install superpowers@claude-plugins-official
26
+ Sau đó restart Claude Code.
27
+
28
+ → Tiếp tục build không có Superpowers (fallback mode).
29
+ ```
30
+ - Nếu **đã cài** → ghi nhận `HAS_SUPERPOWERS = true`, hiển thị:
31
+ ```
32
+ ✓ Superpowers available — sẽ sử dụng: execute-plan, test-driven-development, code-review
33
+ ```
34
+
18
35
  ### Bước 1 — Search MemPalace trước khi code (bắt buộc)
19
36
  - Gọi `mcp__mempalace__mempalace_search` với keyword là tên module/feature sắp implement
20
37
  - Đảm bảo không có architectural decisions cũ xung đột với approach hiện tại
@@ -24,24 +41,47 @@ Implement code đúng theo SRS và testcase, từng task một, với TDD — đ
24
41
  - Đọc file testcase trong `docs/project/testcases/`
25
42
  - Xác nhận mapping FR/NFR -> testcase trước khi bắt đầu
26
43
 
27
- ### Bước 3 — Implement từng task (TDD)
28
- Với mỗi nhóm testcase:
29
- 1. **RED**: Viết test trước, chạy testphải fail
30
- 2. **GREEN**: Viết code tối thiểu để test pass
31
- 3. **REFACTOR**: Clean up code, giữ test vẫn pass
32
- 4. Chạy `mcp__gitnexus__detect_changes` để verify chỉ đúng files thay đổi
33
- 5. Commit: `git commit -m "<type>: <task description>"`
44
+ ### Bước 3 — Sinh plan từ SRS (có/không Superpowers)
45
+ - **Nếu HAS_SUPERPOWERS**: dùng `superpowers:write-plan` để sinh atomic task list từ SRS + testcase
46
+ - **Nếu không**: tự tạo task list thủ công từ FR/NFR testcase mapping
47
+ - Mỗi task phải verification step ràng
48
+
49
+ ### Bước 4 Implement từng task (TDD)
50
+ - **Nếu HAS_SUPERPOWERS**: dùng `superpowers:execute-plan` tự động chạy TDD cycles (RED → GREEN → REFACTOR) theo plan
51
+ - Superpowers sẽ gọi `superpowers:test-driven-development` cho mỗi task
52
+ - Nếu plan lớn (20+ tasks): dùng `superpowers:subagent-driven-development` để dispatch song song
53
+ - **Nếu không**: implement thủ công theo TDD:
54
+ 1. **RED**: Viết test trước, chạy test → phải fail
55
+ 2. **GREEN**: Viết code tối thiểu để test pass
56
+ 3. **REFACTOR**: Clean up code, giữ test vẫn pass
57
+ - Sau mỗi task: chạy `mcp__gitnexus__detect_changes` để verify chỉ đúng files thay đổi
58
+ - Commit: `git commit -m "<type>: <task description>"`
59
+
60
+ ### Bước 4.5 — Checkpoint review (mỗi 3-5 tasks)
61
+ - Sau mỗi 3-5 tasks hoàn thành: dùng skill `bmad-checkpoint-preview`
62
+ - Mục đích: human-in-the-loop review — "walk me through changes so far"
63
+ - Checkpoint sẽ:
64
+ - Tóm tắt: đã làm gì, files nào thay đổi, tests status
65
+ - Highlight: điểm cần chú ý, potential issues
66
+ - Hỏi user: tiếp tục / điều chỉnh / dừng?
67
+ - **Bỏ qua checkpoint nếu**: plan < 5 tasks tổng (chỉ checkpoint cuối)
34
68
 
35
- ### Bước 4 — Xử lý khi fail
36
- - Fail 1-2 lần: thử approach khác
69
+ ### Bước 5 — Xử lý khi fail hoặc scope drift
70
+ - **Nếu HAS_SUPERPOWERS**: dùng `superpowers:systematic-debugging` bắt buộc hypothesis → experiment → conclusion
71
+ - **Nếu không**: thử approach khác thủ công
37
72
  - Fail 3 lần cùng 1 task: DỪNG, báo user, quay lại `/vsaf-plan`
73
+ - **Nếu phát hiện scope drift** (feature cần thay đổi lớn so với SRS):
74
+ - Dùng skill `bmad-correct-course` để đánh giá impact + đề xuất điều chỉnh
75
+ - DỪNG và trình bày cho user: tiếp tục với điều chỉnh / quay lại `/vsaf-plan` re-plan
38
76
 
39
- ### Bước 5 — Output sau mỗi task
77
+ ### Bước 6 — Output sau mỗi task
40
78
  ```
41
79
  ✓ Task [N]: [tên task]
42
80
  - Files changed: [danh sách]
43
81
  - Tests: [X passed]
44
82
  - Commit: [hash]
83
+ - Superpowers: [used/not available]
84
+ - Checkpoint: [due at task N+X / completed]
45
85
  ```
46
86
 
47
87
  ## Lưu ý
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: vsaf-discover
3
+ description: Product discovery — nghiên cứu domain, market, feasibility trước khi plan feature. Dùng khi bắt đầu dự án mới hoặc explore hướng phát triển sản phẩm.
4
+ ---
5
+
6
+ # VSAF Discover
7
+
8
+ ## Mục tiêu
9
+ Hiểu rõ domain, market, user needs, và technical feasibility trước khi commit vào bất kỳ feature nào. Đảm bảo build đúng thứ.
10
+
11
+ ## Input
12
+ `$ARGUMENTS` — mô tả product/domain cần khám phá (ví dụ: "nền tảng quản lý đơn hàng cho SME")
13
+
14
+ ## Khi nào dùng
15
+ - Bắt đầu dự án mới (chưa có PRD/SRS)
16
+ - Explore hướng phát triển sản phẩm mới
17
+ - Trước khi chạy `/vsaf-plan` cho feature lớn mà chưa hiểu rõ domain
18
+
19
+ ## Các bước thực hiện
20
+
21
+ ### Bước 1 — Search MemPalace
22
+ - Gọi `mcp__mempalace__mempalace_search` với keyword từ `$ARGUMENTS`
23
+ - Kiểm tra: đã có research cũ nào liên quan chưa?
24
+ - Nếu có: tóm tắt findings cũ, tránh lặp lại
25
+
26
+ ### Bước 2 — Domain Research
27
+ - Dùng skill `bmad-domain-research` để deep dive domain/industry
28
+ - Output: terminology, business rules, regulatory constraints, domain patterns
29
+ - Lưu vào `docs/project/planning-artifacts/domain-research-[topic].md`
30
+
31
+ ### Bước 3 — Market Research
32
+ - Dùng skill `bmad-market-research` để phân tích:
33
+ - Competition landscape: ai đang làm gì, strengths/weaknesses
34
+ - Customer needs: pain points, underserved segments
35
+ - Market trends: hướng đi nào đang tăng trưởng
36
+ - Lưu vào `docs/project/planning-artifacts/market-research-[topic].md`
37
+
38
+ ### Bước 4 — Technical Feasibility
39
+ - Dùng skill `bmad-technical-research` để đánh giá:
40
+ - Tech stack options + trade-offs
41
+ - Integration constraints
42
+ - Performance/scale requirements
43
+ - Build vs buy decisions
44
+ - Lưu vào `docs/project/planning-artifacts/tech-research-[topic].md`
45
+
46
+ ### Bước 5 — Product Brief
47
+ - Dùng skill `bmad-product-brief` để tổng hợp findings thành product brief
48
+ - Product brief = bản tóm tắt: vấn đề gì, cho ai, giải pháp gì, tại sao bây giờ
49
+ - Lưu vào `docs/project/planning-artifacts/product-brief-[name].md`
50
+
51
+ ### Bước 6 — PRFAQ Challenge (Working Backwards)
52
+ - Dùng skill `bmad-prfaq` để stress-test product concept
53
+ - Viết press release giả lập: nếu product thành công, bài báo sẽ nói gì?
54
+ - Viết FAQ: internal FAQ (team hỏi gì) + external FAQ (customer hỏi gì)
55
+ - Mục đích: phát hiện concept yếu **trước khi** đầu tư thời gian code
56
+
57
+ ### Bước 7 — Tạo PRD (Product Requirements Document)
58
+ - Dùng skill `bmad-agent-pm` (John) để dẫn dắt quá trình tạo PRD
59
+ - John sẽ gọi skill `bmad-create-prd` để sinh PRD chuẩn từ product brief
60
+ - PRD bao gồm: vision, goals, FRs, NFRs, epics, user stories, success metrics
61
+ - Sau khi tạo xong: dùng skill `bmad-validate-prd` để validate PRD đạt chuẩn
62
+ - Nếu validate FAIL: John sẽ dùng `bmad-edit-prd` để fix issues ngay
63
+ - Lưu vào `docs/project/planning-artifacts/prd-[name].md`
64
+
65
+ ### Bước 8 — Multi-agent Review (Party Mode)
66
+ - Dùng skill `bmad-party-mode` để tổ chức roundtable:
67
+ - PM (John) trình bày PRD
68
+ - Analyst (Mary) challenge requirements
69
+ - Architect (Winston) challenge feasibility
70
+ - Ghi nhận consensus và open questions
71
+
72
+ ### Bước 9 — Lưu insights vào MemPalace
73
+ - Gọi `mcp__mempalace__mempalace_add_drawer` để lưu:
74
+ - Market insights
75
+ - Domain knowledge
76
+ - Product decisions + rationale
77
+ - Open questions chưa trả lời
78
+
79
+ ### Bước 10 — Output cho user
80
+ ```
81
+ ## Discovery Complete: [product/domain]
82
+
83
+ ### Research artifacts
84
+ - Domain research: docs/project/planning-artifacts/domain-research-[topic].md
85
+ - Market research: docs/project/planning-artifacts/market-research-[topic].md
86
+ - Tech research: docs/project/planning-artifacts/tech-research-[topic].md
87
+ - Product brief: docs/project/planning-artifacts/product-brief-[name].md
88
+ - PRD: docs/project/planning-artifacts/prd-[name].md
89
+
90
+ ### Key findings
91
+ - [3-5 bullet points tóm tắt]
92
+
93
+ ### Open questions
94
+ - [Những gì cần validate thêm]
95
+
96
+ ### Recommended next steps
97
+ - Chạy /vsaf-sprint để break PRD thành epics + stories
98
+ - Hoặc: chạy /vsaf-plan <first-feature> để bắt đầu feature đầu tiên
99
+ ```
100
+
101
+ ## Lưu ý
102
+ - Flow này **không sinh code** — chỉ research + document
103
+ - Nếu domain quá rộng: đề nghị focus vào 1 vertical/segment trước
104
+ - Commit docs sau mỗi bước: `git commit -m "docs: discovery [topic]"`
@@ -13,41 +13,67 @@ Phải đã chạy `/vsaf-plan` và có output trước khi chạy skill này.
13
13
 
14
14
  ## Các bước thực hiện
15
15
 
16
+ ### Bước 0 — Xác định mode: Tạo mới hay Chỉnh sửa
17
+ - Kiểm tra xem đã có SRS/PRD trong `docs/project/srs/` cho feature này chưa
18
+ - **Nếu chưa có** → Mode: CREATE (tạo mới từ đầu)
19
+ - **Nếu đã có** → Mode: EDIT (chỉnh sửa dựa trên feedback/changes)
20
+ - Hỏi user: "SRS đã tồn tại. Bạn muốn tạo mới hoàn toàn hay chỉnh sửa?"
21
+
16
22
  ### Bước 1 — Search MemPalace
17
23
  - Gọi `mcp__mempalace__mempalace_search` với keyword từ feature hiện tại
18
24
  - Kiểm tra có decision cũ nào cần reference không?
19
25
 
20
- ### Bước 2 — Sinh SRS
26
+ ### Bước 2 — Sinh hoặc Chỉnh sửa SRS
27
+
28
+ #### Mode CREATE:
21
29
  - Viết tài liệu SRS từ output `/vsaf-plan`
22
- - SRS phải bao gồm: scope, FRs, NFRs, assumptions, out-of-scope, acceptance criteria
30
+ - Nếu user muốn format PRD chuẩn: dùng skill `bmad-create-prd` để sinh PRD đầy đủ
31
+ - SRS/PRD phải bao gồm: scope, FRs, NFRs, assumptions, out-of-scope, acceptance criteria
23
32
  - Thêm traceability ID cho FR/NFR để map sang testcase
24
33
  - Lưu vào `docs/project/srs/[feature].md`
25
34
 
26
- ### Bước 3 — Chuẩn hoá implement notes
35
+ #### Mode EDIT:
36
+ - Dùng skill `bmad-edit-prd` để chỉnh sửa SRS/PRD đã có
37
+ - bmad-edit-prd sẽ: đọc SRS hiện tại, nhận changes từ user/plan, update in-place
38
+ - Giữ nguyên traceability IDs đã có — chỉ thêm/sửa/xoá sections cần thiết
39
+ - Đảm bảo: changes không break consistency với testcases đã sinh (nếu có)
40
+ - Nếu thay đổi lớn: cảnh báo user rằng testcases cần re-run `/vsaf-test`
41
+
42
+ ### Bước 3 — Validate SRS (BMAD validate)
43
+ - Dùng skill `bmad-validate-prd` để validate SRS vừa sinh/sửa
44
+ - Kiểm tra: FRs đủ rõ ràng? NFRs đo lường được? Acceptance criteria kiểm chứng được?
45
+ - Nếu có issues: fix ngay trong SRS, không chờ đến build
46
+ - Nếu mode EDIT và validate FAIL: dùng `bmad-edit-prd` lần nữa để fix
47
+ - Ghi nhận validation result (PASS/FAIL + findings)
48
+
49
+ ### Bước 4 — Chuẩn hoá implement notes
27
50
  - Tạo implement notes bám SRS: module ảnh hưởng, ràng buộc kỹ thuật, rollout notes
28
51
  - Không viết code trong bước này
29
52
 
30
- ### Bước 4 — Lưu architecture decision (MemPalace)
53
+ ### Bước 5 — Lưu architecture decision (MemPalace)
31
54
  - Gọi `mcp__mempalace__mempalace_add_drawer` để lưu decision quan trọng
32
55
  - Nội dung: approach được chọn, lý do, alternatives đã bỏ qua
33
56
 
34
- ### Bước 5 — Output cho user
35
- Thông báo các file đã tạo:
36
-
57
+ ### Bước 6 — Output cho user
37
58
  ```
38
- ## Tài liệu đã tạo
59
+ ## Tài liệu đã tạo/cập nhật
39
60
 
40
61
  ### SRS
41
62
  - docs/project/srs/[feature].md
63
+ - Mode: [CREATE / EDIT]
64
+ - Validation: [PASS / FAIL — chi tiết nếu fail]
65
+ - Testcases impact: [None / Need re-run /vsaf-test]
42
66
 
43
67
  ### Architecture Decision
44
68
  - Đã lưu vào MemPalace
45
69
 
46
70
  ## Next step
47
71
  Chạy /vsaf-test docs/project/srs/[feature].md để sinh testcase
72
+ [Nếu EDIT và testcases cũ bị ảnh hưởng]: Re-run /vsaf-test bắt buộc
48
73
  ```
49
74
 
50
75
  ## Lưu ý
51
76
  - Không bắt đầu code trong bước này
52
77
  - Nếu scope quá lớn (>3 modules): đề nghị split thành nhiều PRs
53
78
  - Commit docs trước khi chuyển sang build: `git commit -m "docs: plan for <feature>"`
79
+ - Khi edit PRD: luôn check impact lên testcases đã sinh
@@ -0,0 +1,99 @@
1
+ ---
2
+ name: vsaf-docs
3
+ description: Documentation & knowledge sync — cập nhật docs, sinh project context, build wiki. Dùng sau /vsaf-ship hoặc cuối sprint để đảm bảo knowledge không bị mất.
4
+ ---
5
+
6
+ # VSAF Docs
7
+
8
+ ## Mục tiêu
9
+ Đảm bảo documentation luôn cập nhật, AI agents có đủ context, và knowledge không bị mất giữa các session/sprint.
10
+
11
+ ## Input
12
+ `$ARGUMENTS` — scope cần document:
13
+ - *(không có argument)* — full documentation refresh
14
+ - `<module>` — document module cụ thể
15
+ - `context` — chỉ sinh project-context.md
16
+ - `wiki` — chỉ build wiki
17
+
18
+ ## Khi nào dùng
19
+ - Sau mỗi sprint (batch update)
20
+ - Sau ship feature lớn (>3 modules thay đổi)
21
+ - Khi onboard team member mới
22
+ - Khi AI agent gặp khó hiểu codebase
23
+
24
+ ## Các bước thực hiện
25
+
26
+ ### Bước 1 — Scan current state
27
+ - Dùng `mcp__gitnexus__query` để scan codebase hiện tại
28
+ - Dùng `mcp__mempalace__mempalace_search` với "decision", "architecture", "pattern"
29
+ - So sánh: docs hiện tại vs code hiện tại — tìm docs lạc hậu
30
+
31
+ ### Bước 2 — Generate project documentation
32
+ - Dùng skill `bmad-document-project` để sinh/cập nhật project docs
33
+ - Output: mô tả architecture, module breakdown, API endpoints, data flows
34
+ - Lưu vào `docs/project/`
35
+
36
+ ### Bước 3 — Generate project context for AI
37
+ - Dùng skill `bmad-generate-project-context` để tạo `project-context.md`
38
+ - File này = instructions cho AI agents: conventions, patterns, do/don't
39
+ - Lưu tại root project
40
+
41
+ ### Bước 4 — Tech writing review
42
+ - Dùng skill `bmad-agent-tech-writer` (Paige) để review docs vừa sinh
43
+ - Paige sẽ: fix unclear sections, add missing context, ensure consistency
44
+
45
+ ### Bước 5 — Editorial polish
46
+ - Dùng skill `bmad-editorial-review-prose` — clean up writing quality
47
+ - Fix: passive voice, jargon, ambiguity, grammar
48
+ - Dùng skill `bmad-editorial-review-structure` — improve doc organization
49
+ - Fix: duplicated content, poor ordering, missing sections
50
+
51
+ ### Bước 6 — Distill for LLM consumption
52
+ - Dùng skill `bmad-distillator` với docs dài (>500 lines)
53
+ - Tạo phiên bản compressed — giữ nguyên thông tin, giảm token count
54
+ - Lưu distilled version cạnh original: `[name].distilled.md`
55
+
56
+ ### Bước 7 — Index all docs
57
+ - Dùng skill `bmad-index-docs` cho mỗi folder trong `docs/`
58
+ - Sinh/cập nhật `index.md` — mục lục tất cả files + mô tả ngắn
59
+
60
+ ### Bước 8 — Build knowledge graph wiki
61
+ - Chạy `/graphify . --wiki` để build agent-crawlable wiki từ codebase
62
+ - Output: `graphify-out/` — index.md + article per community
63
+ - Wiki này giúp AI agents navigate codebase nhanh hơn
64
+
65
+ ### Bước 9 — Sync to MemPalace
66
+ - Gọi `mcp__mempalace__mempalace_diary_write` ghi nhận:
67
+ - Docs nào đã cập nhật
68
+ - Stale docs nào đã xoá/replace
69
+ - New patterns/conventions đã document
70
+
71
+ ### Bước 10 — Output cho user
72
+ ```
73
+ ## Documentation Sync Complete
74
+
75
+ ### Updated
76
+ - Project docs: [N files updated]
77
+ - Project context: project-context.md [created/updated]
78
+ - Distilled docs: [N files compressed]
79
+ - Doc indexes: [N index.md files]
80
+ - Knowledge wiki: graphify-out/ [rebuilt]
81
+
82
+ ### Quality checks
83
+ - Prose review: PASS
84
+ - Structure review: PASS
85
+ - Stale docs found: [N — list]
86
+
87
+ ### Knowledge saved
88
+ - MemPalace diary: ✓
89
+
90
+ ### Next step
91
+ Documentation is current. Continue with /vsaf-plan or /vsaf-sprint.
92
+ ```
93
+
94
+ ## Lưu ý
95
+ - Flow này **không sửa code** — chỉ documentation
96
+ - Chạy ít nhất 1 lần mỗi sprint hoặc sau mỗi major ship
97
+ - Commit tất cả docs: `git commit -m "docs: sync documentation [sprint N]"`
98
+ - Nếu docs >1000 lines: luôn tạo distilled version
99
+
@@ -36,6 +36,8 @@ Hiểu đầy đủ yêu cầu, phân tích impact, và xác định chiến lư
36
36
  ### Bước 5 — Architecture decision (BMAD architect)
37
37
  - Dùng skill `bmad-agent-architect` để đề xuất architecture approach
38
38
  - So sánh alternatives, chọn approach phù hợp nhất
39
+ - **Nếu risk HIGH hoặc > 3 modules**: dùng skill `bmad-create-architecture` để tạo ADR (Architecture Decision Record) chính thức
40
+ - Lưu vào `docs/project/planning-artifacts/adr-[feature].md`
39
41
 
40
42
  ### Bước 6 — Brainstorm (BMAD Brainstorming)
41
43
  - Dùng skill `bmad-brainstorming` để explore alternatives và uncover hidden risks
@@ -44,7 +46,13 @@ Hiểu đầy đủ yêu cầu, phân tích impact, và xác định chiến lư
44
46
  - Mục tiêu: tối thiểu 20 ý tưởng/alternatives trước khi tổ chức lại
45
47
  - bmad-brainstorming sẽ load config từ `_bmad/bmm/config.yaml`
46
48
 
47
- ### Bước 7 — Output cho user
49
+ ### Bước 7 — Challenge approach (BMAD Advanced Elicitation)
50
+ - Dùng skill `bmad-advanced-elicitation` để challenge approach đã chọn
51
+ - Chạy **pre-mortem**: "Giả sử approach này fail sau 3 tháng — vì sao?"
52
+ - Chạy **red team**: tìm điểm yếu, attack vectors, failure modes
53
+ - Nếu phát hiện risk nghiêm trọng: quay lại Bước 5 để điều chỉnh approach
54
+
55
+ ### Bước 8 — Output cho user
48
56
  Trình bày kết quả theo format:
49
57
 
50
58
  ```
@@ -62,9 +70,15 @@ Trình bày kết quả theo format:
62
70
  ## Approach được chọn
63
71
  [Mô tả architecture approach]
64
72
 
73
+ ## Pre-mortem findings
74
+ [Những risk đã identify và mitigation plan]
75
+
65
76
  ## Alternatives đã xem xét
66
77
  [Tại sao không chọn]
67
78
 
79
+ ## ADR
80
+ [Đã tạo / Không cần (risk LOW)]
81
+
68
82
  ## Next step
69
83
  Chạy /vsaf-doc để viết tài liệu plan
70
84
  ```
@@ -14,47 +14,78 @@ description: Review 2 lớp, ship code, và ghi lại knowledge vào bộ nhớ.
14
14
 
15
15
  ## Các bước thực hiện
16
16
 
17
- ### Bước 1 — Review Layer 1: Methodology (Superpowers)
18
- - Dùng skill `superpowers:code-review`
17
+ ### Bước 1 — Review Layer 1: Code Review
18
+ - **Nếu Superpowers**:
19
+ - Dùng `superpowers:code-review` — review code against plan, standards, architecture
20
+ - Dùng `superpowers:verification-before-completion` — đảm bảo không bỏ sót verification step
21
+ - **Nếu không có Superpowers**: dùng skill `bmad-code-review` (đã có sẵn trong bộ cài)
19
22
  - Kiểm tra: code structure, naming, patterns, SOLID principles
20
23
  - Fix issues nếu có, commit lại
21
24
 
22
- ### Bước 2 — Review Layer 2: Knowledge graph sync
25
+ ### Bước 2 — Review Layer 1.5: Adversarial Review
26
+ - Dùng skill `bmad-review-adversarial-general` — cynical attack trên code mới
27
+ - Tìm: logic flaws, security holes, performance traps, silent failures
28
+ - Dùng skill `bmad-review-edge-case-hunter` — exhaustive boundary analysis
29
+ - Tìm: unhandled null/empty, off-by-one, concurrent access, resource leaks
30
+ - Triage findings:
31
+ - **MUST FIX**: fix ngay trước khi ship
32
+ - **SHOULD FIX**: tạo follow-up task
33
+ - **NOTED**: ghi nhận, không cần action
34
+
35
+ ### Bước 3 — Review Layer 2: Knowledge graph sync
23
36
  - Chạy `gitnexus analyze` để cập nhật call graph
24
37
  - Hoặc: `vsaf index`
25
38
  - Đây là layer cuối cùng — đảm bảo index reflect đúng code mới
26
39
 
27
- ### Bước 3Ghi nhớ vào MemPalace
40
+ ### Bước 4Pre-PR checklist
41
+ - **Nếu có Superpowers**: dùng `superpowers:finishing-a-development-branch` — chạy pre-PR checklist tự động
42
+ - **Nếu không**: kiểm tra thủ công: tests pass, no uncommitted changes, branch up-to-date
43
+
44
+ ### Bước 5 — Ghi nhớ vào MemPalace
28
45
  - Gọi `mcp__mempalace__mempalace_add_drawer` để lưu decisions quan trọng từ feature này
29
46
  - Gọi `mcp__mempalace__mempalace_diary_write` để ghi lại session summary
47
+ - Bao gồm: adversarial findings, lessons learned, follow-up tasks
30
48
 
31
- ### Bước 4 — Push PR
49
+ ### Bước 6 — Push PR
32
50
  ```bash
33
51
  git push origin feature/<name>
34
52
  ```
35
53
  PR description phải bao gồm:
36
54
  - Impact summary (từ GitNexus)
37
55
  - Test results summary
56
+ - Adversarial review summary (MUST FIX: 0, SHOULD FIX: N)
57
+
58
+ ### Bước 7 — Retrospective (sau mỗi epic hoặc khi user yêu cầu)
59
+ - **Nếu đây là feature cuối cùng của epic**: dùng skill `bmad-retrospective`
60
+ - Review: gì đã tốt? gì cần cải thiện? surprise nào?
61
+ - Output: lessons learned → lưu vào MemPalace
62
+ - Cập nhật workflow nếu cần
63
+ - **Nếu không phải cuối epic**: skip, nhắc user chạy retro sau khi epic hoàn thành
38
64
 
39
- ### Bước 5 — Output cho user
65
+ ### Bước 8 — Output cho user
40
66
  ```
41
67
  ## Ship Complete: [feature]
42
68
 
43
69
  ### Reviews
44
- - Layer 1 (Methodology): PASS
45
- - Layer 2 (Graph sync): PASS
70
+ - Layer 1 (Code Review): PASS [superpowers / bmad-code-review]
71
+ - Layer 1.5 (Adversarial): PASS [MUST FIX: 0, SHOULD FIX: N, NOTED: N]
72
+ - Layer 2 (Graph sync): PASS
73
+ - Pre-PR checklist: PASS
46
74
 
47
75
  ### Knowledge saved
48
76
  - Diary entry: ✓
49
77
  - Decisions: [X entries]
78
+ - Follow-up tasks: [N items]
50
79
 
51
80
  ### PR
52
81
  - Branch: feature/[name]
53
82
  - PR: [link]
54
83
 
55
84
  Workflow hoàn tất. Chạy /vsaf-plan <next-feature> cho task tiếp theo.
85
+ [Nếu cuối epic]: Retrospective đã chạy — lessons saved to MemPalace.
56
86
  ```
57
87
 
58
88
  ## Lưu ý
59
- - Không ship nếu bất kỳ layer review nào fail
89
+ - Không ship nếu bất kỳ layer review nào fail hoặc còn MUST FIX
60
90
  - `vsaf mine` — chạy weekly, không phải mỗi feature
91
+ - Retrospective: chạy sau mỗi epic (3-5 features), không phải mỗi feature
@@ -0,0 +1,120 @@
1
+ ---
2
+ name: vsaf-sprint
3
+ description: Sprint management — break PRD thành epics/stories, lập sprint plan, tracking progress. Dùng khi cần quản lý nhiều features cùng lúc.
4
+ ---
5
+
6
+ # VSAF Sprint
7
+
8
+ ## Mục tiêu
9
+ Quản lý backlog và sprint cho dự án — từ PRD/SRS chia thành stories, lập plan, track progress, surface risks.
10
+
11
+ ## Input
12
+ `$ARGUMENTS` — hành động cần làm:
13
+ - `plan` — lập sprint plan mới từ PRD/epics
14
+ - `status` — xem trạng thái sprint hiện tại
15
+ - `story <id>` — tạo story file chi tiết cho 1 story
16
+
17
+ ## Khi nào dùng
18
+ - Sau `/vsaf-discover` khi đã có PRD
19
+ - Khi dự án có nhiều features cần ưu tiên
20
+ - Khi cần visibility vào progress tổng thể
21
+
22
+ ## Các bước thực hiện
23
+
24
+ ### Mode: `plan` — Lập sprint plan mới
25
+
26
+ #### Bước 1 — Search MemPalace
27
+ - Gọi `mcp__mempalace__mempalace_search` với "sprint", "velocity", "capacity"
28
+ - Kiểm tra: sprint cũ có lessons learned gì? Velocity ước lượng bao nhiêu?
29
+
30
+ #### Bước 2 — Break thành Epics + Stories
31
+ - Dùng skill `bmad-create-epics-and-stories` với PRD/SRS làm input
32
+ - Output: danh sách epics, mỗi epic chứa user stories
33
+ - Mỗi story có: description, acceptance criteria, estimated complexity (S/M/L/XL)
34
+
35
+ #### Bước 3 — Sprint Planning
36
+ - Dùng skill `bmad-sprint-planning` để:
37
+ - Ưu tiên stories (MoSCoW hoặc WSJF)
38
+ - Assign stories vào sprint dựa trên capacity
39
+ - Identify dependencies giữa stories
40
+ - Lưu sprint plan vào `docs/project/planning-artifacts/sprint-plan.md`
41
+
42
+ #### Bước 4 — Lưu vào MemPalace
43
+ - Gọi `mcp__mempalace__mempalace_add_drawer` để lưu sprint decisions
44
+ - Nội dung: priorities, trade-offs, deferred items
45
+
46
+ #### Bước 5 — Output
47
+ ```
48
+ ## Sprint Plan: [sprint name/number]
49
+
50
+ ### Capacity: [X story points / N stories]
51
+
52
+ ### Stories in sprint
53
+ | # | Story | Epic | Size | Priority | Depends on |
54
+ |---|-------|------|------|----------|------------|
55
+ | 1 | ... | ... | M | MUST | - |
56
+ | 2 | ... | ... | L | MUST | #1 |
57
+
58
+ ### Deferred to next sprint
59
+ | Story | Reason |
60
+ |-------|--------|
61
+
62
+ ### Next step
63
+ Chạy /vsaf-sprint story <id> để tạo story file chi tiết
64
+ Hoặc: /vsaf-plan <story description> để bắt đầu feature đầu tiên
65
+ ```
66
+
67
+ ---
68
+
69
+ ### Mode: `status` — Xem trạng thái sprint
70
+
71
+ #### Bước 1 — Collect status
72
+ - Dùng skill `bmad-sprint-status` để:
73
+ - Scan sprint plan file
74
+ - Check git log cho completed stories
75
+ - Surface: blocked items, risks, velocity trend
76
+
77
+ #### Bước 2 — Output
78
+ ```
79
+ ## Sprint Status: [sprint name]
80
+
81
+ ### Progress: [X/Y stories done] ([Z%])
82
+ ### Burndown: [on track / behind / ahead]
83
+
84
+ ### Completed
85
+ - [x] Story #1: ...
86
+ - [x] Story #2: ...
87
+
88
+ ### In Progress
89
+ - [ ] Story #3: ... (blocked by: ...)
90
+
91
+ ### Risks
92
+ - [risk description + mitigation]
93
+
94
+ ### Recommendation
95
+ [Continue / adjust scope / escalate]
96
+ ```
97
+
98
+ ---
99
+
100
+ ### Mode: `story <id>` — Tạo story file chi tiết
101
+
102
+ #### Bước 1 — Tạo story file
103
+ - Dùng skill `bmad-create-story` với story ID từ sprint plan
104
+ - Story file bao gồm: full context, acceptance criteria, technical notes, dependencies
105
+ - Lưu vào `docs/project/planning-artifacts/stories/story-[id].md`
106
+
107
+ #### Bước 2 — Output
108
+ ```
109
+ ## Story Created: [story title]
110
+ - File: docs/project/planning-artifacts/stories/story-[id].md
111
+
112
+ ### Next step
113
+ Chạy /vsaf-plan <story description> để plan implementation
114
+ ```
115
+
116
+ ## Lưu ý
117
+ - Sprint plan là living document — cập nhật khi có thay đổi
118
+ - Re-run `/vsaf-sprint status` hàng ngày hoặc sau mỗi `/vsaf-ship`
119
+ - Nếu sprint bị delay >20%: dùng `bmad-correct-course` để điều chỉnh scope
120
+
@@ -19,16 +19,22 @@ Tạo tài liệu testcase coverage đầy đủ từ SRS để làm contract ch
19
19
  - Test cases phải cover: happy path, edge cases, error cases, NFRs
20
20
  - Nguồn gốc: từ FRs/NFRs trong SRS — KHÔNG dựa trên implementation
21
21
 
22
- ### Bước 2 — Đối chiếu coverage
22
+ ### Bước 2 — Hunt edge cases (BMAD edge case hunter)
23
+ - Dùng skill `bmad-review-edge-case-hunter` với SRS + testcases đã sinh
24
+ - Tìm: boundary conditions, race conditions, empty/null inputs, overflow, concurrent access
25
+ - Bổ sung test cases cho mọi edge case chưa cover
26
+ - Mục tiêu: không có unhandled edge case nào lọt qua
27
+
28
+ ### Bước 3 — Đối chiếu coverage
23
29
  - So sánh test cases với FR/NFR trong SRS
24
30
  - Mỗi FR/NFR phải có ít nhất 1 test case tương ứng
25
31
  - Ghi nhận gaps nếu có
26
32
 
27
- ### Bước 3 — Xuất traceability matrix
33
+ ### Bước 4 — Xuất traceability matrix
28
34
  - Tạo bảng mapping `FR/NFR -> Testcase ID`
29
35
  - Mỗi testcase có: input, expected output, pass/fail criteria
30
36
 
31
- ### Bước 4 — Lưu tài liệu testcase
37
+ ### Bước 5 — Lưu tài liệu testcase
32
38
  - Lưu testcase vào `docs/project/testcases/[feature].md`
33
39
  - Format:
34
40
 
@@ -47,12 +53,28 @@ Tạo tài liệu testcase coverage đầy đủ từ SRS để làm contract ch
47
53
  | ... | ... | ... | [ ] |
48
54
  ```
49
55
 
50
- ### Bước 5Output cho user
51
- - Trả về đường dẫn file testcase + coverage summary theo FR/NFR
52
- - Nêu gaps cần bổ sung trước khi build
56
+ ### Bước 6Implementation readiness gate (BMAD)
57
+ - Dùng skill `bmad-check-implementation-readiness` để validate toàn bộ artifacts
58
+ - Kiểm tra: SRS đầy đủ? Testcases cover hết FRs/NFRs? Architecture align?
59
+ - Nếu **PASS**: hiển thị `✓ Implementation ready — proceed to /vsaf-build`
60
+ - Nếu **FAIL**: liệt kê gaps cần fix trước khi build, KHÔNG cho tiếp
61
+
62
+ ### Bước 7 — Output cho user
63
+ ```
64
+ ## Testcase Summary: [feature]
65
+
66
+ - Total test cases: [N]
67
+ - FR/NFR coverage: [X/Y] ([%])
68
+ - Edge cases found by hunter: [N]
69
+ - Implementation readiness: [PASS / FAIL]
70
+
71
+ Files:
72
+ - docs/project/testcases/[feature].md
53
73
 
54
74
  ## Next step
55
- Chạy `/vsaf-build <path/to/srs> <path/to/testcases>` để implement theo testcase đã chuẩn hoá.
75
+ [Nếu PASS]: Chạy /vsaf-build <path/to/srs> <path/to/testcases>
76
+ [Nếu FAIL]: Fix gaps listed above, then re-run /vsaf-test
77
+ ```
56
78
 
57
79
  ## Lưu ý
58
80
  - Không đánh dấu implementation done ở bước này