diff --git a/.claude/agents/action-planning-agent.md b/.claude/agents/action-planning-agent.md index b7488b95..8ab75868 100644 --- a/.claude/agents/action-planning-agent.md +++ b/.claude/agents/action-planning-agent.md @@ -470,14 +470,14 @@ function computeCliStrategy(task, allTasks) { // Pattern: Gemini CLI deep analysis { "step": "gemini_analyze_[aspect]", - "command": "ccw cli exec 'PURPOSE: [goal]\\nTASK: [tasks]\\nMODE: analysis\\nCONTEXT: @[paths]\\nEXPECTED: [output]\\nRULES: $(cat [template]) | [constraints] | analysis=READ-ONLY' --tool gemini --mode analysis --cd [path]", + "command": "ccw cli -p 'PURPOSE: [goal]\\nTASK: [tasks]\\nMODE: analysis\\nCONTEXT: @[paths]\\nEXPECTED: [output]\\nRULES: $(cat [template]) | [constraints] | analysis=READ-ONLY' --tool gemini --mode analysis --cd [path]", "output_to": "analysis_result" }, // Pattern: Qwen CLI analysis (fallback/alternative) { "step": "qwen_analyze_[aspect]", - "command": "ccw cli exec '[similar to gemini pattern]' --tool qwen --mode analysis --cd [path]", + "command": "ccw cli -p '[similar to gemini pattern]' --tool qwen --mode analysis --cd [path]", "output_to": "analysis_result" }, @@ -518,7 +518,7 @@ The examples above demonstrate **patterns**, not fixed requirements. Agent MUST: 4. **Command Composition Patterns**: - **Single command**: `bash([simple_search])` - **Multiple commands**: `["bash([cmd1])", "bash([cmd2])"]` - - **CLI analysis**: `ccw cli exec '[prompt]' --tool gemini --mode analysis --cd [path]` + - **CLI analysis**: `ccw cli -p '[prompt]' --tool gemini --mode analysis --cd [path]` - **MCP integration**: `mcp__[tool]__[function]([params])` **Key Principle**: Examples show **structure patterns**, not specific implementations. Agent must create task-appropriate steps dynamically. @@ -542,9 +542,9 @@ The `implementation_approach` supports **two execution modes** based on the pres - **Use for**: Large-scale features, complex refactoring, or when user explicitly requests CLI tool usage - **Required fields**: Same as default mode **PLUS** `command`, `resume_from` (optional) - **Command patterns** (with resume support): - - `ccw cli exec '[prompt]' --tool codex --mode write --cd [path]` - - `ccw cli exec '[prompt]' --resume ${previousCliId} --tool codex --mode write` (resume from previous) - - `ccw cli exec '[prompt]' --tool gemini --mode write --cd [path]` (write mode) + - `ccw cli -p '[prompt]' --tool codex --mode write --cd [path]` + - `ccw cli -p '[prompt]' --resume ${previousCliId} --tool codex --mode write` (resume from previous) + - `ccw cli -p '[prompt]' --tool gemini --mode write --cd [path]` (write mode) - **Resume mechanism**: When step depends on previous CLI execution, include `--resume` with previous execution ID **Semantic CLI Tool Selection**: @@ -621,7 +621,7 @@ Agent determines CLI tool usage per-step based on user semantics and task nature "step": 3, "title": "Execute implementation using CLI tool", "description": "Use Codex/Gemini for complex autonomous execution", - "command": "ccw cli exec '[prompt]' --tool codex --mode write --cd [path]", + "command": "ccw cli -p '[prompt]' --tool codex --mode write --cd [path]", "modification_points": ["[Same as default mode]"], "logic_flow": ["[Same as default mode]"], "depends_on": [1, 2], @@ -634,7 +634,7 @@ Agent determines CLI tool usage per-step based on user semantics and task nature "step": 4, "title": "Continue implementation with context", "description": "Resume from previous step with accumulated context", - "command": "ccw cli exec '[continuation prompt]' --resume ${step3_cli_id} --tool codex --mode write", + "command": "ccw cli -p '[continuation prompt]' --resume ${step3_cli_id} --tool codex --mode write", "resume_from": "step3_cli_id", // Reference previous step's CLI ID "modification_points": ["[Continue from step 3]"], "logic_flow": ["[Build on previous output]"], diff --git a/.claude/agents/cli-execution-agent.md b/.claude/agents/cli-execution-agent.md index 66927dbd..9dc92f89 100644 --- a/.claude/agents/cli-execution-agent.md +++ b/.claude/agents/cli-execution-agent.md @@ -148,7 +148,7 @@ discuss → multi (gemini + codex parallel) **Gemini/Qwen (Analysis)**: ```bash -ccw cli exec " +ccw cli -p " PURPOSE: {goal} TASK: {task} MODE: analysis @@ -162,17 +162,17 @@ RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/pattern.txt) **Gemini/Qwen (Write)**: ```bash -ccw cli exec "..." --tool gemini --mode write --cd {dir} +ccw cli -p "..." --tool gemini --mode write --cd {dir} ``` **Codex (Write)**: ```bash -ccw cli exec "..." --tool codex --mode write --cd {dir} +ccw cli -p "..." --tool codex --mode write --cd {dir} ``` **Cross-Directory** (Gemini/Qwen): ```bash -ccw cli exec "CONTEXT: @**/* @../shared/**/*" --tool gemini --mode analysis --cd src/auth --includeDirs ../shared +ccw cli -p "CONTEXT: @**/* @../shared/**/*" --tool gemini --mode analysis --cd src/auth --includeDirs ../shared ``` **Directory Scope**: diff --git a/.claude/agents/cli-explore-agent.md b/.claude/agents/cli-explore-agent.md index aa1b56c6..3523feea 100644 --- a/.claude/agents/cli-explore-agent.md +++ b/.claude/agents/cli-explore-agent.md @@ -78,7 +78,7 @@ rg "^import .* from " -n | head -30 ### Gemini Semantic Analysis (deep-scan, dependency-map) ```bash -ccw cli exec " +ccw cli -p " PURPOSE: {from prompt} TASK: {from prompt} MODE: analysis diff --git a/.claude/agents/cli-lite-planning-agent.md b/.claude/agents/cli-lite-planning-agent.md index bf7c373d..31f1ef7a 100644 --- a/.claude/agents/cli-lite-planning-agent.md +++ b/.claude/agents/cli-lite-planning-agent.md @@ -78,7 +78,7 @@ Phase 4: planObject Generation ## CLI Command Template ```bash -ccw cli exec " +ccw cli -p " PURPOSE: Generate plan for {task_description} TASK: • Analyze task/bug description and context diff --git a/.claude/agents/cli-planning-agent.md b/.claude/agents/cli-planning-agent.md index fa2d5340..4f65dfe8 100644 --- a/.claude/agents/cli-planning-agent.md +++ b/.claude/agents/cli-planning-agent.md @@ -107,7 +107,7 @@ Phase 3: Task JSON Generation **Template-Based Command Construction with Test Layer Awareness**: ```bash -ccw cli exec " +ccw cli -p " PURPOSE: Analyze {test_type} test failures and generate fix strategy for iteration {iteration} TASK: • Review {failed_tests.length} {test_type} test failures: [{test_names}] @@ -527,7 +527,7 @@ See: `.process/iteration-{iteration}-cli-output.txt` 1. **Detect test_type**: "integration" → Apply integration-specific diagnosis 2. **Execute CLI**: ```bash - ccw cli exec "PURPOSE: Analyze integration test failure... + ccw cli -p "PURPOSE: Analyze integration test failure... TASK: Examine component interactions, data flow, interface contracts... RULES: Analyze full call stack and data flow across components" --tool gemini --mode analysis ``` diff --git a/.claude/agents/code-developer.md b/.claude/agents/code-developer.md index 7cc4010b..ea862f10 100644 --- a/.claude/agents/code-developer.md +++ b/.claude/agents/code-developer.md @@ -123,7 +123,7 @@ When task JSON contains `flow_control.implementation_approach` array: **CLI Command Execution (CLI Execute Mode)**: When step contains `command` field with Codex CLI, execute via CCW CLI. For Codex resume: -- First task (`depends_on: []`): `ccw cli exec "..." --tool codex --mode write --cd [path]` +- First task (`depends_on: []`): `ccw cli -p "..." --tool codex --mode write --cd [path]` - Subsequent tasks (has `depends_on`): Use CCW CLI with resume context to maintain session **Test-Driven Development**: diff --git a/.claude/agents/doc-generator.md b/.claude/agents/doc-generator.md index f2cb078f..bda48f60 100644 --- a/.claude/agents/doc-generator.md +++ b/.claude/agents/doc-generator.md @@ -63,7 +63,7 @@ The agent supports **two execution modes** based on task JSON's `meta.cli_execut - Agent substitutes [target_folders] into command - Agent executes CLI command via CCW: ```bash - ccw cli exec " + ccw cli -p " PURPOSE: Generate module documentation TASK: Create API.md and README.md for each module MODE: write @@ -216,7 +216,7 @@ Before completion, verify: { "step": "analyze_module_structure", "action": "Deep analysis of module structure and API", - "command": "ccw cli exec \"PURPOSE: Document module comprehensively\nTASK: Extract module purpose, architecture, public API, dependencies\nMODE: analysis\nCONTEXT: @**/* System: [system_context]\nEXPECTED: Complete module analysis for documentation\nRULES: $(cat ~/.claude/workflows/cli-templates/prompts/documentation/module-documentation.txt)\" --tool gemini --mode analysis --cd src/auth", + "command": "ccw cli -p \"PURPOSE: Document module comprehensively\nTASK: Extract module purpose, architecture, public API, dependencies\nMODE: analysis\nCONTEXT: @**/* System: [system_context]\nEXPECTED: Complete module analysis for documentation\nRULES: $(cat ~/.claude/workflows/cli-templates/prompts/documentation/module-documentation.txt)\" --tool gemini --mode analysis --cd src/auth", "output_to": "module_analysis", "on_error": "fail" } diff --git a/.claude/commands/memory/docs.md b/.claude/commands/memory/docs.md index 1d37c7aa..b7ca1798 100644 --- a/.claude/commands/memory/docs.md +++ b/.claude/commands/memory/docs.md @@ -238,9 +238,9 @@ api_id=$((group_count + 3)) | **CLI** | true | implementation_approach | write | --mode write | Execute CLI commands, validate output | **Command Patterns**: -- Gemini/Qwen: `ccw cli exec "..." --tool gemini --mode analysis --cd dir` -- CLI Mode: `ccw cli exec "..." --tool gemini --mode write --cd dir` -- Codex: `ccw cli exec "..." --tool codex --mode write --cd dir` +- Gemini/Qwen: `ccw cli -p "..." --tool gemini --mode analysis --cd dir` +- CLI Mode: `ccw cli -p "..." --tool gemini --mode write --cd dir` +- Codex: `ccw cli -p "..." --tool codex --mode write --cd dir` **Generation Process**: 1. Read configuration values (tool, cli_execute, mode) from workflow-session.json @@ -331,7 +331,7 @@ api_id=$((group_count + 3)) { "step": 2, "title": "Batch generate documentation via CLI", - "command": "ccw cli exec 'PURPOSE: Generate module docs\\nTASK: Create documentation\\nMODE: write\\nCONTEXT: @**/* [phase2_context]\\nEXPECTED: API.md and README.md\\nRULES: Mirror structure' --tool gemini --mode write --cd ${dirs_from_group}", + "command": "ccw cli -p 'PURPOSE: Generate module docs\\nTASK: Create documentation\\nMODE: write\\nCONTEXT: @**/* [phase2_context]\\nEXPECTED: API.md and README.md\\nRULES: Mirror structure' --tool gemini --mode write --cd ${dirs_from_group}", "depends_on": [1], "output": "generated_docs" } @@ -363,7 +363,7 @@ api_id=$((group_count + 3)) }, { "step": "analyze_project", - "command": "bash(ccw cli exec \"PURPOSE: Analyze project structure\\nTASK: Extract overview from modules\\nMODE: analysis\\nCONTEXT: [all_module_docs]\\nEXPECTED: Project outline\" --tool gemini --mode analysis)", + "command": "bash(ccw cli -p \"PURPOSE: Analyze project structure\\nTASK: Extract overview from modules\\nMODE: analysis\\nCONTEXT: [all_module_docs]\\nEXPECTED: Project outline\" --tool gemini --mode analysis)", "output_to": "project_outline" } ], @@ -403,7 +403,7 @@ api_id=$((group_count + 3)) "pre_analysis": [ {"step": "load_existing_docs", "command": "bash(cat .workflow/docs/${project_name}/{ARCHITECTURE,EXAMPLES}.md 2>/dev/null || echo 'No existing docs')", "output_to": "existing_arch_examples"}, {"step": "load_all_docs", "command": "bash(cat .workflow/docs/${project_name}/README.md && find .workflow/docs/${project_name} -type f -name '*.md' ! -path '*/README.md' ! -path '*/ARCHITECTURE.md' ! -path '*/EXAMPLES.md' ! -path '*/api/*' | xargs cat)", "output_to": "all_docs"}, - {"step": "analyze_architecture", "command": "bash(ccw cli exec \"PURPOSE: Analyze system architecture\\nTASK: Synthesize architectural overview and examples\\nMODE: analysis\\nCONTEXT: [all_docs]\\nEXPECTED: Architecture + Examples outline\" --tool gemini --mode analysis)", "output_to": "arch_examples_outline"} + {"step": "analyze_architecture", "command": "bash(ccw cli -p \"PURPOSE: Analyze system architecture\\nTASK: Synthesize architectural overview and examples\\nMODE: analysis\\nCONTEXT: [all_docs]\\nEXPECTED: Architecture + Examples outline\" --tool gemini --mode analysis)", "output_to": "arch_examples_outline"} ], "implementation_approach": [ { @@ -440,7 +440,7 @@ api_id=$((group_count + 3)) "pre_analysis": [ {"step": "discover_api", "command": "bash(rg 'router\\.| @(Get|Post)' -g '*.{ts,js}')", "output_to": "endpoint_discovery"}, {"step": "load_existing_api", "command": "bash(cat .workflow/docs/${project_name}/api/README.md 2>/dev/null || echo 'No existing API docs')", "output_to": "existing_api_docs"}, - {"step": "analyze_api", "command": "bash(ccw cli exec \"PURPOSE: Document HTTP API\\nTASK: Analyze endpoints\\nMODE: analysis\\nCONTEXT: @src/api/**/* [endpoint_discovery]\\nEXPECTED: API outline\" --tool gemini --mode analysis)", "output_to": "api_outline"} + {"step": "analyze_api", "command": "bash(ccw cli -p \"PURPOSE: Document HTTP API\\nTASK: Analyze endpoints\\nMODE: analysis\\nCONTEXT: @src/api/**/* [endpoint_discovery]\\nEXPECTED: API outline\" --tool gemini --mode analysis)", "output_to": "api_outline"} ], "implementation_approach": [ { diff --git a/.claude/commands/memory/load.md b/.claude/commands/memory/load.md index 2739c23a..630e1838 100644 --- a/.claude/commands/memory/load.md +++ b/.claude/commands/memory/load.md @@ -136,7 +136,7 @@ Task( Execute Gemini/Qwen CLI for deep analysis (saves main thread tokens): \`\`\`bash -ccw cli exec " +ccw cli -p " PURPOSE: Extract project core context for task: ${task_description} TASK: Analyze project architecture, tech stack, key patterns, relevant files MODE: analysis diff --git a/.claude/commands/memory/workflow-skill-memory.md b/.claude/commands/memory/workflow-skill-memory.md index d081efce..ac483717 100644 --- a/.claude/commands/memory/workflow-skill-memory.md +++ b/.claude/commands/memory/workflow-skill-memory.md @@ -187,7 +187,7 @@ Objectives: 3. Use Gemini for aggregation (optional): Command pattern: - ccw cli exec " + ccw cli -p " PURPOSE: Extract lessons and conflicts from workflow session TASK: • Analyze IMPL_PLAN and lessons from manifest @@ -334,7 +334,7 @@ Objectives: - Sort sessions by date 2. Use Gemini for final aggregation: - ccw cli exec " + ccw cli -p " PURPOSE: Aggregate lessons and conflicts from all workflow sessions TASK: • Group successes by functional domain diff --git a/.claude/commands/workflow/lite-execute.md b/.claude/commands/workflow/lite-execute.md index a94b4991..dbbf76ce 100644 --- a/.claude/commands/workflow/lite-execute.md +++ b/.claude/commands/workflow/lite-execute.md @@ -474,7 +474,7 @@ Detailed plan: ${executionContext.session.artifacts.plan}`) return prompt } -ccw cli exec "${buildCLIPrompt(batch)}" --tool codex --mode write +ccw cli -p "${buildCLIPrompt(batch)}" --tool codex --mode write ``` **Execution with fixed IDs** (predictable ID pattern): @@ -497,8 +497,8 @@ const previousCliId = batch.resumeFromCliId || null // Build command with fixed ID (and optional resume for continuation) const cli_command = previousCliId - ? `ccw cli exec "${buildCLIPrompt(batch)}" --tool codex --mode write --id ${fixedExecutionId} --resume ${previousCliId}` - : `ccw cli exec "${buildCLIPrompt(batch)}" --tool codex --mode write --id ${fixedExecutionId}` + ? `ccw cli -p "${buildCLIPrompt(batch)}" --tool codex --mode write --id ${fixedExecutionId} --resume ${previousCliId}` + : `ccw cli -p "${buildCLIPrompt(batch)}" --tool codex --mode write --id ${fixedExecutionId}` bash_result = Bash( command=cli_command, @@ -520,7 +520,7 @@ if (bash_result.status === 'failed' || bash_result.status === 'timeout') { ⚠️ Execution incomplete. Resume available: Fixed ID: ${fixedExecutionId} Lookup: ccw cli detail ${fixedExecutionId} - Resume: ccw cli exec "Continue tasks" --resume ${fixedExecutionId} --tool codex --mode write --id ${fixedExecutionId}-retry + Resume: ccw cli -p "Continue tasks" --resume ${fixedExecutionId} --tool codex --mode write --id ${fixedExecutionId}-retry `) // Store for potential retry in same session @@ -575,15 +575,15 @@ RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/02-review-code-q # - Report findings directly # Method 2: Gemini Review (recommended) -ccw cli exec "[Shared Prompt Template with artifacts]" --tool gemini --mode analysis +ccw cli -p "[Shared Prompt Template with artifacts]" --tool gemini --mode analysis # CONTEXT includes: @**/* @${plan.json} [@${exploration.json}] # Method 3: Qwen Review (alternative) -ccw cli exec "[Shared Prompt Template with artifacts]" --tool qwen --mode analysis +ccw cli -p "[Shared Prompt Template with artifacts]" --tool qwen --mode analysis # Same prompt as Gemini, different execution engine # Method 4: Codex Review (autonomous) -ccw cli exec "[Verify plan acceptance criteria at ${plan.json}]" --tool codex --mode write +ccw cli -p "[Verify plan acceptance criteria at ${plan.json}]" --tool codex --mode write ``` **Multi-Round Review with Fixed IDs**: @@ -592,12 +592,12 @@ ccw cli exec "[Verify plan acceptance criteria at ${plan.json}]" --tool codex -- const reviewId = `${sessionId}-review` // First review pass with fixed ID -const reviewResult = Bash(`ccw cli exec "[Review prompt]" --tool gemini --mode analysis --id ${reviewId}`) +const reviewResult = Bash(`ccw cli -p "[Review prompt]" --tool gemini --mode analysis --id ${reviewId}`) // If issues found, continue review dialog with fixed ID chain if (hasUnresolvedIssues(reviewResult)) { // Resume with follow-up questions - Bash(`ccw cli exec "Clarify the security concerns you mentioned" --resume ${reviewId} --tool gemini --mode analysis --id ${reviewId}-followup`) + Bash(`ccw cli -p "Clarify the security concerns you mentioned" --resume ${reviewId} --tool gemini --mode analysis --id ${reviewId}-followup`) } ``` @@ -672,7 +672,7 @@ console.log(`✓ Development index: [${category}] ${entry.title}`) | Empty file | File exists but no content | Error: "File is empty: {path}. Provide task description." | | Invalid Enhanced Task JSON | JSON missing required fields | Warning: "Missing required fields. Treating as plain text." | | Malformed JSON | JSON parsing fails | Treat as plain text (expected for non-JSON files) | -| Execution failure | Agent/Codex crashes | Display error, use fixed ID `${sessionId}-${groupId}` for resume: `ccw cli exec "Continue" --resume --id -retry` | +| Execution failure | Agent/Codex crashes | Display error, use fixed ID `${sessionId}-${groupId}` for resume: `ccw cli -p "Continue" --resume --id -retry` | | Execution timeout | CLI exceeded timeout | Use fixed ID for resume with extended timeout | | Codex unavailable | Codex not installed | Show installation instructions, offer Agent execution | | Fixed ID not found | Custom ID lookup failed | Check `ccw cli history`, verify date directories | @@ -745,5 +745,5 @@ Appended to `previousExecutionResults` array for context continuity in multi-exe ccw cli detail ${fixedCliId} # Resume with new fixed ID for retry -ccw cli exec "Continue from where we left off" --resume ${fixedCliId} --tool codex --mode write --id ${fixedCliId}-retry +ccw cli -p "Continue from where we left off" --resume ${fixedCliId} --tool codex --mode write --id ${fixedCliId}-retry ``` diff --git a/.claude/commands/workflow/review.md b/.claude/commands/workflow/review.md index 0e08f1ed..faf6aa65 100644 --- a/.claude/commands/workflow/review.md +++ b/.claude/commands/workflow/review.md @@ -136,7 +136,7 @@ After bash validation, the model takes control to: ``` - Use Gemini for security analysis: ```bash - ccw cli exec " + ccw cli -p " PURPOSE: Security audit of completed implementation TASK: Review code for security vulnerabilities, insecure patterns, auth/authz issues CONTEXT: @.summaries/IMPL-*.md,../.. @../../CLAUDE.md @@ -148,7 +148,7 @@ After bash validation, the model takes control to: **Architecture Review** (`--type=architecture`): - Use Qwen for architecture analysis: ```bash - ccw cli exec " + ccw cli -p " PURPOSE: Architecture compliance review TASK: Evaluate adherence to architectural patterns, identify technical debt, review design decisions CONTEXT: @.summaries/IMPL-*.md,../.. @../../CLAUDE.md @@ -160,7 +160,7 @@ After bash validation, the model takes control to: **Quality Review** (`--type=quality`): - Use Gemini for code quality: ```bash - ccw cli exec " + ccw cli -p " PURPOSE: Code quality and best practices review TASK: Assess code readability, maintainability, adherence to best practices CONTEXT: @.summaries/IMPL-*.md,../.. @../../CLAUDE.md @@ -182,7 +182,7 @@ After bash validation, the model takes control to: done # Check implementation summaries against requirements - ccw cli exec " + ccw cli -p " PURPOSE: Verify all requirements and acceptance criteria are met TASK: Cross-check implementation summaries against original requirements CONTEXT: @.task/IMPL-*.json,.summaries/IMPL-*.md,../.. @../../CLAUDE.md diff --git a/.claude/commands/workflow/tdd-verify.md b/.claude/commands/workflow/tdd-verify.md index 7fd57223..0b320dcb 100644 --- a/.claude/commands/workflow/tdd-verify.md +++ b/.claude/commands/workflow/tdd-verify.md @@ -141,7 +141,7 @@ done **Gemini analysis for comprehensive TDD compliance report** ```bash -ccw cli exec " +ccw cli -p " PURPOSE: Generate TDD compliance report TASK: Analyze TDD workflow execution and generate quality report CONTEXT: @{.workflow/active/{sessionId}/.task/*.json,.workflow/active/{sessionId}/.summaries/*,.workflow/active/{sessionId}/.process/tdd-cycle-report.md} diff --git a/.claude/commands/workflow/tools/conflict-resolution.md b/.claude/commands/workflow/tools/conflict-resolution.md index a809fe30..666d9a8c 100644 --- a/.claude/commands/workflow/tools/conflict-resolution.md +++ b/.claude/commands/workflow/tools/conflict-resolution.md @@ -133,7 +133,7 @@ Task(subagent_type="cli-execution-agent", run_in_background=false, prompt=` ### 2. Execute CLI Analysis (Enhanced with Exploration + Scenario Uniqueness) Primary (Gemini): - ccw cli exec " + ccw cli -p " PURPOSE: Detect conflicts between plan and codebase, using exploration insights TASK: • **Review pre-identified conflict_indicators from exploration results** diff --git a/.claude/commands/workflow/tools/task-generate-agent.md b/.claude/commands/workflow/tools/task-generate-agent.md index aa5e47e3..2bb3b3ae 100644 --- a/.claude/commands/workflow/tools/task-generate-agent.md +++ b/.claude/commands/workflow/tools/task-generate-agent.md @@ -256,7 +256,7 @@ Based on userConfig.executionMethod: CLI Resume Support (MANDATORY for all CLI commands): - Use --resume parameter to continue from previous task execution - Read previous task's cliExecutionId from session state -- Format: ccw cli exec "[prompt]" --resume ${previousCliId} --tool ${tool} --mode write +- Format: ccw cli -p "[prompt]" --resume ${previousCliId} --tool ${tool} --mode write ## EXPLORATION CONTEXT (from context-package.exploration_results) - Load exploration_results from context-package.json @@ -308,10 +308,10 @@ Each task JSON MUST include: 4. **merge_fork**: Task has multiple parents - merges all parent contexts into new conversation **Execution Command Patterns**: -- new: `ccw cli exec "[prompt]" --tool [tool] --mode write --id [cli_execution_id]` -- resume: `ccw cli exec "[prompt]" --resume [resume_from] --tool [tool] --mode write` -- fork: `ccw cli exec "[prompt]" --resume [resume_from] --id [cli_execution_id] --tool [tool] --mode write` -- merge_fork: `ccw cli exec "[prompt]" --resume [merge_from.join(',')] --id [cli_execution_id] --tool [tool] --mode write` +- new: `ccw cli -p "[prompt]" --tool [tool] --mode write --id [cli_execution_id]` +- resume: `ccw cli -p "[prompt]" --resume [resume_from] --tool [tool] --mode write` +- fork: `ccw cli -p "[prompt]" --resume [resume_from] --id [cli_execution_id] --tool [tool] --mode write` +- merge_fork: `ccw cli -p "[prompt]" --resume [merge_from.join(',')] --id [cli_execution_id] --tool [tool] --mode write` ## QUALITY STANDARDS Hard Constraints: diff --git a/.claude/commands/workflow/tools/test-concept-enhanced.md b/.claude/commands/workflow/tools/test-concept-enhanced.md index 29fffd1d..0d9bfc58 100644 --- a/.claude/commands/workflow/tools/test-concept-enhanced.md +++ b/.claude/commands/workflow/tools/test-concept-enhanced.md @@ -90,7 +90,7 @@ Template: ~/.claude/workflows/cli-templates/prompts/test/test-concept-analysis.t ## EXECUTION STEPS 1. Execute Gemini analysis: - ccw cli exec "$(cat ~/.claude/workflows/cli-templates/prompts/test/test-concept-analysis.txt)" --tool gemini --mode write --cd .workflow/active/{test_session_id}/.process + ccw cli -p "$(cat ~/.claude/workflows/cli-templates/prompts/test/test-concept-analysis.txt)" --tool gemini --mode write --cd .workflow/active/{test_session_id}/.process 2. Generate TEST_ANALYSIS_RESULTS.md: Synthesize gemini-test-analysis.md into standardized format for task generation diff --git a/.claude/commands/workflow/ui-design/import-from-code.md b/.claude/commands/workflow/ui-design/import-from-code.md index cc159a61..8d2168fe 100644 --- a/.claude/commands/workflow/ui-design/import-from-code.md +++ b/.claude/commands/workflow/ui-design/import-from-code.md @@ -181,7 +181,7 @@ Task(subagent_type="ui-design-agent", - Pattern: rg → Extract values → Compare → If different → Read full context with comments → Record conflict - Alternative (if many files): Execute CLI analysis for comprehensive report: \`\`\`bash - ccw cli exec \" + ccw cli -p \" PURPOSE: Detect color token conflicts across all CSS/SCSS/JS files TASK: • Scan all files for color definitions • Identify conflicting values • Extract semantic comments MODE: analysis @@ -297,7 +297,7 @@ Task(subagent_type="ui-design-agent", - Pattern: rg → Identify animation types → Map framework usage → Prioritize extraction targets - Alternative (if complex framework mix): Execute CLI analysis for comprehensive report: \`\`\`bash - ccw cli exec \" + ccw cli -p \" PURPOSE: Detect animation frameworks and patterns TASK: • Identify frameworks • Map animation patterns • Categorize by complexity MODE: analysis @@ -377,7 +377,7 @@ Task(subagent_type="ui-design-agent", - Pattern: rg → Count occurrences → Classify by frequency → Prioritize universal components - Alternative (if large codebase): Execute CLI analysis for comprehensive categorization: \`\`\`bash - ccw cli exec \" + ccw cli -p \" PURPOSE: Classify components as universal vs specialized TASK: • Identify UI components • Classify reusability • Map layout systems MODE: analysis diff --git a/.claude/skills/command-guide/SKILL.md b/.claude/skills/command-guide/SKILL.md index fd9514f7..c688d86d 100644 --- a/.claude/skills/command-guide/SKILL.md +++ b/.claude/skills/command-guide/SKILL.md @@ -205,7 +205,7 @@ Comprehensive command guide for Claude Code Workflow (CCW) system covering 78 co - Specify required analysis depth - Request structured comparison/synthesis ```bash - ccw cli exec " + ccw cli -p " PURPOSE: Analyze command documentation to answer user query TASK: • [extracted user question with context] MODE: analysis diff --git a/.claude/skills/command-guide/reference/agents/action-planning-agent.md b/.claude/skills/command-guide/reference/agents/action-planning-agent.md index b7488b95..8ab75868 100644 --- a/.claude/skills/command-guide/reference/agents/action-planning-agent.md +++ b/.claude/skills/command-guide/reference/agents/action-planning-agent.md @@ -470,14 +470,14 @@ function computeCliStrategy(task, allTasks) { // Pattern: Gemini CLI deep analysis { "step": "gemini_analyze_[aspect]", - "command": "ccw cli exec 'PURPOSE: [goal]\\nTASK: [tasks]\\nMODE: analysis\\nCONTEXT: @[paths]\\nEXPECTED: [output]\\nRULES: $(cat [template]) | [constraints] | analysis=READ-ONLY' --tool gemini --mode analysis --cd [path]", + "command": "ccw cli -p 'PURPOSE: [goal]\\nTASK: [tasks]\\nMODE: analysis\\nCONTEXT: @[paths]\\nEXPECTED: [output]\\nRULES: $(cat [template]) | [constraints] | analysis=READ-ONLY' --tool gemini --mode analysis --cd [path]", "output_to": "analysis_result" }, // Pattern: Qwen CLI analysis (fallback/alternative) { "step": "qwen_analyze_[aspect]", - "command": "ccw cli exec '[similar to gemini pattern]' --tool qwen --mode analysis --cd [path]", + "command": "ccw cli -p '[similar to gemini pattern]' --tool qwen --mode analysis --cd [path]", "output_to": "analysis_result" }, @@ -518,7 +518,7 @@ The examples above demonstrate **patterns**, not fixed requirements. Agent MUST: 4. **Command Composition Patterns**: - **Single command**: `bash([simple_search])` - **Multiple commands**: `["bash([cmd1])", "bash([cmd2])"]` - - **CLI analysis**: `ccw cli exec '[prompt]' --tool gemini --mode analysis --cd [path]` + - **CLI analysis**: `ccw cli -p '[prompt]' --tool gemini --mode analysis --cd [path]` - **MCP integration**: `mcp__[tool]__[function]([params])` **Key Principle**: Examples show **structure patterns**, not specific implementations. Agent must create task-appropriate steps dynamically. @@ -542,9 +542,9 @@ The `implementation_approach` supports **two execution modes** based on the pres - **Use for**: Large-scale features, complex refactoring, or when user explicitly requests CLI tool usage - **Required fields**: Same as default mode **PLUS** `command`, `resume_from` (optional) - **Command patterns** (with resume support): - - `ccw cli exec '[prompt]' --tool codex --mode write --cd [path]` - - `ccw cli exec '[prompt]' --resume ${previousCliId} --tool codex --mode write` (resume from previous) - - `ccw cli exec '[prompt]' --tool gemini --mode write --cd [path]` (write mode) + - `ccw cli -p '[prompt]' --tool codex --mode write --cd [path]` + - `ccw cli -p '[prompt]' --resume ${previousCliId} --tool codex --mode write` (resume from previous) + - `ccw cli -p '[prompt]' --tool gemini --mode write --cd [path]` (write mode) - **Resume mechanism**: When step depends on previous CLI execution, include `--resume` with previous execution ID **Semantic CLI Tool Selection**: @@ -621,7 +621,7 @@ Agent determines CLI tool usage per-step based on user semantics and task nature "step": 3, "title": "Execute implementation using CLI tool", "description": "Use Codex/Gemini for complex autonomous execution", - "command": "ccw cli exec '[prompt]' --tool codex --mode write --cd [path]", + "command": "ccw cli -p '[prompt]' --tool codex --mode write --cd [path]", "modification_points": ["[Same as default mode]"], "logic_flow": ["[Same as default mode]"], "depends_on": [1, 2], @@ -634,7 +634,7 @@ Agent determines CLI tool usage per-step based on user semantics and task nature "step": 4, "title": "Continue implementation with context", "description": "Resume from previous step with accumulated context", - "command": "ccw cli exec '[continuation prompt]' --resume ${step3_cli_id} --tool codex --mode write", + "command": "ccw cli -p '[continuation prompt]' --resume ${step3_cli_id} --tool codex --mode write", "resume_from": "step3_cli_id", // Reference previous step's CLI ID "modification_points": ["[Continue from step 3]"], "logic_flow": ["[Build on previous output]"], diff --git a/.claude/skills/command-guide/reference/agents/cli-execution-agent.md b/.claude/skills/command-guide/reference/agents/cli-execution-agent.md index 66927dbd..9dc92f89 100644 --- a/.claude/skills/command-guide/reference/agents/cli-execution-agent.md +++ b/.claude/skills/command-guide/reference/agents/cli-execution-agent.md @@ -148,7 +148,7 @@ discuss → multi (gemini + codex parallel) **Gemini/Qwen (Analysis)**: ```bash -ccw cli exec " +ccw cli -p " PURPOSE: {goal} TASK: {task} MODE: analysis @@ -162,17 +162,17 @@ RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/pattern.txt) **Gemini/Qwen (Write)**: ```bash -ccw cli exec "..." --tool gemini --mode write --cd {dir} +ccw cli -p "..." --tool gemini --mode write --cd {dir} ``` **Codex (Write)**: ```bash -ccw cli exec "..." --tool codex --mode write --cd {dir} +ccw cli -p "..." --tool codex --mode write --cd {dir} ``` **Cross-Directory** (Gemini/Qwen): ```bash -ccw cli exec "CONTEXT: @**/* @../shared/**/*" --tool gemini --mode analysis --cd src/auth --includeDirs ../shared +ccw cli -p "CONTEXT: @**/* @../shared/**/*" --tool gemini --mode analysis --cd src/auth --includeDirs ../shared ``` **Directory Scope**: diff --git a/.claude/skills/command-guide/reference/agents/cli-explore-agent.md b/.claude/skills/command-guide/reference/agents/cli-explore-agent.md index aa1b56c6..3523feea 100644 --- a/.claude/skills/command-guide/reference/agents/cli-explore-agent.md +++ b/.claude/skills/command-guide/reference/agents/cli-explore-agent.md @@ -78,7 +78,7 @@ rg "^import .* from " -n | head -30 ### Gemini Semantic Analysis (deep-scan, dependency-map) ```bash -ccw cli exec " +ccw cli -p " PURPOSE: {from prompt} TASK: {from prompt} MODE: analysis diff --git a/.claude/skills/command-guide/reference/agents/cli-lite-planning-agent.md b/.claude/skills/command-guide/reference/agents/cli-lite-planning-agent.md index bf7c373d..31f1ef7a 100644 --- a/.claude/skills/command-guide/reference/agents/cli-lite-planning-agent.md +++ b/.claude/skills/command-guide/reference/agents/cli-lite-planning-agent.md @@ -78,7 +78,7 @@ Phase 4: planObject Generation ## CLI Command Template ```bash -ccw cli exec " +ccw cli -p " PURPOSE: Generate plan for {task_description} TASK: • Analyze task/bug description and context diff --git a/.claude/skills/command-guide/reference/agents/cli-planning-agent.md b/.claude/skills/command-guide/reference/agents/cli-planning-agent.md index fa2d5340..4f65dfe8 100644 --- a/.claude/skills/command-guide/reference/agents/cli-planning-agent.md +++ b/.claude/skills/command-guide/reference/agents/cli-planning-agent.md @@ -107,7 +107,7 @@ Phase 3: Task JSON Generation **Template-Based Command Construction with Test Layer Awareness**: ```bash -ccw cli exec " +ccw cli -p " PURPOSE: Analyze {test_type} test failures and generate fix strategy for iteration {iteration} TASK: • Review {failed_tests.length} {test_type} test failures: [{test_names}] @@ -527,7 +527,7 @@ See: `.process/iteration-{iteration}-cli-output.txt` 1. **Detect test_type**: "integration" → Apply integration-specific diagnosis 2. **Execute CLI**: ```bash - ccw cli exec "PURPOSE: Analyze integration test failure... + ccw cli -p "PURPOSE: Analyze integration test failure... TASK: Examine component interactions, data flow, interface contracts... RULES: Analyze full call stack and data flow across components" --tool gemini --mode analysis ``` diff --git a/.claude/skills/command-guide/reference/agents/code-developer.md b/.claude/skills/command-guide/reference/agents/code-developer.md index 7cc4010b..ea862f10 100644 --- a/.claude/skills/command-guide/reference/agents/code-developer.md +++ b/.claude/skills/command-guide/reference/agents/code-developer.md @@ -123,7 +123,7 @@ When task JSON contains `flow_control.implementation_approach` array: **CLI Command Execution (CLI Execute Mode)**: When step contains `command` field with Codex CLI, execute via CCW CLI. For Codex resume: -- First task (`depends_on: []`): `ccw cli exec "..." --tool codex --mode write --cd [path]` +- First task (`depends_on: []`): `ccw cli -p "..." --tool codex --mode write --cd [path]` - Subsequent tasks (has `depends_on`): Use CCW CLI with resume context to maintain session **Test-Driven Development**: diff --git a/.claude/skills/command-guide/reference/agents/doc-generator.md b/.claude/skills/command-guide/reference/agents/doc-generator.md index f2cb078f..bda48f60 100644 --- a/.claude/skills/command-guide/reference/agents/doc-generator.md +++ b/.claude/skills/command-guide/reference/agents/doc-generator.md @@ -63,7 +63,7 @@ The agent supports **two execution modes** based on task JSON's `meta.cli_execut - Agent substitutes [target_folders] into command - Agent executes CLI command via CCW: ```bash - ccw cli exec " + ccw cli -p " PURPOSE: Generate module documentation TASK: Create API.md and README.md for each module MODE: write @@ -216,7 +216,7 @@ Before completion, verify: { "step": "analyze_module_structure", "action": "Deep analysis of module structure and API", - "command": "ccw cli exec \"PURPOSE: Document module comprehensively\nTASK: Extract module purpose, architecture, public API, dependencies\nMODE: analysis\nCONTEXT: @**/* System: [system_context]\nEXPECTED: Complete module analysis for documentation\nRULES: $(cat ~/.claude/workflows/cli-templates/prompts/documentation/module-documentation.txt)\" --tool gemini --mode analysis --cd src/auth", + "command": "ccw cli -p \"PURPOSE: Document module comprehensively\nTASK: Extract module purpose, architecture, public API, dependencies\nMODE: analysis\nCONTEXT: @**/* System: [system_context]\nEXPECTED: Complete module analysis for documentation\nRULES: $(cat ~/.claude/workflows/cli-templates/prompts/documentation/module-documentation.txt)\" --tool gemini --mode analysis --cd src/auth", "output_to": "module_analysis", "on_error": "fail" } diff --git a/.claude/skills/command-guide/reference/commands/memory/docs.md b/.claude/skills/command-guide/reference/commands/memory/docs.md index 46cf03c9..d96e2967 100644 --- a/.claude/skills/command-guide/reference/commands/memory/docs.md +++ b/.claude/skills/command-guide/reference/commands/memory/docs.md @@ -239,9 +239,9 @@ api_id=$((group_count + 3)) | **CLI** | true | implementation_approach | write | --mode write | Execute CLI commands, validate output | **Command Patterns**: -- Gemini/Qwen: `ccw cli exec "..." --tool gemini --mode analysis --cd dir` -- CLI Mode: `ccw cli exec "..." --tool gemini --mode write --cd dir` -- Codex: `ccw cli exec "..." --tool codex --mode write --cd dir` +- Gemini/Qwen: `ccw cli -p "..." --tool gemini --mode analysis --cd dir` +- CLI Mode: `ccw cli -p "..." --tool gemini --mode write --cd dir` +- Codex: `ccw cli -p "..." --tool codex --mode write --cd dir` **Generation Process**: 1. Read configuration values (tool, cli_execute, mode) from workflow-session.json @@ -332,7 +332,7 @@ api_id=$((group_count + 3)) { "step": 2, "title": "Batch generate documentation via CLI", - "command": "ccw cli exec 'PURPOSE: Generate module docs\\nTASK: Create documentation\\nMODE: write\\nCONTEXT: @**/* [phase2_context]\\nEXPECTED: API.md and README.md\\nRULES: Mirror structure' --tool gemini --mode write --cd ${dirs_from_group}", + "command": "ccw cli -p 'PURPOSE: Generate module docs\\nTASK: Create documentation\\nMODE: write\\nCONTEXT: @**/* [phase2_context]\\nEXPECTED: API.md and README.md\\nRULES: Mirror structure' --tool gemini --mode write --cd ${dirs_from_group}", "depends_on": [1], "output": "generated_docs" } @@ -364,7 +364,7 @@ api_id=$((group_count + 3)) }, { "step": "analyze_project", - "command": "bash(ccw cli exec \"PURPOSE: Analyze project structure\\nTASK: Extract overview from modules\\nMODE: analysis\\nCONTEXT: [all_module_docs]\\nEXPECTED: Project outline\" --tool gemini --mode analysis)", + "command": "bash(ccw cli -p \"PURPOSE: Analyze project structure\\nTASK: Extract overview from modules\\nMODE: analysis\\nCONTEXT: [all_module_docs]\\nEXPECTED: Project outline\" --tool gemini --mode analysis)", "output_to": "project_outline" } ], @@ -404,7 +404,7 @@ api_id=$((group_count + 3)) "pre_analysis": [ {"step": "load_existing_docs", "command": "bash(cat .workflow/docs/${project_name}/{ARCHITECTURE,EXAMPLES}.md 2>/dev/null || echo 'No existing docs')", "output_to": "existing_arch_examples"}, {"step": "load_all_docs", "command": "bash(cat .workflow/docs/${project_name}/README.md && find .workflow/docs/${project_name} -type f -name '*.md' ! -path '*/README.md' ! -path '*/ARCHITECTURE.md' ! -path '*/EXAMPLES.md' ! -path '*/api/*' | xargs cat)", "output_to": "all_docs"}, - {"step": "analyze_architecture", "command": "bash(ccw cli exec \"PURPOSE: Analyze system architecture\\nTASK: Synthesize architectural overview and examples\\nMODE: analysis\\nCONTEXT: [all_docs]\\nEXPECTED: Architecture + Examples outline\" --tool gemini --mode analysis)", "output_to": "arch_examples_outline"} + {"step": "analyze_architecture", "command": "bash(ccw cli -p \"PURPOSE: Analyze system architecture\\nTASK: Synthesize architectural overview and examples\\nMODE: analysis\\nCONTEXT: [all_docs]\\nEXPECTED: Architecture + Examples outline\" --tool gemini --mode analysis)", "output_to": "arch_examples_outline"} ], "implementation_approach": [ { @@ -441,7 +441,7 @@ api_id=$((group_count + 3)) "pre_analysis": [ {"step": "discover_api", "command": "bash(rg 'router\\.| @(Get|Post)' -g '*.{ts,js}')", "output_to": "endpoint_discovery"}, {"step": "load_existing_api", "command": "bash(cat .workflow/docs/${project_name}/api/README.md 2>/dev/null || echo 'No existing API docs')", "output_to": "existing_api_docs"}, - {"step": "analyze_api", "command": "bash(ccw cli exec \"PURPOSE: Document HTTP API\\nTASK: Analyze endpoints\\nMODE: analysis\\nCONTEXT: @src/api/**/* [endpoint_discovery]\\nEXPECTED: API outline\" --tool gemini --mode analysis)", "output_to": "api_outline"} + {"step": "analyze_api", "command": "bash(ccw cli -p \"PURPOSE: Document HTTP API\\nTASK: Analyze endpoints\\nMODE: analysis\\nCONTEXT: @src/api/**/* [endpoint_discovery]\\nEXPECTED: API outline\" --tool gemini --mode analysis)", "output_to": "api_outline"} ], "implementation_approach": [ { diff --git a/.claude/skills/command-guide/reference/commands/memory/load.md b/.claude/skills/command-guide/reference/commands/memory/load.md index 2739c23a..630e1838 100644 --- a/.claude/skills/command-guide/reference/commands/memory/load.md +++ b/.claude/skills/command-guide/reference/commands/memory/load.md @@ -136,7 +136,7 @@ Task( Execute Gemini/Qwen CLI for deep analysis (saves main thread tokens): \`\`\`bash -ccw cli exec " +ccw cli -p " PURPOSE: Extract project core context for task: ${task_description} TASK: Analyze project architecture, tech stack, key patterns, relevant files MODE: analysis diff --git a/.claude/skills/command-guide/reference/commands/memory/workflow-skill-memory.md b/.claude/skills/command-guide/reference/commands/memory/workflow-skill-memory.md index d081efce..ac483717 100644 --- a/.claude/skills/command-guide/reference/commands/memory/workflow-skill-memory.md +++ b/.claude/skills/command-guide/reference/commands/memory/workflow-skill-memory.md @@ -187,7 +187,7 @@ Objectives: 3. Use Gemini for aggregation (optional): Command pattern: - ccw cli exec " + ccw cli -p " PURPOSE: Extract lessons and conflicts from workflow session TASK: • Analyze IMPL_PLAN and lessons from manifest @@ -334,7 +334,7 @@ Objectives: - Sort sessions by date 2. Use Gemini for final aggregation: - ccw cli exec " + ccw cli -p " PURPOSE: Aggregate lessons and conflicts from all workflow sessions TASK: • Group successes by functional domain diff --git a/.claude/skills/command-guide/reference/commands/workflow/lite-execute.md b/.claude/skills/command-guide/reference/commands/workflow/lite-execute.md index 06b49beb..c49de2fa 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/lite-execute.md +++ b/.claude/skills/command-guide/reference/commands/workflow/lite-execute.md @@ -473,7 +473,7 @@ Detailed plan: ${executionContext.session.artifacts.plan}`) return prompt } -ccw cli exec "${buildCLIPrompt(batch)}" --tool codex --mode write +ccw cli -p "${buildCLIPrompt(batch)}" --tool codex --mode write ``` **Execution with fixed IDs** (predictable ID pattern): @@ -496,8 +496,8 @@ const previousCliId = batch.resumeFromCliId || null // Build command with fixed ID (and optional resume for continuation) const cli_command = previousCliId - ? `ccw cli exec "${buildCLIPrompt(batch)}" --tool codex --mode write --id ${fixedExecutionId} --resume ${previousCliId}` - : `ccw cli exec "${buildCLIPrompt(batch)}" --tool codex --mode write --id ${fixedExecutionId}` + ? `ccw cli -p "${buildCLIPrompt(batch)}" --tool codex --mode write --id ${fixedExecutionId} --resume ${previousCliId}` + : `ccw cli -p "${buildCLIPrompt(batch)}" --tool codex --mode write --id ${fixedExecutionId}` bash_result = Bash( command=cli_command, @@ -519,7 +519,7 @@ if (bash_result.status === 'failed' || bash_result.status === 'timeout') { ⚠️ Execution incomplete. Resume available: Fixed ID: ${fixedExecutionId} Lookup: ccw cli detail ${fixedExecutionId} - Resume: ccw cli exec "Continue tasks" --resume ${fixedExecutionId} --tool codex --mode write --id ${fixedExecutionId}-retry + Resume: ccw cli -p "Continue tasks" --resume ${fixedExecutionId} --tool codex --mode write --id ${fixedExecutionId}-retry `) // Store for potential retry in same session @@ -574,15 +574,15 @@ RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/02-review-code-q # - Report findings directly # Method 2: Gemini Review (recommended) -ccw cli exec "[Shared Prompt Template with artifacts]" --tool gemini --mode analysis +ccw cli -p "[Shared Prompt Template with artifacts]" --tool gemini --mode analysis # CONTEXT includes: @**/* @${plan.json} [@${exploration.json}] # Method 3: Qwen Review (alternative) -ccw cli exec "[Shared Prompt Template with artifacts]" --tool qwen --mode analysis +ccw cli -p "[Shared Prompt Template with artifacts]" --tool qwen --mode analysis # Same prompt as Gemini, different execution engine # Method 4: Codex Review (autonomous) -ccw cli exec "[Verify plan acceptance criteria at ${plan.json}]" --tool codex --mode write +ccw cli -p "[Verify plan acceptance criteria at ${plan.json}]" --tool codex --mode write ``` **Multi-Round Review with Fixed IDs**: @@ -591,12 +591,12 @@ ccw cli exec "[Verify plan acceptance criteria at ${plan.json}]" --tool codex -- const reviewId = `${sessionId}-review` // First review pass with fixed ID -const reviewResult = Bash(`ccw cli exec "[Review prompt]" --tool gemini --mode analysis --id ${reviewId}`) +const reviewResult = Bash(`ccw cli -p "[Review prompt]" --tool gemini --mode analysis --id ${reviewId}`) // If issues found, continue review dialog with fixed ID chain if (hasUnresolvedIssues(reviewResult)) { // Resume with follow-up questions - Bash(`ccw cli exec "Clarify the security concerns you mentioned" --resume ${reviewId} --tool gemini --mode analysis --id ${reviewId}-followup`) + Bash(`ccw cli -p "Clarify the security concerns you mentioned" --resume ${reviewId} --tool gemini --mode analysis --id ${reviewId}-followup`) } ``` @@ -671,7 +671,7 @@ console.log(`✓ Development index: [${category}] ${entry.title}`) | Empty file | File exists but no content | Error: "File is empty: {path}. Provide task description." | | Invalid Enhanced Task JSON | JSON missing required fields | Warning: "Missing required fields. Treating as plain text." | | Malformed JSON | JSON parsing fails | Treat as plain text (expected for non-JSON files) | -| Execution failure | Agent/Codex crashes | Display error, use fixed ID `${sessionId}-${groupId}` for resume: `ccw cli exec "Continue" --resume --id -retry` | +| Execution failure | Agent/Codex crashes | Display error, use fixed ID `${sessionId}-${groupId}` for resume: `ccw cli -p "Continue" --resume --id -retry` | | Execution timeout | CLI exceeded timeout | Use fixed ID for resume with extended timeout | | Codex unavailable | Codex not installed | Show installation instructions, offer Agent execution | | Fixed ID not found | Custom ID lookup failed | Check `ccw cli history`, verify date directories | @@ -744,5 +744,5 @@ Appended to `previousExecutionResults` array for context continuity in multi-exe ccw cli detail ${fixedCliId} # Resume with new fixed ID for retry -ccw cli exec "Continue from where we left off" --resume ${fixedCliId} --tool codex --mode write --id ${fixedCliId}-retry +ccw cli -p "Continue from where we left off" --resume ${fixedCliId} --tool codex --mode write --id ${fixedCliId}-retry ``` diff --git a/.claude/skills/command-guide/reference/commands/workflow/review.md b/.claude/skills/command-guide/reference/commands/workflow/review.md index a4c58803..8ad1c83b 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/review.md +++ b/.claude/skills/command-guide/reference/commands/workflow/review.md @@ -137,7 +137,7 @@ After bash validation, the model takes control to: ``` - Use Gemini for security analysis: ```bash - ccw cli exec " + ccw cli -p " PURPOSE: Security audit of completed implementation TASK: Review code for security vulnerabilities, insecure patterns, auth/authz issues CONTEXT: @.summaries/IMPL-*.md,../.. @../../CLAUDE.md @@ -149,7 +149,7 @@ After bash validation, the model takes control to: **Architecture Review** (`--type=architecture`): - Use Qwen for architecture analysis: ```bash - ccw cli exec " + ccw cli -p " PURPOSE: Architecture compliance review TASK: Evaluate adherence to architectural patterns, identify technical debt, review design decisions CONTEXT: @.summaries/IMPL-*.md,../.. @../../CLAUDE.md @@ -161,7 +161,7 @@ After bash validation, the model takes control to: **Quality Review** (`--type=quality`): - Use Gemini for code quality: ```bash - ccw cli exec " + ccw cli -p " PURPOSE: Code quality and best practices review TASK: Assess code readability, maintainability, adherence to best practices CONTEXT: @.summaries/IMPL-*.md,../.. @../../CLAUDE.md @@ -183,7 +183,7 @@ After bash validation, the model takes control to: done # Check implementation summaries against requirements - ccw cli exec " + ccw cli -p " PURPOSE: Verify all requirements and acceptance criteria are met TASK: Cross-check implementation summaries against original requirements CONTEXT: @.task/IMPL-*.json,.summaries/IMPL-*.md,../.. @../../CLAUDE.md diff --git a/.claude/skills/command-guide/reference/commands/workflow/tdd-verify.md b/.claude/skills/command-guide/reference/commands/workflow/tdd-verify.md index 7fd57223..0b320dcb 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/tdd-verify.md +++ b/.claude/skills/command-guide/reference/commands/workflow/tdd-verify.md @@ -141,7 +141,7 @@ done **Gemini analysis for comprehensive TDD compliance report** ```bash -ccw cli exec " +ccw cli -p " PURPOSE: Generate TDD compliance report TASK: Analyze TDD workflow execution and generate quality report CONTEXT: @{.workflow/active/{sessionId}/.task/*.json,.workflow/active/{sessionId}/.summaries/*,.workflow/active/{sessionId}/.process/tdd-cycle-report.md} diff --git a/.claude/skills/command-guide/reference/commands/workflow/tools/conflict-resolution.md b/.claude/skills/command-guide/reference/commands/workflow/tools/conflict-resolution.md index f071f3aa..44587f93 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/tools/conflict-resolution.md +++ b/.claude/skills/command-guide/reference/commands/workflow/tools/conflict-resolution.md @@ -133,7 +133,7 @@ Task(subagent_type="cli-execution-agent", prompt=` ### 2. Execute CLI Analysis (Enhanced with Exploration + Scenario Uniqueness) Primary (Gemini): - ccw cli exec " + ccw cli -p " PURPOSE: Detect conflicts between plan and codebase, using exploration insights TASK: • **Review pre-identified conflict_indicators from exploration results** diff --git a/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md b/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md index 2bd214bf..981e4c8f 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md +++ b/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md @@ -255,7 +255,7 @@ Based on userConfig.executionMethod: CLI Resume Support (MANDATORY for all CLI commands): - Use --resume parameter to continue from previous task execution - Read previous task's cliExecutionId from session state -- Format: ccw cli exec "[prompt]" --resume ${previousCliId} --tool ${tool} --mode write +- Format: ccw cli -p "[prompt]" --resume ${previousCliId} --tool ${tool} --mode write ## EXPLORATION CONTEXT (from context-package.exploration_results) - Load exploration_results from context-package.json @@ -307,10 +307,10 @@ Each task JSON MUST include: 4. **merge_fork**: Task has multiple parents - merges all parent contexts into new conversation **Execution Command Patterns**: -- new: `ccw cli exec "[prompt]" --tool [tool] --mode write --id [cli_execution_id]` -- resume: `ccw cli exec "[prompt]" --resume [resume_from] --tool [tool] --mode write` -- fork: `ccw cli exec "[prompt]" --resume [resume_from] --id [cli_execution_id] --tool [tool] --mode write` -- merge_fork: `ccw cli exec "[prompt]" --resume [merge_from.join(',')] --id [cli_execution_id] --tool [tool] --mode write` +- new: `ccw cli -p "[prompt]" --tool [tool] --mode write --id [cli_execution_id]` +- resume: `ccw cli -p "[prompt]" --resume [resume_from] --tool [tool] --mode write` +- fork: `ccw cli -p "[prompt]" --resume [resume_from] --id [cli_execution_id] --tool [tool] --mode write` +- merge_fork: `ccw cli -p "[prompt]" --resume [merge_from.join(',')] --id [cli_execution_id] --tool [tool] --mode write` ## QUALITY STANDARDS Hard Constraints: diff --git a/.claude/skills/command-guide/reference/commands/workflow/tools/test-concept-enhanced.md b/.claude/skills/command-guide/reference/commands/workflow/tools/test-concept-enhanced.md index 74338925..8d4578cb 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/tools/test-concept-enhanced.md +++ b/.claude/skills/command-guide/reference/commands/workflow/tools/test-concept-enhanced.md @@ -89,7 +89,7 @@ Template: ~/.claude/workflows/cli-templates/prompts/test/test-concept-analysis.t ## EXECUTION STEPS 1. Execute Gemini analysis: - ccw cli exec "$(cat ~/.claude/workflows/cli-templates/prompts/test/test-concept-analysis.txt)" --tool gemini --mode write --cd .workflow/active/{test_session_id}/.process + ccw cli -p "$(cat ~/.claude/workflows/cli-templates/prompts/test/test-concept-analysis.txt)" --tool gemini --mode write --cd .workflow/active/{test_session_id}/.process 2. Generate TEST_ANALYSIS_RESULTS.md: Synthesize gemini-test-analysis.md into standardized format for task generation diff --git a/.claude/skills/command-guide/reference/commands/workflow/ui-design/import-from-code.md b/.claude/skills/command-guide/reference/commands/workflow/ui-design/import-from-code.md index 6d514c4f..675f9df2 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/ui-design/import-from-code.md +++ b/.claude/skills/command-guide/reference/commands/workflow/ui-design/import-from-code.md @@ -180,7 +180,7 @@ Task(subagent_type="ui-design-agent", - Pattern: rg → Extract values → Compare → If different → Read full context with comments → Record conflict - Alternative (if many files): Execute CLI analysis for comprehensive report: \`\`\`bash - ccw cli exec \" + ccw cli -p \" PURPOSE: Detect color token conflicts across all CSS/SCSS/JS files TASK: • Scan all files for color definitions • Identify conflicting values • Extract semantic comments MODE: analysis @@ -295,7 +295,7 @@ Task(subagent_type="ui-design-agent", - Pattern: rg → Identify animation types → Map framework usage → Prioritize extraction targets - Alternative (if complex framework mix): Execute CLI analysis for comprehensive report: \`\`\`bash - ccw cli exec \" + ccw cli -p \" PURPOSE: Detect animation frameworks and patterns TASK: • Identify frameworks • Map animation patterns • Categorize by complexity MODE: analysis @@ -374,7 +374,7 @@ Task(subagent_type="ui-design-agent", - Pattern: rg → Count occurrences → Classify by frequency → Prioritize universal components - Alternative (if large codebase): Execute CLI analysis for comprehensive categorization: \`\`\`bash - ccw cli exec \" + ccw cli -p \" PURPOSE: Classify components as universal vs specialized TASK: • Identify UI components • Classify reusability • Map layout systems MODE: analysis diff --git a/.claude/workflows/cli-templates/prompts/workflow/skill-conflict-patterns.txt b/.claude/workflows/cli-templates/prompts/workflow/skill-conflict-patterns.txt index 2d41916a..46ecd2d6 100644 --- a/.claude/workflows/cli-templates/prompts/workflow/skill-conflict-patterns.txt +++ b/.claude/workflows/cli-templates/prompts/workflow/skill-conflict-patterns.txt @@ -70,7 +70,7 @@ Document recurring conflict patterns across workflow sessions with resolutions. **Command Pattern**: ```bash -ccw cli exec " +ccw cli -p " PURPOSE: Identify conflict patterns from workflow sessions TASK: • Extract conflicts from IMPL_PLAN and lessons • Group by type (architecture/dependencies/testing/performance) • Identify recurring patterns (same conflict in different sessions) • Link resolutions to specific sessions MODE: analysis diff --git a/.claude/workflows/cli-templates/prompts/workflow/skill-lessons-learned.txt b/.claude/workflows/cli-templates/prompts/workflow/skill-lessons-learned.txt index a4a01634..64dcc402 100644 --- a/.claude/workflows/cli-templates/prompts/workflow/skill-lessons-learned.txt +++ b/.claude/workflows/cli-templates/prompts/workflow/skill-lessons-learned.txt @@ -66,7 +66,7 @@ Aggregate lessons learned from workflow sessions, categorized by functional doma **Command Pattern**: ```bash -ccw cli exec " +ccw cli -p " PURPOSE: Aggregate workflow lessons from session data TASK: • Group successes by functional domain • Categorize challenges by severity (HIGH/MEDIUM/LOW) • Identify watch patterns with frequency >= 2 • Mark CRITICAL patterns (3+ sessions) MODE: analysis diff --git a/.claude/workflows/cli-tools-usage.md b/.claude/workflows/cli-tools-usage.md index c3c7cb95..b56b39d9 100644 --- a/.claude/workflows/cli-tools-usage.md +++ b/.claude/workflows/cli-tools-usage.md @@ -62,7 +62,7 @@ RULES: $(cat ~/.claude/workflows/cli-templates/protocols/[mode]-protocol.md) $(c ## Essential Command Structure ```bash -ccw cli exec "" --tool --mode +ccw cli -p "" --tool --mode ``` **⚠️ CRITICAL**: `--mode` parameter is **MANDATORY** for all CLI executions. No defaults are assumed. @@ -70,7 +70,7 @@ ccw cli exec "" --tool --mode ### Core Principles - **Use tools early and often** - Tools are faster and more thorough -- **Unified CLI** - Always use `ccw cli exec` for consistent parameter handling +- **Unified CLI** - Always use `ccw cli -p` for consistent parameter handling - **Mode is MANDATORY** - ALWAYS explicitly specify `--mode analysis|write` (no implicit defaults) - **One template required** - ALWAYS reference exactly ONE template in RULES (use universal fallback if no specific match) - **Write protection** - Require EXPLICIT `--mode write` for file operations @@ -131,7 +131,7 @@ RULES: $(cat ~/.claude/workflows/cli-templates/protocols/write-protocol.md) $(ca ### Gemini & Qwen -**Via CCW**: `ccw cli exec "" --tool gemini --mode analysis` or `--tool qwen --mode analysis` +**Via CCW**: `ccw cli -p "" --tool gemini --mode analysis` or `--tool qwen --mode analysis` **Characteristics**: - Large context window, pattern recognition @@ -147,7 +147,7 @@ RULES: $(cat ~/.claude/workflows/cli-templates/protocols/write-protocol.md) $(ca ### Codex -**Via CCW**: `ccw cli exec "" --tool codex --mode write` +**Via CCW**: `ccw cli -p "" --tool codex --mode write` **Characteristics**: - Autonomous development, mathematical reasoning @@ -161,8 +161,8 @@ RULES: $(cat ~/.claude/workflows/cli-templates/protocols/write-protocol.md) $(ca **Resume via `--resume` parameter**: ```bash -ccw cli exec "Continue analyzing" --tool gemini --mode analysis --resume # Resume last session -ccw cli exec "Fix issues found" --tool codex --mode write --resume # Resume specific session +ccw cli -p "Continue analyzing" --tool gemini --mode analysis --resume # Resume last session +ccw cli -p "Fix issues found" --tool codex --mode write --resume # Resume specific session ``` - **`--resume` (empty)**: Resume most recent session @@ -264,7 +264,7 @@ rg "export.*Component" --files-with-matches --type ts CONTEXT: @components/Auth.tsx @types/auth.d.ts | Memory: Previous type refactoring # Step 3: Execute CLI -ccw cli exec "..." --tool gemini --mode analysis --cd src +ccw cli -p "..." --tool gemini --mode analysis --cd src ``` ### RULES Configuration @@ -284,13 +284,13 @@ ccw cli exec "..." --tool gemini --mode analysis --cd src **Critical**: Use double quotes `"..."` around the entire prompt to enable `$(cat ...)` expansion: ```bash # ✓ CORRECT - double quotes allow shell expansion -ccw cli exec "RULES: $(cat ~/.claude/workflows/cli-templates/protocols/analysis-protocol.md) ..." --tool gemini +ccw cli -p "RULES: $(cat ~/.claude/workflows/cli-templates/protocols/analysis-protocol.md) ..." --tool gemini # ✗ WRONG - single quotes prevent expansion -ccw cli exec 'RULES: $(cat ~/.claude/workflows/cli-templates/protocols/analysis-protocol.md) ...' --tool gemini +ccw cli -p 'RULES: $(cat ~/.claude/workflows/cli-templates/protocols/analysis-protocol.md) ...' --tool gemini # ✗ WRONG - escaped $ prevents expansion -ccw cli exec "RULES: \$(cat ~/.claude/workflows/cli-templates/protocols/analysis-protocol.md) ..." --tool gemini +ccw cli -p "RULES: \$(cat ~/.claude/workflows/cli-templates/protocols/analysis-protocol.md) ..." --tool gemini ``` **Examples**: @@ -397,10 +397,10 @@ When using `--cd`: ```bash # Single directory -ccw cli exec "CONTEXT: @**/* @../shared/**/*" --tool gemini --mode analysis --cd src/auth --includeDirs ../shared +ccw cli -p "CONTEXT: @**/* @../shared/**/*" --tool gemini --mode analysis --cd src/auth --includeDirs ../shared # Multiple directories -ccw cli exec "..." --tool gemini --mode analysis --cd src/auth --includeDirs ../shared,../types,../utils +ccw cli -p "..." --tool gemini --mode analysis --cd src/auth --includeDirs ../shared,../types,../utils ``` **Rule**: If CONTEXT contains `@../dir/**/*`, MUST include `--includeDirs ../dir` @@ -433,7 +433,7 @@ CCW automatically maps to tool-specific syntax: **Analysis Task** (Security Audit): ```bash -ccw cli exec " +ccw cli -p " PURPOSE: Identify OWASP Top 10 vulnerabilities in authentication module to pass security audit; success = all critical/high issues documented with remediation TASK: • Scan for injection flaws (SQL, command, LDAP) • Check authentication bypass vectors • Evaluate session management • Assess sensitive data exposure MODE: analysis @@ -445,7 +445,7 @@ RULES: $(cat ~/.claude/workflows/cli-templates/protocols/analysis-protocol.md) $ **Implementation Task** (New Feature): ```bash -ccw cli exec " +ccw cli -p " PURPOSE: Implement rate limiting for API endpoints to prevent abuse; must be configurable per-endpoint; backward compatible with existing clients TASK: • Create rate limiter middleware with sliding window • Implement per-route configuration • Add Redis backend for distributed state • Include bypass for internal services MODE: write @@ -457,7 +457,7 @@ RULES: $(cat ~/.claude/workflows/cli-templates/protocols/write-protocol.md) $(ca **Bug Fix Task**: ```bash -ccw cli exec " +ccw cli -p " PURPOSE: Fix memory leak in WebSocket connection handler causing server OOM after 24h; root cause must be identified before any fix TASK: • Trace connection lifecycle from open to close • Identify event listener accumulation • Check cleanup on disconnect • Verify garbage collection eligibility MODE: analysis @@ -469,7 +469,7 @@ RULES: $(cat ~/.claude/workflows/cli-templates/protocols/analysis-protocol.md) $ **Refactoring Task**: ```bash -ccw cli exec " +ccw cli -p " PURPOSE: Refactor payment processing to use strategy pattern for multi-gateway support; no functional changes; all existing tests must pass TASK: • Extract gateway interface from current implementation • Create strategy classes for Stripe, PayPal • Implement factory for gateway selection • Migrate existing code to use strategies MODE: write @@ -501,8 +501,8 @@ RULES: $(cat ~/.claude/workflows/cli-templates/protocols/write-protocol.md) $(ca **Codex Multiplier**: 3x allocated time (minimum 15min / 900000ms) ```bash -ccw cli exec "" --tool gemini --mode analysis --timeout 600000 # 10 min -ccw cli exec "" --tool codex --mode write --timeout 1800000 # 30 min +ccw cli -p "" --tool gemini --mode analysis --timeout 600000 # 10 min +ccw cli -p "" --tool codex --mode write --timeout 1800000 # 30 min ``` ### Permission Framework @@ -530,10 +530,10 @@ ccw cli exec "" --tool codex --mode write --timeout 1800000 # 30 min ### Workflow Integration -- **Understanding**: `ccw cli exec "" --tool gemini --mode analysis` -- **Architecture**: `ccw cli exec "" --tool gemini --mode analysis` -- **Implementation**: `ccw cli exec "" --tool codex --mode write` -- **Quality**: `ccw cli exec "" --tool codex --mode write` +- **Understanding**: `ccw cli -p "" --tool gemini --mode analysis` +- **Architecture**: `ccw cli -p "" --tool gemini --mode analysis` +- **Implementation**: `ccw cli -p "" --tool codex --mode write` +- **Quality**: `ccw cli -p "" --tool codex --mode write` ### Planning Checklist diff --git a/ccw/src/cli.ts b/ccw/src/cli.ts index 9ae8f298..db99bf32 100644 --- a/ccw/src/cli.ts +++ b/ccw/src/cli.ts @@ -153,6 +153,8 @@ export function run(argv: string[]): void { program .command('cli [subcommand] [args...]') .description('Unified CLI tool executor (gemini/qwen/codex/claude)') + .option('-p, --prompt ', 'Prompt text (alternative to positional argument)') + .option('-f, --file ', 'Read prompt from file (best for multi-line prompts)') .option('--tool ', 'CLI tool to use', 'gemini') .option('--mode ', 'Execution mode: analysis, write, auto', 'analysis') .option('--model ', 'Model override') diff --git a/ccw/src/commands/cli.ts b/ccw/src/commands/cli.ts index 1aaecaf4..2603ea35 100644 --- a/ccw/src/commands/cli.ts +++ b/ccw/src/commands/cli.ts @@ -58,6 +58,8 @@ function notifyDashboard(data: Record): void { } interface CliExecOptions { + prompt?: string; // Prompt via --prompt/-p option (preferred for multi-line) + file?: string; // Read prompt from file tool?: string; mode?: string; model?: string; @@ -269,6 +271,83 @@ function showStorageHelp(): void { console.log(); } +/** + * Test endpoint for debugging multi-line prompt parsing + * Shows exactly how Commander.js parsed the arguments + */ +function testParseAction(args: string[], options: CliExecOptions): void { + console.log(chalk.bold.cyan('\n ═══════════════════════════════════════════════')); + console.log(chalk.bold.cyan(' │ CLI PARSE TEST ENDPOINT │')); + console.log(chalk.bold.cyan(' ═══════════════════════════════════════════════\n')); + + // Show args array parsing + console.log(chalk.bold.yellow('📦 Positional Arguments (args[]):')); + console.log(chalk.gray(' Length: ') + chalk.white(args.length)); + if (args.length === 0) { + console.log(chalk.gray(' (empty)')); + } else { + args.forEach((arg, i) => { + console.log(chalk.gray(` [${i}]: `) + chalk.green(`"${arg}"`)); + // Show if multiline + if (arg.includes('\n')) { + console.log(chalk.yellow(` ↳ Contains ${arg.split('\n').length} lines`)); + } + }); + } + + console.log(); + + // Show options parsing + console.log(chalk.bold.yellow('⚙️ Options:')); + const optionEntries = Object.entries(options).filter(([_, v]) => v !== undefined); + if (optionEntries.length === 0) { + console.log(chalk.gray(' (none)')); + } else { + optionEntries.forEach(([key, value]) => { + const displayValue = typeof value === 'string' && value.includes('\n') + ? `"${value.substring(0, 50)}..." (${value.split('\n').length} lines)` + : JSON.stringify(value); + console.log(chalk.gray(` --${key}: `) + chalk.cyan(displayValue)); + }); + } + + console.log(); + + // Show what would be used as prompt + console.log(chalk.bold.yellow('🎯 Final Prompt Resolution:')); + const { prompt: optionPrompt, file } = options; + + if (file) { + console.log(chalk.gray(' Source: ') + chalk.magenta('--file/-f option')); + console.log(chalk.gray(' File: ') + chalk.cyan(file)); + } else if (optionPrompt) { + console.log(chalk.gray(' Source: ') + chalk.magenta('--prompt/-p option')); + console.log(chalk.gray(' Value: ') + chalk.green(`"${optionPrompt.substring(0, 100)}${optionPrompt.length > 100 ? '...' : ''}"`)); + if (optionPrompt.includes('\n')) { + console.log(chalk.yellow(` ↳ Multiline: ${optionPrompt.split('\n').length} lines`)); + } + } else if (args[0]) { + console.log(chalk.gray(' Source: ') + chalk.magenta('positional argument (args[0])')); + console.log(chalk.gray(' Value: ') + chalk.green(`"${args[0].substring(0, 100)}${args[0].length > 100 ? '...' : ''}"`)); + if (args[0].includes('\n')) { + console.log(chalk.yellow(` ↳ Multiline: ${args[0].split('\n').length} lines`)); + } + } else { + console.log(chalk.red(' No prompt found!')); + } + + console.log(); + + // Show raw debug info + console.log(chalk.bold.yellow('🔍 Raw Debug Info:')); + console.log(chalk.gray(' process.argv:')); + process.argv.forEach((arg, i) => { + console.log(chalk.gray(` [${i}]: `) + chalk.dim(arg.length > 60 ? arg.substring(0, 60) + '...' : arg)); + }); + + console.log(chalk.bold.cyan('\n ═══════════════════════════════════════════════\n')); +} + /** * Show CLI tool status */ @@ -295,14 +374,42 @@ async function statusAction(): Promise { * @param {string} prompt - Prompt to execute * @param {Object} options - CLI options */ -async function execAction(prompt: string | undefined, options: CliExecOptions): Promise { - if (!prompt) { +async function execAction(positionalPrompt: string | undefined, options: CliExecOptions): Promise { + const { prompt: optionPrompt, file, tool = 'gemini', mode = 'analysis', model, cd, includeDirs, timeout, noStream, resume, id, noNative } = options; + + // Priority: 1. --file, 2. --prompt/-p option, 3. positional argument + let finalPrompt: string | undefined; + + if (file) { + // Read from file + const { readFileSync, existsSync } = await import('fs'); + const { resolve } = await import('path'); + const filePath = resolve(file); + if (!existsSync(filePath)) { + console.error(chalk.red(`Error: File not found: ${filePath}`)); + process.exit(1); + } + finalPrompt = readFileSync(filePath, 'utf8').trim(); + if (!finalPrompt) { + console.error(chalk.red('Error: File is empty')); + process.exit(1); + } + } else if (optionPrompt) { + // Use --prompt/-p option (preferred for multi-line) + finalPrompt = optionPrompt; + } else { + // Fall back to positional argument + finalPrompt = positionalPrompt; + } + + if (!finalPrompt) { console.error(chalk.red('Error: Prompt is required')); - console.error(chalk.gray('Usage: ccw cli exec "" --tool gemini')); + console.error(chalk.gray('Usage: ccw cli -p "" --tool gemini')); + console.error(chalk.gray(' or: ccw cli -f prompt.txt --tool codex')); process.exit(1); } - const { tool = 'gemini', mode = 'analysis', model, cd, includeDirs, timeout, noStream, resume, id, noNative } = options; + const prompt_to_use = finalPrompt; // Parse resume IDs for merge scenario const resumeIds = resume && typeof resume === 'string' ? resume.split(',').map(s => s.trim()).filter(Boolean) : []; @@ -333,7 +440,7 @@ async function execAction(prompt: string | undefined, options: CliExecOptions): event: 'started', tool, mode, - prompt_preview: prompt.substring(0, 100) + (prompt.length > 100 ? '...' : ''), + prompt_preview: prompt_to_use.substring(0, 100) + (prompt_to_use.length > 100 ? '...' : ''), custom_id: id || null }); @@ -345,7 +452,7 @@ async function execAction(prompt: string | undefined, options: CliExecOptions): try { const result = await cliExecutorTool.execute({ tool, - prompt, + prompt: prompt_to_use, mode, model, cd, @@ -398,7 +505,7 @@ async function execAction(prompt: string | undefined, options: CliExecOptions): console.error(chalk.red(result.stderr)); } - // Notify dashboard: execution failed + // Notify dashboard: execution failccw cli -p notifyDashboard({ event: 'completed', tool, @@ -535,7 +642,7 @@ function getTimeAgo(date: Date): string { return date.toLocaleDateString(); } -/** +/**ccw cli -p * CLI command entry point * @param {string} subcommand - Subcommand (status, exec, history, detail) * @param {string[]} args - Arguments array @@ -553,10 +660,6 @@ export async function cliCommand( await statusAction(); break; - case 'exec': - await execAction(argsArray[0], options as CliExecOptions); - break; - case 'history': await historyAction(options as HistoryOptions); break; @@ -569,42 +672,62 @@ export async function cliCommand( await storageAction(argsArray[0], options as unknown as StorageOptions); break; - default: - console.log(chalk.bold.cyan('\n CCW CLI Tool Executor\n')); - console.log(' Unified interface for Gemini, Qwen, and Codex CLI tools.\n'); - console.log(' Subcommands:'); - console.log(chalk.gray(' status Check CLI tools availability')); - console.log(chalk.gray(' storage [cmd] Manage CCW storage (info/clean/config)')); - console.log(chalk.gray(' exec Execute a CLI tool')); - console.log(chalk.gray(' history Show execution history')); - console.log(chalk.gray(' detail Show execution detail')); - console.log(); - console.log(' Exec Options:'); - console.log(chalk.gray(' --tool Tool to use: gemini, qwen, codex (default: gemini)')); - console.log(chalk.gray(' --mode Mode: analysis, write, auto (default: analysis)')); - console.log(chalk.gray(' --model Model override')); - console.log(chalk.gray(' --cd Working directory')); - console.log(chalk.gray(' --includeDirs Additional directories (comma-separated)')); - console.log(chalk.gray(' → gemini/qwen: --include-directories')); - console.log(chalk.gray(' → codex: --add-dir')); - console.log(chalk.gray(' --timeout Timeout in milliseconds (default: 300000)')); - console.log(chalk.gray(' --no-stream Disable streaming output')); - console.log(chalk.gray(' --resume [id] Resume previous session (empty=last, or execution ID)')); - console.log(chalk.gray(' --id Custom execution ID (e.g., IMPL-001-step1)')); - console.log(); - console.log(' History Options:'); - console.log(chalk.gray(' --limit Number of results (default: 20)')); - console.log(chalk.gray(' --tool Filter by tool')); - console.log(chalk.gray(' --status Filter by status')); - console.log(); - console.log(' Examples:'); - console.log(chalk.gray(' ccw cli status')); - console.log(chalk.gray(' ccw cli exec "Analyze the auth module" --tool gemini')); - console.log(chalk.gray(' ccw cli exec "Analyze with context" --tool gemini --includeDirs ../shared,../types')); - console.log(chalk.gray(' ccw cli exec "Implement feature" --tool codex --mode auto --includeDirs ./lib')); - console.log(chalk.gray(' ccw cli exec "Continue analysis" --resume # Resume last session')); - console.log(chalk.gray(' ccw cli exec "Continue..." --resume --tool gemini # Resume specific session')); - console.log(chalk.gray(' ccw cli history --tool gemini --limit 10')); - console.log(); + case 'test-parse': + // Test endpoint to debug multi-line prompt parsing + testParseAction(argsArray, options as CliExecOptions); + break; + + default: { + const execOptions = options as CliExecOptions; + // Auto-exec if: has -p/--prompt, has --stdin, has --resume, or subcommand looks like a prompt + const hasPromptOption = !!execOptions.prompt; + const hasStdin = !!execOptions.stdin; + const hasResume = execOptions.resume !== undefined; + const subcommandIsPrompt = subcommand && !subcommand.startsWith('-'); + + if (hasPromptOption || hasStdin || hasResume || subcommandIsPrompt) { + // Treat as exec: use subcommand as positional prompt if no -p option + const positionalPrompt = subcommandIsPrompt ? subcommand : undefined; + await execAction(positionalPrompt, execOptions); + } else { + // Show help + console.log(chalk.bold.cyan('\n CCW CLI Tool Executor\n')); + console.log(' Unified interface for Gemini, Qwen, and Codex CLI tools.\n'); + console.log(' Usage:'); + console.log(chalk.gray(' ccw cli -p "" --tool Direct execution (recommended)')); + console.log(chalk.gray(' ccw cli "" --tool Shorthand')); + console.log(chalk.gray(' ccw cli exec "" --tool Explicit exec')); + console.log(); + console.log(' Subcommands:'); + console.log(chalk.gray(' status Check CLI tools availability')); + console.log(chalk.gray(' storage [cmd] Manage CCW storage (info/clean/config)')); + console.log(chalk.gray(' exec Execute a CLI tool (optional, default behavior)')); + console.log(chalk.gray(' history Show execution history')); + console.log(chalk.gray(' detail Show execution detail')); + console.log(chalk.gray(' test-parse [args] Debug CLI argument parsing')); + console.log(); + console.log(' Exec Options:'); + console.log(chalk.gray(' -p, --prompt Prompt text (preferred for multi-line)')); + console.log(chalk.gray(' -f, --file Read prompt from file')); + console.log(chalk.gray(' --stdin Read prompt from stdin')); + console.log(chalk.gray(' --tool Tool to use: gemini, qwen, codex (default: gemini)')); + console.log(chalk.gray(' --mode Mode: analysis, write, auto (default: analysis)')); + console.log(chalk.gray(' --model Model override')); + console.log(chalk.gray(' --cd Working directory')); + console.log(chalk.gray(' --includeDirs Additional directories (comma-separated)')); + console.log(chalk.gray(' ccw cli -ps> Timeout in milliseconds (default: 300000)')); + console.log(chalk.gray(' --no-stream Disable streaming output')); + console.log(chalk.gray(' --resume [id] Resume previous session')); + console.log(chalk.gray(' --id Custom execution ID')); + console.log(); + console.log(' Examples:'); + console.log(chalk.gray(' ccw cli -p "Analyze auth module" --tool gemini')); + console.log(chalk.gray(' ccw cli "Simple prompt" --tool codex --mode write')); + console.log(chalk.gray(' ccw cli -p "$(cat prompt.txt)" --tool gemini')); + console.log(chalk.gray(' ccw cli --resume --tool gemini')); + console.log(chalk.gray(' ccw cli history --tool gemini --limit 10')); + console.log(); + } + } } } diff --git a/ccw/src/core/server.ts b/ccw/src/core/server.ts index b4ff51aa..1c50fec1 100644 --- a/ccw/src/core/server.ts +++ b/ccw/src/core/server.ts @@ -68,7 +68,8 @@ const MODULE_CSS_FILES = [ '13-claude-manager.css', '14-graph-explorer.css', '15-mcp-manager.css', - '16-help.css' + '16-help.css', + '17-core-memory.css' ]; // Modular JS files in dependency order @@ -82,41 +83,45 @@ const MODULE_FILES = [ 'components/modals.js', 'components/navigation.js', 'components/sidebar.js', + 'components/tabs-context.js', + 'components/tabs-other.js', + 'components/task-drawer-core.js', + 'components/task-drawer-renderers.js', + 'components/flowchart.js', 'components/carousel.js', 'components/notifications.js', 'components/global-notifications.js', - 'components/version-check.js', - 'components/mcp-manager.js', - 'components/hook-manager.js', + 'components/task-queue-sidebar.js', 'components/cli-status.js', 'components/cli-history.js', + 'components/mcp-manager.js', + 'components/hook-manager.js', + 'components/version-check.js', 'components/storage-manager.js', + 'components/index-manager.js', 'components/_exp_helpers.js', - 'components/tabs-other.js', - 'components/tabs-context.js', 'components/_conflict_tab.js', 'components/_review_tab.js', - 'components/task-drawer-core.js', - 'components/task-drawer-renderers.js', - 'components/task-queue-sidebar.js', - 'components/flowchart.js', 'views/home.js', 'views/project-overview.js', 'views/session-detail.js', 'views/review-session.js', 'views/lite-tasks.js', 'views/fix-session.js', + 'views/cli-manager.js', + 'views/codexlens-manager.js', + 'views/explorer.js', 'views/mcp-manager.js', 'views/hook-manager.js', - 'views/cli-manager.js', 'views/history.js', - 'views/explorer.js', + 'views/graph-explorer.js', 'views/memory.js', + 'views/core-memory.js', + 'views/core-memory-graph.js', 'views/prompt-history.js', 'views/skills-manager.js', 'views/rules-manager.js', 'views/claude-manager.js', - 'views/graph-explorer.js', 'views/help.js', 'main.js' ]; diff --git a/ccw/src/templates/dashboard-js/components/navigation.js b/ccw/src/templates/dashboard-js/components/navigation.js index 06bc5613..4cb26670 100644 --- a/ccw/src/templates/dashboard-js/components/navigation.js +++ b/ccw/src/templates/dashboard-js/components/navigation.js @@ -138,7 +138,11 @@ function initNavigation() { } else if (currentView === 'help') { renderHelpView(); } else if (currentView === 'core-memory') { - renderCoreMemoryView(); + if (typeof renderCoreMemoryView === 'function') { + renderCoreMemoryView(); + } else { + console.error('renderCoreMemoryView not defined - please refresh the page'); + } } }); }); diff --git a/ccw/src/templates/dashboard-js/components/notifications.js b/ccw/src/templates/dashboard-js/components/notifications.js index 6416d00c..619a0b66 100644 --- a/ccw/src/templates/dashboard-js/components/notifications.js +++ b/ccw/src/templates/dashboard-js/components/notifications.js @@ -208,7 +208,7 @@ function handleNotification(data) { break; case 'cli_execution': - // Handle CLI command notifications (ccw cli exec) + // Handle CLI command notifications (ccw cli -p) handleCliCommandNotification(payload); break; @@ -500,7 +500,7 @@ function handleToolExecutionNotification(payload) { } /** - * Handle CLI command notifications (ccw cli exec) + * Handle CLI command notifications (ccw cli -p) * @param {Object} payload - CLI execution payload */ function handleCliCommandNotification(payload) { diff --git a/ccw/src/templates/dashboard-js/help-i18n.js b/ccw/src/templates/dashboard-js/help-i18n.js index a087bdc8..e220c4b5 100644 --- a/ccw/src/templates/dashboard-js/help-i18n.js +++ b/ccw/src/templates/dashboard-js/help-i18n.js @@ -67,9 +67,9 @@ var helpI18n = { 'help.workflows.brainstorm.next': '进入规划阶段', // Workflow Steps - CLI Resume - 'help.workflows.cliResume.firstExec': 'ccw cli exec "分析..."', + 'help.workflows.cliResume.firstExec': 'ccw cli -p "分析..."', 'help.workflows.cliResume.saveContext': '保存会话上下文', - 'help.workflows.cliResume.resumeCmd': 'ccw cli exec --resume', + 'help.workflows.cliResume.resumeCmd': 'ccw cli -p --resume', 'help.workflows.cliResume.merge': '合并历史对话', 'help.workflows.cliResume.continue': '继续执行任务', 'help.workflows.cliResume.splitOutput': '拆分结果存储', @@ -188,9 +188,9 @@ var helpI18n = { 'help.workflows.brainstorm.next': 'Enter Planning Phase', // Workflow Steps - CLI Resume - 'help.workflows.cliResume.firstExec': 'ccw cli exec "analyze..."', + 'help.workflows.cliResume.firstExec': 'ccw cli -p "analyze..."', 'help.workflows.cliResume.saveContext': 'Save Session Context', - 'help.workflows.cliResume.resumeCmd': 'ccw cli exec --resume', + 'help.workflows.cliResume.resumeCmd': 'ccw cli -p --resume', 'help.workflows.cliResume.merge': 'Merge Conversation History', 'help.workflows.cliResume.continue': 'Continue Execution', 'help.workflows.cliResume.splitOutput': 'Split & Store Results', diff --git a/ccw/src/templates/dashboard-js/views/core-memory-graph.js b/ccw/src/templates/dashboard-js/views/core-memory-graph.js index e00eaec7..b5e137e8 100644 --- a/ccw/src/templates/dashboard-js/views/core-memory-graph.js +++ b/ccw/src/templates/dashboard-js/views/core-memory-graph.js @@ -87,7 +87,7 @@ function renderKnowledgeGraphD3(graph) { })); // Create SVG with zoom support - graphSvg = d3.select('#knowledgeGraphContainer') + coreMemGraphSvg = d3.select('#knowledgeGraphContainer') .append('svg') .attr('width', width) .attr('height', height) @@ -95,19 +95,19 @@ function renderKnowledgeGraphD3(graph) { .attr('viewBox', [0, 0, width, height]); // Create a group for zoom/pan transformations - graphGroup = graphSvg.append('g').attr('class', 'graph-content'); + coreMemGraphGroup = coreMemGraphSvg.append('g').attr('class', 'graph-content'); // Setup zoom behavior - graphZoom = d3.zoom() + coreMemGraphZoom = d3.zoom() .scaleExtent([0.1, 4]) .on('zoom', (event) => { - graphGroup.attr('transform', event.transform); + coreMemGraphGroup.attr('transform', event.transform); }); - graphSvg.call(graphZoom); + coreMemGraphSvg.call(coreMemGraphZoom); // Add arrowhead marker - graphSvg.append('defs').append('marker') + coreMemGraphSvg.append('defs').append('marker') .attr('id', 'arrowhead-core') .attr('viewBox', '-0 -5 10 10') .attr('refX', 20) @@ -122,7 +122,7 @@ function renderKnowledgeGraphD3(graph) { .style('stroke', 'none'); // Create force simulation - graphSimulation = d3.forceSimulation(nodes) + coreMemGraphSimulation = d3.forceSimulation(nodes) .force('link', d3.forceLink(edges).id(d => d.id).distance(100)) .force('charge', d3.forceManyBody().strength(-300)) .force('center', d3.forceCenter(width / 2, height / 2)) @@ -131,7 +131,7 @@ function renderKnowledgeGraphD3(graph) { .force('y', d3.forceY(height / 2).strength(0.05)); // Draw edges - const link = graphGroup.append('g') + const link = coreMemGraphGroup.append('g') .attr('class', 'graph-links') .selectAll('line') .data(edges) @@ -143,7 +143,7 @@ function renderKnowledgeGraphD3(graph) { .attr('marker-end', 'url(#arrowhead-core)'); // Draw nodes - const node = graphGroup.append('g') + const node = coreMemGraphGroup.append('g') .attr('class', 'graph-nodes') .selectAll('g') .data(nodes) @@ -183,7 +183,7 @@ function renderKnowledgeGraphD3(graph) { .attr('fill', '#333'); // Update positions on simulation tick - graphSimulation.on('tick', () => { + coreMemGraphSimulation.on('tick', () => { link .attr('x1', d => d.source.x) .attr('y1', d => d.source.y) @@ -195,7 +195,7 @@ function renderKnowledgeGraphD3(graph) { // Drag functions function dragstarted(event, d) { - if (!event.active) graphSimulation.alphaTarget(0.3).restart(); + if (!event.active) coreMemGraphSimulation.alphaTarget(0.3).restart(); d.fx = d.x; d.fy = d.y; } @@ -206,7 +206,7 @@ function renderKnowledgeGraphD3(graph) { } function dragended(event, d) { - if (!event.active) graphSimulation.alphaTarget(0); + if (!event.active) coreMemGraphSimulation.alphaTarget(0); d.fx = null; d.fy = null; } diff --git a/ccw/src/templates/dashboard-js/views/core-memory.js b/ccw/src/templates/dashboard-js/views/core-memory.js index 1d981f6a..6b4aab08 100644 --- a/ccw/src/templates/dashboard-js/views/core-memory.js +++ b/ccw/src/templates/dashboard-js/views/core-memory.js @@ -1,15 +1,15 @@ // Core Memory View // Manages strategic context entries with knowledge graph and evolution tracking -// State for visualization -let graphSvg = null; -let graphGroup = null; -let graphZoom = null; -let graphSimulation = null; +// State for visualization (prefixed to avoid collision with memory.js) +var coreMemGraphSvg = null; +var coreMemGraphGroup = null; +var coreMemGraphZoom = null; +var coreMemGraphSimulation = null; async function renderCoreMemoryView() { const content = document.getElementById('content'); - hideStatsAndSearch(); + hideStatsAndCarousel(); // Fetch core memories const archived = false; @@ -214,7 +214,8 @@ async function fetchCoreMemories(archived = false) { try { const response = await fetch(`/api/core-memory/memories?path=${encodeURIComponent(projectPath)}&archived=${archived}`); if (!response.ok) throw new Error(`HTTP ${response.status}`); - return await response.json(); + const data = await response.json(); + return data.memories || []; } catch (error) { console.error('Failed to fetch core memories:', error); showNotification(t('coreMemory.fetchError'), 'error'); @@ -226,7 +227,8 @@ async function fetchMemoryById(memoryId) { try { const response = await fetch(`/api/core-memory/memories/${memoryId}?path=${encodeURIComponent(projectPath)}`); if (!response.ok) throw new Error(`HTTP ${response.status}`); - return await response.json(); + const data = await response.json(); + return data.memory || null; } catch (error) { console.error('Failed to fetch memory:', error); showNotification(t('coreMemory.fetchError'), 'error'); diff --git a/ccw/src/templates/dashboard-js/views/mcp-manager.js b/ccw/src/templates/dashboard-js/views/mcp-manager.js index 49de6036..3e144398 100644 --- a/ccw/src/templates/dashboard-js/views/mcp-manager.js +++ b/ccw/src/templates/dashboard-js/views/mcp-manager.js @@ -7,6 +7,7 @@ const CCW_MCP_TOOLS = [ { name: 'write_file', desc: 'Write/create files', core: true }, { name: 'edit_file', desc: 'Edit/replace content', core: true }, { name: 'smart_search', desc: 'Hybrid search (regex + semantic)', core: true }, + { name: 'core_memory', desc: 'Core memory management', core: true }, // Optional tools { name: 'session_manager', desc: 'Workflow sessions', core: false }, { name: 'generate_module_docs', desc: 'Generate docs', core: false }, diff --git a/ccw/src/tools/cli-config-manager.ts b/ccw/src/tools/cli-config-manager.ts index 7d3e5812..ab7a66cd 100644 --- a/ccw/src/tools/cli-config-manager.ts +++ b/ccw/src/tools/cli-config-manager.ts @@ -11,7 +11,7 @@ import { StoragePaths, ensureStorageDir } from '../config/storage-paths.js'; export interface CliToolConfig { enabled: boolean; - primaryModel: string; // For CLI endpoint calls (ccw cli exec) + primaryModel: string; // For CLI endpoint calls (ccw cli -p) secondaryModel: string; // For internal calls (llm_enhancer, generate_module_docs) } diff --git a/ccw/src/tools/cli-executor.ts b/ccw/src/tools/cli-executor.ts index f0e0a33e..93b67aa0 100644 --- a/ccw/src/tools/cli-executor.ts +++ b/ccw/src/tools/cli-executor.ts @@ -319,8 +319,9 @@ function buildCommand(params: { break; case 'codex': - // Codex does NOT support stdin - prompt must be passed as command line argument - useStdin = false; + // Codex supports stdin when using `-` as prompt argument + // Using stdin avoids Windows command line escaping issues with multi-line/special char prompts + useStdin = true; // Native resume: codex resume [prompt] or --last if (nativeResume?.enabled) { args.push('resume'); @@ -333,8 +334,13 @@ function buildCommand(params: { if (dir) { args.push('-C', dir); } + // Permission configuration based on mode: + // - analysis: --full-auto (read-only sandbox, no prompts) - safer for read operations + // - write/auto: --dangerously-bypass-approvals-and-sandbox (full access for modifications) if (mode === 'write' || mode === 'auto') { - args.push('--skip-git-repo-check', '-s', 'danger-full-access'); + args.push('--dangerously-bypass-approvals-and-sandbox'); + } else { + args.push('--full-auto'); } if (model) { args.push('-m', model); @@ -345,19 +351,21 @@ function buildCommand(params: { args.push('--add-dir', addDir); } } - // Add prompt as positional argument for resume - if (prompt) { - args.push(prompt); - } + // Use `-` to indicate reading prompt from stdin + args.push('-'); } else { // Standard exec mode args.push('exec'); if (dir) { args.push('-C', dir); } - args.push('--full-auto'); + // Permission configuration based on mode: + // - analysis: --full-auto (read-only sandbox, no prompts) - safer for read operations + // - write/auto: --dangerously-bypass-approvals-and-sandbox (full access for modifications) if (mode === 'write' || mode === 'auto') { - args.push('--skip-git-repo-check', '-s', 'danger-full-access'); + args.push('--dangerously-bypass-approvals-and-sandbox'); + } else { + args.push('--full-auto'); } if (model) { args.push('-m', model); @@ -368,10 +376,8 @@ function buildCommand(params: { args.push('--add-dir', addDir); } } - // Add prompt as positional argument (codex exec "prompt") - if (prompt) { - args.push(prompt); - } + // Use `-` to indicate reading prompt from stdin (avoids Windows escaping issues) + args.push('-'); } break; @@ -734,8 +740,8 @@ async function executeCliTool( } } - // Only pass model if explicitly provided - let CLI tools use their own defaults - const effectiveModel = model; + // Use configured primary model if no explicit model provided + const effectiveModel = model || getPrimaryModel(workingDir, tool); // Build command const { command, args, useStdin } = buildCommand({ diff --git a/codex-lens/_debug_output.txt b/codex-lens/_debug_output.txt index 04a5578e..69928b7a 100644 --- a/codex-lens/_debug_output.txt +++ b/codex-lens/_debug_output.txt @@ -16,4 +16,4 @@ Got it. I'm ready for your first command. ✓ Completed in 16.1s ID: 1765691168543-gemini - Continue: ccw cli exec "..." --resume 1765691168543-gemini + Continue: ccw cli -p "..." --resume 1765691168543-gemini diff --git a/codex-lens/_test_output.txt b/codex-lens/_test_output.txt index 57ca1751..76696b00 100644 --- a/codex-lens/_test_output.txt +++ b/codex-lens/_test_output.txt @@ -17,6 +17,6 @@ Setup complete. I am ready for your first command. ✓ Completed in 19.6s ID: 1765690404300-gemini - Continue: ccw cli exec "..." --resume 1765690404300-gemini + Continue: ccw cli -p "..." --resume 1765690404300-gemini === STDERR === diff --git a/codex-lens/_test_result.txt b/codex-lens/_test_result.txt index 6ab2f61f..aab2e831 100644 --- a/codex-lens/_test_result.txt +++ b/codex-lens/_test_result.txt @@ -16,4 +16,4 @@ Setup complete. I am ready for your first command. ✓ Completed in 16.0s ID: 1765690668720-gemini - Continue: ccw cli exec "..." --resume 1765690668720-gemini + Continue: ccw cli -p "..." --resume 1765690668720-gemini