@ngocsangairvds/vsaf 3.0.3 → 3.0.5

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.
@@ -2,13 +2,13 @@
2
2
 
3
3
  This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
4
 
5
- > VSAF v3 — Agentic AI SDLC Framework. Spec-driven development. 3-layer review. 7 integrated tools.
5
+ > VSAF v3 — Agentic AI SDLC Framework. 4 integrated tools. 2-layer review.
6
6
 
7
7
  ---
8
8
 
9
9
  ## Prerequisites
10
10
 
11
- Node.js ≥18, Python ≥3.10, Git, jq, Claude Code subscription. Run `npx vsaf init` (idempotent) to install all tools.
11
+ Node.js ≥18, Python ≥3.10, Git, Claude Code subscription. Run `npx vsaf init` (idempotent) to install all tools.
12
12
 
13
13
  ---
14
14
 
@@ -18,12 +18,12 @@ VSAF is a meta-framework for AI-driven SDLC — not an application. It has no so
18
18
 
19
19
  | Layer | Tools | Purpose |
20
20
  |-------|-------|---------|
21
- | Planning | BMAD Method, OpenSpec | PRD, architecture docs, spec proposals |
22
- | Code Intelligence | GitNexus (MCP), Graphify | Impact analysis, dependency graphs, path tracing |
23
- | Memory | claude-mem, MemPalace | Session continuity (auto), architecture decisions (manual) |
24
- | Implementation | Superpowers, Claude Code | TDD execution, code review |
21
+ | Planning | BMAD Method | PRD, architecture docs, sprint stories |
22
+ | Code Intelligence | GitNexus (MCP) | Impact analysis, call graph, blast radius |
23
+ | Memory | MemPalace | Architecture decisions, team knowledge (permanent) |
24
+ | Implementation | Superpowers, Claude Code | Brainstorm, TDD execution, code review |
25
25
 
26
- Key directories: `.claude/` (settings + skills), `openspec/` (spec proposals), `.gitnexus/` (knowledge graph index).
26
+ Key directories: `.claude/` (settings + skills), `_bmad/` (BMAD workspace), `.gitnexus/` (knowledge graph index).
27
27
 
28
28
  ---
29
29
 
@@ -31,10 +31,8 @@ Key directories: `.claude/` (settings + skills), `openspec/` (spec proposals), `
31
31
 
32
32
  ```bash
33
33
  npx vsaf init # Install all tools (one-time, idempotent)
34
- vsaf index # Re-index: gitnexus analyze + graphify update
35
- vsaf verify # Check implementation against OpenSpec specs
36
- vsaf review # Full 3-layer review coordinator
37
- vsaf archive # Archive specs + re-index (post-merge)
34
+ vsaf index # Re-index: gitnexus analyze
35
+ vsaf review # 2-layer review coordinator
38
36
  vsaf mine # Mine conversations into MemPalace
39
37
  vsaf status # Show status of all tools
40
38
  vsaf clean # Clean GitNexus index
@@ -45,18 +43,12 @@ vsaf clean # Clean GitNexus index
45
43
  ## Identity
46
44
 
47
45
  This project uses the **VSAF v3 (Agentic AI SDLC Framework)**. All development
48
- follows the 10-step workflow below. No code ships without spec compliance and
49
- 3-layer review.
46
+ follows the 8-step workflow below. No code ships without 2-layer review.
50
47
 
51
48
  ---
52
49
 
53
50
  ## Memory Management
54
51
 
55
- ### claude-mem (auto-pilot)
56
- - claude-mem handles session continuity automatically. **Do not duplicate** its work.
57
- - Session context is auto-injected on start. No manual action needed.
58
- - Web viewer: http://localhost:37777
59
-
60
52
  ### MemPalace (knowledge base)
61
53
  - Call `mempalace_search` **BEFORE** answering about past decisions, architecture
62
54
  rationale, or "why did we choose X" questions.
@@ -64,42 +56,19 @@ follows the 10-step workflow below. No code ships without spec compliance and
64
56
  - Write `mempalace_diary_write` at end of meaningful sessions.
65
57
  - Run `mempalace mine ~/chats/ --mode convos` weekly to capture decision history.
66
58
 
67
- ### Separation of Concerns
68
- | claude-mem | MemPalace |
69
- |---|---|
70
- | Session recall, debug history | Architecture decisions, team knowledge |
71
- | Auto-compressed summaries | Verbatim lossless storage |
72
- | "What file did I change yesterday?" | "Why did we choose Patroni over Stolon?" |
73
- | Lossy — may lose reasoning chain | Temporal KG with stale fact invalidation |
74
-
75
- **Anti-pattern:** Do not use MemPalace for session recall. Do not use claude-mem
76
- for architecture decisions. Do not dump knowledge into CLAUDE.md.
59
+ **Anti-pattern:** Do not dump knowledge into CLAUDE.md. CLAUDE.md = rules. MemPalace = decisions.
77
60
 
78
61
  ---
79
62
 
80
- ## Knowledge Graph
63
+ ## Knowledge Graph (GitNexus MCP backbone)
81
64
 
82
- ### GitNexus (MCP backbone)
83
- - Use GitNexus MCP tools for impact analysis before any code change.
65
+ - Use GitNexus MCP tools for impact analysis **before any code change**.
84
66
  - Query: "What breaks if I change X?" before touching cross-module code.
85
67
  - Re-index after every merge: `gitnexus analyze`
86
68
 
87
- ### Graphify (multimodal KG)
88
- - Read `graphify-out/GRAPH_REPORT.md` **before** answering architecture questions.
89
- - Use `/graphify query "question"` for structural queries.
90
- - Use `/graphify path ServiceA ServiceB` to trace dependency paths.
91
- - Re-build after merge: `/graphify . --update`
92
-
93
- ### Mandatory Re-indexing
94
- After every merge or significant change:
95
- ```
96
- gitnexus analyze && /graphify . --update
97
- ```
98
- Or: `vsaf index`
99
-
100
69
  ---
101
70
 
102
- ## 10-Step Workflow
71
+ ## 8-Step Workflow
103
72
 
104
73
  ### Step 0: Setup (one-time)
105
74
  ```bash
@@ -107,83 +76,64 @@ npx vsaf init
107
76
  ```
108
77
 
109
78
  ### Step 1: Understand Codebase
110
- - Read `graphify-out/GRAPH_REPORT.md` first.
111
79
  - Run `gitnexus serve` for web UI exploration.
112
- - Query MemPalace for past team decisions.
80
+ - Use `gitnexus_query` to find execution flows for the area you'll work in.
81
+ - Query MemPalace for past team decisions: `mempalace_search("<domain>")`
113
82
  - Do not modify code on day one.
114
83
 
115
84
  ### Step 2: Scope
116
85
  ```
117
86
  *agent analyst # BMAD: clarify scope
118
- *workflow-init # Quick/Standard/Enterprise
87
+ *workflow-init # Quick/Standard flow
119
88
  bmad-help # What's next?
120
89
  ```
121
- Quick Flow (bug fix) --> skip to Step 6.
90
+ Quick Flow (bug fix) skip to Step 5.
122
91
 
123
92
  ### Step 3: Planning (skip for Quick Flow)
124
93
  ```
125
94
  *agent pm # PRD: FRs, NFRs, Epics
126
- *agent architect # Architecture doc
95
+ *agent architect # Architecture doc
127
96
  *agent po # Sprint stories
128
97
  git add docs/ && git commit -m "feat: PRD + arch for <feature>"
129
98
  ```
130
99
 
131
- ### Step 4: Specs (skip for Quick Flow)
100
+ ### Step 4: Impact Analysis
132
101
  ```
133
- /opsx:propose <feature>
134
- /opsx:ff # Fast-forward all docs
135
- git add openspec/ && git commit -m "spec: <feature>"
102
+ gitnexus_impact({target: "X", direction: "upstream"}) # Blast radius
103
+ mempalace_search("<module> refactor") # Past attempts
136
104
  ```
137
- Tasks must be atomic (2-5 min). Include edge cases.
105
+ Impact > 3 modules split PRs.
138
106
 
139
- ### Step 5: Impact Analysis
140
- ```
141
- "What breaks if I change PaymentService?" # GitNexus MCP
142
- /graphify path PaymentService NotificationService
143
- mempalace search "PaymentService refactor" # Past attempts
144
- ```
145
- Impact > 3 modules --> split PRs. Update specs if new edge cases found.
146
-
147
- ### Step 6: Brainstorm + Plan
107
+ ### Step 5: Brainstorm + Plan
148
108
  ```
149
109
  /superpowers:brainstorm # Socratic Q&A, explore alternatives
150
110
  /superpowers:write-plan # Bite-sized tasks + verification steps
151
111
  ```
152
112
  Do not approve until every task has a verification step.
153
113
 
154
- ### Step 7: Execute
114
+ ### Step 6: Execute
155
115
  ```
156
116
  /superpowers:execute-plan # RED -> GREEN -> REFACTOR per task
157
117
  ```
158
118
  - 1 commit per task.
159
119
  - Tests after EVERY task.
160
- - Fail 3x on same task --> stop, do architectural review.
120
+ - Fail 3x on same task stop, do architectural review.
161
121
 
162
- ### Step 8: Self-Review (3-layer -- MANDATORY)
122
+ ### Step 7: Self-Review (2-layer MANDATORY)
163
123
  ```bash
164
124
  # Layer 1: Methodology compliance
165
125
  /superpowers:code-review
166
126
 
167
- # Layer 2: Spec compliance
168
- /opsx:verify # or: vsaf verify
169
-
170
- # Layer 3: Knowledge graph sync
171
- vsaf index # gitnexus analyze + graphify update
127
+ # Layer 2: Knowledge graph sync
128
+ vsaf index # gitnexus analyze
172
129
  ```
173
- If Layer 2 fails --> return to Step 7.
174
130
 
175
- ### Step 9: Push PR
131
+ ### Step 8: Push + Archive
176
132
  ```bash
177
133
  git push origin feature/<name>
134
+ vsaf mine # weekly — mine decisions into MemPalace
178
135
  ```
179
- PR description must include: OpenSpec proposal link, impact summary, test results.
180
-
181
- ### Step 10: Archive + Ship
182
- ```bash
183
- vsaf archive # openspec archive + re-index
184
- mempalace mine ~/chats/ --mode convos # Mine decisions
185
- git tag v<version> && git push --tags
186
- ```
136
+ PR description must include: impact summary (from GitNexus), test results.
187
137
 
188
138
  ---
189
139
 
@@ -195,23 +145,16 @@ git tag v<version> && git push --tags
195
145
  | BMAD PRD | `*agent pm` |
196
146
  | BMAD architect | `*agent architect` |
197
147
  | BMAD next step | `bmad-help` |
198
- | OpenSpec propose | `/opsx:propose <feature>` |
199
- | OpenSpec fast-forward | `/opsx:ff` |
200
- | OpenSpec verify | `/opsx:verify` |
201
- | OpenSpec archive | `/opsx:archive` |
202
148
  | Superpowers brainstorm | `/superpowers:brainstorm` |
203
149
  | Superpowers plan | `/superpowers:write-plan` |
204
150
  | Superpowers execute | `/superpowers:execute-plan` |
205
151
  | Superpowers review | `/superpowers:code-review` |
206
152
  | GitNexus index | `gitnexus analyze` |
207
153
  | GitNexus web | `gitnexus serve` |
208
- | Graphify build | `/graphify .` |
209
- | Graphify query | `/graphify query "question"` |
210
- | Graphify update | `/graphify . --update` |
211
- | MemPalace search | `mempalace search "query"` |
154
+ | GitNexus impact | `gitnexus_impact({target: "X", direction: "upstream"})` |
155
+ | MemPalace search | `mempalace_search("query")` |
212
156
  | MemPalace mine | `mempalace mine ~/chats/ --mode convos` |
213
- | MemPalace status | `mempalace status` |
214
- | claude-mem viewer | `http://localhost:37777` |
157
+ | MemPalace add | `mempalace_add_drawer` |
215
158
 
216
159
  ---
217
160
 
@@ -219,16 +162,14 @@ git tag v<version> && git push --tags
219
162
 
220
163
  | Do Not | Instead |
221
164
  |---|---|
222
- | Write code before specs | Spec first, code second: `/opsx:propose` |
165
+ | Write code before planning | BMAD analyst + Superpowers brainstorm first |
223
166
  | Skip brainstorm | `/superpowers:brainstorm` before planning |
224
- | Push without review | 3-layer: Superpowers + OpenSpec verify + re-index |
167
+ | Push without review | 2-layer: Superpowers code-review + vsaf index |
225
168
  | Forget to re-index | `vsaf index` after every merge |
226
169
  | Create PRs > 400 lines | Split into smaller PRs |
227
- | Trust AI output blindly | AI writes -> Superpowers reviews -> human approves |
228
- | Skip impact analysis | GitNexus + Graphify + MemPalace BEFORE coding |
229
- | Dump knowledge into CLAUDE.md | CLAUDE.md = rules. claude-mem = sessions. MemPalace = decisions |
230
- | Use MemPalace for session recall | claude-mem auto-handles session continuity |
231
- | Use claude-mem for architecture decisions | MemPalace verbatim + temporal KG for decisions |
170
+ | Trust AI output blindly | AI writes Superpowers reviews human approves |
171
+ | Skip impact analysis | GitNexus BEFORE coding |
172
+ | Dump knowledge into CLAUDE.md | CLAUDE.md = rules. MemPalace = decisions |
232
173
  | Skip MemPalace mining | `mempalace mine` weekly for architecture decisions |
233
174
 
234
175
  ---
@@ -236,7 +177,7 @@ git tag v<version> && git push --tags
236
177
  ## Commit Discipline
237
178
 
238
179
  - 1 commit per task from the plan.
239
- - Each commit message: `<type>: <description>` (feat, fix, refactor, spec, docs, test).
180
+ - Each commit message: `<type>: <description>` (feat, fix, refactor, docs, test).
240
181
  - Tests must pass after every commit.
241
182
  - If a task fails 3 times, stop and trigger an architectural review.
242
183
 
package/bin/vsaf.js CHANGED
@@ -11,31 +11,35 @@ USAGE
11
11
  vsaf global Install global infra only (skills, binaries)
12
12
  vsaf project Scaffold project files only (assumes global done)
13
13
  vsaf status Show installation status
14
- vsaf index Re-index codebase (GitNexus + Graphify)
15
- vsaf verify Check implementation against OpenSpec specs
16
- vsaf review Run 3-layer review flow
17
- vsaf archive Archive specs and re-index
14
+ vsaf index Re-index codebase (GitNexus)
15
+ vsaf review Run 2-layer review flow
18
16
  vsaf mine Mine conversations into MemPalace
19
17
  vsaf clean Clean GitNexus index
20
18
 
21
19
  GLOBAL (once per machine → ~/.claude/)
22
- Skills : bmad (41), openspec (4), vsaf (5), gitnexus (6)
23
- Binaries: gitnexus, openspec, graphify, mempalace, bun, claude-mem
20
+ Skills : bmad (41), vsaf (5), gitnexus (6)
21
+ Binaries: gitnexus, mempalace
24
22
 
25
23
  PER PROJECT (per repo, run inside the repo root)
26
- .claude/settings.json Hooks: secret detection, protected files
24
+ .claude/settings.json Local AI settings (hook policy)
27
25
  .claude/skills + .codex/skills BMAD skills synced for local clients
28
26
  _bmad + _bmad-output BMAD workspace + generated artifacts folders
29
- CLAUDE.md 10-step workflow rules
27
+ CLAUDE.md 8-step workflow rules
30
28
 
31
29
  EXAMPLES
32
30
  npx vsaf init # New machine + new project (recommended)
33
- npx vsaf verify # Validate current implementation
34
- npx vsaf index # Refresh code intelligence indexes
31
+ npx vsaf index # Refresh GitNexus knowledge graph
35
32
  npx vsaf status # Check what is installed
36
33
  `;
37
34
 
38
35
  async function main() {
36
+ const runAndExit = (result, label) => {
37
+ if (result === false) {
38
+ console.error(`\n${label} failed.`);
39
+ process.exit(1);
40
+ }
41
+ };
42
+
39
43
  switch (cmd) {
40
44
  case 'init': {
41
45
  const { installGlobal } = require('../src/global');
@@ -61,32 +65,22 @@ async function main() {
61
65
  }
62
66
  case 'index': {
63
67
  const { runIndex } = require('../src/workflow');
64
- runIndex();
65
- break;
66
- }
67
- case 'verify': {
68
- const { runVerify } = require('../src/workflow');
69
- runVerify();
68
+ runAndExit(runIndex(), 'Index');
70
69
  break;
71
70
  }
72
71
  case 'review': {
73
72
  const { runReview } = require('../src/workflow');
74
- runReview();
75
- break;
76
- }
77
- case 'archive': {
78
- const { runArchive } = require('../src/workflow');
79
- runArchive();
73
+ runAndExit(runReview(), 'Review');
80
74
  break;
81
75
  }
82
76
  case 'mine': {
83
77
  const { runMine } = require('../src/workflow');
84
- runMine();
78
+ runAndExit(runMine(), 'Mine');
85
79
  break;
86
80
  }
87
81
  case 'clean': {
88
82
  const { runClean } = require('../src/workflow');
89
- runClean();
83
+ runAndExit(runClean(), 'Clean');
90
84
  break;
91
85
  }
92
86
  default:
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ngocsangairvds/vsaf",
3
- "version": "3.0.3",
4
- "description": "VSAF — Agentic AI SDLC Framework. Spec-driven development, 3-layer review, 7 integrated tools.",
5
- "keywords": ["claude", "claude-code", "ai", "sdlc", "framework", "bmad", "openspec"],
3
+ "version": "3.0.5",
4
+ "description": "VSAF — Agentic AI SDLC Framework. 4 integrated tools: BMAD, GitNexus, Superpowers, MemPalace. 2-layer review.",
5
+ "keywords": ["claude", "claude-code", "ai", "sdlc", "framework", "bmad", "gitnexus", "mempalace"],
6
6
  "bin": {
7
7
  "vsaf": "./bin/vsaf.js"
8
8
  },
package/src/global.js CHANGED
@@ -13,12 +13,8 @@ async function installGlobal() {
13
13
  console.log( '\x1b[1m╚══════════════════════════════════════════╝\x1b[0m');
14
14
 
15
15
  installSkills();
16
- installBinary('gitnexus', () => exec('npm install -g gitnexus'));
17
- installBinary('openspec', () => exec('npm install -g @fission-ai/openspec@latest'));
18
- installPipx('graphify', 'graphifyy');
19
- installPipx('mempalace', 'mempalace');
20
- installBun();
21
- installClaudeMem();
16
+ installBinary('gitnexus', () => exec('npm install -g gitnexus'));
17
+ installPipx('mempalace', 'mempalace');
22
18
 
23
19
  console.log('\n\x1b[32m\x1b[1m✓ Global infra ready.\x1b[0m\n');
24
20
  }
@@ -78,21 +74,4 @@ function installPipx(cmd, pkg) {
78
74
  : warn(`${cmd} install failed — run: pipx install ${pkg}`);
79
75
  }
80
76
 
81
- function installBun() {
82
- step('bun (claude-mem runtime)');
83
- if (hasCommand('bun')) { ok('bun already installed'); return; }
84
- info('Installing bun...');
85
- exec('curl -fsSL https://bun.sh/install | bash')
86
- ? ok('bun installed')
87
- : warn('bun install failed — run: curl -fsSL https://bun.sh/install | bash');
88
- }
89
-
90
- function installClaudeMem() {
91
- step('claude-mem');
92
- info('Running claude-mem install...');
93
- exec('npx claude-mem install')
94
- ? ok('claude-mem installed')
95
- : warn('claude-mem install had issues — check manually');
96
- }
97
-
98
77
  module.exports = { installGlobal };
package/src/project.js CHANGED
@@ -17,10 +17,8 @@ async function installProject() {
17
17
  scaffoldFiles();
18
18
  scaffoldBmadWorkspace();
19
19
  syncLocalBmadSkills();
20
- initOpenSpec();
21
20
  initGitNexus();
22
21
  initMemPalace();
23
- configureGitHooks();
24
22
 
25
23
  console.log('\n\x1b[32m\x1b[1m✓ Project ready.\x1b[0m');
26
24
  console.log('\n Next steps:');
@@ -139,16 +137,6 @@ function syncLocalBmadSkills() {
139
137
  ok(`${installed} BMAD skill copy(ies), ${skipped} already present`);
140
138
  }
141
139
 
142
- function initOpenSpec() {
143
- step('OpenSpec');
144
- if (!hasCommand('openspec')) { warn('openspec not found — run: vsaf global'); return; }
145
- const already = fs.existsSync(path.join(CWD, 'openspec.json'))
146
- || fs.existsSync(path.join(CWD, 'openspec'));
147
- if (already) { ok('OpenSpec already initialised'); return; }
148
- info('Initialising openspec...');
149
- exec('openspec init', { cwd: CWD }) ? ok('OpenSpec initialised') : warn('openspec init failed — run manually');
150
- }
151
-
152
140
  function initGitNexus() {
153
141
  step('GitNexus');
154
142
  if (!hasCommand('gitnexus')) { warn('gitnexus not found — run: vsaf global'); return; }
@@ -164,12 +152,4 @@ function initMemPalace() {
164
152
  exec(`mempalace init --yes "${CWD}"`, { cwd: CWD }) ? ok('MemPalace initialised') : warn('mempalace init failed — run manually');
165
153
  }
166
154
 
167
- function configureGitHooks() {
168
- step('Git hooks');
169
- if (!fs.existsSync(path.join(CWD, '.git'))) { warn('Not a git repo — skipping'); return; }
170
- fs.mkdirSync(path.join(CWD, 'githooks'), { recursive: true });
171
- exec('git config core.hooksPath githooks/', { cwd: CWD });
172
- ok('Git hooks path → githooks/');
173
- }
174
-
175
155
  module.exports = { installProject };
package/src/status.js CHANGED
@@ -10,23 +10,18 @@ async function showStatus() {
10
10
  console.log('\x1b[1mGlobal (machine-wide → ~/.claude/)\x1b[0m');
11
11
  checkSkills();
12
12
  checkCmd('gitnexus', 'GitNexus');
13
- checkCmd('openspec', 'OpenSpec');
14
- checkCmd('graphify', 'Graphify');
15
13
  checkCmd('mempalace', 'MemPalace');
16
- checkCmd('bun', 'Bun');
17
14
 
18
15
  // ── Project ────────────────────────────────────────────────────────────────
19
16
  console.log('\n\x1b[1mProject (current repo)\x1b[0m');
20
- checkPath('.claude/settings.json', 'Project settings');
17
+ checkPath('.claude/settings.json', 'Project settings (hooks)');
21
18
  checkPath('CLAUDE.md', 'Workflow rules');
22
19
  checkPath('_bmad', 'BMAD workspace');
23
20
  checkPath('_bmad-output', 'BMAD output folder');
24
21
  checkProjectSkillDir('.claude/skills', 'Project BMAD skills (.claude)');
25
22
  checkProjectSkillDir('.codex/skills', 'Project BMAD skills (.codex)');
26
23
  checkPath('.gitnexus', 'GitNexus index');
27
- checkPath('openspec', 'OpenSpec');
28
24
  checkPath('mempalace.yaml', 'MemPalace');
29
- checkPath('githooks', 'Git hooks');
30
25
  console.log('');
31
26
  }
32
27
 
package/src/workflow.js CHANGED
@@ -7,77 +7,57 @@ function runIndex() {
7
7
 
8
8
  if (!hasCommand('gitnexus')) {
9
9
  warn('gitnexus not found — run: vsaf global');
10
- return;
10
+ return false;
11
11
  }
12
12
 
13
13
  info('Running gitnexus analyze...');
14
- exec('gitnexus analyze') ? ok('GitNexus index updated') : warn('gitnexus analyze failed — run manually');
14
+ const gitnexusOk = exec('gitnexus analyze');
15
+ gitnexusOk ? ok('GitNexus index updated') : warn('gitnexus analyze failed — run manually');
15
16
 
16
- if (!hasCommand('graphify')) {
17
- warn('graphify not found — skipping graphify update');
18
- return;
19
- }
20
-
21
- info('Running graphify update...');
22
- exec('graphify . --update') ? ok('Graphify updated') : warn('graphify update failed — run manually');
23
- }
24
-
25
- function runVerify() {
26
- step('Verify');
27
- if (!hasCommand('openspec')) {
28
- warn('openspec not found — run: vsaf global');
29
- return;
30
- }
31
-
32
- info('Running openspec validate --all...');
33
- exec('openspec validate --all') ? ok('OpenSpec verification passed') : warn('OpenSpec verification failed');
17
+ return gitnexusOk;
34
18
  }
35
19
 
36
20
  function runReview() {
37
- step('Review (3-layer)');
21
+ step('Review (2-layer)');
38
22
  info('Layer 1: Methodology review — run in Claude Code: /superpowers:code-review');
39
- info('Layer 2: Spec compliance');
40
- runVerify();
41
- info('Layer 3: Knowledge graph sync');
42
- runIndex();
43
- ok('Review flow completed');
44
- }
23
+ info('Layer 2: Knowledge graph sync');
24
+ const indexOk = runIndex();
45
25
 
46
- function runArchive() {
47
- step('Archive');
48
- if (!hasCommand('openspec')) {
49
- warn('openspec not found — run: vsaf global');
50
- return;
26
+ if (indexOk) {
27
+ ok('Review flow completed');
28
+ return true;
51
29
  }
52
30
 
53
- info('Running openspec archive...');
54
- exec('openspec archive') ? ok('OpenSpec archived') : warn('openspec archive failed — run manually');
55
- runIndex();
31
+ warn('Review flow completed with failures. Fix warnings and re-run.');
32
+ return false;
56
33
  }
57
34
 
58
35
  function runMine() {
59
36
  step('Mine');
60
37
  if (!hasCommand('mempalace')) {
61
38
  warn('mempalace not found — run: vsaf global');
62
- return;
39
+ return false;
63
40
  }
64
41
 
65
42
  info('Running mempalace mine ~/chats/ --mode convos --extract general...');
66
- exec('mempalace mine ~/chats/ --mode convos --extract general')
43
+ const mineOk = exec('mempalace mine ~/chats/ --mode convos --extract general');
44
+ mineOk
67
45
  ? ok('MemPalace mine completed')
68
46
  : warn('mempalace mine failed — run manually');
47
+ return mineOk;
69
48
  }
70
49
 
71
50
  function runClean() {
72
51
  step('Clean');
73
52
  if (!hasCommand('gitnexus')) {
74
53
  warn('gitnexus not found — run: vsaf global');
75
- return;
54
+ return false;
76
55
  }
77
56
 
78
57
  info('Running gitnexus clean...');
79
- exec('gitnexus clean') ? ok('GitNexus index cleaned') : warn('gitnexus clean failed — run manually');
58
+ const cleanOk = exec('gitnexus clean');
59
+ cleanOk ? ok('GitNexus index cleaned') : warn('gitnexus clean failed — run manually');
60
+ return cleanOk;
80
61
  }
81
62
 
82
- module.exports = { runIndex, runVerify, runReview, runArchive, runMine, runClean };
83
-
63
+ module.exports = { runIndex, runReview, runMine, runClean };