diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index dd88b04c..d2716972 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -24,6 +24,14 @@ Available CLI endpoints are dynamically defined by the config file: - **Always use `run_in_background: false`** for Task tool agent calls: `Task({ subagent_type: "xxx", prompt: "...", run_in_background: false })` to ensure synchronous execution and immediate result visibility - **TaskOutput usage**: Only use `TaskOutput({ task_id: "xxx", block: false })` + sleep loop to poll completion status. NEVER read intermediate output during agent/CLI execution - wait for final result only +### CLI Tool Calls (ccw cli) +- **Default: `run_in_background: true`** - Unless otherwise specified, always use background execution for CLI calls: + ``` + Bash({ command: "ccw cli -p '...' --tool gemini", run_in_background: true }) + ``` +- **After CLI call**: Stop immediately - let CLI execute in background, do NOT + poll with TaskOutput + ### CLI Analysis Calls - **Wait for results**: MUST wait for CLI analysis to complete before taking any write action. Do NOT proceed with fixes while analysis is running - **Value every call**: Each CLI invocation is valuable and costly. NEVER waste analysis results: diff --git a/.claude/agents/action-planning-agent.md b/.claude/agents/action-planning-agent.md index a1243480..b97206e7 100644 --- a/.claude/agents/action-planning-agent.md +++ b/.claude/agents/action-planning-agent.md @@ -855,6 +855,7 @@ Use `analysis_results.complexity` or task count to determine structure: ### 3.3 Guidelines Checklist **ALWAYS:** +- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) → Built-in (`Grep`, `Glob`, `Read`) - Apply Quantification Requirements to all requirements, acceptance criteria, and modification points - Load IMPL_PLAN template: `Read(~/.claude/workflows/cli-templates/prompts/workflow/impl-plan-template.txt)` before generating IMPL_PLAN.md - Use provided context package: Extract all information from structured context diff --git a/.claude/agents/cli-discuss-agent.md b/.claude/agents/cli-discuss-agent.md index 36f2daa9..6fec43e8 100644 --- a/.claude/agents/cli-discuss-agent.md +++ b/.claude/agents/cli-discuss-agent.md @@ -372,7 +372,8 @@ Write({ ## Key Reminders **ALWAYS**: -1. Execute multiple CLIs for cross-verification +1. **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) → Built-in (`Grep`, `Glob`, `Read`) +2. Execute multiple CLIs for cross-verification 2. Parse CLI outputs with fallback extraction 3. Include file:line references in affected_files 4. Calculate convergence score accurately diff --git a/.claude/agents/cli-execution-agent.md b/.claude/agents/cli-execution-agent.md index f57d89b0..38b51dd6 100644 --- a/.claude/agents/cli-execution-agent.md +++ b/.claude/agents/cli-execution-agent.md @@ -65,6 +65,8 @@ Score = 0 ## Phase 2: Context Discovery +**Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) → Built-in (`Grep`, `Glob`, `Read`) + **1. Project Structure**: ```bash ccw tool exec get_modules_by_depth '{}' diff --git a/.claude/agents/cli-explore-agent.md b/.claude/agents/cli-explore-agent.md index 648dca7b..2c29b1a3 100644 --- a/.claude/agents/cli-explore-agent.md +++ b/.claude/agents/cli-explore-agent.md @@ -165,7 +165,8 @@ Brief summary: ## Key Reminders **ALWAYS**: -1. Read schema file FIRST before generating any output (if schema specified) +1. **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) → Built-in (`Grep`, `Glob`, `Read`) +2. Read schema file FIRST before generating any output (if schema specified) 2. Copy field names EXACTLY from schema (case-sensitive) 3. Verify root structure matches schema (array vs object) 4. Match nested/flat structures as schema requires diff --git a/.claude/agents/code-developer.md b/.claude/agents/code-developer.md index e9daccbc..0bb82496 100644 --- a/.claude/agents/code-developer.md +++ b/.claude/agents/code-developer.md @@ -389,6 +389,7 @@ Before completing any task, verify: - Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution **ALWAYS:** +- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) → Built-in (`Grep`, `Glob`, `Read`) - Verify module/package existence with rg/grep/search before referencing - Write working code incrementally - Test your implementation thoroughly diff --git a/.claude/agents/context-search-agent.md b/.claude/agents/context-search-agent.md index ee7601ed..b8bd495f 100644 --- a/.claude/agents/context-search-agent.md +++ b/.claude/agents/context-search-agent.md @@ -565,6 +565,7 @@ Output: .workflow/session/{session}/.process/context-package.json - Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution **ALWAYS**: +- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) → Built-in (`Grep`, `Glob`, `Read`) - Initialize CodexLens in Phase 0 - Execute get_modules_by_depth.sh - Load CLAUDE.md/README.md (unless in memory) diff --git a/.claude/agents/debug-explore-agent.md b/.claude/agents/debug-explore-agent.md index 3c28fc97..62fb608a 100644 --- a/.claude/agents/debug-explore-agent.md +++ b/.claude/agents/debug-explore-agent.md @@ -10,6 +10,8 @@ You are an intelligent debugging specialist that autonomously diagnoses bugs thr ## Tool Selection Hierarchy +**Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) → Built-in (`Grep`, `Glob`, `Read`) + 1. **Gemini (Primary)** - Log analysis, hypothesis validation, root cause reasoning 2. **Qwen (Fallback)** - Same capabilities as Gemini, use when unavailable 3. **Codex (Alternative)** - Fix implementation, code modification diff --git a/.claude/agents/doc-generator.md b/.claude/agents/doc-generator.md index 9d2f38cb..5f98c08b 100644 --- a/.claude/agents/doc-generator.md +++ b/.claude/agents/doc-generator.md @@ -311,6 +311,7 @@ Before completing the task, you must verify the following: ## Key Reminders **ALWAYS**: +- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) → Built-in (`Grep`, `Glob`, `Read`) - **Detect Mode**: Check `meta.cli_execute` to determine execution mode (Agent or CLI). - **Follow `flow_control`**: Execute the `pre_analysis` steps exactly as defined in the task JSON. - **Execute Commands Directly**: All commands are tool-specific and ready to run. diff --git a/.claude/agents/issue-plan-agent.md b/.claude/agents/issue-plan-agent.md index 80b2e6ff..b416bd55 100644 --- a/.claude/agents/issue-plan-agent.md +++ b/.claude/agents/issue-plan-agent.md @@ -308,7 +308,8 @@ Each line is a solution JSON containing tasks. Schema: `cat .claude/workflows/cl - Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution **ALWAYS**: -1. Read schema first: `cat .claude/workflows/cli-templates/schemas/solution-schema.json` +1. **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) → Built-in (`Grep`, `Glob`, `Read`) +2. Read schema first: `cat .claude/workflows/cli-templates/schemas/solution-schema.json` 2. Use ACE semantic search as PRIMARY exploration tool 3. Fetch issue details via `ccw issue status --json` 4. Quantify acceptance.criteria with testable conditions diff --git a/.claude/agents/test-fix-agent.md b/.claude/agents/test-fix-agent.md index 5f8b5e0e..eaa58940 100644 --- a/.claude/agents/test-fix-agent.md +++ b/.claude/agents/test-fix-agent.md @@ -332,6 +332,7 @@ When generating test results for orchestrator (saved to `.process/test-results.j ## Important Reminders **ALWAYS:** +- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) → Built-in (`Grep`, `Glob`, `Read`) - **Execute tests first** - Understand what's failing before fixing - **Diagnose thoroughly** - Find root cause, not just symptoms - **Fix minimally** - Change only what's needed to pass tests diff --git a/.claude/agents/universal-executor.md b/.claude/agents/universal-executor.md index e1e17038..11743081 100644 --- a/.claude/agents/universal-executor.md +++ b/.claude/agents/universal-executor.md @@ -124,6 +124,7 @@ Before completing any task, verify: - Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution **ALWAYS:** +- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) → Built-in (`Grep`, `Glob`, `Read`) - Verify resource/dependency existence before referencing - Execute tasks systematically and incrementally - Test and validate work thoroughly diff --git a/.claude/workflows/cli-tools-usage.md b/.claude/workflows/cli-tools-usage.md index 8476d987..5dd6451f 100644 --- a/.claude/workflows/cli-tools-usage.md +++ b/.claude/workflows/cli-tools-usage.md @@ -18,33 +18,6 @@ All tool availability, model selection, and routing are defined in this configuration file. -### Configuration Schema - -```json -{ - "version": "3.0.0", - "models": { - "": ["", "", ...] - }, - "tools": { - "": { - "enabled": true|false, - "primaryModel": "", - "secondaryModel": "", - "tags": ["", "", ...] - } - }, - "customEndpoints": [ - { - "id": "", - "name": "", - "enabled": true|false, - "tags": ["", "", ...] - } - ] -} -``` - ### Configuration Fields | Field | Description | @@ -492,20 +465,6 @@ RULES: $(cat ~/.claude/workflows/cli-templates/protocols/write-protocol.md) $(ca --- -## Execution Configuration - -### Dynamic Timeout Allocation - -**Minimum timeout: 5 minutes (300000ms)** - Never set below this threshold. - -**Timeout Ranges**: -- **Simple** (analysis, search): 5-10min (300000-600000ms) -- **Medium** (refactoring, documentation): 10-20min (600000-1200000ms) -- **Complex** (implementation, migration): 20-60min (1200000-3600000ms) -- **Heavy** (large codebase, multi-file): 60-120min (3600000-7200000ms) - -**Auto-detection**: Analyze PURPOSE and TASK fields to determine timeout - ### Permission Framework **Single-Use Authorization**: Each execution requires explicit user instruction. Previous authorization does NOT carry over.