sweet-search 2.6.15 → 2.6.16

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.
@@ -1,17 +1,21 @@
1
1
  ---
2
2
  variant: mcp
3
- derived_from: p7-v1-mpppp
4
- source_prompt: core/prompt-optimization/data/p7-variant-restarts/p7-gen3-candidates/Mpppp.md
3
+ derived_from: p7-v1-mppppp
4
+ source_prompt: core/prompt-optimization/data/p7-variant-restarts/p7-gen3-candidates/Mppppp.md
5
5
  benchmarked: false
6
6
  note: >-
7
- Hand-derived MCP-tool variant of the M++++ champion (p7-v1-mpppp = M++ +
8
- stop-discipline scoping edits: search-rules-only intro, "stop searching" /
9
- "Search output" wording; routing unchanged from the frozen, benchmarked
10
- M++). The STRATEGY core routing by what-you-hold, trust-the-top-hit,
11
- sufficiency stops, the two-probe absence rule, the <state_summary> gate, and
12
- the search-output disciplineis preserved (semantics intact; the rest
13
- carries only the tool-mechanics
14
- rename). Only the tool-mechanics layer is remapped: the six ss-* CLI commands collapse onto the sweet-search MCP
7
+ Hand-derived MCP-tool variant of the M+++++ champion (p7-v1-mppppp = M++++ +
8
+ the verdict-gated trust line: trust rank 1 outright when the response
9
+ reports sufficiency yes, otherwise scan the already-delivered lower
10
+ ranks/same-file map before any new search; smoke-validated on the
11
+ task-completion bench, see memory
12
+ project_mppppp_conditional_trust_candidate). The STRATEGY core routing by
13
+ what-you-hold, verdict-gated trust, sufficiency stops, the two-probe absence
14
+ rule, the <state_summary> gate, and the search-output discipline is
15
+ preserved (semantics intact; the rest carries only the tool-mechanics
16
+ rename). The trust gate is phrased against the MCP response surface
17
+ (sufficiency verdict in structured content; "Also found" summary list;
18
+ "Same file:" map line) instead of the CLI sufficient= trailer. Only the tool-mechanics layer is remapped: the six ss-* CLI commands collapse onto the sweet-search MCP
15
19
  tool surface (a UNIFIED `search` that subsumes ss-search/ss-find/ss-grep, plus
16
20
  `trace` / `read-semantic` / `read` / `repo-map`). The anti-raw-scan discipline
17
21
  is KEPT and retargeted from "ss-* vs raw grep" to "sweet-search tools vs native
@@ -40,7 +44,7 @@ The sweet-search MCP server exposes these (call each by the name your client lis
40
44
  - **Only a behavior or concept**: one `search` in natural language for what you're looking for, then anchor on the symbol that surfaces. Shape it lightly by the target language — short and interrogative for JS/TS/Dart, a touch longer with a domain keyword otherwise.
41
45
  - **How something flows / dispatches / is called / what a change impacts**: anchor one symbol (a literal, or a `search`), then `trace` it — one call returns callers, callees and impact. Prefer callees over impact (especially Python/Ruby/PHP). If a trace is sparse or empty, anchor the downstream symbol with `search` rather than retrying or hand-crawling; never make `trace` the spine of a multi-file search.
42
46
 
43
- Trust the top ranked result; confirm with at most one narrow `read`, never a re-run of a matching hit.
47
+ When the response reports sufficiency `yes`, trust the top ranked result outright; confirm with at most one narrow `read`, never a re-run of a matching hit. Otherwise, scan the rest of the results you already have (lower ranks, the `Also found` list, the `Same file:` line) before issuing any new search — the winner is often rank 2-3.
44
48
 
45
49
  ## Multi-file
46
50
  Chain inside the tools: land the entry file, `read-semantic` it for the import or handoff symbol, then `search` the downstream module. The trace is COMPLETE the moment you can name the link from the entry symbol to the thing it reaches; stop tracing there. Leaf bodies, macro expansions, and the next hop down are not the answer unless asked, and chasing them — or dropping to a native Grep/Read to "just look" — is the main multi-file cost trap.
@@ -1,12 +1,12 @@
1
1
  ---
2
- run_id: p7-v1-mpppp
2
+ run_id: p7-v1-mppppp
3
3
  score_sonnet: 0.993
4
4
  score_gpt5_5: 0.988
5
5
  joint_maximin: 0.988
6
6
  eas_factor: null
7
7
  length_penalty: null
8
8
  final_score: null
9
- token_count: 1175
9
+ token_count: 1221
10
10
  scs_cwSCS: 0.931
11
11
  scs_min_paraphrase_accuracy: 1
12
12
  homp_family_pass: true
@@ -37,7 +37,7 @@ Sweet-search indexes the working tree (uncommitted edits too) and searches it fa
37
37
  - **Only a behavior or concept**: one `ss-search` in natural language for what you're looking for, then anchor on the symbol that surfaces. Shape it lightly by the target language — short and interrogative for JS/TS/Dart, a touch longer with a domain keyword otherwise.
38
38
  - **How something flows / dispatches / is called / what a change impacts**: anchor one symbol (a literal, or `ss-search`), then `ss-trace` it — one call returns callers, callees and impact. Prefer callees over impact (especially Python/Ruby/PHP). If a trace is sparse or empty, anchor the downstream symbol with `ss-find`/`ss-search` rather than retrying or hand-crawling; never make `ss-trace` the spine of a multi-file search.
39
39
 
40
- Trust the top ranked result; confirm with at most one narrow `ss-read`, never a re-run of a matching hit.
40
+ On `sufficient=YES`, trust the top ranked result outright; confirm with at most one narrow `ss-read`, never a re-run of a matching hit. Otherwise, scan the rest of the pack you already have (lower ranks, the `same file:` line) before issuing any new search — the winner is often rank 2-3.
41
41
 
42
42
  ## Multi-file
43
43
  Chain inside the tools: land the entry file, `ss-semantic` it for the import or handoff symbol, then `ss-search`/`ss-find` the downstream module. The trace is COMPLETE the moment you can name the link from the entry symbol to the thing it reaches; stop tracing there. Leaf bodies, macro expansions, and the next hop down are not the answer unless asked, and chasing them — or dropping to raw `cat`/`grep` to "just look" — is the main multi-file cost trap.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sweet-search",
3
- "version": "2.6.15",
3
+ "version": "2.6.16",
4
4
  "description": "Sweet Search - SOTA Hybrid Code Search Engine with WASM CatBoost Query Router, Semantic/Lexical/Structural Search, and Multilingual Support",
5
5
  "type": "module",
6
6
  "main": "core/search/sweet-search.js",
@@ -167,13 +167,13 @@
167
167
  "vitest": "^4.0.16"
168
168
  },
169
169
  "optionalDependencies": {
170
- "@sweet-search/native-darwin-arm64": "2.6.15",
171
- "@sweet-search/native-darwin-x64": "2.6.15",
172
- "@sweet-search/native-linux-arm64-gnu": "2.6.15",
173
- "@sweet-search/native-linux-arm64-gnu-cuda": "2.6.15",
174
- "@sweet-search/native-linux-x64-gnu": "2.6.15",
175
- "@sweet-search/native-linux-x64-gnu-cuda": "2.6.15",
176
- "@sweet-search/bg-priority": "2.6.15"
170
+ "@sweet-search/native-darwin-arm64": "2.6.16",
171
+ "@sweet-search/native-darwin-x64": "2.6.16",
172
+ "@sweet-search/native-linux-arm64-gnu": "2.6.16",
173
+ "@sweet-search/native-linux-arm64-gnu-cuda": "2.6.16",
174
+ "@sweet-search/native-linux-x64-gnu": "2.6.16",
175
+ "@sweet-search/native-linux-x64-gnu-cuda": "2.6.16",
176
+ "@sweet-search/bg-priority": "2.6.16"
177
177
  },
178
178
  "engines": {
179
179
  "node": ">=18.0.0"
@@ -46,18 +46,20 @@ function escapeRegex(s) {
46
46
  return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
47
47
  }
48
48
 
49
- // ─── Canonical policy body = the M++++ champion (integration seam) ───────────
49
+ // ─── Canonical policy body = the M+++++ champion (integration seam) ──────────
50
50
  //
51
51
  // Plan §10 / §3.7.1 step 13 / DDD "Integration seam": scripts/init.js is the
52
52
  // SOLE consumer of the prompt-optimization ship-file. We read that artifact at
53
- // load time and strip its YAML front-matter; the remaining body is the M++++
53
+ // load time and strip its YAML front-matter; the remaining body is the M+++++
54
54
  // champion (PHASE7 M++ — held-out 0.988 Maximin, OOD 0.952, HOMP/SCS/counter
55
55
  // all pass, 5-cell cross-harness validated — plus the stop-discipline scoping
56
- // edits that fix M++'s over-stopping on FIX tasks; routing unchanged),
57
- // injected VERBATIM into the harness files. Per-harness shims
58
- // (Cursor frontmatter, @imports) are applied at write-time, not embedded here.
56
+ // edits that fix M++'s over-stopping on FIX tasks, plus the verdict-gated
57
+ // trust line that scans already-delivered lower ranks before any new search;
58
+ // tool routing unchanged), injected VERBATIM into the harness files.
59
+ // Per-harness shims (Cursor frontmatter, @imports) are applied at write-time,
60
+ // not embedded here.
59
61
  //
60
- // The artifact is generated from Mpppp.md by
62
+ // The artifact is generated from Mppppp.md by
61
63
  // `core/prompt-optimization/sweep/finalize-mpp.mjs` and shipped via the
62
64
  // package.json "files" list. If it is missing we fail LOUDLY rather than
63
65
  // silently shipping a placeholder/older policy.
@@ -76,7 +78,7 @@ export function stripFrontMatter(text) {
76
78
  return text.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n/, '');
77
79
  }
78
80
 
79
- function readShippedPolicy(rel = SHIP_FILE_REL, { label = 'M++++' } = {}) {
81
+ function readShippedPolicy(rel = SHIP_FILE_REL, { label = 'M+++++' } = {}) {
80
82
  const here = dirname(fileURLToPath(import.meta.url)); // <pkg>/scripts
81
83
  const shipPath = join(here, '..', rel);
82
84
  let raw;
@@ -103,7 +105,7 @@ let _mcpPolicyBody = null;
103
105
  /** Lazily read + cache the MCP-variant policy body. */
104
106
  export function getMcpPolicyBody() {
105
107
  if (_mcpPolicyBody == null) {
106
- _mcpPolicyBody = readShippedPolicy(MCP_SHIP_FILE_REL, { label: 'M++++ (MCP variant)' });
108
+ _mcpPolicyBody = readShippedPolicy(MCP_SHIP_FILE_REL, { label: 'M+++++ (MCP variant)' });
107
109
  }
108
110
  return _mcpPolicyBody;
109
111
  }