@ngocsangairvds/vsaf 5.4.7 → 5.5.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.
Files changed (53) hide show
  1. package/package.json +1 -1
  2. package/packages/cli/dist/commands/run.d.ts.map +1 -1
  3. package/packages/cli/dist/commands/run.js +16 -2
  4. package/packages/cli/dist/commands/run.js.map +1 -1
  5. package/packages/cli/dist/commands/validate.d.ts.map +1 -1
  6. package/packages/cli/dist/commands/validate.js +7 -1
  7. package/packages/cli/dist/commands/validate.js.map +1 -1
  8. package/packages/core/dist/engine/dag-parser.d.ts.map +1 -1
  9. package/packages/core/dist/engine/dag-parser.js +7 -0
  10. package/packages/core/dist/engine/dag-parser.js.map +1 -1
  11. package/packages/core/dist/engine/expand-workflow.d.ts +8 -0
  12. package/packages/core/dist/engine/expand-workflow.d.ts.map +1 -0
  13. package/packages/core/dist/engine/expand-workflow.js +104 -0
  14. package/packages/core/dist/engine/expand-workflow.js.map +1 -0
  15. package/packages/core/dist/index.d.ts +1 -0
  16. package/packages/core/dist/index.d.ts.map +1 -1
  17. package/packages/core/dist/index.js +4 -2
  18. package/packages/core/dist/index.js.map +1 -1
  19. package/packages/core/dist/providers/default-adapters.d.ts +2 -1
  20. package/packages/core/dist/providers/default-adapters.d.ts.map +1 -1
  21. package/packages/core/dist/providers/default-adapters.js +79 -26
  22. package/packages/core/dist/providers/default-adapters.js.map +1 -1
  23. package/packages/core/dist/schema/workflow-schema.d.ts +4 -0
  24. package/packages/core/dist/schema/workflow-schema.d.ts.map +1 -1
  25. package/packages/core/dist/schema/workflow-schema.js +8 -6
  26. package/packages/core/dist/schema/workflow-schema.js.map +1 -1
  27. package/packages/core/dist/types/workflow.d.ts +2 -0
  28. package/packages/core/dist/types/workflow.d.ts.map +1 -1
  29. package/skills/sdlc/_shared/sonar-viettel/quality-gate.md +7 -0
  30. package/skills/sdlc/discovery/grill/step.md +6 -1
  31. package/skills/sdlc/implement/build-run/step.md +1 -1
  32. package/skills/sdlc/implement/tdd/step.md +9 -0
  33. package/skills/sdlc/pack.yaml +2 -4
  34. package/skills/sdlc/review/fix/SKILL.md +10 -0
  35. package/skills/sdlc/review/fix/step.md +33 -0
  36. package/skills/sdlc/srs/SKILL.md +129 -0
  37. package/skills/sdlc/test-design/cases/step.md +7 -0
  38. package/workflows/sdlc/master-sdlc-headless.yaml +18 -62
  39. package/workflows/sdlc/onboard-code.yaml +104 -0
  40. package/workflows/sdlc/onboard-docs.yaml +93 -0
  41. package/workflows/sdlc/onboarding.yaml +24 -7
  42. package/workflows/sdlc/sdlc-build-headless.yaml +34 -10
  43. package/workflows/sdlc/sdlc-design.yaml +4 -21
  44. package/workflows/sdlc/sdlc-review.yaml +9 -1
  45. package/workflows/sdlc/sdlc-srs.yaml +4 -25
  46. package/skills/sdlc/srs/interface/SKILL.md +0 -10
  47. package/skills/sdlc/srs/interface/step.md +0 -44
  48. package/skills/sdlc/srs/prereq/SKILL.md +0 -10
  49. package/skills/sdlc/srs/prereq/step.md +0 -19
  50. package/skills/sdlc/srs/validate/SKILL.md +0 -10
  51. package/skills/sdlc/srs/validate/step.md +0 -23
  52. package/skills/sdlc/srs/write/SKILL.md +0 -10
  53. package/skills/sdlc/srs/write/step.md +0 -19
@@ -1,73 +1,29 @@
1
1
  name: master-sdlc-headless
2
- description: Full SDLC pipeline (headless implement) — Discovery → PRD → Architecture → SRS → Test Design → Implement (headless) → Review → Feature Complete → Ship
2
+ description: Full SDLC pipeline (headless implement, single-workspace) — Discovery → PRD → Architecture → SRS → Test Design → Implement (headless) → Review → Feature Complete → Ship
3
3
  nodes:
4
4
  - id: discovery
5
- description: Phase — Discovery
6
- bash: |
7
- vsaf run sdlc/sdlc-discovery --args $ARGUMENTS
8
- workspace: false
9
- timeout: 5400000
5
+ workflow: sdlc/sdlc-discovery
10
6
  - id: prd
11
- description: Phase — PRD
12
- bash: |
13
- vsaf run sdlc/sdlc-prd --args $ARGUMENTS
14
- workspace: false
15
- timeout: 5400000
16
- depends_on:
17
- - discovery
7
+ workflow: sdlc/sdlc-prd
8
+ depends_on: [discovery]
18
9
  - id: architecture
19
- description: Phase — Architecture
20
- bash: |
21
- vsaf run sdlc/sdlc-architecture --args $ARGUMENTS
22
- workspace: false
23
- timeout: 5400000
24
- depends_on:
25
- - prd
10
+ workflow: sdlc/sdlc-architecture
11
+ depends_on: [prd]
26
12
  - id: srs
27
- description: Phase — SRS
28
- bash: |
29
- vsaf run sdlc/sdlc-srs --args $ARGUMENTS
30
- workspace: false
31
- timeout: 5400000
32
- depends_on:
33
- - architecture
13
+ workflow: sdlc/sdlc-srs
14
+ depends_on: [architecture]
34
15
  - id: test-design
35
- description: Phase — Test Design
36
- bash: |
37
- vsaf run sdlc/sdlc-test-design --args $ARGUMENTS
38
- workspace: false
39
- timeout: 5400000
40
- depends_on:
41
- - srs
16
+ workflow: sdlc/sdlc-test-design
17
+ depends_on: [srs]
42
18
  - id: implement
43
- description: Phase — Implement (headless, engine-driven)
44
- bash: |
45
- vsaf run sdlc/sdlc-build-headless --args $ARGUMENTS
46
- workspace: false
47
- timeout: 5400000
48
- depends_on:
49
- - test-design
19
+ workflow: sdlc/sdlc-build-headless
20
+ depends_on: [test-design]
50
21
  - id: review
51
- description: Phase — Review
52
- bash: |
53
- vsaf run sdlc/sdlc-review --args $ARGUMENTS
54
- workspace: false
55
- timeout: 5400000
56
- depends_on:
57
- - implement
22
+ workflow: sdlc/sdlc-review
23
+ depends_on: [implement]
58
24
  - id: complete
59
- description: Phase — Feature Complete
60
- bash: |
61
- vsaf run sdlc/sdlc-feature-complete --args $ARGUMENTS
62
- workspace: false
63
- timeout: 5400000
64
- depends_on:
65
- - review
25
+ workflow: sdlc/sdlc-feature-complete
26
+ depends_on: [review]
66
27
  - id: ship
67
- description: Phase — Ship
68
- bash: |
69
- vsaf run sdlc/sdlc-ship --args $ARGUMENTS
70
- workspace: false
71
- timeout: 5400000
72
- depends_on:
73
- - complete
28
+ workflow: sdlc/sdlc-ship
29
+ depends_on: [complete]
@@ -0,0 +1,104 @@
1
+ name: onboard-code
2
+ description: |
3
+ Onboard Code — GitNexus index + verify + environment setup + cross-domain verify (mirrors the
4
+ sdlc-onboard-code skill, one node per phase). Detect structure -> GitNexus index -> verify index ->
5
+ env/Docker -> cross-domain verify (reads graphify-out/graph.json from onboard-docs) -> summary.
6
+ GitNexus is the SINGLE SOURCE OF TRUTH for code; graphify/graph.json is docs-only and READ-ONLY here.
7
+ provider: claude
8
+ model: sonnet
9
+ nodes:
10
+ - id: detect-structure
11
+ description: Code 1/6 — detect project structure (single / multi-repo / non-git)
12
+ permission_mode: bypassPermissions
13
+ workspace: false
14
+ timeout: 900000
15
+ prompt: |
16
+ You are a Senior DevOps + Code Architect onboarding a codebase. Project path: $ARGUMENTS (or current dir).
17
+ Print `[ONBOARD-CODE] [1/6] Detect project structure... ⏳/✅`.
18
+
19
+ Determine structure: root `.git`? → single repo. No root `.git` → scan 1–2 levels for `.git/`:
20
+ found N → multi-repo/microservice (list {path, remote, branch}); none → non-git project.
21
+ Record the result under `## Project Structure` in `.vsaf/docs/onboarding/env-setup.md`.
22
+ Artifact boundary: write only at project root or under root `.vsaf/`. ⛔ Do NOT modify `graphify-out/` or `.gitnexus/`.
23
+
24
+ - id: gitnexus-index
25
+ description: Code 2/6 — build the GitNexus code index (single unified index at project root)
26
+ workspace: false
27
+ timeout: 3600000
28
+ depends_on:
29
+ - detect-structure
30
+ bash: |
31
+ set -e
32
+ echo "[ONBOARD-CODE] [2/6] GitNexus index... ⏳"
33
+ # Use the LOCAL binary — do NOT use `npx -y gitnexus@latest` (native-module crash on Node 24+).
34
+ if [ -d .git ]; then
35
+ echo "[ONBOARD-CODE] git repo at root → npx gitnexus analyze ."
36
+ npx gitnexus analyze .
37
+ else
38
+ echo "[ONBOARD-CODE] no root .git → npx gitnexus analyze . --skip-git (covers sub-repos too)"
39
+ npx gitnexus analyze . --skip-git
40
+ fi
41
+ echo "[ONBOARD-CODE] [2/6] GitNexus index... ✅ (single .gitnexus/ at project root)"
42
+
43
+ - id: verify-index
44
+ description: Code 3/6 — map + verify the GitNexus index via MCP (do NOT trust blindly)
45
+ permission_mode: bypassPermissions
46
+ workspace: false
47
+ timeout: 1800000
48
+ depends_on:
49
+ - gitnexus-index
50
+ prompt: |
51
+ Print `[ONBOARD-CODE] [3/6] Verify GitNexus index... ⏳/✅`.
52
+
53
+ Claude MUST review the index — do not assume it is correct. Using the GitNexus MCP tools:
54
+ - `group_sync` if the index needs (re)syncing; `list_repos` — confirm the project root is indexed (one unified index).
55
+ - `route_map` — confirm API routes from ALL repos are mapped; `tool_map` + `context` on 3–5 key entry points per repo.
56
+ Check: main entry points indexed? inter-module dependencies correct? for multi-repo, cross-service calls
57
+ (HTTP/gRPC/event) captured? If something is missing, re-run `group_sync` or record
58
+ "{module/route} not indexed — needs manual review" in `.vsaf/docs/onboarding/env-setup.md`.
59
+ ⛔ Only GitNexus writes `.gitnexus/`; do not edit it directly.
60
+
61
+ - id: env-docker
62
+ description: Code 4/6 — environment check + Docker setup suggestion
63
+ permission_mode: bypassPermissions
64
+ workspace: false
65
+ timeout: 1800000
66
+ depends_on:
67
+ - verify-index
68
+ prompt: |
69
+ Print `[ONBOARD-CODE] [4/6] Environment check + Docker setup... ⏳/✅`.
70
+
71
+ Detect the tech stack (read package.json, pom.xml, build.gradle, requirements.txt, Dockerfile, docker-compose.yml).
72
+ Check the current env (`java -version`, `node -v`, `docker -v`, `python3 --version`, …); compare required vs present
73
+ and suggest installs. Docker: if no Dockerfile/docker-compose.yml, suggest creating them (app + DB/cache/broker as needed);
74
+ if present, sanity-check the config. Record everything under `.vsaf/docs/onboarding/env-setup.md`
75
+ (this is the only md file this phase creates — no project-overview/codebase-map).
76
+
77
+ - id: cross-domain
78
+ description: Code 5/6 — cross-domain verify (GitNexus code ↔ docs graph.json) + technical terms
79
+ permission_mode: bypassPermissions
80
+ workspace: false
81
+ timeout: 1800000
82
+ depends_on:
83
+ - env-docker
84
+ prompt: |
85
+ Print `[ONBOARD-CODE] [5/6] Cross-domain verify... ⏳/✅`.
86
+
87
+ Read `graphify-out/graph.json` (the docs graph from onboard-docs — READ ONLY) and query the code via GitNexus (`query`, `context`). Cross-reference:
88
+ - business concept (graph.json) → is there a matching code module? YES → record `{concept} ↔ {module/class}`; NO → "{concept} not yet implemented".
89
+ - code module (GitNexus) → matching business concept? YES → mapping; NO → technical module (infra/utils), record as such.
90
+ Append a "## Technical Terms" table to `CONTEXT.md` (| Term | Definition | Maps to Business Concept |).
91
+ Flag any cross-database access. If `graphify-out/graph.json` is absent, note that onboard-docs must run first.
92
+
93
+ - id: summary
94
+ description: Code 6/6 — onboarding summary report
95
+ model: haiku
96
+ workspace: false
97
+ timeout: 600000
98
+ depends_on:
99
+ - cross-domain
100
+ prompt: |
101
+ Print `[ONBOARD-CODE] [6/6] Create summary report... ⏳/✅` then the report table:
102
+ Project structure / GitNexus index (N repos) / Index verification / Tech stack / Environment (ready or missing) /
103
+ Docker (exists or suggested) / Cross-domain mapping (N mapped, M gaps) / CONTEXT.md updated.
104
+ End with: "Artifacts saved. If interrupted, re-run the next phase — data is safe."
@@ -0,0 +1,93 @@
1
+ name: onboard-docs
2
+ description: |
3
+ Onboard Docs — build & verify the documentation knowledge graph (mirrors the sdlc-onboard-docs
4
+ skill, one node per phase). Scan/import docs -> graphify build -> Claude verify & supplement ->
5
+ extract domain terms. Graphify runs ONLY on docs (never source code — that is onboard-code/GitNexus).
6
+ provider: claude
7
+ model: sonnet
8
+ nodes:
9
+ - id: scan-import
10
+ description: Docs 1/4 — scan & import documents (markitdown conversion + tier fallbacks)
11
+ permission_mode: bypassPermissions
12
+ workspace: false
13
+ timeout: 1800000
14
+ prompt: |
15
+ You are a Knowledge Engineer onboarding project documents. Project path: $ARGUMENTS (or current dir).
16
+ Print progress as `[ONBOARD-DOCS] [1/4] Scan & import documents... ⏳/✅`.
17
+
18
+ 1. Scan ALL documents: README, docs/, wiki/, specs/, *.md, *.txt (+ complex binaries). List them.
19
+ 2. Resolve markitdown python:
20
+ VENVS=$(pipx environment --value PIPX_LOCAL_VENVS 2>/dev/null)
21
+ MARKITDOWN_PYTHON="${VENVS}/markitdown/bin/python" (fallback ~/.local/pipx/venvs/markitdown/bin/python)
22
+ If markitdown is missing, skip conversion and route ALL complex files through fallbacks (step 4).
23
+ 3. Classify each complex file into a tier:
24
+ - Tier 1 (graphify-native): PDF, DOCX, XLSX, PNG, JPG, GIF, WEBP
25
+ - Tier 2 (graphify-blind): HTML, PPTX, EPUB, ZIP
26
+ - .md/.txt are NOT complex (read directly).
27
+ 4. For each complex file: attempt `"$MARKITDOWN_PYTHON" "<this-skill-dir>/convert.py" --input {file} --output .vsaf/docs/onboarding/doc-imports/{name}.md`.
28
+ Verify the output has real content (not just headers, not an LLM refusal, not hallucinated). On success use it.
29
+ On failure/verify-fail: Tier 1 -> append original path to `.vsaf/docs/onboarding/graphify-direct-read.txt`;
30
+ Tier 2 HTML -> Read the file + write clean markdown to doc-imports/{name}.md; Tier 2 PPTX/EPUB/ZIP -> skip.
31
+ 5. Print a conversion summary (markitdown OK / graphify-direct / Claude-Read / skipped counts).
32
+
33
+ Artifact boundary: write generated artifacts ONLY at project root or under root `.vsaf/`. ⛔ Do NOT modify `graphify-out/` or `.gitnexus/`.
34
+
35
+ - id: graphify-build
36
+ description: Docs 2/4 — graphify build over a docs-only staging dir -> graph.json
37
+ permission_mode: bypassPermissions
38
+ workspace: false
39
+ timeout: 3600000
40
+ depends_on:
41
+ - scan-import
42
+ prompt: |
43
+ Print progress `[ONBOARD-DOCS] [2/4] Graphify build for docs... ⏳/✅`.
44
+
45
+ 1. Create `.vsaf/docs/onboarding/graphify-staging/` and populate it with ALL doc inputs:
46
+ original text docs (.md/.txt/README), converted .md from `.vsaf/docs/onboarding/doc-imports/`,
47
+ and the original binaries listed in `.vsaf/docs/onboarding/graphify-direct-read.txt`.
48
+ This staging dir is the SINGLE input to graphify — it guarantees graphify sees docs only, never code.
49
+ 2. Run `/graphify .vsaf/docs/onboarding/graphify-staging/`.
50
+ 3. Output: `graphify-out/graph.json`.
51
+
52
+ ⛔ CRITICAL: graphify is ONLY for docs — DO NOT run graphify on source code (code = GitNexus, in onboard-code).
53
+ Only graphify may write `graphify-out/`.
54
+
55
+ - id: verify-fix
56
+ description: Docs 3/4 — Claude verifies graph vs docs and supplements missing nodes/edges
57
+ permission_mode: bypassPermissions
58
+ workspace: false
59
+ timeout: 3600000
60
+ depends_on:
61
+ - graphify-build
62
+ prompt: |
63
+ Print progress `[ONBOARD-DOCS] [3/4] Verify & fix graph... ⏳/✅`.
64
+
65
+ Do NOT trust the graph blindly. For EACH original doc:
66
+ 1. Re-read it — extract concepts, relationships, business rules, constraints.
67
+ 2. Read `graphify-out/graph.json` — find the corresponding nodes/edges.
68
+ 3. Compare: concept/relationship/rule present in the doc but missing in the graph = MISSING.
69
+ 4. Supplement any MISSING nodes/edges DIRECTLY into `graph.json` (this Phase-3 supplementation is the
70
+ ONLY permitted direct write to graph.json). Report per doc: "{doc}: +N nodes, +M edges".
71
+
72
+ Every missing concept/relationship MUST be supplemented, not skipped.
73
+
74
+ - id: extract-terms
75
+ description: Docs 4/4 — extract domain terms from the graph into CONTEXT.md (Shared Language)
76
+ model: haiku
77
+ permission_mode: bypassPermissions
78
+ workspace: false
79
+ timeout: 900000
80
+ depends_on:
81
+ - verify-fix
82
+ prompt: |
83
+ Print progress `[ONBOARD-DOCS] [4/4] Extract domain terms → CONTEXT.md... ⏳/✅`.
84
+
85
+ From the completed `graph.json`, extract DOMAIN terms (business vocabulary, not technical/code terms —
86
+ those are added later by onboard-code). Append/update a "## Shared Language" table in `CONTEXT.md` at the project root:
87
+
88
+ | Term | Definition | Example |
89
+ |------|-----------|---------|
90
+ | {term} | {1-line definition} | {concrete example} |
91
+
92
+ The graph is the single source of truth — do NOT create redundant overview/summary md files.
93
+ Then print: "Artifacts saved. If interrupted, re-run the next phase — data is safe."
@@ -1,11 +1,28 @@
1
1
  name: onboarding
2
- description: "Utility — Onboarding: docs graph + code graph + env setup (not part of main flow)"
2
+ description: |
3
+ Phase 0 — Onboarding orchestrator (utility; NOT part of the master SDLC flow). Runs the two
4
+ step-level phase workflows in ONE run/workspace via sub-workflow includes:
5
+ init artifact structure -> onboard-docs (docs knowledge graph) -> onboard-code (GitNexus index +
6
+ env/Docker + cross-domain verify). Ordering matters: onboard-code reads graphify-out/graph.json
7
+ produced by onboard-docs, so docs MUST run before code.
8
+ Prerequisite (one-time, per machine): run `/sdlc-setup` to install tooling (GitNexus, markitdown).
3
9
  nodes:
4
- - id: docs
5
- description: "Onboard Docs: build documentation knowledge graph"
6
- command: sdlc-onboard-docs
10
+ - id: init
11
+ description: Phase 0.1 initialize .vsaf artifact structure (.vsaf/docs, CONTEXT.md, .gitignore)
12
+ model: haiku
13
+ permission_mode: bypassPermissions
7
14
  workspace: false
15
+ timeout: 600000
16
+ command: sdlc-init
17
+
18
+ - id: docs
19
+ description: Phase 0.2 — onboard-docs (build + verify docs knowledge graph)
20
+ depends_on:
21
+ - init
22
+ workflow: sdlc/onboard-docs
23
+
8
24
  - id: code
9
- description: "Onboard Code: analyze codebase structure and conventions"
10
- command: sdlc-onboard-code
11
- workspace: false
25
+ description: Phase 0.3 onboard-code (index code + env/Docker + cross-domain verify)
26
+ depends_on:
27
+ - docs
28
+ workflow: sdlc/onboard-code
@@ -60,9 +60,15 @@ nodes:
60
60
  4. Write the chosen command to `$ARTIFACTS_DIR/run-tests.sh` — a POSIX sh script that runs the
61
61
  FULL test suite from the project root and exits with the test runner's exit code. Make it
62
62
  self-contained and re-runnable, then `chmod +x` it.
63
- 5. Verify once: `sh $ARTIFACTS_DIR/run-tests.sh`. It is FINE if tests fail now (the code isn't
64
- written yet) — you are only proving the toolchain runs. Report one line: host or docker,
65
- and that run-tests.sh is ready.
63
+ 5. Verify once: `sh $ARTIFACTS_DIR/run-tests.sh 2>&1 | tee $ARTIFACTS_DIR/test-baseline.log`.
64
+ It is FINE if tests fail now (the code isn't written yet) — you are proving the toolchain
65
+ runs AND capturing the BASELINE (which tests already fail BEFORE this feature). From that
66
+ log, write `$ARTIFACTS_DIR/test-baseline.txt` with two lines exactly:
67
+ `total=<N>` (total tests the runner executed)
68
+ `failing=<comma-separated fully-qualified failing test names, or empty>`
69
+ (If the runner produced no test summary at all, write `total=0` and note the runner error —
70
+ that itself is a toolchain problem to fix here, not later.) Report one line: host or docker,
71
+ baseline total + failing count, and that run-tests.sh is ready.
66
72
 
67
73
  - id: impl-loop
68
74
  description: Implement 3/4 — TDD one case per turn; run tests IN-LOOP; finish only when GREEN
@@ -84,15 +90,22 @@ nodes:
84
90
  `<promise>IMPL_COMPLETE</promise>` and stop.
85
91
  3. For that one case: write/adjust its test (RED), implement the minimal code to make it pass
86
92
  (GREEN). Keep the change scoped to this case.
87
- 4. Run `sh $ARTIFACTS_DIR/run-tests.sh 2>&1 | tee $ARTIFACTS_DIR/test-output.log`. If ANY test
88
- fails (this case OR a regression in a previously-passing test), FIX it now and re-run until
89
- this case passes and nothing else is broken. Never move on with a failing suite.
93
+ 4. Run the COMPLETE suite: `sh $ARTIFACTS_DIR/run-tests.sh 2>&1 | tee $ARTIFACTS_DIR/test-output.log`
94
+ (never a hand-picked subset). If ANY test fails (this case OR a regression in a
95
+ previously-passing test), FIX it now and re-run until this case passes and nothing else is
96
+ broken. Never move on with a failing suite.
90
97
  5. Tick the line to `- [x]` in `$ARTIFACTS_DIR/impl-progress.md` and append a one-line note.
91
98
 
92
99
  Work on the real project files. Match the project's existing structure, language, and test
93
- framework. Do only the current case — the loop calls you again for the next. CRITICAL: NEVER
94
- emit `<promise>IMPL_COMPLETE</promise>` while any test is failing; the signal means the whole
95
- suite is green.
100
+ framework. Do only the current case — the loop calls you again for the next.
101
+
102
+ COMPLETION BAR — the full suite MUST be GREEN (0 failures, 0 errors) before you emit the
103
+ signal. A test that was ALREADY failing before this feature (see `$ARTIFACTS_DIR/test-baseline.txt`)
104
+ is NOT an excuse to ship red: either fix it, or — if it is genuinely unrelated and out of scope —
105
+ record it under a `## Pre-existing failures (quarantined)` section in impl-progress.md with the
106
+ exact test name + one-line rationale AND exclude it from the run so the suite is green. Do NOT
107
+ leave the suite red without an explicit quarantine entry. CRITICAL: NEVER emit
108
+ `<promise>IMPL_COMPLETE</promise>` while any test is failing; the signal means the whole suite is green.
96
109
  loop:
97
110
  until: IMPL_COMPLETE
98
111
  interactive: false
@@ -110,9 +123,20 @@ nodes:
110
123
  bash: |
111
124
  RT=$ARTIFACTS_DIR/run-tests.sh
112
125
  LOG=$ARTIFACTS_DIR/test-output.log
126
+ BASE=$ARTIFACTS_DIR/test-baseline.txt
113
127
  if [ ! -f "$RT" ]; then echo "[vsaf] test-gate: run-tests.sh missing (env-setup did not run)"; exit 1; fi
114
- echo "[vsaf] test-gate: final verification via run-tests.sh"
128
+ echo "[vsaf] test-gate: final verification via run-tests.sh (FULL suite)"
115
129
  sh "$RT" > "$LOG" 2>&1; code=$?
116
130
  tail -40 "$LOG" 2>/dev/null || true
131
+ # Print the runner's real execution summary so the report is honest (never a subset count).
132
+ SUMMARY=$(grep -iE "Tests run: [0-9]+|[0-9]+ (passed|failed)|BUILD (SUCCESS|FAILURE)|failures=|[0-9]+ tests" "$LOG" 2>/dev/null | tail -6)
133
+ echo "[vsaf] test-gate summary:"; printf '%s\n' "$SUMMARY"
134
+ if [ -f "$BASE" ]; then echo "[vsaf] baseline (pre-feature): $(tr '\n' ' ' < "$BASE")"; fi
135
+ # Anti-false-green: refuse a 0 exit that shows NO evidence the suite actually ran
136
+ # (e.g. a runner that no-op'd or reused stale state). A green must be a proven green.
137
+ if [ "$code" -eq 0 ] && ! printf '%s' "$SUMMARY" | grep -qiE "Tests run: [0-9]+|[0-9]+ passed|[0-9]+ tests|BUILD SUCCESS"; then
138
+ echo "[vsaf] test-gate: FAIL — exit 0 but no test-run summary found; cannot confirm the suite executed. Refusing to false-green."
139
+ exit 1
140
+ fi
117
141
  echo "[vsaf] test-gate exit=$code"
118
142
  exit "$code"
@@ -35,27 +35,10 @@ nodes:
35
35
  - architecture-epics
36
36
  workspace: false
37
37
  command: sdlc-architecture-readiness
38
- - id: srs-prereq
39
- description: SRS 1/4 — input artifacts
38
+ - id: srs
39
+ description: Phase 4 — SRS specification, validation, interface verification (single cohesive skill)
40
+ model: sonnet
40
41
  workspace: false
41
- command: sdlc-srs-prereq
42
+ command: sdlc-srs
42
43
  depends_on:
43
44
  - architecture-readiness
44
- - id: srs-write
45
- description: SRS 2/4 — write SRS
46
- depends_on:
47
- - srs-prereq
48
- workspace: false
49
- command: sdlc-srs-write
50
- - id: srs-validate
51
- description: SRS 3/4 — validate SRS
52
- depends_on:
53
- - srs-write
54
- workspace: false
55
- command: sdlc-srs-validate
56
- - id: srs-interface
57
- description: SRS 4/4 — interface verification + gate
58
- depends_on:
59
- - srs-validate
60
- workspace: false
61
- command: sdlc-srs-interface
@@ -28,9 +28,17 @@ nodes:
28
28
  workspace: false
29
29
  command: sdlc-review-impact
30
30
  - id: review-debate
31
- description: Review 5/5 — debate + gate
31
+ description: Review 5/6 — debate + gate
32
32
  model: haiku
33
33
  depends_on:
34
34
  - review-impact
35
35
  workspace: false
36
36
  command: sdlc-review-debate
37
+ - id: review-fix
38
+ description: Review 6/6 — implement MUST-FIX findings, then re-verify the full suite
39
+ model: sonnet
40
+ permission_mode: bypassPermissions
41
+ depends_on:
42
+ - review-debate
43
+ workspace: false
44
+ command: sdlc-review-fix
@@ -1,29 +1,8 @@
1
1
  name: sdlc-srs
2
- description: 'Phase workflow: SRS step-level execution'
2
+ description: 'Phase workflow: SRS — single cohesive skill (write + 8-dimension validation + interface verification)'
3
3
  nodes:
4
- - id: srs-prereq
5
- description: SRS 1/4 — input artifacts
4
+ - id: srs
5
+ description: Phase 4 — SRS specification, validation, interface verification
6
6
  model: sonnet
7
7
  workspace: false
8
- command: sdlc-srs-prereq
9
- - id: srs-write
10
- description: SRS 2/4 — write SRS
11
- model: haiku
12
- depends_on:
13
- - srs-prereq
14
- workspace: false
15
- command: sdlc-srs-write
16
- - id: srs-validate
17
- description: SRS 3/4 — validate SRS
18
- model: haiku
19
- depends_on:
20
- - srs-write
21
- workspace: false
22
- command: sdlc-srs-validate
23
- - id: srs-interface
24
- description: SRS 4/4 — interface verification + gate
25
- model: haiku
26
- depends_on:
27
- - srs-validate
28
- workspace: false
29
- command: sdlc-srs-interface
8
+ command: sdlc-srs
@@ -1,10 +0,0 @@
1
- ---
2
- name: sdlc-srs-interface
3
- description: "SRS 4/4 — interface verification + output"
4
- version: 1.0.0
5
- author: "@ngocsangairvds/vsaf"
6
- ---
7
-
8
- # SRS 4/4 — interface verification + output
9
-
10
- @include(step.md)
@@ -1,44 +0,0 @@
1
- ### Step 4: Interface Verification
2
-
3
- ```
4
- [SRS] [4/4] Interface verification via GitNexus... ⏳
5
- ```
6
-
7
- Use GitNexus `shape_check` — verify code structure matches SRS assumptions.
8
- Append results to `05-srs.md` §Interface Contracts.
9
-
10
- ```
11
- [SRS] [4/4] Interface verification via GitNexus... ✅
12
- ```
13
-
14
- ## Gate
15
-
16
- Human must approve SRS. Write `## Gate: APPROVED` at the end of the file.
17
-
18
- **Automated mode (opt-in):** when the environment has `VSAF_CI=1` or `VSAF_AUTO_APPROVE=1`, write the Gate yourself as `## Gate: APPROVED (auto · VSAF_CI · rationale: <one line>)` and proceed — the one-line rationale is REQUIRED for audit. Without the env flag, a human must approve (default).
19
-
20
- ## Output
21
-
22
- - `.vsaf/docs/features/{feature-name}/05-srs.md` — SRS document (v4 template format)
23
- - `.vsaf/docs/features/{feature-name}/05-srs-validation-report.md` — Validation report with scores
24
-
25
- ## Phase Exit Protocol
26
-
27
- In PHASE REPORT:
28
- - Output files: `05-srs.md`, `05-srs-validation-report.md`
29
- - Validation score: {overall_score}% ({GO/CONDITIONAL GO/NO-GO})
30
- - Suggestions: [1] Phase 5 Test Design (`/sdlc-test-design`) [2] Save artifacts
31
-
32
- Update `.vsaf/docs/STATUS.md`.
33
-
34
- **Notify the user:**
35
- > Artifacts have been saved. If the session is interrupted, open a new session and run the next phase — data is safe.
36
-
37
- ## Rules
38
-
39
- - Every FR/NFR MUST have a unique traceability ID
40
- - DO NOT use vague language: "should", "might", "optionally" → replace with "MUST", "MUST NOT"
41
- - All terms MUST exist in CONTEXT.md
42
- - Every FR MUST be testable (have clear pass/fail criteria)
43
- - SRS MUST follow the v4 template structure (12 sections)
44
- - ⛔ DO NOT modify `graphify-out/` or `.gitnexus/`
@@ -1,10 +0,0 @@
1
- ---
2
- name: sdlc-srs-prereq
3
- description: "SRS 1/4 — input artifacts"
4
- version: 1.0.0
5
- author: "@ngocsangairvds/vsaf"
6
- ---
7
-
8
- # SRS 1/4 — input artifacts
9
-
10
- @include(step.md)
@@ -1,19 +0,0 @@
1
- ## Phase Entry Protocol
2
-
3
- ```
4
- [SRS] [1/4] Checking input artifacts... ⏳
5
- ```
6
-
7
- 1. Input:
8
- - `.vsaf/docs/features/{feature-name}/02-prd.md`
9
- - `.vsaf/docs/features/{feature-name}/03-adr.md`
10
- - `.vsaf/docs/features/{feature-name}/04-epics.md`
11
- 2. Verify 02-prd.md AND 03-adr.md exist (04-epics.md optional):
12
- - Any required file missing → Ask: "File not found. Have you run Phase 2 (PRD) and Phase 3 (Architecture)?"
13
- 3. Read `.vsaf/docs/STATUS.md`
14
- 4. Read `CONTEXT.md`
15
- 5. Query `graph.json` for code structure + business mapping (if exists)
16
-
17
- ```
18
- [SRS] [1/4] Checking input artifacts... ✅
19
- ```
@@ -1,10 +0,0 @@
1
- ---
2
- name: sdlc-srs-validate
3
- description: "SRS 3/4 — validate SRS"
4
- version: 1.0.0
5
- author: "@ngocsangairvds/vsaf"
6
- ---
7
-
8
- # SRS 3/4 — validate SRS
9
-
10
- @include(step.md)
@@ -1,23 +0,0 @@
1
- ### Step 3: Validate SRS
2
-
3
- ```
4
- [SRS] [3/4] Validating SRS (8 dimensions)... ⏳
5
- ```
6
-
7
- Use `/sdlc-validate-srs` — validate SRS across 8 dimensions with weighted scoring.
8
-
9
- - Scope: single file (`05-srs.md`)
10
- - Cross-validate against: `02-prd.md`, `03-adr.md`
11
- - Output: `.vsaf/docs/features/{feature-name}/05-srs-validation-report.md`
12
-
13
- **Decision handling:**
14
-
15
- | Validation Result | Action |
16
- |---|---|
17
- | **GO** (≥80%, no CRITICAL) | Print score summary, proceed to Step 4 |
18
- | **CONDITIONAL GO** (60-79% or HIGH findings) | Print warnings + finding summary. Ask user: "Proceed despite warnings? (Y/N)" |
19
- | **NO-GO** (<60% or CRITICAL findings) | **STOP.** Print CRITICAL findings. Ask user to fix 05-srs.md and re-run `/sdlc-srs` |
20
-
21
- ```
22
- [SRS] [3/4] Validating SRS (8 dimensions)... ✅
23
- ```
@@ -1,10 +0,0 @@
1
- ---
2
- name: sdlc-srs-write
3
- description: "SRS 2/4 — write SRS"
4
- version: 1.0.0
5
- author: "@ngocsangairvds/vsaf"
6
- ---
7
-
8
- # SRS 2/4 — write SRS
9
-
10
- @include(step.md)
@@ -1,19 +0,0 @@
1
- ### Step 2: Write SRS
2
-
3
- ```
4
- [SRS] [2/4] Writing SRS from PRD + ADR + Epics... ⏳
5
- ```
6
-
7
- Use `/sdlc-write-srs` — write SRS following the v4 template (12 sections) from PRD + Architecture + Epics.
8
-
9
- Input:
10
- - `02-prd.md` as PRD source
11
- - `03-adr.md` as architecture context
12
- - `04-epics.md` as epic breakdown (optional)
13
- - Figma link from `CONTEXT.md` (optional)
14
-
15
- Output: `.vsaf/docs/features/{feature-name}/05-srs.md`
16
-
17
- ```
18
- [SRS] [2/4] Writing SRS from PRD + ADR + Epics... ✅
19
- ```