@ngocsangairvds/vsaf 3.0.12 → 3.1.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.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: vsaf-retro
3
+ description: Sprint/epic retrospective — data-backed, not opinion-based. Uses GitNexus metrics + BMAD retrospective. Run at end of sprint or end of epic.
4
+ ---
5
+
6
+ # VSAF Retro
7
+
8
+ ## Objective
9
+ Run a retrospective based on real data from GitNexus (changes, health, module status) combined with the BMAD retrospective framework. Output: action items for the next sprint.
10
+
11
+ ## When to run
12
+ - End of each sprint
13
+ - End of each epic
14
+ - **Separate from `/vsaf-ship`** — retro reviews the entire sprint/epic, not a single feature
15
+
16
+ ## Prerequisites
17
+ - Sprint/epic has been completed (all features shipped or deferred)
18
+ - GitNexus index is up to date (`vsaf index`)
19
+
20
+ ## Steps
21
+
22
+ ### Step 1 — Collect sprint changes (GitNexus)
23
+ - Run `gitnexus_detect_changes({scope: "compare", base_ref: "<sprint-start-tag>"})`
24
+ - If no sprint tag exists: use `base_ref: "main"` or the commit hash from the start of the sprint
25
+ - Collect: total files changed, symbols changed, processes affected
26
+ - Record actual scope vs planned scope
27
+
28
+ ### Step 2 — Codebase health metrics (GitNexus)
29
+ - Read `gitnexus://repo/{name}/context` — get health metrics after the sprint:
30
+ - Codebase size, complexity trends
31
+ - Index freshness
32
+ - Symbol/relationship counts
33
+ - Compare with the start of the sprint if a baseline exists
34
+
35
+ ### Step 3 — Module health check (GitNexus)
36
+ - Run `gitnexus_group_status` — check health of each module
37
+ - Identify: which modules degraded during the sprint? Which modules improved?
38
+ - Flag: modules with increased technical debt, modules needing attention
39
+
40
+ ### Step 4 — Retrospective analysis (BMAD)
41
+ - Use skill `bmad-retrospective` with data from Steps 1-3 as input
42
+ - Framework: What went well / What to improve / Action items
43
+ - Data-backed: each observation must have evidence from GitNexus metrics
44
+ - Do not accept vague statements — must have data support
45
+
46
+ ### Step 5 — Sprint metrics summary (BMAD)
47
+ - Use skill `bmad-sprint-status` to compile final sprint metrics
48
+ - Metrics: velocity, completion rate, scope change ratio
49
+ - Compare with previous sprint if historical data is available
50
+
51
+ ### Step 6 — Output for user
52
+ ```
53
+ ## Sprint Retrospective: [sprint name/number]
54
+ Date: [YYYY-MM-DD]
55
+
56
+ ### Sprint Scope
57
+ - Planned: [N features/stories]
58
+ - Completed: [N]
59
+ - Deferred: [N]
60
+ - Scope change: [+N/-N]
61
+
62
+ ### Codebase Impact (from GitNexus)
63
+ - Files changed: [N]
64
+ - Symbols changed: [N]
65
+ - Processes affected: [N]
66
+ - Modules touched: [list]
67
+
68
+ ### Module Health
69
+ | Module | Status | Trend | Notes |
70
+ |--------|--------|-------|-------|
71
+ | ... | ... | ↑/↓/→ | ... |
72
+
73
+ ### What Went Well (data-backed)
74
+ - [observation] — evidence: [metric/data]
75
+
76
+ ### What To Improve (data-backed)
77
+ - [observation] — evidence: [metric/data]
78
+
79
+ ### Action Items for Next Sprint
80
+ | # | Action | Owner | Priority |
81
+ |---|--------|-------|----------|
82
+ | 1 | ... | ... | ... |
83
+
84
+ ### Sprint Metrics
85
+ - Velocity: [points/tasks]
86
+ - Completion rate: [%]
87
+ - Avg cycle time: [days]
88
+ ```
89
+
90
+ ## Notes
91
+ - Retro must be data-backed — do not accept "I feel like..." without evidence
92
+ - If GitNexus index is stale: run `vsaf index` before the retro
93
+ - Action items must be actionable and have an owner — do not write vague "improve testing"
94
+ - Save retro output to `docs/project/implementation-artifacts/retro-[sprint].md` to track historical data
@@ -1,91 +1,111 @@
1
1
  ---
2
2
  name: vsaf-ship
3
- description: Review 2 lớp, ship code, ghi lại knowledge vào bộ nhớ. Dùng sau /vsaf-build khi code + tests đã pass. Bước cuối cùng của mọi feature.
3
+ description: Multi-layer review + ship code. Used after /vsaf-build and /vsaf-test run when code + tests have passed. The final step of every feature.
4
4
  ---
5
5
 
6
6
  # VSAF Ship
7
7
 
8
- ## Mục tiêu
9
- Đảm bảo code chất lượng, đóng gói feature, ghi lại toàn bộ knowledge để các session sau kế thừa được.
10
-
11
- ## Điều kiện tiên quyết
12
- - Đã chạy `/vsaf-build` với SRS + testcase
13
- - Không failing tests
14
-
15
- ## Các bước thực hiện
16
-
17
- ### Bước 1 — Review Layer 1: Code Review
18
- - **Nếu có 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 Superpowers**: dùng skill `bmad-code-review` (đã có sẵn trong bộ cài)
22
- - Kiểm tra: code structure, naming, patterns, SOLID principles
23
- - Fix issues nếu có, commit lại
24
-
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
8
+ ## Objective
9
+ Multi-layer review, verify scope, validate architecture, push PR. Ensure code has passed all gates before shipping.
10
+
11
+ ## Prerequisites
12
+ - Have run `/vsaf-build` with PRD + SRS + testcase
13
+ - Have run `/vsaf-test run` — results file exists at `docs/project/testcases/[feature]-results.md`
14
+ - Ship gate from `/vsaf-test run` = PASS
15
+ - No failing tests
16
+
17
+ ## Steps
18
+
19
+ ### Step 0Scope check (GitNexus, mandatory)
20
+ - Run `gitnexus_detect_changes({scope: "compare", base_ref: "main"})`
21
+ - Confirm only the expected files/symbols have changed
22
+ - If unexpected changes are detected: **STOP** review before proceeding
23
+
24
+ ### Step 1 — Structured review handoff (Superpowers)
25
+ - Use `superpowers:requesting-code-review` to create a structured handoff:
26
+ - What changed and why
27
+ - What to watch for (risk areas)
28
+ - Context for the reviewer
29
+ - This handoff is the input for the subsequent review layers
30
+
31
+ ### Step 2 — Review Layer 1: Code Review
32
+ - **If Superpowers is available**: use `superpowers:code-review`
33
+ - **If not**: use skill `bmad-code-review`
34
+ - Check: code structure, naming, patterns, SOLID principles
35
+ - Fix issues if any, re-commit
36
+
37
+ #### Step 2b — Handle reviewer feedback (if any)
38
+ - If the review has feedback that needs to be addressed:
39
+ - Use `superpowers:receiving-code-review` — systematic response, no ad-hoc fixes
40
+ - Fix → re-commit → re-review if needed
41
+
42
+ ### Step 3 — Review Layer 1.5: Adversarial Review
43
+ - Use skill `bmad-review-adversarial-general` — cynical attack on new code
44
+ - Look for: logic flaws, security holes, performance traps, silent failures
45
+ - Use skill `bmad-review-edge-case-hunter` — exhaustive boundary analysis
46
+ - Look for: unhandled null/empty, off-by-one, concurrent access, resource leaks
30
47
  - 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 3Review Layer 2: Knowledge graph sync
36
- - Chạy `gitnexus analyze` để cập nhật call graph
37
- - Hoặc: `vsaf index`
38
- - Đây là layer cuối cùng — đảm bảo index reflect đúng code mới
39
-
40
- ### Bước 4 Pre-PR checklist
41
- - **Nếu 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 5Ghi nhớ vào MemPalace
45
- - Gọi `mcp__mempalace__mempalace_add_drawer` để lưu decisions quan trọng từ feature này
46
- - Gọi `mcp__mempalace__mempalace_diary_write` để ghi lại session summary
47
- - Bao gồm: adversarial findings, lessons learned, follow-up tasks
48
-
49
- ### Bước 6Push PR
48
+ - **MUST FIX**: fix immediately before shipping
49
+ - **SHOULD FIX**: create a follow-up task
50
+ - **NOTED**: acknowledged, no action needed
51
+
52
+ ### Step 4Architectural constraint check (GitNexus)
53
+ - Run `gitnexus_shape_check` validate no architectural constraints are violated
54
+ - If there are violations: **STOP** — fix before proceeding
55
+
56
+ ### Step 5 — Review Layer 2: Knowledge graph sync
57
+ - Run `vsaf index` (= `gitnexus analyze`)
58
+ - Update the call graph to reflect the new code
59
+ - This is the final layer ensure the index accurately reflects the current code state
60
+
61
+ ### Step 6Final verification gate (Superpowers)
62
+ - Use `superpowers:verification-before-completion`
63
+ - Confirm all deliverables match the spec — not just "tests pass"
64
+ - This is the final gate before PR
65
+
66
+ ### Step 7Pre-PR checklist (Superpowers)
67
+ - **If Superpowers is available**: use `superpowers:finishing-a-development-branch` — automated pre-PR checklist
68
+ - **If not**: check manually:
69
+ - [ ] Tests pass
70
+ - [ ] No uncommitted changes
71
+ - [ ] Branch up-to-date with main
72
+ - [ ] Test results file exists
73
+ - [ ] All MUST FIX resolved
74
+
75
+ ### Step 8 — Push PR
50
76
  ```bash
51
77
  git push origin feature/<name>
52
78
  ```
53
- PR description phải bao gồm:
54
- - Impact summary (từ GitNexus)
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 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
64
-
65
- ### Bước 8 — Output cho user
79
+ PR description must include:
80
+ - Impact summary (from GitNexus detect_changes)
81
+ - Test results file path: `docs/project/testcases/[feature]-results.md`
82
+ - Adversarial triage: MUST FIX: 0, SHOULD FIX: N, NOTED: N
83
+ - Shape check result
84
+
85
+ ### Step 9 Output to user
66
86
  ```
67
87
  ## Ship Complete: [feature]
68
88
 
69
89
  ### Reviews
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
74
-
75
- ### Knowledge saved
76
- - Diary entry:
77
- - Decisions: [X entries]
78
- - Follow-up tasks: [N items]
90
+ - Scope check (detect_changes): PASS [N files, N symbols changed]
91
+ - Layer 1 (Code Review): PASS [superpowers / bmad-code-review]
92
+ - Layer 1.5 (Adversarial): PASS [MUST FIX: 0, SHOULD FIX: N, NOTED: N]
93
+ - Shape check: PASS
94
+ - Layer 2 (Graph sync): PASS
95
+ - Final verification: PASS
96
+ - Pre-PR checklist: PASS
79
97
 
80
98
  ### PR
81
99
  - Branch: feature/[name]
82
100
  - PR: [link]
101
+ - Test results: docs/project/testcases/[feature]-results.md
83
102
 
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.
103
+ ## Next step
104
+ - Run /vsaf-retro if this is the end of a sprint/epic
105
+ - Or /vsaf-plan <next-feature> for the next task
86
106
  ```
87
107
 
88
- ## Lưu ý
89
- - Không ship nếu bất kỳ layer review nào fail hoặc còn MUST FIX
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
108
+ ## Notes
109
+ - Do not ship if any gate fails or there are remaining MUST FIX items
110
+ - Test results file is a mandatory input no results = no ship
111
+ - Retrospective is a separate skill (`/vsaf-retro`) — run at the end of a sprint, not at the end of every feature
@@ -1,49 +1,41 @@
1
1
  ---
2
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.
3
+ description: Sprint management — break PRD into epics/stories, create sprint plan, track progress. Use when managing multiple features simultaneously.
4
4
  ---
5
5
 
6
6
  # VSAF Sprint
7
7
 
8
- ## Mục tiêu
9
- Quản backlog sprint cho dự ántừ PRD/SRS chia thành stories, lập plan, track progress, surface risks.
8
+ ## Goal
9
+ Manage backlog and sprints for the projectbreak PRD/SRS into stories, create plans, track progress, surface risks.
10
10
 
11
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
12
+ `$ARGUMENTS` — action to perform:
13
+ - `plan` — create a new sprint plan from PRD/epics
14
+ - `status` — view current sprint status
15
+ - `story <id>` — create a detailed story file for a single story
16
16
 
17
- ## Khi nào dùng
18
- - Sau `/vsaf-discover` khi đã PRD
19
- - Khi dự án nhiều features cần ưu tiên
20
- - Khi cần visibility vào progress tổng thể
17
+ ## When to use
18
+ - After `/vsaf-discover` when a PRD is available
19
+ - When the project has multiple features that need prioritization
20
+ - When visibility into overall progress is needed
21
21
 
22
- ## Các bước thực hiện
22
+ ## Steps
23
23
 
24
- ### Mode: `plan` — Lập sprint plan mới
24
+ ### Mode: `plan` — Create a new sprint plan
25
25
 
26
- #### Bước 1 — Search MemPalace
27
- - Gọi `mcp__mempalace__mempalace_search` với "sprint", "velocity", "capacity"
28
- - Kiểm tra: sprint lessons learned gì? Velocity ước lượng bao nhiêu?
26
+ #### Step 1 — Break into Epics + Stories
27
+ - Use skill `bmad-create-epics-and-stories` with PRD/SRS as input
28
+ - Output: list of epics, each epic containing user stories
29
+ - Each story has: description, acceptance criteria, estimated complexity (S/M/L/XL)
29
30
 
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)
31
+ #### Step 2 — Sprint Planning
32
+ - Use skill `bmad-sprint-planning` to:
33
+ - Prioritize stories (MoSCoW or WSJF)
34
+ - Assign stories to sprint based on capacity
35
+ - Identify dependencies between stories
36
+ - Save sprint plan to `docs/project/planning-artifacts/sprint-plan.md`
34
37
 
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
38
+ #### Step 3 — Output
47
39
  ```
48
40
  ## Sprint Plan: [sprint name/number]
49
41
 
@@ -60,21 +52,21 @@ Quản lý backlog và sprint cho dự án — từ PRD/SRS chia thành stories,
60
52
  |-------|--------|
61
53
 
62
54
  ### 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
55
+ Run /vsaf-sprint story <id> to create a detailed story file
56
+ Or: /vsaf-plan <story description> to start the first feature
65
57
  ```
66
58
 
67
59
  ---
68
60
 
69
- ### Mode: `status` — Xem trạng thái sprint
61
+ ### Mode: `status` — View sprint status
70
62
 
71
- #### Bước 1 — Collect status
72
- - Dùng skill `bmad-sprint-status` để:
63
+ #### Step 1 — Collect status
64
+ - Use skill `bmad-sprint-status` to:
73
65
  - Scan sprint plan file
74
- - Check git log cho completed stories
66
+ - Check git log for completed stories
75
67
  - Surface: blocked items, risks, velocity trend
76
68
 
77
- #### Bước 2 — Output
69
+ #### Step 2 — Output
78
70
  ```
79
71
  ## Sprint Status: [sprint name]
80
72
 
@@ -97,24 +89,23 @@ Hoặc: /vsaf-plan <story description> để bắt đầu feature đầu tiên
97
89
 
98
90
  ---
99
91
 
100
- ### Mode: `story <id>` — Tạo story file chi tiết
92
+ ### Mode: `story <id>` — Create a detailed story file
101
93
 
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`
94
+ #### Step 1 — Create story file
95
+ - Use skill `bmad-create-story` with story ID from the sprint plan
96
+ - Story file includes: full context, acceptance criteria, technical notes, dependencies
97
+ - Save to `docs/project/planning-artifacts/stories/story-[id].md`
106
98
 
107
- #### Bước 2 — Output
99
+ #### Step 2 — Output
108
100
  ```
109
101
  ## Story Created: [story title]
110
102
  - File: docs/project/planning-artifacts/stories/story-[id].md
111
103
 
112
104
  ### Next step
113
- Chạy /vsaf-plan <story description> để plan implementation
105
+ Run /vsaf-plan <story description> to plan implementation
114
106
  ```
115
107
 
116
- ## Lưu ý
117
- - Sprint plan 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
-
108
+ ## Notes
109
+ - Sprint plan is a living document — update when changes occur
110
+ - Re-run `/vsaf-sprint status` daily or after each `/vsaf-ship`
111
+ - If sprint is delayed >20%: use `bmad-correct-course` to adjust scope