Release v6.12.0 — Surgical Context Phase 2 (demand-driven + delta)#222
Merged
Conversation
…loses #219) Surgical Context Phase 2 (v6.12.0) — backend + Surface A frontend. Backend: - get_lines MCP tool (10th tool): clamped, redaction-scanned, root-sandboxed on-demand line fetch — the demand-driven workhorse for line anchors. - `ask --mode index`: two-tier output emitting symbol-header pointers (`symbol :start-end`) only, no bodies; agents fetch via get_lines. - `ask --since <ref>`: delta context, restrict ranked output to files changed since a git ref. - Budget-aware disclosure: collapse signature bodies to anchors before dropping whole files when over maxTokens. Frontend (Surface A): - Token Reduction panel in the dashboard, sourced from benchmarks/reports/token-reduction.json (never hand-typed). - docs-vp/guide/surgical-context.md + VitePress sidebar entry. Tests: get_lines (6), --mode index + --since (4), token panel (3); updated MCP tool-count assertions 9→10 and version.json mcp_tools→10. Full suite green.
…2-219 feat: Surgical Context Phase 2 — demand-driven + delta + Token-Savings panel (v6.12.0)
- CHANGELOG + version sync to 6.12.0 (package.json ×3, gen-context.js VERSION + SERVER_INFO, src/mcp/server.js); version.json benchmark_id → sigmap-v6.12-main, date → 2026-06-05, mcp_tools → 10. - Docs: new ask --mode index / --since sections + get_lines in mcp.md (10 tools); roadmap v6.12.0 entry + v6.13 milestone; benchmark/index snapshot relabelled to v6.12.0. Retrieval/token metrics unchanged (canonical) — benchmarks re-run and confirm 96.5% token reduction. - CONTRIBUTORS v6.12.0 entry. - Consistency tests updated for the 10-tool count and v6.12 snapshot.
chore(release): v6.12.0 — changelog, version sync, docs, benchmarks
There was a problem hiding this comment.
Pull request overview
Promotes SigMap v6.12.0 to main for tagging/release, bringing “Surgical Context Phase 2” (demand-driven + delta) into the shipped bundle and syncing versions/docs/tests accordingly.
Changes:
- Adds
get_linesas the 10th MCP tool and wires it through the MCP server + bundledgen-context.js. - Introduces
ask --mode index(symbol-header only) andask --since <ref>(delta filtering), plus budget-aware anchor collapsing in the bundled context generator. - Adds a Token Reduction dashboard panel and updates docs/README/versioning + integration tests for the new tool count and snapshot metadata.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| version.json | Bumps snapshot metadata to v6.12.0 (date/id/tool count). |
| test/integration/token-savings-panel.test.js | Adds integration coverage for the Token Reduction dashboard panel. |
| test/integration/surgical-context.test.js | Adds integration coverage for ask --mode index and ask --since. |
| test/integration/retrieval.test.js | Updates MCP tool-count assertion to 10. |
| test/integration/mcp/tools-v14.test.js | Updates tools/list gate to 10 tools. |
| test/integration/mcp/server.test.js | Updates tools/list gate to 10 tools and asserts get_lines is present. |
| test/integration/mcp/get-lines.test.js | Adds integration coverage for the new get_lines MCP tool behavior. |
| test/integration/impact.test.js | Updates MCP tool-count assertion to 10. |
| test/integration/features/version-json.test.js | Updates version.json tool-count expectation to 10. |
| test/integration/features/readme-structure.test.js | Updates README benchmark/date assertions for the v6.12.0 snapshot. |
| test/integration/features/docs-sync.test.js | Updates docs assertions for “10 tools” wording. |
| src/mcp/tools.js | Adds get_lines to the MCP tool definitions and updates header comment. |
| src/mcp/server.js | Wires get_lines into dispatch; bumps server version to 6.12.0. |
| src/mcp/handlers.js | Implements getLines handler for demand-driven line-range fetch. |
| src/format/dashboard.js | Adds token-reduction report reader + Token Reduction dashboard panel HTML. |
| README.md | Updates benchmark snapshot/date and MCP tool count mention. |
| packages/core/package.json | Bumps package version to 6.12.0. |
| packages/cli/package.json | Bumps package version to 6.12.0. |
| package.json | Bumps root package version to 6.12.0. |
| gen-context.js | Updates bundled version and bundles Surgical Context + dashboard changes. |
| docs-vp/index.md | Updates homepage release/benchmark callouts for v6.12.0. |
| docs-vp/guide/task-benchmark.md | Updates benchmark snapshot wording to v6.12.0. |
| docs-vp/guide/surgical-context.md | Adds the Surgical Context guide (anchors, index mode, delta, get_lines). |
| docs-vp/guide/roadmap.md | Updates roadmap stats/timeline and adds v6.12.0 milestone entry. |
| docs-vp/guide/retrieval-benchmark.md | Updates benchmark snapshot wording to v6.12.0. |
| docs-vp/guide/quality-benchmark.md | Updates benchmark snapshot wording to v6.12.0. |
| docs-vp/guide/mcp.md | Updates MCP tool count and documents get_lines. |
| docs-vp/guide/generalization.md | Updates benchmark snapshot wording to v6.12.0. |
| docs-vp/guide/cli.md | Documents ask --mode index and ask --since. |
| docs-vp/guide/benchmark.md | Updates benchmark snapshot wording to v6.12.0 and references Surgical Context. |
| docs-vp/.vitepress/config.mts | Adds sidebar entry for the Surgical Context guide. |
| CONTRIBUTORS.md | Adds v6.12.0 contributor notes. |
| CHANGELOG.md | Adds v6.12.0 changelog entry describing Surgical Context Phase 2 + dashboard panel. |
Comment on lines
+461
to
+471
| const rel = String(args.file).replace(/\\/g, '/').replace(/^\//, ''); | ||
| const abs = path.resolve(cwd, rel); | ||
|
|
||
| // Sandbox: refuse paths that resolve outside the project root. | ||
| const root = path.resolve(cwd); | ||
| if (abs !== root && !abs.startsWith(root + path.sep)) { | ||
| return `Refused: ${rel} resolves outside the project root`; | ||
| } | ||
| if (!fs.existsSync(abs) || !fs.statSync(abs).isFile()) { | ||
| return `File not found: ${rel}`; | ||
| } |
Comment on lines
101
to
103
| ::: tip New in v6.3.0 — native tool registration | ||
| Claude Code and Codex now receive the full tool list at MCP startup without a discovery round-trip. The server declares all 9 tools in the `initialize` response, so your AI sees them immediately. No config change needed — upgrade via `npm install -g sigmap@latest`. | ||
| Claude Code and Codex now receive the full tool list at MCP startup without a discovery round-trip. The server declares all 10 tools in the `initialize` response, so your AI sees them immediately. No config change needed — upgrade via `npm install -g sigmap@latest`. | ||
| ::: |
| @@ -114,6 +114,8 @@ All tools are available on-demand — your AI agent calls only what it needs. | |||
| | `create_checkpoint` | Records session progress with a git state snapshot. | `summary` (required string) | `create_checkpoint(summary="Added rate limiting")` | | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes v6.12.0 from
developtomainfor tagging + release.Summary
get_linesMCP tool (10th),ask --mode index,ask --since, budget-aware body collapse, Token Reduction dashboard panel./update-docs): version sync 6.11.1 → 6.12.0, CHANGELOG, CONTRIBUTORS, docs,version.json(sigmap-v6.12-main,mcp_tools: 10).Changes
gen-context.js,src/mcp/*,src/format/dashboard.js.Test plan
node test/integration/all.js— 64/0npm run docs:buildpassesAfter merge: tag
v6.12.0on the main merge commit → release workflows fire.🤖 Generated with Claude Code