From 3e62448b18d6addb99dcc8cb786f06faea22421a Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sun, 30 Nov 2025 08:29:44 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 28 +++++++++++++++++ README.md | 3 ++ commands/get-mode.md | 14 +++++++++ commands/init.md | 18 +++++++++++ commands/set-mode.md | 18 +++++++++++ commands/vibe.md | 18 +++++++++++ plugin.lock.json | 61 ++++++++++++++++++++++++++++++++++++++ skills/vibesafe/SKILL.md | 30 +++++++++++++++++++ 8 files changed, 190 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 commands/get-mode.md create mode 100644 commands/init.md create mode 100644 commands/set-mode.md create mode 100644 commands/vibe.md create mode 100644 plugin.lock.json create mode 100644 skills/vibesafe/SKILL.md diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..383ac03 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,28 @@ +{ + "name": "vibesafe", + "description": "Vibesafe developer tools: scan, compile, test, save, diff, status, mcp; includes mode toggle.", + "version": "0.2.0-pre1", + "author": { + "name": "Julep AI", + "email": "developers@julep.ai" + }, + "skills": [ + "./skills/vibesafe/SKILL.md" + ], + "commands": [ + "./commands/vibe.md", + "./commands/set-mode.md", + "./commands/get-mode.md", + "./commands/init.md" + ], + "mcp": { + "vibesafe": { + "type": "stdio", + "command": "bash", + "args": [ + "-lc", + "if command -v vibesafe >/dev/null 2>&1; then vibesafe mcp; elif command -v uvx >/dev/null 2>&1; then uvx vibesafe mcp; else python -m vibesafe.mcp; fi" + ] + } + } +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e5849b2 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# vibesafe + +Vibesafe developer tools: scan, compile, test, save, diff, status, mcp; includes mode toggle. diff --git a/commands/get-mode.md b/commands/get-mode.md new file mode 100644 index 0000000..4f4785f --- /dev/null +++ b/commands/get-mode.md @@ -0,0 +1,14 @@ +--- +name: get-mode +description: "Show the current VIBESAFE_ENV (mode) visible to this session." +arguments: [] +--- + +Report the Vibesafe mode for this session by reading `VIBESAFE_ENV` (falls back to config default if unset). + +Steps: +1) `echo "VIBESAFE_ENV=${VIBESAFE_ENV:-}"` +2) If unset, note that the config default (`project.env` in vibesafe.toml) will apply. + +Example: +- `/vibesafe:get-mode` diff --git a/commands/init.md b/commands/init.md new file mode 100644 index 0000000..56e5435 --- /dev/null +++ b/commands/init.md @@ -0,0 +1,18 @@ +--- +name: init +description: "Initialize the Vibesafe plugin session: report mode, list commands, and verify MCP connectivity." +arguments: [] +--- + +Run a quick readiness check: +- Show current mode (`VIBESAFE_ENV` or config default) +- List available Vibesafe commands +- Confirm MCP server connectivity + +Example: +- `/vibesafe:init` + +Steps: +1) `echo "VIBESAFE_ENV=${VIBESAFE_ENV:-}"` +2) `vibesafe status || true` # harmless status check +3) `echo "Commands: scan, compile, test, save, diff, status, mcp"` diff --git a/commands/set-mode.md b/commands/set-mode.md new file mode 100644 index 0000000..2b83a25 --- /dev/null +++ b/commands/set-mode.md @@ -0,0 +1,18 @@ +--- +name: set-mode +description: "Set VIBESAFE_ENV for subsequent Vibesafe commands (dev|prod)." +arguments: + - name: env + description: "Mode to set (dev or prod)" + required: true +--- + +Set the Vibesafe mode for this session by exporting `VIBESAFE_ENV`, then report the new value. + +Steps (run in order): +1) `export VIBESAFE_ENV="{{ env }}"` +2) `echo "VIBESAFE_ENV=$VIBESAFE_ENV"` + +Examples: +- `/vibesafe:set-mode dev` +- `/vibesafe:set-mode prod` diff --git a/commands/vibe.md b/commands/vibe.md new file mode 100644 index 0000000..e3f8530 --- /dev/null +++ b/commands/vibe.md @@ -0,0 +1,18 @@ +--- +name: vibe +description: "Run vibesafe CLI commands through the MCP server. Usage: /vibe [args] where subcommand ∈ {scan, compile, test, save, diff, status, mcp}." +arguments: + - name: subcommand + description: "vibesafe subcommand to execute (scan | compile | test | save | diff | status | mcp)" + required: true +--- + +Run Vibesafe toolchain actions via MCP. + +Examples: +- `/vibe scan` +- `/vibe compile --target app.math.ops/fibonacci` +- `/vibe test --target app.math.ops/fibonacci` +- `/vibe status` +- `/vibe diff` +- `/vibe save --target app.math.ops/fibonacci` diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..33bebc9 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,61 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:julep-ai/vibesafe:", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "06bd38fbe7c1519b9663c0bdb4b27de9381c53a4", + "treeHash": "bd0eaf379739b453eb51241fa484f826a84fa6c81947a12bde347c8405866dd0", + "generatedAt": "2025-11-28T10:19:21.183879Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "vibesafe", + "description": "Vibesafe developer tools: scan, compile, test, save, diff, status, mcp; includes mode toggle.", + "version": "0.2.0-pre1" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "cc9cb6e55404eddd33aa37db2f53a0e6f8d32b2ae9603e869dbc91ebedba3a7e" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "bc4c3c47ea08f48bfafe64c298b79ffe7f8314cd0d3e8455e2c23c1a0803952d" + }, + { + "path": "commands/vibe.md", + "sha256": "4ff793062dc004235c179671f5f25f2e878150049153a006e1ae59fd01acedb7" + }, + { + "path": "commands/init.md", + "sha256": "45cc27a7515a2f9ff7b18feccc06518c271d6670fe51c42d6097f443304f1f28" + }, + { + "path": "commands/set-mode.md", + "sha256": "f6c6876f26090b578655aa0baf9bd5c54f1595978faae753b49a218f93eb6ecb" + }, + { + "path": "commands/get-mode.md", + "sha256": "91097c8788b76dc6d25e81c4256ecdf86b9e5e7cb7305385cc86fadd46943270" + }, + { + "path": "skills/vibesafe/SKILL.md", + "sha256": "c094db8f43ad11d8e507c9f5b1b6bc676a75382f17fd21668f608d5923f05989" + } + ], + "dirSha256": "bd0eaf379739b453eb51241fa484f826a84fa6c81947a12bde347c8405866dd0" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file diff --git a/skills/vibesafe/SKILL.md b/skills/vibesafe/SKILL.md new file mode 100644 index 0000000..7e6748e --- /dev/null +++ b/skills/vibesafe/SKILL.md @@ -0,0 +1,30 @@ +--- +name: vibesafe +description: "Uses the Vibesafe MCP server to scan, compile, test, save, diff, and report status for Vibesafe units. Activate when the user asks to run vibesafe CLI commands (scan/compile/test/save/diff/status), regenerate code from specs, or inspect drift/checkpoints." +version: "0.2.1" +tags: ["vibesafe", "codegen", "mcp", "cli"] +allowed-tools: "MCP(vibesafe:*)" +--- + +# Vibesafe MCP Skill + +Provides full control of the Vibesafe toolchain through the MCP server exposed by this plugin. + +## When to Use +- User asks to run `vibesafe scan`, `compile`, `test`, `save`, `diff`, or `status`. +- Need to regenerate implementations from specs or check drift against checkpoints. +- Want to query registry contents, provider config, or checkpoints via the MCP tools. + +## Available Tools +- `scan` — list all registered Vibesafe units with metadata. +- `compile` — generate implementations for a unit (supports `target`, `force`). +- `test` — run doctests/quality gates (optional `target`). +- `save` — activate checkpoints (optional `target`). +- `status` — report version, unit counts, environment. + +## Examples +- “List all vibesafe units” → use `scan`. +- “Recompile app.math.ops/fibonacci” → call `compile` with `target`. +- “Run vibesafe tests” → call `test`. +- “Save checkpoints for all units” → call `save`. +- “Check drift” → call `diff` (via status+diff as available).