@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.
- package/.claude/skills/graphify/SKILL.md +1 -1303
- package/.claude/skills/vsaf-build/SKILL.md +94 -68
- package/.claude/skills/vsaf-discover/SKILL.md +56 -68
- package/.claude/skills/vsaf-doc/SKILL.md +11 -68
- package/.claude/skills/vsaf-doc-prd/SKILL.md +57 -0
- package/.claude/skills/vsaf-doc-srs/SKILL.md +169 -0
- package/.claude/skills/vsaf-docs/SKILL.md +50 -68
- package/.claude/skills/vsaf-onboard/SKILL.md +60 -27
- package/.claude/skills/vsaf-plan/SKILL.md +76 -63
- package/.claude/skills/vsaf-retro/SKILL.md +94 -0
- package/.claude/skills/vsaf-ship/SKILL.md +90 -70
- package/.claude/skills/vsaf-sprint/SKILL.md +42 -51
- package/.claude/skills/vsaf-test/SKILL.md +159 -41
- package/README.md +300 -153
- package/_bmad/bmm/1-analysis/bmad-document-project/templates/srs-feature-template.md +669 -0
- package/_bmad/bmm/1-analysis/bmad-document-project/templates/srs-system-template.md +430 -0
- package/assets/templates/CLAUDE.md +8 -29
- package/bin/vsaf.js +2 -9
- package/package.json +3 -3
- package/src/global.js +0 -15
- package/src/project.js +0 -9
- package/src/status.js +0 -3
- package/src/workflow.js +1 -16
- package/.claude/skills/vsaf-memory-protocol.md +0 -51
|
@@ -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 —
|
|
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
|
-
##
|
|
9
|
-
|
|
8
|
+
## Goal
|
|
9
|
+
Ensure documentation is always up to date and AI agents have sufficient context.
|
|
10
10
|
|
|
11
11
|
## Input
|
|
12
|
-
`$ARGUMENTS` — scope
|
|
13
|
-
- *(
|
|
14
|
-
- `<module>` — document
|
|
15
|
-
- `context` —
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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 2 — Generate 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
|
-
-
|
|
46
|
+
- Use skill `bmad-editorial-review-structure` — improve doc organization
|
|
49
47
|
- Fix: duplicated content, poor ordering, missing sections
|
|
50
48
|
|
|
51
|
-
###
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
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
|
-
###
|
|
57
|
-
-
|
|
58
|
-
-
|
|
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
|
-
###
|
|
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
|
-
##
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
- Commit
|
|
98
|
-
-
|
|
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:
|
|
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
|
-
##
|
|
9
|
-
|
|
8
|
+
## Objective
|
|
9
|
+
Build a full mental model of the project before touching any code.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Steps
|
|
12
12
|
|
|
13
|
-
###
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
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
|
-
###
|
|
20
|
-
-
|
|
21
|
-
-
|
|
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
|
-
###
|
|
26
|
-
|
|
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
|
-
[
|
|
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
|
-
##
|
|
33
|
-
[
|
|
65
|
+
## Hot Symbols
|
|
66
|
+
[3-5 symbols with the most callers/dependencies — from context deep-dive]
|
|
34
67
|
|
|
35
|
-
## Patterns
|
|
68
|
+
## Patterns in Use
|
|
36
69
|
[Tech stack, design patterns, conventions]
|
|
37
70
|
|
|
38
|
-
## Decisions
|
|
39
|
-
[
|
|
71
|
+
## Key Decisions
|
|
72
|
+
[What the team has decided and why — from docs]
|
|
40
73
|
|
|
41
|
-
##
|
|
74
|
+
## Areas of Concern
|
|
42
75
|
[Risk areas, legacy code, known issues]
|
|
43
76
|
```
|
|
44
77
|
|
|
45
|
-
##
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
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:
|
|
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
|
-
##
|
|
9
|
-
|
|
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` —
|
|
13
|
-
|
|
14
|
-
##
|
|
15
|
-
|
|
16
|
-
###
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
###
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
###
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
###
|
|
56
|
-
|
|
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 3 — Architecture 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 5 — Challenge 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: [
|
|
65
|
+
## Feature: [feature name]
|
|
60
66
|
|
|
61
67
|
## Scope
|
|
62
|
-
- In: [
|
|
63
|
-
- Out: [
|
|
68
|
+
- In: [what will be done]
|
|
69
|
+
- Out: [what will not be done]
|
|
64
70
|
|
|
65
71
|
## Impact Analysis
|
|
66
|
-
-
|
|
72
|
+
- Affected modules: [list]
|
|
73
|
+
- Module boundaries: [from group_query]
|
|
67
74
|
- Risk level: [LOW/MEDIUM/HIGH]
|
|
68
|
-
- Breaking changes: [
|
|
75
|
+
- Breaking changes: [yes/no, details]
|
|
69
76
|
|
|
70
|
-
## Approach
|
|
71
|
-
[
|
|
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
|
-
[
|
|
86
|
+
[Identified risks and mitigation plan]
|
|
75
87
|
|
|
76
|
-
## Alternatives
|
|
77
|
-
[
|
|
88
|
+
## Alternatives considered
|
|
89
|
+
[Why they were not chosen]
|
|
78
90
|
|
|
79
91
|
## ADR
|
|
80
|
-
[
|
|
92
|
+
[Created / Not needed (risk LOW)]
|
|
81
93
|
|
|
82
94
|
## Next step
|
|
83
|
-
|
|
95
|
+
Run /vsaf-doc-prd to write the PRD document
|
|
84
96
|
```
|
|
85
97
|
|
|
86
|
-
##
|
|
87
|
-
-
|
|
88
|
-
-
|
|
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)
|