Skip to content

feat(cli): devmap_explain (BYOK), MCP smoke test in CI/publish, registry metadata (Phase 3) - #133

Merged
itsflaid merged 1 commit into
mainfrom
feat/mcp-explain
Oct 29, 2026
Merged

itsflaid merged 1 commit into
mainfrom
feat/mcp-explain

Conversation

@itsflaid

Copy link
Copy Markdown
Owner

Ringkasan

Fase 3: devmap_explain (BYOK), smoke test server MCP di CI dan di workflow publish, dan metadata untuk MCP Registry.

Yang baru

  • devmap_explain — minta provider AI milik user menjelaskan file/fitur/fungsi, dengan konteks yang dipilih DevMap.
    • Hanya terdaftar bila server dijalankan dengan --allow-ai, karena tool ini mengirim potongan source ke provider. Tanpa flag itu, tool-nya tidak ada.
    • Deskripsi tool menyebut hal ini secara eksplisit; openWorldHint: true, readOnlyHint: true, idempotentHint: false.
    • Tidak menulis apa pun ke disk (tidak ada .devmap/explain).
    • Provider belum dikonfigurasi → error terstruktur dengan petunjuk devmap init. Target tidak dikenal → daftar fitur yang ada, tanpa memanggil AI.
    • Jawaban dibatasi ukuran dengan flag truncated; hasil menyertakan snapshot { stale }.
    • File .env* sudah dikecualikan sejak scan (filterEngine), jadi tidak masuk indeks maupun konteks.
  • test/mcp-smoke.mjs — menjalankan hasil build (dist/) sebagai server stdio sungguhan, membuat snapshot lewat protokol, lalu query. Dijalankan di ci.yml setelah build, dan di publish.yml sebelum npm publish, supaya server MCP yang rusak tidak pernah terpublikasi (workflow publish sebelumnya tidak menjalankan e2e paket).
  • mcpName: io.github.itsflaid/devmap di package.json — dipakai MCP Registry untuk memverifikasi kepemilikan paket (dengan login GitHub, harus berawalan io.github.<username>/). Ada tes yang memeriksanya, dan yang akan memeriksa server.json terhadap paket begitu file itu ada.

Yang sengaja belum

  • server.json dan bump versi 0.9.0 ada di PR rilis terpisah setelah Fase 4 (docs + landing page), supaya version di server.json sama dengan versi yang benar-benar dipublikasikan dan docs tidak tertinggal dari rilis. Tag dan publish tetap dilakukan manual.
  • Pendaftaran ke MCP Registry butuh login GitHub (mcp-publisher login github) dan setelah paket ada di npm, jadi dilakukan manual.

Verifikasi

  • pnpm test:cli: 482/482 (8 tes baru di mcp-explain.test.ts)
  • pnpm build:cli ✅, node packages/cli/test/mcp-smoke.mjs ✅ (7 tool tanpa --allow-ai)
  • pnpm test:package-e2e ✅, git diff --check ✅
  • Tes untuk Windows/macOS belum bisa dijalankan dari sini; matriks CI di PR ini yang akan memvalidasinya (tes stdio, lock, dan smoke script memakai proses sungguhan).

Generated by Claude Code

…try metadata (Phase 3)

- devmap_explain: ask the user's configured AI provider to explain a file,
  feature or function, using DevMap's index to choose the context. It is only
  registered when the server starts with --allow-ai, because it sends source
  excerpts to the provider; the description says so, openWorldHint is true,
  nothing is written to disk, and a missing provider yields a structured error
  pointing to `devmap init`. Answers are size-capped with a `truncated` flag.
- runExplain accepts a preloaded snapshot (ExplainOptions.loaded).
- test/mcp-smoke.mjs: starts the compiled `devmap mcp` as a real stdio server,
  builds a snapshot through the protocol and queries it. Run by CI after the
  build and by the publish workflow before `npm publish`.
- package.json: mcpName (io.github.itsflaid/devmap) so the package can be
  verified by the MCP Registry. A test checks it, and checks server.json
  against the package once that file exists.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgTNRXcqugxRyJfMKL4AJ2
@vercel

vercel Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
devmap-web Ready Ready Preview Oct 29, 2026 9:43pm UTC

@github-actions

Copy link
Copy Markdown

✅ Welcome ke DevMap!

Terima kasih sudah buat PR. Pastikan checklist ini terpenuhi sebelum review:

  • devmap doctor lolos (tanpa error)
  • Test pnpm test:cli lolos (semua pass)
  • New commands diupdate di docs/commands.md
  • Tidak ada console.log di command files
  • Registry terms sesuai standar (baca docs/guide/05-signal-registry.md)
  • Code style match dengan CONTRIBUTING.md

CI akan jalan otomatis pada setiap update. Kalau gagal, akan muncul link run di komentar ini.

Kalau DevMap membantu, tolong star ya: https://github.com/itsflaid/devmap

Terima kasih kontribusinya! 🙏

@itsflaid

Copy link
Copy Markdown
Owner Author

Umazing

@itsflaid itsflaid closed this Oct 29, 2026
@itsflaid itsflaid reopened this Oct 29, 2026
@itsflaid
itsflaid merged commit 69d8a7a into main Oct 29, 2026
3 checks passed
@itsflaid
itsflaid deleted the feat/mcp-explain branch October 29, 2026 21:44

This branch was successfully deployed

1 active deployment
Preview — 5590e53e Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants