@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,169 @@
1
+ ---
2
+ name: vsaf-doc-srs
3
+ description: Write SRS (Software Requirements Specification) from an existing PRD. Use after /vsaf-doc-prd. Follows standard BA workflow with feature-level SRS template.
4
+ ---
5
+
6
+ # VSAF Doc SRS
7
+
8
+ ## Goal
9
+ Analyze the PRD and write a feature-level SRS following a standard template — ensuring traceability from PRD → Use Cases → Screens → Epic/Story.
10
+
11
+ **Your Role:** Professional Business Analyst — write SRS following a standard process.
12
+
13
+ ## Prerequisites
14
+ - Must have run `/vsaf-doc-prd` and have an approved PRD before running this skill.
15
+
16
+ ## Configuration
17
+ ```yaml
18
+ outputDir: docs/project/srs
19
+ featureTemplate: _bmad/bmm/1-analysis/bmad-document-project/templates/srs-feature-template.md
20
+ systemTemplate: _bmad/bmm/1-analysis/bmad-document-project/templates/srs-system-template.md
21
+ ```
22
+
23
+ ## Steps
24
+
25
+ ### Step 0 — Validate inputs
26
+
27
+ Before starting, check if the user has provided sufficient information:
28
+
29
+ **Required:**
30
+ - [ ] PRD document (file path or content) — typically at `docs/project/planning-artifacts/prd-[feature].md`
31
+ - [ ] Figma link (URL figma.com/design/...) — if available
32
+
33
+ If PRD is missing, **stop immediately** and request from the user:
34
+
35
+ ```
36
+ To write the SRS document, I need you to provide:
37
+
38
+ [list what is missing]
39
+
40
+ Please provide:
41
+ 1. PRD file: file path or paste the content here
42
+ 2. Figma link (if available): URL like https://www.figma.com/design/...
43
+ 3. Flow/Feature to write SRS for (e.g., FR-1, FR-2,...)
44
+ ```
45
+
46
+ Only continue when the PRD is available.
47
+
48
+ ---
49
+
50
+ ### Step 1 — Determine mode: Create or Edit
51
+ - Check if an SRS already exists in `docs/project/srs/` for this feature
52
+ - **If none exists** → Mode: CREATE
53
+ - **If one exists** → Mode: EDIT
54
+ - Ask user: "An SRS already exists. Do you want to create a new one from scratch or edit the existing one?"
55
+ - Mode EDIT: use skill `bmad-edit-prd` to edit the existing SRS
56
+
57
+ ---
58
+
59
+ ### Step 2 — Read & analyze PRD
60
+
61
+ Read the entire PRD document. Extract and organize information into the following structure:
62
+
63
+ **2.1 Project objectives**
64
+ - Business objective, Problem statement, Success criteria
65
+
66
+ **2.2 Scope**
67
+ - In-scope features / Sub-FRs, Out-of-scope, Main modules/screens
68
+
69
+ **2.3 Actors & Use Cases**
70
+ - List of actors (user roles), User stories / use cases mentioned
71
+
72
+ **2.4 Business Rules**
73
+ - Key business rules, Constraints & assumptions
74
+
75
+ **2.5 Non-functional Requirements**
76
+ - Performance, security, scalability, etc. (if applicable)
77
+
78
+ After this step, output a **"PRD Summary"** for user confirmation before proceeding to step 3.
79
+
80
+ ---
81
+
82
+ ### Step 3 — Compare PRD with Figma (if Figma is available)
83
+
84
+ If a Figma link is available, use Figma MCP tools to read the design:
85
+ 1. Call `get_figma_data` to get the list of pages/frames
86
+ 2. Download screenshots for each main screen
87
+
88
+ Compare and record:
89
+
90
+ | Item | PRD states | Figma design | Status |
91
+ |---|---|---|---|
92
+ | [Feature/Screen] | ... | ... | Matched / Discrepancy / Unclear |
93
+
94
+ **Gap analysis:**
95
+ - **Gap 1 — Missing in Figma:** Features in PRD but not found in the design
96
+ - **Gap 2 — Added in Figma:** UI elements in Figma but not mentioned in the PRD
97
+ - **Gap 3 — Conflicts:** Inconsistent information between the two sources
98
+
99
+ If no Figma: note "No Figma design available — UX team needs to provide" in section 2 of the SRS.
100
+
101
+ After this step, output a **"Gap Analysis Report"** and ask the user if they want to clarify any gaps before writing the SRS.
102
+
103
+ ---
104
+
105
+ ### Step 4 — Write SRS following the Feature Template
106
+
107
+ Read the template at `_bmad/bmm/1-analysis/bmad-document-project/templates/srs-feature-template.md` and write the SRS **strictly following the template structure**, including all 12 sections (0-11):
108
+
109
+ 0. **Preamble** — Document information, change log table, approval table
110
+ 1. **Introduction** — Objectives, scope, reference documents
111
+ 2. **Business Context** — Business objective, actors, use cases overview
112
+ 3. **System Overview** — High-Level Activity Diagram + Architecture
113
+ 4. **Data Model** — Entity tables, ER diagram, Kafka Events, API Endpoints
114
+ 5. **Functional Requirements** — Detailed Use Case specifications. Each UC includes:
115
+ - **Screens** — Detailed controls table for each screen in the UC
116
+ - **Business flows** — Sequence diagram (PlantUML) + Activity diagram (PlantUML, if needed)
117
+ - Shared screens: place the full table at the first UC, subsequent UCs reference it
118
+ 6. **State & Behavioral Models** — State diagrams (Mermaid stateDiagram-v2), entity lifecycle
119
+ 7. **Business Rules & Validation** — BR table + Validation Rules + Error Codes
120
+ 8. **NFR** — Non-functional requirements specific to the flow
121
+ 9. **Constraints** — Constraints, assumptions, dependencies, transition requirements
122
+ 10. **RTM** — Requirements Traceability Matrix: PRD FR → UC → Screen → Epic/Story → BR → AC → Test Case
123
+ 11. **Appendix** — Figma Mapping tables, Screen List, Affected features, Gap Analysis
124
+
125
+ **Writing rules:**
126
+ - Write in **English** by default unless user requests otherwise
127
+ - Preserve business rules from the PRD, do not arbitrarily change business logic
128
+ - Each Use Case must have: Precondition, Main flow, Alternative flow, Exception flow, Postcondition
129
+ - Activity/Flow diagrams use Mermaid `flowchart TD`; State diagrams use `stateDiagram-v2`; ER uses `erDiagram`
130
+ - If information is insufficient → mark as `{{TBD}}` and list in the Gap Analysis section
131
+
132
+ ---
133
+
134
+ ### Step 5 — Validate SRS (BMAD validate)
135
+ - Use skill `bmad-validate-prd` to validate the generated/edited SRS
136
+ - Check: Are FRs clear enough? Are NFRs measurable? Are acceptance criteria verifiable?
137
+ - If issues found: fix immediately in the SRS, do not wait until build
138
+ - Record validation result (PASS/FAIL + findings)
139
+
140
+ ---
141
+
142
+ ### Step 6 — Save SRS file
143
+ Save the SRS document to: `docs/project/srs/SRS-[project-name]-[FR-ID]-[feature-name]-v1.0.md`
144
+
145
+ ### Step 7 — Output to user
146
+ ```
147
+ ## SRS Created/Updated
148
+
149
+ ### File
150
+ - docs/project/srs/SRS-[project-name]-[FR-ID]-[feature-name]-v1.0.md
151
+ - Mode: [CREATE / EDIT]
152
+ - Use Cases written: [N]
153
+ - Validation: [PASS / FAIL — details if fail]
154
+
155
+ ### Gaps to confirm
156
+ - [List of important gaps that need team confirmation]
157
+
158
+ ### Incomplete sections
159
+ - [SRS sections still containing {{...}} that need additional input]
160
+
161
+ ## Next step
162
+ Run /vsaf-test docs/project/srs/SRS-[...].md to generate testcases
163
+ ```
164
+
165
+ ## Notes
166
+ - Do not start coding in this step
167
+ - If scope is too large (>3 modules): suggest splitting into multiple PRs
168
+ - Commit docs: `git commit -m "docs: srs for <feature>"`
169
+ - If mode is EDIT and existing testcases are affected: warn user to re-run `/vsaf-test`
@@ -1,74 +1,61 @@
1
1
  ---
2
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.
3
+ description: Documentation & knowledge sync — update docs, generate project context, build wiki. Use after /vsaf-ship or at end of sprint to ensure knowledge is not lost.
4
4
  ---
5
5
 
6
6
  # VSAF Docs
7
7
 
8
- ## Mục tiêu
9
- Đảm bảo documentation luôn cập nhật, AI agents đủ context, và knowledge không bị mất giữa các session/sprint.
8
+ ## Goal
9
+ Ensure documentation is always up to date and AI agents have sufficient context.
10
10
 
11
11
  ## Input
12
- `$ARGUMENTS` — scope cần document:
13
- - *(không 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
12
+ `$ARGUMENTS` — scope to document:
13
+ - *(no argument)* — full documentation refresh
14
+ - `<module>` — document a specific module
15
+ - `context` — only generate project-context.md
16
+
17
+ ## When to use
18
+ - After each sprint (batch update)
19
+ - After shipping a large feature (>3 modules changed)
20
+ - When onboarding a new team member
21
+ - When an AI agent struggles to understand the codebase
22
+
23
+ ## Steps
24
+
25
+ ### Step 1 — Scan current state
26
+ - Use `mcp__gitnexus__query` to scan the current codebase
27
+ - Compare: current docs vs current code — find outdated docs
28
+
29
+ ### Step 2Generate project documentation
30
+ - Use skill `bmad-document-project` to generate/update project docs
31
+ - Output: architecture description, module breakdown, API endpoints, data flows
32
+ - Save to `docs/project/`
33
+
34
+ ### Step 3 — Generate project context for AI
35
+ - Use skill `bmad-generate-project-context` to create `project-context.md`
36
+ - This file = instructions for AI agents: conventions, patterns, do/don't
37
+ - Save at project root
38
+
39
+ ### Step 4 Tech writing review
40
+ - Use skill `bmad-agent-tech-writer` (Paige) to review the generated docs
41
+ - Paige will: fix unclear sections, add missing context, ensure consistency
42
+
43
+ ### Step 5 Editorial polish
44
+ - Use skill `bmad-editorial-review-prose` — clean up writing quality
47
45
  - Fix: passive voice, jargon, ambiguity, grammar
48
- - Dùng skill `bmad-editorial-review-structure` — improve doc organization
46
+ - Use skill `bmad-editorial-review-structure` — improve doc organization
49
47
  - Fix: duplicated content, poor ordering, missing sections
50
48
 
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`
49
+ ### Step 6 — Distill for LLM consumption
50
+ - Use skill `bmad-distillator` for long docs (>500 lines)
51
+ - Create a compressed version preserve all information, reduce token count
52
+ - Save distilled version alongside original: `[name].distilled.md`
55
53
 
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 + tả ngắn
54
+ ### Step 7 — Index all docs
55
+ - Use skill `bmad-index-docs` for each folder in `docs/`
56
+ - Generate/update `index.md` — table of contents of all files + short descriptions
59
57
 
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
58
+ ### Step 8 — Output to user
72
59
  ```
73
60
  ## Documentation Sync Complete
74
61
 
@@ -77,23 +64,18 @@ description: Documentation & knowledge sync — cập nhật docs, sinh project
77
64
  - Project context: project-context.md [created/updated]
78
65
  - Distilled docs: [N files compressed]
79
66
  - Doc indexes: [N index.md files]
80
- - Knowledge wiki: graphify-out/ [rebuilt]
81
67
 
82
68
  ### Quality checks
83
69
  - Prose review: PASS
84
70
  - Structure review: PASS
85
71
  - Stale docs found: [N — list]
86
72
 
87
- ### Knowledge saved
88
- - MemPalace diary: ✓
89
-
90
73
  ### Next step
91
74
  Documentation is current. Continue with /vsaf-plan or /vsaf-sprint.
92
75
  ```
93
76
 
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
-
77
+ ## Notes
78
+ - This flow **does not modify code** — documentation only
79
+ - Run at least once per sprint or after each major ship
80
+ - Commit all docs: `git commit -m "docs: sync documentation [sprint N]"`
81
+ - If docs >1000 lines: always create a distilled version
@@ -1,48 +1,81 @@
1
1
  ---
2
2
  name: vsaf-onboard
3
- description: Hiểu toàn bộ context dự án mới. Dùng khi lần đầu tiếp nhận project, cần nắm kiến trúc, decisions cũ, codebase trước khi làm bất cứ điều gì.
3
+ description: Understand the full context of a new project. Use when first onboarding to a project, needing to grasp the architecture, past decisions, and codebase before doing anything.
4
4
  ---
5
5
 
6
6
  # VSAF Onboard
7
7
 
8
- ## Mục tiêu
9
- Xây dựng full mental model về dự án trước khi chạm vào bất kỳ code nào.
8
+ ## Objective
9
+ Build a full mental model of the project before touching any code.
10
10
 
11
- ## Các bước thực hiện
11
+ ## Steps
12
12
 
13
- ### Bước 1 — Code intelligence (GitNexus)
14
- - Dùng `mcp__gitnexus__query` với query rộng (ví dụ: "main entry point", "core module") để lấy codebase overview
15
- - Dùng `mcp__gitnexus__group_list` để xem các functional clusters
16
- - Nếu cần drill-down symbol cụ thể: dùng `mcp__gitnexus__context` với param `name` là tên symbol đó
17
- - Tóm tắt: execution flows quan trọng, symbols có nhiều dependencies nhất
13
+ ### Step 1 — Codebase overview (GitNexus resource)
14
+ - Read `gitnexus://repo/{name}/context` get codebase overview:
15
+ - Size, index freshness, health metrics
16
+ - Overview of symbols, relationships
18
17
 
19
- ### Bước 2 — Decisions (MemPalace)
20
- - Gọi `mcp__mempalace__mempalace_search` với query "architecture"
21
- - Gọi `mcp__mempalace__mempalace_search` với query "decision"
22
- - Gọi `mcp__mempalace__mempalace_search` với query "pattern"
23
- - Tóm tắt: các quyết định kiến trúc quan trọng team đã đưa ra
18
+ ### Step 2 — Functional areas (GitNexus resource)
19
+ - Read `gitnexus://repo/{name}/clusters` functional areas + cohesion scores
20
+ - Understand what functional groups the codebase is divided into
24
21
 
25
- ### Bước 3 — Output cho user
26
- Trình bày tóm tắt theo format:
22
+ ### Step 3 — Execution flows (GitNexus resource)
23
+ - Read `gitnexus://repo/{name}/processes` all execution flows in the codebase
24
+ - Understand how data flows through the system
25
+
26
+ ### Step 4 — Module groupings (GitNexus tools)
27
+ - Use `gitnexus_group_list` to view module groups
28
+ - Use `gitnexus_group_query` to view inter-module relationships
29
+ - Understand which modules depend on which
30
+
31
+ ### Step 5 — API surface (GitNexus, for API projects)
32
+ - Use `gitnexus_route_map` to map all API routes → handlers
33
+ - Skip if the project is not an API/web service
34
+
35
+ ### Step 6 — Deep-dive key symbols (GitNexus)
36
+ - Use `gitnexus_context` on 3-5 key symbols (main entry points, core services)
37
+ - Get a 360° view: callers, callees, process participation
38
+ - Identify: hot symbols (many callers), risk areas (high fan-out)
39
+
40
+ ### Step 7 — Read project documentation + synthesize
41
+ - Read `docs/project/planning-artifacts/` to find PRDs, ADRs, architecture docs
42
+ - Read `docs/project/srs/` to find existing SRS documents
43
+ - Synthesize all findings into a project overview
44
+
45
+ ### Step 8 — Output to user
46
+ Present the summary in this format:
27
47
 
28
48
  ```
29
49
  ## Project Overview
30
- [ tả ngắn về dự án]
50
+ [Brief description of the project]
51
+
52
+ ## Codebase Health
53
+ - Symbols: [N] | Relationships: [N] | Execution flows: [N]
54
+ - Index freshness: [fresh / stale — last indexed: date]
55
+
56
+ ## Architecture
57
+ [Main layers/modules and their relationships — from clusters + groups]
58
+
59
+ ## Key Execution Flows
60
+ [Top 5-10 most important flows — from processes]
61
+
62
+ ## API Surface
63
+ [Routes overview — from route_map, or "N/A" if not an API project]
31
64
 
32
- ## Kiến trúc
33
- [Các layer/module chính quan hệ]
65
+ ## Hot Symbols
66
+ [3-5 symbols with the most callers/dependencies from context deep-dive]
34
67
 
35
- ## Patterns đang dùng
68
+ ## Patterns in Use
36
69
  [Tech stack, design patterns, conventions]
37
70
 
38
- ## Decisions quan trọng
39
- [Những team đã quyết định do]
71
+ ## Key Decisions
72
+ [What the team has decided and why from docs]
40
73
 
41
- ## Cần chú ý
74
+ ## Areas of Concern
42
75
  [Risk areas, legacy code, known issues]
43
76
  ```
44
77
 
45
- ## Lưu ý
46
- - KHÔNG sửa bất kỳ file nào trong bước này
47
- - Nếu bộ nhớ MemPalace trống: thông báo user chạy `vsaf mine` để populate
48
- - Sau khi hoàn thành: gợi ý user dùng `/vsaf-plan <feature>` để bắt đầu task
78
+ ## Notes
79
+ - Do NOT modify any files during this step
80
+ - If GitNexus index is stale: run `vsaf index` before onboarding
81
+ - After completion: suggest the user run `/vsaf-plan <feature>` to begin a task
@@ -1,88 +1,101 @@
1
1
  ---
2
2
  name: vsaf-plan
3
- description: Lên plan cho 1 feature/task mới. Dùng khi nhận được yêu cầu cần phân tích scope, impact, chiến lược tiếp cận. dụ: /vsaf-plan tạo module quản lý user
3
+ description: Plan a new feature/task. Use when receiving a requirement that needs scope analysis, impact assessment, and approach strategy. Dual brainstorm (Superpowers + BMAD). Example: /vsaf-plan create user management module
4
4
  ---
5
5
 
6
6
  # VSAF Plan
7
7
 
8
- ## Mục tiêu
9
- Hiểu đầy đủ yêu cầu, phân tích impact, xác định chiến lược implement trước khi viết bất kỳ dòng code nào.
8
+ ## Objective
9
+ Fully understand the requirement, analyze impact, and determine the implementation strategy before writing any line of code.
10
10
 
11
11
  ## Input
12
- `$ARGUMENTS` — tả feature/task cần làm ( dụ: "tạo module quản lý dashboard")
13
-
14
- ## Các bước thực hiện
15
-
16
- ### Bước 1 — Search MemPalace (bắt buộc)
17
- - Gọi `mcp__mempalace__mempalace_search` với keyword từ `$ARGUMENTS`
18
- - Tìm kiếm: past decisions, architectural patterns, previous attempts
19
- - Tóm tắt: decision nào liên quan không?
20
-
21
- ### Bước 2 — Clarify scope (BMAD analyst)
22
- - Dùng skill `bmad-agent-analyst` để phân tích yêu cầu
23
- - Xác định: FRs, NFRs, edge cases, assumptions, out-of-scope
24
- - DỪNG hỏi user nếu còn điểm chưa
25
-
26
- ### Bước 3 — Impact analysis (GitNexus)
27
- - Dùng `mcp__gitnexus__impact` với target module/symbol liên quan
28
- - Dùng `mcp__gitnexus__query` để tìm code liên quan
29
- - Báo cáo blast radius: bao nhiêu module bị ảnh hưởng, risk level
30
- - Nếu risk HIGH/CRITICAL: DỪNG, báo user trước khi tiếp tục
31
-
32
- ### Bước 4Trace dependencies (Graphify)
33
- - Nếu cần trace path giữa 2 services: dùng `/graphify path ServiceA ServiceB`
34
- - Xác định: integration points, shared dependencies
35
-
36
- ### Bước 5 — Architecture decision (BMAD architect)
37
- - Dùng skill `bmad-agent-architect` để đề xuất architecture approach
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`
41
-
42
- ### Bước 6 Brainstorm (BMAD Brainstorming)
43
- - Dùng skill `bmad-brainstorming` để explore alternatives và uncover hidden risks
44
- - Facilitator sẽ dẫn dắt session với các kỹ thuật sáng tạo đa dạng
45
- - Đặt câu hỏi: "What if...", "What could go wrong...", "What are we missing?"
46
- - Mục tiêu: tối thiểu 20 ý tưởng/alternatives trước khi tổ chức lại
47
- - bmad-brainstorming sẽ load config từ `_bmad/bmm/config.yaml`
48
-
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 8Output cho user
56
- Trình bày kết quả theo format:
12
+ `$ARGUMENTS` — description of the feature/task to be done (e.g.: "create dashboard management module")
13
+
14
+ ## Execution Steps
15
+
16
+ ### Step 1 — Clarify scope (BMAD analyst)
17
+ - Use skill `bmad-agent-analyst` to analyze the requirement
18
+ - Identify: FRs, NFRs, edge cases, assumptions, out-of-scope
19
+ - STOP and ask the user if there are any unclear points
20
+
21
+ ### Step 2 — Impact analysis (GitNexus)
22
+ - Use `gitnexus_impact` with the target being the related module/symbol
23
+ - Use `gitnexus_query` to find related code
24
+ - Report blast radius: how many modules are affected, risk level
25
+ - If risk is HIGH/CRITICAL: STOP, notify the user before continuing
26
+
27
+ ### Step 2b Module boundary analysis (GitNexus)
28
+ - Use `gitnexus_group_query` to view module boundaries
29
+ - Identify: which groups are affected, interface contracts between groups
30
+ - Understand module boundaries clearly before proposing architecture
31
+
32
+ ### Step 3Architecture decision (BMAD architect)
33
+ - Use skill `bmad-agent-architect` to propose an architecture approach
34
+ - Compare alternatives, choose the most suitable approach
35
+ - **If risk is HIGH or > 3 modules**: use skill `bmad-create-architecture` to create a formal ADR (Architecture Decision Record)
36
+ - Save to `docs/project/planning-artifacts/adr-[feature].md`
37
+
38
+ ### Step 4 Dual Brainstorm
39
+
40
+ #### 4a Structured brainstorm (Superpowers)
41
+ - Use `superpowers:brainstorming` — structured exploration:
42
+ - Trade-offs, constraints, 2-3 viable options
43
+ - Evaluate risks for each option
44
+
45
+ #### 4b Creative brainstorm (BMAD)
46
+ - Use skill `bmad-brainstorming` to explore alternatives and uncover hidden risks
47
+ - Facilitator leads the session with diverse creative techniques
48
+ - Goal: at least 20 ideas/alternatives before reorganizing
49
+
50
+ #### 4c Parallel deep-dive (Superpowers, if >2 approaches)
51
+ - Use `superpowers:dispatching-parallel-agents` to research candidate approaches in parallel
52
+ - Each agent deep-dives into 1 approach: feasibility, risks, effort
53
+ - Synthesize results to choose the best approach
54
+
55
+ ### Step 5Challenge approach (BMAD Advanced Elicitation)
56
+ - Use skill `bmad-advanced-elicitation` to challenge the chosen approach
57
+ - Run **pre-mortem**: "Assume this approach fails after 3 months — why?"
58
+ - Run **red team**: find weaknesses, attack vectors, failure modes
59
+ - If serious risks are discovered: go back to Step 3 to adjust the approach
60
+
61
+ ### Step 6 — Output to user
62
+ Present results in the following format:
57
63
 
58
64
  ```
59
- ## Feature: [tên feature]
65
+ ## Feature: [feature name]
60
66
 
61
67
  ## Scope
62
- - In: [những sẽ làm]
63
- - Out: [những không làm]
68
+ - In: [what will be done]
69
+ - Out: [what will not be done]
64
70
 
65
71
  ## Impact Analysis
66
- - Modules bị ảnh hưởng: [danh sách]
72
+ - Affected modules: [list]
73
+ - Module boundaries: [from group_query]
67
74
  - Risk level: [LOW/MEDIUM/HIGH]
68
- - Breaking changes: [có/không, chi tiết]
75
+ - Breaking changes: [yes/no, details]
69
76
 
70
- ## Approach được chọn
71
- [ tả architecture approach]
77
+ ## Chosen Approach
78
+ [Architecture approach description]
79
+
80
+ ## Brainstorm Summary
81
+ - Superpowers: [N approaches explored, chosen: X]
82
+ - BMAD: [N ideas generated, top insights]
83
+ - Parallel agents: [used / not needed]
72
84
 
73
85
  ## Pre-mortem findings
74
- [Những risk đã identify và mitigation plan]
86
+ [Identified risks and mitigation plan]
75
87
 
76
- ## Alternatives đã xem xét
77
- [Tại sao không chọn]
88
+ ## Alternatives considered
89
+ [Why they were not chosen]
78
90
 
79
91
  ## ADR
80
- [Đã tạo / Không cần (risk LOW)]
92
+ [Created / Not needed (risk LOW)]
81
93
 
82
94
  ## Next step
83
- Chạy /vsaf-doc để viết tài liệu plan
95
+ Run /vsaf-doc-prd to write the PRD document
84
96
  ```
85
97
 
86
- ## Lưu ý
87
- - Nếu Impact > 3 modules: cảnh báo user, đề nghị split thành nhiều PRs
88
- - Nếu risk level HIGH/CRITICAL: DỪNG, báo user trước khi tiếp tục
98
+ ## Notes
99
+ - If Impact > 3 modules: warn the user, suggest splitting into multiple PRs
100
+ - If risk level is HIGH/CRITICAL: STOP, notify the user before continuing
101
+ - Dual brainstorm is mandatory: both Superpowers (structured) and BMAD (creative)