Skip to content

refactor: cut comments in the MCP packages down to the ones that explain why - #495

Merged
emaarco merged 1 commit into
mainfrom
emaarco/refactor-cut-comments-in-the-mcp-packages-down-t
Oct 28, 2026
Merged

emaarco merged 1 commit into
mainfrom
emaarco/refactor-cut-comments-in-the-mcp-packages-down-t

Conversation

@emaarco

@emaarco emaarco commented Oct 28, 2026

Copy link
Copy Markdown
Member

Why

About a fifth of the source lines in the MCP packages were comments, and many of them only repeated the code or copied a rule from the root CLAUDE.md, so the same rule lived in several places that drift apart. This change reduces the comments to the reasons that no name and no test can show.

What

  • Cut comment lines in analytics-client (~1,150 → ~290), analytics-connector (1,640 → ~620), widget-shell (5,021 → ~1,390) and camunda7-connector (6,024 → ~1,870), tests included.
  • Deleted comments that restate a name, signature or assertion, section banners, and verbatim copies of CLAUDE.md rules; shortened multi-line JSDoc blocks to the reason they carry, usually one line.
  • Kept the reasons that are not visible in the code (engine, Prometheus and host quirks, security and honesty reasons, fixture choices), e.g. why increase() misses a born series, that a suspended handler resumes under the original token, the engine config precedence, and what catalogue drift does.
  • No code, name, string, tool description or catalogue text changed; the only non-comment line is one prettier reflow in camunda7-connector after an inline comment was removed.

Verification

  • pnpm build, pnpm typecheck, pnpm test (incl. tools/list goldens and docs refs), pnpm lint and pnpm format:check pass from the repo root.
  • git diff -U0 checked for changed lines outside comments: only multi-line comment continuations and the one prettier reflow.
  • Not run: test:host and test:pg; no widget or Postgres code changed.
  • Every deletion still wants a reviewer who knows the package, as the issue asks; the most aggressive cuts are in widget-shell and camunda7-connector.

Out of scope / Follow-ups

  • One PR for all four packages instead of one per package, at the owner's request.
  • No lint rule against comments yet; decide after this lands.

Closes #491

@emaarco
emaarco enabled auto-merge (squash) October 28, 2026 08:54
@netlify

netlify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for spectacular-cobbler-f6c85b ready!

Name Link
🔨 Latest commit b2bf7d5
🔍 Latest deploy log https://app.netlify.com/projects/spectacular-cobbler-f6c85b/deploys/6ae1b829f2987d9c986cbff5
😎 Deploy Preview https://deploy-preview-495--spectacular-cobbler-f6c85b.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@emaarco
emaarco merged commit e09cc7f into main Oct 28, 2026
27 checks passed
@emaarco
emaarco deleted the emaarco/refactor-cut-comments-in-the-mcp-packages-down-t branch October 28, 2026 09:00
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.

[Refactor]: Cut comments in the MCP packages down to the ones that explain why

1 participant