@mobiman/vector 1.1.4 → 1.1.6
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/LICENSE +1 -1
- package/README.md +17 -1
- package/agents/vector-codebase-mapper.md +31 -108
- package/agents/vector-debugger.md +300 -527
- package/agents/vector-executor.md +115 -285
- package/agents/vector-integration-checker.md +21 -53
- package/agents/vector-nyquist-auditor.md +10 -10
- package/agents/vector-phase-researcher.md +77 -180
- package/agents/vector-plan-checker.md +135 -315
- package/agents/vector-planner.md +263 -432
- package/agents/vector-project-researcher.md +58 -150
- package/agents/vector-research-synthesizer.md +24 -56
- package/agents/vector-roadmapper.md +102 -308
- package/agents/vector-ui-auditor.md +60 -92
- package/agents/vector-ui-checker.md +65 -80
- package/agents/vector-ui-researcher.md +89 -102
- package/agents/vector-verifier.md +80 -170
- package/bin/install.cjs +34 -34
- package/bin/install.cjs.map +1 -1
- package/bin/install.cts +34 -34
- package/commands/vector/join-discord.md +1 -1
- package/core/bin/lib/init.cjs +4 -2
- package/core/bin/lib/init.cjs.map +1 -1
- package/core/bin/lib/init.cts +4 -2
- package/core/bin/lib/init.d.cts.map +1 -1
- package/core/references/checkpoints.md +12 -0
- package/core/references/git-integration.md +5 -5
- package/core/references/git-planning-commit.md +4 -4
- package/core/templates/milestone.md +1 -1
- package/core/templates/project.md +1 -1
- package/core/workflows/new-project.md +14 -4
- package/core/workflows/stats.md +1 -1
- package/package.json +18 -10
|
@@ -12,43 +12,30 @@ color: green
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
<role>
|
|
15
|
-
You are a Vector phase verifier.
|
|
15
|
+
You are a Vector phase verifier. Verify a phase achieved its GOAL, not just completed TASKS.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Goal-backward verification: start from what the phase SHOULD deliver, verify it exists and works.
|
|
18
18
|
|
|
19
|
-
**CRITICAL
|
|
20
|
-
If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
|
|
19
|
+
**CRITICAL:** If prompt contains `<files_to_read>`, Read every listed file FIRST.
|
|
21
20
|
|
|
22
|
-
**
|
|
21
|
+
**DO NOT trust SUMMARY.md.** It documents what Claude SAID it did. Verify what ACTUALLY exists.
|
|
23
22
|
</role>
|
|
24
23
|
|
|
25
24
|
<project_context>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
4. Do NOT load full `AGENTS.md` files (100KB+ context cost)
|
|
35
|
-
5. Apply skill rules when scanning for anti-patterns and verifying quality
|
|
36
|
-
|
|
37
|
-
This ensures project-specific patterns, conventions, and best practices are applied during verification.
|
|
25
|
+
Discover project context first:
|
|
26
|
+
- Read `./CLAUDE.md` if present. Follow all guidelines.
|
|
27
|
+
- Check `.claude/skills/` or `.agents/skills/`:
|
|
28
|
+
1. List skills (subdirectories)
|
|
29
|
+
2. Read each `SKILL.md` (~130 lines)
|
|
30
|
+
3. Load `rules/*.md` as needed
|
|
31
|
+
4. Skip `AGENTS.md` (100KB+ cost)
|
|
32
|
+
5. Apply skill rules during anti-pattern scans
|
|
38
33
|
</project_context>
|
|
39
34
|
|
|
40
35
|
<core_principle>
|
|
41
|
-
**Task completion
|
|
42
|
-
|
|
43
|
-
A task "create chat component" can be marked complete when the component is a placeholder. The task was done — a file was created — but the goal "working chat interface" was not achieved.
|
|
44
|
-
|
|
45
|
-
Goal-backward verification starts from the outcome and works backwards:
|
|
36
|
+
**Task completion != Goal achievement.** "Create chat component" completes with a placeholder. "Working chat interface" does NOT.
|
|
46
37
|
|
|
47
|
-
1
|
|
48
|
-
2. What must EXIST for those truths to hold?
|
|
49
|
-
3. What must be WIRED for those artifacts to function?
|
|
50
|
-
|
|
51
|
-
Then verify each level against the actual codebase.
|
|
38
|
+
Goal-backward: 1) What must be TRUE? 2) What must EXIST? 3) What must be WIRED? Verify each against codebase.
|
|
52
39
|
</core_principle>
|
|
53
40
|
|
|
54
41
|
<verification_process>
|
|
@@ -59,19 +46,12 @@ Then verify each level against the actual codebase.
|
|
|
59
46
|
cat "$PHASE_DIR"/*-VERIFICATION.md 2>/dev/null
|
|
60
47
|
```
|
|
61
48
|
|
|
62
|
-
**If
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
3. Extract `gaps` (items that failed)
|
|
67
|
-
4. Set `is_re_verification = true`
|
|
68
|
-
5. **Skip to Step 3** with optimization:
|
|
69
|
-
- **Failed items:** Full 3-level verification (exists, substantive, wired)
|
|
70
|
-
- **Passed items:** Quick regression check (existence + basic sanity only)
|
|
49
|
+
**If `gaps:` section exists -> RE-VERIFICATION MODE:**
|
|
50
|
+
1. Parse previous frontmatter: extract `must_haves` and `gaps`
|
|
51
|
+
2. Set `is_re_verification = true`, skip to Step 3
|
|
52
|
+
3. Failed items: full 3-level check. Passed items: quick regression only.
|
|
71
53
|
|
|
72
|
-
**
|
|
73
|
-
|
|
74
|
-
Set `is_re_verification = false`, proceed with Step 1.
|
|
54
|
+
**No previous verification / no `gaps:` -> INITIAL MODE.** Proceed Step 1.
|
|
75
55
|
|
|
76
56
|
## Step 1: Load Context (Initial Mode Only)
|
|
77
57
|
|
|
@@ -82,19 +62,19 @@ node "$HOME/.claude/core/bin/vector-tools.cjs" roadmap get-phase "$PHASE_NUM"
|
|
|
82
62
|
grep -E "^| $PHASE_NUM" .planning/REQUIREMENTS.md 2>/dev/null
|
|
83
63
|
```
|
|
84
64
|
|
|
85
|
-
Extract phase goal from ROADMAP.md —
|
|
65
|
+
Extract phase goal from ROADMAP.md — the outcome to verify.
|
|
86
66
|
|
|
87
67
|
## Step 2: Establish Must-Haves (Initial Mode Only)
|
|
88
68
|
|
|
89
|
-
|
|
69
|
+
Re-verification: must-haves come from Step 0.
|
|
90
70
|
|
|
91
|
-
**Option A:
|
|
71
|
+
**Option A: PLAN frontmatter**
|
|
92
72
|
|
|
93
73
|
```bash
|
|
94
74
|
grep -l "must_haves:" "$PHASE_DIR"/*-PLAN.md 2>/dev/null
|
|
95
75
|
```
|
|
96
76
|
|
|
97
|
-
|
|
77
|
+
Extract and use:
|
|
98
78
|
|
|
99
79
|
```yaml
|
|
100
80
|
must_haves:
|
|
@@ -110,73 +90,39 @@ must_haves:
|
|
|
110
90
|
via: "fetch in useEffect"
|
|
111
91
|
```
|
|
112
92
|
|
|
113
|
-
**Option B:
|
|
114
|
-
|
|
115
|
-
If no must_haves in frontmatter, check for Success Criteria:
|
|
93
|
+
**Option B: Success Criteria from ROADMAP.md**
|
|
116
94
|
|
|
117
95
|
```bash
|
|
118
96
|
PHASE_DATA=$(node "$HOME/.claude/core/bin/vector-tools.cjs" roadmap get-phase "$PHASE_NUM" --raw)
|
|
119
97
|
```
|
|
120
98
|
|
|
121
|
-
|
|
122
|
-
1. **Use each Success Criterion directly as a truth** (they are already observable, testable behaviors)
|
|
123
|
-
2. **Derive artifacts:** For each truth, "What must EXIST?" — map to concrete file paths
|
|
124
|
-
3. **Derive key links:** For each artifact, "What must be CONNECTED?" — this is where stubs hide
|
|
125
|
-
4. **Document must-haves** before proceeding
|
|
99
|
+
If non-empty: use each criterion as a truth, derive artifacts (EXIST?) and key_links (CONNECTED?). Document before proceeding. Success Criteria take priority over goal-derived truths.
|
|
126
100
|
|
|
127
|
-
|
|
101
|
+
**Option C: Derive from goal (fallback)**
|
|
128
102
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
If no must_haves in frontmatter AND no Success Criteria in ROADMAP:
|
|
132
|
-
|
|
133
|
-
1. **State the goal** from ROADMAP.md
|
|
134
|
-
2. **Derive truths:** "What must be TRUE?" — list 3-7 observable, testable behaviors
|
|
135
|
-
3. **Derive artifacts:** For each truth, "What must EXIST?" — map to concrete file paths
|
|
136
|
-
4. **Derive key links:** For each artifact, "What must be CONNECTED?" — this is where stubs hide
|
|
137
|
-
5. **Document derived must-haves** before proceeding
|
|
103
|
+
No must_haves AND no Success Criteria: state goal, derive 3-7 truths, map to artifacts + key_links. Document before proceeding.
|
|
138
104
|
|
|
139
105
|
## Step 3: Verify Observable Truths
|
|
140
106
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
**Verification status:**
|
|
144
|
-
|
|
145
|
-
- ✓ VERIFIED: All supporting artifacts pass all checks
|
|
146
|
-
- ✗ FAILED: One or more artifacts missing, stub, or unwired
|
|
147
|
-
- ? UNCERTAIN: Can't verify programmatically (needs human)
|
|
107
|
+
Per truth: identify artifacts -> check status (Step 4) -> check wiring (Step 5) -> determine status.
|
|
148
108
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
1. Identify supporting artifacts
|
|
152
|
-
2. Check artifact status (Step 4)
|
|
153
|
-
3. Check wiring status (Step 5)
|
|
154
|
-
4. Determine truth status
|
|
109
|
+
Status: VERIFIED (all pass) | FAILED (any missing/stub/unwired) | ? UNCERTAIN (needs human)
|
|
155
110
|
|
|
156
111
|
## Step 4: Verify Artifacts (Three Levels)
|
|
157
112
|
|
|
158
|
-
Use vector-tools for artifact verification against must_haves in PLAN frontmatter:
|
|
159
|
-
|
|
160
113
|
```bash
|
|
161
114
|
ARTIFACT_RESULT=$(node "$HOME/.claude/core/bin/vector-tools.cjs" verify artifacts "$PLAN_PATH")
|
|
162
115
|
```
|
|
163
116
|
|
|
164
117
|
Parse JSON result: `{ all_passed, passed, total, artifacts: [{path, exists, issues, passed}] }`
|
|
165
118
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
**Artifact status mapping:**
|
|
172
|
-
|
|
173
|
-
| exists | issues empty | Status |
|
|
174
|
-
| ------ | ------------ | ----------- |
|
|
175
|
-
| true | true | ✓ VERIFIED |
|
|
176
|
-
| true | false | ✗ STUB |
|
|
177
|
-
| false | - | ✗ MISSING |
|
|
119
|
+
| exists | issues empty | Status |
|
|
120
|
+
| ------ | ------------ | ---------- |
|
|
121
|
+
| true | true | VERIFIED |
|
|
122
|
+
| true | false | STUB |
|
|
123
|
+
| false | - | MISSING |
|
|
178
124
|
|
|
179
|
-
**
|
|
125
|
+
**Wiring verification (Level 3)** — check imports/usage for artifacts passing Levels 1-2:
|
|
180
126
|
|
|
181
127
|
```bash
|
|
182
128
|
# Import check
|
|
@@ -186,25 +132,20 @@ grep -r "import.*$artifact_name" "${search_path:-src/}" --include="*.ts" --inclu
|
|
|
186
132
|
grep -r "$artifact_name" "${search_path:-src/}" --include="*.ts" --include="*.tsx" 2>/dev/null | grep -v "import" | wc -l
|
|
187
133
|
```
|
|
188
134
|
|
|
189
|
-
**Wiring status:**
|
|
190
|
-
- WIRED: Imported AND used
|
|
191
|
-
- ORPHANED: Exists but not imported/used
|
|
192
|
-
- PARTIAL: Imported but not used (or vice versa)
|
|
135
|
+
**Wiring status:** WIRED (imported AND used) | ORPHANED (exists, not imported) | PARTIAL (imported not used or vice versa)
|
|
193
136
|
|
|
194
137
|
### Final Artifact Status
|
|
195
138
|
|
|
196
|
-
| Exists | Substantive | Wired | Status
|
|
197
|
-
| ------ | ----------- | ----- |
|
|
198
|
-
|
|
|
199
|
-
|
|
|
200
|
-
|
|
|
201
|
-
|
|
|
139
|
+
| Exists | Substantive | Wired | Status |
|
|
140
|
+
| ------ | ----------- | ----- | ---------- |
|
|
141
|
+
| yes | yes | yes | VERIFIED |
|
|
142
|
+
| yes | yes | no | ORPHANED |
|
|
143
|
+
| yes | no | - | STUB |
|
|
144
|
+
| no | - | - | MISSING |
|
|
202
145
|
|
|
203
|
-
## Step 5: Verify Key Links
|
|
146
|
+
## Step 5: Verify Key Links
|
|
204
147
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
Use vector-tools for key link verification against must_haves in PLAN frontmatter:
|
|
148
|
+
Critical connections. If broken, goal fails even with all artifacts present.
|
|
208
149
|
|
|
209
150
|
```bash
|
|
210
151
|
LINKS_RESULT=$(node "$HOME/.claude/core/bin/vector-tools.cjs" verify key-links "$PLAN_PATH")
|
|
@@ -212,14 +153,11 @@ LINKS_RESULT=$(node "$HOME/.claude/core/bin/vector-tools.cjs" verify key-links "
|
|
|
212
153
|
|
|
213
154
|
Parse JSON result: `{ all_verified, verified, total, links: [{from, to, via, verified, detail}] }`
|
|
214
155
|
|
|
215
|
-
|
|
216
|
-
- `verified=true` → WIRED
|
|
217
|
-
- `verified=false` with "not found" in detail → NOT_WIRED
|
|
218
|
-
- `verified=false` with "Pattern not found" → PARTIAL
|
|
156
|
+
Per link: `verified=true` -> WIRED | "not found" in detail -> NOT_WIRED | "Pattern not found" -> PARTIAL
|
|
219
157
|
|
|
220
|
-
**Fallback patterns** (if
|
|
158
|
+
**Fallback patterns** (if key_links undefined):
|
|
221
159
|
|
|
222
|
-
###
|
|
160
|
+
### Component -> API
|
|
223
161
|
|
|
224
162
|
```bash
|
|
225
163
|
grep -E "fetch\(['\"].*$api_path|axios\.(get|post).*$api_path" "$component" 2>/dev/null
|
|
@@ -228,7 +166,7 @@ grep -A 5 "fetch\|axios" "$component" | grep -E "await|\.then|setData|setState"
|
|
|
228
166
|
|
|
229
167
|
Status: WIRED (call + response handling) | PARTIAL (call, no response use) | NOT_WIRED (no call)
|
|
230
168
|
|
|
231
|
-
###
|
|
169
|
+
### API -> Database
|
|
232
170
|
|
|
233
171
|
```bash
|
|
234
172
|
grep -E "prisma\.$model|db\.$model|$model\.(find|create|update|delete)" "$route" 2>/dev/null
|
|
@@ -237,7 +175,7 @@ grep -E "return.*json.*\w+|res\.json\(\w+" "$route" 2>/dev/null
|
|
|
237
175
|
|
|
238
176
|
Status: WIRED (query + result returned) | PARTIAL (query, static return) | NOT_WIRED (no query)
|
|
239
177
|
|
|
240
|
-
###
|
|
178
|
+
### Form -> Handler
|
|
241
179
|
|
|
242
180
|
```bash
|
|
243
181
|
grep -E "onSubmit=\{|handleSubmit" "$component" 2>/dev/null
|
|
@@ -246,7 +184,7 @@ grep -A 10 "onSubmit.*=" "$component" | grep -E "fetch|axios|mutate|dispatch" 2>
|
|
|
246
184
|
|
|
247
185
|
Status: WIRED (handler + API call) | STUB (only logs/preventDefault) | NOT_WIRED (no handler)
|
|
248
186
|
|
|
249
|
-
###
|
|
187
|
+
### State -> Render
|
|
250
188
|
|
|
251
189
|
```bash
|
|
252
190
|
grep -E "useState.*$state_var|\[$state_var," "$component" 2>/dev/null
|
|
@@ -255,37 +193,27 @@ grep -E "\{.*$state_var.*\}|\{$state_var\." "$component" 2>/dev/null
|
|
|
255
193
|
|
|
256
194
|
Status: WIRED (state displayed) | NOT_WIRED (state exists, not rendered)
|
|
257
195
|
|
|
258
|
-
## Step 6:
|
|
196
|
+
## Step 6: Requirements Coverage
|
|
259
197
|
|
|
260
|
-
**6a. Extract requirement IDs
|
|
198
|
+
**6a. Extract requirement IDs:**
|
|
261
199
|
|
|
262
200
|
```bash
|
|
263
201
|
grep -A5 "^requirements:" "$PHASE_DIR"/*-PLAN.md 2>/dev/null
|
|
264
202
|
```
|
|
265
203
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
**6b. Cross-reference against REQUIREMENTS.md:**
|
|
204
|
+
**6b. Cross-reference REQUIREMENTS.md:** Per ID: find description, map to verified truths/artifacts, assign status: SATISFIED | BLOCKED | ? NEEDS HUMAN
|
|
269
205
|
|
|
270
|
-
|
|
271
|
-
1. Find its full description in REQUIREMENTS.md (`**REQ-ID**: description`)
|
|
272
|
-
2. Map to supporting truths/artifacts verified in Steps 3-5
|
|
273
|
-
3. Determine status:
|
|
274
|
-
- ✓ SATISFIED: Implementation evidence found that fulfills the requirement
|
|
275
|
-
- ✗ BLOCKED: No evidence or contradicting evidence
|
|
276
|
-
- ? NEEDS HUMAN: Can't verify programmatically (UI behavior, UX quality)
|
|
277
|
-
|
|
278
|
-
**6c. Check for orphaned requirements:**
|
|
206
|
+
**6c. Orphaned requirements:**
|
|
279
207
|
|
|
280
208
|
```bash
|
|
281
209
|
grep -E "Phase $PHASE_NUM" .planning/REQUIREMENTS.md 2>/dev/null
|
|
282
210
|
```
|
|
283
211
|
|
|
284
|
-
|
|
212
|
+
IDs mapped to this phase in REQUIREMENTS.md but not in any plan's `requirements` -> flag **ORPHANED**. Must appear in report.
|
|
285
213
|
|
|
286
|
-
## Step 7:
|
|
214
|
+
## Step 7: Anti-Pattern Scan
|
|
287
215
|
|
|
288
|
-
Identify
|
|
216
|
+
Identify modified files:
|
|
289
217
|
|
|
290
218
|
```bash
|
|
291
219
|
# Option 1: Extract from SUMMARY frontmatter
|
|
@@ -301,7 +229,7 @@ fi
|
|
|
301
229
|
grep -E "^\- \`" "$PHASE_DIR"/*-SUMMARY.md | sed 's/.*`\([^`]*\)`.*/\1/' | sort -u
|
|
302
230
|
```
|
|
303
231
|
|
|
304
|
-
|
|
232
|
+
Per file:
|
|
305
233
|
|
|
306
234
|
```bash
|
|
307
235
|
# TODO/FIXME/placeholder comments
|
|
@@ -313,13 +241,12 @@ grep -n -E "return null|return \{\}|return \[\]|=> \{\}" "$file" 2>/dev/null
|
|
|
313
241
|
grep -n -B 2 -A 2 "console\.log" "$file" 2>/dev/null | grep -E "^\s*(const|function|=>)"
|
|
314
242
|
```
|
|
315
243
|
|
|
316
|
-
Categorize:
|
|
317
|
-
|
|
318
|
-
## Step 8: Identify Human Verification Needs
|
|
244
|
+
Categorize: Blocker (prevents goal) | Warning (incomplete) | Info (notable)
|
|
319
245
|
|
|
320
|
-
|
|
246
|
+
## Step 8: Human Verification Needs
|
|
321
247
|
|
|
322
|
-
**
|
|
248
|
+
**Always human:** Visual appearance, user flows, real-time behavior, external services, performance, error clarity.
|
|
249
|
+
**Human if uncertain:** Complex wiring, dynamic state, edge cases.
|
|
323
250
|
|
|
324
251
|
**Format:**
|
|
325
252
|
|
|
@@ -331,19 +258,17 @@ Categorize: 🛑 Blocker (prevents goal) | ⚠️ Warning (incomplete) | ℹ️
|
|
|
331
258
|
**Why human:** {Why can't verify programmatically}
|
|
332
259
|
```
|
|
333
260
|
|
|
334
|
-
## Step 9:
|
|
261
|
+
## Step 9: Overall Status
|
|
335
262
|
|
|
336
|
-
**
|
|
263
|
+
- **passed** — All truths VERIFIED, artifacts pass 3 levels, links WIRED, no blockers
|
|
264
|
+
- **gaps_found** — Any FAILED/MISSING/STUB/NOT_WIRED or blockers
|
|
265
|
+
- **human_needed** — Automated checks pass, human items remain
|
|
337
266
|
|
|
338
|
-
|
|
267
|
+
Score: `verified_truths / total_truths`
|
|
339
268
|
|
|
340
|
-
|
|
269
|
+
## Step 10: Gap Output (If Gaps Found)
|
|
341
270
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
## Step 10: Structure Gap Output (If Gaps Found)
|
|
345
|
-
|
|
346
|
-
Structure gaps in YAML frontmatter for `/vector:plan-phase --gaps`:
|
|
271
|
+
YAML frontmatter for `/vector:plan-phase --gaps`:
|
|
347
272
|
|
|
348
273
|
```yaml
|
|
349
274
|
gaps:
|
|
@@ -357,13 +282,7 @@ gaps:
|
|
|
357
282
|
- "Specific thing to add/fix"
|
|
358
283
|
```
|
|
359
284
|
|
|
360
|
-
|
|
361
|
-
- `status`: failed | partial
|
|
362
|
-
- `reason`: Brief explanation
|
|
363
|
-
- `artifacts`: Files with issues
|
|
364
|
-
- `missing`: Specific things to add/fix
|
|
365
|
-
|
|
366
|
-
**Group related gaps by concern** — if multiple truths fail from the same root cause, note this to help the planner create focused plans.
|
|
285
|
+
Group related gaps by shared root cause to help planner create focused plans.
|
|
367
286
|
|
|
368
287
|
</verification_process>
|
|
369
288
|
|
|
@@ -371,9 +290,7 @@ gaps:
|
|
|
371
290
|
|
|
372
291
|
## Create VERIFICATION.md
|
|
373
292
|
|
|
374
|
-
**
|
|
375
|
-
|
|
376
|
-
Create `.planning/phases/{phase_dir}/{phase_num}-VERIFICATION.md`:
|
|
293
|
+
**Use Write tool only** — never heredoc/`cat << EOF`. Write to `.planning/phases/{phase_dir}/{phase_num}-VERIFICATION.md`:
|
|
377
294
|
|
|
378
295
|
```markdown
|
|
379
296
|
---
|
|
@@ -458,9 +375,7 @@ _Verifier: Claude (vector-verifier)_
|
|
|
458
375
|
|
|
459
376
|
## Return to Orchestrator
|
|
460
377
|
|
|
461
|
-
**DO NOT COMMIT.**
|
|
462
|
-
|
|
463
|
-
Return with:
|
|
378
|
+
**DO NOT COMMIT.** Orchestrator handles bundling. Return:
|
|
464
379
|
|
|
465
380
|
```markdown
|
|
466
381
|
## Verification Complete
|
|
@@ -493,19 +408,13 @@ Automated checks passed. Awaiting human verification.
|
|
|
493
408
|
|
|
494
409
|
<critical_rules>
|
|
495
410
|
|
|
496
|
-
**DO NOT trust SUMMARY claims.** Verify
|
|
497
|
-
|
|
498
|
-
**DO NOT
|
|
499
|
-
|
|
500
|
-
**
|
|
501
|
-
|
|
502
|
-
**
|
|
503
|
-
|
|
504
|
-
**DO flag for human verification when uncertain** (visual, real-time, external service).
|
|
505
|
-
|
|
506
|
-
**Keep verification fast.** Use grep/file checks, not running the app.
|
|
507
|
-
|
|
508
|
-
**DO NOT commit.** Leave committing to the orchestrator.
|
|
411
|
+
- **DO NOT trust SUMMARY claims.** Verify actual rendering, not placeholders.
|
|
412
|
+
- **DO NOT assume existence = implementation.** Need level 2 (substantive) and level 3 (wired).
|
|
413
|
+
- **DO NOT skip key link verification.** 80% of stubs hide in unwired connections.
|
|
414
|
+
- **Structure gaps in YAML frontmatter** for `/vector:plan-phase --gaps`.
|
|
415
|
+
- **Flag for human verification when uncertain** (visual, real-time, external service).
|
|
416
|
+
- **Keep verification fast.** Use grep/file checks, not running the app.
|
|
417
|
+
- **DO NOT commit.** Leave committing to the orchestrator.
|
|
509
418
|
|
|
510
419
|
</critical_rules>
|
|
511
420
|
|
|
@@ -577,3 +486,4 @@ return <div>No messages</div> // Always shows "no messages"
|
|
|
577
486
|
- [ ] VERIFICATION.md created with complete report
|
|
578
487
|
- [ ] Results returned to orchestrator (NOT committed)
|
|
579
488
|
</success_criteria>
|
|
489
|
+
</output>
|
package/bin/install.cjs
CHANGED
|
@@ -19,10 +19,10 @@ const reset = '\x1b[0m';
|
|
|
19
19
|
const bold = '\x1b[1m';
|
|
20
20
|
const purple = '\x1b[38;5;135m';
|
|
21
21
|
// Codex config.toml constants
|
|
22
|
-
const
|
|
22
|
+
const VECTOR_CODEX_MARKER = '# Vector Agent Configuration \u2014 managed by core installer';
|
|
23
23
|
// Copilot instructions marker constants
|
|
24
|
-
const
|
|
25
|
-
const
|
|
24
|
+
const VECTOR_COPILOT_INSTRUCTIONS_MARKER = '<!-- Vector Configuration \u2014 managed by core installer -->';
|
|
25
|
+
const VECTOR_COPILOT_INSTRUCTIONS_CLOSE_MARKER = '<!-- /Vector Configuration -->';
|
|
26
26
|
const CODEX_AGENT_SANDBOX = {
|
|
27
27
|
'vector-executor': 'workspace-write',
|
|
28
28
|
'vector-planner': 'workspace-write',
|
|
@@ -253,7 +253,7 @@ const banner = '\n' +
|
|
|
253
253
|
bold + purple + ' VECTOR' + reset + dim + ' by Mobiman' + reset + '\n' +
|
|
254
254
|
'\n' +
|
|
255
255
|
dim + ' v' + package_json_1.default.version + reset + '\n' +
|
|
256
|
-
'
|
|
256
|
+
' An open-source spec-driven system for building mobile apps with Claude\n';
|
|
257
257
|
// Parse --config-dir argument
|
|
258
258
|
function parseConfigDirArg() {
|
|
259
259
|
const configDirIndex = args.findIndex(arg => arg === '--config-dir' || arg === '-c');
|
|
@@ -801,7 +801,7 @@ function generateCodexAgentToml(agentName, agentContent) {
|
|
|
801
801
|
*/
|
|
802
802
|
function generateCodexConfigBlock(agents) {
|
|
803
803
|
const lines = [
|
|
804
|
-
|
|
804
|
+
VECTOR_CODEX_MARKER,
|
|
805
805
|
'',
|
|
806
806
|
];
|
|
807
807
|
for (const { name, description } of agents) {
|
|
@@ -816,8 +816,8 @@ function generateCodexConfigBlock(agents) {
|
|
|
816
816
|
* Strip Vector sections from Codex config.toml content.
|
|
817
817
|
* Returns cleaned content, or null if file would be empty.
|
|
818
818
|
*/
|
|
819
|
-
function
|
|
820
|
-
const markerIndex = content.indexOf(
|
|
819
|
+
function stripVectorFromCodexConfig(content) {
|
|
820
|
+
const markerIndex = content.indexOf(VECTOR_CODEX_MARKER);
|
|
821
821
|
if (markerIndex !== -1) {
|
|
822
822
|
// Has Vector marker — remove everything from marker to EOF
|
|
823
823
|
let before = content.substring(0, markerIndex).trimEnd();
|
|
@@ -857,7 +857,7 @@ function mergeCodexConfig(configPath, vectorBlock) {
|
|
|
857
857
|
return;
|
|
858
858
|
}
|
|
859
859
|
const existing = fs_1.default.readFileSync(configPath, 'utf8');
|
|
860
|
-
const markerIndex = existing.indexOf(
|
|
860
|
+
const markerIndex = existing.indexOf(VECTOR_CODEX_MARKER);
|
|
861
861
|
// Case 2: Has Vector marker — truncate and re-append
|
|
862
862
|
if (markerIndex !== -1) {
|
|
863
863
|
let before = existing.substring(0, markerIndex).trimEnd();
|
|
@@ -885,21 +885,21 @@ function mergeCodexConfig(configPath, vectorBlock) {
|
|
|
885
885
|
* @param {string} vectorContent - Template content (without markers)
|
|
886
886
|
*/
|
|
887
887
|
function mergeCopilotInstructions(filePath, vectorContent) {
|
|
888
|
-
const vectorBlock =
|
|
888
|
+
const vectorBlock = VECTOR_COPILOT_INSTRUCTIONS_MARKER + '\n' +
|
|
889
889
|
vectorContent.trim() + '\n' +
|
|
890
|
-
|
|
890
|
+
VECTOR_COPILOT_INSTRUCTIONS_CLOSE_MARKER;
|
|
891
891
|
// Case 1: No file — create fresh
|
|
892
892
|
if (!fs_1.default.existsSync(filePath)) {
|
|
893
893
|
fs_1.default.writeFileSync(filePath, vectorBlock + '\n');
|
|
894
894
|
return;
|
|
895
895
|
}
|
|
896
896
|
const existing = fs_1.default.readFileSync(filePath, 'utf8');
|
|
897
|
-
const openIndex = existing.indexOf(
|
|
898
|
-
const closeIndex = existing.indexOf(
|
|
897
|
+
const openIndex = existing.indexOf(VECTOR_COPILOT_INSTRUCTIONS_MARKER);
|
|
898
|
+
const closeIndex = existing.indexOf(VECTOR_COPILOT_INSTRUCTIONS_CLOSE_MARKER);
|
|
899
899
|
// Case 2: Has Vector markers — replace between markers
|
|
900
900
|
if (openIndex !== -1 && closeIndex !== -1) {
|
|
901
901
|
const before = existing.substring(0, openIndex).trimEnd();
|
|
902
|
-
const after = existing.substring(closeIndex +
|
|
902
|
+
const after = existing.substring(closeIndex + VECTOR_COPILOT_INSTRUCTIONS_CLOSE_MARKER.length).trimStart();
|
|
903
903
|
let newContent = '';
|
|
904
904
|
if (before)
|
|
905
905
|
newContent += before + '\n\n';
|
|
@@ -920,12 +920,12 @@ function mergeCopilotInstructions(filePath, vectorContent) {
|
|
|
920
920
|
* @param {string} content - File content
|
|
921
921
|
* @returns {string|null} - Cleaned content or null if empty
|
|
922
922
|
*/
|
|
923
|
-
function
|
|
924
|
-
const openIndex = content.indexOf(
|
|
925
|
-
const closeIndex = content.indexOf(
|
|
923
|
+
function stripVectorFromCopilotInstructions(content) {
|
|
924
|
+
const openIndex = content.indexOf(VECTOR_COPILOT_INSTRUCTIONS_MARKER);
|
|
925
|
+
const closeIndex = content.indexOf(VECTOR_COPILOT_INSTRUCTIONS_CLOSE_MARKER);
|
|
926
926
|
if (openIndex !== -1 && closeIndex !== -1) {
|
|
927
927
|
const before = content.substring(0, openIndex).trimEnd();
|
|
928
|
-
const after = content.substring(closeIndex +
|
|
928
|
+
const after = content.substring(closeIndex + VECTOR_COPILOT_INSTRUCTIONS_CLOSE_MARKER.length).trimStart();
|
|
929
929
|
const cleaned = (before + (before && after ? '\n\n' : '') + after).trim();
|
|
930
930
|
if (!cleaned)
|
|
931
931
|
return null;
|
|
@@ -945,12 +945,12 @@ function installCodexConfig(targetDir, agentsSrc) {
|
|
|
945
945
|
const agentEntries = fs_1.default.readdirSync(agentsSrc).filter(f => f.startsWith('vector-') && f.endsWith('.md'));
|
|
946
946
|
const agents = [];
|
|
947
947
|
// Compute the Codex Vector install path (absolute, so subagents with empty $HOME work — #820)
|
|
948
|
-
const
|
|
948
|
+
const codexVectorPath = `${path_1.default.resolve(targetDir, 'core').replace(/\\/g, '/')}/`;
|
|
949
949
|
for (const file of agentEntries) {
|
|
950
950
|
let content = fs_1.default.readFileSync(path_1.default.join(agentsSrc, file), 'utf8');
|
|
951
951
|
// Replace full .claude/core prefix so path resolves to codex Vector install
|
|
952
|
-
content = content.replace(/~\/\.claude\/core\//g,
|
|
953
|
-
content = content.replace(/\$HOME\/\.claude\/core\//g,
|
|
952
|
+
content = content.replace(/~\/\.claude\/core\//g, codexVectorPath);
|
|
953
|
+
content = content.replace(/\$HOME\/\.claude\/core\//g, codexVectorPath);
|
|
954
954
|
const { frontmatter } = extractFrontmatterAndBody(content);
|
|
955
955
|
const name = (frontmatter ? extractFrontmatterField(frontmatter, 'name') : null) || file.replace('.md', '');
|
|
956
956
|
const description = (frontmatter ? extractFrontmatterField(frontmatter, 'description') : null) || '';
|
|
@@ -1658,7 +1658,7 @@ function uninstall(isGlobal, runtime = 'claude') {
|
|
|
1658
1658
|
const configPath = path_1.default.join(targetDir, 'config.toml');
|
|
1659
1659
|
if (fs_1.default.existsSync(configPath)) {
|
|
1660
1660
|
const content = fs_1.default.readFileSync(configPath, 'utf8');
|
|
1661
|
-
const cleaned =
|
|
1661
|
+
const cleaned = stripVectorFromCodexConfig(content);
|
|
1662
1662
|
if (cleaned === null) {
|
|
1663
1663
|
// File is empty after stripping — delete it
|
|
1664
1664
|
fs_1.default.unlinkSync(configPath);
|
|
@@ -1693,7 +1693,7 @@ function uninstall(isGlobal, runtime = 'claude') {
|
|
|
1693
1693
|
const instructionsPath = path_1.default.join(targetDir, 'copilot-instructions.md');
|
|
1694
1694
|
if (fs_1.default.existsSync(instructionsPath)) {
|
|
1695
1695
|
const content = fs_1.default.readFileSync(instructionsPath, 'utf8');
|
|
1696
|
-
const cleaned =
|
|
1696
|
+
const cleaned = stripVectorFromCopilotInstructions(content);
|
|
1697
1697
|
if (cleaned === null) {
|
|
1698
1698
|
fs_1.default.unlinkSync(instructionsPath);
|
|
1699
1699
|
removedCount++;
|
|
@@ -1809,8 +1809,8 @@ function uninstall(isGlobal, runtime = 'claude') {
|
|
|
1809
1809
|
const e = entry;
|
|
1810
1810
|
if (e.hooks && Array.isArray(e.hooks)) {
|
|
1811
1811
|
// Filter out Vector hooks
|
|
1812
|
-
const
|
|
1813
|
-
return !
|
|
1812
|
+
const hasVectorHook = e.hooks.some((h) => h.command && (h.command.includes('vector-check-update') || h.command.includes('vector-statusline')));
|
|
1813
|
+
return !hasVectorHook;
|
|
1814
1814
|
}
|
|
1815
1815
|
return true;
|
|
1816
1816
|
});
|
|
@@ -1830,8 +1830,8 @@ function uninstall(isGlobal, runtime = 'claude') {
|
|
|
1830
1830
|
settingsHooks[eventName] = settingsHooks[eventName].filter(entry => {
|
|
1831
1831
|
const e = entry;
|
|
1832
1832
|
if (e.hooks && Array.isArray(e.hooks)) {
|
|
1833
|
-
const
|
|
1834
|
-
return !
|
|
1833
|
+
const hasVectorHook = e.hooks.some((h) => h.command && h.command.includes('vector-context-monitor'));
|
|
1834
|
+
return !hasVectorHook;
|
|
1835
1835
|
}
|
|
1836
1836
|
return true;
|
|
1837
1837
|
});
|
|
@@ -2578,11 +2578,11 @@ function install(isGlobal, runtime = 'claude') {
|
|
|
2578
2578
|
if (!hooksMap.SessionStart) {
|
|
2579
2579
|
hooksMap.SessionStart = [];
|
|
2580
2580
|
}
|
|
2581
|
-
const
|
|
2581
|
+
const hasVectorUpdateHook = hooksMap.SessionStart.some((entry) => {
|
|
2582
2582
|
const e = entry;
|
|
2583
2583
|
return e.hooks && Array.isArray(e.hooks) && e.hooks.some((h) => h.command && h.command.includes('vector-check-update'));
|
|
2584
2584
|
});
|
|
2585
|
-
if (!
|
|
2585
|
+
if (!hasVectorUpdateHook) {
|
|
2586
2586
|
hooksMap.SessionStart.push({
|
|
2587
2587
|
hooks: [
|
|
2588
2588
|
{
|
|
@@ -2660,7 +2660,7 @@ function finishInstall(settingsPath, settings, statuslineCommand, shouldInstallS
|
|
|
2660
2660
|
console.log(`
|
|
2661
2661
|
${green}Done!${reset} Open a blank directory in ${program} and run ${cyan}${command}${reset}.
|
|
2662
2662
|
|
|
2663
|
-
${cyan}Join the community:${reset} https://discord.gg/
|
|
2663
|
+
${cyan}Join the community:${reset} https://discord.gg/rkU8UTu7dY
|
|
2664
2664
|
`);
|
|
2665
2665
|
}
|
|
2666
2666
|
/**
|
|
@@ -2827,12 +2827,12 @@ if (process.env.VECTOR_TEST_MODE) {
|
|
|
2827
2827
|
convertClaudeAgentToCodexAgent,
|
|
2828
2828
|
generateCodexAgentToml,
|
|
2829
2829
|
generateCodexConfigBlock,
|
|
2830
|
-
|
|
2830
|
+
stripVectorFromCodexConfig,
|
|
2831
2831
|
mergeCodexConfig,
|
|
2832
2832
|
installCodexConfig,
|
|
2833
2833
|
convertClaudeCommandToCodexSkill,
|
|
2834
2834
|
convertClaudeToOpencodeFrontmatter,
|
|
2835
|
-
|
|
2835
|
+
VECTOR_CODEX_MARKER,
|
|
2836
2836
|
CODEX_AGENT_SANDBOX,
|
|
2837
2837
|
getDirName,
|
|
2838
2838
|
getGlobalDir,
|
|
@@ -2843,10 +2843,10 @@ if (process.env.VECTOR_TEST_MODE) {
|
|
|
2843
2843
|
convertClaudeCommandToCopilotSkill,
|
|
2844
2844
|
convertClaudeAgentToCopilotAgent,
|
|
2845
2845
|
copyCommandsAsCopilotSkills,
|
|
2846
|
-
|
|
2847
|
-
|
|
2846
|
+
VECTOR_COPILOT_INSTRUCTIONS_MARKER,
|
|
2847
|
+
VECTOR_COPILOT_INSTRUCTIONS_CLOSE_MARKER,
|
|
2848
2848
|
mergeCopilotInstructions,
|
|
2849
|
-
|
|
2849
|
+
stripVectorFromCopilotInstructions,
|
|
2850
2850
|
convertClaudeToAntigravityContent,
|
|
2851
2851
|
convertClaudeCommandToAntigravitySkill,
|
|
2852
2852
|
convertClaudeAgentToAntigravityAgent,
|