@ngocsangairvds/vsaf 3.2.5 → 3.2.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/package.json +1 -1
- package/src/global.js +1 -1
- package/src/project.js +18 -3
- package/src/status.js +7 -4
- package/tools/vds-scripts/AGENTS.md +1 -1
- package/tools/vds-scripts/scripts/BRD-Validation-README.md +5 -5
- package/tools/vds-scripts/scripts/README.md +3 -3
- package/tools/vds-scripts/scripts/target-state-automation/validate_markdown.sh +2 -2
- package/tools/vds-scripts/scripts/target-state-automation/validate_structure.sh +1 -1
- package/tools/vds-scripts/scripts/uv-workspace-alignment-verification-2026-03-25.md +1 -1
- package/tools/vds-scripts/vds_cli/src/vds_cli/cli.py +3 -2
- package/tools/vds-scripts/vds_cli_common/README.md +1 -1
package/package.json
CHANGED
package/src/global.js
CHANGED
|
@@ -131,7 +131,7 @@ async function setupVdsScriptsMcp() {
|
|
|
131
131
|
ok('Đã tìm thấy file cấu hình ~/.vds/.env');
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
const cmd = `claude mcp add vds-orchestrator -- uv run --project "${mcpDir}" vds-mcp-server`;
|
|
134
|
+
const cmd = `claude mcp add vds-orchestrator -e VDS_SCRIPTS_ROOT="${destDir}" -- uv run --project "${mcpDir}" vds-mcp-server`;
|
|
135
135
|
|
|
136
136
|
if (exec(cmd)) {
|
|
137
137
|
ok('VDS Scripts MCP đã được cấu hình thành công');
|
package/src/project.js
CHANGED
|
@@ -5,9 +5,10 @@ const { ok, info, warn, step, hasCommand, exec, copyDir, copyFile, cleanStaleWal
|
|
|
5
5
|
|
|
6
6
|
const PKG_ROOT = path.join(__dirname, '..');
|
|
7
7
|
const TEMPLATES = path.join(PKG_ROOT, 'assets', 'templates');
|
|
8
|
-
const SKILLS_SRC
|
|
9
|
-
const BMAD_SRC
|
|
10
|
-
const
|
|
8
|
+
const SKILLS_SRC = path.join(PKG_ROOT, 'tools', 'skills');
|
|
9
|
+
const BMAD_SRC = path.join(PKG_ROOT, 'tools', 'bmad');
|
|
10
|
+
const VDS_SCRIPTS_SRC = path.join(PKG_ROOT, 'tools', 'vds-scripts');
|
|
11
|
+
const CWD = process.cwd();
|
|
11
12
|
|
|
12
13
|
async function installProject() {
|
|
13
14
|
console.log('\n\x1b[1m╔══════════════════════════════════════════╗\x1b[0m');
|
|
@@ -17,6 +18,7 @@ async function installProject() {
|
|
|
17
18
|
scaffoldFiles();
|
|
18
19
|
scaffoldBmadWorkspace();
|
|
19
20
|
syncLocalBmadSkills();
|
|
21
|
+
syncVdsScripts();
|
|
20
22
|
initGitNexus();
|
|
21
23
|
|
|
22
24
|
console.log('\n\x1b[32m\x1b[1m✓ Project ready.\x1b[0m');
|
|
@@ -157,6 +159,19 @@ function syncLocalBmadSkills() {
|
|
|
157
159
|
ok(`${installed} BMAD skill(s) installed/updated`);
|
|
158
160
|
}
|
|
159
161
|
|
|
162
|
+
function syncVdsScripts() {
|
|
163
|
+
step('VDS Scripts → .claude/vds-scripts/');
|
|
164
|
+
|
|
165
|
+
if (!fs.existsSync(VDS_SCRIPTS_SRC)) {
|
|
166
|
+
warn('vds-scripts not found in package — skipping');
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const dst = path.join(CWD, '.claude', 'vds-scripts');
|
|
171
|
+
copyDir(VDS_SCRIPTS_SRC, dst);
|
|
172
|
+
ok('vds-scripts — synced to .claude/vds-scripts/');
|
|
173
|
+
}
|
|
174
|
+
|
|
160
175
|
function initGitNexus() {
|
|
161
176
|
step('GitNexus');
|
|
162
177
|
if (!hasCommand('gitnexus')) { warn('gitnexus not found — run: vsaf global'); return; }
|
package/src/status.js
CHANGED
|
@@ -22,8 +22,8 @@ async function showStatus() {
|
|
|
22
22
|
checkPath('AGENTS.md', 'Workflow rules (Codex/Gemini)');
|
|
23
23
|
checkPath('.vsaf/_bmad', 'BMAD workspace');
|
|
24
24
|
checkPath('.vsaf/docs', 'Project artifact folder');
|
|
25
|
-
checkProjectSkillDir('.claude/skills', 'Project
|
|
26
|
-
checkProjectSkillDir('.codex/skills', 'Project
|
|
25
|
+
checkProjectSkillDir('.claude/skills', 'Project skills (.claude)');
|
|
26
|
+
checkProjectSkillDir('.codex/skills', 'Project skills (.codex)');
|
|
27
27
|
checkPath('.gitnexus', 'GitNexus index');
|
|
28
28
|
console.log('');
|
|
29
29
|
}
|
|
@@ -65,9 +65,12 @@ function checkProjectSkillDir(rel, label) {
|
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
const
|
|
68
|
+
const entries = fs.readdirSync(dir);
|
|
69
|
+
const count = entries.length;
|
|
70
|
+
const bmad = entries.filter((n) => n.startsWith('bmad-')).length;
|
|
71
|
+
const vds = entries.filter((n) => n.startsWith('vds-')).length;
|
|
69
72
|
if (count > 0) {
|
|
70
|
-
console.log(` \x1b[32m✓\x1b[0m ${label} (${count})`);
|
|
73
|
+
console.log(` \x1b[32m✓\x1b[0m ${label} (${count}: ${bmad} bmad, ${vds} vds)`);
|
|
71
74
|
} else {
|
|
72
75
|
console.log(` \x1b[31m✗\x1b[0m ${label} (0)`);
|
|
73
76
|
}
|
|
@@ -121,7 +121,7 @@ newman run "BRD-Validation-API.postman_collection.json" \
|
|
|
121
121
|
|
|
122
122
|
```bash
|
|
123
123
|
# Run the BRD validation script directly
|
|
124
|
-
cd
|
|
124
|
+
cd ~/.claude/vds-scripts/scripts
|
|
125
125
|
python3 validate_brd_coverage.py
|
|
126
126
|
|
|
127
127
|
# View generated report
|
|
@@ -196,7 +196,7 @@ cat brd_coverage_report.json | jq '.'
|
|
|
196
196
|
2. **Script Path Issues**:
|
|
197
197
|
```bash
|
|
198
198
|
# Verify script exists
|
|
199
|
-
ls -la
|
|
199
|
+
ls -la ~/.claude/vds-scripts/scripts/validate_brd_coverage.py
|
|
200
200
|
```
|
|
201
201
|
|
|
202
202
|
3. **Newman Installation**:
|
|
@@ -229,7 +229,7 @@ jobs:
|
|
|
229
229
|
run: npm install -g newman
|
|
230
230
|
- name: Run BRD Validation Tests
|
|
231
231
|
run: |
|
|
232
|
-
cd
|
|
232
|
+
cd ~/.claude/vds-scripts/scripts
|
|
233
233
|
newman run "BRD-Validation-API.postman_collection.json" \
|
|
234
234
|
-e "brd-validation-environment.json" \
|
|
235
235
|
--reporters cli,junit \
|
|
@@ -253,7 +253,7 @@ pipeline {
|
|
|
253
253
|
steps {
|
|
254
254
|
script {
|
|
255
255
|
sh '''
|
|
256
|
-
cd
|
|
256
|
+
cd ~/.claude/vds-scripts/scripts
|
|
257
257
|
newman run "BRD-Validation-API.postman_collection.json" \
|
|
258
258
|
-e "brd-validation-environment.json" \
|
|
259
259
|
--reporters cli,json \
|
|
@@ -289,7 +289,7 @@ pipeline {
|
|
|
289
289
|
- **Target State Documentation Update**: `.kiro/specs/target-state-documentation-update/`
|
|
290
290
|
- **BRD Coverage Report**: `projects/INSURANCE/analysis/target-state/BRD_COVERAGE_REPORT.md`
|
|
291
291
|
- **Service Specifications**: `projects/INSURANCE/analysis/target-state/service-specifications/`
|
|
292
|
-
- **VDS Scripts Documentation**:
|
|
292
|
+
- **VDS Scripts Documentation**: `~/.claude/vds-scripts/docs/README.md`
|
|
293
293
|
|
|
294
294
|
## Support
|
|
295
295
|
|
|
@@ -34,7 +34,7 @@ scripts/vds_sh_helpers.sh # runtime helpers: bind --directory and resolve pac
|
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
36
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
37
|
-
# shellcheck source
|
|
37
|
+
# shellcheck source=~/.claude/vds-scripts/scripts/vds_sh_helpers.sh
|
|
38
38
|
source "$SCRIPT_DIR/../vds_sh_helpers.sh" # adjust depth as needed
|
|
39
39
|
```
|
|
40
40
|
|
|
@@ -49,7 +49,7 @@ disk — not where the calling script lives.
|
|
|
49
49
|
vds_uv_run_package vds_cli vds-cli doctor
|
|
50
50
|
|
|
51
51
|
# WRONG — path-coupled, breaks in worktrees and alternate checkouts
|
|
52
|
-
uv run --project
|
|
52
|
+
uv run --project ~/.claude/vds-scripts/vds_cli vds-cli schema convert ...
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
### Syncing environments
|
|
@@ -84,7 +84,7 @@ The helper accepts either:
|
|
|
84
84
|
- a workspace member directory name such as `vds_cli`, `audit_orchestrator`, or `markdown_orchestrator`, or
|
|
85
85
|
- an explicit uv project/package name such as `vds-cli` or `vds-spec-orchestrator`
|
|
86
86
|
|
|
87
|
-
For maintained scripts, prefer passing the directory/member name to the helper and let it resolve the uv project name from the member `pyproject.toml`. Do not pass filesystem paths like
|
|
87
|
+
For maintained scripts, prefer passing the directory/member name to the helper and let it resolve the uv project name from the member `pyproject.toml`. Do not pass filesystem paths like `~/.claude/vds-scripts/vds_cli`.
|
|
88
88
|
|
|
89
89
|
---
|
|
90
90
|
|
|
@@ -17,11 +17,11 @@ set -euo pipefail
|
|
|
17
17
|
# See scripts/vds_sh_helpers.sh for the canonical UV invocation helpers.
|
|
18
18
|
|
|
19
19
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
20
|
-
# shellcheck source
|
|
20
|
+
# shellcheck source=~/.claude/vds-scripts/scripts/target-state-automation/docs_root.sh
|
|
21
21
|
source "$SCRIPT_DIR/docs_root.sh"
|
|
22
22
|
|
|
23
23
|
ROOT="$(resolve_repo_root)"
|
|
24
|
-
VDS_SCRIPTS="$ROOT/
|
|
24
|
+
VDS_SCRIPTS="$ROOT/~/.claude/vds-scripts"
|
|
25
25
|
DOCS_ROOT="$(resolve_insurance_docs_root "$ROOT")"
|
|
26
26
|
TARGET_STATE="$DOCS_ROOT/projects/INSURANCE/analysis/target-state"
|
|
27
27
|
|
|
@@ -11,7 +11,7 @@ set -euo pipefail
|
|
|
11
11
|
# - each architecture service has a matching service-spec folder
|
|
12
12
|
|
|
13
13
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
14
|
-
# shellcheck source
|
|
14
|
+
# shellcheck source=~/.claude/vds-scripts/scripts/target-state-automation/docs_root.sh
|
|
15
15
|
source "$SCRIPT_DIR/docs_root.sh"
|
|
16
16
|
|
|
17
17
|
ROOT="$(resolve_repo_root)"
|
|
@@ -5,6 +5,7 @@ Context7: /websites/typer_tiangolo
|
|
|
5
5
|
Key Features: typer.Typer(), @app.command(), Annotated options
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
+
import os
|
|
8
9
|
from pathlib import Path
|
|
9
10
|
|
|
10
11
|
import typer
|
|
@@ -19,8 +20,8 @@ console = Console()
|
|
|
19
20
|
|
|
20
21
|
PASS_THRU_CONTEXT = {"allow_extra_args": True, "ignore_unknown_options": True}
|
|
21
22
|
|
|
22
|
-
# Get scripts directory (
|
|
23
|
-
SCRIPT_DIR = Path(__file__).resolve().parent.parent.parent.parent
|
|
23
|
+
# Get scripts directory — prefer VDS_SCRIPTS_ROOT env var (set by vsaf MCP registration)
|
|
24
|
+
SCRIPT_DIR = Path(os.environ["VDS_SCRIPTS_ROOT"]) if "VDS_SCRIPTS_ROOT" in os.environ else Path(__file__).resolve().parent.parent.parent.parent
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
@app.command()
|