diff --git a/bin/claude-md-template.js b/bin/claude-md-template.js index 36295a4..f86b8cb 100644 --- a/bin/claude-md-template.js +++ b/bin/claude-md-template.js @@ -17,9 +17,8 @@ Follow the rules below so the tools work together correctly. ## Priority Rules (execute in order) -1. **Always call \`workflow_match\`** with the user's prompt before responding. +1. **Call \`workflow_match\`** only when the user's prompt explicitly contains the word "workflow". If a workflow matches, follow the returned instructions exactly. - Skip only if the request is a simple question with no actionable task. 2. **Call \`vocabulary_lookup\`** when you encounter unfamiliar or ambiguous terms that could be domain jargon, project names, or abbreviations. 3. **Update kanban status** when working on tracked tasks: @@ -44,7 +43,7 @@ Item types: TASK, BUG. Priorities: LOW, MEDIUM, HIGH, URGENT. - \`kanban_append_review\`, \`kanban_get_review_history\` — add and read review feedback ### devglide-workflow — Reusable workflow templates -- \`workflow_match\` — match a user prompt to an existing workflow (call this first!) +- \`workflow_match\` — match a user prompt to an existing workflow (only when user mentions "workflow") - \`workflow_list\`, \`workflow_get\` — browse and inspect workflows - \`workflow_get_instructions\` — get compiled instructions from all enabled workflows - \`workflow_create\`, \`workflow_toggle\` — create or enable/disable workflows @@ -108,8 +107,7 @@ Describe what to test in natural language and scenarios are generated automatica 3. Start working on items one by one ### Starting work on a task -1. \`workflow_match\` — check for an applicable workflow -2. \`kanban_move_item\` to In Progress +1. \`kanban_move_item\` to In Progress 3. Implement changes 4. \`kanban_append_work_log\` — record what was done 5. \`kanban_move_item\` to In Review or Testing diff --git a/src/apps/documentation/public/page.js b/src/apps/documentation/public/page.js index 02fe4dc..4da2f96 100644 --- a/src/apps/documentation/public/page.js +++ b/src/apps/documentation/public/page.js @@ -293,7 +293,7 @@ const MODULES_HTML = ` decisionloopsub-workflow
When Claude Code receives a prompt, it calls workflow_match to check if any enabled workflow applies. Matching workflows return compiled step-by-step instructions that Claude follows.
When the user explicitly mentions "workflow" in their prompt, Claude calls workflow_match to check if any enabled workflow applies. Matching workflows return compiled step-by-step instructions that Claude follows.
workflow_list, workflow_get, workflow_create, workflow_get_instructions, workflow_match, workflow_toggle
diff --git a/src/apps/workflow/mcp.ts b/src/apps/workflow/mcp.ts index 86bcdbc..e3c1caf 100644 --- a/src/apps/workflow/mcp.ts +++ b/src/apps/workflow/mcp.ts @@ -40,9 +40,8 @@ export function createWorkflowMcpServer(): McpServer { '- Node types include triggers, shell commands, kanban ops, git ops, tests, log, file I/O, LLM, HTTP, decisions, loops, and sub-workflows.', '', '### Matching workflows to prompts', - '- **Always** call `workflow_match` with the user prompt before responding to check if a workflow applies.', + '- Call `workflow_match` **only** when the user\'s prompt explicitly contains the word "workflow".', '- If a match is found, follow the returned workflow instructions exactly.', - '- If no match is found, proceed normally.', '', '### Instructions', '- Use `workflow_get_instructions` to get compiled instructions from all enabled workflows.', @@ -180,7 +179,7 @@ export function createWorkflowMcpServer(): McpServer { server.tool( 'workflow_match', - 'Match a user prompt against all enabled workflows. Returns only workflows whose name, description, tags, or node content match the prompt, ranked by relevance. Use this before responding to check if a workflow applies.', + 'Match a user prompt against all enabled workflows. Returns only workflows whose name, description, tags, or node content match the prompt, ranked by relevance. Only call this when the user explicitly mentions "workflow" in their prompt.', { prompt: z.string().describe('The user prompt to match against workflows'), projectId: z.string().optional().describe('Optional project ID to scope matching'),