diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 6df5166d..e6a6abe5 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -22,11 +22,11 @@ Available CLI endpoints are dynamically defined by the config file: - **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) -- **Always use `run_in_background: true`** for Bash tool when calling 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**: If no other tasks, stop immediately - let CLI execute in background, do NOT poll with TaskOutput +- **After CLI call**: Stop immediately - let CLI execute in background, do NOT poll with TaskOutput ## Code Diagnostics diff --git a/.claude/agents/action-planning-agent.md b/.claude/agents/action-planning-agent.md index 8ab75868..46d40e66 100644 --- a/.claude/agents/action-planning-agent.md +++ b/.claude/agents/action-planning-agent.md @@ -847,6 +847,9 @@ Use `analysis_results.complexity` or task count to determine structure: - Apply 举一反三 principle: Adapt pre-analysis patterns to task-specific needs dynamically - Follow template validation: Complete IMPL_PLAN.md template validation checklist before finalization +**Bash Tool**: +- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution + **NEVER:** - Load files directly (use provided context package instead) - Assume default locations (always use session_id in paths) diff --git a/.claude/agents/cli-execution-agent.md b/.claude/agents/cli-execution-agent.md index 9dc92f89..f57d89b0 100644 --- a/.claude/agents/cli-execution-agent.md +++ b/.claude/agents/cli-execution-agent.md @@ -181,6 +181,8 @@ ccw cli -p "CONTEXT: @**/* @../shared/**/*" --tool gemini --mode analysis --cd s **Timeout**: Simple 20min | Medium 40min | Complex 60min (Codex ×1.5) +**Bash Tool**: Use `run_in_background=false` for all CLI calls to ensure foreground execution + --- ## Phase 5: Output Routing diff --git a/.claude/agents/cli-explore-agent.md b/.claude/agents/cli-explore-agent.md index 3523feea..648dca7b 100644 --- a/.claude/agents/cli-explore-agent.md +++ b/.claude/agents/cli-explore-agent.md @@ -174,6 +174,9 @@ Brief summary: 7. Include file:line references in findings 8. Attribute discovery source (bash/gemini) +**Bash Tool**: +- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution + **NEVER**: 1. Modify any files (read-only agent) 2. Skip schema reading step when schema is specified diff --git a/.claude/agents/cli-lite-planning-agent.md b/.claude/agents/cli-lite-planning-agent.md index 31f1ef7a..53497a65 100644 --- a/.claude/agents/cli-lite-planning-agent.md +++ b/.claude/agents/cli-lite-planning-agent.md @@ -437,6 +437,9 @@ function validateTask(task) { - Generate flow_control from dependencies - Handle CLI errors with fallback chain +**Bash Tool**: +- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution + **NEVER**: - Execute implementation (return plan only) - Use vague acceptance criteria diff --git a/.claude/agents/cli-planning-agent.md b/.claude/agents/cli-planning-agent.md index 4f65dfe8..55da9540 100644 --- a/.claude/agents/cli-planning-agent.md +++ b/.claude/agents/cli-planning-agent.md @@ -446,6 +446,9 @@ See: `.process/iteration-{iteration}-cli-output.txt` - **Generate measurable acceptance criteria**: Include verification commands - **Apply layer-specific guidance**: Use test_type to customize analysis approach +**Bash Tool**: +- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution + **NEVER:** - Execute tests directly (orchestrator manages test execution) - Skip CLI analysis (always run CLI even for simple failures) diff --git a/.claude/agents/code-developer.md b/.claude/agents/code-developer.md index ea862f10..6c1894f3 100644 --- a/.claude/agents/code-developer.md +++ b/.claude/agents/code-developer.md @@ -296,6 +296,9 @@ Before completing any task, verify: - Make assumptions - verify with existing code - Create unnecessary complexity +**Bash Tool**: +- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution + **ALWAYS:** - Verify module/package existence with rg/grep/search before referencing - Write working code incrementally diff --git a/.claude/agents/context-search-agent.md b/.claude/agents/context-search-agent.md index 6a145e4e..ee7601ed 100644 --- a/.claude/agents/context-search-agent.md +++ b/.claude/agents/context-search-agent.md @@ -561,6 +561,9 @@ Output: .workflow/session/{session}/.process/context-package.json - Include binaries/generated files - Use ripgrep if CodexLens available +**Bash Tool**: +- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution + **ALWAYS**: - Initialize CodexLens in Phase 0 - Execute get_modules_by_depth.sh diff --git a/.claude/agents/doc-generator.md b/.claude/agents/doc-generator.md index bda48f60..9d2f38cb 100644 --- a/.claude/agents/doc-generator.md +++ b/.claude/agents/doc-generator.md @@ -322,6 +322,9 @@ Before completing the task, you must verify the following: - **Update Progress**: Use `TodoWrite` to track each step of the execution. - **Generate a Summary**: Create a detailed summary upon task completion. +**Bash Tool**: +- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution + **NEVER**: - **Make Planning Decisions**: Do not deviate from the instructions in the task JSON. - **Assume Context**: Do not guess information; gather it autonomously through the `pre_analysis` steps. diff --git a/.claude/agents/issue-plan-agent.md b/.claude/agents/issue-plan-agent.md index 9d8196b4..2efa5986 100644 --- a/.claude/agents/issue-plan-agent.md +++ b/.claude/agents/issue-plan-agent.md @@ -271,6 +271,9 @@ Each line is a solution JSON containing tasks. Schema: `cat .claude/workflows/cl ### 3.3 Guidelines +**Bash Tool**: +- 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` 2. Use ACE semantic search as PRIMARY exploration tool diff --git a/.claude/agents/issue-queue-agent.md b/.claude/agents/issue-queue-agent.md index bbc8f061..747428d5 100644 --- a/.claude/agents/issue-queue-agent.md +++ b/.claude/agents/issue-queue-agent.md @@ -271,6 +271,9 @@ Return brief summaries; full conflict details in separate files: ### 4.3 Guidelines +**Bash Tool**: +- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution + **ALWAYS**: 1. Build dependency graph before ordering 2. Detect file overlaps between solutions diff --git a/.claude/agents/universal-executor.md b/.claude/agents/universal-executor.md index f22c7886..e1e17038 100644 --- a/.claude/agents/universal-executor.md +++ b/.claude/agents/universal-executor.md @@ -120,6 +120,9 @@ Before completing any task, verify: - Make assumptions - verify with existing materials - Skip quality verification steps +**Bash Tool**: +- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution + **ALWAYS:** - Verify resource/dependency existence before referencing - Execute tasks systematically and incrementally