Skip to content

Feat/claude plugin#1188

Open
Geek0x0 wants to merge 14 commits into
DeusData:mainfrom
Geek0x0:feat/claude-plugin
Open

Feat/claude plugin#1188
Geek0x0 wants to merge 14 commits into
DeusData:mainfrom
Geek0x0:feat/claude-plugin

Conversation

@Geek0x0

@Geek0x0 Geek0x0 commented Jul 20, 2026

Copy link
Copy Markdown

What does this PR do?

What does this PR do?

Adds a Claude Code plugin for codebase-memory-mcp, distributed with this repo acting as its own plugin marketplace. Claude Code users install the full experience — MCP server, the codebase-memory skill, three graph agents (Scout/Verify/Audit), and the context hooks — in one step:

claude plugin marketplace add DeusData/codebase-memory-mcp
claude plugin install codebase-memory

Other clients (Codex, Gemini, Copilot, …) keep the existing codebase-memory-mcp install path unchanged; this is a Claude-Code-only additional distribution.

A new emit-plugin

[--version X] subcommand generates the whole plugin tree from the same embedded C strings the install subcommand already uses, so the plugin can never drift from the source of truth:

  • skills/codebase-memory/SKILL.md and the three agents/*.md are written verbatim from cbm_get_skills() and cbm_render_graph_profile(CLAUDE, tier, DIRECT).
  • .mcp.json registers a single codebase-memory-mcp server launched via npx -y codebase-memory-mcp (the plugin never bundles the binary — npm postinstall self-bootstraps it).
  • hooks/hooks.json wires four events: SessionStart, SubagentStart, PreToolUse (Grep|Glob), PostToolUse (Read), all routed through hook-augment.

.claude-plugin/marketplace.json is hand-written; the generated plugin/ tree is committed and regenerated idempotently. emit-plugin wholly owns out_dir (recursive clear + regenerate each run) and refuses to clear a directory that isn't already an emitted plugin tree, guarding against accidental data loss. scripts/check-plugin-drift.sh rebuilds, re-emits, and fails on any plugin/ difference (via git status --porcelain, catching new/untracked files too); it runs as a merge-gating plugin-drift job in .github/workflows/pr.yml. No new dependencies.

Checklist

  • Every commit is signed off (git commit -s) — required, CI rejects
    unsigned commits (DCO, see CONTRIBUTING.md)
  • Tests pass locally (make -f Makefile.cbm test)
  • Lint passes (make -f Makefile.cbm lint-ci)
  • New behavior is covered by a test (reproduce-first for bug fixes)

Geek0x0 added 12 commits July 20, 2026 14:27
Signed-off-by: Kody <kaidi.shi.1121@gmail.com>
Signed-off-by: Kody <kaidi.shi.1121@gmail.com>
Signed-off-by: Kody <kaidi.shi.1121@gmail.com>
Extends the emit-plugin generator with emit_agents(), which renders the
Claude-dialect Scout/Verify/Audit profiles via cbm_render_graph_profile and
writes them verbatim to agents/<slug>.md.

Signed-off-by: Kody <kaidi.shi.1121@gmail.com>
…failure)

Signed-off-by: Kody <kaidi.shi.1121@gmail.com>
Signed-off-by: Kody <kaidi.shi.1121@gmail.com>
Signed-off-by: Kody <kaidi.shi.1121@gmail.com>
Signed-off-by: Kody <kaidi.shi.1121@gmail.com>
Signed-off-by: Kody <kaidi.shi.1121@gmail.com>
Signed-off-by: Kody <kaidi.shi.1121@gmail.com>
Signed-off-by: Kody <kaidi.shi.1121@gmail.com>
@Geek0x0
Geek0x0 requested a review from DeusData as a code owner July 20, 2026 21:29
Geek0x0 added 2 commits July 20, 2026 15:34
- rename local skills -> skill_list (was shadowing file-scope skills[])
- remove always-false !skills guard (cbm_get_skills never returns NULL)
- clang-format-20 reflow of emit_agents/emit_mcp_json (no behavior change)

Signed-off-by: Kody <kaidi.shi.1121@gmail.com>
POSIX mkdir(path, mode) is 2-arg; MinGW/clang mkdir is 1-arg, breaking the
Windows build. Use cbm_mkdir_p (compat_fs) like the other tests; drop the
now-unused <sys/stat.h>.

Signed-off-by: Kody <kaidi.shi.1121@gmail.com>
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.

1 participant