review_skill engine fixes + batch review, result cache, anonymous dry-run - #29
Merged
Conversation
…ide, portability range Addresses operator feedback on the review_skill MCP engine: - outline_only detection counted bullets/numbered items as non-body, so dense well-structured SKILL.md files were misflagged as "headings without body", which suppressed the semantic pass. Now counts any non-heading content line. - Semantic pass now retries once with backoff (15s timeout) instead of silently dropping on a transient gateway blip — it's the key feature for niche jargon. - An outline_only hint no longer blocks the semantic pass (only hard truncation warnings do); heading-dense skills are exactly where it adds the most value. - New optional `language` param lets callers pin the language for mixed-jargon docs (e.g. PT-BR fintech with English terms) where auto-detect is low-confidence. - Portability pillar: "portable by construction" baseline (no lock-in, no declaration) instead of a flat 60 cap, restoring diagnostic range and a clearer, localized diagnostic message. https://claude.ai/code/session_01EntkmBiYh381pKqvvSFBkg
…equest Infra/API follow-ups from operator feedback: - review_skills_batch: score up to 10 files in one parallel call, aligned to input order with a single shared feedback_request — far lower round-trip latency than N review_skill calls (feedback #8). - In-process result cache keyed by content_hash + options. Identical re-submissions skip both the deterministic scoring and the LLM semantic pass, cutting ~15-30s to ~0 on iterative loops; responses carry `cached` (#9). Core review logic extracted into computeReview(), shared by single + batch. - dry_run preview for upload_packages and request_primitive: validates the file (type inference + prompt-injection guard) or echoes the would-be request WITHOUT auth, persistence, or model budget, so agents can test the publish flow before connecting OAuth. The MCP write-tool auth gate now lets a dry_run call through anonymously (#5/#6). https://claude.ai/code/session_01EntkmBiYh381pKqvvSFBkg
criptogus
marked this pull request as ready for review
May 28, 2026 18:47
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
Acts on detailed operator feedback about the
review_skillMCP engine. Two layers of work:Engine fixes (
src/lib/mcp/tools/skills.ts)outline_onlyfalse positive (root cause of Defensibility moats + viral growth loops #2). The detector counted bullet/numbered list items as non-body, so dense, well-structuredSKILL.mdfiles were misread as "headings without body", which suppressed the semantic pass. Now counts any non-heading content line.outline_onlyhint no longer blocks it (only hard truncation does).languageparam pins the language (confidence 1.0) for mixed-jargon docs (PT-BR + English fintech terms).Infra / API (
skills.ts,uploads.server.ts,api/mcp.ts)review_skills_batchtool scores up to 10 files in one parallel call, aligned to input order with a single sharedfeedback_request. Core review logic extracted intocomputeReview(), shared by single + batch.content_hash+ options; identical re-submissions skip both the deterministic scoring and the LLM semantic pass (~15-30s → ~0). Responses carry acachedflag. TTL-bounded, size-capped.dry_runpreview forupload_packages(type inference + prompt-injection guard) andrequest_primitive(echoes the would-be payload). No auth, no persistence, no model budget. The MCP write-tool auth gate now lets adry_runcall through anonymously.Already fine (#7)
Response keys are already stable English (
pillar,guardrails,top_actions); only the human-readabletitleis localized. Parsers should key offpillar.Test plan
input_warning: outline_only;semantic_pass.ran: true.gateway_unavailable_or_errored.language: "pt"on a mixed-jargon doc → localized PT feedback.requires claude; rises to strong with "validated on Claude, GPT and Gemini".review_skills_batchreturnsresults[]aligned to input; second identical call returnscached: truefast.upload_packages/request_primitivewithdry_run:truesucceed with no Authorization header and create nothing.https://claude.ai/code/session_01EntkmBiYh381pKqvvSFBkg