vexp-cli 2.0.20 → 2.0.22
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/dist/agent-config.js +193 -118
- package/mcp/mcp-server.cjs +49 -45
- package/package.json +6 -6
package/dist/agent-config.js
CHANGED
|
@@ -16,7 +16,7 @@ import { VEXP_GUARD_HOOK } from "./hook-template.js";
|
|
|
16
16
|
// ---------------------------------------------------------------------------
|
|
17
17
|
const VEXP_MARKER_RE = /<!-- vexp(?:\s+v[\d.]+)? -->/;
|
|
18
18
|
const VEXP_MARKER_END = "<!-- /vexp -->";
|
|
19
|
-
// Matches LEGACY vexp entry keys ONLY
|
|
19
|
+
// Matches LEGACY vexp entry keys ONLY - "vexp-mcp", "vexp-core", "vexp-stdio",
|
|
20
20
|
// "vexp_old", etc. Explicitly excludes the canonical "vexp" key so that idempotency
|
|
21
21
|
// checks (command+args+env identical?) work: we only remove siblings, not the entry
|
|
22
22
|
// we're about to upsert.
|
|
@@ -73,10 +73,10 @@ function logRemoval(removed) {
|
|
|
73
73
|
if (removed.length === 0)
|
|
74
74
|
return;
|
|
75
75
|
for (const entry of removed) {
|
|
76
|
-
process.stdout.write(`
|
|
76
|
+
process.stdout.write(` - Removed legacy entry: ${entry}\n`);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
// All vexp MCP tools (all read-only
|
|
79
|
+
// All vexp MCP tools (all read-only - safe to pre-approve).
|
|
80
80
|
const VEXP_TOOLS = [
|
|
81
81
|
"run_pipeline",
|
|
82
82
|
"get_context_capsule",
|
|
@@ -92,7 +92,7 @@ const VEXP_TOOLS = [
|
|
|
92
92
|
"get_token_savings",
|
|
93
93
|
];
|
|
94
94
|
// ---------------------------------------------------------------------------
|
|
95
|
-
// Agent detectors
|
|
95
|
+
// Agent detectors - mirrors VS Code extension's AGENT_DETECTORS
|
|
96
96
|
// ---------------------------------------------------------------------------
|
|
97
97
|
const AGENT_DETECTORS = [
|
|
98
98
|
{
|
|
@@ -396,10 +396,10 @@ export function configureSelectedAgents(workspaceRoot, binaryPath, version, sele
|
|
|
396
396
|
return { agents: results, mcpConfigs };
|
|
397
397
|
}
|
|
398
398
|
// ---------------------------------------------------------------------------
|
|
399
|
-
// File helpers
|
|
399
|
+
// File helpers - ported from agent-auto-config.ts
|
|
400
400
|
// ---------------------------------------------------------------------------
|
|
401
401
|
/**
|
|
402
|
-
* Parse JSON that may use JSONC syntax
|
|
402
|
+
* Parse JSON that may use JSONC syntax - `//` and slash-star comments and
|
|
403
403
|
* trailing commas. VS Code mcp.json and Zed settings.json are JSONC, so a raw
|
|
404
404
|
* JSON.parse throws on perfectly valid user files. Strips comments and trailing
|
|
405
405
|
* commas (preserving string contents) before parsing.
|
|
@@ -492,7 +492,7 @@ function backupConfig(filePath) {
|
|
|
492
492
|
}
|
|
493
493
|
/** Warn that we refused to touch an unparseable config file. */
|
|
494
494
|
function warnUnparseable(filePath) {
|
|
495
|
-
process.stderr.write(`
|
|
495
|
+
process.stderr.write(` [!] ${filePath} could not be parsed - leaving it untouched. Fix the file or add vexp manually, then re-run setup.\n`);
|
|
496
496
|
}
|
|
497
497
|
function appendOrCreate(filePath, content, version) {
|
|
498
498
|
if (!fs.existsSync(filePath)) {
|
|
@@ -518,7 +518,7 @@ function appendOrCreate(filePath, content, version) {
|
|
|
518
518
|
if (endIdx !== -1) {
|
|
519
519
|
const existingSection = existing.substring(startIdx, endIdx + VEXP_MARKER_END.length);
|
|
520
520
|
if (existingSection === content)
|
|
521
|
-
return "skipped"; // truly identical
|
|
521
|
+
return "skipped"; // truly identical -> no write
|
|
522
522
|
const before = existing.substring(0, startIdx);
|
|
523
523
|
const after = existing.substring(endIdx + VEXP_MARKER_END.length);
|
|
524
524
|
fs.writeFileSync(filePath, before + content + after, "utf-8");
|
|
@@ -554,7 +554,7 @@ export function mergeJsonConfig(filePath, mergePayload, version) {
|
|
|
554
554
|
}
|
|
555
555
|
delete merged.__vexp;
|
|
556
556
|
merged.__vexp_version = version;
|
|
557
|
-
// Compare serialized output
|
|
557
|
+
// Compare serialized output - skip if truly identical
|
|
558
558
|
const mergedStr = JSON.stringify(merged, null, 2);
|
|
559
559
|
const existingStr = JSON.stringify(existing, null, 2);
|
|
560
560
|
if (mergedStr === existingStr)
|
|
@@ -566,7 +566,7 @@ export function mergeJsonConfig(filePath, mergePayload, version) {
|
|
|
566
566
|
return "merged";
|
|
567
567
|
}
|
|
568
568
|
// ---------------------------------------------------------------------------
|
|
569
|
-
// MCP config writers
|
|
569
|
+
// MCP config writers - adapted for Rust binary path
|
|
570
570
|
// ---------------------------------------------------------------------------
|
|
571
571
|
/**
|
|
572
572
|
* Write MCP config JSON for agents that use mcpServers format (Cursor, Windsurf).
|
|
@@ -655,49 +655,124 @@ function readMcpPort(workspaceRoot) {
|
|
|
655
655
|
}
|
|
656
656
|
return DEFAULT_PORT;
|
|
657
657
|
}
|
|
658
|
+
// Marker placed inside a vexp-generated [mcp_servers.vexp] section so we can
|
|
659
|
+
// tell OUR config apart from a config the user hand-wrote. Must stay in sync
|
|
660
|
+
// with packages/vexp-vscode/src/providers/agent-auto-config.ts.
|
|
661
|
+
const CODEX_MANAGED_MARKER = "# vexp-managed";
|
|
662
|
+
/** Quote a value as a TOML literal string (single quotes, no escaping) so
|
|
663
|
+
* Windows paths work verbatim. Falls back to a basic escaped string if the
|
|
664
|
+
* value contains a single quote. */
|
|
665
|
+
function tomlString(value) {
|
|
666
|
+
if (!value.includes("'"))
|
|
667
|
+
return `'${value}'`;
|
|
668
|
+
return `"${value.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
669
|
+
}
|
|
670
|
+
/** Extract the existing canonical [mcp_servers.vexp] block (incl. subsections). */
|
|
671
|
+
function extractCodexVexpSection(content) {
|
|
672
|
+
const m = content.match(CANONICAL_VEXP_TOML_SECTION_RE);
|
|
673
|
+
return m ? m.join("\n") : "";
|
|
674
|
+
}
|
|
675
|
+
/** True when the existing [mcp_servers.vexp] section was written by the user
|
|
676
|
+
* (not by vexp) and must NOT be overwritten. */
|
|
677
|
+
function isUserManagedCodexSection(section) {
|
|
678
|
+
if (!section)
|
|
679
|
+
return false;
|
|
680
|
+
if (section.includes(CODEX_MANAGED_MARKER))
|
|
681
|
+
return false; // ours
|
|
682
|
+
if (/^\s*command\s*=/m.test(section))
|
|
683
|
+
return true; // hand-written direct config
|
|
684
|
+
const localUrl = /^\s*url\s*=\s*"https?:\/\/127\.0\.0\.1[:/]/m.test(section);
|
|
685
|
+
const anyUrl = /^\s*url\s*=/m.test(section);
|
|
686
|
+
if (anyUrl && !localUrl)
|
|
687
|
+
return true; // points elsewhere
|
|
688
|
+
return false;
|
|
689
|
+
}
|
|
690
|
+
/** Build the canonical [mcp_servers.vexp] section for the chosen transport.
|
|
691
|
+
* Returns null for `direct` when no usable core binary is available. */
|
|
692
|
+
function buildCodexSection(opts) {
|
|
693
|
+
if (opts.transport === "direct") {
|
|
694
|
+
if (!opts.coreBinaryPath)
|
|
695
|
+
return null;
|
|
696
|
+
const lines = [
|
|
697
|
+
"",
|
|
698
|
+
"[mcp_servers.vexp]",
|
|
699
|
+
`${CODEX_MANAGED_MARKER}: direct transport (set VEXP_CODEX_TRANSPORT=http for the HTTP supervisor)`,
|
|
700
|
+
`command = ${tomlString(opts.coreBinaryPath)}`,
|
|
701
|
+
`args = ["mcp"]`,
|
|
702
|
+
];
|
|
703
|
+
if (opts.workspaceRoot)
|
|
704
|
+
lines.push(`cwd = ${tomlString(opts.workspaceRoot)}`);
|
|
705
|
+
lines.push("tool_timeout_sec = 120", "", "[mcp_servers.vexp.env]");
|
|
706
|
+
if (opts.workspaceRoot)
|
|
707
|
+
lines.push(`VEXP_WORKSPACE = ${tomlString(opts.workspaceRoot)}`);
|
|
708
|
+
if (opts.home)
|
|
709
|
+
lines.push(`VEXP_HOME = ${tomlString(opts.home)}`);
|
|
710
|
+
lines.push("");
|
|
711
|
+
return lines.join("\n");
|
|
712
|
+
}
|
|
713
|
+
const wsHash = opts.workspaceRoot ? workspaceHash(opts.workspaceRoot) : "";
|
|
714
|
+
const urlPath = wsHash ? `/ws/${wsHash}/mcp` : "/mcp";
|
|
715
|
+
const desiredUrl = `http://127.0.0.1:${opts.mcpPort}${urlPath}`;
|
|
716
|
+
return `\n[mcp_servers.vexp]\n${CODEX_MANAGED_MARKER}: http transport (set VEXP_CODEX_TRANSPORT=direct for stdio)\nurl = "${desiredUrl}"\ntool_timeout_sec = 120\n\n[mcp_servers.vexp.http_headers]\nAuthorization = "Bearer ${opts.token}"\n`;
|
|
717
|
+
}
|
|
658
718
|
/**
|
|
659
719
|
* Configure MCP in ~/.codex/config.toml (global).
|
|
660
720
|
* Codex only reads the global config, not project-level .codex/config.toml.
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
721
|
+
*
|
|
722
|
+
* Default transport is `direct` (stdio: `vexp-core mcp`), which works with AND
|
|
723
|
+
* without VS Code/daemon: `vexp-core mcp` auto-proxies to a running daemon when
|
|
724
|
+
* reachable and otherwise runs an embedded in-process index. Override with the
|
|
725
|
+
* VEXP_CODEX_TRANSPORT env var ("direct" | "http").
|
|
726
|
+
*
|
|
727
|
+
* Never clobbers a config the user wrote by hand.
|
|
664
728
|
*/
|
|
665
|
-
function configureCodexGlobal(binaryPath,
|
|
729
|
+
export function configureCodexGlobal(binaryPath, _mcpServerPath, workspaceRoot) {
|
|
666
730
|
const home = os.homedir();
|
|
667
731
|
if (!home)
|
|
668
732
|
return false;
|
|
669
733
|
const configPath = path.join(home, ".codex", "config.toml");
|
|
670
734
|
const mcpPort = readMcpPort(workspaceRoot);
|
|
671
735
|
const token = resolveCodexToken();
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
const desiredUrl = `http://127.0.0.1:${mcpPort}${urlPath}`;
|
|
678
|
-
const newSection = `\n[mcp_servers.vexp]\nurl = "${desiredUrl}"\ntool_timeout_sec = 120\n\n[mcp_servers.vexp.http_headers]\nAuthorization = "Bearer ${token}"\n`;
|
|
736
|
+
const requested = (process.env.VEXP_CODEX_TRANSPORT ?? "direct").toLowerCase();
|
|
737
|
+
let transport = requested === "http" ? "http" : "direct";
|
|
738
|
+
if (transport === "direct" && !(binaryPath && fs.existsSync(binaryPath))) {
|
|
739
|
+
transport = "http";
|
|
740
|
+
}
|
|
679
741
|
let content = "";
|
|
680
|
-
if (fs.existsSync(configPath))
|
|
742
|
+
if (fs.existsSync(configPath))
|
|
681
743
|
content = fs.readFileSync(configPath, "utf-8");
|
|
682
|
-
|
|
744
|
+
const original = content;
|
|
683
745
|
fs.mkdirSync(path.dirname(configPath), { recursive: true });
|
|
684
746
|
// Step 1: strip LEGACY vexp-* sections (not the canonical one).
|
|
685
747
|
const beforeLegacy = content.length;
|
|
686
748
|
content = content.replace(LEGACY_VEXP_TOML_SECTION_RE, "");
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
process.stdout.write(` · Removed legacy codex entries from ${configPath}\n`);
|
|
749
|
+
if (content.length !== beforeLegacy) {
|
|
750
|
+
process.stdout.write(` - Removed legacy codex entries from ${configPath}\n`);
|
|
690
751
|
}
|
|
691
|
-
// Step 2:
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
content
|
|
695
|
-
|
|
752
|
+
// Step 2: no-clobber — leave a hand-written [mcp_servers.vexp] alone.
|
|
753
|
+
const existingSection = extractCodexVexpSection(content);
|
|
754
|
+
if (isUserManagedCodexSection(existingSection)) {
|
|
755
|
+
if (content !== original) {
|
|
756
|
+
backupConfig(configPath);
|
|
757
|
+
fs.writeFileSync(configPath, content, "utf-8");
|
|
758
|
+
return true;
|
|
759
|
+
}
|
|
696
760
|
return false;
|
|
697
761
|
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
762
|
+
const newSection = buildCodexSection({ transport, coreBinaryPath: binaryPath, workspaceRoot, mcpPort, token, home });
|
|
763
|
+
if (!newSection) {
|
|
764
|
+
if (content !== original) {
|
|
765
|
+
backupConfig(configPath);
|
|
766
|
+
fs.writeFileSync(configPath, content, "utf-8");
|
|
767
|
+
return true;
|
|
768
|
+
}
|
|
769
|
+
return false;
|
|
770
|
+
}
|
|
771
|
+
// Step 3: rewrite the canonical section.
|
|
772
|
+
content = content.replace(CANONICAL_VEXP_TOML_SECTION_RE, "") + newSection;
|
|
773
|
+
if (content === original)
|
|
774
|
+
return false;
|
|
775
|
+
backupConfig(configPath);
|
|
701
776
|
fs.writeFileSync(configPath, content, "utf-8");
|
|
702
777
|
return true;
|
|
703
778
|
}
|
|
@@ -831,7 +906,7 @@ export function configureClaudeCodeGlobal(binaryPath, mcpServerPath, workspaceRo
|
|
|
831
906
|
return true;
|
|
832
907
|
}
|
|
833
908
|
// ---------------------------------------------------------------------------
|
|
834
|
-
// Claude Code PreToolUse hook
|
|
909
|
+
// Claude Code PreToolUse hook - blocks Grep/Glob when daemon is available
|
|
835
910
|
// ---------------------------------------------------------------------------
|
|
836
911
|
/**
|
|
837
912
|
* Install the vexp-guard hook for Claude Code.
|
|
@@ -848,7 +923,7 @@ export function installClaudeCodeHook(workspaceRoot) {
|
|
|
848
923
|
if (existed) {
|
|
849
924
|
const current = fs.readFileSync(hookPath, "utf-8");
|
|
850
925
|
if (current === VEXP_GUARD_HOOK)
|
|
851
|
-
return null; // identical
|
|
926
|
+
return null; // identical - skip
|
|
852
927
|
}
|
|
853
928
|
fs.writeFileSync(hookPath, VEXP_GUARD_HOOK, { mode: 0o755 });
|
|
854
929
|
// 2. Merge hook config into .claude/settings.json
|
|
@@ -924,13 +999,13 @@ function generateAgentConfig(template, vars) {
|
|
|
924
999
|
}
|
|
925
1000
|
}
|
|
926
1001
|
// ---------------------------------------------------------------------------
|
|
927
|
-
// Templates
|
|
1002
|
+
// Templates - copied verbatim from agent-auto-config.ts
|
|
928
1003
|
// ---------------------------------------------------------------------------
|
|
929
1004
|
function claudeCodeTemplate(vars) {
|
|
930
|
-
return `## vexp
|
|
1005
|
+
return `## vexp - Context-Aware AI Coding <!-- vexp v${vars.version} -->
|
|
931
1006
|
|
|
932
|
-
### MANDATORY: use vexp pipeline
|
|
933
|
-
For every task
|
|
1007
|
+
### MANDATORY: use vexp pipeline - do NOT grep or glob the codebase
|
|
1008
|
+
For every task - bug fixes, features, refactors, debugging:
|
|
934
1009
|
**call \`run_pipeline\` FIRST**. It executes context search + impact analysis +
|
|
935
1010
|
memory recall in a single call, returning compressed results.
|
|
936
1011
|
|
|
@@ -941,47 +1016,47 @@ inspect files (detail: minimal/standard/detailed, 70-90% token savings).
|
|
|
941
1016
|
Only use Read when you need exact raw content to edit a specific line.
|
|
942
1017
|
|
|
943
1018
|
### Primary Tool
|
|
944
|
-
- \`run_pipeline\`
|
|
1019
|
+
- \`run_pipeline\` - **USE THIS FOR EVERYTHING**. Single call that runs
|
|
945
1020
|
capsule + impact + memory server-side. Returns compressed results.
|
|
946
1021
|
Auto-detects intent (debug/modify/refactor/explore) from your task.
|
|
947
1022
|
Includes full file content for pivots.
|
|
948
1023
|
Examples:
|
|
949
|
-
- \`run_pipeline({ "task": "fix JWT validation bug" })\`
|
|
950
|
-
- \`run_pipeline({ "task": "refactor db layer", "preset": "refactor" })\`
|
|
951
|
-
- \`run_pipeline({ "task": "add auth", "observation": "using JWT" })\`
|
|
1024
|
+
- \`run_pipeline({ "task": "fix JWT validation bug" })\` - auto-detect
|
|
1025
|
+
- \`run_pipeline({ "task": "refactor db layer", "preset": "refactor" })\` - explicit
|
|
1026
|
+
- \`run_pipeline({ "task": "add auth", "observation": "using JWT" })\` - save insight in same call
|
|
952
1027
|
|
|
953
1028
|
### Other MCP tools (use only when run_pipeline is insufficient)
|
|
954
|
-
- \`get_skeleton\`
|
|
955
|
-
- \`index_status\`
|
|
956
|
-
- \`expand_vexp_ref\`
|
|
1029
|
+
- \`get_skeleton\` - **preferred over Read** for inspecting files (minimal/standard/detailed detail levels, 70-90% token savings)
|
|
1030
|
+
- \`index_status\` - indexing status and health check
|
|
1031
|
+
- \`expand_vexp_ref\` - expand V-REF hash placeholders in v2 compact output
|
|
957
1032
|
|
|
958
1033
|
### Workflow
|
|
959
|
-
1. \`run_pipeline("your task")\`
|
|
960
|
-
2. Need more detail on a file? Use \`get_skeleton({ files: [...], detail: "detailed" })\`
|
|
1034
|
+
1. \`run_pipeline("your task")\` - ALWAYS FIRST. Returns pivots + impact + memories in 1 call
|
|
1035
|
+
2. Need more detail on a file? Use \`get_skeleton({ files: [...], detail: "detailed" })\` - avoid Read unless editing
|
|
961
1036
|
3. Make targeted changes based on the context returned
|
|
962
1037
|
4. \`run_pipeline\` again ONLY if you need more context during implementation
|
|
963
|
-
5. Do NOT chain multiple vexp calls
|
|
1038
|
+
5. Do NOT chain multiple vexp calls - one \`run_pipeline\` replaces capsule + impact + memory + observation
|
|
964
1039
|
|
|
965
1040
|
### Subagent / Explore / Plan mode
|
|
966
|
-
- Subagents CAN and MUST call \`run_pipeline\`
|
|
1041
|
+
- Subagents CAN and MUST call \`run_pipeline\` - always include the task description
|
|
967
1042
|
- The PreToolUse hook blocks Grep/Glob when vexp daemon is running
|
|
968
|
-
- Do NOT spawn Agent(Explore) to freely search
|
|
1043
|
+
- Do NOT spawn Agent(Explore) to freely search - call \`run_pipeline\` first,
|
|
969
1044
|
then pass the returned context into the agent prompt if needed
|
|
970
|
-
- Always: \`run_pipeline\`
|
|
1045
|
+
- Always: \`run_pipeline\` -> get context -> spawn agent with context
|
|
971
1046
|
|
|
972
|
-
### Smart Features (automatic
|
|
973
|
-
- **Intent Detection**: auto-detects from your task keywords. "fix bug"
|
|
1047
|
+
### Smart Features (automatic - no action needed)
|
|
1048
|
+
- **Intent Detection**: auto-detects from your task keywords. "fix bug" -> Debug, "refactor" -> blast-radius, "add" -> Modify
|
|
974
1049
|
- **Hybrid Search**: keyword + semantic + graph centrality ranking
|
|
975
1050
|
- **Session Memory**: auto-captures observations; memories auto-surfaced in results
|
|
976
1051
|
- **LSP Bridge**: VS Code captures type-resolved call edges
|
|
977
1052
|
- **Change Coupling**: co-changed files included as related context
|
|
978
1053
|
|
|
979
1054
|
### Advanced Parameters
|
|
980
|
-
- \`preset: "debug"\`
|
|
981
|
-
- \`preset: "refactor"\`
|
|
982
|
-
- \`max_tokens: 12000\`
|
|
983
|
-
- \`include_tests: true\`
|
|
984
|
-
- \`include_file_content: false\`
|
|
1055
|
+
- \`preset: "debug"\` - forces debug mode (capsule+tests+impact+memory)
|
|
1056
|
+
- \`preset: "refactor"\` - deep impact analysis (depth 5)
|
|
1057
|
+
- \`max_tokens: 12000\` - increase total budget for complex tasks
|
|
1058
|
+
- \`include_tests: true\` - include test files in results
|
|
1059
|
+
- \`include_file_content: false\` - omit full file content (lighter response)
|
|
985
1060
|
|
|
986
1061
|
### Fallback
|
|
987
1062
|
If \`run_pipeline\` returns \`status: "degraded"\` or 0 pivots with an INDEX EMPTY warning,
|
|
@@ -995,28 +1070,28 @@ Use \`index_status\` to discover available repo aliases.
|
|
|
995
1070
|
function cursorTemplate(vars) {
|
|
996
1071
|
return `## vexp rules for Cursor <!-- vexp v${vars.version} -->
|
|
997
1072
|
|
|
998
|
-
**MANDATORY: use \`run_pipeline\`
|
|
1073
|
+
**MANDATORY: use \`run_pipeline\` - do NOT grep, glob, or read files manually.**
|
|
999
1074
|
vexp returns pre-indexed, graph-ranked context in a single call.
|
|
1000
1075
|
|
|
1001
1076
|
### Workflow
|
|
1002
|
-
1. \`run_pipeline\` with your task description
|
|
1077
|
+
1. \`run_pipeline\` with your task description - ALWAYS FIRST (replaces all other tools)
|
|
1003
1078
|
2. Make targeted changes based on the context returned
|
|
1004
1079
|
3. \`run_pipeline\` again only if you need more context
|
|
1005
1080
|
|
|
1006
1081
|
### Available MCP tools
|
|
1007
|
-
- \`run_pipeline\`
|
|
1082
|
+
- \`run_pipeline\` - **PRIMARY TOOL**. Runs capsule + impact + memory in 1 call.
|
|
1008
1083
|
Auto-detects intent. Includes file content. Example: \`run_pipeline({ "task": "fix auth bug" })\`
|
|
1009
|
-
- \`get_skeleton\`
|
|
1010
|
-
- \`index_status\`
|
|
1011
|
-
- \`expand_vexp_ref\`
|
|
1084
|
+
- \`get_skeleton\` - compact file structure
|
|
1085
|
+
- \`index_status\` - indexing status
|
|
1086
|
+
- \`expand_vexp_ref\` - expand V-REF placeholders in v2 output
|
|
1012
1087
|
|
|
1013
1088
|
### Agentic search
|
|
1014
|
-
- Do NOT use built-in file search, grep, or codebase indexing
|
|
1089
|
+
- Do NOT use built-in file search, grep, or codebase indexing - always call \`run_pipeline\` first
|
|
1015
1090
|
- If you spawn sub-agents or background tasks, pass them the context from \`run_pipeline\`
|
|
1016
1091
|
rather than letting them search the codebase independently
|
|
1017
1092
|
|
|
1018
1093
|
### Tips
|
|
1019
|
-
- Natural language queries work well
|
|
1094
|
+
- Natural language queries work well - vexp uses hybrid search (keyword + semantic + graph)
|
|
1020
1095
|
- Add \`include_tests: true\` when debugging
|
|
1021
1096
|
- Use \`preset: "refactor"\` for deep impact analysis
|
|
1022
1097
|
|
|
@@ -1028,29 +1103,29 @@ Use file search and read tools directly until the index is ready.
|
|
|
1028
1103
|
\`run_pipeline\` auto-queries all indexed repos. Use \`repos: ["alias"]\` to scope. Run \`index_status\` to see aliases.
|
|
1029
1104
|
|
|
1030
1105
|
> **Tip:** To avoid confirmation prompts on every tool call, enable Yolo mode:
|
|
1031
|
-
> Cursor Settings
|
|
1106
|
+
> Cursor Settings -> Features -> Agent -> Enable Yolo Mode.
|
|
1032
1107
|
<!-- /vexp -->`;
|
|
1033
1108
|
}
|
|
1034
1109
|
function windsurfTemplate(vars) {
|
|
1035
1110
|
return `## vexp for Windsurf <!-- vexp v${vars.version} -->
|
|
1036
1111
|
|
|
1037
|
-
**MANDATORY: use \`run_pipeline\`
|
|
1112
|
+
**MANDATORY: use \`run_pipeline\` - do NOT grep, glob, or read files manually.**
|
|
1038
1113
|
vexp returns pre-indexed, graph-ranked context in a single call.
|
|
1039
1114
|
|
|
1040
1115
|
### Workflow
|
|
1041
|
-
1. \`run_pipeline\` with your task description
|
|
1116
|
+
1. \`run_pipeline\` with your task description - ALWAYS FIRST (replaces all other tools)
|
|
1042
1117
|
2. Make targeted changes based on the context returned
|
|
1043
1118
|
3. \`run_pipeline\` again only if you need more context
|
|
1044
1119
|
|
|
1045
1120
|
### Available MCP tools
|
|
1046
|
-
- \`run_pipeline\`
|
|
1121
|
+
- \`run_pipeline\` - **PRIMARY TOOL**. Runs capsule + impact + memory in 1 call.
|
|
1047
1122
|
Auto-detects intent. Includes file content. Example: \`run_pipeline({ "task": "fix auth bug" })\`
|
|
1048
|
-
- \`get_skeleton\`
|
|
1049
|
-
- \`index_status\`
|
|
1050
|
-
- \`expand_vexp_ref\`
|
|
1123
|
+
- \`get_skeleton\` - compact file structure
|
|
1124
|
+
- \`index_status\` - indexing status
|
|
1125
|
+
- \`expand_vexp_ref\` - expand V-REF placeholders in v2 output
|
|
1051
1126
|
|
|
1052
1127
|
### Agentic search
|
|
1053
|
-
- Do NOT use built-in file search, grep, or codebase indexing
|
|
1128
|
+
- Do NOT use built-in file search, grep, or codebase indexing - always call \`run_pipeline\` first
|
|
1054
1129
|
- If you spawn sub-agents or background tasks, pass them the context from \`run_pipeline\`
|
|
1055
1130
|
rather than letting them search the codebase independently
|
|
1056
1131
|
|
|
@@ -1083,23 +1158,23 @@ function continueTemplate(vars) {
|
|
|
1083
1158
|
function augmentTemplate(vars) {
|
|
1084
1159
|
return `## vexp for Augment <!-- vexp v${vars.version} -->
|
|
1085
1160
|
|
|
1086
|
-
**MANDATORY: use \`run_pipeline\`
|
|
1161
|
+
**MANDATORY: use \`run_pipeline\` - do NOT grep, glob, or read files manually.**
|
|
1087
1162
|
vexp returns pre-indexed, graph-ranked context in a single call.
|
|
1088
1163
|
|
|
1089
1164
|
When working on this codebase:
|
|
1090
|
-
1. \`run_pipeline\` with task description
|
|
1165
|
+
1. \`run_pipeline\` with task description - ALWAYS FIRST
|
|
1091
1166
|
2. Make targeted changes based on the context returned
|
|
1092
1167
|
3. \`run_pipeline\` again only if you need more context
|
|
1093
1168
|
|
|
1094
1169
|
### Available MCP tools
|
|
1095
|
-
- \`run_pipeline\`
|
|
1170
|
+
- \`run_pipeline\` - **PRIMARY TOOL**. Runs capsule + impact + memory in 1 call.
|
|
1096
1171
|
Example: \`run_pipeline({ "task": "fix auth bug" })\`
|
|
1097
|
-
- \`get_skeleton\`
|
|
1098
|
-
- \`index_status\`
|
|
1099
|
-
- \`expand_vexp_ref\`
|
|
1172
|
+
- \`get_skeleton\` - token-efficient file structure
|
|
1173
|
+
- \`index_status\` - indexing status
|
|
1174
|
+
- \`expand_vexp_ref\` - expand V-REF placeholders in v2 output
|
|
1100
1175
|
|
|
1101
1176
|
### Agentic search
|
|
1102
|
-
- Do NOT use built-in file search, grep, or codebase indexing
|
|
1177
|
+
- Do NOT use built-in file search, grep, or codebase indexing - always call \`run_pipeline\` first
|
|
1103
1178
|
- If you spawn sub-agents or background tasks, pass them the context from \`run_pipeline\`
|
|
1104
1179
|
rather than letting them search the codebase independently
|
|
1105
1180
|
|
|
@@ -1113,23 +1188,23 @@ Intent auto-detection, hybrid ranking, session memory, auto-expanding budget.
|
|
|
1113
1188
|
function copilotTemplate(vars) {
|
|
1114
1189
|
return `## vexp context tools <!-- vexp v${vars.version} -->
|
|
1115
1190
|
|
|
1116
|
-
**MANDATORY: use \`run_pipeline\`
|
|
1191
|
+
**MANDATORY: use \`run_pipeline\` - do NOT grep, glob, or read files manually.**
|
|
1117
1192
|
vexp returns pre-indexed, graph-ranked context in a single call.
|
|
1118
1193
|
|
|
1119
1194
|
### Workflow
|
|
1120
|
-
1. \`run_pipeline\` with your task description
|
|
1195
|
+
1. \`run_pipeline\` with your task description - ALWAYS FIRST (replaces all other tools)
|
|
1121
1196
|
2. Make targeted changes based on the context returned
|
|
1122
1197
|
3. \`run_pipeline\` again only if you need more context
|
|
1123
1198
|
|
|
1124
1199
|
### Available MCP tools
|
|
1125
|
-
- \`run_pipeline\`
|
|
1200
|
+
- \`run_pipeline\` - **PRIMARY TOOL**. Runs capsule + impact + memory in 1 call.
|
|
1126
1201
|
Auto-detects intent. Includes file content. Example: \`run_pipeline({ "task": "fix auth bug" })\`
|
|
1127
|
-
- \`get_skeleton\`
|
|
1128
|
-
- \`index_status\`
|
|
1129
|
-
- \`expand_vexp_ref\`
|
|
1202
|
+
- \`get_skeleton\` - compact file structure
|
|
1203
|
+
- \`index_status\` - indexing status
|
|
1204
|
+
- \`expand_vexp_ref\` - expand V-REF placeholders in v2 output
|
|
1130
1205
|
|
|
1131
1206
|
### Agentic search
|
|
1132
|
-
- Do NOT use built-in file search, grep, or codebase indexing
|
|
1207
|
+
- Do NOT use built-in file search, grep, or codebase indexing - always call \`run_pipeline\` first
|
|
1133
1208
|
- If you spawn sub-agents or background tasks, pass them the context from \`run_pipeline\`
|
|
1134
1209
|
rather than letting them search the codebase independently
|
|
1135
1210
|
|
|
@@ -1143,23 +1218,23 @@ Intent auto-detection, hybrid ranking, session memory, auto-expanding budget.
|
|
|
1143
1218
|
function zedTemplate(vars) {
|
|
1144
1219
|
return `## vexp for Zed <!-- vexp v${vars.version} -->
|
|
1145
1220
|
|
|
1146
|
-
**MANDATORY: use \`run_pipeline\`
|
|
1221
|
+
**MANDATORY: use \`run_pipeline\` - do NOT grep, glob, or read files manually.**
|
|
1147
1222
|
vexp returns pre-indexed, graph-ranked context in a single call.
|
|
1148
1223
|
|
|
1149
1224
|
### Workflow
|
|
1150
|
-
1. \`run_pipeline\` with your task description
|
|
1225
|
+
1. \`run_pipeline\` with your task description - ALWAYS FIRST (replaces all other tools)
|
|
1151
1226
|
2. Make targeted changes based on the context returned
|
|
1152
1227
|
3. \`run_pipeline\` again only if you need more context
|
|
1153
1228
|
|
|
1154
1229
|
### Available MCP tools
|
|
1155
|
-
- \`run_pipeline\`
|
|
1230
|
+
- \`run_pipeline\` - **PRIMARY TOOL**. Runs capsule + impact + memory in 1 call.
|
|
1156
1231
|
Example: \`run_pipeline({ "task": "fix auth bug" })\`
|
|
1157
|
-
- \`get_skeleton\`
|
|
1158
|
-
- \`index_status\`
|
|
1159
|
-
- \`expand_vexp_ref\`
|
|
1232
|
+
- \`get_skeleton\` - compact file structure
|
|
1233
|
+
- \`index_status\` - indexing status
|
|
1234
|
+
- \`expand_vexp_ref\` - expand V-REF placeholders in v2 output
|
|
1160
1235
|
|
|
1161
1236
|
### Agentic search
|
|
1162
|
-
- Do NOT use built-in file search, grep, or codebase indexing
|
|
1237
|
+
- Do NOT use built-in file search, grep, or codebase indexing - always call \`run_pipeline\` first
|
|
1163
1238
|
- If you spawn sub-agents or background tasks, pass them the context from \`run_pipeline\`
|
|
1164
1239
|
rather than letting them search the codebase independently
|
|
1165
1240
|
|
|
@@ -1173,23 +1248,23 @@ Intent auto-detection, hybrid ranking, session memory, auto-expanding budget.
|
|
|
1173
1248
|
function agentsMdTemplate(vars) {
|
|
1174
1249
|
return `## vexp <!-- vexp v${vars.version} -->
|
|
1175
1250
|
|
|
1176
|
-
**MANDATORY: use \`run_pipeline\`
|
|
1251
|
+
**MANDATORY: use \`run_pipeline\` - do NOT grep or glob the codebase.**
|
|
1177
1252
|
vexp returns pre-indexed, graph-ranked context in a single call.
|
|
1178
1253
|
|
|
1179
1254
|
### Workflow
|
|
1180
|
-
1. \`run_pipeline\` with your task description
|
|
1255
|
+
1. \`run_pipeline\` with your task description - ALWAYS FIRST (replaces all other tools)
|
|
1181
1256
|
2. Make targeted changes based on the context returned
|
|
1182
1257
|
3. \`run_pipeline\` again only if you need more context
|
|
1183
1258
|
|
|
1184
1259
|
### Available MCP tools
|
|
1185
|
-
- \`run_pipeline\`
|
|
1260
|
+
- \`run_pipeline\` - **PRIMARY TOOL**. Runs capsule + impact + memory in 1 call.
|
|
1186
1261
|
Auto-detects intent. Includes file content. Example: \`run_pipeline({ "task": "fix auth bug" })\`
|
|
1187
|
-
- \`get_skeleton\`
|
|
1188
|
-
- \`index_status\`
|
|
1189
|
-
- \`expand_vexp_ref\`
|
|
1262
|
+
- \`get_skeleton\` - compact file structure
|
|
1263
|
+
- \`index_status\` - indexing status
|
|
1264
|
+
- \`expand_vexp_ref\` - expand V-REF placeholders in v2 output
|
|
1190
1265
|
|
|
1191
1266
|
### Agentic search
|
|
1192
|
-
- Do NOT use built-in file search, grep, or codebase indexing
|
|
1267
|
+
- Do NOT use built-in file search, grep, or codebase indexing - always call \`run_pipeline\` first
|
|
1193
1268
|
- If you spawn sub-agents or background tasks, pass them the context from \`run_pipeline\`
|
|
1194
1269
|
rather than letting them search the codebase independently
|
|
1195
1270
|
|
|
@@ -1203,23 +1278,23 @@ Intent auto-detection, hybrid ranking, session memory, auto-expanding budget.
|
|
|
1203
1278
|
function kiroTemplate(vars) {
|
|
1204
1279
|
return `# vexp steering <!-- vexp v${vars.version} -->
|
|
1205
1280
|
|
|
1206
|
-
**MANDATORY: use \`run_pipeline\`
|
|
1281
|
+
**MANDATORY: use \`run_pipeline\` - do NOT grep, glob, or read files manually.**
|
|
1207
1282
|
vexp returns pre-indexed, graph-ranked context in a single call.
|
|
1208
1283
|
|
|
1209
1284
|
## Workflow
|
|
1210
|
-
1. \`run_pipeline\` with your task description
|
|
1285
|
+
1. \`run_pipeline\` with your task description - ALWAYS FIRST (replaces all other tools)
|
|
1211
1286
|
2. Make targeted changes based on the context returned
|
|
1212
1287
|
3. \`run_pipeline\` again only if you need more context
|
|
1213
1288
|
|
|
1214
1289
|
## Available vexp tools
|
|
1215
|
-
- \`run_pipeline\`
|
|
1290
|
+
- \`run_pipeline\` - **PRIMARY TOOL**. Runs capsule + impact + memory in 1 call.
|
|
1216
1291
|
Example: \`run_pipeline({ "task": "fix auth bug" })\`
|
|
1217
|
-
- \`get_skeleton\`
|
|
1218
|
-
- \`index_status\`
|
|
1219
|
-
- \`expand_vexp_ref\`
|
|
1292
|
+
- \`get_skeleton\` - compact file structure
|
|
1293
|
+
- \`index_status\` - indexing status
|
|
1294
|
+
- \`expand_vexp_ref\` - expand V-REF placeholders in v2 output
|
|
1220
1295
|
|
|
1221
1296
|
## Agentic search
|
|
1222
|
-
- Do NOT use built-in file search, grep, or codebase indexing
|
|
1297
|
+
- Do NOT use built-in file search, grep, or codebase indexing - always call \`run_pipeline\` first
|
|
1223
1298
|
- If you spawn sub-agents or background tasks, pass them the context from \`run_pipeline\`
|
|
1224
1299
|
rather than letting them search the codebase independently
|
|
1225
1300
|
|
|
@@ -1233,23 +1308,23 @@ Intent auto-detection, hybrid ranking, session memory, auto-expanding budget.
|
|
|
1233
1308
|
function genericTemplate(vars) {
|
|
1234
1309
|
return `## vexp <!-- vexp v${vars.version} -->
|
|
1235
1310
|
|
|
1236
|
-
**MANDATORY: use \`run_pipeline\`
|
|
1311
|
+
**MANDATORY: use \`run_pipeline\` - do NOT grep or glob the codebase.**
|
|
1237
1312
|
vexp returns pre-indexed, graph-ranked context in a single call.
|
|
1238
1313
|
|
|
1239
1314
|
### Workflow
|
|
1240
|
-
1. \`run_pipeline\` with your task description
|
|
1315
|
+
1. \`run_pipeline\` with your task description - ALWAYS FIRST (replaces all other tools)
|
|
1241
1316
|
2. Make targeted changes based on the context returned
|
|
1242
1317
|
3. \`run_pipeline\` again only if you need more context
|
|
1243
1318
|
|
|
1244
1319
|
### Available MCP tools
|
|
1245
|
-
- \`run_pipeline\`
|
|
1320
|
+
- \`run_pipeline\` - **PRIMARY TOOL**. Runs capsule + impact + memory in 1 call.
|
|
1246
1321
|
Example: \`run_pipeline({ "task": "fix auth bug" })\`
|
|
1247
|
-
- \`get_skeleton\`
|
|
1248
|
-
- \`index_status\`
|
|
1249
|
-
- \`expand_vexp_ref\`
|
|
1322
|
+
- \`get_skeleton\` - compact file structure
|
|
1323
|
+
- \`index_status\` - indexing status
|
|
1324
|
+
- \`expand_vexp_ref\` - expand V-REF placeholders in v2 output
|
|
1250
1325
|
|
|
1251
1326
|
### Agentic search
|
|
1252
|
-
- Do NOT use built-in file search, grep, or codebase indexing
|
|
1327
|
+
- Do NOT use built-in file search, grep, or codebase indexing - always call \`run_pipeline\` first
|
|
1253
1328
|
- If you spawn sub-agents or background tasks, pass them the context from \`run_pipeline\`
|
|
1254
1329
|
rather than letting them search the codebase independently
|
|
1255
1330
|
|