Skip to content

Release v6.12.0 — Surgical Context Phase 2 (demand-driven + delta)#222

Merged
manojmallick merged 4 commits into
mainfrom
develop
Jun 5, 2026
Merged

Release v6.12.0 — Surgical Context Phase 2 (demand-driven + delta)#222
manojmallick merged 4 commits into
mainfrom
develop

Conversation

@manojmallick

Copy link
Copy Markdown
Owner

Promotes v6.12.0 from develop to main for tagging + release.

Summary

Changes

  • Code: gen-context.js, src/mcp/*, src/format/dashboard.js.
  • Docs: cli.md, mcp.md, roadmap.md, benchmark/retrieval/quality/task/generalization, index.md, surgical-context.md.
  • Version: package.json ×3, gen-context.js, src/mcp/server.js, version.json.

Test plan

  • node test/integration/all.js — 64/0
  • unit 23/0, R-language pass
  • npm run docs:build passes
  • Benchmarks re-run — token reduction 96.5% confirmed

After merge: tag v6.12.0 on the main merge commit → release workflows fire.

🤖 Generated with Claude Code

…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
Copilot AI review requested due to automatic review settings June 5, 2026 01:38
@manojmallick manojmallick merged commit c391e0a into main Jun 5, 2026
9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_lines as the 10th MCP tool and wires it through the MCP server + bundled gen-context.js.
  • Introduces ask --mode index (symbol-header only) and ask --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 thread src/mcp/handlers.js
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 thread docs-vp/guide/mcp.md
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`.
:::
Comment thread docs-vp/guide/mcp.md
@@ -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")` |
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.

v6.12.0 — Surgical Context Phase 2: demand-driven + delta + Token-Savings panel

2 participants