Add MCP and skill ROI optimize insights#354
Open
ozymandiashh wants to merge 1 commit into
Open
Conversation
This was referenced May 18, 2026
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.
Summary
optimizefindings for capability-level MCP/skill analysis:Why
optimizealready reports unused MCP inventory and ghost skills, but it could not answer two higher-level questions:Those are different from ghost/unused checks: a capability can be invoked frequently and still be low-signal for edit-producing work, or correlate with repeated fix/test loops. The new findings surface that as a review signal without pretending correlation is causation.
What changed
mcp__<server>__<tool>names.call.skillsonly; generic turn labels such assubCategoryare not treated as skills.coding,debugging,feature,refactoring,testing).MCP docs: 1/4 implementation turns produced edits (25% edit rate), $2.00 touchedskill api-review: 0/3 implementation turns produced edits (0% edit rate), $1.50 touchedskill planner: 2.0 retries/edit turn vs 0.0 baseline in the same task categories (3 edit turns, baseline 3)scanAndDetect, alongside existing MCP coverage aggregation.subCategoryfalse skill labelsValidation
I validated the behavior by running the real
src/optimize.tsdetector exports against controlledProjectSummaryfixtures vianpx tsx --eval. This is not just green tests: the harness constructs the exact edge cases this PR is meant to handle and prints the detector output.{ "roi_shared_turn_cap": { "title": "2 MCP/skill capabilities with low edit ROI", "tokensSaved": 1650, "expectedTokensSaved": 1650, "containsMcpCombo": true, "containsSkillCombo": true, "proof": "3 shared non-edit turns * 2,200 effective tokens * 25%; not doubled to 3,300 when MCP and skill co-occur" }, "retry_same_category_baseline_and_shared_turn_cap": { "title": "2 MCP/skill capabilities correlated with high retries", "tokensSaved": 3300, "expectedTokensSaved": 3300, "containsSameCategoryBaseline": true, "ignoresHighRetryDebuggingBaseline": true, "proof": "3 shared coding edit turns * 2,200 effective tokens * 50%; debugging retry turns do not contaminate coding baseline" }, "subCategory_false_skill_guard": { "finding": null, "proof": "turn.subCategory=frontend with no call.skills and no MCP tools emits no capability finding" } }What this proves:
1,650tokens instead of the buggy3,300double count.3,300tokens instead of the buggy6,600double count.debuggingedit turns are present in the fixture, but they do not contaminate thecodingbaseline.subCategoryalone does not create a fakeskill frontendfinding.Supporting checks:
./node_modules/.bin/tsc --noEmit --pretty falsenpx vitest run tests/optimize.test.ts— 87 tests passednpm run buildnpm test -- --run— 62 files / 882 tests passedgit diff --check origin/main...HEADassess,check,semgrepall passedsubCategoryskill-label risksPASSPASSon the amended diffNotes