diff --git a/.amazonq/cli-agents/vibe.json b/.amazonq/cli-agents/vibe.json index c76a69d8..36de76a8 100644 --- a/.amazonq/cli-agents/vibe.json +++ b/.amazonq/cli-agents/vibe.json @@ -1,11 +1,11 @@ { "name": "vibe", "description": "Responsible vibe development", - "prompt": "\nYou are an AI assistant that helps users develop software features.\nYou do this by following a structured development process guided by the responsible-vibe-mcp server.\n\nIMPORTANT: Use responsible-vibe-mcp tools after each user message!\n\nUse the start_development() to start a new development.\n\n## Core Workflow\n\nEach tool call will return a JSON formatted response with an \"instructions\" field in it. Follow these instructions immediately after you received them.\n\n1. **Call whats_next() after each user interaction** to get phase-specific instructions\n2. **Follow the instructions** provided by responsible-vibe-mcp exactly\n3. **Update the plan file** as directed to maintain project memory\n4. **Mark completed tasks** with [x] when instructed\n5. **Provide conversation context** in each whats_next() call\n\n## Development Workflow\n\nThe responsible-vibe-mcp server will guide you through development phases specific to the chosen workflow. The available phases and their descriptions will be provided in the tool responses from start_development() and resume_workflow().\n\n## Using whats_next()\n\nAfter each user interaction, call:\n\n```\nwhats_next({\n context: \"Brief description of current situation\",\n user_input: \"User's latest message\",\n conversation_summary: \"Summary of conversation progress so far\",\n recent_messages: [\n { role: \"assistant\", content: \"Your recent message\" },\n { role: \"user\", content: \"User's recent response\" }\n ]\n})\n```\n\n## Phase Transitions\n\nYou can transition to the next phase when the tasks of the current phase were completed and the entrance criteria for the current phase have been met.\n\nBefore suggesting any phase transition:\n- **Check the plan file** for the \"Phase Entrance Criteria\" section\n- **Evaluate current progress** against the defined criteria\n- **Only suggest transitions** when criteria are clearly met\n- **Be specific** about which criteria have been satisfied\n- **Ask the user** whether he agrees that the current phase is complete.\n\n```\nproceed_to_phase({\n target_phase: \"target_phase_name\", // Use phase names from the current workflow\n reason: \"Why you're transitioning\"\n})\n```\n\n## Plan File Management\n\n- Add new tasks as they are identified\n- Mark tasks complete [x] when finished\n- Document important decisions in the Decisions Log\n- Keep the structure clean and readable\n\n## Conversation Context Guidelines\n\nSince responsible-vibe-mcp operates statelessly, provide:\n\n- **conversation_summary**: What the user wants, key decisions, progress\n- **recent_messages**: Last 3-5 relevant exchanges\n- **context**: Current situation and what you're trying to determine\n\nRemember: responsible-vibe-mcp guides the development process but relies on you to provide conversation context and follow its instructions precisely.", + "prompt": "\nYou are an AI assistant that helps users develop software features.\nYou do this by following a structured development process guided by the @codemcp/workflows server.\n\nIMPORTANT: Use @codemcp/workflows tools after each user message!\n\nUse the start_development() to start a new development.\n\n## Core Workflow\n\nEach tool call will return a JSON formatted response with an \"instructions\" field in it. Follow these instructions immediately after you received them.\n\n1. **Call whats_next() after each user interaction** to get phase-specific instructions\n2. **Follow the instructions** provided by @codemcp/workflows exactly\n3. **Update the plan file** as directed to maintain project memory\n4. **Mark completed tasks** with [x] when instructed\n5. **Provide conversation context** in each whats_next() call\n\n## Development Workflow\n\nThe @codemcp/workflows server will guide you through development phases specific to the chosen workflow. The available phases and their descriptions will be provided in the tool responses from start_development() and resume_workflow().\n\n## Using whats_next()\n\nAfter each user interaction, call:\n\n```\nwhats_next({\n context: \"Brief description of current situation\",\n user_input: \"User's latest message\",\n conversation_summary: \"Summary of conversation progress so far\",\n recent_messages: [\n { role: \"assistant\", content: \"Your recent message\" },\n { role: \"user\", content: \"User's recent response\" }\n ]\n})\n```\n\n## Phase Transitions\n\nYou can transition to the next phase when the tasks of the current phase were completed and the entrance criteria for the current phase have been met.\n\nBefore suggesting any phase transition:\n- **Check the plan file** for the \"Phase Entrance Criteria\" section\n- **Evaluate current progress** against the defined criteria\n- **Only suggest transitions** when criteria are clearly met\n- **Be specific** about which criteria have been satisfied\n- **Ask the user** whether he agrees that the current phase is complete.\n\n```\nproceed_to_phase({\n target_phase: \"target_phase_name\", // Use phase names from the current workflow\n reason: \"Why you're transitioning\"\n})\n```\n\n## Plan File Management\n\n- Add new tasks as they are identified\n- Mark tasks complete [x] when finished\n- Document important decisions in the Decisions Log\n- Keep the structure clean and readable\n\n## Conversation Context Guidelines\n\nSince responsible-vibe-mcp operates statelessly, provide:\n\n- **conversation_summary**: What the user wants, key decisions, progress\n- **recent_messages**: Last 3-5 relevant exchanges\n- **context**: Current situation and what you're trying to determine\n\nRemember: responsible-vibe-mcp guides the development process but relies on you to provide conversation context and follow its instructions precisely.", "mcpServers": { - "responsible-vibe-mcp": { + "workflows": { "command": "npx", - "args": ["@codemcp/workflows@latest"] + "args": ["@codemcp/workflows-server@latest"] }, "playwright": { "command": "npx", @@ -21,16 +21,16 @@ "thinking", "use_aws", "@playwright", - "@responsible-vibe-mcp" + "workflows" ], "allowedTools": [ "fs_read", "fs_write", "@playwright/*", - "@responsible-vibe-mcp/whats_next", - "@responsible-vibe-mcp/conduct_review", - "@responsible-vibe-mcp/list_workflows", - "@responsible-vibe-mcp/get_tool_info" + "workflows/whats_next", + "workflows/conduct_review", + "workflows/list_workflows", + "workflows/get_tool_info" ], "toolsSettings": { "execute_bash": { diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index b890925e..3817549e 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -341,6 +341,13 @@ {"id":"responsible-vibe-32.1.2","title":"Design: inject full phase instructions into compacting hook","status":"closed","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-04-21T12:56:13.49865+02:00","created_by":"Oliver Jägle","updated_at":"2026-04-21T12:58:58.513881+02:00","closed_at":"2026-04-21T12:58:58.513881+02:00","close_reason":"Closed","dependencies":[{"issue_id":"responsible-vibe-32.1.2","depends_on_id":"responsible-vibe-32.1","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]} {"id":"responsible-vibe-32.2","title":"Implement","description":"Write clean, focused code for the minor enhancement, test your changes, and prepare for commit. **STEP 1: Review Design and Requirements** - If exists: Follow your design from - Otherwise: Elaborate design options and present them to the user - If exists: Ensure the relevant requirements from are met - Otherwise: Ensure existing requirements are met based on your task context **STEP 2: Implement Changes** - Write clean, focused code for the minor enhancement - Test your changes to ensure they work correctly and don't break existing functionality **STEP 3: Prepare for Finalization** - Update task progress as needed - Prepare documentation and commit when ready","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-04-21T11:12:20.251568+02:00","created_by":"Oliver Jägle","updated_at":"2026-04-21T11:12:20.251568+02:00","dependencies":[{"issue_id":"responsible-vibe-32.2","depends_on_id":"responsible-vibe-32","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"responsible-vibe-32.2","depends_on_id":"responsible-vibe-32.1","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]} {"id":"responsible-vibe-32.3","title":"Finalize","description":"Ensure code quality and documentation accuracy through systematic cleanup and review. **STEP 1: Code Cleanup** Systematically clean up development artifacts: - **Remove Debug Output**: Search for and remove all temporary debug output statements used during development. Look for language-specific debug output methods (console logging, print statements, debug output functions). Remove any debugging statements that were added for development purposes. - **Review TODO/FIXME Comments**: - Address each TODO/FIXME comment by either implementing the solution or documenting why it's deferred - Remove completed TODOs - Convert remaining TODOs to proper issue tracking if needed - **Remove Debugging Code Blocks**: - Remove temporary debugging code, test code blocks, and commented-out code - Clean up any experimental code that's no longer needed - Ensure proper error handling replaces temporary debug logging **STEP 2: Documentation Review** Review and update documentation to reflect final implementation: - **Update Long-Term Memory Documents**: Based on what was actually implemented: - If exists: Update if requirements changed during development - If exists: Update if design details were refined or changed - **Compare Against Implementation**: Review documentation against actual implemented functionality - **Update Changed Sections**: Only modify documentation sections that have functional changes - **Remove Development Progress**: Remove references to development iterations, progress notes, and temporary decisions - **Focus on Final State**: Ensure documentation describes the final implemented state, not the development process - **Ask User to Review Document Updates** **STEP 3: Final Validation** - Run existing tests to ensure cleanup didn't break functionality - Verify documentation accuracy with a final review - Ensure minor enhancement is ready for delivery - Update task progress and mark completed work as you finalize the minor enhancement","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-04-21T11:12:20.567032+02:00","created_by":"Oliver Jägle","updated_at":"2026-04-21T11:12:20.567032+02:00","dependencies":[{"issue_id":"responsible-vibe-32.3","depends_on_id":"responsible-vibe-32","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"responsible-vibe-32.3","depends_on_id":"responsible-vibe-32.2","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]} +{"id":"responsible-vibe-33","title":"responsible-vibe: minor (development-plan-rename-completely.md)","description":"Responsible vibe engineering session using minor workflow for responsible-vibe","status":"open","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-04-22T06:18:42.763603+02:00","created_by":"Oliver Jägle","updated_at":"2026-04-22T06:18:42.763603+02:00"} +{"id":"responsible-vibe-33.1","title":"Explore","description":"Understand the problem, analyze existing patterns, and design your approach. Consider the scope and impact of the change. **STEP 1: Analyze Requirements** - If exists: Use it to understand the required changes - Otherwise: Document requirements in your task management system **STEP 2: Review Design Approach** - If exists: Respect the design approach documented in - Otherwise: Design your approach based on the problem analysis **STEP 3: Document Decisions** - Document your analysis and design decisions - Create tasks to guide implementation - Focus on analysis and design only - do not write any code yet","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-04-22T06:18:42.970164+02:00","created_by":"Oliver Jägle","updated_at":"2026-04-22T06:18:42.970164+02:00","dependencies":[{"issue_id":"responsible-vibe-33.1","depends_on_id":"responsible-vibe-33","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]} +{"id":"responsible-vibe-33.1.1","title":"Analyze all references to responsible-vibe-mcp that need updating","status":"open","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-04-22T06:19:10.481564+02:00","created_by":"Oliver Jägle","updated_at":"2026-04-22T06:19:10.481564+02:00","dependencies":[{"issue_id":"responsible-vibe-33.1.1","depends_on_id":"responsible-vibe-33.1","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]} +{"id":"responsible-vibe-33.1.2","title":"Update GitHub repository references and URLs","status":"open","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-04-22T06:19:13.637993+02:00","created_by":"Oliver Jägle","updated_at":"2026-04-22T06:19:13.637993+02:00","dependencies":[{"issue_id":"responsible-vibe-33.1.2","depends_on_id":"responsible-vibe-33.1","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]} +{"id":"responsible-vibe-33.1.3","title":"Update documentation links and references","status":"open","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-04-22T06:19:17.167665+02:00","created_by":"Oliver Jägle","updated_at":"2026-04-22T06:19:17.167665+02:00","dependencies":[{"issue_id":"responsible-vibe-33.1.3","depends_on_id":"responsible-vibe-33.1","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]} +{"id":"responsible-vibe-33.2","title":"Implement","description":"Write clean, focused code for the minor enhancement, test your changes, and prepare for commit. **STEP 1: Review Design and Requirements** - If exists: Follow your design from - Otherwise: Elaborate design options and present them to the user - If exists: Ensure the relevant requirements from are met - Otherwise: Ensure existing requirements are met based on your task context **STEP 2: Implement Changes** - Write clean, focused code for the minor enhancement - Test your changes to ensure they work correctly and don't break existing functionality **STEP 3: Prepare for Finalization** - Update task progress as needed - Prepare documentation and commit when ready","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-04-22T06:18:43.200189+02:00","created_by":"Oliver Jägle","updated_at":"2026-04-22T06:18:43.200189+02:00","dependencies":[{"issue_id":"responsible-vibe-33.2","depends_on_id":"responsible-vibe-33","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"responsible-vibe-33.2","depends_on_id":"responsible-vibe-33.1","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]} +{"id":"responsible-vibe-33.3","title":"Finalize","description":"Ensure code quality and documentation accuracy through systematic cleanup and review. **STEP 1: Code Cleanup** Systematically clean up development artifacts: - **Remove Debug Output**: Search for and remove all temporary debug output statements used during development. Look for language-specific debug output methods (console logging, print statements, debug output functions). Remove any debugging statements that were added for development purposes. - **Review TODO/FIXME Comments**: - Address each TODO/FIXME comment by either implementing the solution or documenting why it's deferred - Remove completed TODOs - Convert remaining TODOs to proper issue tracking if needed - **Remove Debugging Code Blocks**: - Remove temporary debugging code, test code blocks, and commented-out code - Clean up any experimental code that's no longer needed - Ensure proper error handling replaces temporary debug logging **STEP 2: Documentation Review** Review and update documentation to reflect final implementation: - **Update Long-Term Memory Documents**: Based on what was actually implemented: - If exists: Update if requirements changed during development - If exists: Update if design details were refined or changed - **Compare Against Implementation**: Review documentation against actual implemented functionality - **Update Changed Sections**: Only modify documentation sections that have functional changes - **Remove Development Progress**: Remove references to development iterations, progress notes, and temporary decisions - **Focus on Final State**: Ensure documentation describes the final implemented state, not the development process - **Ask User to Review Document Updates** **STEP 3: Final Validation** - Run existing tests to ensure cleanup didn't break functionality - Verify documentation accuracy with a final review - Ensure minor enhancement is ready for delivery - Update task progress and mark completed work as you finalize the minor enhancement","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-04-22T06:18:43.386927+02:00","created_by":"Oliver Jägle","updated_at":"2026-04-22T06:18:43.386927+02:00","dependencies":[{"issue_id":"responsible-vibe-33.3","depends_on_id":"responsible-vibe-33","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"responsible-vibe-33.3","depends_on_id":"responsible-vibe-33.2","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]} {"id":"responsible-vibe-4","title":"Responsible-Vibe Development: responsible-vibe","description":"Development session using minor workflow for responsible-vibe","status":"open","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-01-20T08:45:26.033247+01:00","created_by":"Oliver Jägle","updated_at":"2026-01-20T08:45:26.033247+01:00"} {"id":"responsible-vibe-4.1","title":"Explore","description":"minor workflow explore phase tasks","status":"open","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-01-20T08:45:26.241377+01:00","created_by":"Oliver Jägle","updated_at":"2026-01-20T08:45:26.241377+01:00","dependencies":[{"issue_id":"responsible-vibe-4.1","depends_on_id":"responsible-vibe-4","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]} {"id":"responsible-vibe-4.1.1","title":"Analyze current verbose task management sections in plan file templates","status":"closed","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-01-20T08:46:16.960883+01:00","created_by":"Oliver Jägle","updated_at":"2026-01-20T08:46:58.154323+01:00","closed_at":"2026-01-20T08:46:58.154323+01:00","close_reason":"Closed","dependencies":[{"issue_id":"responsible-vibe-4.1.1","depends_on_id":"responsible-vibe-4.1","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]} diff --git a/.beads/last-touched b/.beads/last-touched index 88e50fe6..03f771fe 100644 --- a/.beads/last-touched +++ b/.beads/last-touched @@ -1 +1 @@ -responsible-vibe-32.1.2 +responsible-vibe-33.1.3 diff --git a/.vibe/beads-state-responsible-vibe-continue-after-compact-2-u77mr1.json b/.vibe/beads-state-responsible-vibe-continue-after-compact-2-u77mr1.json new file mode 100644 index 00000000..d946ad4d --- /dev/null +++ b/.vibe/beads-state-responsible-vibe-continue-after-compact-2-u77mr1.json @@ -0,0 +1,24 @@ +{ + "conversationId": "responsible-vibe-continue-after-compact-2-u77mr1", + "projectPath": "/Users/oliverjaegle/projects/privat/mcp-server/responsible-vibe", + "epicId": "responsible-vibe-32", + "phaseTasks": [ + { + "phaseId": "explore", + "phaseName": "Explore", + "taskId": "responsible-vibe-32.1" + }, + { + "phaseId": "implement", + "phaseName": "Implement", + "taskId": "responsible-vibe-32.2" + }, + { + "phaseId": "finalize", + "phaseName": "Finalize", + "taskId": "responsible-vibe-32.3" + } + ], + "createdAt": "2026-04-21T09:12:21.094Z", + "updatedAt": "2026-04-21T09:12:21.094Z" +} \ No newline at end of file diff --git a/.vibe/beads-state-responsible-vibe-continue-after-compact-ewd8s8.json b/.vibe/beads-state-responsible-vibe-continue-after-compact-ewd8s8.json new file mode 100644 index 00000000..726e17b0 --- /dev/null +++ b/.vibe/beads-state-responsible-vibe-continue-after-compact-ewd8s8.json @@ -0,0 +1,29 @@ +{ + "conversationId": "responsible-vibe-continue-after-compact-ewd8s8", + "projectPath": "/Users/oliverjaegle/projects/privat/mcp-server/responsible-vibe", + "epicId": "responsible-vibe-31", + "phaseTasks": [ + { + "phaseId": "explore", + "phaseName": "Explore", + "taskId": "responsible-vibe-31.1" + }, + { + "phaseId": "plan", + "phaseName": "Plan", + "taskId": "responsible-vibe-31.2" + }, + { + "phaseId": "code", + "phaseName": "Code", + "taskId": "responsible-vibe-31.3" + }, + { + "phaseId": "commit", + "phaseName": "Commit", + "taskId": "responsible-vibe-31.4" + } + ], + "createdAt": "2026-04-19T10:03:34.180Z", + "updatedAt": "2026-04-19T10:03:34.180Z" +} \ No newline at end of file diff --git a/.vibe/beads-state-responsible-vibe-fix-instruct-opencode-tools-93he9u.json b/.vibe/beads-state-responsible-vibe-fix-instruct-opencode-tools-93he9u.json new file mode 100644 index 00000000..e9d0e22c --- /dev/null +++ b/.vibe/beads-state-responsible-vibe-fix-instruct-opencode-tools-93he9u.json @@ -0,0 +1,24 @@ +{ + "conversationId": "responsible-vibe-fix-instruct-opencode-tools-93he9u", + "projectPath": "/Users/oliverjaegle/projects/privat/mcp-server/responsible-vibe", + "epicId": "responsible-vibe-32", + "phaseTasks": [ + { + "phaseId": "explore", + "phaseName": "Explore", + "taskId": "responsible-vibe-32.1" + }, + { + "phaseId": "implement", + "phaseName": "Implement", + "taskId": "responsible-vibe-32.2" + }, + { + "phaseId": "finalize", + "phaseName": "Finalize", + "taskId": "responsible-vibe-32.3" + } + ], + "createdAt": "2026-04-03T08:18:17.862Z", + "updatedAt": "2026-04-03T08:18:17.862Z" +} \ No newline at end of file diff --git a/.vibe/beads-state-responsible-vibe-rename-completely-95pvbb.json b/.vibe/beads-state-responsible-vibe-rename-completely-95pvbb.json new file mode 100644 index 00000000..74e5151c --- /dev/null +++ b/.vibe/beads-state-responsible-vibe-rename-completely-95pvbb.json @@ -0,0 +1,24 @@ +{ + "conversationId": "responsible-vibe-rename-completely-95pvbb", + "projectPath": "/Users/oliverjaegle/projects/privat/mcp-server/responsible-vibe", + "epicId": "responsible-vibe-33", + "phaseTasks": [ + { + "phaseId": "explore", + "phaseName": "Explore", + "taskId": "responsible-vibe-33.1" + }, + { + "phaseId": "implement", + "phaseName": "Implement", + "taskId": "responsible-vibe-33.2" + }, + { + "phaseId": "finalize", + "phaseName": "Finalize", + "taskId": "responsible-vibe-33.3" + } + ], + "createdAt": "2026-04-22T04:18:43.712Z", + "updatedAt": "2026-04-22T04:18:43.712Z" +} \ No newline at end of file diff --git a/.vibe/development-plan-continue-after-compact.md b/.vibe/development-plan-continue-after-compact.md new file mode 100644 index 00000000..8a5a7c21 --- /dev/null +++ b/.vibe/development-plan-continue-after-compact.md @@ -0,0 +1,244 @@ +# Development Plan: responsible-vibe (continue-after-compact branch) + +*Generated on 2026-04-19 by Vibe Feature MCP* +*Workflow: [epcc](https://mrsimpson.github.io/responsible-vibe-mcp/workflows/epcc)* + +## Goal + +**Problem**: After proceeding to the next phase, we implicitly compact. This is desired, but afterward, we want to continue the workflow in the next phase. Currently, the user always has to explicitly ask "continue". + +**Feature Request**: Automatically continue workflow to next phase after compaction/summary ends with "Continue {phase} phase." + +**Note**: Before implementing this feature, we discovered a foundational issue - agents don't follow instructions well when injected as synthetic message parts. The fix for this may be part of the feature or a pre-requisite. +## Key Decisions + +### 2026-04-19: Implementation - Directive Markers Added + +**Task**: responsible-vibe-31 + +**Changes made** to `packages/core/src/instruction-generator.ts` (lines 110-130): +- Added "### YOU MUST FOLLOW THESE INSTRUCTIONS:" header to make section stand out +- Changed "**Read \`{planFilePath}\`**" → "**IMPORTANT: Read \`{planFilePath}\`**" +- Changed "Focus on \"{phaseName}\" tasks" → "**ACTION REQUIRED: Focus on \"{phaseName}\" tasks**" +- Changed "Do NOT use other task/todo tools" → "**CRITICAL: Do NOT use other task/todo tools**" + +**Rationale**: +- Directive markers (IMPORTANT, ACTION REQUIRED, CRITICAL) signal urgency to LLMs +- Makes instructions visually distinct from surrounding context text +- Quick fix to improve instruction following rate + +**Verification**: +- Build: ✅ Successful +- Tests: ✅ All 286 tests passed + +--- + +### 2026-04-19: Root Cause Analysis - Instructions Not Being Followed + +**Problem**: Agent missed explicit instructions ("Use ONLY bd CLI for tasks") embedded in synthetic message content. + +**Root Cause Found** (in `packages/core/src/instruction-generator.ts` lines 110-127): +- Instructions are formatted as informational/contextual text, not direct commands +- No explicit markers like "YOU MUST", "ACTION REQUIRED", or "IMPORTANT" that signal urgency +- Generic phrasing: "Focus on X", "Use only Y" blends with surrounding context +- The instruction text looks like guidance, not directives + +**Current instruction format**: +``` +--- +**Read `{planFilePath}`** for context. +- Focus on "{phaseName}" tasks, log decisions in "Key Decisions" +- Do NOT use other task/todo tools - use only the plan file for task tracking +... +``` + +This is presented similarly to phase description content, making it hard for the agent to distinguish "context to understand" vs "instructions to follow". + +**Fix Direction**: Two options: +1. **Quick fix**: Modify instruction-generator.ts to add directive markers or restructure instructions (e.g., "IMPORTANT:", "ACTION REQUIRED:") +2. **Better fix**: Change flow so agent calls `whats_next()` and follows its response instead of injecting as synthetic part - since tool responses are treated as authoritative commands + +**Why synthetic parts underperform**: +- System prompt tells agent: "Call whats_next() after each user message" and "Follow instructions immediately" +- When agent calls whats_next(), response is a **tool response** (authoritative) +- Synthetic parts are just **context text** (lower priority) +- LLM prioritizes tool responses over injected context + +## Notes + +### User Feedback (from exploration) + +- The user confirmed: synthetic parts are followed worse than tool responses from `whats_next()` +- When agent calls `whats_next()` it receives instructions as tool response (authoritative) +- Injected parts are just context text (lower priority) +- This is the core issue to solve before/implementing the continue-after-compact feature + +## Explore +### Tasks +- [ ] Design solution for making instructions more actionable (or shift to whats_next response) +- [ ] Investigate how compaction summary triggers continuation + +### Completed +- [x] Created development plan file +- [x] Identified root cause in `packages/core/src/instruction-generator.ts` lines 110-127 +- [x] Analyzed how synthetic messages are injected (`chat.message` hook in `packages/opencode-plugin/src/plugin.ts`) +- [x] Understood instruction flow: WhatsNextHandler → InstructionGenerator → chat.message hook → synthetic part injection + +## Plan + +### Implementation Strategy Analysis + +After analyzing the code flow, I've identified three potential approaches to fix the core issue (agents don't follow instructions in synthetic parts): + +#### Option A: Add Directive Markers (QUICK FIX) +Modify `instruction-generator.ts` to add directive markers to instruction text: +- Change: `Focus on "{phaseName}" tasks` +- To: `### YOU MUST FOCUS ON: "{phaseName}" tasks` (or similar directive markers) + +**Pros**: Minimal change, fast to implement, low risk +**Cons**: Still synthetic context (not as authoritative as tool response) + +#### Option B: Use Buffered WhatsNext Response (BETTER FIX) +Currently the plugin injects synthetic parts (lines 374-381 in plugin.ts). Instead: +- Trust the agent to call `whats_next()` as instructed (line 125 in instruction-generator.ts) +- The response comes as tool result (authoritative) +- Make synthetic injection optional/fallback only + +**Pros**: Instructions as tool response = authoritative, better follow rate +**Cons**: Architectural change, requires verifying agent behavior + +#### Option C: Hybrid Approach (RECOMMENDED) +Combine both approaches: +1. Add directive markers (Option A) - quick improvement +2. Optionally make synthetic injection conditional (Option B) + +Given the analysis in Key Decisions, **Option C** is recommended as it provides: +- Immediate improvement with directive markers +- Path to better long-term solution + +### Implementation Tasks + +#### Priority 1: Directive Markers (Quick Fix) +- [ ] **responsible-vibe-31**: Modify `instruction-generator.ts` to add directive markers + - Location: Lines 110-127 in `enhanceInstructions()` method + - Changes needed: + - Add "IMPORTANT:" prefix to key instructions + - Add "ACTION REQUIRED:" for actionable items + - Make instruction format distinguish from context text + +#### Priority 2: UNDO - Synthetic Injection IS Required +- ❌ ~~responsible-vibe-32~~: ~~Make synthetic injection conditional~~ +- **REVISED**: When plugin is active, `whats_next()` MCP tool is disabled for the agent. Agent cannot call it. +- Instructions can ONLY come via synthetic injection. +- Without synthetic injection, agent gets NO instructions. +- **Priority 2 is N/A** - we cannot disable synthetic injection. + +#### Priority 3: Original Feature - Auto-Continue After Compaction +- [ ] **responsible-vibe-33**: Implement auto-continue after compaction ends with "Continue {phase} phase" + - Requires previous tasks to be complete (agent must follow instructions) + - Need to understand detection mechanism for compaction ending + +### Notes on Original Feature Request + +The original feature request is: "Automatically continue workflow to next phase after compaction/summary ends with 'Continue {phase} phase'" + +**Current behavior** (inferred): +- User runs tools that cause compaction/summary +- Summary ends with instruction to continue to next phase +- User must explicitly ask "continue" + +**Desired behavior**: +- After summary ends with "Continue {phase} phase", automatically trigger phase transition +- This requires the agent to follow the instruction, which is the core issue + +**Detection mechanism** (needs investigation): +- How does the system detect compaction/summary has ended? +- How to detect the "Continue {phase} phase" message? +- Is there a hook or analyzer that can intercept this? + +### Key Decisions Made + +1. **Fix order**: Core issue (agent not following instructions) must be fixed before/implementing auto-continue +2. **Approach**: Start with directive markers (Priority 1), then address auto-continue +3. **Verification**: After Priority 1+, test if agent follows "Continue {phase} phase" instructions + +### Tasks + +#### To Be Created (using bd CLI) +- responsible-vibe-30.7: Add directive markers to instruction-generator.ts +- responsible-vibe-30.8: Make synthetic injection conditional (optional) +- responsible-vibe-30.9: Implement auto-continue after compaction (depends on .7) + +### Completed +- [x] Analyzed code flow: WhatsNextHandler → InstructionGenerator → chat.message hook → synthetic injection +- [x] Documented three implementation approaches (Options A, B, C) +- [x] Identified recommended approach: Hybrid (Option C) with directive markers + conditional synthetic +- [x] Created implementation tasks: .7 (directive markers), .8 (conditional sync), .9 (auto-continue) +- [x] Identified that core issue must be fixed before implementing auto-continue feature + +## Code +### Tasks +- [ ] **responsible-vibe-31**: Add directive markers to instruction-generator.ts + - Location: Lines 110-127 in `enhanceInstructions()` method + - Changes needed: + - Add "IMPORTANT:" prefix to key instructions + - Add "ACTION REQUIRED:" for actionable items + - Make instruction format distinguish from context text + - Status: **IMPLEMENTED** ✅ + +### Completed +- [x] **responsible-vibe-31**: Added directive markers to instruction-generator.ts + - Changed instructions in `enhanceInstructions()` (lines 110-130) to use directive markers: + - Added "### YOU MUST FOLLOW THESE INSTRUCTIONS:" header + - Added "**IMPORTANT:**" prefix to read plan file instruction + - Added "**ACTION REQUIRED:**" prefix to focus on tasks instruction + - Added "**CRITICAL:**" prefix to task tracking instruction + - Build: Successful + - Tests: All 286 tests passed + +### 2026-04-21: Explore - Event Hooks for Auto-Continue + +**Goal**: Find mechanism to detect when compaction completes and auto-trigger next phase + +**Findings**: + +1. **`event` hook** - Should receive all bus events including `session.compacted` and `session.idle` + - Registered in `packages/opencode/src/plugin/index.ts` (lines 247-257) + - No special config needed + - ISSUE: Not seeing logs for event hook firing + +2. **`experimental.compaction.autocontinue` hook** - Fires after compaction, before synthetic continue + - Defined in `packages/plugin/src/index.ts` (line 314) + - Can disable default continue by setting `output.enabled = false` + - Default message: "Continue if you have next steps, or stop and ask for clarification..." + +3. **`session.idle` event** - Fires when session becomes idle + - Available as plugin event + - Could detect when session is idle after phase transition + +**Current implementation in plugin.ts**: +- Added `event` hook to listen for `session.compacted` (lines 419-530) +- Queries workflow state machine for next phase transitions +- Calls ProceedToPhaseHandler to auto-continue +- ISSUE: Event hook not firing (no logs) + +**Next steps**: +- Debug why event hook isn't firing +- OR use experimental.compaction.autocontinue instead +- OR try session.idle event + +## Commit +### Tasks +- [ ] **responsible-vibe-33**: Auto-continue after compaction + - Debug why event hook isn't firing + - OR implement alternative using experimental.compaction.autocontinue + - OR use session.idle event + - Status: **IN PROGRESS** + +### Completed +*None yet* + + + +--- +*This plan is maintained by the LLM. Tool responses provide guidance on which section to focus on and what tasks to work on.* diff --git a/.vibe/development-plan-rename-completely.md b/.vibe/development-plan-rename-completely.md new file mode 100644 index 00000000..20c79460 --- /dev/null +++ b/.vibe/development-plan-rename-completely.md @@ -0,0 +1,36 @@ +# Development Plan: responsible-vibe (rename-completely branch) + +*Generated on 2026-04-22 by Vibe Feature MCP* +*Workflow: [minor](https://mrsimpson.github.io/responsible-vibe-mcp/workflows/minor)* + +## Goal +Completely rename and move responsible-vibe-mcp to @codemcp/workflows. Packages are already renamed, but documentation, README, and other references need to be updated before moving the repository. +## Key Decisions +*Important decisions will be documented here as they are made* + +## Notes +*Additional context and observations* + +## Explore + +### Tasks + +*Auto-synced — do not edit here, use `bd` CLI instead.* + +- [ ] `responsible-vibe-33.1.1` Analyze all references to responsible-vibe-mcp that need updating +- [ ] `responsible-vibe-33.1.2` Update GitHub repository references and URLs +- [ ] `responsible-vibe-33.1.3` Update documentation links and references + +## Implement + +### Tasks + +*Auto-synced — do not edit here, use `bd` CLI instead.* + + +## Finalize + +### Tasks + +*Auto-synced — do not edit here, use `bd` CLI instead.* + diff --git a/.vscode/mcp.json b/.vscode/mcp.json index 1db8e238..43038c58 100644 --- a/.vscode/mcp.json +++ b/.vscode/mcp.json @@ -1,6 +1,6 @@ { "servers": { - "responsible-vibe-mcp": { + "@codemcp/workflows-server": { "command": "npx", "args": [ "@codemcp/workflows@latest" diff --git a/.windsurf/rules/vibe.md b/.windsurf/rules/vibe.md deleted file mode 100644 index 9798efe4..00000000 --- a/.windsurf/rules/vibe.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -trigger: always_on ---- - -You are an AI assistant that helps users develop software features through a structured development process guided by the workflows server. - -IMPORTANT: Always follow these instructions when working with the workflows server! - -Use the start_development() whenever you are starting a conversation! Chose the workflow that fits the user's request. - -## Core Workflow - -Each tool call will return a JSON formatted response with an "instructions" field in it. Follow these instructions immediately after you received them. - -1. **Call whats_next() after each user interaction** to get phase-specific instructions -2. **Follow the instructions** provided by the workflows server exactly -3. **Update the plan file** as directed to maintain project memory -4. **Mark completed tasks** with [x] when instructed -5. **Provide conversation context** in each whats_next() call - -## Development Phases - -- **explore**: Research and exploration phase - understanding the problem space -- **plan**: Planning phase - creating a detailed implementation strategy -- **code**: Implementation phase - writing and building the solution -- **commit**: Finalization phase - committing changes and documentation - -## Using whats_next() - -After each user interaction, call: - -``` -whats_next({ - context: "Brief description of current situation", - user_input: "User's latest message", - conversation_summary: "Summary of conversation progress so far", - recent_messages: [ - { role: "assistant", content: "Your recent message" }, - { role: "user", content: "User's recent response" } - ] -}) -``` - -## Phase Transitions - -You can transition to the next phase when the tasks of the current phase were completed and the entrance criteria for the current phase have been met. - -Before suggesting any phase transition: - -- **Check the plan file** for the "Phase Entrance Criteria" section -- **Evaluate current progress** against the defined criteria -- **Only suggest transitions** when criteria are clearly met -- **Be specific** about which criteria have been satisfied -- **Ask the user** whether he agrees that the current phase is complete. - -``` -proceed_to_phase({ - target_phase: "next_phase", // One of: "explore", "plan", "code", "commit" - reason: "Why you're transitioning" -}) -``` - -## Plan File Management - -- Add new tasks as they are identified -- Mark tasks complete [x] when finished -- Document important decisions in the Decisions Log -- Keep the structure clean and readable - -## Conversation Context Guidelines - -Since the workflows server operates statelessly, provide: - -- **conversation_summary**: What the user wants, key decisions, progress -- **recent_messages**: Last 3-5 relevant exchanges -- **context**: Current situation and what you're trying to determine - -Remember: The workflows server guides the development process but relies on you to provide conversation context and follow its instructions precisely. diff --git a/README.md b/README.md index acfc08df..cc702bec 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Agentic Workflows +# Agentic Workflows fka. "Responsible Vibe MCP" @@ -23,7 +23,7 @@ Head over to a new empty dir and ask your agent: _"Build a UNO-like card game"_ ## 🎬 See It In Action