Created
December 10, 2025 16:22
-
-
Save udondan/0b973517d2ef37ac800bcc63bd5e31bc to your computer and use it in GitHub Desktop.
OpenCode plugin to enforce responsible-vibe-mcp
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
| import { randomUUID } from 'crypto'; | |
| import type { Plugin } from '@opencode-ai/plugin'; | |
| export const StartDevelopmentPlugin: Plugin = async ({ | |
| project, | |
| client, | |
| $, | |
| directory, | |
| worktree, | |
| }) => { | |
| const firstMessagePerSession = new Set<string>(); | |
| return { | |
| 'chat.message': async (input, output) => { | |
| const { sessionID, agent, messageID } = input; | |
| if (agent?.toLocaleLowerCase() !== 'vibe' || !messageID) { | |
| return; | |
| } | |
| // Check if this is the first message in this session | |
| if (!firstMessagePerSession.has(sessionID)) { | |
| firstMessagePerSession.add(sessionID); | |
| output.parts.push({ | |
| id: randomUUID(), | |
| sessionID, | |
| messageID, | |
| type: 'text', | |
| text: ` | |
| We need to start a new development process. | |
| IMPORTANT: Use list_workflows tool to get available workflows and select the best workflow for the given task. Then start the workflow using start_development tool. | |
| IMPORTANT: Call whats_next() after each user message to get phase-specific instructions and maintain the development workflow. | |
| IMPORTANT: Do NOT start development without explicit instructions from whats_next(). Do NOT even read files unless the whats_next() tool instructs you to do so! | |
| `, | |
| synthetic: true, | |
| } as any); | |
| } | |
| }, | |
| }; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment