|
| 1 | +# Development Plan: repo (proud-garlics-sleep branch) |
| 2 | + |
| 3 | +*Generated on 2026-05-06 by Vibe Feature MCP* |
| 4 | +*Workflow: [minor](https://codemcp.github.io/workflows/workflows/minor)* |
| 5 | + |
| 6 | +## Goal |
| 7 | +Improve the opencode plugin by instructing the model in the first message of a session (when no workflow is active) to create a branch with a meaningful name using conventional-commit-prefix (e.g., `feat/add-new-provider`). |
| 8 | + |
| 9 | +## Key Decisions |
| 10 | +- **Where the first message instruction lives**: In `packages/opencode-plugin/src/plugin.ts`, the `chat.message` hook handles injecting instructions. When no workflow is active, it shows a generic "No Active Workflow Detected. You MUST initiate a new development workflow..." message. |
| 11 | +- **Current branch suggestion logic**: Located in `packages/mcp-server/src/tool-handlers/start-development.ts` (lines 113-133). When user is on main/master, it generates a branch name like `feature/development-YYYYMMDD`. |
| 12 | +- **Proposed change**: Modify the "no active workflow" instruction in the chat.message hook to also instruct the model to create a branch with a conventional-commit-prefix before calling start_development. |
| 13 | +- **Branch naming**: Use conventional commit prefixes like `feat/`, `fix/`, `refactor/`, `docs/`, etc., combined with a brief description of the task. |
| 14 | + |
| 15 | +## Notes |
| 16 | +- The "no active workflow" message is injected in two places in plugin.ts: |
| 17 | + 1. Lines 374-383: When handlerResult is not successful |
| 18 | + 2. Lines 392-402: When error includes 'CONVERSATION_NOT_FOUND' |
| 19 | +- Need to enhance both to include branch creation guidance with conventional commit prefix |
| 20 | + |
| 21 | +## Explore |
| 22 | +### Tasks |
| 23 | +- [x] Understand the plugin architecture and where instructions are injected |
| 24 | +- [x] Find the "no active workflow" message location |
| 25 | +- [x] Analyze existing branch suggestion logic in start-development handler |
| 26 | +- [x] Determine how to enhance the instruction message |
| 27 | + |
| 28 | +### Completed |
| 29 | +- Analyzed plugin.ts chat.message hook (lines 284-437) - this is where instructions are injected |
| 30 | +- Found "no active workflow" messages at lines 374-383 and 392-402 in plugin.ts |
| 31 | +- Reviewed start-development.ts generateBranchSuggestion() at lines 581-584 |
| 32 | +- The current branch suggestion generates `feature/development-YYYYMMDD` which lacks conventional-commit-prefix |
| 33 | + |
| 34 | +## Implement |
| 35 | +### Tasks |
| 36 | +- [x] Modify "no active workflow" message in plugin.ts (lines 381 and 400) to include branch creation guidance with conventional commit prefix |
| 37 | + |
| 38 | +### Completed |
| 39 | +- Enhanced both "no active workflow" messages in plugin.ts to include guidance: |
| 40 | + - "First, create a new branch with a meaningful name using a conventional commit prefix (e.g., `feat/add-new-feature`, `fix/bug-description`, `refactor/improve-logic`). Then call the `start_development` tool to begin." |
| 41 | +- This change ensures that when a user starts a new session without an active workflow, they'll be instructed to create a properly named branch before initiating a development workflow |
| 42 | + |
| 43 | +## Finalize |
| 44 | +### Tasks |
| 45 | +- [x] Code cleanup - verified no debug output, TODO/FIXME, or debugging code blocks exist |
| 46 | +- [x] Documentation review - no updates needed (change doesn't affect documented behavior) |
| 47 | +- [x] Final validation - changes verified via git diff, implementation is complete |
| 48 | + |
| 49 | +### Completed |
| 50 | +- Verified no debug output (console.log, debugger, etc.) in plugin source code |
| 51 | +- Verified no TODO/FIXME comments in modified files |
| 52 | +- Reviewed documentation (.vibe/docs/requirements.md, design.md, plugin README) - no updates needed |
| 53 | +- Change is a simple text modification to two string literals in plugin.ts |
| 54 | +- Implementation complete and ready for commit/PR |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | +--- |
| 59 | +*This plan is maintained by the LLM. Tool responses provide guidance on which section to focus on and what tasks to work on.* |
0 commit comments