Skip to content

feat(init): a new install starts on strategy "index" and the "locate" MCP profile (Candidate A of #1071) - #1084

Open
manojmallick wants to merge 1 commit into
developfrom
feat/new-install-default-candidate-a-1071
Open

manojmallick wants to merge 1 commit into
developfrom
feat/new-install-default-candidate-a-1071

Conversation

@manojmallick

@manojmallick manojmallick commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

Option A of #1071, on the maintainer's decision: a new sigmap --init project starts on strategy: "index" and mcp.tools: "locate" (it was full and core). Existing installs do not change.

  • gen-context.config.json.example (what --init copies) and the lone-bundle fallback in gen-context.js (what --init writes with no example beside it) now carry "strategy": "index" and "tools": "locate", with comments that say so. The --init help line says it.
  • DEFAULTS are untouched. A project with no config keeps strategy full and all 22 tools; a project with a config keeps it byte for byte (T2 below).
  • Docs say the same thing in every place that described --init: README, choosing-a-setup (a new section, "What a new install starts on", with the three runs and their limits), cli, config, mcp, troubleshooting, memory; llms-full.txt regenerated.
  • No version bump and no CHANGELOG entry: /update-docs owns those, and nothing is released by this PR.

Why (the evidence, with its limits)

Pre-registered runs of exactly this setup against no SigMap in Claude Code (--bare, an API key, one question per run, the repository as the unit), bar B1 to B4 in benchmarks/agent-study/confirm-bar.mjs, met each time, no repository clearly costing more:

Run Repositories Cost File found (with / without) Used
T5, Haiku 5.5 20, 31 to 2,388 files -16.6% [-23.2, -9.7] 205 / 208 of 222 96%
T6, Sonnet 5.5 the same 20 -8.8% [-15.5, -2.0] 211 / 207 of 222 93%
T7, Haiku 5.5 16 large, 3,026 to 7,756 files -18.5% [-22.5, -14.3] 167 / 175 of 192 96%

Not shown, and said in the docs: B3 in T7 passes by 0.8 points (an interval computed afterwards is [-7.8, -1.0] points); with Sonnet total tokens rose 9% while cost fell; nothing about a logged-in session or subscription allowance, Opus, repositories above 7,756 files, Python or JavaScript above about 2,400 files, answer quality, editing work, or the ask command and prefetch hook. locate drops the impact, callee and verification tools; "tools": "core" gets them back.

The guard rails of #1071, now meeting their own bar

  • T1 (new-install-default-guard.test.js): --init proposes Candidate A on both paths, and it equals the study's locate arm (T1c no longer skips). The pin that said full + core was changed on purpose; nothing else in T1.
  • T2 is unchanged and passes: the four kinds of existing project resolve to what they did at v8.87.0, every key a project sets keeps its value, and --init never rewrites a config.
  • T3 (footprint) already measured Candidate A within 32 KiB / 200 lines. In a fresh project the four instruction files --init leads to are 1.9 to 2.7 KB each.
  • T4 was measured on CPU time with node, not wall-clock with npx (disclosed on defaults: choose the new-install setup from the agent study - the default-config arm cost +9% and locate is the only setup where no repository cost more #1071): Candidate A used 10 to 16% less CPU than v8.87.0. Not re-measured here.
  • New content tests pin the words: --help, README and the five guides say index and locate; no page says --init writes core or full; the example config's comments say what a new install starts on.

Checks

  • Full local suite (node test/integration/all.js): 291 files passed, 0 failed, run on these same files before committing (only the hook-regenerated AGENTS.md differs, and it is not in the commit). Of those, new-install-default-guard 14 passed, mcp/tool-profile 44 passed (its two --init tests now pin locate and index), build-bundle.mjs --check and validate-llms.mjs current.
  • Real flow in a fresh project: sigmap --init writes index + locate; generating writes four files of 1.9 to 2.7 KB; sigmap doctor prints "MCP tool profile — locate (2 of 22 tools, ~278 tokens of definitions)"; sigmap ask ranks files.
  • Mutation sweep on a throwaway worktree (never the real tree): 19 of 19 mutants killed by the guard and tool-profile tests: each example-config key reverted, each lone-bundle key reverted, DEFAULTS flipped to index or to locate (which would change every existing install), --init made to rewrite an existing config, the --help line and each of the README and five guides reverted to the old claim, a stale page saying --init writes core, and the example config losing its new-install comment.

Refs #1071 (stays open until the maintainer closes it).

🤖 Generated with Claude Code

… MCP profile (Candidate A of #1071)

`sigmap --init` now writes "strategy": "index" and "mcp": { "tools": "locate" } on both paths (the example config and the lone-bundle fallback); it wrote "full" and "core". DEFAULTS are unchanged: a project with no config keeps strategy full and all 22 tools, and a config that exists is never rewritten.

The choice rests on three pre-registered runs of exactly this setup against no SigMap in Claude Code, bar met each time with no repository clearly costing more: Haiku 5.5 on 20 repositories -16.6% [-23.2, -9.7], Sonnet 5.5 on the same 20 -8.8% [-15.5, -2.0], Haiku 5.5 on 16 repositories of 3,026 to 7,756 files -18.5% [-22.5, -14.3]. The docs state the limits: file found was 4.2 points lower on the large set, Sonnet's saving is in cost not tokens, and nothing was measured for subscription sessions, Opus, repositories above 7,756 files, answer quality or editing work.

T1 pins now say Candidate A on both paths and T1c runs instead of skipping; T2 (upgrade invariance) is unchanged and passes. New tests pin the words in --help, the README and the guides, and the example config's comments. Docs: README, choosing-a-setup (new section), cli, config, mcp, troubleshooting, memory; llms-full.txt regenerated. No version bump, no CHANGELOG entry.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant