diff --git a/.claude/rules/custom-instructions.md b/.claude/rules/custom-instructions.md index 510ea568..7189ff69 100644 --- a/.claude/rules/custom-instructions.md +++ b/.claude/rules/custom-instructions.md @@ -120,6 +120,12 @@ Examples: **When `parse_mode` returns `dispatchReady`, use it directly with the Task tool โ€” no extra calls needed.** +**Strategy Selection (before dispatch):** +- [ ] Check `availableStrategies` in `parse_mode` response +- [ ] If `["subagent", "taskmaestro"]` โ†’ AskUserQuestion to choose +- [ ] If `taskmaestroInstallHint` present and user wants taskmaestro โ†’ guide installation +- [ ] Pass chosen strategy to `dispatch_agents(executionStrategy: ...)` + **Quick Checklist (Auto-Dispatch - Preferred):** - [ ] Check `dispatchReady` in `parse_mode` response - [ ] Use `dispatchReady.primaryAgent.dispatchParams` with Task tool @@ -143,6 +149,9 @@ Examples: | **EVAL** | ๐Ÿ”’ security, โ™ฟ accessibility, โšก performance, ๐Ÿ“ code-quality, ๐Ÿ“จ event-architecture, ๐Ÿ”— integration, ๐Ÿ“Š observability, ๐Ÿ”„ migration | | **AUTO** | ๐Ÿ›๏ธ architecture, ๐Ÿงช test-strategy, ๐Ÿ”’ security, ๐Ÿ“ code-quality, ๐Ÿ“จ event-architecture, ๐Ÿ”— integration, ๐Ÿ“Š observability, ๐Ÿ”„ migration | +> **Note:** All modes support both SubAgent and TaskMaestro execution strategies. +> The strategy is selected per-invocation via user choice. + **๐Ÿ“– Full Guide:** [Parallel Specialist Agents Execution](../../packages/rules/.ai-rules/adapters/claude-code.md#parallel-specialist-agents-execution) diff --git a/packages/rules/.ai-rules/adapters/claude-code.md b/packages/rules/.ai-rules/adapters/claude-code.md index cb3a1e0d..2679d002 100644 --- a/packages/rules/.ai-rules/adapters/claude-code.md +++ b/packages/rules/.ai-rules/adapters/claude-code.md @@ -523,6 +523,45 @@ Each workflow mode activates different specialist agents: **Important:** Specialists from one mode do NOT carry over to the next mode. Each mode has its own recommended specialist set. +### Execution Strategy Selection (MANDATORY) + +When `parse_mode` returns `availableStrategies`: + +1. **Check `availableStrategies`** in the response +2. **If both strategies available** (`["subagent", "taskmaestro"]`), ask user with AskUserQuestion: + - Option A: "SubAgent (background agents, fast)" (Recommended) + - Option B: "TaskMaestro (tmux parallel panes, visual monitoring)" +3. **If only `["subagent"]`** and `taskmaestroInstallHint` present: + - Ask: "TaskMaestro is not installed. Would you like to install it for tmux-based parallel execution?" + - Yes โ†’ invoke `/taskmaestro` skill to guide installation, then re-check + - No โ†’ proceed with subagent +4. **Call `dispatch_agents`** with chosen `executionStrategy` parameter: + - `dispatch_agents({ mode, specialists, executionStrategy: "subagent" })` โ€” existing Agent tool flow + - `dispatch_agents({ mode, specialists, executionStrategy: "taskmaestro" })` โ€” returns tmux assignments +5. **Execute** based on strategy: + - **subagent**: Use `dispatchParams` with Agent tool (`run_in_background: true`) + - **taskmaestro**: Follow `executionHint` โ€” start panes, assign prompts, monitor, collect results + +### TaskMaestro Execution Flow + +When `executionStrategy: "taskmaestro"` is chosen, `dispatch_agents` returns: + +```json +{ + "taskmaestro": { + "sessionName": "eval-specialists", + "paneCount": 5, + "assignments": [ + { "name": "security-specialist", "displayName": "Security Specialist", "prompt": "..." }, + { "name": "performance-specialist", "displayName": "Performance Specialist", "prompt": "..." } + ] + }, + "executionHint": "1. /taskmaestro start --panes 5\n2. ..." +} +``` + +Execute by following the `executionHint` commands sequentially. + ## PR All-in-One Skill Unified commit and PR workflow that: diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index 6b5c41be..bb850da2 100755 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -81,6 +81,20 @@ node -e " " echo " โœ… packages/claude-code-plugin/.claude-plugin/plugin.json" +# 6. .mcp.json (if exists โ€” gitignored, local only) +if [ -f ".mcp.json" ]; then + node -e " + const fs = require('fs'); + const p = '.mcp.json'; + const content = fs.readFileSync(p, 'utf-8'); + const updated = content.replace(/codingbuddy@[0-9]+\.[0-9]+\.[0-9]+/, 'codingbuddy@$NEW_VERSION'); + fs.writeFileSync(p, updated); + " + echo " โœ… .mcp.json" +else + echo " โญ๏ธ .mcp.json (not found, skipped)" +fi + echo "" echo "โœ… All files bumped to v$NEW_VERSION" echo " Next: git commit -am \"chore(release): prepare v$NEW_VERSION\"" diff --git a/scripts/verify-release-versions.sh b/scripts/verify-release-versions.sh index a6ecb261..a923456f 100755 --- a/scripts/verify-release-versions.sh +++ b/scripts/verify-release-versions.sh @@ -62,6 +62,23 @@ for package_info in "${PACKAGES[@]}"; do fi done +# Check .mcp.json (gitignored, local only) +if [ -f ".mcp.json" ]; then + mcp_version=$(node -e " + const content = require('fs').readFileSync('.mcp.json', 'utf-8'); + const match = content.match(/codingbuddy@([0-9]+\.[0-9]+\.[0-9]+)/); + console.log(match ? match[1] : ''); + ") + if [ "$mcp_version" = "$TAG_VERSION" ]; then + echo "โœ… .mcp.json codingbuddy: @$mcp_version (matches tag)" + else + echo "โŒ .mcp.json codingbuddy: @$mcp_version (tag is v$TAG_VERSION)" + ALL_MATCH=false + fi +else + echo "โญ๏ธ .mcp.json (not found, skipped)" +fi + echo "" if [ "$ALL_MATCH" = true ]; then