@ngocsangairvds/vsaf 3.0.5 → 3.0.7
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/gitnexus/gitnexus-cli/SKILL.md +1 -1
- package/.claude/skills/vsaf-build/SKILL.md +11 -9
- package/.claude/skills/vsaf-doc/SKILL.md +13 -18
- package/.claude/skills/vsaf-ship/SKILL.md +2 -2
- package/.claude/skills/vsaf-test/SKILL.md +22 -33
- package/README.md +40 -9
- package/assets/templates/.claude/settings.json +0 -33
- package/assets/templates/CLAUDE.md +31 -42
- package/bin/vsaf.js +1 -1
- package/package.json +1 -1
- package/src/project.js +7 -5
- package/src/status.js +2 -2
- package/assets/templates/scripts/session-end-check.sh +0 -28
|
@@ -22,7 +22,7 @@ Run from the project root. This parses all source files, builds the knowledge gr
|
|
|
22
22
|
| `--force` | Force full re-index even if up to date |
|
|
23
23
|
| `--embeddings` | Enable embedding generation for semantic search (off by default) |
|
|
24
24
|
|
|
25
|
-
**When to run:** First time in a project, after major code changes, or when `gitnexus://repo/{name}/context` reports the index is stale.
|
|
25
|
+
**When to run:** First time in a project, after major code changes, or when `gitnexus://repo/{name}/context` reports the index is stale. Re-run `npx gitnexus analyze` manually after commits/merges when needed.
|
|
26
26
|
|
|
27
27
|
### status — Check index freshness
|
|
28
28
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vsaf-build
|
|
3
|
-
description: Implement code theo
|
|
3
|
+
description: Implement code theo SRS + testcase đã có. Dùng sau /vsaf-doc và /vsaf-test. Tự động search MemPalace trước khi code.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# VSAF Build
|
|
7
7
|
|
|
8
8
|
## Mục tiêu
|
|
9
|
-
Implement code đúng theo
|
|
9
|
+
Implement code đúng theo SRS và testcase, từng task một, với TDD — đảm bảo mỗi commit có tests pass.
|
|
10
10
|
|
|
11
11
|
## Điều kiện tiên quyết
|
|
12
|
-
- Đã chạy `/vsaf-doc` và có
|
|
13
|
-
-
|
|
12
|
+
- Đã chạy `/vsaf-doc` và có SRS được approve
|
|
13
|
+
- Đã chạy `/vsaf-test` và có testcase docs
|
|
14
|
+
- User đã xác nhận phạm vi implement
|
|
14
15
|
|
|
15
16
|
## Các bước thực hiện
|
|
16
17
|
|
|
@@ -18,12 +19,13 @@ Implement code đúng theo plan, từng task một, với TDD — đảm bảo m
|
|
|
18
19
|
- Gọi `mcp__mempalace__mempalace_search` với keyword là tên module/feature sắp implement
|
|
19
20
|
- Đảm bảo không có architectural decisions cũ xung đột với approach hiện tại
|
|
20
21
|
|
|
21
|
-
### Bước 2 — Đọc
|
|
22
|
-
- Đọc file
|
|
23
|
-
-
|
|
22
|
+
### Bước 2 — Đọc SRS + testcase
|
|
23
|
+
- Đọc file SRS trong `docs/project/srs/`
|
|
24
|
+
- Đọc file testcase trong `docs/project/testcases/`
|
|
25
|
+
- Xác nhận mapping FR/NFR -> testcase trước khi bắt đầu
|
|
24
26
|
|
|
25
27
|
### Bước 3 — Implement từng task (TDD)
|
|
26
|
-
Với mỗi
|
|
28
|
+
Với mỗi nhóm testcase:
|
|
27
29
|
1. **RED**: Viết test trước, chạy test → phải fail
|
|
28
30
|
2. **GREEN**: Viết code tối thiểu để test pass
|
|
29
31
|
3. **REFACTOR**: Clean up code, giữ test vẫn pass
|
|
@@ -45,4 +47,4 @@ Với mỗi task trong plan:
|
|
|
45
47
|
## Lưu ý
|
|
46
48
|
- 1 commit = 1 task, không gộp nhiều tasks vào 1 commit
|
|
47
49
|
- Không sửa file ngoài scope của task hiện tại
|
|
48
|
-
- Sau khi hoàn thành tất cả tasks: chạy `/vsaf-
|
|
50
|
+
- Sau khi hoàn thành tất cả tasks: chạy `/vsaf-ship`
|
|
@@ -6,7 +6,7 @@ description: Viết tài liệu plan cho feature đã được phân tích. Dùn
|
|
|
6
6
|
# VSAF Doc
|
|
7
7
|
|
|
8
8
|
## Mục tiêu
|
|
9
|
-
Chuyển kết quả plan thành tài liệu chính thức:
|
|
9
|
+
Chuyển kết quả plan thành tài liệu chính thức: SRS có traceability rõ ràng để làm testcase và implementation.
|
|
10
10
|
|
|
11
11
|
## Điều kiện tiên quyết
|
|
12
12
|
Phải đã chạy `/vsaf-plan` và có output trước khi chạy skill này.
|
|
@@ -17,16 +17,15 @@ Phải đã chạy `/vsaf-plan` và có output trước khi chạy skill này.
|
|
|
17
17
|
- Gọi `mcp__mempalace__mempalace_search` với keyword từ feature hiện tại
|
|
18
18
|
- Kiểm tra có decision cũ nào cần reference không?
|
|
19
19
|
|
|
20
|
-
### Bước 2 — Sinh
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
20
|
+
### Bước 2 — Sinh SRS
|
|
21
|
+
- 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
|
|
23
|
+
- Thêm traceability ID cho FR/NFR để map sang testcase
|
|
24
|
+
- Lưu vào `docs/project/srs/[feature].md`
|
|
24
25
|
|
|
25
|
-
### Bước 3 —
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- Kiểm tra: verification step có đo lường được không?
|
|
29
|
-
- Mỗi task phải atomic (2-5 phút work)
|
|
26
|
+
### Bước 3 — Chuẩn hoá implement notes
|
|
27
|
+
- Tạo implement notes bám SRS: module ảnh hưởng, ràng buộc kỹ thuật, rollout notes
|
|
28
|
+
- Không viết code trong bước này
|
|
30
29
|
|
|
31
30
|
### Bước 4 — Lưu architecture decision (MemPalace)
|
|
32
31
|
- Gọi `mcp__mempalace__mempalace_add_drawer` để lưu decision quan trọng
|
|
@@ -38,21 +37,17 @@ Thông báo các file đã tạo:
|
|
|
38
37
|
```
|
|
39
38
|
## Tài liệu đã tạo
|
|
40
39
|
|
|
41
|
-
###
|
|
42
|
-
- docs/[feature]
|
|
43
|
-
|
|
44
|
-
### Plan
|
|
45
|
-
- docs/superpowers/plans/[feature].md
|
|
46
|
-
- [X] tasks, mỗi task có verification step
|
|
40
|
+
### SRS
|
|
41
|
+
- docs/project/srs/[feature].md
|
|
47
42
|
|
|
48
43
|
### Architecture Decision
|
|
49
44
|
- Đã lưu vào MemPalace
|
|
50
45
|
|
|
51
46
|
## Next step
|
|
52
|
-
Chạy /vsaf-
|
|
47
|
+
Chạy /vsaf-test docs/project/srs/[feature].md để sinh testcase
|
|
53
48
|
```
|
|
54
49
|
|
|
55
50
|
## Lưu ý
|
|
56
51
|
- Không bắt đầu code trong bước này
|
|
57
|
-
- Nếu
|
|
52
|
+
- Nếu scope quá lớn (>3 modules): đề nghị split thành nhiều PRs
|
|
58
53
|
- Commit docs trước khi chuyển sang build: `git commit -m "docs: plan for <feature>"`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vsaf-ship
|
|
3
|
-
description: Review
|
|
3
|
+
description: Review 2 lớp, ship code, và 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.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# VSAF Ship
|
|
@@ -9,7 +9,7 @@ description: Review 3 lớp, ship code, và ghi lại toàn bộ knowledge vào
|
|
|
9
9
|
Đảm bảo code chất lượng, đóng gói feature, và ghi lại toàn bộ knowledge để các session sau kế thừa được.
|
|
10
10
|
|
|
11
11
|
## Điều kiện tiên quyết
|
|
12
|
-
- Đã chạy `/vsaf-
|
|
12
|
+
- Đã chạy `/vsaf-build` với SRS + testcase
|
|
13
13
|
- Không có failing tests
|
|
14
14
|
|
|
15
15
|
## Các bước thực hiện
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vsaf-test
|
|
3
|
-
description: Viết tài liệu
|
|
3
|
+
description: Viết tài liệu testcase từ SRS. Dùng sau /vsaf-doc và trước /vsaf-build. Test cases dựa trên spec, không dựa trên code hiện tại.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# VSAF Test
|
|
7
7
|
|
|
8
8
|
## Mục tiêu
|
|
9
|
-
Tạo tài liệu
|
|
9
|
+
Tạo tài liệu testcase coverage đầy đủ từ SRS để làm contract cho implementation.
|
|
10
10
|
|
|
11
11
|
## Điều kiện tiên quyết
|
|
12
|
-
- Đã chạy `/vsaf-
|
|
13
|
-
- Có file
|
|
12
|
+
- Đã chạy `/vsaf-doc`
|
|
13
|
+
- Có file SRS trong `docs/project/srs/`
|
|
14
14
|
|
|
15
15
|
## Các bước thực hiện
|
|
16
16
|
|
|
17
|
-
### Bước 1 — Sinh test cases từ
|
|
18
|
-
- Dùng skill `bmad-qa-generate-e2e-tests` với
|
|
17
|
+
### Bước 1 — Sinh test cases từ SRS (BMAD qa)
|
|
18
|
+
- Dùng skill `bmad-qa-generate-e2e-tests` với SRS file trong `docs/project/srs/` làm input
|
|
19
19
|
- Test cases phải cover: happy path, edge cases, error cases, NFRs
|
|
20
|
-
- Nguồn gốc: từ FRs/NFRs trong
|
|
20
|
+
- Nguồn gốc: từ FRs/NFRs trong SRS — KHÔNG dựa trên implementation
|
|
21
21
|
|
|
22
22
|
### Bước 2 — Đối chiếu coverage
|
|
23
|
-
- So sánh test cases với
|
|
24
|
-
- Mỗi
|
|
23
|
+
- So sánh test cases với FR/NFR trong SRS
|
|
24
|
+
- Mỗi FR/NFR phải có ít nhất 1 test case tương ứng
|
|
25
25
|
- Ghi nhận gaps nếu có
|
|
26
26
|
|
|
27
|
-
### Bước 3 —
|
|
28
|
-
-
|
|
29
|
-
- Mỗi
|
|
27
|
+
### Bước 3 — Xuất traceability matrix
|
|
28
|
+
- Tạo bảng mapping `FR/NFR -> Testcase ID`
|
|
29
|
+
- Mỗi testcase có: input, expected output, pass/fail criteria
|
|
30
30
|
|
|
31
|
-
### Bước 4 — Lưu tài liệu
|
|
32
|
-
- Lưu
|
|
31
|
+
### Bước 4 — Lưu tài liệu testcase
|
|
32
|
+
- Lưu testcase vào `docs/project/testcases/[feature].md`
|
|
33
33
|
- Format:
|
|
34
34
|
|
|
35
35
|
```markdown
|
|
36
|
-
##
|
|
36
|
+
## Testcases: [feature]
|
|
37
37
|
|
|
38
38
|
### Unit Tests
|
|
39
39
|
| Test case | Input | Expected | Status |
|
|
@@ -47,24 +47,13 @@ Tạo tài liệu test coverage đầy đủ từ spec, sau đó thực thi và
|
|
|
47
47
|
| ... | ... | ... | [ ] |
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
### Bước 5 —
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
- Nếu test fail: fix code, không sửa test để pass
|
|
50
|
+
### Bước 5 — Output cho user
|
|
51
|
+
- Trả về đường dẫn file testcase + coverage summary theo FR/NFR
|
|
52
|
+
- Nêu rõ gaps cần bổ sung trước khi build
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
## Test Results: [feature]
|
|
58
|
-
|
|
59
|
-
- Unit tests: [X/Y passed]
|
|
60
|
-
- Integration tests: [X/Y passed]
|
|
61
|
-
- Edge cases: [X/Y passed]
|
|
62
|
-
|
|
63
|
-
Coverage: [X%]
|
|
64
|
-
|
|
65
|
-
[PASS / FAIL — chi tiết nếu fail]
|
|
66
|
-
```
|
|
54
|
+
## Next step
|
|
55
|
+
Chạy `/vsaf-build <path/to/srs> <path/to/testcases>` để implement theo testcase đã chuẩn hoá.
|
|
67
56
|
|
|
68
57
|
## Lưu ý
|
|
69
|
-
-
|
|
70
|
-
-
|
|
58
|
+
- Không đánh dấu implementation done ở bước này
|
|
59
|
+
- Nếu coverage thiếu cho FR/NFR quan trọng: quay lại cập nhật SRS trước khi build
|
package/README.md
CHANGED
|
@@ -67,10 +67,10 @@ first 30 days.
|
|
|
67
67
|
```
|
|
68
68
|
.
|
|
69
69
|
├── .claude/
|
|
70
|
-
│ ├── settings.json # Local AI settings
|
|
70
|
+
│ ├── settings.json # Local AI settings
|
|
71
71
|
│ └── skills/ # VSAF + BMAD + GitNexus skills
|
|
72
72
|
├── _bmad/ # BMAD agent workspace
|
|
73
|
-
├──
|
|
73
|
+
├── docs/project/ # Generated project artifacts (SRS, testcases, plans)
|
|
74
74
|
├── docs/
|
|
75
75
|
│ ├── architecture/ # Architecture documents (from BMAD Architect)
|
|
76
76
|
│ └── onboarding/ # Developer onboarding (see table above)
|
|
@@ -91,13 +91,43 @@ Run `npx @ngocsangairvds/vsaf@latest --help` for the full list. Highlights:
|
|
|
91
91
|
| `vsaf index` | Re-index codebase (GitNexus) — run after every merge |
|
|
92
92
|
| `vsaf review` | 2-layer review coordinator |
|
|
93
93
|
| `vsaf status` | Show status of all installed tools |
|
|
94
|
-
| `vsaf mine` | Extract decisions
|
|
94
|
+
| `vsaf mine` | Extract decisions into MemPalace (weekly + after major decisions) |
|
|
95
|
+
|
|
96
|
+
Main skill commands inside Claude Code:
|
|
97
|
+
|
|
98
|
+
- `/vsaf-onboard`
|
|
99
|
+
- `/vsaf-plan` + `/vsaf-doc`
|
|
100
|
+
- `/vsaf-test <path/to/srs>`
|
|
101
|
+
- `/vsaf-build <path/to/srs> <path/to/testcases>`
|
|
102
|
+
- `/vsaf-ship`
|
|
95
103
|
|
|
96
104
|
## Workflow
|
|
97
105
|
|
|
98
|
-
Every feature follows an **
|
|
99
|
-
|
|
100
|
-
|
|
106
|
+
Every feature follows an **SRS-first cycle**:
|
|
107
|
+
|
|
108
|
+
1. `/vsaf-onboard` — understand project context (code graph + decisions)
|
|
109
|
+
2. `/vsaf-plan` + `/vsaf-doc` — turn requirement into approved SRS
|
|
110
|
+
3. `/vsaf-test <path/to/srs>` — generate testcase docs from SRS
|
|
111
|
+
4. `gitnexus_impact` + `mempalace_search` — mandatory impact/rationale gate
|
|
112
|
+
5. `/vsaf-build <path/to/srs> <path/to/testcases>` — implement with TDD guardrails
|
|
113
|
+
6. `/superpowers:code-review` + `vsaf index` + `/vsaf-ship` — review, sync graph, ship
|
|
114
|
+
|
|
115
|
+
Bug fixes (Quick Flow) may use mini-SRS + mini-testcases, but still require
|
|
116
|
+
`gitnexus_impact` before editing symbols and `gitnexus_detect_changes` before commit.
|
|
117
|
+
|
|
118
|
+
Generated docs path convention:
|
|
119
|
+
|
|
120
|
+
- SRS: `docs/project/srs/<feature>.md`
|
|
121
|
+
- Testcases: `docs/project/testcases/<feature>.md`
|
|
122
|
+
- Planning artifacts: `docs/project/planning-artifacts/`
|
|
123
|
+
- Implementation artifacts: `docs/project/implementation-artifacts/`
|
|
124
|
+
|
|
125
|
+
### Command naming map
|
|
126
|
+
|
|
127
|
+
- `/vsaf-onboarding` -> `vsaf-onboard`
|
|
128
|
+
- `/vsaf-planning + requirement` -> `vsaf-plan` + `vsaf-doc`
|
|
129
|
+
- `/vsaf-testcase + path/to/srs` -> `vsaf-test <path/to/srs>`
|
|
130
|
+
- `/vsaf-implement + path/to/srs + path/to/test_case` -> `vsaf-build <srs> <testcases>`
|
|
101
131
|
|
|
102
132
|
See [1-setup-guide.md § Your First Project](docs/onboarding/1-setup-guide.md#5-your-first-project--a-walkthrough)
|
|
103
133
|
for a walkthrough, or [2-workflow-guide.md § JWT Demo](docs/onboarding/2-workflow-guide.md#4-full-sdlc-demo)
|
|
@@ -115,6 +145,7 @@ for a full command-by-command example.
|
|
|
115
145
|
|
|
116
146
|
---
|
|
117
147
|
|
|
118
|
-
**Core principles:**
|
|
119
|
-
|
|
120
|
-
|
|
148
|
+
**Core principles:** Onboard first. SRS before implementation. Testcases derived from SRS.
|
|
149
|
+
Impact analysis before touching any symbol. Run `gitnexus_detect_changes` before commit.
|
|
150
|
+
2-layer review before every PR. Re-index after every merge. Mine decisions weekly and after major decisions.
|
|
151
|
+
MemPalace = decisions. Not CLAUDE.md.
|
|
@@ -1,37 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"hooks": {
|
|
3
|
-
"PreToolUse": [
|
|
4
|
-
{
|
|
5
|
-
"matcher": "Edit|Write|Create|MultiEdit",
|
|
6
|
-
"hooks": [
|
|
7
|
-
{
|
|
8
|
-
"type": "command",
|
|
9
|
-
"command": "FILE=\"$TOOL_INPUT_FILE\"; if [ -n \"$FILE\" ]; then if echo \"$FILE\" | grep -qE '\\.env$|\\.env\\.|\\.pem$|\\.key$|id_rsa|id_ed25519|\\.claude/settings\\.json'; then echo 'BLOCK: Protected file. Manual edit required for secrets/config files.'; exit 2; fi; fi"
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"matcher": "Edit|Write|Create|Bash",
|
|
15
|
-
"hooks": [
|
|
16
|
-
{
|
|
17
|
-
"type": "command",
|
|
18
|
-
"command": "INPUT=\"$TOOL_INPUT\"; if [ -n \"$INPUT\" ]; then if echo \"$INPUT\" | grep -qE 'AKIA[0-9A-Z]{16}|ASIA[0-9A-Z]{16}|ghp_[a-zA-Z0-9]{36}|sk-[a-zA-Z0-9]{48}|xox[bpoas]-[a-zA-Z0-9-]+|eyJ[a-zA-Z0-9_-]*\\.[a-zA-Z0-9_-]*\\.[a-zA-Z0-9_-]*'; then echo 'BLOCK: Hardcoded secret/token detected. Use environment variables.'; exit 2; fi; fi"
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"Stop": [
|
|
24
|
-
{
|
|
25
|
-
"matcher": "",
|
|
26
|
-
"hooks": [
|
|
27
|
-
{
|
|
28
|
-
"type": "command",
|
|
29
|
-
"command": "ISSUES=\"\"; SECRETS=$(git diff --cached --diff-filter=ACM --name-only 2>/dev/null | xargs grep -lE \"AKIA[0-9A-Z]{16}|ghp_[a-zA-Z0-9]{36}|sk-[a-zA-Z0-9]{48}|xox[bpoas]-|BEGIN.*PRIVATE\" 2>/dev/null) || true; [ -n \"$SECRETS\" ] && ISSUES=\"${ISSUES}WARNING: Possible secrets staged: ${SECRETS} \"; LOGS=$(git diff --cached --name-only 2>/dev/null | xargs grep -lE \"console[.]log|debugger\" 2>/dev/null) || true; [ -n \"$LOGS\" ] && ISSUES=\"${ISSUES}WARNING: Debug artifacts in staged files: ${LOGS} \"; [ -n \"$ISSUES\" ] && echo \"$ISSUES\""
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
2
|
"permissions": {
|
|
36
3
|
"allow": [
|
|
37
4
|
"Read",
|
|
@@ -43,7 +43,7 @@ vsaf clean # Clean GitNexus index
|
|
|
43
43
|
## Identity
|
|
44
44
|
|
|
45
45
|
This project uses the **VSAF v3 (Agentic AI SDLC Framework)**. All development
|
|
46
|
-
follows the
|
|
46
|
+
follows the SRS-first workflow below. No code ships without 2-layer review.
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
@@ -68,33 +68,30 @@ follows the 8-step workflow below. No code ships without 2-layer review.
|
|
|
68
68
|
|
|
69
69
|
---
|
|
70
70
|
|
|
71
|
-
##
|
|
71
|
+
## SRS-First Workflow
|
|
72
72
|
|
|
73
73
|
### Step 0: Setup (one-time)
|
|
74
74
|
```bash
|
|
75
75
|
npx vsaf init
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
### Step 1:
|
|
78
|
+
### Step 1: Onboard Project
|
|
79
79
|
- Run `gitnexus serve` for web UI exploration.
|
|
80
80
|
- Use `gitnexus_query` to find execution flows for the area you'll work in.
|
|
81
81
|
- Query MemPalace for past team decisions: `mempalace_search("<domain>")`
|
|
82
|
+
- Use `/vsaf-onboard` for the structured onboarding sequence.
|
|
82
83
|
- Do not modify code on day one.
|
|
83
84
|
|
|
84
|
-
### Step 2:
|
|
85
|
+
### Step 2: Planning + Requirement -> SRS
|
|
85
86
|
```
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
bmad-help # What's next?
|
|
87
|
+
/vsaf-plan <requirement> # scope + impact + approach
|
|
88
|
+
/vsaf-doc # write SRS from approved scope
|
|
89
89
|
```
|
|
90
|
-
Quick Flow (bug fix)
|
|
90
|
+
Quick Flow (bug fix) may use a mini-SRS, but impact analysis is still mandatory.
|
|
91
91
|
|
|
92
|
-
### Step 3:
|
|
92
|
+
### Step 3: Testcase from SRS
|
|
93
93
|
```
|
|
94
|
-
|
|
95
|
-
*agent architect # Architecture doc
|
|
96
|
-
*agent po # Sprint stories
|
|
97
|
-
git add docs/ && git commit -m "feat: PRD + arch for <feature>"
|
|
94
|
+
/vsaf-test <path/to/srs>
|
|
98
95
|
```
|
|
99
96
|
|
|
100
97
|
### Step 4: Impact Analysis
|
|
@@ -104,50 +101,43 @@ mempalace_search("<module> refactor") # Past attempts
|
|
|
104
101
|
```
|
|
105
102
|
Impact > 3 modules → split PRs.
|
|
106
103
|
|
|
107
|
-
### Step 5:
|
|
104
|
+
### Step 5: Implement from SRS + Testcases
|
|
108
105
|
```
|
|
109
|
-
/
|
|
110
|
-
/superpowers:write-plan # Bite-sized tasks + verification steps
|
|
106
|
+
/vsaf-build <path/to/srs> <path/to/testcases>
|
|
111
107
|
```
|
|
112
|
-
|
|
108
|
+
`vsaf-build` must keep TDD discipline and 1 commit per task.
|
|
113
109
|
|
|
114
|
-
### Step 6:
|
|
110
|
+
### Step 6: Review + Ship
|
|
115
111
|
```
|
|
116
|
-
/superpowers:execute-plan # RED -> GREEN -> REFACTOR per task
|
|
117
|
-
```
|
|
118
|
-
- 1 commit per task.
|
|
119
|
-
- Tests after EVERY task.
|
|
120
|
-
- Fail 3x on same task → stop, do architectural review.
|
|
121
|
-
|
|
122
|
-
### Step 7: Self-Review (2-layer — MANDATORY)
|
|
123
|
-
```bash
|
|
124
|
-
# Layer 1: Methodology compliance
|
|
125
112
|
/superpowers:code-review
|
|
126
|
-
|
|
127
|
-
# Layer 2: Knowledge graph sync
|
|
128
113
|
vsaf index # gitnexus analyze
|
|
114
|
+
/vsaf-ship
|
|
129
115
|
```
|
|
130
|
-
|
|
131
|
-
### Step 8: Push + Archive
|
|
132
116
|
```bash
|
|
133
117
|
git push origin feature/<name>
|
|
134
|
-
vsaf mine # weekly
|
|
118
|
+
vsaf mine # weekly + after major decisions
|
|
135
119
|
```
|
|
136
120
|
PR description must include: impact summary (from GitNexus), test results.
|
|
137
121
|
|
|
122
|
+
### Command naming map
|
|
123
|
+
|
|
124
|
+
- `/vsaf-onboarding` -> `vsaf-onboard`
|
|
125
|
+
- `/vsaf-planning + requirement` -> `vsaf-plan` + `vsaf-doc`
|
|
126
|
+
- `/vsaf-testcase + path/to/srs` -> `vsaf-test <path/to/srs>`
|
|
127
|
+
- `/vsaf-implement + path/to/srs + path/to/test_case` -> `vsaf-build <srs> <testcases>`
|
|
128
|
+
|
|
138
129
|
---
|
|
139
130
|
|
|
140
131
|
## Tool Commands — Quick Reference
|
|
141
132
|
|
|
142
133
|
| Action | Command |
|
|
143
134
|
|---|---|
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
|
150
|
-
| Superpowers execute | `/superpowers:execute-plan` |
|
|
135
|
+
| VSAF onboard | `/vsaf-onboard` |
|
|
136
|
+
| VSAF plan | `/vsaf-plan <requirement>` |
|
|
137
|
+
| VSAF doc (SRS) | `/vsaf-doc` |
|
|
138
|
+
| VSAF testcase | `/vsaf-test <path/to/srs>` |
|
|
139
|
+
| VSAF implement | `/vsaf-build <srs> <testcases>` |
|
|
140
|
+
| VSAF ship | `/vsaf-ship` |
|
|
151
141
|
| Superpowers review | `/superpowers:code-review` |
|
|
152
142
|
| GitNexus index | `gitnexus analyze` |
|
|
153
143
|
| GitNexus web | `gitnexus serve` |
|
|
@@ -162,8 +152,8 @@ PR description must include: impact summary (from GitNexus), test results.
|
|
|
162
152
|
|
|
163
153
|
| Do Not | Instead |
|
|
164
154
|
|---|---|
|
|
165
|
-
| Write code before
|
|
166
|
-
|
|
|
155
|
+
| Write code before SRS/testcase | `/vsaf-plan` + `/vsaf-doc` + `/vsaf-test` first |
|
|
156
|
+
| Implement without impact gate | `gitnexus_impact` before editing any symbol |
|
|
167
157
|
| Push without review | 2-layer: Superpowers code-review + vsaf index |
|
|
168
158
|
| Forget to re-index | `vsaf index` after every merge |
|
|
169
159
|
| Create PRs > 400 lines | Split into smaller PRs |
|
|
@@ -186,4 +176,3 @@ PR description must include: impact summary (from GitNexus), test results.
|
|
|
186
176
|
## Security
|
|
187
177
|
|
|
188
178
|
- Never hardcode credentials. Use environment variables.
|
|
189
|
-
- Review `.claude/settings.json` hook rules if a block triggers unexpectedly.
|
package/bin/vsaf.js
CHANGED
|
@@ -21,7 +21,7 @@ GLOBAL (once per machine → ~/.claude/)
|
|
|
21
21
|
Binaries: gitnexus, mempalace
|
|
22
22
|
|
|
23
23
|
PER PROJECT (per repo, run inside the repo root)
|
|
24
|
-
.claude/settings.json Local AI settings
|
|
24
|
+
.claude/settings.json Local AI settings
|
|
25
25
|
.claude/skills + .codex/skills BMAD skills synced for local clients
|
|
26
26
|
_bmad + _bmad-output BMAD workspace + generated artifacts folders
|
|
27
27
|
CLAUDE.md 8-step workflow rules
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngocsangairvds/vsaf",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "VSAF — Agentic AI SDLC Framework. 4 integrated tools: BMAD, GitNexus, Superpowers, MemPalace. 2-layer review.",
|
|
5
5
|
"keywords": ["claude", "claude-code", "ai", "sdlc", "framework", "bmad", "gitnexus", "mempalace"],
|
|
6
6
|
"bin": {
|
package/src/project.js
CHANGED
|
@@ -72,9 +72,11 @@ function scaffoldBmadWorkspace() {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
const outputDirs = [
|
|
75
|
-
path.join(CWD, '
|
|
76
|
-
path.join(CWD, '
|
|
77
|
-
path.join(CWD, '
|
|
75
|
+
path.join(CWD, 'docs', 'project'),
|
|
76
|
+
path.join(CWD, 'docs', 'project', 'srs'),
|
|
77
|
+
path.join(CWD, 'docs', 'project', 'testcases'),
|
|
78
|
+
path.join(CWD, 'docs', 'project', 'planning-artifacts'),
|
|
79
|
+
path.join(CWD, 'docs', 'project', 'implementation-artifacts'),
|
|
78
80
|
];
|
|
79
81
|
|
|
80
82
|
let created = 0;
|
|
@@ -86,9 +88,9 @@ function scaffoldBmadWorkspace() {
|
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
if (created > 0) {
|
|
89
|
-
ok(`
|
|
91
|
+
ok(`docs/project — prepared (${created} folder(s) created)`);
|
|
90
92
|
} else {
|
|
91
|
-
ok('
|
|
93
|
+
ok('docs/project — already exists, skipped');
|
|
92
94
|
}
|
|
93
95
|
}
|
|
94
96
|
|
package/src/status.js
CHANGED
|
@@ -14,10 +14,10 @@ async function showStatus() {
|
|
|
14
14
|
|
|
15
15
|
// ── Project ────────────────────────────────────────────────────────────────
|
|
16
16
|
console.log('\n\x1b[1mProject (current repo)\x1b[0m');
|
|
17
|
-
checkPath('.claude/settings.json', 'Project settings
|
|
17
|
+
checkPath('.claude/settings.json', 'Project settings');
|
|
18
18
|
checkPath('CLAUDE.md', 'Workflow rules');
|
|
19
19
|
checkPath('_bmad', 'BMAD workspace');
|
|
20
|
-
checkPath('
|
|
20
|
+
checkPath('docs/project', 'Project artifact folder');
|
|
21
21
|
checkProjectSkillDir('.claude/skills', 'Project BMAD skills (.claude)');
|
|
22
22
|
checkProjectSkillDir('.codex/skills', 'Project BMAD skills (.codex)');
|
|
23
23
|
checkPath('.gitnexus', 'GitNexus index');
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Session-end verification hook for Claude Code.
|
|
3
|
-
# Checks staged files for secrets and debug artifacts.
|
|
4
|
-
set -euo pipefail
|
|
5
|
-
|
|
6
|
-
cd "${PROJECT_DIR:-.}" 2>/dev/null || exit 0
|
|
7
|
-
|
|
8
|
-
ISSUES=""
|
|
9
|
-
|
|
10
|
-
# Check for hardcoded secrets in staged files
|
|
11
|
-
SECRETS=$(git diff --cached --diff-filter=ACM --name-only 2>/dev/null \
|
|
12
|
-
| xargs grep -lE 'AKIA[0-9A-Z]{16}|ghp_[a-zA-Z0-9]{36}|sk-[a-zA-Z0-9]{48}|xox[bpoas]-|BEGIN.*PRIVATE' 2>/dev/null) || true
|
|
13
|
-
|
|
14
|
-
if [ -n "$SECRETS" ]; then
|
|
15
|
-
ISSUES="${ISSUES}WARNING: Possible secrets staged: ${SECRETS} "
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
# Check for debug artifacts in staged files
|
|
19
|
-
LOGS=$(git diff --cached --name-only 2>/dev/null \
|
|
20
|
-
| xargs grep -lE 'console[.]log|debugger' 2>/dev/null) || true
|
|
21
|
-
|
|
22
|
-
if [ -n "$LOGS" ]; then
|
|
23
|
-
ISSUES="${ISSUES}WARNING: Debug artifacts in staged files: ${LOGS} "
|
|
24
|
-
fi
|
|
25
|
-
|
|
26
|
-
if [ -n "$ISSUES" ]; then
|
|
27
|
-
echo "$ISSUES"
|
|
28
|
-
fi
|